Chemical Engineering Science 57 (2002) 3005 – 3011
www.elsevier.com/locate/ces
Closedloopautomatic 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 proportionalintegralderivative (PID) type are still popular in the process control industry de spite advances and increasing sophistication in the socalled 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 hierarchi cally based on PID control. The continued success of this controller provides a strong testimony to the ruleofthumb 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 in dustrial applications. The reason is that it has a simple struc ture which is easy to be understood by the engineers, and under practical conditions, it has been performing more re liably 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.: +6568742110; fax: +6567791103. Email address: eletankk@nus.edu.sg (K. K. Tan).
Hang, & Cao, 1995). For nonlinear systems, adaptive con trol methods are rampantly suggested and used in the lit erature (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 prerequisites 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 signi cant e ort and resources used in the implementation of adaptive con trol schemes. Gain scheduling and robust high gain control are possible alternatives to adaptive control algorithms (Ji awen & Brosilow, 1998; KuangHsuan & Shamma, 1998). In this paper, we rst propose a robust control system, in volving 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 con gura tion may be viewed as PID control augmented with a slid ing 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 PIDrelay construct. The relay may be reinvoked for retuning purposes following changes in setpoints or changes in the timevarying system
00092509/02/$  see front matter ? 2002 Elsevier Science Ltd. All rights reserved. PII: S 00092509(02)001860
3006
K. K. Tan et al. / Chemical Engineering Science 57 (2002) 3005–3011
Fig. 1. Con guration of the robust control scheme.
dynamics, similar to the way an autotuning relay is used (Astrom & Hagglund, 1995). Robustness analysis will be provided in the paper to illustrate the robust stability prop erties 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 con guration of the robust control scheme is shown in Fig. 1, which comprises of a relay connected in parallel with a PID controller G _{c} (henceforth called the PIDrelay construct) for the robust control of a nonlinear system G _{p} . It may be viewed as a PID controller augmented with a slid ing 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 inade quacy through its high gain incorporated into the feedback loop. The price to pay is the emergence of control chat tering in the closed loop, which in many cases should not be allowed to persist inde nitely due to potential damages caused to the nal control elements. However, as will be il lustrated in this section, the chattering signals can be used in the tuning of an equivalent robust PID controller which may subsequently replace the PIDrelay construct. Consider a class of nonlinear systems described by
(1)
y = ay˙ + by + cv + f(y; y˙);
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 f _{M} . De ne the error between the desired trajectory r (which is twice di erentiable) and the system output y
(2)
e = r − y:
Under the proposed structure of Fig. 1, the control signal v is given by
v
= d sgn(e) + k _{p} e + k _{i} t e d + k _{d} e;˙
0
(3)
where sgn(:) is the usual sign operator, k _{p} , k _{i} and k _{d} are the respective gains of the PID controller, and d denotes the relay amplitude.
For closedloopcontrol based on model (1) under control (3), it follows that
e = ae˙ + be − ck _{p} e − ck _{i} t e d
0
− ck _{d} e˙ − cd sgn(e) − f(x; x˙) + f _{d} ;
(4)
where f _{d} = r − ar˙ − br. Letting
z
= t e d ; e; e˙ T ;
0
and formulating (4) into a matrix form, we have
z˙ = Az + B[D(t) − f(x; x˙) + f _{d} ];
where
A =
01
00
−ck _{i}
b − ck _{p}
B = 0 _{}
0
1
0
1
a − ck _{d}
_{}
;
(5)
(6)
(7)
(8)
(9)
Assume that the PID parameters k _{p} ; k _{i} ; k _{d} and the relay am plitude d can be tuned to ensure the dominant system to be stable. This implies that A is a stable matrix. Thus, the fol lowing Lyapunov equation will hold:
(10)
A ^{T} P + PA = −I;
D(t) = −cd sgn(e):
where I is the unit matrix.
Theorem 1. Assume that system (1) admits a relayinduced oscillation under the setup proposed. Then; if the PID parameters are tuned properly; the state z is uniformly bounded.
Proof. De ne the Lyapunov function
V
The derivative of V is given by
= z ^{T} Pz:
˙
V
= z ^{T} (A ^{T} P + PA)z + 2z ^{T} PBD(t)
−2z ^{T} PBf(y; y˙)+2z ^{T} PBf _{d}
= − z ^{2} + 2z ^{T} PBD(t) − 2z ^{T} PBf(y;
(11)
y˙)+2z ^{T} PBf _{d} :
(12)
Note that f(y; y˙) 6 f _{M} and f _{d} 6 f _{d}_{M} . Thus; we have
−
2z ^{T} PBf(y; y˙) 6 z ^{T} PBB ^{T} Pz + ^{1} _{} f ^{2}
6
z ^{T} PBB ^{T} Pz +
^{1} _{} f _{M} ;
2
(13)
K. K. Tan et al. / Chemical Engineering Science 57 (2002) 3005–3011
3007
2z ^{T} PBf _{d} 6 z ^{T} PBB ^{T} Pz
+ ^{1} _{} f
2
d
6
z ^{T} PBB ^{T} Pz +
^{1} _{} f _{d}_{M} ;
2
(14)
where is an arbitrary constant. Therefore, it follows that
= D _{M} ; assgn(e) 6 1: (15)
Now the term 2z ^{T} PBD(t) can be expressed approximately as
2z ^{T} PBD(t) 6 z ^{T} PBB ^{T} Pz
D(t) 6 cdsgn(e) = cd
+ ^{1} _{}
1
D ^{2} (t)
2
6
z ^{T} PBB ^{T} Pz +
^{D}
_{M} :
(16)
The following derivative of V is thus obtained:
˙
V
6 − z ^{2} +
3 _{m}_{a}_{x} (PBB ^{T} P) z ^{2}
^{+} 1 ^{f} ^{M} ^{+} 1 ^{f}
2
2
dM ^{+}
1
^{D}
2
M
= −[1 − 3 _{m}_{a}_{x} (PBB ^{T} P)] z ^{2}
^{+} 1 ^{f} ^{M} ^{+} 1 ^{f}
2
^{D} _{M} :
Let = 1 − 3 _{m}_{a}_{x} (PBB ^{T} P) and choose subject
0 ¡ ¡ 1=3 _{m}_{a}_{x} (PBB ^{T} P). Since _{m}_{i}_{n} (P) z ^{2} 6 V 6 _{m}_{a}_{x} (P) z ^{2} , it follows that
2
dM ^{+}
1
2
(17)
to
˙
V 6 −
(P) ^{V} ^{+} 1 ^{f} ^{M} ^{+} 1 ^{f}
^{}
2
max
dM ^{+} ^{1}
2
2
M
^{D}
=
−
^{} _{(}_{P}_{)}
max
V
+ _{0} ;
where _{0} = 1= f _{M} + 1= f _{d}_{M} + 1= D M ^{.} Hence,
2
2
2
V(t) 6 ^{} ^{0} ^{} ^{m}^{a}^{x} ^{(}^{P}^{)}
+ V (0) − ^{} ^{0} ^{} ^{m}^{a}^{x} ^{(}^{P}^{)} e ^{−}
_{m}_{a}_{x} (P) ^{t} _{:}
(18)
(19)
For state z, it thus follows that
z 6 ^{} ^{0} _{m}_{i}_{n} ^{} ^{m}^{a}^{x} (P) ^{(}^{P}^{)}
+ V (0) − ^{} ^{0} _{m}_{i}_{n} ^{} ^{m}^{a}^{x} (P) ^{(}^{P}^{)}
_{e} − =( _{m}_{a}_{x} (P))t _{:}
(20)
This implies that
_{t}_{→}_{∞} z(t) = ^{} ^{0} ^{} ^{m}^{a}^{x} ^{(}^{P}^{)} ;
lim
_{m}_{i}_{n} (P)
(21)
i.e., state z is bounded under the condition of Theorem 1.
3. Automatic tuning of an equivalent PID controller
The main idea, to be pursued in this section, is to approx
imate the parallel PIDrelay construct with an equivalently
˜
tuned PID controller G _{c} as shown in Fig. 2.
Fig. 2. Equivalent PID controller.
Fig. 3. Spherical tank.
The RLS tting method is applied to the input and out put chattering signals of the PIDrelay 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) = K _{p} e + K _{i} t e dt + K _{d}
0
de
dt
:
(22)
The equation can be written in a matrix form as
v(t) = e
t e dt
0
^{d}^{e}
dt
^{} K p
K i
K
d
_{}
:
(23)
Eq. (23) can be written in the linearinthe parameters form as
v(t) = (t) ^{T} ; 

