Lead Compensator and PID Control Associate Prof. Dr. of Mechatronics Engineeering Çankaya University Compulsory Course in Electronic and Communication Engineering Credits (2/2/3) Course Webpage: http://ece388.cankaya.edu.tr Lead Compensator: Usage Goal Reshape frequency response curve to give additional phase lead in order to increase the phase margin Starting Point Task Plant transfer function G(s) Lead compensator transfer function C(s) = K α Desired phase margin Φ m Steady-state error e Determine the parameters K α, α and T 1 + T s 1 + α T s
Lead Compensator: Transfer Function Time-constant Representation Explanation C(s) = K α Attenuation factor < α < 1 Gain K α Pole at s = 1 α T Zero at s = 1 T Remarks 1 + T s 1 + α T s Phase increase (lead) up to a maximum value of sin(ϕ α ) = 1 α 1+α Frequency of maximum phase lead at ω α = 1 α T Magnitude at ω α is C(jω α ) = 1 α > 1 Lead Compensator: Bode Plot 4 Bode Diagram C(s) = 1 1+s 1+.1 s Magnitude (db) 35 3 25 2 6 Phase (deg) 3 1 2 1 1 1 1 1 1 2 1 3 Frequency (rad/s)
Lead Compensator: Procedure 1 Determine the gain K α to achieve the static error specification 2 Draw a Bode plot of K α G(jω) and determine the phase margin Φ m 3 Determine the required lead angle ϕ α = Φ m Φ m + 1 α = 1 sin(ϕ α) 1 + sin(ϕ α ) 4 Choose the gain crossover frequency ω g such that K α G(jω g ) db = 2 log( 1 α ) Choose ω α = ω g 5 Evaluate ω α = 1 α T T = 1 ω α α 6 Verify if the design fulfills the specified requirements. Go back to step 3. if the requirements are not fulfilled Lead Compensator: Example Computation Gap 1
Lead Compensator: Example Computation Gap 2 Lead Compensator: Example 4 Bode Diagram Magnitude (db) 2 2 Phase (deg) 4 45 45 9 135 18 1 1 1 1 2 Frequency (rad/s)
PID Controller: Characteristics Gap 3 Ordinary Differential Equation (ODE) u = K p (e + 1 T I e + T D ė) Transfer Function (TF) U(s) = K p (E(s) + 1 T I s E(s) + T D s E(s) = K p (1 + 1 T I s + T D s) E(s) PID Controller: Parameters Proportional Action: K p e Depends on instantaneous value of error Can control any stable plant but usually with low performance Integral Action: K p e T I Realizes memory due to dependency on accumulated error Enforces steady state error of lim t e(t) = Derivative Action: K p T D ė Captures trend of the error due to dependency on rate of change of e Susceptible to amplification of high-frequency disturbances/noise PID-controller design requires appropriate assignment of the three parameters K p, T I and T D
PID Controller: Parameters Illustration Gap 4 PID Controller: Special Cases P-Controller C(s) = K p PI-Controller PD-Controller C(s) = K p (1 + 1 T I s ) C(s) = K p (1 + T D s) Design Task Determine the most suitable controller type and the controller parameters K p, T I and T D in order to fulfill given performance specifications
Ziegler-Nichols: Oscillation Method Assumption Stable, non-oscillatory plant: G(s) = K excluding first-order/second-order lag Note: plant is not modeled! e sτ (1 + st 1 ) (1 + st n ) Practical Experiment Start with K p = and increase K p gradually until y oscillates Critical gain K crit Note oscillation period T crit Control Loop with P-control Gap 5 Ziegler-Nichols: Oscillation Method PID-controller Parameters Controller K p T I T D P-.5K crit PI-.45K crit.85t crit PID-.6K crit.5t crit.12t crit Example (temperature control) Results Stable closed loop Addresses both reference tracking and disturbance rejection outdoors (θ O ) boiler (θ B ) pump temperature (θ) furnace (u F ) radiator (θ R )
Ziegler-Nichols: Oscillation Method Uncontrolled Plant Step Response Oscillation Experiment 15 2.5 critical gain K crit =4.842 2 temperature change [ C] 1 5 temperature change [ C] 1.5 1.5 input step response disturbance step response 5 1 15 time [min] T crit.5 5 1 15 time [min] Ziegler-Nichols: Example Computation Gap 6
Ziegler-Nichols: Oscillation Method Reference Step Response Disturbance Step Response 5 4.5 4 P control PI control PID control.3.25 P control PI control PID control 3.5.2 3.15 2.5 2.1 1.5.5 1.5 1 2 3 4 5.5 1 2 3 4 5 Nonzero static position error with P-control Larger overshoot for PI and PID control due to plant delay Similar dynamics for reference tracking and disturbance rejection Ziegler-Nichols: Reaction Curve Method Assumption Stable, non-oscillatory plant: G(s) = K K excluding G(s) = 1 + st 1 Note: plant is not modeled! Practical Experiment Approach desired set-point Apply small step input Record plant output: process reaction curve e sτ (1 + st 1 ) (1 + st n ) Step Response in Open Loop Gap 7
Ziegler-Nichols: Reaction Curve Method Characteristic Plant Parameters Gap 8 PID-controller Parameters Controller K p T I T D P- 1/K T /τ PI-.9/K T /τ 3.33τ PID- 1.2/K T /τ 2τ.5τ Ziegler-Nichols: Oscillation Method Reference Step Response Disturbance Step Response 6 5 4 P control PI control PID control.3.25.2 P control PI control PID control 3.15.1 2.5 1 1 2 3 4 5.5 1 2 3 4 5 Similar behavior to Ziegler-Nichols Oscillation Method