Solution 9.10.2.10 The MATLAB statements load bodeid10 topm = size(bodeid10) top = topm(1,1) w=bodeid10(1:top,1);; mag = bodeid10(1:top,2);; phase = bodeid10(1:top,3);; semilogx(w,mag);; grid on axis([0.1,1000,-160,0]) print -deps 910210mag.eps semilogx(w,phase);; grid on axis([0.1,1000,-300,-80]) print -deps 910210phase.eps can be used to load the data and plot the magnitude response. Figure 1 shows the magnitude data with some asymptotes added. The transfer func- tion clearly has a pole at the origin and twootherpoles, one near s = ;25 and one near s = ;100. Atlowfrequency only the gain term and the term 1=s will be present. The term 1=s by itself will cross the vertical line through ! =1rad/sec at 0 db. The plot actually crosses at ;55 dB, so wecan nd the gain to be K =10 ;55=20 =0:0017783: Then our rst guess at the transfer function is G(s) = 0:0017783 s(1+ s=25)(1+s=100) = 4:4458 s(s+25)(s+100) : Wecheckthe accuracy of the model bycomparing the actual magnitude and phase to the phase of the derived transfer function, as shown in Figures 3 and 4 The t is very good for both the magnitude and phase plots. It looks likewe are very close, so we try G(s) = 0:0017783 s(1+ s=23)(1+s=100) = 4:09 s(s+23)9s+100) : 1 10 -1 10 0 10 1 10 2 10 3 -160 -140 -120 -100 -80 -60 -40 -20 0 Figure 1: ABode magnitude plot 2 10 -1 10 0 10 1 10 2 10 3 -300 -280 -260 -240 -220 -200 -180 -160 -140 -120 -100 -80 Figure 2: ABode phase plot 3 10 -1 10 0 10 1 10 2 10 3 -160 -140 -120 -100 -80 -60 -40 -20 Figure 3: Comparison of actual and derived Bode magnitude plots 4 10 -2 10 -1 10 0 10 1 10 2 10 3 -300 -280 -260 -240 -220 -200 -180 -160 -140 -120 -100 -80 Figure 4: Comparison of actual and derived Bode phase plots 5 10 -1 10 0 10 1 10 2 10 3 -160 -140 -120 -100 -80 -60 -40 -20 Figure 5: Comparison of actual and derived Bode magnitude plots 6 10 -2 10 -1 10 0 10 1 10 2 10 3 -300 -280 -260 -240 -220 -200 -180 -160 -140 -120 -100 -80 Figure 6: Comparison of actual and derived Bode phase plots 7 10 -2 10 -1 10 0 10 1 10 2 10 3 -160 -140 -120 -100 -80 -60 -40 -20 Figure 7: Comparison of actual and derived Bode magnitude plots As shown in Figures 5 and 6, the t is very good, but better for the magnitude than the phase. Wecould stop here, because wehaveaworkable transfer function. But consider G(s) = 0:0016(1+s=20) s(1 +s=25) 2 (1+ s=100) = 5(s+20) s(s+25) 2 9s +100) : The results are shown in Figures 7 and 8. As can be seen the t is per- fect. Thus, it maybehard to detect a near pole/zero cancellation. The MATLAB program that does this analysis is load bodeid10 topm = size(bodeid10) top = topm(1,1) w=bodeid10(1:top,1);; mag = bodeid10(1:top,2);; 8 10 -2 10 -1 10 0 10 1 10 2 10 3 -300 -280 -260 -240 -220 -200 -180 -160 -140 -120 -100 -80 Figure 8: Comparison of actual and derived Bode phase plots 9 phase = bodeid10(1:top,3);; semilogx(w,mag);; grid on axis([0.1,1000,-160,0]) print -deps 910210mag.eps semilogx(w,phase);; grid on axis([0.1,1000,-300,-80]) print -deps 910210phase.eps p1 = 0 p2 = 25 p3 = 100 Ktc = 0.0017783 K=(Ktc * p2 * p3) wp = logspace(-2,3,20);; jw = j*wp;; mag1 = 20*log10( (K )./ ( abs(jw +p1).* abs(jw + p2).*abs(jw+p3) ) );; semilogx(w,mag,'k-',wp,mag1,'kd') grid on axis([0.1,1000,-160,-20]) print -deps 910210mag1.eps phase1 = ( -angle(jw +p1) -angle(jw + p2) - angle(jw+p3) )*180/pi;; semilogx(w,phase,'k-',wp,phase1,'kd') grid on axis([0.01,1000,-300, -80]) print -deps 910210phase1.eps p1 = 0 p2 = 23 p3 = 100 Ktc = 0.0017783 K=(Ktc * p2 * p3) mag2 = 20*log10( (K )./ ( abs(jw +p1).* abs(jw + p2).*abs(jw+p3) ) );; semilogx(w,mag,'k-',wp,mag2,'kd') grid on axis([0.1,1000,-160,-20]) print -deps 910210mag2.eps phase2 = ( -angle(jw +p1) -angle(jw + p2) - angle(jw+p3))*180/pi;; semilogx(w,phase,'k-',wp,phase2,'kd') grid on axis([0.01,1000,-300,-80]) print -deps 910210phase2.eps z1 = 20 p1 = 0 p2 = 25 p3 = 25 10 p4 = 100 Ktc = 0.0016 K=(Ktc *p2* p3 * p4)/(z1) mag3 = 20*log10( (K*abs(jw + z1) ) ./ ( abs(jw +p1).* abs(jw + p2).*abs(jw+p3).*abs(jw + p4) ) );; semilogx(w,mag,'k-',wp,mag3,'kd') grid on axis([0.01,1000,-160,-20]) print -deps 910210mag3.eps phase3 = (angle(jw + z1) -angle(jw +p1) -angle(jw + p2) - angle(jw+p3)-angle(jw + p4) )*180/pi;; semilogx(w,phase,'k-',wp,phase3,'kd') grid on axis([0.01,1000,-300,-80]) print -deps 910210phase3.eps 11