Solution 9.10.2.12 The MATLAB statements load bodeid12 topm = size(bodeid12) top = topm(1,1) w=bodeid12(1:top,1);; mag = bodeid12(1:top,2);; phase = bodeid12(1:top,3);; semilogx(w,mag);; grid on axis([0.01,1000,-160,40]) print -deps 910212mag.eps semilogx(w,phase);; grid on axis([0.1,1000,-280,-120]) print -deps 910212phase.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 twopoles at the origin, a zero near s = ;1, a pole near s = ;10 and a pole near s = ;300. Atlow frequency only the gain term and the term 1=s 2 will be present. The term 1=s 2 by itself will cross the vertical line through ! =1rad/sec at 0 db. The plot actually crosses at ;40 dB, so wecan nd the gain to be K =10 ;40=20 =0:01: Then our rst guess at the transfer function is G(s) = 0:01(1+ s) s 2 (1+ s=10)(1+ s=300) = 30(s+1) s 2 (s+10)(s+300) : 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 Wesee that wearevery close. Wemove the last pole to s = ;400 and obtain G(s) = 0:01(1+ s) s 2 (1+ s=10)(1+ s=400) = 40(s+1) s 2 (s+10)(s+400) : 1 10 -2 10 -1 10 0 10 1 10 2 10 3 -160 -140 -120 -100 -80 -60 -40 -20 0 20 40 Figure 1: ABode magnitude plot 2 10 -1 10 0 10 1 10 2 10 3 -280 -260 -240 -220 -200 -180 -160 -140 -120 Figure 2: ABode phase plot 3 10 -2 10 -1 10 0 10 1 10 2 10 3 -160 -140 -120 -100 -80 -60 -40 -20 0 20 40 Figure 3: Comparison of actual and derived Bode magnitude plots 4 10 -2 10 -1 10 0 10 1 10 2 10 3 -280 -260 -240 -220 -200 -180 -160 -140 -120 -100 -80 Figure 4: Comparison of actual and derived Bode phase plots 5 10 -2 10 -1 10 0 10 1 10 2 10 3 -160 -140 -120 -100 -80 -60 -40 -20 0 20 40 Figure 5: Comparison of actual and derived Bode magnitude plots As shown in Figures 5 and 6, the t is perfect. for both the magnitude and the phase. The MATLAB program that does this analysis is load bodeid12 topm = size(bodeid12) top = topm(1,1) w=bodeid12(1:top,1);; mag = bodeid12(1:top,2);; phase = bodeid12(1:top,3);; semilogx(w,mag);; grid on axis([0.01,1000,-160,40]) print -deps 910212mag.eps semilogx(w,phase);; grid on axis([0.1,1000,-280,-120]) print -deps 910212phase.eps z1 = 1 p1 = 0 6 10 -2 10 -1 10 0 10 1 10 2 10 3 -280 -260 -240 -220 -200 -180 -160 -140 -120 -100 -80 Figure 6: Comparison of actual and derived Bode phase plots 7 p2 = 0 p3 = 10 p4 = 300 Ktc = 0.01 K=(Ktc *p3* p4)/(z1) mag1 = 20*log10( ( K*abs(jw + z1) ) ./ ( abs(jw +p1).* abs(jw + p2).*abs(jw+p3).*abs(jw + p4) ) );; semilogx(w,mag,'k-',wp,mag1,'kd') grid on axis([0.01,1000,-160,40]) print -deps 910212mag1.eps phase1 = (angle(jw + z1) -angle(jw +p1) -angle(jw + p2) - angle(jw+p3)-angle(jw + p4) )*180/pi;; semilogx(w,phase,'k-',wp,phase1,'kd') grid on axis([0.01,1000,-280,-80]) print -deps 910212phase1.eps z1 = 1 p1 = 0 p2 = 0 p3 = 10 p4 = 400 Ktc = 0.01 K=(Ktc *p3* p4)/(z1) mag2 = 20*log10( ( K*abs(jw + z1) ) ./ ( abs(jw +p1).* abs(jw + p2).*abs(jw+p3).*abs(jw+p4)));; semilogx(w,mag,'k-',wp,mag2,'kd') grid on axis([0.01,1000,-160,40]) print -deps 910212mag2.eps phase2 = (angle(jw + z1) -angle(jw +p1) -angle(jw + p2) - angle(jw+p3) -angle(jw + p4) )*180/pi;; semilogx(w,phase,'k-',wp,phase2,'kd') grid on axis([0.01,1000,-280,-80]) print -deps 910212phase2.eps 8