where 

(t) = 
K p K i K d 
3008
K. K. Tan et al. / Chemical Engineering Science 57 (2002) 3005–3011
Fig. 4. Simulation results (a) control signal and (b) closedloopperformance (1) PIDrelay controller, (2) equivalent PID controller.
Fig. 5. Simulation results (a) control signal (b) closedloop performance at di erent operating level of the tank using the equivalent PID controller.
and
^{T} = e
t e dt
0
^{d}^{e} :
dt
The RLS algorithm with a time varying forgetting factor can be directly used here as v _{t} and ^{T} are available, the update of (t) can be expressed as
(24)
(t) = (t − 1) + K(t) (t);
where (t − 1) refers to the controller settings identi ed during the last cycle, (t) and K(t) are the error signal and Kalman gain vector, where
(t) = v(t) − ^{T} (t − 1); 
(25) 
K(t) = P(t − 1) ( I + ^{T} P(t − 1) ) ^{−}^{1} ; 
(26) 
P(t)=(I − K(t) ^{T} )P(t − 1)= : 
(27) 
K. K. Tan et al. / Chemical Engineering Science 57 (2002) 3005–3011
3009
Fig. 6. Closedloopperformance under the in uence of measurement noise.
Fig. 7. Closedloopperformance 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 P _{0} = I , where is a large number (10 ^{4} –10 ^{6} ) and I is the identity matrix. (0) may be set to be the gains of the PID controller before tuning. The robust control con guration, comprising of the relay and the PID controller, puts a high gain in the loop and en
sures satisfactory closedloopperformance. Although it in curs 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 iden ti cation 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) 3005–3011
Fig. 8. Comparison of closedloop 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 relayplusPID con troller in the least squares sense. As such, in terms of actual performance and robustness, a degradation is expected with the equivalent controller. The favorable tradeo the chat tering 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 con troller 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 rstorder di erential equation
Q _{i} (t) − Q _{o} = R ^{2} 1 − ^{(}^{R} ^{−} ^{y}^{)} ^{2}
R ^{2}
^{} dy
dt ^{;}
where R is the radius of the spherical tank and the di erence between the in ow Q _{i} and out ow Q _{o} causes the water level y to rise or fall in a manner described by the nonlinear rstorder di erential equation above. Q _{i} 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 topand the bottom of the tank, but slowest at the middle, as be ts intuition. The out ow
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} = c _{d} ^{} 2g(y − y _{o} ):
In this simulation, the following parameters with respect to the spherical tank and the relay are selected; R = 1, c _{d} = 1,
= 1, y _{o} = 0:1, and d = 0:25. Fig. 4 shows the closedloop performance of the proposed control system for the two control schemes. The response (marked ‘1’) corresponds to the use of the PIDrelay con struct, 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 closedloopperformance based on the proposed equivalent PID controller, corresponding to dif ferent operating level of the spherical tank. Three setpoint changes to di erent desired level are simulated, each fol lowed 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 signi  cant 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 magni ed 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) 3005–3011
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). Selftuning 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 speci cation. Automatica, 31, 497–
502.
Jiawen, D., & Brosilow, C. B. (1998). Nonlinear PI and gainscheduling. American control conference, Proceedings of the 1998, Vol. 1 (pp. 323–327). KuangHsuan, T., & Shamma, J. S. (1998). Nonlinear gainscheduled control design using setvalued 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), 152–155. Zhang, T., Ge, S. S., & Hang, C. C. (2000). Stable adaptive control for a class of nonlinear systems using a modi ed Lyapunov function. IEEE Transactions on Automatic Control., 45(1), 129–132.
Much more than documents.
Discover everything Scribd has to offer, including books and audiobooks from major publishers.
Cancel anytime.