Presentation on theme: "Tuning of PID controllers"— Presentation transcript:
1PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway
2Tuning of PID controllers SIMC tuning rules (“Skogestad IMC”)(*)Main message: Can usually do much better by taking a systematic approachOne tuning rule! Easily memorizedReferences:(1) S. Skogestad, “Simple analytic rules for model reduction and PID controller design”, J.Proc.Control, Vol. 13, , 2003(2) S. Skogestad, ``Tuning for smooth PID control with acceptable disturbance rejection'', Ind.Eng.Chem.Res, 45 (23), (2006).(*) “Probably the best simple PID tuning rules in the world”k’ = k/τ1 = initial slope step responsec ≥ 0: desired closed-loop response time (tuning parameter)For robustness select (1) : c ¸ (gives Kc ≤ Kc,max)For acceptable disturbance rejection select (2) : Kc ≥ Kc,min = ud0/ymax
3Need a model for tuningModel: Dynamic effect of change in input u (MV) on output y (CV)First-order + delay model for PI-controlSecond-order model for PID-control
4Step response experiment Make step change in one u (MV) at a timeRecord the output (s) y (CV)
5First-order plus delay process Step response experimentk’=k/1STEP IN INPUT u (MV)RESULTING OUTPUT y (CV): Delay - Time where output does not change1: Time constant - Additional time to reach 63% of final changek : steady-state gain = y(1)/ uk’ : slope after response “takes off” = k/1
6Model reduction of more complicated model Start with complicated stable model on the formWant to get a simplified model on the formMost important parameter is usually the “effective” delay
14Integral time Found: Integral time = dominant time constant (I = 1) Works well for setpoint changesNeeds to be modified (reduced) for integrating disturbancesExample. “Almost-integrating process” with disturbance at input:G(s) = e-s/(30s+1)Original integral time I = 30 gives poor disturbance responseTry reducing it!gcdyu
15Example: Integral time for “slow”/integrating process IMC rule:I = 1 =30Reduce I to improveperformance. This valuejust avoids slow oscillations:I = 4 (c+) = 8 (see derivation next page)
16Derivation integral time: Avoiding slow oscillations for integrating process .Integrating process: 1 largeAssume 1 large and neglect delay :G(s) = k e- s /(1 s + 1) ¼ k/(1s) = k’/sPI-control: C(s) = Kc (1 + 1/I s)Poles (and oscillations) are given by roots of closed-loop polynomial1+GC = 1 + k’/s ¢ Kc ¢ (1+1/Is) = 0or I s2 + k’ Kc I s + k’ Kc = 0Can be written on standard form (02 s2 + 2 0 s + 1) withTo avoid oscillations must require ||¸ 1:Kc ¢ k’ ¢ I ¸ 4 or I ¸ 4 / (Kc k’)With choice Kc = (1/k’) (1/(c+)) this gives I ¸ 4 (c+)Conclusion integrating process: Want I small to improve performance, but must be larger than 4 (c+) to avoid slow oscillations
17Summary: SIMC-PID Tuning Rules One tuning parameter: c
21Selection of tuning parameter c Two casesTight control: Want “fastest possible control” subject to having good robustness(1) S. Skogestad, “Simple analytic rules for model reduction and PID controller design”, J.Proc.Control, Vol. 13, , 2003Smooth control: Want “slowest possible control” subject to having acceptable disturbance rejection(2) S. Skogestad, ``Tuning for smooth PID control with acceptable disturbance rejection'', Ind.Eng.Chem.Res, 45 (23), (2006).
23Example. Integrating process with delay=1. G(s) = e-s/s. TIGHT CONTROLExample. Integrating process with delay=1. G(s) = e-s/s.Model: k’=1, =1, 1=1SIMC-tunings with c with ==1:IMC has I=1Ziegler-Nichols is usually abit aggressiveSetpoint change at t=0Input disturbance at t=20
24TIGHT CONTROLApproximate as first-order model with k=1, 1 = 1+0.1=1.1, = = 0.148Get SIMC PI-tunings (c=): Kc = 1 ¢ 1.1/(2¢ 0.148) = 3.71, I=min(1.1,8¢ 0.148) = 1.12. Approximate as second-order model with k=1, 1 = 1, 2= =0.22, = = 0.028Get SIMC PID-tunings (c=): Kc = 1 ¢ 1/(2¢ 0.028) = 17.9, I=min(1,8¢ 0.028) = 0.224, D=0.22
25Tuning for smooth control Tuning parameter: c = desired closed-loop response time(1) Selecting c= (“tight control”) is reasonable for cases with a relatively large effective delay Other cases: Select c > forslower controlsmoother input usageless disturbing effect on rest of the plantless sensitivity to measurement noisebetter robustnessQuestion: Given that we require some disturbance rejection.What is the largest possible value for c ?Or equivalently: The smallest possible value for Kc?(2) Will derive Kc,min. From this we can get c,max using SIMC tuning rule
27u Kc SMOOTH CONTROL Minimum controller gain for PI-and PID-control: Kc ¸ Kc,min = |ud0|/|ymax||ud0|: Input magnitude required for disturbance rejection|ymax|: Allowed output deviation
28Common default factory setting Kc=1 is reasonable ! SMOOTH CONTROLMinimum controller gain:Industrial practice: Variables (instrument ranges) often scaled such thatMinimum controller gain is then(span)Minimum gain for smooth control )Common default factory setting Kc=1 is reasonable !
29Example SMOOTH CONTROL Response to disturbance = 1 at input c is much larger than =0.25Does not quite reach 1 because d isstep disturbance (not not sinusoid)Response to disturbance = 1 at input
30Application of smooth control LEVEL CONTROLApplication of smooth controlAveraging level controlVqLCIf you insist on integral actionthen this value avoids cyclingReason for having tank is to smoothen disturbances in concentration and flow.Tight level control is not desired: gives no “smoothening” of flow disturbances.Derivation of tunings:Minimum controller gain for acceptable disturbance rejection:Kc ¸≥ Kc,min = |ud0|/|ymax|Where in our case|ud0| = |q0| expected flow change [m3/s] (input disturbance)|ymax| = |Vmax| - largest allowed variation in level [m3]Integral time:From the material balance (dV/dt = q – qout), the model is g(s)=k’/s with k’=1.Select Kc=Kc,min = |q0| |Vmax| . SIMC-Integral time for integrating process:I = 4 / (k’ Kc) = 4 |Vmax| / |q0|= 4 ¢ residence timeprovided tank is nominally half full (so |Vmax| = V) and q0 is equal to the nominal flow.
31Rule: Kc ¸ |ud0|/|ymax| ( ~1 in scaled variables) SMOOTH CONTROLRule: Kc ¸ |ud0|/|ymax| ( ~1 in scaled variables)Exception to rule: Can have even smaller Kc (< 1) if disturbances are handled by the integral action.Happens when c > I = 1Applies to: Process with short time constant (1 is small)For example, flow controlKc: Assume variables are scaled with respect to their span
32Summary: Tuning of easy loops SMOOTH CONTROLSummary: Tuning of easy loopsEasy loops: Small effective delay ( ¼ 0), so closed-loop response time c (>> ) is selected for “smooth control”Flow control: Kc=0.5, I = 1 = time constant valve (typically, 10s to 30s)Level control: Kc=2 (and no integral action)Other easy loops (e.g. pressure control): Kc = 2, I = min(4c, 1)Note: Often want a tight pressure control loop (so may have Kc=10 or larger)Kc: Assume variables are scaled with respect to their span
33More on level control Level control often causes problems Typical story:Level loop starts oscillatingOperator detunes by decreasing controller gainLevel loop oscillates even more......???Explanation: Level is by itself unstable and requires control.
36Case study oscillating level LEVEL CONTROLCase study oscillating levelWe were called upon to solve a problem with oscillations in a distillation columnCloser analysis: Problem was oscillating reboiler level in upstream columnUse of Sigurd’s rule solved the problem
39Model identification from step response General: Need 3 parameters:Delay 2 of the following: k, k’, 1 (Note relationship k’ = k/1)Two approaches for obtaining 1:Initial response: ( + 1) is where initial slope crosses final steady-state(+1)= 63% of final steady stateIf disagree: Initial response is usually best, but to be safe use smallest value for 1 (“fast response”) as this gives more conservative PID-tunings1 = 16 min for this caseBOTTOM V: -0.5xB1=16 min / 19 min63%k’k
40Model identification from step response Generally need 3 parametersBUT For control: Dynamics at “control time scale” (c) are important“Slow” (integrating) process (c< 1/5): May neglect 1 and use only 2 parameters: k’ and g(s) = k’ e- s / s“Delay-free” process (c > 5θ): Need only 2 parameters: k and 1g(s) = k / (1 s+1)c = desired response time1 ¼ 200, 1ctimec < τ1/5 = 40: “Integrating” (neglect τ1)c > 5θ = 5: “Delay-free” (neglect θ)
41“Integrating” process (c < 1/5): Need only two parameters: k’ and From step response:Example.Step change in u: u = 0.1Initial value for y: y(0) = 2.19Observed delay: = 2.5 minAt T=10 min: y(T)=2.62Initial slope:Response on stage 70 to step in Ly(t)7.5 min=2.5t [min]
42“Delay-free” process (c > 5 ) Example:BOTTOM V: -0.5xB16 min63%First-order model:= 0k= ( )/(-0.5) = (steady-state gain)1= 16 min (63% of change)
43Step response experiment: How long do we need to wait? NORMALLY NO NEED TO RUN THE STEP EXPERIMENT FOR LONGER THAN ABOUT 10 TIMES THE EFFECTIVE DELAY ()
48Cascade control serial process (“exception”) G1u2y1K1ysG2K2y2y2s
49Cascade control serial process G1uy1K1ysG2K2y2y2sWithout cascadeWith cascade
50Tuning cascade control: serial process Inner fast (secondary) loop:P or PI-controlLocal disturbance rejectionMuch smaller effective delay (0.2 s)Outer slower primary loop:Reduced effective delay (2 s instead of 6 s)Time scale separationInner loop can be modelled as gain=1 + 2*effective delay (0.4s)Very effective for control of large-scale systems
51CONTROLLABILITYControllability(Input-Output) “Controllability” is the ability to achieve acceptable control performance (with any controller)“Controllability” is a property of the process itselfAnalyze controllability by looking at model G(s)What limits controllability?
52Controllability Recall SIMC tuning rules 1. Tight control: Select c= corresponding to2. Smooth control. Select Kc ¸Must require Kc,max > Kc.min for controllability)max. output deviationinitial effect of “input” disturbancey reaches k’ ¢ |d0|¢ t after time ty reaches ymax after t= |ymax|/ k’ ¢ |d0|
56Distillation example: Frequency domain analysis CONTROLLABILITYDistillation example: Frequency domain analysis
57Other factors limiting controllability Input limitations (saturation or “slow valve”): Can sometimes limit achievable speed of responseUnstable process (including levels): Need feedback control for stabilization) Makes sure inputs do not saturate in stabilizing loops