Titulo - Title

4m ago
25 Views
0 Downloads
1.17 MB
23 Pages
Transcription

STADIUS - Center for Dynamical Systems,Signal Processing and Data AnalyticsPID controllersLecture 18Systems and Control Theory

STADIUS - Center for Dynamical Systems,Signal Processing and Data AnalyticsWhat is a PID controller?A proportional-integral-derivative controller (PID controller) is a controlloop feedback mechanism (controller) widely used in process industry.Continuous-time text book equation:𝑡𝑑𝑒 𝑡𝑢 𝑡 𝐾𝑝 𝑒 𝑡 𝐾𝑖 𝑒 𝜏 𝑑𝜏 erivativeActionNote: 90% (or more) of control loops in industry are PIDSystems and Control Theory2

STADIUS - Center for Dynamical Systems,Signal Processing and Data AnalyticsWhat is a PID controller? A proportional action 𝑢𝑝 (𝑡) 𝐾𝑝 𝑒(𝑡) will have the effect ofreducing the rise time and will reduce but never eliminate thesteady-state error (unless the model of the plant has a pole at 𝑠 0 or 𝑧 1).𝑡 An integral action 𝑢𝑖 (𝑡) 𝐾𝑖 0 𝑒 𝜏 𝑑𝜏 will have the effect ofeliminating the steady-state error for a constant or step input, but itmay make the transient response slower.𝑑𝑒 𝑡 A derivative action 𝑢𝑑 (𝑡) 𝐾𝑑will have the effect of𝑑𝑡increasing the stability of the system, reducing the overshoot, andimproving the transient response. But it has the drawback ofamplifying the noise present in the error signal.Systems and Control Theory3

STADIUS - Center for Dynamical Systems,Signal Processing and Data AnalyticsAnalog and Digital formulationsProportional ControlThe discrete implementation of proportional control is identical to thecontinuous one. The continuous is𝑢𝑝 𝑡 𝐾𝑝 𝑒 𝑡𝑈𝑝 (𝑠) 𝐾𝑝𝐸(𝑠)and the discrete is𝑢𝑝 𝑘 𝐾𝑝 𝑒 𝑘𝑈𝑝 (𝑧) 𝐾𝑝𝐸(𝑧)where 𝑒(𝑡) or e(𝑘) is the error signal.Systems and Control Theory4

STADIUS - Center for Dynamical Systems,Signal Processing and Data AnalyticsAnalog and Digital formulationsDerivative ControlThe continuous-time Integral control is𝑑𝑒(𝑡)𝑢𝑑 𝑡 𝐾𝑑𝑒 𝑡𝑑𝑡𝑈𝑑 (𝑠) 𝐾𝑑 𝑠𝐸(𝑠)The discrete-time derivative control is𝑒 𝑘 𝑒(𝑘 1)𝑈𝑑 (𝑧)1 𝑧 1𝑧 1𝑢𝑑 𝑘 𝐾𝑑 𝐾𝑑 𝐾𝑑𝑇𝐸(𝑧)𝑇𝑇𝑧where 𝑇 is the sampling time.Systems and Control Theory5

STADIUS - Center for Dynamical Systems,Signal Processing and Data AnalyticsAnalog and Digital formulationsIntegral ControlThe continuous-time integral control is𝑡𝑈𝑖 (𝑠)1𝑢𝑖 𝑡 𝐾𝑖 𝑒 𝜏 𝑑𝜏 𝐾𝑖𝐸(𝑠)𝑠0The discrete-time integral control is𝑈𝑖 (𝑧)𝐾𝑖 𝑇𝐾𝑖 𝑇𝑧𝑢𝑖 𝑘 𝑢𝑖 𝑘 1 𝐾𝑖 𝑇𝑒(𝑘) 1𝐸(𝑧) 1 𝑧𝑧 1where 𝑇 is the sampling time.Systems and Control Theory6

