Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Conversation

murrayrm
Copy link
Member

This PR is a partial replacement for#507, focused on addressing the issues in#453 relating to time responses:

  • Updateforced_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:

    • Issue a warning if you ask for the state space trajectory corresponding to a transfer function
    • Set the default value ofreturn_x using `config.defaults['forced_response.return_x'] (default = False)
    • Reset the default value ofconfig.defaults['forced_response.return_x'] to True withuse_legacy_defaults for versions < 0.9.0 for backward compatibility.
    • Unit tests to make sure all of that is working.
  • 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:

    • The default value for thesqueeze 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.
    • Added some unit tests to make sure that we get the right return values for all of the current time responses (impulse_response,initial_response,step_response,forced_response,input_output_response).
    • Added some commented out code for future implementation of asqueeze='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

  • Added a warning if you try to specify a non-zero initial state when simulating a transfer function.
  • Docstring cleanup to use numpydoc syntax in few places.

@coveralls
Copy link

coveralls commentedJan 17, 2021
edited
Loading

Coverage Status

Coverage increased (+0.06%) to 87.607% when pulling47bbf16 on murrayrm:standardize_time_response into6f674cf on python-control:master.

@murrayrmmurrayrmforce-pushed thestandardize_time_response branch fromd9acc3e to47bbf16CompareJanuary 19, 2021 16:59
@murrayrmmurrayrm merged commit0a08ff2 intopython-control:masterJan 19, 2021
@murrayrmmurrayrm deleted the standardize_time_response branchJanuary 19, 2021 18:06
@murrayrmmurrayrm added this to the0.9.0 milestoneMar 20, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
0.9.0
Development

Successfully merging this pull request may close these issues.

2 participants
@murrayrm@coveralls

[8]ページ先頭

©2009-2025 Movatter.jp