Professional Documents
Culture Documents
EXAMPLE 7-10: / Control Systems Analysis and Design by The Frequency-Response Method
EXAMPLE 7-10: / Control Systems Analysis and Design by The Frequency-Response Method
nyquist(num,den)
draws the Nyquist plot of the transfer function
num(s)
G(s) =
den(s)
where num and den contain the polynomial coefficients in descending powers of s. Other
commonly used nyquist commands are
nyquist(num,den,w)
nyquist(A,B,C,D)
nyquist(A,B,C,D,w)
nyquist(A,B,C,D,iu,w)
nyquist(sys)
[re,im,w] = nyquist(num,den)
[re,im,w] = nyquist(num,den,w)
[re,im,w] = nyquist(A,B,C,D)
[re,im,w] = nyquist(A,B,C,D,w)
[re,im,w] = nyquist(A,B,C,D,iu,w)
[re,im,w] = nyquist(sys)
MATLAB returns the frequency response of the system in the matrices re, im, and w.
No plot is drawn on the screen. The matrices re and im contain the real and imaginary
parts of the frequency response of the system, evaluated at the frequency points speci-
fied in the vector w. Note that re and im have as many columns as outputs and one row
for each element in w.
1
G(s) =
s2 + 0.8s + 1
nyquist(num,den)
may be used to draw a Nyquist plot. MATLAB Program 7–5 produces the Nyquist plot shown
in Figure 7–36. In this plot, the ranges for the real axis and imaginary axis are automatically
determined.
436 Chapter 7 / Control Systems Analysis and Design by the Frequency-Response Method
MATLAB Program 7–5
num = [1];
den = [1 0.8 1];
nyquist(num,den)
grid
title('Nyquist Plot of G(s) = 1/(s^2 + 0.8s + 1)')
−0.5
−1
Figure 7–36
Nyquist plot of
−1.5
1 −1 −0.5 0 0.5 1 1.5
G(s) = 2 .
s + 0.8s + 1 Real Axis
If we wish to draw the Nyquist plot using manually determined ranges—for example, from –2
to 2 on the real axis and from –2 to 2 on the imaginary axis—enter the following command into
the computer:
v = [-2 2 -2 2];
axis(v);
or, combining these two lines into one,
axis([-2 2 -2 2]);
See MATLAB Program 7–6 and the resulting Nyquist plot shown in Figure 7–37.
1.5
Imaginary Axis
0.5
−0.5
−1
Nyquist Diagram
150
100
50
Imaginary Axis
−50
−100
Figure 7–38
−150
Undesirable Nyquist −1.4 −1.2 −1 −0.8 −0.6 −0.4 −0.2 0
plot. Real Axis
438 Chapter 7 / Control Systems Analysis and Design by the Frequency-Response Method
then it can be corrected if we specify the axis(v). For example, if we enter the axis
command
v = [-2 2 -5 5]; axis(v)
in the computer, then a desirable form of Nyquist plot can be obtained. See Example 7–11.
Notice that the Nyquist plot shown in Figure 7–39 includes the loci for both v>0 and v<0.
If we wish to draw the Nyquist plot for only the positive frequency region (v>0), then we need
to use the command
[re,im,w]=nyquist(num,den,w)
2
Imaginary Axis
−1
−2
−3
Figure 7–39 −4
Nyquist plot of
1 −5
G(s) = . −2 −1.5 −1 −0.5 0 0.5 1 1.5 2
s(s + 1) Real Axis