Design system with Bode Hany Ferdinando Dept. of Electrical Eng. Petra Christian University General Overview Bode vs Root Locus design Information from open-loop freq.
Download ReportTranscript Design system with Bode Hany Ferdinando Dept. of Electrical Eng. Petra Christian University General Overview Bode vs Root Locus design Information from open-loop freq.
Design system with Bode Hany Ferdinando Dept. of Electrical Eng. Petra Christian University General Overview Bode vs Root Locus design Information from open-loop freq. response Lead and lag compensator Design System with Bode - Hany Ferdinando 2 Bode vs Root Locus Root Locus method gives direct information on the transient response of the closed-loop system Bode gives indirect information In control system, the transient response is important. For Bode, it is represented indirectly as phase and gain margin, resonant peak magnitude, gain crossover, static error constant Design System with Bode - Hany Ferdinando 3 Open-loop Freq. Response Low-freq. region indicates the steady-state behavior of the closed-loop system Medium-freq. region indicates the relative stability High-freq. region indicates the complexity of the system Design System with Bode - Hany Ferdinando 4 Lead and Lag Compensator Lead Compensator: It yields an improvement in transient response and small change in steady-state accuracy It may attenuate high-freq. noise effect Lag Compensator: It yields an improvement in steady-state accuracy It suppresses the effects of high-freq. noise signal Design System with Bode - Hany Ferdinando 5 Lead Compensator 1 s Ts 1 T Gc ( s) K c Kc 1 Ts 1 s T (0 < < 1) The minimal value of a is limited by the construction of lead compensator. Usually, it is taken to be about 0.05 Design System with Bode - Hany Ferdinando 6 Lead Compensator 1. Ts 1 Define Kc = K then Gc ( s) K then Ts 1 Gc ( s)G ( s) K Ts 1 Ts 1 Ts 1 G( s) KG ( s) G1 ( s) Ts 1 Ts 1 Ts 1 Determine gain K to satisfy the requirement on the given static error constant 2. With gain K, draw the Bode diagram and evaluate the phase margin Design System with Bode - Hany Ferdinando 7 Lead Compensator 3. Determine the phase-lead angle to be added to the system (fm), add additional 5-12o to it 1 4. Use sin f m 1 to determine the attenuation factor . Find wc in G1(s) as |G1(s)| = -20 log(1/√) and wc is 1/(√T) 5. Find zero (1/T) and pole (1/T) Design System with Bode - Hany Ferdinando 8 Lead Compensator 6. Calculate Kc = K/ 7. Check the gain margin to be sure it is satisfactory Design System with Bode - Hany Ferdinando 9 Lead Compensator - example 4 G( s) s( s 2) It is desired that the Kv is 20/s Phase margin 50o Gain margin at least 10 dB Design System with Bode - Hany Ferdinando 10 Lead Compensator - example Ts 1 Ts 1 Ts 1 Gc ( s )G ( s) K G(s) KG ( s) G1 ( s ) Ts 1 Ts 1 Ts 1 Ts 1 Ts 1 lim sGc ( s )G ( s ) lim s G1 ( s ) lim s KG ( s ) s 0 s 0 Ts 1 s 0 Ts 1 Ts 1 4K lim s 2 K 20 s 0 Ts 1 s ( s 2) K = 10 Design System with Bode - Hany Ferdinando 11 Lead Compensator - example Bode Diagram Gm = Inf dB (at Inf rad/sec) , Pm = 18 deg (at 6.17 rad/sec) Magnitude (dB) 50 0 Phase (deg) -50 -90 -135 -180 -1 10 0 1 10 10 2 10 Frequency (rad/sec) Design System with Bode - Hany Ferdinando 12 Lead Compensator - example Gain margin is infinity, the system requires gain margin at least 10 dB. Phase margin is 18o, the system requires 50o, therefore there is additional 32o for phase margin It is necessary to add 32o with 5-12o as explained before…it is chosen 5o 37o Design System with Bode - Hany Ferdinando 13 Lead Compensator - example Sin 37 = 0.602, then = 0.25 |G1(s)| = -20 log (1/√) o 40 1 20 log jw c ( jw c 2) 0.25 40 6.02dB 0.5 jw c ( jw c 2) wc = 8.83 rad/s new crossover freq. Design System with Bode - Hany Ferdinando 14 Lead Compensator - example wc = 1/(√T), then 1/T = wc√ 4.415 zero = 4.415 Pole = 1/(T) = wc/√ = 17.66 Kc = K/ = 10/0.25 = 40 1 s 4 T Gc ( s )G ( s ) K c 1 s ( s 2) s T s 4.415 4 Gc ( s )G ( s ) 40 s 17.66 s ( s 2) Design System with Bode - Hany Ferdinando 15 Lead Compensator - example Bode Diagram Gm = Inf dB (at Inf rad/sec) , Pm = 49.6 deg (at 8.83 rad/sec) Magnitude (dB) 50 0 -50 Phase (deg) -100 -90 -135 -180 -1 10 0 10 1 10 2 10 3 10 Frequency (rad/sec) Design System with Bode - Hany Ferdinando 16 Lead Compensator - example Clear variable clear; Gain from Kv K = 10; Original system Plot margin Get Gm & Pm num = 4; den = [1 2 0]; margin(K*num,den) [Gm,Pm] = margin(K*num,den) New Pm in deg new_Pm = 50 - Pm + 5; New Pm in rad new_Pm_rad = new_Pm*pi/180; alpha From calculation Get zero & pole Compensator gain Plot final result alpha = (1 - sin(new_Pm_rad))/(1 + sin(new_Pm_rad)) Wc = 8.83; zero = Wc*sqrt(alpha); pole = Wc/sqrt(alpha); Kc = K/alpha; figure; margin(conv(4*Kc,[1 zero]),conv([1 2 0],[1 pole])) Design System with Bode - Hany Ferdinando 17 Lag Compensator 1 s Ts 1 T Gc ( s) K c Kc 1 Ts 1 s T ( > 1) With b > 1, its pole is closer to the origin than its zero is Design System with Bode - Hany Ferdinando 18 Lag Compensator 1. Assume 1 s Ts 1 T Gc ( s) K c Kc 1 Ts 1 s T Kc = K Ts 1 Ts 1 Ts 1 Gc ( s)G( s) K G(s) KG ( s) G1 ( s) Ts 1 Ts 1 Ts 1 Calculate gain K for required static error constant or you can draw it in Bode diagram Design System with Bode - Hany Ferdinando 19 Lag Compensator 2. if the phase margin of KG(s) does not satisfy the specification, calculate fm! It is fm = 180 – required_phase_margin (don’t forget to add 5-12 to the required phase margin). Find wc for the new fm! 3. Choose w = 1/T (zero of the compensator) 1 octave to 1 decade below wc. Design System with Bode - Hany Ferdinando 20 Lag Compensator 4. At wc, determine the attenuation to bring the magnitude curve down to 0 dB. This attenuation is equal to -20 log (). From this point, we can calculate the pole, 1/(T) 5. Calculate the gain Kc as K/ Design System with Bode - Hany Ferdinando 21 Lag Compensator - example 4 G( s) s( s 1)(0.5s 1) It is desired that the Kv is 5/s Phase margin 40o Gain margin at least 10 dB Design System with Bode - Hany Ferdinando 22 Lag Compensator - example Gc ( s)G( s) K c Ts 1 1 Ts 1 1 K Ts 1 s( s 1)(0.5s 1) Ts 1 s( s 1)(0.5s 1) K = Kc K v lim sGc ( s)G( s) sK s 0 Ts 1 1 Ts 1 s( s 1)(0.5s 1) With Kv = 5, K = 5 Design System with Bode - Hany Ferdinando 23 Lag Compensation - example Bode Diagram Gm = -4.44 dB (at 1.41 rad/sec) , Pm = -13 deg (at 1.8 rad/sec) 100 Magnitude (dB) 50 0 -50 -100 -150 -90 Phase (deg) -135 -180 -225 -270 -2 10 -1 10 0 10 1 10 2 10 Frequency (rad/sec) Design System with Bode - Hany Ferdinando 24 Lag Compensation - example The required phase margin is 40 , o therefore, fm = -180o + 40o + 10o = -130o Angle of G1(s) is -130o, wc = 0.49 rad/s w = 1/T = 0.2wc = 0.098 rad/s At wc, the attenuation to bring down the magnitude curve to 0 dB is -18.9878 dB (rounded to -19 dB) From -20log() = -19, is 8.9125 Design System with Bode - Hany Ferdinando 25 Lag Compensation - example Pole of the compensator is 1/(T), with 1/T = 0.098, the pole is 0.011 Kc = K/b, and Kc = 0.561 Design System with Bode - Hany Ferdinando 26 Lag Compensation - example Gain K = 5; num = 1; den = conv([1 1 0],[0.5 1]); Plot margin Get gain and phase margin Find new phase margin margin(K*num,den) [Gm,Pm] = margin(K*num,den); new_Pm = (-180 + 40 + 10)*pi/180; %rad wc = 0.49; att = -(20*log10(5/abs(i*wc*(i*wc+1)*(i*0.5*wc+1)))) beta = 10^(att/-20) zero = 0.2*wc pole = zero/beta Kc = K/beta Design System with Bode - Hany Ferdinando 27