Lecture 12-Auto-tuning and gain Introduction Scheduling · Tuning and adaptation 1. Introduction Prior knowledge 2. Tuning chniques Initialization of adaptive controllers 3. Relay tuning PID Control 4. Applications Operational aspects 5. Gain Scheduling Operator interface 6. How to find schedules e Views from the field 7. Applications 8. Conclusions Views from the field Auto-tuning Techniques Canadian mill audit. average paper mill The Ziegler-Nichols method has 2000 loops, 97% use Pi the remaining 3%are PID, adaptive etc. Bill Bialkowski Transient response methods CCA93 Frequency response methods · Default settings Poor control performance due to bad Poor control performance due to valves, actuators or positioner problems Process Performance is not as good as you think. D. Ender, Control Engineering 1993 . More than 30%of installed controllers operate in manual More than 30% of the loops actually increase short term variability About 25% of the loops use default About 30% of the loops have equip ment problems O K.J.Astrom and BWittenmark
Lecture 12—Auto-tuning and Gain Scheduling 1. Introduction 2. Tuning Techniques 3. Relay tuning 4. Applications 5. Gain Scheduling 6. How to find schedules 7. Applications 8. Conclusions Introduction • Tuning and adaptation • Prior knowledge • Initialization of adaptive controllers • PID Control • Operational aspects • Operator interface • Views from the field Views from the Field Canadian mill audit. Average paper mill has 2000 loops, 97% use PI the remaining 3% are PID, adaptive etc. Bill Bialkowski CCA’93. • Default settings • Poor control performance due to bad tuning • Poor control performance due to valves, actuators or positioner problems Process Performance is not as good as you think. D. Ender, Control Engineering 1993. • More than 30% of installed controllers operate in manual • More than 30% of the loops actually increase short term variability • About 25% of the loops use default settings • About 30% of the loops have equipment problems Auto-tuning Techniques • The Ziegler-Nichols method • Transient response methods • Frequency response methods c K. J. Åström and B. Wittenmark 1
Transient Response Methods Difficulties with Ziegler-Nichols The three parameter model Difficult to determine parameters G()=k · Too low damping 1+87e~ Two parameters not enough Step response methods Area methods 0.63k Parameters are given by The Ziegler-Nichols method ControlleraKcT/L Ta/L Tp/L k P 093 5.7 PID 1220.534 Ziegler-Nichols Frequency Relay Tuning Response Method The experiment ldea: Run a proportional controller, increase gain until the system starts to oscillate Observe "ultimate gain Ku, and " ultimate perod T Interpretation: Find features of frequency response The results Controller parameters Time Controller Kc/Ku T/T Ta/Tu Tp/Tu 0.5 Closed loop experiment 04 0.8 14 Stable limit cycle for large class of processes PID 0.60.5|0.12085 Much control energy close to @180 O K.J.Astrom and BWittenmark
Transient Response Methods The three parameter model G(s) k 1 + sT e−sL Step response methods k a L T Time 0.63k The Ziegler-Nichols method Controller aKc Ti/L Td/L Tp/L P 1 4 PI 0.9 3 5.7 PID 1.2 2 0.5 3.4 Difficulties with Ziegler-Nichols • Difficult to determine parameters • Too low damping • Two parameters not enough Area methods A0 L + T k A 1 Parameters are given by T + L A0 k T eA1 k Ziegler-Nichols Frequency Response Method Idea: Run a proportional controller, increase gain until the system starts to oscillate. Observe "ultimate gain Ku, and "ultimate period Tu. Interpretation: Find features of frequency response G(iω) − 1 N(a) Controller parameters Controller Kc/Ku Ti/Tu Td/Tu Tp/Tu P 0.5 1 PI 0.4 0.8 1.4 PID 0.6 0.5 0.12 0.85 Relay Tuning The experiment Σ Process PID Relay A T u y − 1 The results 0 5 10 −1 0 1 Time • Closed loop experiment • Stable limit cycle for large class of processes • Much control energy close to ω180 c K. J. Åström and B. Wittenmark 2
Practical issues Automatic Tuning of the double Prior information Tank How to start the experiments Consider the double tank used in our Feedback to limit the amplitiude of the laboratory experiments oscillation Here is the results obtained with one of our Modified Ziegler-Nichols rules earliest auto-tuners Change values in the tables Tuning PID control Use three parameters ku, Tu and K How to cope with disturbances A人 Load disturbances 200s Measurement noise Hysteresis Mnrf Flow Control Temperature Control O K.J.Astrom and BWittenmark
Practical Issues • Prior information? • How to start the experiments • Feedback to limit the amplitiude of the oscillation • Modified Ziegler-Nichols rules – Change values in the tables – Use three parameters ku, Tu and Kp • How to cope with disturbances – Load disturbances – Measurement noise – Hysteresis Automatic Tuning of the Double Tank Consider the double tank used in our laboratory experiments. Here is the results obtained with one of our earliest auto-tuners. y u 0 100 200 s 0 0 1 uc Tuning PID control 0 100 200 s 0.5 Flow Control Temperature Control c K. J. Åström and B. Wittenmark 3
Composition Control Adding Dynamics in the Feedback oop Other information can be obtained by introducing dynamics in the feedback loop n integrator giy a differentiator gives @270 1+m Closed Loop Experiments Summary of Relay Feedback Close to industrial operation Controler · One-button tuning Easy to expl Works well for standard loops An integrator can also be added Little prior information ery robust Generates automatically a perturbation signal with a lot of energy at 180 Many possibilities not exploited O K.J.Astrom and BWittenmark
Composition Control Adding Dynamics in the Feedback Loop Other information can be obtained by introducing dynamics in the feedback loop • An integrator gives ω90 • A differentiator gives ω270 Process –1 1 s Σ a) Process –1 1 s Σ b) Closed Loop Experiments Controller Process –1 –1 Σ Σ An integrator can also be added –1 Im L(iω) Re L(iω) L(iω) B A Summary of Relay Feedback • Close to industrial operation • Easy to use • One-button tuning • Easy to explain to users • Works well for standard loops • Little prior information • Very robust • Generates automatically a perturbation signal with a lot of energy at ω180 • Many possibilities not exploited c K. J. Åström and B. Wittenmark 4
On-ine Iteration Gain Scheduling Idea: Find features of the online response 1. What is it? due to set point or load disturbances 2. How to find schedules Modify controller settings based on the observed features 3. Applicatio Features: damping d and overshoot o Controller modified based on heuristic rules Easy for PI more difficult for PID Prior informatic Pre-tuning Gain Scheduling How to Find schedules Controller Select scheduling variables Make control design for different Operating operating conditions Command Control Use automatic tuning Process Transformations Example of scheduling variables Production rate · Machine speed Mach number and dynamic pressure e K.J. Astrom and BWittenmark
On-line Iteration Idea: Find features of the online response due to set point or load disturbances. Modify controller settings based on the observed features. e1 e2 e3 Tp Features: damping d and overshoot o d e3 − e2 e1 − e2 o −e2 e1 Controller modified based on heuristic rules. Easy for PI more difficult for PID. • Prior information • Pre-tuning Gain Scheduling 1. What is it? 2. How to find schedules? 3. Applications 4. Conclusions Gain Scheduling Process schedule Gain Output Control signal Controller parameters Operating condition Command signal Controller Example of scheduling variables • Production rate • Machine speed • Mach number and dynamic pressure How to Find Schedules? • Select scheduling variables • Make control design for different operating conditions • Use automatic tuning • Transformations c K. J. Åström and B. Wittenmark 5
Valve characteristics Schedule on Controller output Flow GS Ref Line Discuss when this is appropriate Position The valve characteristics depend on the installation Schedule on process variable Schedule on external variable GS Ref LIC Discuss when this is appropriate Discuss when this is appropriate O K.J.Astrom and BWittenmark
Valve Characteristics Flow Position Quick opening Linear Equal percentage The valve characteristics depend on the installation A B C Schedule on Controller Output FT FIC GS Ref Discuss when this is appropriate Schedule on Process Variable LT LIC GS Ref Discuss when this is appropriate Schedule on External Variable TT FT TIC GS Ref Discuss when this is appropriate c K. J. Åström and B. Wittenmark 6
Nonlinear valve Results a typical process control loop Without gain scheduling Valve characteristics f() f(u) With gain scheduling A crude approximation! Concentration Control Variable sampling rate System Process model G(s=1+sT where Sample the system with period Performance with changing flow h (a),Outp The sampled model becomes c(kh+h)=ac(kh)+(1-a)u(kh-nh (b), Control signa 6i5 Where a =e-gh/Vm=e-v-d/ (n Vm) g亏11 Notice that the sampled equation does not depend on q!!! e K.J. Astrom and BWittenmark
Nonlinear Valve A typical process control loop Σ PI c u f v y Process −1 ˆ f −1 uc G0 (s) Valve characteristics 0 0.5 1 1.5 2 0 10 Time ˆ f(u) f(u) A crude approximation! Results Without gain scheduling 0 10 20 30 40 0.2 0.3 0 10 20 30 40 1.0 1.1 0 10 20 30 40 5.0 5.2 Time Time Time uc y uc y y uc With gain scheduling 0 20 40 60 80 100 0.2 0.3 0 20 40 60 80 100 1.0 1.1 0 20 40 60 80 100 5.0 5.1 Time Time Time uc y uc y uc y Concentration Control System cin Vd Vm c Performance with changing flow 0 5 10 15 20 0.0 0.5 1.0 0 5 10 15 20 0.0 0.5 1.0 1.5 Time Time (a) Output c cr q 0.5 q 0.9 q 1.1 q 2 (b) Control signal cin q 0.5 q 0.9 q 1.1 q 2 Variable Sampling Rate Process model G(s) 1 1 + sT e−sτ where T Vm q τ Vd q Sample the system with period h Vd nq The sampled model becomes c(kh+ h) a c(kh)+(1 − a)u(kh − nh) where a e−qh/Vm e−V−d/(nVm) Notice that the sampled equation does not depend on q!!! c K. J. Åström and B. Wittenmark 7
Results Flight Control Digital control with h=1/(2q). The flows Pitch dynamics are:(a)q=0.5;(b)q=1;(c)q=2 (b) Time Operating conditions Time 05101520 Time 121.6 The pitch Control channel Schedule of Ko with Respect to Indicated Airspeed (IAS)and Pitch stick Height (H) DAF② O K.J.Astrom and BWittenmark
Results Digital control with h 1/(2q). The flows are: (a) q 0.5; (b) q 1; (c) q 2 0 5 10 15 20 0 1 0 5 10 15 20 0 1 0 5 10 15 20 0 1 0 5 10 15 20 0 1 0 5 10 15 20 0 1 0 5 10 15 20 0 1 Time Time Time Time Time Time (a) c cin (b) c cin (c) c cin Flight Control Pitch dynamics α V θ q = ˙ θ Nz δ e Operating conditions 0 0.4 0.8 1.2 1.6 2.0 2.4 80 60 40 20 0 1 2 3 4 Mach number Altitude (x1000 ft) The Pitch Control Channel Filter Filter Filter A/D A/D A/D D/A D/A Filter − H H M H M Pitch stick Position Acceleration Pitch rate Σ Σ Σ Σ Σ Gear To servos Σ VIAS VIAS H M VIAS K DSE KSG T1s 1+ T1s 1 1+ T3 s KQ1 K NZ M H KQD T2s 1+ T2s Schedule of KQ with Respect to Indicated Airspeed (IAS) and Height (H) 0.5 1000 0 10 20 H (km) 0 0.5 0 0 (km/h) V IAS KQDIAS KQD H c K. J. Åström and B. Wittenmark 8
Surge Tank Control The Igelsta Power Station A surge tank is used to smooth flow varia Controller structure before modification tions the is allowed will fluctuate substan- tially but it is important that the tank does not become empty or that it overflows LIC Surge tank Modified controller structure FIC network Schedule When to Use different Techniques? Valve Position K。T 0.00-0.151.795 015-022208922 022-0.352.98221 cnanges in ayn 035-1.00446817 Auto-tuning Auto-tuning Auto-tuning Gain scheduling parame parameter changes parameter changes O K.J.Astrom and BWittenmark
Surge Tank Control A surge tank is used to smooth flow variations. The is allowed will fluctuate substantially but it is important that the tank does not become empty or that it overflows. FIC LT LIC Surge tank FT The Igelsta Power Station Controller structure before modification TT TIC Boiler Heat exchanger PT PIC Set point Fuel/air DH network Modified controller structure TT TIC Boiler Heat exchanger PT PIC Set point Fuel/air XT DH network Schedule Valve Position Kc Ti Td 0.00-0.15 1.7 95 23 0.15-0.22 2.0 89 22 0.22-0.35 2.9 82 21 0.35-1.00 4.4 68 17 When to Use Different Techniques? Gain scheduling Auto-tuning Adaptation Constant dynamics Predictable changes in dynamics Unpredictable changes in dynamics Constant controller parameters Predictable parameter changes Unpredictable parameter changes Auto-tuning Auto-tuning Auto-tuning Auto-tuning c K. J. Åström and B. Wittenmark 9
Conclusions Very useful technique Linearization of nonlinear actuators Surge tank control Control over wide operating ranges Requires good models Easy to use when combined with auto- tuning Good operational experience . Issues to be considered Choice of scheduling variables Granularity of scheduling tables Interpolation umpless parameter changes Operator interfaces c K.J. Astrom and BWittenmark
Conclusions • Very useful technique – Linearization of nonlinear actuators – Surge tank control – Control over wide operating ranges • Requires good models • Easy to use when combined with autotuning • Good operational experience • Issues to be considered – Choice of scheduling variables – Granularity of scheduling tables – Interpolation – Bumpless parameter changes – Operator interfaces c K. J. Åström and B. Wittenmark 10