Title: fix rlocus timeout due to inefficient _default_wn calculation by murrayrm · Pull Request #527 · python-control/python-control · GitHub
Open Graph Title: fix rlocus timeout due to inefficient _default_wn calculation by murrayrm · Pull Request #527 · python-control/python-control
X Title: fix rlocus timeout due to inefficient _default_wn calculation by murrayrm · Pull Request #527 · python-control/python-control
Description: This PR fixes an obscure bug that got pointed out to me a year ago in e-mail from a colleague in Costa Rica: I have a piece of code that I run for my students. I downloaded the latest control module and it does not print the root locus any more. I think it gets stuck in an iterative process. Nothing changed in the code. I suppose something in the updated version is causing the problem. Has anybody else made a complaint about the root locus? Turns out that the problem was that he had a very unusual pole/zero pattern in which the algorithm for computing the default natural frequencies to use in plotting the grid was introduced in PR #138. The code essentially used the x-axis major ticks as the starting point for the natural frequencies and then added additional ticks to "complete" the frequencies on the y axis. The problem was that if the x-axis had tick marks that were orders of magnitude different that the y-axis, this could generate a lot of additional natural frequencies (which were subsequently removed a later point in the code). I didn't want to spend a lot of time on this fix, so I basically put in a check to see when you might end up generating an excessive number of ticks based on this heuristic and switched things so that if that happens, you use the y-axis ticks as the starting point. There's a unit test to make sure it is working right (that also covers the new code).
Open Graph Description: This PR fixes an obscure bug that got pointed out to me a year ago in e-mail from a colleague in Costa Rica: I have a piece of code that I run for my students. I downloaded the latest control modu...
X Description: This PR fixes an obscure bug that got pointed out to me a year ago in e-mail from a colleague in Costa Rica: I have a piece of code that I run for my students. I downloaded the latest control modu...
Opengraph URL: https://github.com/python-control/python-control/pull/527
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:be2eefcf-7cde-a30d-510c-87776e82dbef |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | CEB4:1347C3:7C42D:A7DD8:697C5065 |
| html-safe-nonce | eec6a9cbc06a007df97a13494b6c185734ce83850133406df629b452105769e8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRUI0OjEzNDdDMzo3QzQyRDpBN0REODo2OTdDNTA2NSIsInZpc2l0b3JfaWQiOiI4NjQ1NDM4MTUxMTkzMjg0NzA5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 44004bc23325c61e05e93164ee2404a371697df6eb489f1308a94022bb71bcd9 |
| hovercard-subject-tag | pull_request:564516586 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/python-control/python-control/pull/527/checks |
| twitter:image | https://avatars.githubusercontent.com/u/293362?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/293362?s=400&v=4 |
| og:image:alt | This PR fixes an obscure bug that got pointed out to me a year ago in e-mail from a colleague in Costa Rica: I have a piece of code that I run for my students. I downloaded the latest control modu... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | da4f0ee56809799586f8ee546b27f94fe9b5893edfbf87732e82be45be013b52 |
| 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 full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 787d8d274e314f52ce6d846c7581f9476d8dc736 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width