How to draw a Nyquist plot while avoiding the pole at the origin
58 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello
I am trying to draw the Nyquist plot of this transfer function.
nyquist(tf([2 2],[1 40 600 4000 10000 0]));
As you can see, this system has a pole at the origin.
The Nyquist plot for this system should look like this:
But it doesn't print like this.
It diverges because it has a pole at the origin.
I would like to draw the dotted part of the diagram by avoiding the pole at the origin and drawing the Nyquist diagram.
Is there any good way to do this?
0 commentaires
Réponses (2)
Aquatris
le 9 Juil 2024
Modifié(e) : Aquatris
le 9 Juil 2024
I dont think the nyquist plots looks exactly like you draw by hand.
You can set the axis limits to make the nyquist plot visible but I do not know of a way to make the lines that connects the +- infinity values to each other, since they are infinity and encapsulates the whole right handside. You can try WolframAlpha type of site that plots what you want.
sys = tf([2 2],[1 40 600 4000 10000 0]);
nyquist(sys);
axis([-1e-4 5e-4 -4e-4 4e-4])
0 commentaires
Sam Chak
le 9 Juil 2024
Modifié(e) : Sam Chak
le 9 Juil 2024
Consider the Nyquist plot for for transfer function with a pole at the origin (also known as "Type-1 system"). When the angular frequency ω is zero, the magnitude of the transfer function approaches infinity, and the phase angle becomes degrees. At low frequencies, the polar plot of the system's response is asymptotic to a line parallel to the negative imaginary axis. See the blue curve in "Approach #2".
Conversely, as the angular frequency ω approaches infinity, the magnitude of the transfer function approaches zero, and the curve converges towards the origin, becoming tangent to one of the coordinate axes.
If only the nyquist() command is used, the Nyquist plot will appear erroneous as if getting a "Division-by-zero" singularity. This can be corrected by specifying the axis() command appropriately.
Approach #1: Using built-in nyquist() or nyquistplot() functions (requires Control System Toolbox)
num = [2 2];
den = [1 40 600 4000 10000 0];
G = tf(num, den)
figure(1)
nyquist(G)
%% Corrected with axis() command
figure(2)
nyquist(G)
axis([-0.0002 0.0002 -0.0006 0.0006])
Approach #2: Manually create the polar plot using the all-purpose 'plot()' function
w = logspace(-10, 10, 2001);
[mag, ph] = bode(num, den, w);
figure(3)
plot(mag.*cos(ph*pi/180),mag.*sin(ph*pi/180), mag.*cos(-ph*pi/180), mag.*sin(-ph*pi/180), 'r--'),
grid,
xlabel('Real Axis'),
ylabel('Imag Axis'),
title('Nyquist Diagram of G(s)'),
axis('square'),
axis([-0.0002 0.0002 -0.0006 0.0006])
0 commentaires
Voir également
Catégories
En savoir plus sur Plot Customization dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!