Solution 10.8.8.3 The MATLAB program w=logspace(-2,4,200);; s=j*w;; K=100 p1 = 0 p2 = 0 p3 = 6 p4 = 20 hold off mag = 20*log10( abs( ( K ) ./ ( (s + p1).*(s + p2).*(s +p3).*(s + p4) ) ) );; phase = ( -angle(s + p1)-angle(s + p2)-angle(s + p3) -angle(s + p4) )*180/pi;; plot(phase,mag);; grid on axis([-260,-140,-60 80]) print -deps 10883logmag.eps g=zpk([],[-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 10883logmaga.eps K=linspace(0,1600,500);; [P,K] = rlocus(g,K);; plot(real(P),imag(P),'k.') grid on print -deps 10882rl.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 -380 -160]) print -deps 10882bodema.eps draws the log magnitude plot shown in Figure 1 With K =100the plot passes above the point(;1;;0) on the plot. This eauivalenttoanencir- clementintheGH plane. At rst glance it would seem that lowering the 1 -260 -240 -220 -200 -180 -160 -140 -60 -40 -20 0 20 40 60 80 The point (-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 80 The point (-1,0) Figure 2: Log magnitude chart for K =100andK =0:1 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 -350 -300 -250 -200 Figure 3: Bode phase and magnitude plots for K =100 4 -25 -20 -15 -10 -5 0 5 10 -15 -10 -5 0 5 10 15 Figure 4: Root locus 5