Title: Inconsistent evaluation of tf/ss systems with pole at the origin · Issue #532 · python-control/python-control · GitHub
Open Graph Title: Inconsistent evaluation of tf/ss systems with pole at the origin · Issue #532 · python-control/python-control
X Title: Inconsistent evaluation of tf/ss systems with pole at the origin · Issue #532 · python-control/python-control
Description: Systems that have a pole at the origin return inconsistent values: import control as ct sys_tf = ct.tf([1], [1, 0]) sys_ss = ct.tf2ss(sys_tf) sys_tf(0) # returns (inf+0j) with divide by zero warning sys_tf(0j) # returns (inf+nanj) with d...
Open Graph Description: Systems that have a pole at the origin return inconsistent values: import control as ct sys_tf = ct.tf([1], [1, 0]) sys_ss = ct.tf2ss(sys_tf) sys_tf(0) # returns (inf+0j) with divide by zero warnin...
X Description: Systems that have a pole at the origin return inconsistent values: import control as ct sys_tf = ct.tf([1], [1, 0]) sys_ss = ct.tf2ss(sys_tf) sys_tf(0) # returns (inf+0j) with divide by zero warnin...
Opengraph URL: https://github.com/python-control/python-control/issues/532
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Inconsistent evaluation of tf/ss systems with pole at the origin","articleBody":"Systems that have a pole at the origin return inconsistent values:\r\n```\r\nimport control as ct\r\nsys_tf = ct.tf([1], [1, 0])\r\nsys_ss = ct.tf2ss(sys_tf)\r\n\r\nsys_tf(0) # returns (inf+0j) with divide by zero warning\r\nsys_tf(0j) # returns (inf+nanj) with divide by zero warning\r\nsys_ss(0) # LinAlgError: Singular matrix\r\nsys_tf.dcgain() # returns array(inf)\r\nsys_ss.dcgain() # returns array(nan)\r\n```\r\nI think all of these should return `inf` (or `array(inf)`).\r\n\r\nIf you have a pole and zero at the origin, you get `nan` or 1:\r\n```\r\nsys_tf = ct.tf([1, 0], [1, 0])\r\nsys_ss = ct.tf2ss(sys_tf)\r\n\r\nsys_tf(0) # returns (nan+0j) with invalid value warning\r\nsys_ss(0) # returns (1+0j) [state space system is empty]\r\nsys_tf.dcgain() # returns array(nan)\r\nsys_ss.dcgain() # returns (1+0j) [state space system is empty]\r\n```\r\nI think all of these cases should produce `nan`.\r\n\r\nI have a partial fix in a branch, but want to see what people think the \"right\" answer is before committing it.\r\n\r\n","author":{"url":"https://github.com/murrayrm","@type":"Person","name":"murrayrm"},"datePublished":"2021-02-06T07:11:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/532/python-control/issues/532"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:02c04edc-051b-a991-f5d8-d65bfef6542e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D212:32F124:67FF89:9361B4:697A1D28 |
| html-safe-nonce | 46b4f1e9228991b9dd616930965cc3c1fbb8f151ab9f3806540a41407c9ded3c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjEyOjMyRjEyNDo2N0ZGODk6OTM2MUI0OjY5N0ExRDI4IiwidmlzaXRvcl9pZCI6IjM2NTcyODQ2NTU2OTk4NjA3NzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | dd99465f382e123cf402d0d10cf0a459eb4021a9dc27231a2196a0a3f153f832 |
| hovercard-subject-tag | issue:802632079 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/python-control/python-control/532/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ae7b9c53b6f9938763ac5578664a4c02f7cb75fdc1dcd612ac783613c32652ea/python-control/python-control/issues/532 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ae7b9c53b6f9938763ac5578664a4c02f7cb75fdc1dcd612ac783613c32652ea/python-control/python-control/issues/532 |
| og:image:alt | Systems that have a pole at the origin return inconsistent values: import control as ct sys_tf = ct.tf([1], [1, 0]) sys_ss = ct.tf2ss(sys_tf) sys_tf(0) # returns (inf+0j) with divide by zero warnin... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | murrayrm |
| hostname | github.com |
| expected-hostname | github.com |
| None | 24021c77440f544078f9cbe80d78a2fb16ccff65fca92deda9da3c51d1cdc5fc |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2841ead760bbcdca99003cf970f91348178160c3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width