Solution 10.8.8.12
The MATLAB program
w=logspace(-2,3,200);;
s=j*w;;
K=100
z1 = 5
p1 = 1+j*1
p2 = 1-j*1
p3 = 20
p4 = 40
hold off
mag = 20*log10( abs((K.*(s+z1))
./((s+p1).*(s+p2).*(s+p3).*(s+p4))));;
phase = (angle(s+z1)-angle(s+p1)-angle(s+p2)
-angle(s+p3)-angle(s+p4))*180/pi;;
plot(phase,mag);;
grid on
axis([-260,-60,-80 40])
print -deps 108812logmag.eps
g=zpk([-z1],[-p1 -p2 -p3 -p4],100)
K=linspace(0,1600,500);;
[P,K] = rlocus(g,K);;
plot(real(P),imag(P),'k.')
grid on
print -deps 108812rl.eps
pause
subplot(2,1,1),semilogx(w,mag)
grid on
axis([0.1 1000 -80 20])
subplot(2,1,2), semilogx(w,phase)
grid on
axis([0.1 1000 -280 0])
print -deps 108812bodema.eps
draws the log magnitude plot shown in Figure 1 With K =100thegain
margin is about 44 dB. Converting to a real number wehave
10
52=20
=398:107:
Thus, the system is stable for
0 <K<39;;810:7:
The same information is available from the Bode magnitude and phase plots
as shown in Figure 2 By tracing the arrows from the phase scale at ;180
1
-260 -240 -220 -200 -180 -160 -140 -120 -100 -80 -60
-80
-60
-40
-20
0
20
40
The point (-1,0)
Figure 1: Log magnitude chart for K = 100
2
10
-1
10
0
10
1
10
2
10
3
-80
-60
-40
-20
0
20
10
-1
10
0
10
1
10
2
10
3
-250
-200
-150
-100
-50
0
Figure 2: Bode phase and magnitude plots for K =100
3
-80 -70 -60 -50 -40 -30 -20 -10 0 10
-50
-40
-30
-20
-10
0
10
20
30
40
50
Figure 3: Root locus
to where it intercepts the phase plot and then going up to the magnitude
plot and thence to the magnitude scale we nd, again, that the gain margin
is about 52 dB. Wealsoseethat the ! =25when the phase is 180
.This
means that the root locus will cross the imaginary axis for ! = 25,
The root locus is shown in Figure 3. As can be seen, twolimbs of the
root locus cross into the righthalf place at ! 25.
4