How to draw a Nyquist plot while avoiding the pole at the origin

62 次查看(过去 30 天)
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?

回答(2 个)

Aquatris
Aquatris 2024-7-9
编辑:Aquatris 2024-7-9
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])

Sam Chak
Sam Chak 2024-7-9
编辑:Sam Chak 2024-7-9
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)
G = 2 s + 2 ------------------------------------------- s^5 + 40 s^4 + 600 s^3 + 4000 s^2 + 10000 s Continuous-time transfer function.
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])

类别

Help CenterFile Exchange 中查找有关 Plot Customization 的更多信息

产品


版本

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by