Skip to content

rlocus with kvect argument doesn't compute good limits #787

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
roryyorke opened this issue Nov 12, 2022 · 0 comments · Fixed by #809
Closed

rlocus with kvect argument doesn't compute good limits #787

roryyorke opened this issue Nov 12, 2022 · 0 comments · Fixed by #809

Comments

@roryyorke
Copy link
Contributor

Example:

import control as ct
g = ct.tf([1,2], [1,2,10])
kvect = ct.rlocus(g)[1]
plt.figure()
ct.rlocus(g, kvect=kvect);

result:

image

image

I'd expect these two to look the same.

This is because axis limits are only calculated when argument kvect is None:

    if kvect is None:
        start_mat = _RLFindRoots(nump, denp, [1])
        kvect, mymat, xlim, ylim = _default_gains(nump, denp, xlim, ylim)
    else:
        start_mat = _RLFindRoots(nump, denp, [kvect[0]])
        mymat = _RLFindRoots(nump, denp, kvect)
        mymat = _RLSortRoots(mymat)
@murrayrm murrayrm linked a pull request Dec 14, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant