Title: Step Response and step_info accuracy issue · Issue #440 · python-control/python-control · GitHub
Open Graph Title: Step Response and step_info accuracy issue · Issue #440 · python-control/python-control
X Title: Step Response and step_info accuracy issue · Issue #440 · python-control/python-control
Description: Hi, I found an accuracy issue related to control.step_response and control.step_info. To be specific, the issue is in _default_response_times() function. I have two system transfer function sys1 and sys2.They both have exactly the same f...
Open Graph Description: Hi, I found an accuracy issue related to control.step_response and control.step_info. To be specific, the issue is in _default_response_times() function. I have two system transfer function sys1 an...
X Description: Hi, I found an accuracy issue related to control.step_response and control.step_info. To be specific, the issue is in _default_response_times() function. I have two system transfer function sys1 an...
Opengraph URL: https://github.com/python-control/python-control/issues/440
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Step Response and step_info accuracy issue","articleBody":"Hi, \r\nI found an accuracy issue related to control.step_response and control.step_info. To be specific, the issue is in _default_response_times() function. \r\nI have two system transfer function sys1 and sys2.They both have exactly the same frequency response. \r\nsys1:\r\n num1 = [1.067e+05, 5.791e+04], den1 = [10.67, 1.067e+05, 5.791e+04]\r\nOR \r\nk = 10000, zeros = [-0.5426], poles = [-1e+04, -0.5426 ]\r\n\r\nsys2:\r\nnum2 = [1.881e+06], den2 = [188.1, 1.881e+06]\r\nOR \r\nk = 10000, zeros = [], poles = [-1e+04, ]\r\n\r\nAs you notice, sys1 has extra pole and zero where both have the same value.\r\n\r\nThe issue\r\n----------\r\nWhen I plot the step responses for both systems, the plots are not matched. Also when I used step_info() to get the characteristics of the systems, I got a different results. \r\n\r\nThe code:\r\n-----------\r\nhere is the code \r\n```\r\nnum1 = [1.067e+05, 5.791e+04]\r\nden1 = [10.67, 1.067e+05, 5.791e+04]\r\nnum2 = [1.881e+06]\r\nden2 = [188.1, 1.881e+06]\r\nsys_1 = control.TransferFunction(num1, den1)\r\nsys_2 = control.TransferFunction(num2, den2)\r\nt1, y1 = control.step_response(sys_1)\r\nt2, y2 = control.step_response(sys_2)\r\nprint(control.step_info(sys_1))\r\nprint(control.step_info(sys_2))\r\nplt.plot(t1, y1, t2, y2)\r\nplt.grid()\r\nplt.show()\r\n```\r\n\r\nTest on Matlab;\r\n-----------------\r\nI tested the two systems in Matlab. The step() function gives the same step response plot for both systems, and stepinfo() results exactly the same values for both systems.\r\n\r\n","author":{"url":"https://github.com/rlegnain","@type":"Person","name":"rlegnain"},"datePublished":"2020-07-29T03:34:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/440/python-control/issues/440"}
| 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:6074bd1d-9a79-e607-cdab-42ba996ee07e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9CDC:4C179:245D995:30EC3E7:697ABF59 |
| html-safe-nonce | 90b8242575a1bb18e6e2ba03204beb2da2163808b6aef51abfdddf1caca9de2e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Q0RDOjRDMTc5OjI0NUQ5OTU6MzBFQzNFNzo2OTdBQkY1OSIsInZpc2l0b3JfaWQiOiI2NjIwODk0Njk1MDQ1OTA2MjY1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 58ab15b26aeca56639efc9fa2512ab34fd0889ded88e13f1273a0c2f62f72055 |
| hovercard-subject-tag | issue:667521414 |
| 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/440/issue_layout |
| twitter:image | https://opengraph.githubassets.com/492e6c1eb1e1ea81a3a7c0b2ffa847482ae0295c8882967b7e080ab5ae2e67d6/python-control/python-control/issues/440 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/492e6c1eb1e1ea81a3a7c0b2ffa847482ae0295c8882967b7e080ab5ae2e67d6/python-control/python-control/issues/440 |
| og:image:alt | Hi, I found an accuracy issue related to control.step_response and control.step_info. To be specific, the issue is in _default_response_times() function. I have two system transfer function sys1 an... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rlegnain |
| hostname | github.com |
| expected-hostname | github.com |
| None | 37b00135a01848812420158e49744eb9715c1ef534ee4552f790d6ef33807fc2 |
| 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 | 78685bd12c01954e3a0e08fc52173e9b3e48215d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width