STADIUS - Center for Dynamical Systems, Signal Processing and Data Analytics PID controllers Lecture 18 Systems and Control Theory
STADIUS - Center for Dynamical Systems, Signal Processing and Data Analytics What is a PID controller? A proportional-integral-derivative controller (PID controller) is a control loop feedback mechanism (controller) widely used in process industry. Continuous-time text book equation: 𝑢 𝑒𝑓 𝑢 𝑣 𝑢 = 𝐿 𝑞 𝑓 𝑢 + 𝐿 𝑗 𝑓 𝜐 𝑒𝜐 + 𝐿 𝑒 𝑒𝑢 0 Proportional Integral Derivative Action Action Action Note: 90% (or more) of control loops in industry are PID Systems and Control Theory 2
STADIUS - Center for Dynamical Systems, Signal Processing and Data Analytics What is a PID controller? A proportional action 𝑣 𝑞 (𝑢) = 𝐿 𝑞 𝑓(𝑢) will have the effect of reducing the rise time and will reduce but never eliminate the steady-state error (unless the model of the plant has a pole at 𝑡 = 0 or 𝑨 = 1 ). 𝑢 𝑓 𝜐 𝑒𝜐 will have the effect of An integral action 𝑣 𝑗 (𝑢) = 𝐿 𝑗 0 eliminating the steady-state error for a constant or step input, but it may make the transient response slower. 𝑒𝑓 𝑢 A derivative action 𝑣 𝑒 (𝑢) = 𝐿 𝑒 will have the effect of 𝑒𝑢 increasing the stability of the system, reducing the overshoot, and improving the transient response. But it has the drawback of amplifying the noise present in the error signal. Systems and Control Theory 3
STADIUS - Center for Dynamical Systems, Signal Processing and Data Analytics Analog and Digital formulations Proportional Control The discrete implementation of proportional control is identical to the continuous one. The continuous is 𝑉 𝑞 (𝑡) 𝑣 𝑞 𝑢 = 𝐿 𝑞 𝑓 𝑢 → 𝐹(𝑡) = 𝐿 𝑞 and the discrete is 𝑉 𝑞 (𝑨) 𝑣 𝑞 𝑙 = 𝐿 𝑞 𝑓 𝑙 → 𝐹(𝑨) = 𝐿 𝑞 where 𝑓(𝑢) or e(𝑙) is the error signal. Systems and Control Theory 4
STADIUS - Center for Dynamical Systems, Signal Processing and Data Analytics Analog and Digital formulations Derivative Control The continuous-time Integral control is 𝑒𝑓(𝑢) 𝑉 𝑒 (𝑡) 𝑣 𝑒 𝑢 = 𝐿 𝑒 𝑓 𝑢 → 𝐹(𝑡) = 𝐿 𝑒 𝑡 𝑒𝑢 The discrete-time derivative control is 1 − 𝑨 −1 𝑓 𝑙 − 𝑓(𝑙 − 1) → 𝑉 𝑒 (𝑨) 𝑨 − 1 𝑣 𝑒 𝑙 = 𝐿 𝑒 𝐹(𝑨) = 𝐿 𝑒 = 𝐿 𝑒 𝑈 𝑈 𝑈𝑨 where 𝑈 is the sampling time. Systems and Control Theory 5
STADIUS - Center for Dynamical Systems, Signal Processing and Data Analytics Analog and Digital formulations Integral Control The continuous-time integral control is 𝑢 𝑉 𝑗 (𝑡) 1 𝑣 𝑗 𝑢 = 𝐿 𝑗 𝑓 𝜐 𝑒𝜐 → 𝐹(𝑡) = 𝐿 𝑗 𝑡 0 The discrete-time integral control is 𝑉 𝑗 (𝑨) 1 − 𝑨 −1 = 𝐿 𝑗 𝑈𝑨 𝐿 𝑗 𝑈 𝑣 𝑗 𝑙 = 𝑣 𝑗 𝑙 − 1 + 𝐿 𝑗 𝑈𝑓(𝑙) → 𝐹(𝑨) = 𝑨 − 1 where 𝑈 is the sampling time. Systems and Control Theory 6
STADIUS - Center for Dynamical Systems, Signal Processing and Data Analytics Analog and Digital formulations Digital PID controller (conventional version) 𝑣 𝑙 = 𝐿 𝑞 𝑓 𝑙 + 𝐿 𝑒 𝑓 𝑙 − 𝑓(𝑙 − 1) + 𝑣 𝑗 𝑙 𝑈 𝑣 𝑗 𝑙 = 𝑣 𝑗 𝑙 − 1 + 𝐿 𝑗 𝑈𝑓(𝑙) 𝑉(𝑨) 𝑨 − 1 + 𝐿 𝑒 𝑨 𝑈 ∙ 𝑨 − 1 𝐹(𝑨) = 𝐿 𝑞 + 𝐿 𝑗 𝑈 ∙ 𝑨 𝐿 𝑒 𝑈 , are the new integral and derivative gains where 𝐿 𝑗 𝑈, Digital PI controller Digital PD controller 𝑉(𝑨) 𝑨 𝑉(𝑨) 𝐹(𝑨) = 𝐿 𝑞 + 𝐿 𝑒 𝑈 ∙ 𝑨 − 1 𝐹(𝑨) = 𝐿 𝑞 + 𝐿 𝑗 𝑈 ∙ 𝑨 − 1 𝑨 Systems and Control Theory 7
STADIUS - Center for Dynamical Systems, Signal Processing and Data Analytics Analog and Digital formulations Digital PID controller (alternative version) If we discretize the continuous-time (analog) PID controller using the bilinear transformation, 𝑉(𝑨) 𝐿 𝑞 + 𝐿 𝑗 𝐹(𝑨) = 𝑡 + 𝐿 𝑒 𝑡 𝑡=2 𝑨−1 𝑈 𝑨+1 we obtain an alternative form for a digital PID controller = 𝛽 2 𝑨 2 + 𝛽 1 𝑨 + 𝛽 0 𝑉(𝑨) 𝐹(𝑨) = 𝐿 𝑞 + 𝐿 𝑗 𝑈 𝑨 + 1 + 2𝐿 𝑒 𝑨 − 1 2 𝑨 − 1 𝑈 𝑨 + 1 (𝑨 − 1)(𝑨 + 1) where 𝛽 0 , 𝛽 1 , and 𝛽 2 are design parameters. Systems and Control Theory 8
STADIUS - Center for Dynamical Systems, Signal Processing and Data Analytics Analog and Digital formulations PID Math Demystified https://www.youtube.com/watch?v=JEpWlTl95Tw Systems and Control Theory 9
STADIUS - Center for Dynamical Systems, Signal Processing and Data Analytics Analog Implementation The key building block is the operational amplifier (op-amp). Manual Output Adjust 𝐿 𝑞 𝐿 𝑗 reverse direct Voltmeters 𝐿 𝑒 PV – Process Variable 𝑧(𝑢) SP – Setpoint 𝑠 𝑢 Output – Control action 𝑣(𝑢) Systems and Control Theory 10
STADIUS - Center for Dynamical Systems, Signal Processing and Data Analytics Analog Implementation Analog PID controller: FOXBORO 62H-4E-OH M/62H Systems and Control Theory 11
STADIUS - Center for Dynamical Systems, Signal Processing and Data Analytics Analog Implementation Analog PI Motor Speed Control https://www.youtube.com/watch?v=6W3PLiVIcmE Systems and Control Theory 12
STADIUS - Center for Dynamical Systems, Signal Processing and Data Analytics Digital Implementation The difference equations describing a digital PID are typically implemented in a microcontroller or in an FPGA (field-programmable gate array) device. Difference equations 𝑣 𝑙 = 𝐿 𝑞 𝑓 𝑙 + 𝐿 𝑒 𝑓 𝑙 − 𝑓(𝑙 − 1) + 𝑣 𝑗 𝑙 𝑈 𝑣 𝑗 𝑙 = 𝑣 𝑗 𝑙 − 1 + 𝐿 𝑗 𝑈𝑓(𝑙) Pseudocode previous_error = 0 integral = 0 Start: error = setpoint – measured_value proportional = Kp*error integral = integral + Ki*sampling_time*error derivative = Kd*(error – previous_error) /sampling_time output = proporcional + integral + derivative previous_error = error wait (samplig_time) goto Start Systems and Control Theory 13
STADIUS - Center for Dynamical Systems, Signal Processing and Data Analytics Digital Implementation Digital PIDs PLC (Programmable logic controller) with a digital PID control module Systems and Control Theory 14
STADIUS - Center for Dynamical Systems, Signal Processing and Data Analytics Digital Implementation What is a PLC? Basics of PLCs https://www.youtube.com/watch?v=iWgHqqunsyE Systems and Control Theory 15
STADIUS - Center for Dynamical Systems, Signal Processing and Data Analytics PID Tuning Manual Tuning The effects of each of the controller parameters, 𝐿 𝑞 , 𝐿 𝑗 and 𝐿 𝑒 on a closed-loop system are summarized in the table below. Closed-Loop Response PID gains Rise Time Overshoot Settling time Steady-state error 𝐿 𝑞 ↑ Decrease Increase Small Change Decrease 𝐿 𝑗 ↑ Decrease Increase Increase Eliminate 𝐿 𝑒 ↑ Small change Decrease Decrease No change Note: Keep in mind that changing one of the PID gains can change the effect of the other two. For this reason, this table should only be used as a reference when you are determining the values for 𝐿 𝑞 , 𝐿 𝑗 and 𝐿 𝑒 . Systems and Control Theory 16
STADIUS - Center for Dynamical Systems, Signal Processing and Data Analytics PID Tuning Manual Tuning One possible way is as follows (the controller is connected to the plant): Set 𝐿 𝑗 and 𝐿 𝑒 equal to 0. Increase 𝐿 𝑞 until you observe that the step response is fast enough and the steady-state error is small. Start adding some integral action in order to get rid of the steady state error. Keep in mind that too much 𝐿 𝑗 can cause instability. Add some derivative action in order to quickly react to disturbances and/or dampen the response. Systems and Control Theory 17
STADIUS - Center for Dynamical Systems, Signal Processing and Data Analytics PID Tuning Heuristic Methods : Ziegler – Nichols method tuning rule Set the integral and derivative gains to zero ( 𝐿 𝑗 = 𝐿 𝑒 = 0 ) Increase the proportional gain 𝐿 𝑞 until the output of the control loop starts oscillating with a constant amplitude. The value of 𝐿 𝑞 at this point is referred to as ultimate gain ( 𝐿 𝑞 = 𝐿 𝑣 ). Measure the period of the oscillations at 𝑈 𝑣 the output of the closed-loop system. Use 𝐿 𝑣 and 𝑈 𝑣 to determine the gains of the PID controller according to the following tuning rule table: Systems and Control Theory 18
STADIUS - Center for Dynamical Systems, Signal Processing and Data Analytics PID Tuning Heuristic Methods : Ziegler – Nichols method tuning rule 𝑳 𝒒 𝑳 𝒋 𝑳 𝒆 Control Type 0.5𝐿 𝑣 P - - 0.45𝐿 𝑣 1.2𝐿 𝑞 /𝑈 PI - 𝑣 0.8𝐿 𝑣 𝐿 𝑞 𝑈 𝑣 /8 PD - 0.6𝐿 𝑣 2𝐿 𝑞 /𝑈 𝐿 𝑞 𝑈 𝑣 /8 PID 𝑣 0.7𝐿 𝑣 2.5𝐿 𝑞 /𝑈 3𝐿 𝑞 𝑈 𝑣 /20 Pessen Integral Rule 𝑣 0.33𝐿 𝑣 2𝐿 𝑞 /𝑈 𝐿 𝑞 𝑈 𝑣 /3 Some overshoot 𝑣 0.2𝐿 𝑣 2𝐿 𝑞 /𝑈 𝐿 𝑞 𝑈 𝑣 /3 No overshoot 𝑣 Note: Keep in mind that we are working with heuristic tuning rules, and therefore some additional fine tuning might be necessary. Systems and Control Theory 19
Recommend
More recommend