How to draw a Nyquist plot while avoiding the pole at the origin
11 次查看(过去 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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1730686/image.jpeg)
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 个评论
回答(2 个)
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])
0 个评论
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".
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1730771/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1730776/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1730781/image.png)
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 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!