Solution 10.8.8.11 The MATLAB program w=logspace(-2,3,200);; s=j*w;; K=100 z1 = 1 p1 = 0 p2 = 0 p3 = 10 p4 = 10 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 1088115logmag.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 1088115rl.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 -60]) print -deps 1088115bodema.eps draws the log magnitude plot shown in Figure 1 With K =100thegain margin is about 35 dB. Converting to a real number wehave 10 30=20 =15:849: Thus, the system is stable for 0 <K<1;;584:9: 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 Figure 2: Bode phase and magnitude plots for K =100 3 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 -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 35 dB. From the Bode plot wegetthe additional information that the root locus will cross the imaginary axis at about ! =8. The root locus is shown in Figure 3. As can be seen, twolimbs of the root locus cross into the righthalf place at ! 8. 4