Add extra information to nyquist plots by wueestry · Pull Request #997 · python-control/python-control
Adds the possibility to add the unit circle (to get gain crossover frequency), Ms-circle (sensitivity) and Mt-circle (complementary sensitivity) to nyquist plots similar to the approach taken in JuliaControl
It would be nice to have unit tests, even if they call the code to get coverage (better would be to check to make sure the lines are in the right place).
If the system is discrete time, are these still the right circles to draw?
Any interaction with axis scaling? Eg, if all of the action is very near the origin, might this reset the axes in a way that makes it harder to see the Nyquist plot? If so, is there a better way to do that (eg, fix the axes and let the circle disappear at the edges of the axes)?
It would be nice to have unit tests, even if they call the code to get coverage (better would be to check to make sure the lines are in the right place).
If the system is discrete time, are these still the right circles to draw?
Any interaction with axis scaling? Eg, if all of the action is very near the origin, might this reset the axes in a way that makes it harder to see the Nyquist plot? If so, is there a better way to do that (eg, fix the axes and let the circle disappear at the edges of the axes)?
This works as well for discrete systems. And tests have now been added.
Not sure yet if fixing the axis is the best idea, as it would result in issues when plotting a second system in the same plot afterwards
| If 'True', displays the unit circle, to read gain crossover frequency. | ||
|
|
||
| mt_circles : array_like, optional | ||
| draws circles corresponding to the given magnitudes of sensitivity |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency, start phrase with a capital letter and end in a period.
| draws circles corresponding to the given magnitudes of sensitivity | ||
|
|
||
| ms_circles : array_like, optional | ||
| draws circles corresponding to the given magnitudes in complementary sensitivity |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency, start phrase with a capital letter and end in a period.
murrayrm
marked this pull request as ready for review
I rebased this onto the current main branch and added the ability to set the line style for the circles using config.defaults.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
