Title: Improved speed of ctrb and obsv functions by Jpickard1 · Pull Request #941 · python-control/python-control · GitHub
Open Graph Title: Improved speed of ctrb and obsv functions by Jpickard1 · Pull Request #941 · python-control/python-control
X Title: Improved speed of ctrb and obsv functions by Jpickard1 · Pull Request #941 · python-control/python-control
Description: Current implementation of ctrb and obsv functions utilize np.linalg.matrix_power inside of a for i in range(1,n) loop. I modified these functions to reduce the number of matrix multiplications by amat essentially by utilizing the precomputed matrix exponentiation from the i-1the iteration of the loop when computing the ith iteration. This is similar to the MATLAB implementation of the similar functions. Additionally, I added an optional parameter t to both functions that defaults to None for the case where the reduced observability and controllability matrices are needed. By default, the full observability and controllability matrices are created. This appears to pass all test cases.
Open Graph Description: Current implementation of ctrb and obsv functions utilize np.linalg.matrix_power inside of a for i in range(1,n) loop. I modified these functions to reduce the number of matrix multiplications by a...
X Description: Current implementation of ctrb and obsv functions utilize np.linalg.matrix_power inside of a for i in range(1,n) loop. I modified these functions to reduce the number of matrix multiplications by a...
Opengraph URL: https://github.com/python-control/python-control/pull/941
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:e63eb36f-f937-ad73-4180-3fa7818b7e0c |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | A45C:36C84C:12000C7:123B5BB:697A8B99 |
| html-safe-nonce | 8c3cd0e2b7df494fec040d619f0f3c2527c5c2218ebb160b5f672b17312b2238 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDVDOjM2Qzg0QzoxMjAwMEM3OjEyM0I1QkI6Njk3QThCOTkiLCJ2aXNpdG9yX2lkIjoiNTA3NDY1NTcwMTk3MjQ1NDI5NyIsInJlZ2lvbl9lZGdlIjoic2VhIiwicmVnaW9uX3JlbmRlciI6InNlYSJ9 |
| visitor-hmac | b06f882fc838c8abba225d04dae26491f8ee9f228687e852e119a882f111e01d |
| hovercard-subject-tag | pull_request:1616460773 |
| 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/941/checks |
| twitter:image | https://avatars.githubusercontent.com/u/17242107?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/17242107?s=400&v=4 |
| og:image:alt | Current implementation of ctrb and obsv functions utilize np.linalg.matrix_power inside of a for i in range(1,n) loop. I modified these functions to reduce the number of matrix multiplications by a... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 8bc3ff3881e539acc2eac7cfa104664bc0f8d972a0dfc38dd3cbffce0d16af91 |
| 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 | d1026e9b6076007917cf27102f0d94ead41f7c24 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width