Você está na página 1de 7

Chemical Engineering Science 57 (2002) 3005 3011

www.elsevier.com/locate/ces

Closed-loop automatic tuning of PID controller for nonlinear systems


K. K. Tan , R. Ferdous, S. Huang
Department of Electrical and Computer Engineering, National University of Singapore, 4 Engineering Drive 3, Singapore 117576, Singapore Received 15 October 2001; received in revised form 20 April 2002; accepted 1 May 2002

Abstract In this paper, a robust control system is rst proposed which is suitable for the control of a class of nonlinear systems. A parallel connection of a relay to a proportional integral derivative (PID) controller collectively forms the robust controller. The relay ensures robust control by providing a high feedback gain, but it also induces a control chattering phenomenon. Instead of viewing chattering as an undesirable yet inevitable feature, the chattering signals are used as natural excitation signals for identifying an equivalent PID controller using the recursive least squares algorithm. No other explicit input signal is required. Analysis is provided on the stability properties of the control scheme. Simulation results for the level control of uid in a spherical tank using the scheme are presented. ? 2002 Elsevier Science Ltd. All rights reserved.
Keywords: Nonlinear systems; Robust performance; PID control; Automatic tuning; Relay; Least squares estimation

1. Introduction Controllers of the proportional-integral-derivative (PID) type are still popular in the process control industry despite advances and increasing sophistication in the so-called mathematical control system theory. PID control is often combined with logic, sequential machines, selectors, and function blocks to build complicated automation systems, such as those used for energy production, transportation, and manufacturing. Many sophisticated control strategies, such as model predictive control, are also organized hierarchically based on PID control. The continued success of this controller provides a strong testimony to the rule-of-thumb in engineering practice, the TSTF (try simple things rst) principle. Indeed, the PID controller has probably the most impressive record in terms of the number of successful industrial applications. The reason is that it has a simple structure which is easy to be understood by the engineers, and under practical conditions, it has been performing more reliably compared to more advanced and complex controllers. A multitude of approaches towards the design of PID control for linear systems has been reported over the years (Astrom & Hagglund, 1988, 1995; Gawthrop, 1986; Ho,

Corresponding author. Tel.: +65-6874-2110; fax: +65-6779-1103. E-mail address: eletankk@nus.edu.sg (K. K. Tan).

Hang, & Cao, 1995). For nonlinear systems, adaptive control methods are rampantly suggested and used in the literature (Zhang, Ge, & Hang, 2000; Ordonez & Passino, 2001). However, one should be careful of the possible abuse of adaptive schemes, which being inherently nonlinear, is much more complicated than a xed gain regulator. Under the harsh realities of a practical control environment, the pre-requisites for e ective application of adaptive control can be easily breached, yielding results which are far from satisfactory, and in many cases, worse than that achievable by PID control. This is despite of the more signicant e ort and resources used in the implementation of adaptive control schemes. Gain scheduling and robust high gain control are possible alternatives to adaptive control algorithms (Jiawen & Brosilow, 1998; Kuang-Hsuan & Shamma, 1998). In this paper, we rst propose a robust control system, involving the use of a relay in parallel with a PID controller, to provide a high gain feedback system which may be used for the robust control of nonlinear systems. The conguration may be viewed as PID control augmented with a sliding mode. The chattering signals, incurred as a consequence of the relay, are used in a recursive least squares (RLS) algorithm to autotune an equivalent robust PID controller which may then replace the parallel PID-relay construct. The relay may be re-invoked for re-tuning purposes following changes in set-points or changes in the time-varying system

0009-2509/02/$ - see front matter ? 2002 Elsevier Science Ltd. All rights reserved. PII: S 0 0 0 9 - 2 5 0 9 ( 0 2 ) 0 0 1 8 6 - 0

3006

K. K. Tan et al. / Chemical Engineering Science 57 (2002) 30053011

For closed-loop control based on model (1) under control (3), it follows that e = ae + be ckp e cki
t 0

ed (4)

