Example Problems and Solutions 545If 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 unitMATLAB 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 plotPhase margin
is 60 degreesUnit circle27024021018015012090
60300300330210.5Check of Phase Margin
2.51.5Figure 7–140
Nyquist plot of
G(jv)showing that
the phase margin is 60°.