EE 3CL4, §7 1 / 17 Tim Davidson PID Control EE3CL4: Introduction to Linear Control Systems Section 7: PID Control Tim Davidson McMaster University Winter 2019
EE 3CL4, §7 2 / 17 Outline Tim Davidson PID Control PID Control 1
EE 3CL4, §7 4 / 17 Cascade compensation Tim Davidson PID Control • Throughout this lecture we consider the case of H ( s ) = 1. • We have looked at using • lead compensators to improve the transient performance of a closed loop • lag compensators to improve the steady state error responses without changing the closed loop transient response too much. • What if we wanted to do both? What did we do?
EE 3CL4, §7 5 / 17 Lead-lag compensation Tim Davidson PID Control • Apply lead design techniques to G ( s ) to adjust the closed loop transient response • Then apply lag design techniques to G C , lead ( s ) G ( s ) to improve steady state error response without changing the closed loop transient response too much • Resulting compensator: G C ( s ) = G C , lag ( s ) G C , lead ( s ) = K C , lag K C , lead ( s + z lag )( s + z lead ) ( s + p lag )( s + p lead ) • How can we gain insight into what the compensator is doing?
EE 3CL4, §7 6 / 17 Lead-lag approximation Tim Davidson • G C , lag ( s ) G C , lead ( s ) = K C , lag K C , lead ( s + z lag )( s + z lead ) PID Control ( s + p lag )( s + p lead ) • Recall that • for frequencies between z lead and p lead , lead compensator acts like a differentiator • for frequencies between p lag and z lag , lag compensator acts like an integrator • Rewrite: ˜ K C , ll ( s + z lag )( s + z lead ) G C , lag ( s ) G C , lead ( s ) = ( s + p lag )( 1 + s / p lead ) • as p lead gets big, and p lag gets small this starts to look like ˜ K C , ll ( s + z lag )( s + z lead ) G C , lag ( s ) G C , lead ( s ) ≈ s for the values of s that are of greatest interest. • Not physically realizable (more zeros than poles), but helpful approximation
EE 3CL4, §7 7 / 17 Lead-lag to PID Tim Davidson PID Control ˜ K C , ll ( s + z lag )( s + z lead ) G C , lag ( s ) G C , lead ( s ) ≈ s • Do a partial fraction on RHS and you get G C , lag ( s ) G C , lead ( s ) ≈ K P + K I s + K D s • With H ( s ) = 1, input to the compensator is e ( t ) = r ( t ) − y ( t ) • Compensator output: u ( t ) = L − 1 � � G C , lag ( s ) G C , lead ( s ) E ( s ) � e ( t ) dt + K D de ( t ) = ⇒ u ( t ) ≈ K P e ( t ) + K I dt • That is, (approximately) PID control
EE 3CL4, §7 8 / 17 Variants of PID control Tim Davidson PID Control PID: G c ( s ) = K P + K I / s + K D s . • With K D = 0 we have a PI controller, G PI ( s ) = ˆ K P + ˆ K I / s . • With K I = 0 we have a PD controller, G PD ( s ) = ¯ K P + ¯ K D s . • As implicit in our derivation, a PID controller can be realized as the cascade of a PI controller and a PD controller; i.e., G PI ( s ) G PD ( s ) can be written as K P + K I / s + K D s
EE 3CL4, §7 9 / 17 PID control and root locus Tim Davidson PID Control • Transfer function of idealized PID controller: G C ( s ) = K P + K I / s + K D s = K D ( s + z 1 )( s + z 2 ) s • That is, controller adds two zeros and a pole to the open loop transfer function • The pole is at the origin • The zeros can be arbitrary real numbers, or an arbitrary complex conjugate pair • This provides considerable flexibility in re-shaping the root locus
EE 3CL4, §7 10 / 17 PID Tuning Tim Davidson PID Control with G c ( s ) = K P + K I / s + K D s . • How should we choose K P , K I and K D ? • Can formulate as a optimization problem; e.g., Find K P , K I and K D that minimize the settling time, subject to • the damping ratio being greater than ζ min , • the position and velocity error constants being greater than K posn , min and K v , min , • the error constant for a step disturbance being greater than K dist,posn , min , • and the loop being stable • Typically difficult to find the optimal solution • Many ad-hoc techniques that usually find “good” solutions have been proposed.
EE 3CL4, §7 11 / 17 Zeigler–Nichols Tuning Tim Davidson PID Control • Two well established methods for finding a “good” solution in some common scenarios • Often useful in practice because they can be applied to cases in which the model has to be measured (no analytic transfer function) • We will look at the “ultimate gain” method • This is based on the step response of the system • However, the method is only suitable for a certain class of systems and a certain class of design goals • You need to make sure that the system you wish to control falls into an appropriate class. • You also need to ensure that the ZN tuning goals match your design goals. The ZN tuning scheme gives considerable weight to the response to disturbances
EE 3CL4, §7 12 / 17 “Ultimate Gain” Zeigler–Nichols Tim Davidson Tuning PID Control 1 Set K I and K D to zero. 2 Increase K P until the system is marginally stable (Poles on the j ω -axis) 3 The value of this gain is the “ultimate gain”, K U 4 The period of the sustained oscillations is called the “ultimate period”, T U (or P U ). (The position of the poles on the j ω -axis is 2 π/ T U ) 5 The gains are then chosen using the following table
EE 3CL4, §7 13 / 17 “Ultimate Gain” Zeigler–Nichols Tim Davidson Tuning PID Control
EE 3CL4, §7 14 / 17 Manual refinement Tim Davidson PID Control • One way in which the design can be improved, is searching for “nearby” gains that improve the performance • The following table provides guidelines for that local search. These are appropriate for a broad class of systems
EE 3CL4, §7 15 / 17 Example Tim Davidson PID Control √ 1 G ( s ) = s ( s + b )( s + 2 ζω n ) , with b = 10, ζ = 1 / 2 and ω n = 4. • Step 2: Plot root locus of G ( s ) to find K U and T U • Step 3: K U = 885 . 5, • Step 4: marginally stable poles: ± j 7 . 5; ⇒ T U = 0 . 83s • Step 5: K P = 521 . 3, K I = 1280 . 2, K D = 55 . 1
EE 3CL4, §7 16 / 17 Example Tim Davidson Step response of ZN tuned closed loop, PID Control K P = 521 . 3, K I = 1280 . 2, K D = 55 . 1
EE 3CL4, §7 17 / 17 Example Tim Davidson Step response with manually modified gains, PID Control K P = 370, K I = 100, K D = 60
Recommend
More recommend