STADIUS - Center for Dynamical Systems,Signal Processing and Data AnalyticsAnalog and Digital formulationsDigital PID controller (conventional version)𝐾𝑑𝑢 𝑘 𝐾𝑝 𝑒 𝑘 𝑒 𝑘 𝑒(𝑘 1) 𝑢𝑖 𝑘𝑇𝑢𝑖 𝑘 𝑢𝑖 𝑘 1 𝐾𝑖 𝑇𝑒(𝑘)𝑈(𝑧)𝑧𝐾𝑑 𝑧 1 𝐾𝑝 𝐾𝑖 𝑇 𝐸(𝑧)𝑧 1 𝑇𝑧where 𝐾𝑖 𝑇,𝐾𝑑𝑇,are the new integral and derivative gainsDigital PI controllerDigital PD controller𝑈(𝑧)𝑧 𝐾𝑝 𝐾𝑖 𝑇 𝐸(𝑧)𝑧 1𝑈(𝑧)𝐾𝑑 𝑧 1 𝐾𝑝 𝐸(𝑧)𝑇𝑧Systems and Control Theory7

STADIUS - Center for Dynamical Systems,Signal Processing and Data AnalyticsAnalog and Digital formulationsDigital PID controller (alternative version)If we discretize the continuous-time (analog) PID controller using thebilinear transformation,𝑈(𝑧)𝐾𝑖 𝐾𝑝 𝐾𝑑 𝑠𝐸(𝑧)𝑠2 𝑧 1𝑠 𝑇 𝑧 1we obtain an alternative form for a digital PID controller𝑈(𝑧)𝐾𝑖 𝑇 𝑧 12𝐾𝑑 𝑧 1𝛼2 𝑧 2 𝛼1 𝑧 𝛼0 𝐾𝑝 𝐸(𝑧)2 𝑧 1𝑇 𝑧 1(𝑧 1)(𝑧 1)where 𝛼0 , 𝛼1 , and 𝛼2 are design parameters.Systems and Control Theory8

STADIUS - Center for Dynamical Systems,Signal Processing and Data AnalyticsAnalog and Digital formulationsPID Math Demystifiedhttps://www.youtube.com/watch?v JEpWlTl95TwSystems and Control Theory9

STADIUS - Center for Dynamical Systems,Signal Processing and Data AnalyticsAnalog ImplementationThe key building block is the operational amplifier (op-amp).Manual Output PV – Process Variable 𝑦(𝑡)SP – Setpoint 𝑟 𝑡Output – Control action 𝑢(𝑡)Systems and Control Theory10

STADIUS - Center for Dynamical Systems,Signal Processing and Data AnalyticsAnalog ImplementationAnalog PID controller:FOXBORO 62H-4E-OH M/62HSystems and Control Theory11

STADIUS - Center for Dynamical Systems,Signal Processing and Data AnalyticsAnalog ImplementationAnalog PI Motor Speed Controlhttps://www.youtube.com/watch?v 6W3PLiVIcmESystems and Control Theory12

STADIUS - Center for Dynamical Systems,Signal Processing and Data AnalyticsDigital ImplementationThe difference equations describing a digital PID are typically implemented ina microcontroller or in an FPGA (field-programmable gate array) device.Difference equationsPseudocode𝐾𝑑𝑢 𝑘 𝐾𝑝 𝑒 𝑘 𝑒 𝑘 𝑒(𝑘 1) 𝑢𝑖 𝑘𝑇𝑢𝑖 𝑘 𝑢𝑖 𝑘 1 𝐾𝑖 𝑇𝑒(𝑘)previous error 0integral 0Start:error setpoint – measured valueproportional Kp*errorintegral integral Ki*sampling time*errorderivative Kd*(error – previous error) /sampling timeoutput proporcional integral derivativeprevious error errorwait (samplig time)goto StartSystems and Control Theory13

STADIUS - Center for Dynamical Systems,Signal Processing and Data AnalyticsDigital ImplementationDigital PIDsPLC (Programmable logic controller)with a digital PID control moduleSystems and Control Theory14

STADIUS - Center for Dynamical Systems,Signal Processing and Data AnalyticsDigital ImplementationWhat is a PLC? Basics of PLCshttps://www.youtube.com/watch?v iWgHqqunsyESystems and Control Theory15

STADIUS - Center for Dynamical Systems,Signal Processing and Data AnalyticsPID TuningManual TuningThe effects of each of the controller parameters, 𝐾𝑝 , 𝐾𝑖 and 𝐾𝑑 on aclosed-loop system are summarized in the table below.PID gainsClosed-Loop ResponseRise TimeOvershootSettling timeSteady-state error𝐾𝑝 DecreaseIncreaseSmall ChangeDecrease𝐾𝑖 DecreaseIncreaseIncreaseEliminate𝐾𝑑 Small changeDecreaseDecreaseNo changeNote: Keep in mind that changing one of the PID gains can change theeffect of the other two. For this reason, this table should only be usedas a reference when you are determining the values for 𝐾𝑝 , 𝐾𝑖 and 𝐾𝑑 .Systems and Control Theory16

