Title: stability_margins doesn't find gain=1 crossover frequency correctly for DT systems · Issue #523 · python-control/python-control · GitHub
Open Graph Title: stability_margins doesn't find gain=1 crossover frequency correctly for DT systems · Issue #523 · python-control/python-control
X Title: stability_margins doesn't find gain=1 crossover frequency correctly for DT systems · Issue #523 · python-control/python-control
Description: stability_margins doesn't find gain=1 crossover frequency correctly for DT systems, but it seems to mostly do so for CT systems. I think the probelm may be in how margins.poly_z_mag1_crossing is finding roots, but there were a few steps ...
Open Graph Description: stability_margins doesn't find gain=1 crossover frequency correctly for DT systems, but it seems to mostly do so for CT systems. I think the probelm may be in how margins.poly_z_mag1_crossing is fi...
X Description: stability_margins doesn't find gain=1 crossover frequency correctly for DT systems, but it seems to mostly do so for CT systems. I think the probelm may be in how margins.poly_z_mag1_crossing i...
Opengraph URL: https://github.com/python-control/python-control/issues/523
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"stability_margins doesn't find gain=1 crossover frequency correctly for DT systems","articleBody":"stability_margins doesn't find gain=1 crossover frequency correctly for DT systems, but it seems to mostly do so for CT systems. I think the probelm may be in how `margins.poly_z_mag1_crossing` is finding roots, but there were a few steps in that function I couldn't follow, e.g. why H(z)*H(1/z)=1 implies |H(z)| = 1. \r\n\r\nExample: \r\n```python\r\nimport control as ct\r\nomegan = 2*np.pi\r\nzeta = 0.2\r\nplant = 1.1*ct.tf(omegan**2, [1, 2*zeta*omegan, omegan**2])\r\nTs = .05\r\nplantdisc = ct.c2d(plant,Ts,'zoh')\r\n#_ = ct.bode_plot(plant, margins=True) # gives correct gain=1 crossover freq\r\n_ = ct.bode_plot(plantdisc, margins=True) # no gain=1/no phase margin given\r\n```\r\n\u003cimg width=\"407\" alt=\"image\" src=\"https://user-images.githubusercontent.com/58706249/106208565-6f86b100-6178-11eb-874a-809bd05a899b.png\"\u003e\r\n\r\nAs an example of what it should look like, here is Matlab:\r\n```matlab\r\nomegan = 2*pi;\r\nzeta = 0.2;\r\nplant = 1.1*tf(omegan^2, [1, 2*zeta*omegan, omegan^2])\r\nTs = .05;\r\nplantdisc = c2d(plant,Ts,'zoh')\r\nmargin(plantdisc)\r\n```\r\n\u003cimg width=\"476\" alt=\"image\" src=\"https://user-images.githubusercontent.com/58706249/106208756-bb395a80-6178-11eb-8bb2-95ee6d928a3d.png\"\u003e","author":{"url":"https://github.com/sawyerbfuller","@type":"Person","name":"sawyerbfuller"},"datePublished":"2021-01-28T22:52:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":15},"url":"https://github.com/523/python-control/issues/523"}
| 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:7ab273c3-a6a7-2621-b1d6-c239f2727277 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9E34:11C7EC:5DE17A:84BCBB:6979ED7F |
| html-safe-nonce | 71bf762b44180dccf6a10976ceb3cdb0060cd1dc8e04a18f6957fe93d5c1fbc5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTM0OjExQzdFQzo1REUxN0E6ODRCQ0JCOjY5NzlFRDdGIiwidmlzaXRvcl9pZCI6IjMwODQ3NTMzMjYwMjU4NjI1MjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | aa79ffa51a6628e85af719ed1ee340e065698cdaa2fa7af87290743783b63f61 |
| hovercard-subject-tag | issue:796438543 |
| 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/523/issue_layout |
| twitter:image | https://opengraph.githubassets.com/14552c70a6d12140505c04ec5de01ad93b70d5ffbaca691bfcee5e69ef0fd1ae/python-control/python-control/issues/523 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/14552c70a6d12140505c04ec5de01ad93b70d5ffbaca691bfcee5e69ef0fd1ae/python-control/python-control/issues/523 |
| og:image:alt | stability_margins doesn't find gain=1 crossover frequency correctly for DT systems, but it seems to mostly do so for CT systems. I think the probelm may be in how margins.poly_z_mag1_crossing is fi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sawyerbfuller |
| hostname | github.com |
| expected-hostname | github.com |
| None | d518616844426fb176f4177c4776349f6e70ef1ce75f459c8c53bf9293bb6982 |
| 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 | 22c6ce7724007ae85d7487fce3308a1c7cea8be6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width