Modern Control Engineering

(Chris Devlin) #1
Example Problems and Solutions 545

If we use the command
polar(theta,r)
MATLAB will produce a plot in the polar coordinates. Subsequent use of the gridcommand
draws polar grid lines and grid circles.
MATLAB Program 7–23 produces the Nyquist plot of G(jv), where vis between 0.5 and
1.15 radsec. The resulting plot is shown in Figure 7–140. Notice that point G(j1.15)lies on the unit

MATLAB Program 7–23


%Nyquist plot in rectangular coordinates


num = [1.88 0.188];


den = [1 1.5 0.5 0];


w = 0.5:0.01:1.15;


[re,im,w] = nyquist(num,den,w);


%*****Convert rectangular coordinates into polar coordinates


% by defining z, r, theta as follows*****


z = re + i*im;


r = abs(z);


theta = angle(z);


%To draw polar plot, enter command 'polar(theta,r)'


polar(theta,r)


text(-1,3,'Check of Phase Margin')


text(0.3,-1.7,'Nyquist plot')


text(-2.2,-0.75,'Phase margin')


text(-2.2,-1.1,'is 60 degrees')


text(1.45,-0.7,'Unit circle')


Nyquist plot

Phase margin
is 60 degrees

Unit circle

270

240

210

180

150

120

90
60

30

0

300

330

2

1

0.5

Check of Phase Margin
2.5

1.5

Figure 7–140
Nyquist plot of
G(jv)showing that
the phase margin is 60°.

Free download pdf