Title: LQR using SciPy by murrayrm · Pull Request #683 · python-control/python-control · GitHub
Open Graph Title: LQR using SciPy by murrayrm · Pull Request #683 · python-control/python-control
X Title: LQR using SciPy by murrayrm · Pull Request #683 · python-control/python-control
Description: This PR updates the mateqn module to allow the use of SciPy linear algebra functions as a replacement for Slycot functions. Among other things, this allows the use of the lqr command without having to install Slycot. I implemented this by changing all of the mateqn functions (lyap, care, dare, etc) to accept at method keyword that can either be scipy or slycot. The default value for method is slycot if it is installed, otherwise scipy, so there is no change in behavior if you have Slycot. Other changes: Updated lqr to call care rather than replicating the code and cleaned up a lot of the code in mateqn to be more Pythonic. Modified the slycot_check function so that it stores the result of checking whether slycot can be imported rather than trying to import every time the function is called. Implemented a function for checking size and properties of matrices passed to mateqn functions (mateqn._check_shape) that provides more consistent errors (this also required updating some of the unit tests). Modified dare to solve the generalized Sylvester equation using slycot.sg02ad rather than using slycot.sg02md to solve the simplified form of the discrete algebraic Riccati equation because there seems to be an error in the way that stabilizing is handled in sg02md (it returns the closed loop eigenvalues in the wrong order). (I'm working on generating a concrete counterexample for posting to Slycot.)
Open Graph Description: This PR updates the mateqn module to allow the use of SciPy linear algebra functions as a replacement for Slycot functions. Among other things, this allows the use of the lqr command without havin...
X Description: This PR updates the mateqn module to allow the use of SciPy linear algebra functions as a replacement for Slycot functions. Among other things, this allows the use of the lqr command without havin...
Opengraph URL: https://github.com/python-control/python-control/pull/683
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:87be9f13-91fe-6a36-6e5e-e0675b653416 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | AAEA:373F25:365F7E0:4A5759A:6979D653 |
| html-safe-nonce | 80a0b5f9b34a6e3614757829058cd9592eb5d9d2eb5d23c75e63b2210499cded |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQUVBOjM3M0YyNTozNjVGN0UwOjRBNTc1OUE6Njk3OUQ2NTMiLCJ2aXNpdG9yX2lkIjoiMjc2MzA0MjU4MDI5MDE5NzA3NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 33bee36199d56e1305dfdeead36992955f1f4f8ac214299ae187f4b1f26b9f63 |
| hovercard-subject-tag | pull_request:809760729 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/683/checks |
| 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 mateqn module to allow the use of SciPy linear algebra functions as a replacement for Slycot functions. Among other things, this allows the use of the lqr command without havin... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | c049b65ec7e54cbf2521f5a560b6527714c612b0bd169188e2ea6e16f83bd5f4 |
| turbo-cache-control | no-preview |
| 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 full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | aa81cb94735f56e8afe352515e35f16bd5c0018b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width