Iterative Feedback Tuning Michel Gevers CESAME - UCL Louvain-la-Neuve Belgium Collaboration : H. Hjalmarsson, S. Gunnarsson, O. Lequin, E. Bosmans, L. Triest, M. Mossberg
Outline Problem formulation Iterative criterion minimization Properties and implementation of IFT Applications in the chemical industry Use of IFT for minimum settling time Comparison with classical tuning rules Conclusions 1
System Configuration: v r C r (ρ) u(ρ) G o y(ρ) C y (ρ) System : y(ρ) = T(ρ)r + S(ρ)v T(ρ) = C r(ρ)g o 1, S(ρ) = 1 + C y (ρ)g o 1 + C y (ρ)g o Reference Model: r T d ȳ 2
Problem Formulation Output Error: ỹ(ρ) = y(ρ) ȳ [ Criterion: J(ρ) = 1 2N E N t=1 (L yỹ t (ρ)) 2 + λ ] N t=1 (L uu t (ρ)) 2 where L is a frequency weighting filter. [ J(ρ) = 1 N 2N E [L y (T(ρ)r t ȳ t )] 2 + Find t=1 ρ = arg min J(ρ) when Plant unknown No possibility of modeling the system Low complexity controller Experimental data can be used only. Note : Criterion is automatic compromise between tracking and disturbance rejection. N [L y S(ρ)v t ] 2 + λ t=1 ] N [L u u t (ρ)] 2 t=1 3
Criterion Minimization Idea: It is a minimization problem! Why not use a minimization procedure? Reformulation: Find ρ that solves [ = J (ρ) = 1 N N E ỹ t (ρ) ỹ t(ρ) + λ Solution algorithm: t=1 ] N u t (ρ) u t(ρ) t=1 where γ i is the step size ρ i+1 = ρ i γ i R 1 i J (ρ i ) R i is a sequence of p.d. matrices, typically an estimate of the Hessian of J. 4
Required signals [ J (ρ i ) = 1 N N E ỹ t (ρ i ) ỹ t(ρ i ) + λ t=1 We need ỹ t (ρ i ),ỹ t(ρ i ),u t (ρ i ) and u t(ρ i ). ] N u t (ρ i ) u t(ρ i ) t=1 ỹ(ρ) = y(ρ) ȳ available from one closed loop experiment ỹ 1 (ρ) = C r (ρ) C r(ρ)t(ρ)r 1 C r (ρ) C y(ρ) ( T 2 (ρ)r + T(ρ)S(ρ)v ) Observation : T 2 r + TSv = T(Tr + Sv) = Ty A closed loop experiment which uses y as reference. 5
3 experiments: Reference signals: r 1 i = r r 2 i = y 1 i r 3 i = r Corresponding outputs and inputs: yi 1 = T(ρ i )r + S(ρ i )vi 1 yi 2 = T 2 (ρ i )r + T(ρ i )S(ρ i )vi 1 + S(ρ i )vi 2 yi 3 = T(ρ i )r + S(ρ i )vi 3 u 1 i = S(ρ i ) [ ] C r (ρ i )r C y (ρ i )vi 1 u 2 i = S(ρ i ) [ ] C r (ρ i )(r yi 1 ) C y (ρ i )vi 2 u 3 i = S(ρ i ) [ ] C r (ρ i )r C y (ρ i )vi 3 6
Observations: ỹ i yi 1 ȳ : perfect realization of ỹ(ρ i ) ˆỹ 1 ( ) i C C r (ρ i ) r (ρ i )yi 3 C y(ρ i )yi 2 = ỹ (ρ i ) + S(ρ i) ( ) C C r (ρ i ) r (ρ i )vi 3 C y(ρ i )vi 2 = perturbed version of ỹ (ρ i ) u 1 i = perfect realization of u(ρ i ) û 1 [ i = (C C r (ρ i ) r (ρ i ) C y(ρ i ))u 3 i + C y(ρ i )ui] 2 = perturbed version of u (ρ i ) 7
Define: Key observation : Ĵ i = 1 N N t=1 [ ] ỹ i (t) ˆỹ i(t) + λ u 1 i(t) û i(t) Ĵ i is an unbiased estimate of the gradient J (ρ i ) Approximation of the Hessian: One possibility is the Gauss-Newton choice: R i = 1 N [ ] ] ˆỹ N i(t)[ˆỹ T i(t) + λ û i (t) [û i(t)] T t=1 Remark: Biased due to the disturbance in the second and third experiments 8
1. Frequency Weighting L 1 Filter all signals through L Implementation 2. Non-minimum phase or unstable controllers Filtering of the signals with Cr 1. Problem if non-minimum phase. Solution: Choose L as an all-pass filter with numerator containing unstable zeros of C r. 9
Convergence Analysis ] E [Ĵ i = J (ρ i ) Stochastic approximation theory can be applied R i δi, i for some δ >. All-pass filtering if necessary i=1 γ i =, i=1 γ2 i < {r} and {v} bounded stationary stochastic processes and mutually independent. {y j i } j = 1, 2; i = 1, 2,... bounded. ρ i {ρ : J (ρ) = } w.p.1 as i Remark: Independence between experiments Simple analysis 1
Engineering Aspects Simple. Only a limited number of user s choices with simple interpretations. Especially no need to choose input spectrum. Applies as well to tuning of simple PID controllers as well as more complex controllers. User s Choices: Step size. Controls the rate of change of the controller. Reference model. Can smoothly increase the performance specifications ( windsurfing ). Frequency weighting filter. Can adaptively be chosen to suppress undesired oscillations. Controller complexity. Full freedom to increase complexity successively. 11
On-Line Considerations Experiment 2 does not use r as reference signal Not an on-line method. But: y = T(ρ i )r + S(ρ i )v Experiment 2 : Observations: y 2 i = T(ρ i )T(ρ i )r + S(ρ i )v 2 i + T(ρ i )S(ρ i )v 1 i r filtered two times through T instead of one. Fast settling time Only slightly slower The disturbance terms differ only by T(ρ i )S(ρ i )v 1 i : normally small since T and S approx. complementary. 12
Applications The Landau benchmark problem: flexible transmission system Ref : Hjalmarsson, Gunnarsson, Gevers, European Journal of Control, Vol. 1, No 2, 1995 Wide range of applications have been reported (Google search): Controller tuning of industrial plants, robots, rolling mills, magnetic suspension systems, active noise cancellation, thermal cycling modules for the electronics industry, wastewater treatment plants, etc Extension to nonlinear and time-varying systems Optimal PID tuning at Solvay Ltd: Temperature control in industrial furnaces Temperature control in distillation columns Flow control in evaporators 13
Example 1 : Temperature control in a furnace Cost function With initial PID.171 After 1 iteration.22 (-87 %) 14
Example 2 : Temperature control for a tray in a distillation column Experiment : Disturbance rejection : r d = y d = constant Duration of one experiment : 5 hours. Evolution of cost function : Iteration Cost function Cost function estimated with new parameters 1.8.36 2 1. (+25%).59 3.57 (-43%).35 4.37 (-35%).18 5.22 (-4%).15 6.14 (-36%).11 15
Example 2: Temperature control in a distillation column PID regulator: before and after 6 iterations of the iterative scheme Erreur de régulation Avant optimisation 5 Erreur de régulation Avant optimisation 2 15 C % 1 5 5 1 15 2 Heures Erreur de régulation Après optimisation 5 5 5 5 C Erreur de régulation Après optimisation 2 15 C % 1 5 5 5 1 15 2 Heures 5 5 C Histograms over two-week periods 16
Example 2 (continued) Evolution of the controllers 6 PID : Cr 6 PID : Cy 4 4 Gain [db] 2 Gain [db] 2 2 1 6 1 4 1 2 Frequency [1/s] 2 1 6 1 4 1 2 Frequency [1/s] 1 1 Phase [deg] 5 5 Phase [deg] 5 5 1 1 6 1 4 1 2 Frequency [1/s] 1 1 6 1 4 1 2 Frequency [1/s] Bode diagrams of 2-DOF regulators before tuning (full), after 3 iterations (dashed) and after 6 iterations (dotted) 17
Example 3: Flow control in an evaporator Objective: Improving the tracking performance of a PID regulator Desired response : y d = 1 1+2s r d where r d = a ramp of 3 minutes followed by a constant value for 12 minutes First experiment of first iteration First experiment of third iteration 3 3 Flow 2 1 Flow 2 1 % 3 25 2 15 1 1 2 3 4 Minutes 5 Tracking error during first iteration 1.5.5 1 Flow % 25 2 15 1 1 2 3 4 Minutes Tracking error during third iteration 3 5 1.5.5 1 Flow r (dotted), y d (dashed) and achieved response (full) before and after 2 iterations of the IFT scheme 18
IFT with time weightings One may want to attach more weight to parts of the time response than to others. Example : set-point change : no weight on transient between the two set-points. Modify the criterion as follows : [ J(ρ) = 1 N 2N E t=1 w y t (L y ỹ t (ρ)) 2 + λ N t=1 w u t (L u u t (ρ)) 2 ] 19
Minimizing the settling time to a new set-point Let a set-point change be required at time t =. We want the output of the closed loop system to reach the new set-point at t = t. Apply zero weighting (i.e. masks) during the transient : J(ρ) = 1 2N E [ N t=t w y t (L y ỹ t (ρ)) 2 + λ N t=1 wu t (L u u t (ρ)) 2 ] By doing so, the parameter vector ρ focuses on achieving the new reference value as soon as possible rather than on fitting some arbitrary imposed transient. Start with large t, then reduce until oscillations appear Minimizes the settling time. 2
IFT tuning of PID parameters C r = K(1 + 1 T i s ) C y = K(1 + 1 T i s + T ds) The PID parameters are collected in the vector ρ : ρ = [K, T i, T d ] T. 21
Comparison with classical tuning rules Ziegler-Nichols Increase proportional gain until oscillations. Denote * T c the oscillation period * K c the critical gain Choose K = K c 1.7,T i = T c 2,T d = T c 8 22
Internal Model Control (IMC) * Define 3 parameters K p, T and D from open loop step response assuming G(s) = K p 1 + st e sd * Choose K = 2T+D 2(λ+D), T i = T + D 2, T d = TD 2T+D with λ >.25 (λ =.5 here). 23
Integral Square Error (ISE) Criterion Adjust PID parameters in such a way as to minimize the Integral Square Error (ISE) ε t = y t yt d between achieved output and desired output : ISE = ε 2 (t)dt 24
IFT Method with mask The following criterion was minimized (mask of length t ): N ( ) J(ρ) = E yt (ρ) yt d 2. t=t Initial values of the PID parameters chosen for slow response with no overshoot. The length t of the mask was initially chosen to correspond with the settling time of this slow response. This length was then successively reduced until oscillations appeared. 25
Example 1 : G 1 (s) = 1 1+2s e 5s For IFT: mask is decreased from 7 secs to 1 secs in steps of 2 secs. 1.5 1 1 8 6 zn ise imc ift y(t).5 zn ise imc ift 2 4 6 8 1 t u(t) 4 2 2 4 6 8 1 t Figure 1: Step responses (left) and corresponding input signals (right) for the closed loop systems with G 1 (s) and the PID controllers tuned with the four different methods. Comments : Settling time with IFT controller is much smaller than with the others. Overshoot and control action are also smaller. 26
Example 2 : G(s) = 1 1+2s e 2s For IFT: mask is decreased from 15 secs to 5 secs in steps of 25 secs. 1.5 1 3 2.5 2 zn ise imc ift y(t).5 zn ise imc ift 5 1 15 2 25 3 t u(t) 1.5 1.5 5 1 15 2 25 3 t Figure 2: Step responses (left) and corresponding input signals (right) for the closed loop systems with G 2 (s) and the PID controllers tuned with the four different methods. Comments : Superiority of IFT controller is even more striking: almost no overshoot, with much smaller control action. 27
Example 3 : G(s) = 1 (1+1s) 8 For IFT: mask is decreased from 28 secs to 13 secs in steps of 3 secs. 1.6 1.4 1.2 1 2 1.5 zn ise imc ift y(t).8.6.4.2 zn ise imc ift u(t) 1.5 1 2 3 4 5 t 1 2 3 4 5 t Figure 3: Step responses (left) and corresponding input signals (right) for the closed loop systems with G 3 (s) and the PID controllers tuned with the four different methods. Comments : Settling time of IFT controller is much smaller than with other controllers, with a much smaller control action. 28
Example 4 : G(s) = 1 5s (1+1s)(1+2s) For IFT: mask is decreased from 11 secs to 3 secs in steps of 2 secs. 1.5 1 12 1 8 zn ise imc ift y(t).5 zn ise imc ift 5 1 15 2 t u(t) 6 4 2 5 1 t 15 2 Figure 4: Step responses (left) and corresponding input signals (right) for the closed loop systems with G 4 (s) and the PID controllers tuned with the four different methods. Comments : IFT controller produces by far the best closed loop step response, but now with an initially larger control action. Add penalty on control action. 29
{ N ( ) Example 4 (cont d) : J(ρ) = E t=t yt (ρ) yt d 2 } + 1 7 N t= (u t(ρ)) 2 The mask, t, was again decreased from 11 secs to 3 secs in steps of 2 secs. 1.5 1 6 5 4 zn ise imc ift y(t).5 zn ise imc ift 5 1 15 2 t u(t) 3 2 1 5 1 15 2 t Figure 5: Step responses (left) and corresponding input signals (right) for the closed loop systems with G 4 (s) and the PID controllers tuned with the three classical methods, and with IFT with weighting λ = 1 1 7. Comments : Control action of IFT controller is now smaller than with others. In addition, the closed loop step response is even better than before. 3
Comments and conclusions IFT has become one of the commonly used controller tuning methods Experiments are performed on the closed loop system Process engineer keeps control of the process Design choices are simple and intuitive The method is well geared towards regulation problems of industrial processes Second experiment generates extra noise on output Some experience required to handle other types of performance criteria Numerous extensions and applications: see the special issue of Control Engineering Practice, Vol. 11, No 9, September 23. 31