Title: Fix inconsistencies in frequency response at poles by murrayrm · Pull Request #542 · python-control/python-control · GitHub
Open Graph Title: Fix inconsistencies in frequency response at poles by murrayrm · Pull Request #542 · python-control/python-control
X Title: Fix inconsistencies in frequency response at poles by murrayrm · Pull Request #542 · python-control/python-control
Description: This PR addresses issue #532 regarding inconsistencies in the return values for various frequency response functions. The changes fixes a number of previous inconsistencies, where state space and transfer function representations could return different values and evaluating the frequency response at the "origin" gave different values depending on whether you evaluated at 0 or 0j. The changes here only affect results when evaluating the system at a pole of the system. In this PR: State space systems and transfer functions return the same values when evaluated at poles (including poles at the origin): Evaluation at 0 with pole at the origin: returns (inf + nanj) Evaluation at non-origin pole with nonzero numerator: returns (inf + infj) Evaluation at pole with cancellation by a zero: returns (nan + nanj) State space systems and transfer functions interpret argument as a complex number, so that G(0) and G(0j) return the same value. Computing the DC gain is (exactly) the same as evaluating at 0 A few other small changes: Added a warn_infinity flag to all functions used to evaluate frequency response. By default this is set to True, in which case you get a divide by zero warning or singular matrix warning when evaluating at a pole. Setting it to False suppresses this warning. (Also, dcgain sets warn_infinity to False by default). Updated docstrings and unit tests
Open Graph Description: This PR addresses issue #532 regarding inconsistencies in the return values for various frequency response functions. The changes fixes a number of previous inconsistencies, where state space and ...
X Description: This PR addresses issue #532 regarding inconsistencies in the return values for various frequency response functions. The changes fixes a number of previous inconsistencies, where state space and ...
Opengraph URL: https://github.com/python-control/python-control/pull/542
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:c05f4b17-4d47-0c0c-2ff5-dccec996d287 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | E322:2295ED:7746ED:A9A156:697A1E91 |
| html-safe-nonce | 0393846bf7be247a91e4d6d099ed193c461b26c21e3175b19d5d28426483273b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzIyOjIyOTVFRDo3NzQ2RUQ6QTlBMTU2OjY5N0ExRTkxIiwidmlzaXRvcl9pZCI6IjU0NjMwMTM5NDkzNjI3NDU3NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f3c2df9fcac9b1a4556576131919829e82907e2d006b84b5bd4387dfe5410578 |
| hovercard-subject-tag | pull_request:571588765 |
| 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/542/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 addresses issue #532 regarding inconsistencies in the return values for various frequency response functions. The changes fixes a number of previous inconsistencies, where state space and ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | e45f4a1aa1d2f5e476694a8ca3079eb927f0ea276035a2d5e78665f09121ff98 |
| 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 | 8a5f67754bd81296f454ff3fa910631e09e4052c |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width