Solution 10.8.8.6 The MATLAB program w=logspace(-2,3,200);; s=j*w;; K=100 z1 = 10 p1 = 0 p2 = 0 p3 = 4 p4 = 20 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,-140,-60 60]) print -deps 10886logmag.eps g=zpk([-z1],[-p1 -p2 -p3 -p4],100) K=0.1 maga = 20*log10( abs( ( K ) ./ ( (s + p1).*(s + p2).*(s +p3).*(s + p4) ) ) );; phasea = ( -angle(s + p1)-angle(s + p2)-angle(s + p3) -angle(s + p4) )*180/pi;; plot(phase,mag,'k-',phasea,maga,'k--');; grid on axis([-260,-140,-60 80]) print -deps 10886logmaga.eps K=linspace(0,1600,500);; [P,K] = rlocus(g,K);; plot(real(P),imag(P),'k.') grid on print -deps 10886rl.eps pause subplot(2,1,1),semilogx(w,mag) grid on axis([0.1 1000 -100 40]) subplot(2,1,2), semilogx(w,phase) grid on axis([0.1 1000 -280 -160]) print -deps 10886bodema.eps draws the log magnitude plot shown in Figure 1 With K =100the plot 1 -260 -240 -220 -200 -180 -160 -140 -60 -40 -20 0 20 40 60 (-1,0) Figure 1: Log magnitude chart for K = 100 2 -260 -240 -220 -200 -180 -160 -140 -60 -40 -20 0 20 40 60 (-1,0) Figure 2: Log magnitude chart for K =100andK =0:1 passes above the point(;1;;0) on the plot. This eauivalenttoanencir- clementintheGH plane. At rst glance it would seem that lowering the gain would make the system stable. However, Figure 2 shows that this is not the case. Nor matter howsmall wemakethegain the plot will pass to the left (above) the point(;1;;0). The same information is available from the Bode magnitude and phase plots as shown in Figure 3. The phase starts at ;180  and goes smoothly to ;360  .Thus, the system is always unstable, as shown bytheroot locus is Figure 4. As can be seen, twolimbs of the root locus cross immediately into the righthalfplane. 3 10 -1 10 0 10 1 10 2 10 3 -100 -80 -60 -40 -20 0 20 40 10 -1 10 0 10 1 10 2 10 3 -280 -260 -240 -220 -200 -180 -160 Figure 3: Bode phase and magnitude plots for K =100 4 -60 -50 -40 -30 -20 -10 0 10 20 30 -50 -40 -30 -20 -10 0 10 20 30 40 50 Figure 4: Root locus 5