- Notifications
You must be signed in to change notification settings - Fork441
standardize time response return values, return_x/squeeze keyword processing#511
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
murrayrm merged 3 commits intopython-control:masterfrommurrayrm:standardize_time_responseJan 19, 2021
Merged
standardize time response return values, return_x/squeeze keyword processing#511
murrayrm merged 3 commits intopython-control:masterfrommurrayrm:standardize_time_responseJan 19, 2021
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 commentedJan 17, 2021 • 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.
This was referencedJan 17, 2021
d9acc3e
to47bbf16
CompareSign 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 is a partial replacement for#507, focused on addressing the issues in#453 relating to time responses:
Update
forced_response
to only return the state trajectory ifreturn_x
is True, consistent with all other time response functions (includinginput_output_response
). Prior to this,forced_response
always returned the state vector. In addition to the inconsistency, this was also problematic if the system you were simulating was a transfer function, since the state space depended on the realization and this information islost
. Some other smaller changes related to this:return_x
using `config.defaults['forced_response.return_x'] (default = False)config.defaults['forced_response.return_x']
to True withuse_legacy_defaults
for versions < 0.9.0 for backward compatibility.Consolidate processing of time responses through a new internal function
_process_time_response
that provides uniform processing of thereturn_x
andsqueeze
keywords. This is mainly in preparation for any future changes in how we handlesqueeze
, so that changes only need to be made at one location in the code. The functionality of the code is unchanged, but the processing is a big different:squeeze
keyword for time responses is now set inconfig.defaults['control.squeeze_time_response']
. This is currently set to True, which means that time responses for systems with a single output are squeezed to a 1D response.impulse_response
,initial_response
,step_response
,forced_response
,input_output_response
).squeeze='siso'
capability that would allow time responses to mirror current frequency response behavior (squeeze=True
only removes axes for SISO systems). I left this out for now pending resolution of the frequency response squeeze processing (drafted inStandardize squeeze processing in frequency response functions #507, but needs more thought and effort).Other changes, not directly related to those above