Title: update model_reduction to allow input/output selection + unstable warning (vs exception) by murrayrm · Pull Request #1074 · python-control/python-control · GitHub
Open Graph Title: update model_reduction to allow input/output selection + unstable warning (vs exception) by murrayrm · Pull Request #1074 · python-control/python-control
X Title: update model_reduction to allow input/output selection + unstable warning (vs exception) by murrayrm · Pull Request #1074 · python-control/python-control
Description: This PR updates the model_reduction function to add some additional functionality. From the docstring: This function produces a reduced-order model of a system by eliminating specified inputs, outputs, and/or states from the original system. The specific states, inputs, or outputs that are eliminated can be specified by either listing the states, inputs, or outputs to be eliminated or those to be kept. Specific updates: Changed the ELIM positional parameter to elim_states (positional or keyword). Added keep_states to allow specifying the list of states to keep instead of those to eliminate. Added elim_inputs, elim_outputs, keep_inputs, keep_outputs to allow selection of inputs and outputs. Specifications of states, inputs, and outputs can be done by a list of integers (original implementation) as well as slices or lists of signal names (new). In the case of eliminating states, inputs, or outputs from an unstable system, a warning is issued (versus an exception) and this warning can be suppressed using warn_unstable=False. Removed the copyright info from the top of modelsimp.py since we know just use the LICENSE file. Add unit tests and documentation updates. Cleaned up import order (isort -m2) and removed extraneous spaces. This PR was motivated by an example from FBS2e (see steering.py), where I wanted to extract the dynamics of a subsystem (and the original system had an eigenvalue at the origin). It is possible to accomplish the same result by using the old implementation (assuming the exception is changed to a warning) and then indexing the system directly to handle the inputs and outputs, but it seemed natural to include in a single function call.
Open Graph Description: This PR updates the model_reduction function to add some additional functionality. From the docstring: This function produces a reduced-order model of a system by eliminating specified inputs, ou...
X Description: This PR updates the model_reduction function to add some additional functionality. From the docstring: This function produces a reduced-order model of a system by eliminating specified inputs, ou...
Opengraph URL: https://github.com/python-control/python-control/pull/1074
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:ff2fb048-adf3-e2ee-888d-962a2e7de251 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CBDC:3300CE:1312A2F:1B27902:697A391A |
| html-safe-nonce | c503afa9eacdc0ffcaafe164ca6186020f415baa442022b4296fa2f91d7d7ee6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQkRDOjMzMDBDRToxMzEyQTJGOjFCMjc5MDI6Njk3QTM5MUEiLCJ2aXNpdG9yX2lkIjoiNTc4NDU4NTQ5MjE2Njc1MjUzOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f09e626fe396bcae2d397b8aa63678a35ba8a5f63d05ee5cbac4b70ed6446956 |
| hovercard-subject-tag | pull_request:2216155026 |
| 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/1074/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 updates the model_reduction function to add some additional functionality. From the docstring: This function produces a reduced-order model of a system by eliminating specified inputs, ou... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | af6de804ceb83ad30bb9b348cdeaccaa30cdcb566762d5e74e21e2bad88885d0 |
| 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 | 2d980605f0959039ddebcbcf522b072508302977 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width