MATLAB draws the polar coordinate diagram of the control system

MATLAB draws the polar coordinate diagram of the control system

Polar coordinate drawing function nyquist diagram

Function usage

nyquist(sys)
nyquist(sys,w)
[re,im,w]= nyquist(sys) The
first method of use: Given the model object sys of the open loop system, automatically select the drawing frequency of w.
The second method of use: Given the model object sys of the open-loop system, manually select the drawing frequency of w. The
third method of use: return the parameter vector of the polar coordinate graph without drawing.
re is the real part vector of the complex function G(jw), im is the virtual Part vector
Draw the polar coordinate graph of the following function
G open (s) = 10 s 2 + 2 s + 5 G_{open} (s) = \frac{10}{s^{2}+2s+5}Gopen(s)=s2+2s+510

The MATLAB code is as follows:

num=[0 0 10]%分子,作多项式模型
den=[1 2 5]%分母
sys=tf(num,den)%构建系统对象
nyquist(sys)

Output:

num = 1 × 3
0 0 10

den = 1 × 3
1 2 5

sys =
10 s 2 + 2 s + 5 \frac{10}{s^{2}+2s+5 } s2+2s+510
Continuous-time transfer function.

image:

Insert picture description here

Improving methods for unsatisfactory rendering

1. Use axis() to change the coordinate display range,
such as axis([-1,1.5,-2,2])
2. The specified range of the given angular frequency
w=0:0.1:100;
nyquist(sys,w)

More content reference

Guess you like

Origin blog.csdn.net/bj_zhb/article/details/108928251