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/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:ad8d8916-d4c7-d387-e40e-9dbfb5cc0343 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E2CC:316698:E6C527:13436A7:697C069C |
| html-safe-nonce | 0ca80a6e8d04c196b93dc6949278618c2d084cfc7088674e21002fb892b8c1c7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMkNDOjMxNjY5ODpFNkM1Mjc6MTM0MzZBNzo2OTdDMDY5QyIsInZpc2l0b3JfaWQiOiI4OTkyMTM5NzkxMjA1OTI2NTU2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | de61425ea1558a809fe114bd2736fc6368f56ed6899890783044fc721d7e465d |
| hovercard-subject-tag | pull_request:564516586 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/files |
| 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 |
| diff-view | unified |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2d0972e08a3f8dfff1c4bf1f3d026a7d3a209c26 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width