GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — create_statefbk_iosystem and optimal control enhancements by murrayrm · Pull Request #930 · python-control/python-control

Conversation

@murrayrm

@murrayrm murrayrm commented Sep 10, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

This PR has two primary changes. motivated by some debugging I was doing in #929:

  • The create_statefbk_iosystem function now allows you to pass an I/O system instead of the a gain (or gain schedule) for the controller. This allows a more general state feedback controller (like an MPC controller) to be created using create_statefbk_iosystem. (I needed this so that I could gain easy access to the inputs in issue #929, since the feedback function does not pass through the controller inputs as a system output, but create_statefbk_iosystem does.)
  • The create_mpc_iosystem function now properly allows keyword parameters that go to the underlying OptimalControlProblem, for example setting the minimization method. Prior to this, the keyword parameters were passed to OptimalControlProblem but were also passed to NonlinearIOSystem, where they would generate an error.
  • Unit tests and documentation updated as well. More specifically, the documentation for the solve_ocp function has been updated to make more clear how the final time point is handled (see issue #929 for some discussion on this).
  • Had to modify the install_examples.yml workflow to explicitly include the latest python version, otherwise an early version of matplotlib got installed that was not current enough to work with current code (not sure why this was suddenly required...).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@coveralls

coveralls commented Sep 10, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Coverage Status

coverage: 95.012% (+0.002%) from 95.01% when pulling 5e217ee on murrayrm:mpc_enhancements-10Sep2023 into a11d3be on python-control:main.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@murrayrm murrayrm mentioned this pull request Sep 14, 2023
Constrained MPC: Differences to MATLAB and Numeric Issues for different OS #929
Closed
@murrayrm murrayrm changed the title create_statefbk_iosystem and create_mpc_iosystem enhancements create_statefbk_iosystem and optimal control enhancements Sep 15, 2023
@murrayrm
murrayrm force-pushed the mpc_enhancements-10Sep2023 branch 2 times, most recently from f9256cc to 522a8d7 Compare September 16, 2023 04:35
@murrayrm murrayrm linked an issue Sep 16, 2023 that may be closed by this pull request
Constrained MPC: Differences to MATLAB and Numeric Issues for different OS #929
Closed
murrayrm added 3 commits September 16, 2023 10:31
@murrayrm
allow create_statefbk_iosystem to use iosys, pass through keywords in…
21d0043
… create_mpc_iosystem
@murrayrm
add unit test for statefbk w/ iosystem and integrator
5729b22
@murrayrm
add documentation for discrete time optimal control problems
a40906e
@murrayrm
murrayrm force-pushed the mpc_enhancements-10Sep2023 branch from 522a8d7 to a40906e Compare September 16, 2023 17:32
sawyerbfuller
sawyerbfuller reviewed Oct 20, 2023
View reviewed changes
Comment thread doc/optimal.rst Outdated

.. math::

J(x, u) = \sum_{k=0}^{N-1} L(x_k, u_k)\, dt + V \bigl( x_N \bigr).

@sawyerbfuller sawyerbfuller Oct 20, 2023

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does V(x_N) need big parens but L(.) does not?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@sawyerbfuller sawyerbfuller Oct 20, 2023

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

above, V(.) gets regular sized parens.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sawyerbfuller

sawyerbfuller commented Oct 20, 2023

Copy link
Copy Markdown
Contributor

These seem like obvious improvements to make, so I see no issue with them. Just one tiny note in the comments.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sawyerbfuller
sawyerbfuller approved these changes Oct 20, 2023
View reviewed changes
@murrayrm
small doc fix as pointed out by @sawyerfuller
7abb6e9
@murrayrm
murrayrm force-pushed the mpc_enhancements-10Sep2023 branch 2 times, most recently from 727eb8e to f58b19b Compare October 22, 2023 05:31
@murrayrm
set python version in .github/workflows/install_examples.yml
5e217ee
@murrayrm
murrayrm force-pushed the mpc_enhancements-10Sep2023 branch from f58b19b to 5e217ee Compare October 22, 2023 05:33
@murrayrm
murrayrm merged commit a44def1 into python-control:main Oct 22, 2023
@murrayrm
murrayrm deleted the mpc_enhancements-10Sep2023 branch October 22, 2023 05:46
@murrayrm murrayrm added this to the 0.10.0 milestone Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@sawyerbfuller sawyerbfuller sawyerbfuller approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

0.10.0

Development

Successfully merging this pull request may close these issues.

Constrained MPC: Differences to MATLAB and Numeric Issues for different OS

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@murrayrm @coveralls @sawyerbfuller
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.