You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the control package with python 3.10 in Pycharm and Jupiter lab.
I have stumbled upon a possible issue while trying to create a Nyquist plot for a simple system
import control as ct
s = ct.tf('s'))
plant_1 = 1/(s*(s + 5)*(s + 7)))
ct.nyquist_plot(plant_1)
The result I'm getting is this:
While in MATLAB I'm getting different results
clear all;
close all;
clc;
s = tf('s');
plant_1 = 1/(s*(s + 5)*(s + 7));
nyquistplot(plant_1)
Is there a limitation that might be causing this issue or am I missing something?
Activity
bnavigator commentedon Dec 31, 2022
Look at the y-axis scale. The nyquist plot from control cuts off at
max_curve_magnitudeand scales the "infinity" loop for display within the plot boundaries.https://python-control.readthedocs.io/en/0.9.2/generated/control.nyquist_plot.html#control.nyquist_plot
henklaak commentedon Feb 2, 2023
Behaviour that will 'surprise' many, I guess. The documentation is not explicit about it and the default value of 20.
How about not drawing the large magnitudes at all? Just clip the traces at the limit with a ≫to indicate direction?
murrayrm commentedon Feb 2, 2023
If you clip the traces, then it is harder to see the number of net encirclements. Especially if there is more than one. For example
which generates:

murrayrm commentedon Feb 2, 2023
We should definitely make sure all of this is well-documented, though.
henklaak commentedon Feb 3, 2023
I'll take a stab at this (the documenting part), expect PR.