- Notifications
You must be signed in to change notification settings - Fork441
I/O system enhancements#710
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Merged
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
coveralls commentedMar 16, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I have some changes that build on this one, so I'm accepting the PR. If you have comments on anything here, feel free to post and I can update with another PR to address. |
Am a little late on this, but it looks good to me. |
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
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.
This PR adds some new functionality for I/O systems that I used in a recent course on optimization-based control that I taught at Caltech:
Modify the
ss()
,rss()
, anddrss()
functions to returnLinearIOSystem
objects (instead ofStateSpace
objects). This makes it easier to create LTI state space systems that can be combined with other I/O systems without having to add a conversation step. SinceLinearIOSystem
objects are alsoStateSpace
objects, no functionality is lost. (This change is implemented through the introduction of a internalNamedIOSystem
class, to avoid import cycles.)Added a new function
create_statefbk_iosystem()
that creates an I/O system for implementing a linear state feedback controller of the form u = ud - Kp(x - xd). The function returns an I/O system that takes xd, ud, and x as inputs and generates u as an output. Theintegral_action
keyword can be used to define a set of outputs y = C x for which integral feedback is also included: u = ud - Kp(x - xd) - Ki(C x - C xd).The
lqr
anddlqr
commands now accept anintegral_action
keyword that allows outputs to be specified for implementing integral action. The resulting gain matrix has the form K = [Kp, Ki]. (This is useful for combining with theintegral_action
functionality increate_statefbk_iosystem()
).