Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix rlocus timeout due to inefficient _default_wn calculation#527

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

murrayrm
Copy link
Member

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 alot 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).

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 87.78% when pulling4ef4906 on murrayrm:fix_rlocus_timeout into343d5d6 on python-control:master.

@bnavigatorbnavigator merged commitff7d827 intopython-control:masterFeb 5, 2021
@murrayrmmurrayrm deleted the fix_rlocus_timeout branchFebruary 11, 2021 06:15
@murrayrmmurrayrm added this to the0.9.0 milestoneMar 20, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@sawyerbfullersawyerbfullersawyerbfuller approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
0.9.0
Development

Successfully merging this pull request may close these issues.

4 participants
@murrayrm@coveralls@sawyerbfuller@bnavigator

[8]ページ先頭

©2009-2025 Movatter.jp