ckd e cd sgn(e) f(x; x) + fd ; where fd = r ar br. Letting


Fig. 1. Conguration of the robust control scheme.
t 0 T

z=

e d ; e; e

(5)

dynamics, similar to the way an auto-tuning relay is used (Astrom & Hagglund, 1995). Robustness analysis will be provided in the paper to illustrate the robust stability properties of the control scheme. Simulation results are provided to illustrate the e ectiveness of the proposed control scheme when applied to the level control of uid in a spherical tank. 2. Robustness analysis The conguration of the robust control scheme is shown in Fig. 1, which comprises of a relay connected in parallel with a PID controller Gc (henceforth called the PID-relay construct) for the robust control of a nonlinear system Gp . It may be viewed as a PID controller augmented with a sliding mode, thus yielding a high gain feedback system which can ensure robust performance even in the face of modelling errors. The PID control may be tuned just based on a linear model, and the relay will compensate for possible inadequacy through its high gain incorporated into the feedback loop. The price to pay is the emergence of control chattering in the closed loop, which in many cases should not be allowed to persist indenitely due to potential damages caused to the nal control elements. However, as will be illustrated in this section, the chattering signals can be used in the tuning of an equivalent robust PID controller which may subsequently replace the PID-relay construct. Consider a class of nonlinear systems described by y = ay + by + cv + f(y; y); (1) where y and y are assumed to be limited, and therefore, the nonlinear part described by f(y; y) is assumed to be bounded, i.e., f(y; y) 6 fM . Dene the error between the desired trajectory r (which is twice di erentiable) and the system output y e = r y: (2) Under the proposed structure of Fig. 1, the control signal v is given by v = d sgn(e) + kp e + ki
t 0

and formulating (4) into a matrix form, we have z = Az + B[D(t) f(x; x) + fd ]; where 0 1 0 b ckp 0 1 a ckd (8) (9) ; (7) (6)

A= 0 cki 0 B=0 1

D(t) = cd sgn(e):

Assume that the PID parameters kp ; ki ; kd and the relay amplitude d can be tuned to ensure the dominant system to be stable. This implies that A is a stable matrix. Thus, the following Lyapunov equation will hold: AT P + PA = I; where I is the unit matrix. Theorem 1. Assume that system (1) admits a relay-induced oscillation under the setup proposed. Then; if the PID parameters are tuned properly; the state z is uniformly bounded. Proof. Dene the Lyapunov function V = z T Pz: The derivative of V is given by V = z T (AT P + PA)z + 2z T PBD(t) 2z T PBf(y; y) + 2z T PBfd = z
2

(10)

(11)

+ 2z T PBD(t) 2z T PBf(y; y) + 2z T PBfd : (12)

e d + kd e;

(3)

Note that f(y; y) 6 fM and fd 6 fdM . Thus; we have 2z T PBf(y; y) 6 z T PBBT Pz + 6 z T PBBT Pz + 1 2 f 1 2 f ; M (13)

where sgn(:) is the usual sign operator, kp , ki and kd are the respective gains of the PID controller, and d denotes the relay amplitude.

K. K. Tan et al. / Chemical Engineering Science 57 (2002) 30053011

3007

2z T PBfd 6 z T PBBT Pz + 6 z T PBBT Pz +

1 2 f d (14)

1 2 f ; dM where is an arbitrary constant. Therefore, it follows that D(t) 6 cd|sgn(e)| = cd = DM ; as|sgn(e)| 6 1:

(15)

Fig. 2. Equivalent PID controller.

Now the term 2z T PBD(t) can be expressed approximately as 1 2z T PBD(t) 6 z T PBBT Pz + D2 (t) 1 2 D : M The following derivative of V is thus obtained: V 6 z 2 + 3 max (PBBT P) z 2 6 z T PBBT Pz + + 1 2 1 1 f + f 2 + D2 M dM M
max (PBB T

(16)

= [1 3 +

P)] z

1 2 1 2 1 2 fM + fdM + DM :

(17)

