CDS : Lecture 8. Tools for PID & Loop Shapig Richard M. Murray 7 November 4 Goals: Show how to use loop shapig to achieve a performace specificatio Itroduce ew tools for loop shapig desig: Ziegler-Nichols, root locus, lead compesatio Work through some eample cotrol desig problems Readig: Åström ad Murray, Aalysis ad Desig of Feedback Systems, Ch 8
Tools for Desigig PID cotrollers d r - e C(s) u P(s) y Cs () = K( Ts D ) Ts I Zeigler-Nichols tuig Desig PID gais based o step respose Works OK for may plats (but uderdamped) Good way to get a first cut cotroller Frequecy domai versio also eists Cautio: PID amplifies high frequecy oise Sol : pole at high frequecy Cautio: Itegrator widup Prologed error causes large itegrated error Effect: large udershoot (to reset itegrator) Sol : move pole at zero to very small value Facier sol : ati-widup compesatio K =. / a T = * L T = L/ 7 Nov 4 R. M. Murray, Caltech CDS a Magitude (db) Step respose 8 6 4 L I Poit of maimum slope Bode Diagrams -4-4 Frequecy (rad/sec) D
Eample: PID cruise cotrol Ps () / m r = s b/ m s a.5.4.3 L =.49 a = step.39 Ziegler-Nichols desig for cruise cotroller Plot step respose, etract L ad a, compute gais Bode Diagrams.. slope -. 3 4 5 Phase (deg); Magitude (db) 5-5 - - Ps () Ps () Cs () - -3 - - Frequecy (rad/sec) Cs () L() s L() s Time (sec.) Result: sluggish icrease loop gai 7 Nov 4 R. M. Murray, Caltech CDS 3 Amplitude.5.5 Step Respose Cs () = K( Ts D ) Ts K =. / a T = * L T = L/ I 3 4 5 6 I D
r - e Pole Zero Diagrams ad Root Locus Plots C(s) α Pole zero diagram verifies stability Roots of PC give closed loop poles Ca trace the poles as a parameter is chaged: Cs () = K( Ts D ) Ts I α u P(s) y Imag Ais -8-7 -6-5 -4-3 - - 3 Real Ais Root locus = locus of roots as parameter value is chaged Ca plot pole locatio versus ay parameter; just repeatedly solve for roots Commo choice i cotrol is to vary the loop gai (K) 8 6 4 - -4-6 Origial pole locatio (α = ) Pole goes to Poles merge ad split Pole goes ustable for some α Pole goes to termial value 7 Nov 4 R. M. Murray, Caltech CDS 4
Oe Parameter Root Locus Basic idea: covert to stadard problem : as () αbs () = Look at locatio of roots as α is varied over positive real umbers If phase of a(s)/b(s) = 8, we ca always choose a real α to solve eq Ca compute the phase from the pole/zero diagram Gs () a() s ( s z)( s z) L( s zm) = = k b() s ( s p )( s p ) L( s p ) G( s ) = ( s z ) L ( s z ) ( s p ) L ( s p ) m φ i = phase cotributio from s to -p i ψ I = phase cotributio from s to -z i Trace out positios i plae where phase = 8 At each of these poits, there eists gai α to satisfy a(s) αb(s) = All such poits are o root locus 7 Nov 4 R. M. Murray, Caltech CDS 5
r - e α C(s) Loop gai as root locus parameter Commo choice for cotrol desig Special properties for loop gai Roots go from poles of PC to zeros of PC Ecess poles go to ifiity Ca compute asymptotes, break poits, etc Very useful tool for cotrol desig MATLAB: rlocus Root Locus for Loop Gai u P(s) s () α d( s) α( s) = d() s y Imag Ais 8 6 4 - -4-6 Ope loop pole locatio (α = ) Asymptotes for ecess poles at (36 /(P-Z)) Real ais to the left of odd # of real poles & zeros is o root locus Closed pole goes to ope loop zeros -8-7 -6-5 -4-3 - - 3 Real Ais Additioal commets Although loop gai is the most commo parameter, do t forget that you ca plot roots versus ay parameter Need to lik root locatio to performace 7 Nov 4 R. M. Murray, Caltech CDS 6
Secod Order System Respose Secod order system respose Sprig mass dyamics, writte i caoical form Guidelies for pole placemet Dampig ratio gives Re/Im ratio Settig time determied by Re(λ) H() s ω ω = = s ςω s ω ( s ςω jω )( s ςω jω ) d d ω = ω ς d Performace specificatios T T r s.8/ ω 3.9 / ςω M e p e = SS πς / ς 8 6 4 Root Locus Editor (C) T s < ζ.77.5 M p 4% 6% Slope - -.7 Imag Ais - -4 Desired regio for closed loop poles M p < y.5 44% -3.9-6 -8 - - -8-6 -4 - - -8-6 -4-7 Nov 4 R. M. Murray, Caltech CDS Real Ais 7
Effect of pole locatio o performace Idea: look at domiat poles Poles earest the imagiary ais (earest to istability) Aalyze usig aalogy to secod order system PZmap complemets iformatio o Bode/Nyquist plots Similar to gai ad phase calculatios Shows performace i terms of the closed loop poles Particularly useful for choosig system gai Also useful for decidig where to put cotroller poles ad zeros (with practice [ad SISOtool]) Imag Ais Imag Ais Imag Ais.5.5 -.5 - -.5-5 -4-3 - - Real Ais.5.5 -.5-3 4 5 6 7 8 9 Time (sec.) 7 Nov 4 R. M. Murray, Caltech CDS 8 Pole-zero map -.5-5 -4-3 - - Real Ais.5.5 -.5 - Pole-zero map Pole-zero map -.5-5 -4-3 - - Real Ais Amplitude Amplitude Amplitude To: Y() To: Y() To: Y().4..8.6.4..4..8.6.4. 3.5.5.5.5 Step Respose From: U() Step Respose From: U() 3 4 5 6 7 8 9 Time (sec.) 3 Step Respose From: U() 3 4 5 6 7 8 9 Time (sec.)
Eample: PID cruise cotrol Start with PID cotrol desig: / m r Ps () = s b/ m s a Cs () = K( Ts D ) Ts I Modify gai to improve performace Use MATLAB sisotool Adjust loop gai (K) to reduce overshoot ad decrease settlig time ζ less tha 5% overshoot Re(p) < -.5 T s less tha sec 7 Nov 4 R. M. Murray, Caltech CDS 9
Eample: Pitch Cotrol for Caltech Ducted Fa System descriptio Vector thrust egie attached to wig Iputs: fa thrust, thrust agle (vectored) Outputs: positio ad orietatio States:, y, θ derivatives Dyamics: flight aerodyamics Cotrol approach Desig ier loop cotrol law to regulate pitch (θ ) usig thrust vectorig Secod outer loop cotroller regulates the positio ad altitude by commadig the pitch ad thrust Basically the same approach as aircraft cotrol laws 7 Nov 4 R. M. Murray, Caltech CDS
Phase (deg); Magitude (db) 5 Performace Specificatio ad Desig Approach Performace Specificatio % steady state error Zero frequecy gai > % trackig error up to rad/sec Gai > from - rad/sec 45 phase margi Gives good relative stability Provides robustess to Frequecy (rad/sec) ucertaity r Desig approach Ps () = Js ds mgl Ope loop plat has poor phase margi Add phase lead i 5-5 rad/sec rage a = 5 Icrease the gai to achieve steady s a Cs () = K b = 3 state ad trackig performace specs s b K = 5 3 Avoid itegrator to miimize phase -5-5 - -5-7 Nov 4 R. M. Murray, Caltech CDS
Summary: PID ad Root Locus PID cotrol desig Very commo (ad classical) cotrol techique Good tools for choosig gais u = K e K e K e& p I D Bode Diagrams Root locus Show closed loop poles as fuctio of a free parameter Performace limits RHP poles ad zeros place limits o achievable performace Waterbed effect Phase (deg); Magitude (db) 5 4 3 5 ω = T I ω = T D Imag Ais 8 6 4 - -4-5 -6 - -3 - - 3 Frequecy (rad/sec) -8-7 -6-5 -4-3 - - 3 Real Ais 7 Nov 4 R. M. Murray, Caltech CDS