EECE 460 : Control System Design PID Controller Design and Tuning Guy A. Dumont UBC EECE January 2012 Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 1 / 37
Contents 1 Introduction 2 Control Specifications 3 Empirical Tuning Methods Ziegler-Nichols Cohen-Coon Method The Good Gain Method 4 Model-Based Methods The Dahlin Controller l-tuning Haalman s Method Internal Model Control SIMC-PID Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 2 / 37
Introduction PID Controller Design and Tuning Vast literature on the topic. There is a plethora of techniques As Åström and Hägglund put it:... there are many different types of control problems and consequently many different design methods. To only use one method is as dangerous as to only believe in empirical tuning rules Empirical, historical methods Ziegler-Nichols oscillation or frequency response method The Cohen-Coon method The Good Gain method Model-based Tuning Lambda-Tuning Haalman s method Skogestad s IMC rules Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 3 / 37
Control Specifications Control Specifications For response to step setpoint changes, the criteria below have been often used Z Z Z ITAE = t e(t) dt; ITE = te(t)dt; ITSE = te 2 (t)dt 0 0 0 Rise time Settling time Decay ratio Overshoot ratio Steady-state error Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 4 / 37
Control Specifications Control Specifications For attenuation of load disturbances IAE = Z 0 e(t) dt; IE = Z It can be shown that for a unit step disturbance 0 IE = T i K c Z e(t)dt; ISE = e 2 (t)dt 0 Sensitivity to measurement noise Transmission of measurement noise to control signal is G nu = C/(1 + G 0 C) Normally at high frequencies G 0 C 0 and G nu C. For a PID controller, the high frequency gain is K c (1 + N) 10K c Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 5 / 37
Control Specifications Control Specifications Gain (or amplitude margin) A m = 1 G 0 C(iw u ) where w u is the ultimate frequency, i.e. argg 0 C(iw u )= Phase margin f m = p + argg 0 C(iw c ) where w c is the cross-over frequency, i.e. G 0 C(iw c ) = 1 Robustness to model uncertainty 1 M s = max 1 + G 0 (iw)c(iw) = max S(iw) where S is the sensitivity function p Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 6 / 37
Control Specifications Control Specifications 1/M s is the stability margin Source: K.J. Astrom and T. Hagglund, Advanced PID Control. Published with permission of ISA. c 2009. All rights reserved. Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 7 / 37
Control Specifications Control Specifications A number of optimization-based techniques use M s to perform the tuning Source: K.J. Astrom and T. Hagglund, Advanced PID Control. Published with permission of ISA. c 2009. All rights reserved. Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 8 / 37
Empirical Tuning Methods Ziegler-Nichols Ziegler-Nichols Frequency Method Only valid for open loop stable plants and it is carried out through the following steps 1 Set the true plant under proportional control, with a very small gain. 2 Increase the gain until the loop starts oscillating. Note that linear oscillation is required and that it should be detected at the controller output. 3 Record the controller critical gain K p = K c and the oscillation period of the controller output, P c. 4 Adjust the controller parameters according to the Table 6.1 on next slide. There is some controversy regarding the PID parameterization for which the Z-N method was developed, but the version described here is, to the best knowledge of the authors, applicable to the parameterization of standard form PID: C(s)=K p 1 + 1 T r s + T ds 1 + t d s Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 9 / 37
Empirical Tuning Methods Ziegler-Nichols Ziegler-Nichols Frequency Method Source: K.J. Astrom and T. Hagglund, Advanced PID Control. Published with permission of ISA. c 2009. All rights reserved. Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 10 / 37
Empirical Tuning Methods Ziegler-Nichols Ziegler-Nichols Frequency Method Consider a plant of the form G 0 (s)= K 0e st 0 n 0 s + 1 where n 0 > 0 Figure 6.3 from the textbook Response is very sensitive to the ratio between the delay and the time constant Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 11 / 37
Empirical Tuning Methods Ziegler-Nichols Interpretation of the Frequency Response Method The critical gain K c is such that the Nyquist plot of the loop gain goes through the 1 point at the oscillation frequency w c, i.e. K c G 0 (jw c )= 1 Method where one point of the Nyquist curve is moved Source: K.J. Astrom and T. Hagglund, Advanced PID Control. Published with permission of ISA. c 2009. All rights reserved. With PI control, ultimate point moved to (-0.4,+0.08i) With PID control, ultimate point moved to (-0.6,-0.28i) Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 12 / 37
Empirical Tuning Methods Ziegler-Nichols Interpretation of the Frequency Response Method Generally better for PID than for PI Quarter amplitude decay ratio gives poorly damped closed-loop system No tuning parameter Based on only one point on the Nyquist curve Major shortcoming of the Z-N method is that it requires that the plant be forced to oscillate with a non predictable amplitude. This can be dangerous and expensive! Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 13 / 37
Empirical Tuning Methods Ziegler-Nichols Performance of Ziegler-Nichols Method Define the normalized gain of a process as: and the normalized dead time as: k = G 0(iw u ) G 0 (0) t = D D + T where D is the dead time and T is the dominant time constant Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 14 / 37
Empirical Tuning Methods Ziegler-Nichols Performance of Ziegler-Nichols Method Small k and t: Easy to control. Other methods usually give better performance than Ziegler-Nichols Intermediate k and t: Primary range of use for Ziegler-Nichols tuning. Setpoint weighting can reduce overshoot k and t close to 1: Dynamics dominated by dead time. Ziegler-Nichols should not be used. Actually, PID should probably not be used at all. Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 15 / 37
Cohen-Coon Method Empirical Tuning Methods Cohen-Coon Method A simple model G 0 (s)= K 0e st 0 n 0 s+1 is built using the procedure below 1 With the plant in open loop, take the plant manually to a normal operating point. The plant at y(t)=y 0 for a constant u(t)=u 0. 2 At an initial time, t 0, apply a step change to the plant input, from u 0 to u (this should be in the range of 10 to 20% of full scale). 3 Record the plant output until it settles to the new operating point. Assume you obtain the curve shown below (m.s.t. stands for maximum slope tangent. This curve is known as the process reaction curve. 4 Compute the parameter model as follows: Figure 6.6 from textbook K 0 = y y 0 u u 0 ; t 0 = t 1 t 0 ; n 0 = t 2 t 1 Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 16 / 37
Cohen-Coon Method Empirical Tuning Methods Cohen-Coon Method Consider again a plant of the form G 0 (s)= K 0e st 0 n 0 s + 1 where n 0 > 0 Cohen-Coon propose the following tuning Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 17 / 37
Cohen-Coon Method Empirical Tuning Methods Cohen-Coon Method Figure 6.8 from the textbook Response is still quite sensitive to the ratio between the delay and the time constant Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 18 / 37
Empirical Tuning Methods The Good Gain Method The Good Gain Method inspired by Ziegler-Nichols oscillation method, but does not require the control loop to go into oscillations. 1 With the process close to the specified operating point, make sure the controller is a pure proportional controller. 2 Increase the proportional gain K p until the step response displays an overshoot with minimal undershoot. Note the value of the proportional as K PGG 3 Denote T ou as the time between the overshoot and the undershoot. For more details, see http://techteach.no/publications/articles/good_gain_method/good_gain_method.pdf Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 19 / 37
Empirical Tuning Methods The Good Gain Method The Good Gain Method Good gain rules for PI K C = 0.8K PGG T I = 1.5T ou Good gain rules for PID K C = 0.8K PGG T I = 1.5T ou T D = T I 4 Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 20 / 37
Empirical Tuning Methods The Good Gain Method The Good Gain Method - Theoretical Background Assume that under K PGG the closed-loop system behaves as a second-order transfer function: Kw 2 0 s s + 2zw 0 s + w 2 0 z = 0.6 would give a 10% overshoot with minimal undershoot. The period of the damped oscillation is P GG = 2p p 1 z 2 w 0 = 2p q 1 0.36w0 2 = 2p 0.8w 0 = 2T ou In Ziegler-Nichols, P ZN = 2p/w 0, i.e. P ZN = 0.8P GG = 1.6T ou. Then, T I = P ZN /1.2 = 1.33T ou In GG, to increase robustness, T I = 1.5T ou. To compensate for integral action, K c is reduced to K c = 0.8K PGG Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 21 / 37
Dahlin Controller Model-Based Methods The Dahlin Controller Developed in 1968 by Dahlin and Higham Used extensively in industry in its digital form, particularly in paper machine control systems Consider a feedback control loop with a process P(s) and controller C(s). the closed-loop system can be written as: Y(s)= P(s)C(s) 1 + P(s)C(s) Y 1 sp(s)+ 1 + P(s)C(s) W(s) with setpoint Y sp (s) and disturbance W(s). If D(s) denotes the desired closed-loop transfer function then we want to solve for C(s) such that D(s)= P(s)C(s) 1 + P(s)C(s) Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 22 / 37
Dahlin Controller Model-Based Methods The Dahlin Controller The process transfer function P can be factored into two parts: P N which contains the dead time and the right-half plane or poorly damped zeros, i.e. elements which cannot be cancelled by the controller P M which contains the minimum phase elements that can be cancelled by the controller Thus D(s)=P N (s)d (s) where D (s) is the arbitrary portion of the desired closed-loop transfer function and is usually chosen as D (s)= 1 1 + ls Solving for the controller C(s) then gives Dahlin Controller C(s)= 1 D (s) P M (s) 1 P N (s)d (s) Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 23 / 37
Predictive PI Control Model-Based Methods The Dahlin Controller Consider the process P(s)= K p 1 + Ts e sl The desired closed-loop transfer function is The Dahlin controller is then Dahlin controller for FOPDT C(s)= D(s)= e sl 1 + ls 1 + st K p (1 + ls e sl ) This can be interpreted as a PI controller with dead-time compensation. When L = 0, this becomes a simple PI controller. Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 24 / 37
Model-Based Methods Lambda Tuning for FOPDT l-tuning Recently popularized in pulp and paper industry by Bialkowski Based on the Dahlin algorithm Dead time approximated by rational transfer function If dead time L is approximated by e sl 1 sl the controller is which is a PI controller with PI l-tuning for FOPDT C(s)= 1 + st K p (l + L)s T i = T and K c = T K p (l + L) Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 25 / 37
Model-Based Methods Lambda Tuning for FOPDT l-tuning If dead time L is approximated by the controller is C(s)= e sl 1 sl/2 1 + sl/2 (1 + sl/2)(1 + st) K p s(l + l + sll/2) which can be approximated by a PID controller PID l-tuning for FOPDT C PID (s)= (1 + sl/2)(1 + st) K p s(l + l) Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 26 / 37
Model-Based Methods l-tuning Typical Recommendations for Process Industries Bialkowski 1 makes the following recommendations when using l-tuning: Flow control: l = two to three times the process time constant Temperature control: PID tuned with l slightly smaller than larger process time constant Consistency control: l > process time constant plus dead time Tank level control: l three dead times This is actually a special case of pole placement, to be seen in more details very soon! A drawback of l-tuning is that it cancels the process poles, which can give poor load disturbance rejection characteristics 1 N.J. Sell (Ed.), Process Control Fundamentals for the Pulp & Paper Industry, Tappi Press Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 27 / 37
Haalman s Method Model-Based Methods Haalman s Method Haalman has suggested choosing an "ideal" loop transfer function G l = PC and then computing the controller C = G l /P. Haalman suggests choosing This gives M s = 1.9 G l (s)= 2 3Ls e sl Note that only the dead time influences the loop transfer function. All process poles and zeros are cancelled which might lead to difficulties Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 28 / 37
Haalman s Method Model-Based Methods Haalman s Method Given the process Haalman s method gives P(s)= K p 1 + st e sl C(s)= 2(1 + st) 3K p Ls = 2T 3K p L (1 + 1 st ) which is a PI controller with K = 2T/3K p L and T i = T. (Z-N would give K = 0.9T/L and T i = 3L) Haalman s method and l-tuning would give the same when T cl = L/2 Haalman s method more reasonable when time delay L is large Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 29 / 37
Haalman s Method Model-Based Methods Haalman s Method Source: K.J. Astrom and T. Hagglund, Advanced PID Control. Published with permission of ISA. c 2009. All rights reserved. Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 30 / 37
Haalman s Method Model-Based Methods Haalman s Method A problem with Haalman method is that it cancels all the poles and zeros. Cancelling all poles and zeros may be bad. Consider the plant G(s)=e sl /(1 + st) with the PI controller C(s)=K(1 + st)/st, then we can write du(t) dt dy(t) dt dy(t) = K dt = 1 (u(t L) y(t)) T + y(t) = K u(t L) T T With initial conditions y(0)=1 and u(t)=0 for L < t < 0 the open-loop response is y o (t)=e t/t In closed-loop, equations above show that u(t)=0, hence y cl = y ol The controller does nothing to reduce the error! We will discuss this phenomenon in more details when presenting the Q-design This is a problem for all design methods that cancel all process poles. Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 31 / 37
Haalman Method Model-Based Methods Haalman s Method Source: K.J. Astrom and T. Hagglund, Advanced PID Control. Published with permission of ISA. c 2009. All rights reserved. Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 32 / 37
Model-Based Methods Internal Model Control Procedure Internal Model Control The IMC is a general control design procedure It factorizes the plant model G 0 (s) into an invertible minimum-phase G m (s) part and a non-invertible all-pass G a (s) part We then choose G 0 (s)=g m (s)g a (s) T(s)=F(s)G a (s) where F(s) is a low-pass filter typically of the form F(s)=1/(t c s + 1) n Knowing that T = G 0 C/(1 + G 0 C) we can solve for C IMC Controller C(s)=G m (s) 1 1 F(s) G a (s) By making assumptions about G 0 (s), we can obtain PI and PID controllers. Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 33 / 37
Skogestad s IMC Rules Model-Based Methods SIMC-PID SIMC Rules According to the author, "probably the best simple PID tuning rules in the world" a a S. Skogestad. Simple analytic rules for model reduction and PID controller tuning. J. Process Control, 13 (2003): 291-309. Given a closed-loop system, the complementary sensitivity function T(s) is specified as T(s)= C(s)G(s) 1 + C(s)G(s) = 1 1 + t c s e ts With G(s)=K/(1 + t 1 s)(1 + t 2 s), where t 1 >> t 2 and approximating the delay as e ts = 1 ts, this gives a series-form PID: C(s)= (1 + t 1s)(1 + t 2 s) K(t c + t)s Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 34 / 37
Skogestad s IMC Rules Model-Based Methods SIMC-PID The straight IMC rule thus gives K c = 1 K t 1 (t c + t) = 1 1 K 0 (t c + t) ; T I = t 1 ; T D = t 2 A problem with this choice of T I is that although it works well for set point changes, when t 1 >> t, it is sluggish in rejecting load disturbances. Skogestad thus proposes to instead choose T I as T I = min(t 1,4(t c + t)) Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 35 / 37
Skogestad s IMC Rules Model-Based Methods SIMC-PID Table: SIMC PID Tuning Rules 2 G(s) K c T I T D Ke ts 1 t 1 K (t c +t) min(t 1,4(t c + t)) (1+t 1 s) Ke ts (1+t 1 s)(1+t 2 s) Ke ts s Ke ts s(1+t 2 s) 1 K 1 K 1 K Ke ts s 2 1 K t 1 (t c +t) min(t 1,4(t c + t)) t 2 1 (t c +t) 4(t c + t) 1 (t c +t) 4(t c + t) t 2 1 4(t c +t) 2 4(t c + t) 4(t c + t) 2 The derivative time is for the series form PID controller Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 36 / 37
Summary Model-Based Methods SIMC-PID Limit PID to control of low-order systems and systems with small delay Model-based tuning methods are preferrable to empirical ones Dahlin control design, Haalman s method and IMC are simple to use but cancel all process poles These are special cases of more general design techniques Pole placement Q-design We shall study those techniques in details Guy A. Dumont (UBC EECE) EECE 460 PID Tuning January 2012 37 / 37