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:b1d712a1-c5fa-22b2-d323-ada75ef4810f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CDB4:3564B3:476FCD5:60677E6:697B21AB |
| html-safe-nonce | 92b25bb3e4635663410bd1405d674d0666116d56ea28834c2677259106ffb5e1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDREI0OjM1NjRCMzo0NzZGQ0Q1OjYwNjc3RTY6Njk3QjIxQUIiLCJ2aXNpdG9yX2lkIjoiNDM5NTc1MjMzMDMyMjcxNTA1MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1d4caaab02c783816638d6971a3e49e297e871a51dbb85c9825da6c20d562869 |
| 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 | 7ce8ed0a54c4730aeca4e6abacfc6490365fc42e25480b86883054df3f9181c8 |
| 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 | 82440e908b5650143b0930c6bf91e184f2bad20c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width