ECSE 4962 Control Systems Design A Brief Tutorial on Control Design Instructor: Professor John T. Wen TA: Ben Potsaid http://www.cat.rpi.edu/~wen/ecse4962s04/
Don t Wait Until The Last Minute! You got to have a model to work with by now: At least a model based on estimated mass/inertia and your motors and gears (very few groups have this in the proposal) You should very soon have an identified model. If you don t, you must seek help! Once you have a model, start control design in simulation. Don t just tweak the controller with the experiment without some simulation based analysis first!
Today Review basic control design PID tuning
LTI System Characterization t G q We ll approximate each axis as an independent singleinput/single-output (SISO) system: q = G t Characterization: poles and zeros zpk(g); frequency response bode(g) step response step(g) steady state value evalfr(g,0)
Closed Loop System q d + - e K (PID) n a t G q n s Relevant transfer functions: KG G θ = ( θ n ) + n 1+ KG 1+ KG d s a 1 KG G e= θ + n n 1+ KG 1+ KG 1+ KG d s a
Design Objective Stability: closed loop poles must all be in left half plane. Performance: Step response has small overshoot and small settling time. Small steady state error Disturbance Rejection: Effect of sensor and actuator noises small on q Robustness: How large an uncertainty a can be tolerated (in terms of stability)? n a q d + - e K (PID) t a G q n s
Design Objective Stability: closed loop poles must all be in left half plane. closed loop poles = roots of ( 1+ KG)
Design Objective Stability: closed loop poles must all be in left half plane. Performance: Step response has small overshoot and small settling time. GK closed loop transfer function: GCL = 1 + GK ω sufficiently large, ζ sufficiently close to 1 n
Step Response Intuition based on second order system with no zero H() s = s ω 2 n 2 2 + 2ζωns+ ωn 1.6 1.4 1.2 1 under damped critically damped z=cos f f w n 0.8 0.6 0.4 over damped 0.2 0 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 time (sec)
Effect of Zero Zero within system bandwidth strongly affects response Stable zero increases overshoot, unstable zero gives rise to undershoot H ( s) = s 2 ωn ( s / α + 1) + 2ζω s + ω 2 n 2 n 2 1.5 1 slow stable zero fast stable and unstable zeros 0.5 0 slow unstable zero -0.5-1 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 time (sec)
Design Objective Stability: closed loop poles must all You be want in this left half plane. close to 1 Performance: Small steady state error θ G(0) = G (0)( θ n ) + n 1 + G(0) K(0) ss CL d sdc, adc, G CL GK = 1 + GK To reduce steady state error: Cancel n a if possible High DC loop gain G(0)K(0) Integral control You want this close to 0
Design Objective Stability: 1 closed KG loop poles Gmust all be in left half plane. e= θd + ns na 1+ KG 1+ KG 1+ KG Performance: Design Step KG/(1+KG) response small has over small the overshoot spectrum of and n s and small G/(1+KG) settling small time. over the spectrum of n a Small steady state error Disturbance Rejection: Effect of sensor and actuator noises small on q Robustness: How large an uncertainty a can be tolerated (in terms of stability)? S = sensitivity T = complementary sensitivity S + T = 1 T=KG/(1+KG) S=1/(1+KG) Spectrum of n a Spectrum of n s
Design Objective Stability: closed loop poles must all be in left half Gain margin: if a is a real number, how far can plane. a be different from 1 before the closed loop Performance: system becomes unstable? Step response has small overshoot and small settling Phase margin: time. if a=exp(jq) (a pure phase shift), how large can q be before the closed loop Small steady state error system becomes unstable? Disturbance Rejection: Effect of sensor a 2 [.5,2] and means actuator GM=6dB noises small on q Usually expressed in terms of db: Robustness: How large an uncertainty a can be tolerated (in terms of stability)? n a q d + - e K (PID) t a G q n s
Robustness (Gain/Phase Margins) a is nominally 1 Bode Diagrams Gm=19.554 db (at 3.1623 rad/sec), Pm=117.94 deg. (at 0.17724 rad/sec) 20 gain margin 1.5 Nyquist Diagrams From: U(1) 0 1 Phase (deg); Magnitude (db) -20-40 -60 0-100 Imaginary Axis To: Y(1) 0.5 0-0.5-200 -1-300 10-2 10-1 10 0 10 1 Add phase lead for phase stabilization Frequency (rad/sec) phase margin use margin command in MATLAB -1.5-1 -0.5 0 0.5 1 1.5 2 Real Axis reduce gain for gain stabilization
PID Control q d + - e K (PID) n a t G q n s Ks () = k + k / s+ k s P I D When does it work?
PID Control q d + - e K (PID) n a t G q n s Ks () = k + k / s+ k s P I D Works well when G is a 2 nd order system.
PID Control Consider G(s)=1/s 2 : closed loop characteristic polynomial is 2 ss ( + K s+ K ) + K D P I For small K I, K D governs the damping and K P governs the undamped natural frequency w o For K I > 0, DC loop gain is infinite, therefore, zero steady state error.
Intuition: Gain Tuning P gain increases speed of response but also increases overshoot D gain reduces overshoot but decreases speed of response I gain reduces steady state error but can reduce speed of response and lead to instability Strategy: Tune PD gain until desired transient response is obtained Increase I gain until convergence to steady state is satisfactory. Retune PD gains (increase) if necessary.
Frequency Domain Considerations q d + - e K (PID) t G q Adjust PID gains to achieve good tracking over the desired bandwidth (transfer function from q d to q is close to 0dB)
Disturbance Rejection d a q d + - e K (PID) t G q Adjust controller (and possibly add more filtering in K, but must be careful to preserve stability and dynamical response) so the frequency gain is small over the disturbance frequency. d s
Next Week More on control design. Tomorrow at 6pm in CII 2037 Group 1: 6pm, Group 2: 6:15pm, Group 3: 6:30pm, Group 4: 6:45pm, Group 5: 7:00pm, Group 6:7:15pm, Group 7: 7:30pm. Prepare to discuss the progress of your project.