Title: unexpected behaviour of `feedback` combined with `step_response` · Issue #1102 · python-control/python-control · GitHub
Open Graph Title: unexpected behaviour of `feedback` combined with `step_response` · Issue #1102 · python-control/python-control
X Title: unexpected behaviour of `feedback` combined with `step_response` · Issue #1102 · python-control/python-control
Description: Hi, Here is unexpected behaviour when I create an LTI system with ct.zpk, put it in unity feedback using ct.feedback, and compute the ct.step_response of the resulting feedback system. For the tested system, the result should be stable, ...
Open Graph Description: Hi, Here is unexpected behaviour when I create an LTI system with ct.zpk, put it in unity feedback using ct.feedback, and compute the ct.step_response of the resulting feedback system. For the test...
X Description: Hi, Here is unexpected behaviour when I create an LTI system with ct.zpk, put it in unity feedback using ct.feedback, and compute the ct.step_response of the resulting feedback system. For the test...
Opengraph URL: https://github.com/python-control/python-control/issues/1102
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"unexpected behaviour of `feedback` combined with `step_response`","articleBody":"Hi,\n\n\nHere is unexpected behaviour when I create an LTI system with `ct.zpk`, put it in unity feedback using `ct.feedback`, and compute the `ct.step_response` of the resulting feedback system. For the tested system, the result should be stable, but it is not.\n\nHere's the code:\n\n```\nimport control as ct\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n# the system\nG = ct.zpk([],[0,-5,-10],1)\nprint(G)\n\nK = 500\nct.root_locus_plot(G,initial_gain = 500)\n```\n\nThis generates the root locus, indicating the result for the gain 500, which shows that the system is **stable** in closed loop, for this gain value.\n\n\n\nHere's the code where unexpected behaviour occurs:\n\n```\n# put the system in unity feedback, with gain of 500\nGc = ct.feedback(G,K)\nprint(Gc)\n\n# plot the step response\nstepresp = ct.step_response(Gc)\nstepresp.plot()\n\n# check the pole locations\npzmap = ct.pole_zero_map(Gc)\nprint(pzmap.poles)\n```\n\nThe response is clearly **unstable**, while the poles have negative real parts (i.e. stable)!\n\n\n\nOn the other hand, creating the feedback system directly with `ct.tf` (as was computed higher up, so theoretically the same feedback system), results in a stable step response.\n\n```\n# create the feed\nGcexpl = ct.tf([],[1,15,50,500])\nprint(Gcexpl)\n\nsteprespexpl = ct.step_response(Gcexpl)\nsteprespexpl.plot()\n```\n\nThis step response is stable, as expected.\n\n\n\nThis indicates that the system generated by `ct.feedback` is not valid.\n\nAny clue? \nThanks in advance!","author":{"url":"https://github.com/johnlataire","@type":"Person","name":"johnlataire"},"datePublished":"2025-01-19T13:34:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1102/python-control/issues/1102"}
| 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:1eb1570c-638b-bb5d-0907-be69fd60705e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8B44:A6EDE:24168FE:309C3DD:697ABFDE |
| html-safe-nonce | 8d0b6ea30398f23c4a21da617895f66a5af2bcf0a958114c5920c07410c73739 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjQ0OkE2RURFOjI0MTY4RkU6MzA5QzNERDo2OTdBQkZERSIsInZpc2l0b3JfaWQiOiI1NTgzOTMwOTc2NjQ5MjY1MTE4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ecc9f4be5d040e22d2aabe8dc2e33a8c39152ecdfafafc63396ebef87057b563 |
| hovercard-subject-tag | issue:2797630105 |
| 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/1102/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cf62566a0b6a775af2e20b7d4b0e8cb658e7f3757e4e9ea87f43f966011819cf/python-control/python-control/issues/1102 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cf62566a0b6a775af2e20b7d4b0e8cb658e7f3757e4e9ea87f43f966011819cf/python-control/python-control/issues/1102 |
| og:image:alt | Hi, Here is unexpected behaviour when I create an LTI system with ct.zpk, put it in unity feedback using ct.feedback, and compute the ct.step_response of the resulting feedback system. For the test... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | johnlataire |
| 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