. AERO 422: Active Controls for Aerospace Vehicles . Proportional, Integral & Derivative Control Design Raktim Bhattacharya Laboratory For Uncertainty Quantification Aerospace Engineering, Texas A&M University. Proportional Control P ...... I ..... PI ..... PD ...... PID ........ Proportional Control . r + − y e C u P y C(s) = K, constant gain u(t) = Ke(t) Use Routh’s criterion to determine range for K Verify if the system is stabilizable with C(s) = K AERO 422, Instructor: Raktim Bhattacharya 3 / 31 P ...... I ..... PI ..... PD ...... PID ........ Second order system . r + − y e C P (s) = u P y A (τ1 s+1)(τ2 s+1) , C(s) =K Characteristic equation: zeros of 1 + P C τ1 τ2 s2 + (τ1 + τ2 )s + AK + 1 = 0 Open loop poles at −1/τ1 , −1/τ2 Closed loop poles at √ τ1 + τ2 + τ1 2 − 2 τ1 τ2 + τ2 2 − 4 AK τ1 τ2 p1 = − 2 τ1 τ2 √ 2 τ1 + τ2 − τ1 − 2 τ1 τ2 + τ2 2 − 4 AK τ1 τ2 p2 = − 2 τ1 τ2 AERO 422, Instructor: Raktim Bhattacharya 4 / 31 P ...... I ..... PI ..... PD ...... PID ........ Routh Stability Criterion . + − y r P (s) = e C u y P Range for stabilization K > 0 A (τ1 s+1)(τ2 s+1) , C(s) =K Root Locus 1.5 Imaginary Axis (seconds−1) 1 s2 τ1 τ2 AK s 1 τ1 + τ2 0 0 s AK 0 0.5 Poles move towards each 2 2) other till K = K ∗ = (τ4τ1 −τ 1 τ2 A 0 K > K ∗ , poles are purely imaginary −0.5 −1 −1.5 −2.5 −2 −1.5 −1 Real Axis (seconds−1) −0.5 0 0.5 K > K ∗ , ωn ↑, ζ ↓ AERO 422, Instructor: Raktim Bhattacharya 5 / 31 P ...... I ..... PI ..... PD ...... PID ........ Proportional Control Steady State Error . r + − y e C u P y System P (s) = A , C(s) = Kp (τ1 s + 1)(τ2 s + 1) Transfer Function Gyr (s) := AKp PC = . 1 + PC τ1 τ2 s2 + (τ1 + τ2 )s + AKp + 1 Corresponding ODE τ1 τ2 ÿ + (τ1 + τ2 )ẏ + (AKp + 1)y = AKp r Steady state ÿ = ẏ = 0 =⇒ y(t) = AKp r(t). 1 + AKp AERO 422, Instructor: Raktim Bhattacharya 6 / 31 P ...... I ..... PI ..... PD ...... PID ........ Proportional Control Summary 1 Root Locus 1.5 0.9 0.8 1 Step Response 1.5 Amplitude 1 0.6 Mp Imaginary Axis (seconds−1) 0.7 0.5 0.5 0 0.4 −0.5 0.3 0.5 0.2 −1 0.1 0 0 2 4 6 8 10 Time 12 14 16 18 (a) Step Response K > K ∗ , ωn ↑, ζ ↓ tr = 1.8 ωn , ts = 4.6 σ 20 −1.5 −2.5 −2 −1.5 −1 −0.5 0 0.5 0 0 0.1 0.2 0.3 0.4 Real Axis (seconds−1) (b) Root Locus 0.5 0.6 0.7 0.8 0.9 1 ζ (c) Mp vs ζ Effect of Proportional Control Reduces rise time Good! Increases overshoot Bad! Large gain ⇒ small steady state error Amplifies noise and disturbances Bad! ▶ Look at frequency characteristics of all the transfer functions (later) AERO 422, Instructor: Raktim Bhattacharya 7 / 31 Integral Control P ...... I ..... PI ..... PD ...... PID ........ Integral Control . r + − y e C u P y C(s) = KI /s ∫ u(t) = KI t e(t) 0 Use Routh’s criterion to determine range for KI Verify if the system is stabilizable with C(s) = KI /s AERO 422, Instructor: Raktim Bhattacharya 9 / 31 P ...... I ..... PI ..... PD ...... PID ........ Second Order System . r + − y e u C P (s) = P y A (τ1 s+1)(τ2 s+1) , C(s) = KI /s Characteristic equation: τ1 τ2 s3 + (τ1 + τ2 )s2 + s + AKI Root Locus 2 1.5 s3 s2 s1 s0 Imaginary Axis (seconds−1) 1 0.5 0 −0.5 τ1 τ2 τ1 + τ2 τ1 +τ2 −AKI τ1 τ2 τ1 +τ2 AKI 1 AKI 0 0 −1 −1.5 −2 −2 0 < KI < −1.5 −1 −0.5 0 Real Axis (seconds−1) 0.5 1 1.5 2 τ1 + τ2 Aτ1 τ2 AERO 422, Instructor: Raktim Bhattacharya 10 / 31 P ...... I ..... PI ..... PD ...... PID ........ Integral Control Steady State Error . r + − y e C u P y System P (s) = A , C(s) = KI /s (τ1 s + 1)(τ2 s + 1) Transfer Function Gyr (s) := PC AKI = . 1 + PC τ1 τ2 s3 + (τ1 + τ2 )s2 + AKI Corresponding ODE ... τ1 τ2 y + (τ1 + τ2 )ÿ + AKI y = AKI r Steady state ... y = ÿ = 0 =⇒ y(t) = r(t). AERO 422, Instructor: Raktim Bhattacharya 11 / 31 P ...... I ..... PI ..... PD ...... PID ........ Integral Control Summary . r + − y e u C P y Root Locus KI ↑ =⇒ ζ ↓ =⇒ Mp ↑ 2 1.5 KI ↑ =⇒ ωn ↑ =⇒ tr ↓ Imaginary Axis (seconds−1) 1 KI > 0.5 unstable. Zero steady state error 0 −0.5 Needs anti windup mechanism for saturated actuators discussed later −1 −1.5 −2 −2 τ1 +τ2 Aτ1 τ2 −1.5 −1 −0.5 0 Real Axis (seconds−1) 0.5 1 1.5 2 Good disturbance rejection property read book AERO 422, Instructor: Raktim Bhattacharya 12 / 31 PI Control P ...... I ..... PI ..... PD ...... PID ........ Proportional-Integral Control . r + − y e C u P y System P (s) = ( ) A 1 , C(s) = K 1 + (τ1 s + 1)(τ2 s + 1) TI s TI is called the integral, or reset time 1/TI is reset rate, related to speed of response u(t) is a mixture of two signals ) ( ∫ t 1 e(t)dτ . u(t) = K e(t) + T I t0 u(t) ̸= 0 even when e(t) = 0, because of integral action AERO 422, Instructor: Raktim Bhattacharya 14 / 31 P ...... I ..... PI ..... PD ...... PID ........ Proportional-Integral Control Steady State Error . r + − y System e C u P y ( ) A 1 P (s) = , C(s) = K 1 + (τ1 s + 1)(τ2 s + 1) TI s Transfer Function PC AK(TI s + 1) Gyr (s) := = . 3 1 + PC TI τ1 τ2 s + TI (τ1 + τ2 )s2 + TI (1 + AK)s + AK Corresponding ODE ... (∗) y + (∗)ÿ + (∗)ẏ + AKy = AKr + (∗)ṙ Steady state ... y = ÿ = ẏ = ṙ = 0 =⇒ y(t) = r(t). AERO 422, Instructor: Raktim Bhattacharya 15 / 31 P ...... I ..... PI ..... PD ...... PID ........ Proportional-Integral Control Independent control over two of the three terms . r + − y e C u P y System ( ) A 1 P (s) = , C(s) = K 1 + (τ1 s + 1)(τ2 s + 1) TI s Transfer Function Gyr (s) := PC AK(TI s + 1) = . 3 1 + PC TI τ1 τ2 s + TI (τ1 + τ2 )s2 + TI (1 + AK)s + AK Characteristic Equation TI τ1 τ2 s3 + TI (τ1 + τ2 )s2 + TI (1 + AK)s + AK = 0. AERO 422, Instructor: Raktim Bhattacharya 16 / 31 P ...... I ..... PI ..... PD ...... PID ........ Proportional-Integral Control Two tuning variables . r + − y e u C P y Routh’s Table s3 s2 s1 s0 T I τ1 τ2 TI (τ1 + τ2 ) TI + AKTI − AKτ1 + AK AKτ1 2 τ1 +τ2 TI (AK + 1) AK 0 0 Constraints K > 0, TI > τ1 τ2 AK . 1 + AK τ1 + τ2 AERO 422, Instructor: Raktim Bhattacharya 17 / 31 Derivative Control P ...... I ..... PI ..... PD ...... PID ........ Derivative Control . r + − y e C u P y C(s) = KD s u(t) = KD ė(t) Use Routh’s criterion to determine range for KD Verify if the system is stabilizable with C(s) = KD s Almost never used by itself usually augmented by proportional control Derivative control is not causal depends on future values e(t + ∆t) − e(t) ė ≈ ∆t ▶ ▶ ▶ ▶ Knows the slope ← known from future values of e(t) e(t) = t, ė = 1. e(t) = t2 , ė = 2t. e(t) = sin(t), ė = cos(t) = sin(t + π/2). AERO 422, Instructor: Raktim Bhattacharya 19 / 31 P ...... I ..... PI ..... PD ...... PID ........ Approximate Derivative Control Approximation over Frequency range C(s) = KD s u(t) = KD ė(t) Not implementable in applications Approximate as KD s , α >> 1 pole at far left s/α + 1 ≈ KD s, for small s C(s) = What is the effect of this approximation? Look at a step response AERO 422, Instructor: Raktim Bhattacharya 20 / 31 P ...... I ..... PI ..... PD ...... PID ........ Approximate Derivative Control Effect of the Approximation Step Response 1.5 Amplitude 1 0.5 0 0 2 4 6 8 10 Time 12 14 16 18 20 e(t) = r(t) − y(t) = 1 − y(t) ė(t) = −ẏ(t) AERO 422, Instructor: Raktim Bhattacharya 21 / 31 P ...... I ..... PI ..... PD ...... PID ........ Approximate Derivative Control Effect of the Approximation (contd.) 0.6 True alp=1 alp=10 E r r or D e r i v at i v e 0.4 0.2 0 −0.2 −0.4 −0.6 −0.8 0 2 4 6 8 10 T im e 12 14 16 18 AERO 422, Instructor: Raktim Bhattacharya 20 22 / 31 P ...... I ..... PI ..... PD ...... PID ........ Proportional-Derivative Control . r + − y e C u y P Controller Structure ( C(s) = K 1 + TD s s/α + 1 s = KP + KD s/α + 1 ) Tune KP and KD to get desired response Use Routh’s table to determine range for stable values Derivative control increases damping reduces overshoot AERO 422, Instructor: Raktim Bhattacharya 23 / 31 PID Control P ...... I ..... PI ..... PD ...... PID ........ PID Control Basic Idea Controller Structure C(s) = KP + KI s + KD s s/α + 1 Tune KP , KI and KD to get desired response Use Routh’s table to determine range for stable values Proportional term increases ωn and decreases ζ. ▶ ▶ Improves rise time Needs large gain to reduce steady-state error Integral term increases ωn and decreases ζ. ▶ ▶ Zero steady-state May make the system unstable Derivative control increases damping – reduces overshoot and oscillations AERO 422, Instructor: Raktim Bhattacharya 25 / 31 P ...... I ..... PI ..... PD ...... PID ........ PID Control Example System 1 + 0.5s + 1 Study behavior of this system with various control strategies. P (s) = s2 Proportional (P) Proportional Integral (PI) Proportional Derivative (PD) Proportional Integral and Derivative (PID) AERO 422, Instructor: Raktim Bhattacharya 26 / 31 P ...... I ..... PI ..... PD ...... PID ........ PID Control Amplitude Example: P 2 Amplitude 0 Amplitude 0 5 10 15 Time (seconds) 20 25 2 Open Loop K=2 1 0 0 5 10 15 Time (seconds) 20 25 30 2 Open Loop K=10 1 0 Amplitude Open Loop K=1 1 0 5 10 15 Time (seconds) 20 25 2 Open Loop K=50 1 0 0 5 10 15 Time (seconds) 20 25 AERO 422, Instructor: Raktim Bhattacharya 27 / 31 P ...... I ..... PI ..... PD ...... PID ........ PID Control Example: PI Step Response 1.4 P I PI 1.2 Amplitude 1 0.8 0.6 0.4 0.2 0 0 5 10 15 20 Time (seconds) 25 30 35 40 AERO 422, Instructor: Raktim Bhattacharya 28 / 31 P ...... I ..... PI ..... PD ...... PID ........ PID Control Amplitude Example: PI (contd.) 1.5 Amplitude 0 Amplitude 0 5 10 15 20 25 30 Time (seconds) 35 40 45 50 1.5 Open Loop Kp=2 Kp=2, Ki = 1 1 0.5 0 0 10 20 30 40 Time (seconds) 50 60 70 2 Open Loop Kp=10 Kp=10, Ki = 5 1 0 Amplitude Open Loop Kp=1 Kp=1, Ki = 0.5 1 0.5 0 50 100 150 Time (seconds) 200 250 2 Open Loop Kp=50 Kp=50, Ki = 25 1 0 0 200 400 600 Time (seconds) 800 1000 1200 AERO 422, Instructor: Raktim Bhattacharya 29 / 31 P ...... I ..... PI ..... PD ...... PID ........ PID Control Example: PD Step Response 1.5 Open loop P D PD Amplitude 1 0.5 0 0 2 4 6 8 10 12 Time (seconds) 14 16 18 20 AERO 422, Instructor: Raktim Bhattacharya 30 / 31 P ...... I ..... PI ..... PD ...... PID ........ PID Control Example: PID Step Response 1.5 Open loop PID P PD Amplitude 1 0.5 0 0 2 4 6 8 10 12 Time (seconds) 14 16 18 20 AERO 422, Instructor: Raktim Bhattacharya 31 / 31