Solution 10.8.8.1 The MATLAB program w=logspace(-2,3,200);; s=j*w;; K=100 z1 = 5 p1 = 0 p2 = 4 p3 = 10 p4 = 40 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 10881logmag.eps 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 -100]) print -deps 10881bodema.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 44=20 =158:493: Thus, the system is stable for 0 <K<15;;849: 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  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 44 dB. The root locus is shown in Figure 3. As can be seen, twolimbs of the root locus cross into the righthalf place at ! 20. 1 -260 -240 -220 -200 -180 -160 -140 -120 -100 -80 -60 -80 -60 -40 -20 0 20 40 Point (-1,0) in GH plane 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 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 -50 -40 -30 -20 -10 0 10 20 30 40 50 Figure 3: Root locus 4