Title: Unexpected behavior for a system defined using zpk · Issue #1067 · python-control/python-control · GitHub
Open Graph Title: Unexpected behavior for a system defined using zpk · Issue #1067 · python-control/python-control
X Title: Unexpected behavior for a system defined using zpk · Issue #1067 · python-control/python-control
Description: I been scratching my head about whats going on with a very simple system. Defining the system using tf yields results as expected. But defining the system through zpk does not. Description I intend to define the next system: G(s) = K ---...
Open Graph Description: I been scratching my head about whats going on with a very simple system. Defining the system using tf yields results as expected. But defining the system through zpk does not. Description I intend...
X Description: I been scratching my head about whats going on with a very simple system. Defining the system using tf yields results as expected. But defining the system through zpk does not. Description I intend...
Opengraph URL: https://github.com/python-control/python-control/issues/1067
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unexpected behavior for a system defined using zpk","articleBody":"I been scratching my head about whats going on with a very simple system.\r\nDefining the system using tf yields results as expected. But defining the system through zpk does not.\r\n\r\n## Description\r\nI intend to define the next system:\r\n```\r\nG(s) = K\r\n ---------------\r\n (s+2)*(s+2/3)\r\n```\r\nWith K adjusted for a ts=1 second. Very straight forward.\r\n\r\n## Reproduction\r\nThis is my code for zpk:\r\n\r\n```\r\nimport control as ct\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nK = 10.314\r\nG = ct.zpk([], [-2, -2/3], K)\r\nT = ct.feedback(G)\r\nct.step_response(T).plot()\r\n```\r\n\r\n\r\n`ct.step_info(T)`\r\n```\r\n{'RiseTime': np.float64(0.0),\r\n 'SettlingTime': nan,\r\n 'SettlingMin': np.float64(-4.959514534383556e+52),\r\n 'SettlingMax': np.float64(8.010508330340013e+51),\r\n 'Overshoot': np.float64(9.04605979182796e+53),\r\n 'Undershoot': np.float64(5.600651440127666e+54),\r\n 'Peak': np.float64(4.959514534383556e+52),\r\n 'PeakTime': np.float64(5.180816459236604),\r\n 'SteadyStateValue': np.float64(0.8855245835956728)}\r\n```\r\n\r\nThe result is not as expected. While defining the system through tf:\r\n\r\n```\r\nI = ct.tf([K], [1, 8/3, 4/3])\r\nV = ct.feedback(I)\r\nct.step_response(V).plot()\r\n```\r\n\r\n\r\n`ct.step_info(V)`\r\n```\r\n{'RiseTime': np.float64(0.4186518350898263),\r\n 'SettlingTime': np.float64(2.5119110105389577),\r\n 'SettlingMin': np.float64(0.8127467853231765),\r\n 'SettlingMax': np.float64(1.118911703975943),\r\n 'Overshoot': np.float64(26.35435717033743),\r\n 'Undershoot': 0,\r\n 'Peak': np.float64(1.118911703975943),\r\n 'PeakTime': np.float64(0.9942981083383374),\r\n 'SteadyStateValue': np.float64(0.8855347207912633)}\r\n\r\n```\r\nOutputting both system definitions reveals they're the same. The transfer function is exactly the same. But I don't know what may be going on with the transfer object defined with zpk.\r\n\r\n## System info\r\nI've installed the control package in a clean conda enviroment and using a jupyter notebook through VSCode.\r\n\r\nConda:\r\n```\r\nconda version : 23.1.0\r\nconda-build version : 3.22.0\r\npython version : 3.9.13.final.0\r\nvirtual packages : __archspec=1=x86_64__win=0=0\r\nplatform : win-64\r\n```\r\n\r\n\r\n","author":{"url":"https://github.com/gereze","@type":"Person","name":"gereze"},"datePublished":"2024-11-27T12:15:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/1067/python-control/issues/1067"}
| 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:61fd2713-506b-f3fb-ddf8-6a50852bf212 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9E52:2BD61D:1735D31:1FA9F7B:697A9495 |
| html-safe-nonce | 5d5d964fcdf38247168ee5edff95fc9bd5600c9be4d35649d8ad5a90887c08b5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTUyOjJCRDYxRDoxNzM1RDMxOjFGQTlGN0I6Njk3QTk0OTUiLCJ2aXNpdG9yX2lkIjoiMzcyNzAwMzkxMDYyODA4NjkzMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8ed0a67b6f369f731896c28b1895bb5c0ddea394fa47749fc5bef2ad35a6b518 |
| hovercard-subject-tag | issue:2698354986 |
| 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/1067/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6b56d53b858e87cd5e96881db677005d22a4d43e1c7b8317170b2c11ae3b21f3/python-control/python-control/issues/1067 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6b56d53b858e87cd5e96881db677005d22a4d43e1c7b8317170b2c11ae3b21f3/python-control/python-control/issues/1067 |
| og:image:alt | I been scratching my head about whats going on with a very simple system. Defining the system using tf yields results as expected. But defining the system through zpk does not. Description I intend... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gereze |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0912f2a9aa0160e08239520d461a4b4c4ce1caa972a8370b7442b94a38a194c5 |
| 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 | f8f5270c10a913bfa56f2dad4b864f1cda383754 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width