Skip to content

Small fixes based on Caltech CDS 112 course #849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Mar 24, 2023

Conversation

murrayrm
Copy link
Member

@murrayrm murrayrm commented Jan 14, 2023

This PR contains some small fixes that I discovered while teaching CDS 112 at Caltech in Winter 2023:

  • Fixed bug in create_statefbk_iosystem that didn't proper handle 1D gain schedules.
  • flatsys.point_to_point generates an error if you specify a cost or constraint with less than 3 time points.
  • Sampling a LinearIOSystem returns a LinearIOSystem (before it returned a StateSpace system).
  • Added an add_unused keyword parameter to interconnect that allows unused inputs or outputs to be added as inputs or outputs of the interconnected system (useful for doing a "partial" interconnection).
  • create_mpc_iosystem now allows system and signal names to be specified via appropriate keywords.
  • Changed type keyword for create_statefbk_iosystem to controller_type (linear or nonlinear). Using type generates a deprecation warning.
  • Added control_indices and state_indices to create_statefbk_iosystem to allow partial interconnection (eg, for inner/outer loop construction).
  • Updated unit tests, docstrings, and comments.

@coveralls
Copy link

Coverage Status

Coverage: ?%. Remained the same when pulling 10bcd65 on murrayrm:cds112_fixes-12Jan2023 into 55730b6 on python-control:main.

@coveralls
Copy link

coveralls commented Jan 14, 2023

Coverage Status

Coverage: 94.876% (-0.007%) from 94.883% when pulling 574cf69 on murrayrm:cds112_fixes-12Jan2023 into 08dcc95 on python-control:main.

type : 'linear' or 'nonlinear', optional
controller_type : 'linear' or 'nonlinear', optional
Copy link
Contributor

@bnavigator bnavigator Jan 15, 2023

Choose a reason for hiding this comment

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

That's an API change. The milestone should be 0.10.0 (or 1.0.0) then.

Copy link
Member Author

Choose a reason for hiding this comment

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

I put in code to handle legacy calls, so type will still work. See line 732.

@bnavigator
Copy link
Contributor

Rebased onto current main, in order to resolve conflicts due to #857

@murrayrm murrayrm force-pushed the cds112_fixes-12Jan2023 branch from 67ea154 to 8e40c90 Compare February 18, 2023 21:16
@murrayrm murrayrm marked this pull request as ready for review March 13, 2023 05:55
@murrayrm murrayrm force-pushed the cds112_fixes-12Jan2023 branch from 49756c4 to 574cf69 Compare March 18, 2023 17:33
@murrayrm murrayrm merged commit 177cba9 into python-control:main Mar 24, 2023
@murrayrm murrayrm deleted the cds112_fixes-12Jan2023 branch March 24, 2023 04:28
@murrayrm murrayrm added this to the 0.9.4 milestone Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants