CDS /: Lecture 9. Frequency DomainLoop Shaping November 3, 6 Goals: Review Basic Loop Shaping Concepts Work through example(s) Reading: Åström and Murray, Feedback Systems -e, Section.,.-.4,.6 I.e., we are not going to cover Section. (feedforward design) and.5 (root locus). Section.6 will be mainly discussed next week.
General Loop Transfer Functions rr System outputs yy ηη vv uu ee disturbance ee uu vv F(s) + C(s) + P(s) + Feed forward = Controller PPPPPP +PPPP PPPPPP +PPPP CCCC +PPPP CCCC +PPPP FF +PPPP Gang of Seven Control PP +PPPP PP +PPPP +PPPP PPPP +PPPP PP +PPPP - +PPPP PPPP +PPPP CC +PPPP CC +PPPP +PPPP System inputs rr dd nn η Plant Process TF = CFS = noise PPPPPP +PPPP CCCC +PPPP Response of (y, u) to r yy T = CS = r = reference input e = error u = control v = control + disturbance η = true output (what we want to control!) y = measured output Gang of Six PPPP +PPPP CC +PPPP Response of u to (d,n) PS = PP +PPPP S = +PPPP Response of y to (d,n)
Key Loop Transfer Functions rr d n ee uu vv F(s) + C(s) + P(s) + yy η - F(s) = : Four unique transfer functions define performance ( Gang of Four ) Sensitivity: Function Complementary Sensitivity Function: Load Sensitivity Function: Noise Sensitivity Function: GG eeee = S(s) = +LL(ss) GG yyyy = T(s) = GG yyyy = PS(s) = GG yyyy = CS (s) = LL(ss) +LL(ss) PP(ss) +LL(ss) CC(ss) +LL(ss) Gang of Four (the sensitivity functions) Characterize most performance criteria of interest
Rough Loop Shaping Design Process A Process: sequence of (nonunique) steps. Start with plant and performance specifications. If plant not stable, first stabilize it (e.g., PID) 3. Adjust/increase simple gains Increase proportional gain for tracking error Introduce integral term for steady-state error Will derivative term improve overshoot? 4. Analyze/adjust for stability and/or phase margin Adjust gains for margin Introduce Lead or Lag Compensators to adjust phase margin at crossover and other critical frequencies Consider PID if you haven t already 4
Summary of Specifications Hyr Key Idea: convert closed loop specifications on GG yyyy ss = PP ss CC(ss) + PP ss CC(ss) = LL (ss) + LL ss to equivalent specifications on loop system LL(ss) Time domain spec.s can often be converted to frequency domain spec.s Steady-state tracking error < XXX LL > /XX Tracking error < YYY up to frequency ff tt Hz LL iiii > /YY for ωω < ππff tt Bandwidth of ωω bb rad/sec LL iiωω bb = Usually needed for rise/settling time spec. 5
Summary of Specifications Hyr Overshoot < ZZZ Phase Margin > ff(zz) Phase/Gain margins (Specified Directly) For robustness Typically, at least gain margin of (6 db) Usually, phase margin of 3-6 degrees 6
Loop Shaping : Design Loop Transfer Function e u η r + C(s) + P(s) + d - BW GM n y Translate specs to loop shape LL ss = PP ss CC(ss) Design L(s) to obey constraints High gain at low frequency - Good Steady-state error - Good disturbance rejection at low freqs. - Decent tracking in bandwidth Low gain at high frequency - Avoid amplifying noise Sufficiently high bandwidth - Good rise/settling time Shallow slope at crossover - Sufficient phase margin for robustness, low overshoot PM Loop shaping is trial and error 7
Additional Loop Shaping Concepts Disturbance rejection Would like HH eeee to be small make large L(s) Typically require this in low frequency range High frequency measurement noise HH uuuu = CC(ss) +PP ss CC(ss) Want to make sure that HH uuuu is small (avoid amplifying noise) Typically generates constraints in high frequency range Robustness: gain and phase margin Focus on gain crossover region: make sure the slope is gentle at gain crossover Fundamental tradeoff: transition from high gain to low gain through crossover 8
Design Method #: Process Inversion Simple trick: invert out process Write performance specs in terms of desired loop transfer function Choose L(s) to satisfy specfications Choose controller by inverting P(s) Pros Simple design process L(s) = k/s often works very well Can be used as a first cut, with additional tuning Cons High order controllers (at least same order as plant) Requires perfect process model (due to inversion) Can generate non-proper controllers (order(num) > order(den)) - Difficult to implement, plus amplifies noise at high frequency (C( ) = ) - Fix by adding high frequency poles to roll off control response at high frequency Does not work if right half plane poles or zeros (internal instability) 9
Lead & Lag Compensators Lead: K >, a < b Add phase near crossover Lag: Improve gain & phase margins, increase bandwidth (better transient response). K >, a> b Add gain in low frequencies Improves steady state error r + - e K (ss+aa) (ss+bb) u P(s) Lead/Lag: Better transient and steady state response y C(i ) C(i ) 9 45 Lead PD C(i ) C(i ) 45 Lag PI 9 a b b a Frequency [rad/s] Frequency [rad/s] (a) Lead compensation, a < b (b) Lag compensation, b < a
Lead & Lag Compensators Lead: adds phase, φφ mm at: ωω = aaaa r + - e K (ss+aa) (ss+bb) u P(s) y φφ mm = 9 oo tan aa bb C(i ) C(i ) 9 45 a Frequency b [rad/s] (a) Lead compensation, a < b Lead PD Lag: reduces steady state error by factor of a/b C(i ) C(i ) 45 9 b Frequency a [rad/s] (b) Lag compensation, b < a Lag PI
Design Method #: Add Lead, Lag, Lead/Lag compensation Lead: increases phase in frequency band Effect: lifts phase by increasing gain at high frequency Increases PM Bode: add phase between zero and pole Nyquist: increase phase margin r + - e u P(s) y 6 4 - - - - - -4-3 - 3-6 - - 3 4 5
Example: Lead Compensation for Second Order System System description Poles: pp =, pp = 5 Control specs Track constant reference with error < % Good tracking up to rad/s (less than % error) Overshoot less than % - Gives PM of ~6 deg Try a lead compensator Want gain cross over at approximately rad/sec => center phase gain there Set zero frequency gain of controller to give small error LL() > a =, b = 5, K =, (gives CC() = LL() = 4) 3
Example: Third Order System - - System description PP ss = ss + 3 Poles: pp,,3 = - -3-4 -5-6 -7-45 Bode plot for PP(ss) Control specs Steady state error < % <% tracking error up to rad/s.8 sec settling time Overshoot less than % - Gives PM of ~6 deg -9-35 -8-5 -7 - Step Response.9.8 First Cut: Need to boost low frequency gain Need to increase bandwidth Need to increase phase at higher frequency Amplitude.7.6.5.4.3.. Step Reponse for PP(ss) 4 6 8 4 Time (seconds) 4
Example: Third Order System () Gm = -.9 db (at.73 rad/s), Pm = -5.7 deg (at 4.53 rad/s) Start with P of PID control kk pp = Closed loop system is unstable Bandwidth too low 4 - -4-9 Next: PD Control kk pp =, kk dd = 7 Closed loop system is stable Phase margin oo at 8.3 rad/sec - Oscillatory step response Tracking requirement not met -8-7 4 - Gm = Inf db (at Inf rad/s), Pm =.8 deg (at 8.34 rad/s) Step Response.8.6 Can I in PID help? adds 9 oo phase!.4. - -4 Amplitude.8-45.6-9.4. -35-8 3 4 5 6 7 - Time (seconds) 5
Example: Third Order System (3) Gm = Inf db (at Inf rad/s), Pm =. deg (at 4. rad/s) Can I in PID help? Can create stable system which meets steady-state spec., but not phase margin (and overshoot) & bandwidth 5-5 -45-9 -35 Amplitude.8.6.4..8.6.4. Step Response 3 4 5 6 7 Time (seconds) -8-3 - - PD + Lead compensator? kk pp =, kk dd = 7 Lead compensator reduces low frequency -5-5 Gm = Inf db (at Inf rad/s), Pm = 43.7 deg (at 5.7 rad/s) gain (& bandwidth) ss + aa CC llllllll ss = ss + bb -5-6 3-5 - -45-9 aa =.5, bb = 7.5-35 -8-3 - 3 Bode plot for Lead Bode plot for LL(ss) 6
Example: Third Order System (4) Gm = Inf db (at Inf rad/s), Pm = 5.4 deg (at 6.5 rad/s) Step Response 5. PD + Lead compensator Increase proportional gain to compensate for Lead at low frequency. Not enough bandwidth to meet tracking spec. Live with it, or keep searching -5 - -45-9 -35-8 - - Bode plot for LL(ss) 3 Amplitude.8.6.4...4.6.8..4.6.8 Time (seconds) Increase D to add gain at high frequency kk pp =, kk dd = 5 Shift phase lead center frequency (a=5, b=4); Almost meets spec.s 5-5 - 9-9 Amplitude..8.6.4. Gm = Inf db (at Inf rad/s), Pm = 46.6 deg (at 4.3 rad/s) Step Response -8 - - 3.5.5.5 3 Time (seconds) 7
-5 Example: Third Order System (5) Nyquist Diagram Before trying more esoteric designs, check the basics Nyquist Gang of Four 5 5 Imaginary Axis -5 - - - GG eeee = SS = + PP ss CC(ss) - -4-6 GG yyyy = TT = PP ss CC(ss) + PP ss CC(ss) -5 - -5 5 5 5 Real Axis -3-8 35 9 9 45-45 -9-8 CC ss = 5ss + 6ss + 5 ss + 4 - - 3-3 -5 - -5 - GG yyyy = PPPP = PP ss + PP ss CC(ss) 5 5 7 GG yyyy = GG uuuu = CCCC = CC ss + PP ss CC(ss) This controller amplifies high frequency noise, which will lead to a significant actuator activity -8-9 8 9 Fix by adding roll-off pole(s) at higher freq. -7 - - 3 - - 3 8
Summary: Loop Shaping Loop Shaping for Stability & Performance Steady state error, bandwidth, tracking response Specs can be on any input/output response pair BW GM Main ideas Performance specs give bounds on loop transfer function Use controller to shape response Gain/phase relationships constrain design approach Standard compensators: proportional, lead, PI PM Things to remember (for homework and exams) Always plot Nyquist to verify stability/robustness Check gang of 4 to make sure that noise and disturbance responses also look OK u 9