ARTICLE IN PRESS
Journal of the Franklin Institute 343 (2006) 204–209 www.elsevier.com/locate/jfranklin
Short communication
Parameter estimation of an unstable system with a PID controller in a closed loop configuration E. Cheres Planning Development and Technology Division, Israel Electric Corporation, P.O.B. 10, Haifa 31000, Israel Received 24 July 2005
Abstract An essential part of the auto-tuning control involves parameter estimation of a suitable low order model. Since a common way to control an unstable system is via a PID controller, there is a growing interest in the application of new PID-based algorithms for the identification task. In this light the relative advantages of two recently published methods are investigated. The first method is based on typical data of the reaction curve and the time delay is measured directly from the initial portion of the curve. The second method utilizes a least-squares algorithm to get an equivalent time delay together with the values of the other parameters. Thus, the obtained time delay approximates not only the true delay but also part of the nonlinear and the higher order dynamics. This is an advantage when a PID auto-tuning is sought. Two examples are provided to demonstrate and compare between the results of the methods. r 2005 The Franklin Institute. Published by Elsevier Ltd. All rights reserved. Keywords: Parameter estimation; PID control; Unstable system; Time delay
1. Introduction PID controllers are required to stabilize and reduce overshoots of unstable systems [1]. Thus the auto tuning of PID controllers with unstable system in a closed loop is of interest. An essential part of this tuning involves parameter estimation (PE) of a suitable low order model. Recently, two methods for the PE of unstable system were published. The first method suggested by Ananth and Chidambaram (AC) [1] is based on the closed loop reaction curve characteristics. The approach taken is to model the system as a first order E-mail address:
[email protected]. 0016-0032/$30.00 r 2005 The Franklin Institute. Published by Elsevier Ltd. All rights reserved. doi:10.1016/j.jfranklin.2005.09.007
ARTICLE IN PRESS E. Cheres / Journal of the Franklin Institute 343 (2006) 204–209
205
unstable model with time delay, where the time delay amount is directly measured from the reaction curve. Thus the advantage of introducing a time delay for the approximation of a high order system (equivalent delay) [2] is lost. The second method is a least squares one and the PE is formulated in the frequency domain (PEFD) [3]. The obtained algorithm is linear and the estimated delay approximates part of the system dynamics. Two examples are provided to show the success of the PEFD method where the AC one fails. These demonstrate the advantages of the PEFD method over the AC one, as far as PE-based control is required. 2. The AC method [1] A step change in the set point is issued and the closed-loop response is recorded. The recorded curve is characterized by the first three extreme points yp1 ; ym1 ; yp2 , the damped period of oscillation DT, and the time delay. All these values are directly measured from the reaction curve. The process dynamics is modeled as a first order with time delay dynamics, i.e. GðsÞ
km esL , as 1
(1)
where km is the model gain, L the time delay, a the time constant and s the Laplace operator. Since the time delay and settings of the PID controller are known the step response of the modeled closed loop is a function of ½km ; a alone. The expressions relating yp1 ; ym1 ; yp2 ; DT with ½km ; a are known and the estimated values are derived from them. For a detailed description, see Ref. [1]. 3. The PEFD method [3] The controller data is utilized to obtain the inverse frequency response of the unstable system from the closed-loop one. Utilizing the independence of the Fourier transform amplitude to time delay changes, two least-squares costs are established. This reduces the complexity of the estimation problem and yields a linear PE algorithm. A PID controller with a reference free derivative action (PIDrf) is used with the AC method. This requires one to modify the PEFD algorithm as follows. Firstly, the process dynamics is modeled as a first order with time delay dynamics (1). Next the PIDrf transfer function is introduced,i.e. UðsÞ CðsÞEðsÞ skc DY ðsÞ,
(2a)
CðsÞ ¼ kc ð1 þ RsÞ,
(2b)
where E is the feedback error, Y the controlled variable, R the reset rate, D the derivative factor, and kc the controller gain. The modeled closed-loop transfer function is then calculated as MðsÞ
GðsÞCðsÞ 1 þ GðsÞðCðsÞ þ skc DÞ
(3)
ARTICLE IN PRESS E. Cheres / Journal of the Franklin Institute 343 (2006) 204–209
206
from which one obtains 1 1 R ¼ kc 1 1þ sD . GðsÞ MðsÞ s
(4)
Let us designate the frequency response of the control loop closing the process and controller as f c ðjo Þ. The inverse frequency response of the process is therefore: 1 R 1 1þ f ðjoÞ kc joD . (5) f c ðjoÞ jo The terms of the model gain and the time constant which minimize the difference between the squared amplitude of the model and the process inverse frequency response are sought. Following the derivation in Ref. [3] one has X X X jf ðjoÞj4 a2 o2 jf ðjoÞj2 ¼ jf ðjoÞj2 , (6a) k2m o
k2m
X
o
jf ðjoÞj2 o2 a2
o
o
X
o4 ¼
o
X
o2 .
(6b)
o
From these linear equations in a2 and k2m , a and km are obtained. Finally a least-squares phase estimator is used to obtain the delay expression: P ½arg f ðjoÞ argðjao 1Þo P 2 L¼ o . oo
(6c)
Remarks: 1. The algorithm is developed for a positive model gain. If the system gain is negative use argðf ðjoÞÞ in Eq. (6c). 2. The high limit of the sum should be set close to the critical frequency of the closed loop.
4. Application to a bioreactor A nonlinear continuous bioreactor, which exhibits output multiplicity, is given by [1]: dX ¯ , ¼ ðm DÞX dt dS ¯ 2:5mX , ¼ ð4 SÞD dt 0:53S m¼ . 0:12 þ S þ 0:4545S2 ¯ ¼ 0:3 (and not 0.36 as is specified in Ref. [1]), the bioreactor has three In case of D multiple steady states. It is desired to operate the reactor around the unstable steady state ¯ is the manipulated variable, the cell (X ¼ 0:9951 and S ¼ 1:5122). The dilution rate ðDÞ mass concentration (X) is the controlled one and S is the concentration of the substrate. A delay of 1 h is added to the measurement of X to simulate the output delay due to the analytical instrument and procedures. A PIDrf with the following settings: kc ¼ 0:7356;
R ¼ 0:25;
D ¼ 0:2
(7)
ARTICLE IN PRESS E. Cheres / Journal of the Franklin Institute 343 (2006) 204–209
207
is used to control the process [1]. A step change from 0.9951 to 1.194 is introduced in the concentration reference and the X response is simulated using MATLAB SIMULINK and ode45 variable-step solver [4]. The response is recorded at a rate of 10 samples/h, and the following points are obtained: yp1 ¼ 0:4241; ym1 ¼ 0:1831; yp2 ¼ 0:2077; DT ¼ 6:6; L ¼ 1. Thus the AC algorithm results with km ¼ 18:16;
a ¼ 16:05;
L ¼ 1.
(8)
Five equally spaced frequency points are calculated up to a circular frequency of 0.98 rad/h. This five points vector f c ðjoÞ is used in Eqs. (6) to obtain km ¼ 5:48;
a ¼ 4:51;
L ¼ 0:92.
(9)
The step responses of the models and the bioreactor with the PIDrf (7) in a closed loop are presented in Fig. 1(a). In Fig. 1(b) the results of the simulation with a different PIDrf setting [1]: kc ¼ 0:2825;
R ¼ 1=10:25;
D ¼ 1:24
(10)
are shown. The graphs depicted in Fig. 1(a) can be thought as the results of the PE learning phase, while the ones in Fig. 1(b) are the results of the validation phase. Thus, the relative advantage of the PEFD method in producing an auto-tuning-based model for the bioreactor is clearly demonstrated.
Fig. 1. Step responses of the bioreactor and its models.
ARTICLE IN PRESS E. Cheres / Journal of the Franklin Institute 343 (2006) 204–209
208
5. Application to a second order process Consider the following unstable second order process [5]: PðsÞ ¼
e0:5s ð2s 1Þð0:5s þ 1Þ
driven by a PIDrf with the following settings: kc ¼ 2:71;
R ¼ 1=4:43;
D ¼ 0:317.
(11)
A unit step function is introduced in the closed-loop set point, and the reaction curve is sampled at 0.1 time intervals. The obtained data is yp1 ¼ 2:4687;
ym1 ¼ 0:6059;
yp2 ¼ 1:2065;
DT ¼ 6:1;
L ¼ 0:5
and the AC algorithm results with: km ¼ 0:4581;
a ¼ 0:4122;
L ¼ 0:5.
(12)
On the other hand the PEFD algorithm results with: km ¼ 1:061; a ¼ 2:545; L ¼ 1:06.
(13)
This result is obtained with five points of frequency up to a circular frequency of 1.25. Note the difference between the apparent time delay, which is used with the AC method (12) and the equivalent delay time which results from the PEFD algorithm (13). The step responses of the relevant closed loops with the PIDrf (11) are depicted in Fig. 2. The response of the PEFD closed loop is similar to the second order one, whereas the AC closed loop is marginally stable.
Fig. 2. Step responses of the second order process and its models.
ARTICLE IN PRESS E. Cheres / Journal of the Franklin Institute 343 (2006) 204–209
209
6. Conclusions The application of two recently published PE methods for the auto tuning of PIDrf controllers is discussed. Both methods use an unstable first order model to approximate the process. Relative to the PEFD method, the AC method fails to approximate a second order process and gives poor results in the auto-tuning approximation of a bioreactor control loop. The difficulties in the AC method are related to the usage of the apparent time delay instead of the equivalent one. References [1] I. Ananth, M. Chidambaram, Closed-loop identification of transfer function model for unstable systems, J. Franklin Inst. 336 (1999) 1055–1061. [2] A. Gruca, P. Bertrand, Approximation of high-order system by low-order models with delays, Int. J. Control 28 (1978) 953–965. [3] E. Cheres, A. Eydelzon, Parameter estimation of an unstable process in the frequency domain, Process Control Qual. 11 (1999) 301–305. [4] Using Simukink, The MathWorks Inc., Natick, 1999. [5] H.P. Huang, C.C. Chen, Auto-tuning of PID controllers for second order unstable process having dead time, J. Chem. Eng. Japan 32 (1999) 486–497.