Let = 1 3 max (PBBT P) and choose subject to 2 0 1=3 max (PBBT P). Since 6V 6 min (P) z 2 max (P) z , it follows that 1 2 1 2 1 2 V + fM + fdM + DM V 6 max (P) =
max (P)

V+

0;

(18)

Fig. 3. Spherical tank.

2 2 2 where 0 = 1=fM + 1=fdM + 1=DM . Hence, 0 max (P) 0 max (P) e V (t) 6 + V (0)

max (P)

: (19)

The RLS tting method is applied to the input and output chattering signals of the PID-relay construct (directly in the time domain) to yield the gains of the equivalent PID controller. The equivalent PID controller of this form is described by v(t) = Kp e + Ki
t 0

For state z, it thus follows that z 6


0 max (P) min (P)

+ V (0)

0 max (P) min (P)

e dt + Kd

e =(

max (P))t

de : dt

(22)

(20) This implies that


t 0 max (P) ; min (P)

lim z(t) =

(21)

The equation can be written in a matrix form as Kp t de e dt v(t) = e Ki : dt 0 Kd

(23)

i.e., state z is bounded under the condition of Theorem 1.

Eq. (23) can be written in the linear-in-the parameters form as v(t) = (t)
T

3. Automatic tuning of an equivalent PID controller The main idea, to be pursued in this section, is to approximate the parallel PID-relay construct with an equivalently tuned PID controller G c as shown in Fig. 2.

where

(t) = Ki Kd

Kp

3008

K. K. Tan et al. / Chemical Engineering Science 57 (2002) 30053011

Fig. 4. Simulation results (a) control signal and (b) closed-loop performance (1) PID-relay controller, (2) equivalent PID controller.

Fig. 5. Simulation results (a) control signal (b) closed-loop performance at di erent operating level of the tank using the equivalent PID controller.

and
T

= e

t 0

de : e dt dt

where (t 1) refers to the controller settings identied during the last cycle, (t) and K(t) are the error signal and Kalman gain vector, where (t) = v(t)
T

The RLS algorithm with a time varying forgetting factor can be directly used here as vt and T are available, the update of (t) can be expressed as (t) = (t 1) + K(t) (t); (24)

(t 1);
T

(25) P(t 1) )1 ; (26) (27)

