Title: standardize time response return values, return_x/squeeze keyword processing by murrayrm · Pull Request #511 · python-control/python-control · GitHub
Open Graph Title: standardize time response return values, return_x/squeeze keyword processing by murrayrm · Pull Request #511 · python-control/python-control
X Title: standardize time response return values, return_x/squeeze keyword processing by murrayrm · Pull Request #511 · python-control/python-control
Description: 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 if return_x is True, consistent with all other time response functions (including input_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 is lost. 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 of return_x using `config.defaults['forced_response.return_x'] (default = False) Reset the default value of config.defaults['forced_response.return_x'] to True with use_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 the return_x and squeeze keywords. This is mainly in preparation for any future changes in how we handle squeeze, 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 the squeeze keyword for time responses is now set in config.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 a 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 in #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.
Open Graph Description: 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 if return_x is True, con...
X Description: 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 if return_x is True, con...
Opengraph URL: https://github.com/python-control/python-control/pull/511
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:5ada5905-25cd-66fb-bd25-aa801969e2be |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9E7C:36CA7:3CC1330:526332E:697C89A7 |
| html-safe-nonce | 3731d7dbd6ea69b7e188da7cbe404803afcd680393f70f49048078ca6cad9b69 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTdDOjM2Q0E3OjNDQzEzMzA6NTI2MzMyRTo2OTdDODlBNyIsInZpc2l0b3JfaWQiOiI1NDU3MzcyMTUwMjk1NzI2NTAzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | bdec88c0df3236a983093c2d86e82e0e2a41dc85108217b0ce8c03998b356a9d |
| hovercard-subject-tag | pull_request:556255222 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python-control/python-control/pull/511/files |
| twitter:image | https://avatars.githubusercontent.com/u/293362?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/293362?s=400&v=4 |
| og:image:alt | 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 if return_x is True, con... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5bdfd06d077d4bc79a8063f7549f208cda3158f1322903029653dc97f57b937a |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python-control/python-control git https://github.com/python-control/python-control.git |
| octolytics-dimension-user_id | 2285872 |
| octolytics-dimension-user_login | python-control |
| octolytics-dimension-repository_id | 22791752 |
| octolytics-dimension-repository_nwo | python-control/python-control |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 22791752 |
| octolytics-dimension-repository_network_root_nwo | python-control/python-control |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c3b5bc6692aa647cb0715885eb2a385b4e8afc8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width