1 Homework 6 Solution - AME 30315, Spring 2015 Problem 1 [10/10 pts] Sketch the asymptotes of the bode plot magnitude and phase for following transfer function. Embellish the asymptote plots with a rough estimate of the transitions for each break point. After completing the hand sketches, verify your result with the Matlab commands tf and bode or the GUI for asymptotic bode plots (linked on course website). Turn in your hand sketches and the Matlab results on the same scales. G(s) = s+2 s(s+10)(s2 +2s+2) First, we rewrite our transfer function: 1 s G(s) = (s + 2) 1 10 10 s+10 1 2 2 s2 +2s+2 Then, we rewrite our transfer function into standard forms: s 2 G(s) = 2 +1 1 1 s 10 1 s +1 10 ! 1 2 √s 2 1 2 +s+1 Or, with a single gain term (moved out front): G(s) = 1 10 s 2 +1 1 s 1 s +1 10 ! √s 2 1 2 +s+1 Each of which correspond to a standard form found in the text. We will plot each transfer function individually: 1 1 s 1 1 G(s) = +1 2 s 10 | 2 {z } s + 1 √s + s + 1 | {z } | {z } | 10 {z } 2 G2 (s) G1 (s) G3 (s) | {z } G4 (s) G5 (s) 1 For G1 (s) = 10 : 1 |G1 (s)| = 20Log10 ( 10 ) ≈ −20 dB ∠G1 (s) = 0◦ 2 Fig. 1. Bode plot of G1 (s) = For G2 (s) = s 2 1 10 . [1 pt] +1 : with ω z = 2 Case 1: ω << ω z G2 (iω) ≈ 1 |G2 (s)| ≈ 0 dB ∠G2 (s) ≈ 0◦ Case 2: ω >> ω z G2 (iω) ≈ i ω2 This corresponds, in decibels, to a slope of the magnitude plot of 20 dB/decade. (Notice in the above that when ω increases by a factor of 10, the magnitude of G2 (iω) also increases by a factor of 10.) Also, we have a phase angle in this case: ∠G2 (iω) ≈ 90◦ Case 3: G2 (s): ω = ωz G2 (iω z ) = i + 1 3 √ |G2 (iω z )| = 20Log10 ( 2) ≈ 3 dB ∠G2 (s) = 45◦ Fig. 2. Bode plot of G2 (s) = For G3 (s) = 1 s s 2 + 1 . [1 pt] : G3 (iω) = 1 iω = −i ω This corresponds, in decibels, to a slope of the magnitude plot of -20 dB/decade. (Notice in the above that when ω increases by a factor of 10, the magnitude of G3 (iω) decreases by a factor of 10.) Also, because it is a simply a negative imaginary number we have a phase angle: ∠G3 (iω) = −90◦ Lastly for G3 (s): ω=1 G3 (iω z ) = | −i | = 1 = 0 dB 1 4 Fig. 3. Bode plot of G3 (s) = For G4 (s) = 1 s +1 10 1 s . [1 pt] : with ω p = 10 G4 (iω) = 1+1iω 10 Case 1: ω << ω p G4 (iω) ≈ 1 |G4 (iω)| = 20Log10 (1) ≈ 0 dB ∠G4 (iω) = 0o Case 2: ω >> ω p G4 (iω) ≈ 1 ω i 10 = −i 10 ω This corresponds, in decibels, to a slope of the magnitude plot of -20 dB/decade. (Notice in the above that when ω increases by a factor of 10, the magnitude of G4 (iω) decreases by a factor of 10.) Also, because it is a simply a negative imaginary number we have a phase angle: ∠G4 (iω) = −90◦ Case 3: G4 (s): ω = ωp 5 1 1+i G4 (iω p ) = |G4 (iω p )| = 20Log10 ( = 1−i 2 √ 2 ) 2 ≈ −3 dB ∠G4 (s) = −45◦ Fig. 4. Bode plot of G4 (s) = 1 s +1 10 . [1 pt] Next, we focus on G5 (s): ! G5 (s) = 2 s2 +2s+2 = √s 2 1 2 +s+1 From pg. 412, we see that: ωn = √ 2 √ ζ= and 2 2 We can rewrite G5 (s) as: G5 (iω) = 1 2 1− √ω +iω 2 Case 1: ω << ωn G5 (iω) ≈ 1 |G5 (iω)|dB = 0 dB and ∠G5 (iω) = 0◦ 6 Case 2: ω >> ωn G5 (iω) ≈ − √ 2 2 ω This corresponds, in decibels, to a slope of the magnitude plot of -40 dB/decade. (Notice in the above that when ω increases by a factor of 10, the magnitude of G5 (iω) decreases by a factor of 100.) Also, we have a phase angle in this case: ∠G5 (iω) ≈ −180◦ Case 3: ω = ωn G5 (iωn ) = 1 √ i 2 √ = −i 2 2 ∠G5 (iωn ) = −90◦ and For an exact plotting we will need: |G5 (iωn )|dB = 20Log √1 2 ≈ −3 dB Note: Although this component is a second-order underdamped, complex conjugate pole, which often has a resonance peak, the damping ratio is very large and thus the peak is non-existent. See also Table 9.2 on pg. 414 for the peak magnitude in terms of ζ values. Fig. 5. Bode plot of G5 (s) = 2 s2 +2s+2 ! = s √ 2 1 2 +s+1 . [1 pt] 7 Now add each plot together [2 pts]: Fig. 6. Bode plot of G(s) = 1 20 (s + 2) Check with MATLAB [3 pts]: 1 s 10 s+10 2 (s2 +2s+2) . 8 Fig. 7. MATLAB Bode plot ofG(s) = 1 10 s 2 +1 1 s 1 2 A = zpk(-2,[0,-10, roots([1 2 2])'],1) 3 4 5 opts = bodeoptions; 6 7 8 9 10 11 opts.Xlabel.FontSize = 15; opts.Ylabel.FontSize = 15; opts.TickLabel.FontSize = 15; opts.Title.FontSize = 15; 12 13 14 h = bodeplot(A,opts); 1 s +1 10 ! s √ 2 1 2 +s+1 . 9 Problem 2 [15/15 pts] (a) The differential equation is given: J θ̈m (t) + bθ̇m (t) = kt ia (t). (1) By Applying Laplace transform on both sides, n o n o L J θ̈m (t) + L bθ̇m (t) = L {kt ia (t)} ; J s2 Θm (s) − sθm (0) − θ̇m (0) + b (sΘm (s) − θm (0)) = kt Ia (s). assume zero initial conditions, i.e, θ̇m (0) = θm (0) = 0, Js2 Θm (s) + bsΘm (s) = kt Ia (s). Rearrange, Θm (s) Js2 + bs = kt Ia (s); Θm (s) kt kt = = [2 pts] 2 Ia (s) (Js + bs) s (Js + b) (b) Let the closed-loop transfer function be H(s) = Θm (s) , R(s) then apply the block diagram algebraic manipulation law for feedback loop in Table 8.3, (s) K(s) ΘIam(s) H(s) = (s) 1 + K(s) ΘIam(s) From part (a), we know: kt kt Θm (s) = = . 2 Ia (s) (Js + bs) s (Js + b) And K(s) = kp . By substituting into Eqn.( 2 ), H(s) = kt kp s(Js+b) kt 1 + kp s(Js+b) Rearrange, H(s) = Θm (s) kp kt = 2 [2 pts] R(s) Js + bs + kp kt (c) By substituting J = 2, b = 4, kt = 5, kp = 10 into H(s) = Js2 kp kt , + bs + kp kt (2) 10 The transfer function becomes H(s) = 2s2 50 . + 4s + 50 Rearrange, 1 H(s) = s 2 5 =⇒ H(jω) = + 2 s 25 . +1 1 jω 2 5 2 + 25 jω + 1 1 2 = ω2 1 − 25 + 25 jω So we get ωn = 5 rad/sec; 2 2ζ = 25 ωn 1 ⇒ζ = . 5 1 when ω << ωn , H(jω) = 1 ⇒|H(jω)|dB = 0 dB; ∠H(jω) = 0◦ . 2 when ω >> ωn , 25 ω2 ⇒slope = −40 dB/dec H(jω) = − ∠H(jω) = −180◦ . 3 when ω = ωn = 5 rad/sec, 5 H(jωn ) = − j 2 ⇒|H(jω)|dB ≈ 7.96 dB. ∠H(jω) = −90◦ . Accordingly, we can get [3 pts]: 11 We can also use Matlab for verification: Magnitude (dB) 40 20 0 −20 −40 −2 10 −1 10 0 10 1 ω (rad/sec) 10 2 10 3 10 Phase (deg) 0 −50 −100 −150 −200 −2 10 −1 10 0 10 1 ω (rad/sec) 10 2 10 3 10 12 The Matlab code is also attached for reference: 1 2 3 4 5 6 7 clear all num=[50]; den=[2 4 50]; sys=tf(num,den); w=logspace(-2,3,1000); [mag,phase]=bode(sys,w); magdb=20*log10(mag); 8 9 10 11 12 13 14 15 16 17 figure(1) subplot(2,1,1) semilogx(w,squeeze(magdb),'LineWidth',1.5),grid; ylabel('Magnitude (dB)','Fontsize',12) xlabel('\omega (rad/sec)','Fontsize',12) subplot(2,1,2) semilogx(w,squeeze(phase)','LineWidth',1.5),grid; ylabel('Phase (deg)','Fontsize',12) xlabel('\omega (rad/sec)','Fontsize',12) (d) In this problem, r(t) = |{z} 2 + |sin{z10t}, u1 (t) u2 (t) Since this is a linear system, we can consider the output θm (s) to be the superposition of output induced by u1 (t) and u2 (t) respectively. For input that looks like u(t) = A sin (ωt), we know that yss (t) = A|H(jω)| sin(ωt + ∠H(jω)) Similarly, for inputs like u(t) = A cos (ωt), yss (t) = A|H(jω)| cos(ωt + ∠H(jω)). 1 Consider u1 (t) = 2, which can be written as u1 (t) = 2 cos(0t + 0); has a frequency ω1 = 0 rad/s. According to bode plot in Part (c), at ω1 = 0 rad/s, the magnitude of transfer function is 20log(|H(j0)|) = 0 dB, i.e, |H(j0)| = 1, The phase angle of transfer function at this frequency is ∠H(j0) = 0◦ = 0 rad. So the output corresponding to u1 (t) is: yss1 (t) = |H(j0)|(2 cos(0t + ∠H(j0))) = (1) · (2 cos(0t + 0)) = 2. 13 2 Similarly, u2 (t) = sin(10t) has a frequency ω2 = 10 rad/s. According to bode plot, at ω2 = 10 rad/s, the magnitude of transfer function is 50 |H(10j)| = 50 − 2ω2 2 + 4ω2 j ! 50 = p (50 − 200)2 + 402 = 0.32. The phase angle of transfer function at ω2 = 10 rad/s is 4ω2 −1 ∠H(10j) = 180 + tan 50 − 2ω2 2 = 195◦ = −165◦ = −2.88 rad 14 |H(10j)| and ∠H(10j) can also be approximated using the bode plot, where 20log|H(10j)| = −10 dB 10 ⇒|H(10j)| = 10− 20 = 0.32 ∠H(10j) = −165◦ = −2.88 rad So the output corresponding to the input u2 (t) is yss2(t) = |H(10j)| sin(10t + ∠H(10j)) = 0.32 sin(10t − 2.88). So the steady state output is θss (t) = yss1 (t) + yss2 (t) = 2 + 0.32 sin(10t − 2.88) [3 pts]. (e) According to the definition of bandwidth, we need to find the frequency at which the magnitude of transfer function is 3 dB lower than the DC gain. This is shown in the bode plot as follows, By estimating using our bode plot in Part (c), we can see the bandwidth frequency wbw = 7.5 rad/sec [2 pts]. We can also verify this using Matlab with command bandwdith(sys), 1 clear all 15 2 3 4 num=[50]; den=[2 4 50]; sys=tf(num,den); 5 6 f=bandwidth(sys) (f) According to the statement, Ωm (s) = L {Ωm (t)} n o = L Θ̇m (t) = sΘm (s) − θm (0) | {z } =0 So that Ωm (s) Θm (s) =s R(s) R(s) So that the bode plot of Bode plot of s, Bode plot of Ωm (s) , R(s) Ωm (s) R(s) is the bode plot of Θm (s) R(s) superimposed by the bode plot of s. 16 By adding the two together [3 pts], We can also verify this through Matlab, 17 Magnitude (dB) 40 20 s Θm(s)/R(s) sΘm(s)/R(s) 0 −20 −40 −2 10 −1 10 0 10 1 ω (rad/sec) 10 2 10 3 10 Phase (deg) 100 50 0 −50 s Θm(s)/R(s) sΘm(s)/R(s) −100 −2 10 −1 10 0 10 1 ω (rad/sec) 10 2 10 Matlab code is also attached for reference, 1 2 3 4 5 6 7 clear all num1=[1 0]; den1=[1]; sys1=tf(num1,den1); w=logspace(-2,3,1000); [mag1,phase1]=bode(sys1,w); magdb1=20*log10(mag1); 8 9 10 11 12 13 num2=[50]; den2=[2 4 50]; sys2=tf(num2,den2); [mag2,phase2]=bode(sys2,w); magdb2=20*log10(mag2); 14 15 16 17 18 19 num3=[50 0]; den3=[2 4 50]; sys3=tf(num3,den3); [mag3,phase3]=bode(sys3,w); magdb3=20*log10(mag3); 20 21 22 23 24 3 10 figure(4) subplot(2,1,1) semilogx(w,squeeze(magdb1),'--b',w,squeeze(magdb2),'--g',w,squeeze(magdb3)... ,'-r','LineWidth',1.5),grid; 18 25 26 27 28 29 30 31 32 33 ylabel('Magnitude (dB)','Fontsize',12) xlabel('\omega (rad/sec)','Fontsize',12) legend('s','\Theta_m(s)/R(s)','s\Theta_m(s)/R(s)') subplot(2,1,2) semilogx(w,squeeze(phase1),'--b',w,squeeze(phase2)','--g',w,squeeze(phase3)... ,'-r','LineWidth',1.5),grid; ylabel('Phase (deg)','Fontsize',12) xlabel('\omega (rad/sec)','Fontsize',12) legend('s','\Theta_m(s)/R(s)','s\Theta_m(s)/R(s)')