K(t) = P(t 1) ( I + P(t) = (I K(t)


T

)P(t 1)= :

K. K. Tan et al. / Chemical Engineering Science 57 (2002) 30053011

3009

Fig. 6. Closed-loop performance under the in uence of measurement noise.

Fig. 7. Closed-loop performance based on a xed PID setting.

is a forgetting factor (0 1). There are two matrices to be initialized for the recursive algorithm, P(0) and (0). It is usual to initialize P(0) such that P0 = I , where is a large number (104 106 ) and I is the identity matrix. (0) may be set to be the gains of the PID controller before tuning. The robust control conguration, comprising of the relay and the PID controller, puts a high gain in the loop and en-

sures satisfactory closed-loop performance. Although it incurs a chattering phenomenon, the chattering signals have been used as naturally arising signals to automatically tune an equivalent PID controller. No other explicit and deliberate excitation signals are needed, sparing the usual tedious identication exercise necessary for control tuning. However, it should be acknowledged that the equivalent PID controller

3010

K. K. Tan et al. / Chemical Engineering Science 57 (2002) 30053011

Fig. 8. Comparison of closed-loop performance (1) xed PID controller, (2) proposed control system.

chosen remains a linear controller. It is only tuned to the the closest equivalence to the original relay-plus-PID controller in the least squares sense. As such, in terms of actual performance and robustness, a degradation is expected with the equivalent controller. The favorable trade-o the chattering phenomenon will be eliminated with the equivalent PID controller. An existing ongoing work considers instead the use of a nonlinear PID controller as the equivalent controller to reap further performance improvement. 4. Simulation study To illustrate the performance attainable with the proposed control system, a simulation study is carried out on the level control of uid in the classical spherical tank system. This uid level control problem is a common one associated with storage tanks, and blending and reaction vessels in the process industries. The spherical tank system is shown in Fig. 3, it is essentially a system with nonlinear dynamics. The spherical tank has nonlinear dynamics described by the rst-order di erential equation Qi (t) Qo = R2 1 (R y)2 dy ; R2 dt

of the tank is dependent on the water level in line with the Bernoulli equation which states that the out ow of a tank is proportional to the square root of the height of the uid level: Q o = cd 2g(y yo ):

where R is the radius of the spherical tank and the di erence between the in ow Qi and out ow Qo causes the water level y to rise or fall in a manner described by the nonlinear rst-order di erential equation above. Qi can be manipulated via a pump and it is thus the manipulated variable here. From the expression, it can be seen that the rise time of the water level is fastest at the top and the bottom of the tank, but slowest at the middle, as bets intuition. The out ow

In this simulation, the following parameters with respect to the spherical tank and the relay are selected; R = 1, cd = 1, = 1, yo = 0:1, and d = 0:25. Fig. 4 shows the closed-loop performance of the proposed control system for the two control schemes. The response (marked 1) corresponds to the use of the PID-relay construct, while the response (marked 2) corresponds to the use of the equivalent PID controller, automatically tuned from the e and v signal based on the method presented in Section 4. Fig. 5 shows the closed-loop performance based on the proposed equivalent PID controller, corresponding to different operating level of the spherical tank. Three setpoint changes to di erent desired level are simulated, each followed by the simulation of a static load disturbance (with an amplitude roughly 10% of the setpoint changes) seaping in. Fig. 6 shows the response to the same set of setpoint changes, but they now occur under the in uence of signicant measurement noise. The performance is compared to that achieved by a PID controller with xed gains. This PID controller is tuned at the mid level of the spherical tank. The control performance is shown in Fig. 7. Fig. 8 provides a magnied illustration of the response to a setpoint change to show the improved performance of the robust scheme, both in setpoint tracking and load regulation.

K. K. Tan et al. / Chemical Engineering Science 57 (2002) 30053011

3011

5. Conclusion A robust control system is proposed which is suitable for the control of nonlinear systems, comprising of a parallel connection of a relay to a PID controller. The relay ensures robust control by providing a high feedback gain, but it also induces a control chattering phenomenon. The chattering signals are used as a natural excitation signal for identifying an equivalent PID controller using the RLS algorithm. No other explicit input signal is required. Analysis shows the robust stability properties of the control scheme. Simulation results on a spherical tank level control further illustrate the practical applicability of the scheme. References
Astrom, K. J., & Hagglund, T. (1988). Automatic tuning of PID controllers. Research Triangle Park, NC: Instrument Society of America.

Astrom, K. J., & Hagglund, T. (1995). PID controllers: Theory, design and tuning. Research Triangle Park, NC: Instrument Society of America. Gawthrop, P. J. (1986). Self-tuning PID controllers: Algorithms and implementations IEEE Transaction on Automatic Control, 31(3), 201. Ho, W. K., Hang, C. C., & Cao, L. S. (1995). Tuning of PID controllers based on gain and phase margin specication. Automatica, 31, 497 502. Jiawen, D., & Brosilow, C. B. (1998). Nonlinear PI and gain-scheduling. American control conference, Proceedings of the 1998, Vol. 1 (pp. 323327). Kuang-Hsuan, T., & Shamma, J. S. (1998). Nonlinear gain-scheduled control design using set-valued methods. American control conference, Proceedings of the 1998, Vol. 2 (pp. 1195 1199). Ordonez, R., & Passino, K. M. (2001). Adaptive control for a class of nonlinear systems with a Time varying structure. IEEE Transactions on Automatic Control, 46(1), 152155. Zhang, T., Ge, S. S., & Hang, C. C. (2000). Stable adaptive control for a class of nonlinear systems using a modied Lyapunov function. IEEE Transactions on Automatic Control., 45(1), 129132.