STADIUS - Center for Dynamical Systems,Signal Processing and Data AnalyticsPID TuningManual TuningOne possible way is as follows (the controller is connected to theplant): Set 𝐾𝑖 and 𝐾𝑑 equal to 0. Increase 𝐾𝑝 until you observe that the step response is fast enoughand the steady-state error is small. Start adding some integral action in order to get rid of the steadystate error. Keep in mind that too much 𝐾𝑖 can cause instability. Add some derivative action in order to quickly react to disturbancesand/or dampen the response.Systems and Control Theory17

STADIUS - Center for Dynamical Systems,Signal Processing and Data AnalyticsPID TuningHeuristic Methods : Ziegler–Nichols method tuning rule Set the integral and derivative gains to zero (𝐾𝑖 𝐾𝑑 0 ) Increase the proportional gain 𝐾𝑝 until the output of the controlloop starts oscillating with a constant amplitude. The value of 𝐾𝑝 atthis point is referred to as ultimate gain (𝐾𝑝 𝐾𝑢 ). Measure the period of the oscillations at 𝑇𝑢 the output of theclosed-loop system. Use 𝐾𝑢 and 𝑇𝑢 to determine the gains of the PID controlleraccording to the following tuning rule table:Systems and Control Theory18

STADIUS - Center for Dynamical Systems,Signal Processing and Data AnalyticsPID TuningHeuristic Methods : Ziegler–Nichols method tuning ruleControl 𝑢1.2𝐾𝑝 /𝑇𝑢-PD0.8𝐾𝑢-𝐾𝑝 𝑇𝑢 /8PID0.6𝐾𝑢2𝐾𝑝 /𝑇𝑢𝐾𝑝 𝑇𝑢 /8Pessen Integral Rule0.7𝐾𝑢2.5𝐾𝑝 /𝑇𝑢3𝐾𝑝 𝑇𝑢 /20Some overshoot0.33𝐾𝑢2𝐾𝑝 /𝑇𝑢𝐾𝑝 𝑇𝑢 /3No overshoot0.2𝐾𝑢2𝐾𝑝 /𝑇𝑢𝐾𝑝 𝑇𝑢 /3Note: Keep in mind that we are working with heuristic tuning rules, and thereforesome additional fine tuning might be necessary.Systems and Control Theory19

STADIUS - Center for Dynamical Systems,Signal Processing and Data AnalyticsPID TuningNumerical Optimization MethodsThe tuning of a PID controller is posed as a constrained optimization problem. For a given set of parameters 𝐾𝑝 , 𝐾𝑖 and 𝐾𝑑 run a simulation of the closed-loopsystem, and compute some performance parameters (e.g. setting time, rise time,etc.) and a performance index. Optimize the performance index over the three PID gains.Optimizer𝐾𝑝 , 𝐾𝑖 , 𝐾𝑑Performance IndexSimulationPIDPlant ModelSystems and Control Theory20

STADIUS - Center for Dynamical Systems,Signal Processing and Data AnalyticsPID TuningSome Software ToolsSoftware ToolBrief Descriptionpidtool / pidTunerIt is a Matlab tool to interactively design a SISO PIDcontroller in the feed-forward path of single-loop,unity-feedback control configuration.PidpyIt is a modular PID control library for python thatsupports PID auto tuning.https://pypi.python.org/pypi/pypid/INCA PID TunerIt is a commercial tuning tool developed by IPCOS.It has a vast library of PID structures for DCS andPLC Systems including Siemens, ABB, Honeywell,Emerson, d-tuning/Systems and Control Theory21

STADIUS - Center for Dynamical Systems,Signal Processing and Data AnalyticsPID Tuningpidtool /pidTuner - Demohttps://www.youtube.com/watch?v 2tKe0caUv1ISystems and Control Theory22

STADIUS - Center for Dynamical Systems,Signal Processing and Data AnalyticsPID TuningINCA PID Tuner – Demohttps://www.youtube.com/watch?v XH2bkq1URSgSystems and Control Theory23