0263±8762/00/$10.00+0.00 q Institution of Chemical Engineers Trans IChemE, Vol 78, Part A, March 2000
PARAMETER ESTIMATION OF A SECOND ORDER MODEL IN THE FREQUENCY DOMAIN FROM CLOSED LOOP DATA E. CHERES and A. EYDELZON Planning Development and Technology Division, The Israel Electric Corp Ltd, Haifa, Israel
T
his paper presents a method for estimation of parameters of a second order plus dead time process model. The estimation procedure is based on transforming the closed loop data into the Fourier frequency domain. Then, using a fairly pedestrian approach the transformed data is used with a linear least-squares estimator to obtain the estimated values. In contrast to former least-squares estimation methods, no iterations or search procedures are implied. This is achieved by using the PID tuning practice that regards self-regulating processes as a ®rst or second order dynamic. Thus the resulted method is attractive for self tuning controllers and related process control applications. Moreover, since closed-loop estimation is adopted, the model parameters are less sensitive to disturbances and measurement noise occurring during the test stage. However, this requires a knowledge of the controller transfer function and settings. The proposed method is applicable to both under- and overdamped closed loops and is not limited only to step test signals. Since the method is simple, its results can be compared against closed-loop reaction curve methods. This is done using a comparative basis from the literature. Keywords: closed loop; frequency domain; parameter estimation; second order model; linear estimator
INTRODUCTION
during the test stage. Also, the LS cost functions for SODT models have multiple minima7. The minimization of the LS cost requires recursive or advanced search algorithms, and there is no guarantee of convergence to a global minimum for this problem. It seems that an LS method that is based on the closed loop data and is simple enough to compete with the reaction curve methods is missing. The present aim is to develop such an LS method, which is denoted the Simple Least Squares Method (SLSM). A comparative basis is used to examine the application of the SLSM, and the reaction curve methods. Krishnaswamy and Rangaiah2 (KR) used this basis to study the relative performance of three reaction curve methods for closedloop estimation of SODT parameters over a wider range of test conditions. Thus it is also used here to test the results of the SLSM against those of the reaction curve methods.
A major controller used in industry is the ProportionalIntegral-Derivative (PID) type controller. It has been recognized as a simple and robust controller and is familiar to the ®eld operator. However, it is dif®cult and tedious to determine the tuning parameters of the PID controller. Therefore, several different methods have been proposed for tuning1. Tuning of these controllers generally involves two steps. The ®rst entails obtaining the process model. Next, this information is used to determine appropriate tuning parameters. In this paper the focus is on the ®rst step. One group of methods that are popular for their simplicity are the reaction curve methods2. These methods utilize the steady state value, three speci®c points of the closed loop reaction curve, and the controller setting to estimate the parameters of a ®rst or second order plus dead-time (SODT) model. An advantage of these methods is the usage of closed loop response data instead of process input-out data. As indicated by several authors3,4 this reduces the effect of noise and disturbances on the parameter estimation. A mandatory requirement is that the estimation test should be carried out only with P controller and step signals. This obviously restricts the appliication of these methods. The Least squares (LS) estimation methods5,6 are free of the above restrictions and are usually regarded as yielding accurate estimation of the parameters. However, they require the input-output process data, therefore they are more sensitive to disturbances and measurement noise occurring
SLSM METHOD A transfer function of a SODT model is given by: G(s) =
km exp( sh) ê ; as2 + bs + 1
km > 0
(1)
A unit feedback-closed loop with a controller C(s) has the following transfer functions: M(s) ; 293
C(s)G(s) 1 + C(s)G(s)
(2)
294
CHERES and EYDELZON
Therefore: 1 (as + bs + 1) exp(sh) 1 = = G(s) km M(s) ê 2
1 C(s)
(3)
The closed loop frequency response that is obtained from the data is designated as fc ( jv). Following the above reasoning: 1 fc ( jv ) ê
f (jv) ;
1 C( jv )
(4)
An analytical solution to the LS estimator of the model parameters that involves the absolute frequency response amplitude is complicated. Since a simple algorithm is sought, it can be replaced by a LS of the squared amplitude, that is: JA =
X v
j f ( jv)j
2
1 G( jv )
ê
2
2
(5)
If the process is of ®rst or second order, the two estimators give the same analytical solution (with JA = 0). Since in this paper, and in process control practice1,8, a second order process is assumed, the use of the estimator (5) is justi®ed. Now, using equation (3) to modify the estimator expression gives: 2 X a2 4 b2 2a 2 1 ê + + JA = j f ( jv)j2 v v ê k2m km2 km2 v
(6) The estimator is nonlinear in the parameters a, b, km . To make it linear, new variables are de®ned as follows: a2 ; k2m
x;
b2
u;
2a ê
k
2 m
1 km2
z;
;
(7)
The linear estimator problem is solved analytically to obtain: X 8 X 6 X 4 X x v +u v + z v = j f ( jv )j2 v 4 (8) v
x
X
v
v
6
+u
v
x
X v
X
v
v
4
+z
v
v
4
+u
X
X
v
2
v =
v
v
2
+z
v
X v
X v
1=
X v
j f ( jv )j2 v 2
j f ( jv )j2
(9) (10)
From these linear equations u, x, z are obtained and using equation (7) gives: p p 1 ; a = km x; b = ukm2 + 2a k m = p (11) z
A linear LS phase estimator is now de®ned: X JP = [arg f ( jv ) hv arg(1 av2 + jbv )] 2 ê ê ê v And this yields the dead time expression: X [arg f ( jv ) arg(1 av 2 + jbv )]v ê ê v X h= 2 v
frequency response is generated from the process inputoutput signals6. This may degenerate the estimation since the closed-loop noise reduction effect is not utilized. 3. If the steady state gain is of main interest, one can estimate it from steady state considerations and use equations (8), (9), (13), to estimate the other parameters.
(12)
(13)
v
Remarks: 1. The methods speci®ed by Luyben9 can be used to generate and calculate the closed loop frequency response data. 2. If the controller settings are unknown, one cannot utilize the closed loop ratio fc ( jv) in the estimation. Instead, the
SIMULATION RESULTS A comparative basis2 is used to test the SLSM method. This basis includes three processes each in a unit feedbackclosed loop. The transfer functions of the processes are as follows exp( s) ê P1 (s) = (14) 12s2 + 8s + 1 exp( 3s) ê P2 (s) = (15) (s + 1)2 (2s + 1) P3 (s) =
1 (s + 1)5
(16)
Proportional controllers are used. Their gains are changed to obtain under-damped and over-damped step response data. The simulated data was used to estimate the values of the SODT model parameters. In the sequel, these simulations are carried out with the Runge-Kutta 3 algorithm with both min step size, a tolerance of 10 ±4. Among three reaction curve methods the simplest was proposed by Bogere and Ozgen2 (BO) for under-damped test response data, and extended by KR to include overdamped response data. This method relies on three speci®c points of the response curve. If the response is over-damped, the steady state response value is also required. With the aid of the controller gain and a Pade approximation for the dead time, explicit expressions for the SODT model are derived. The Lee Cho and Edgar2 (LCE) is the most accurate method. The SODT model used by this method also contains an extra lead term, (as + 1), in the numerator of equation (1). It is required that the SODT (1) and the one derived by the LCE method will have the same critical frequency and ultimate gain. Using this additional requirement, the lead term and the delay are calculated. This requires an addition to a set of explicit expressions the solution of a nonlinear equation. This may result in a nonunique solution for the model parameter values and requires a search algorithm. Moreover, it was shown that the BO method is comparable to the LCE method when the closed loop response is over-damped. KR ranked the performances of the methods according to the difference between step responses of the actual process and the estimated model. It was measured by the integral of absolute difference (IAD). A small IAD value indicates a good ®t, and vice versa. Since this measure is skewed towards the steady state portion of the open loop process responses, our method is applied according to the procedure in Remark 3. Therefore the KR estimated gains, which were found from steady state considerations, are used and only then are the other parameters estimated. Instead of the model (1) KR use the following transfer function: k exp( sh) ê G(s) = 2 2m . (17) t m s + 2jm t m s + 1 Trans IChemE, Vol 78, Part A, March 2000
PARAMETER ESTIMATION OF A SECOND ORDER MODEL
295
Table 1. Estimation of model parameters for P1 (s). Test gain 4.0 2.0 0.8 0.5
Response
Method
km
tm
jm
h
Under-damped
BO LCE SLSM BO LCE SLSM BO LCE SLSM BO LCE SLSM true values
1.001 1.001 1.001 1.000 1.000 1.000 0.999 0.999 0.999 1.000 1.000 1.000 1.000
3.645 3.506 3.420 3.586 3.516 3.462 3.506 3.475 3.480 3.496 3.477 3.470 3.464
1.033 1.147 1.167 1.081 1.138 1.153 1.126 1.151 1.148 1.137 1.153 1.152 1.155
0.95 1.213 1.039 0.950 1.128 1.006 0.989 1.107 0.998 0.990 1.083 0.992 1.000
Under-damped Over-damped Over-damped
a
0.233 0.163 0.111 0.0879 0
IAD* 0.5373 0.0380 0.0181 0.2795 0.0301 0.0120 0.0844 0.0206 0.0102 0.0564 0.0127 0.0124 0
* IAD, in this and subsequent tables, is based on 99.5% of the ®nal process step response.
Table 2. Estimation of model parameters for P2 (s). Test gain 0.5 0.25 0.15 0.10
Response
Method
km
tm
jm
h
Under-damped
BO LCE SLSM BO LCE SLSM BO LCE SLSM BO LCE SLSM
1.004 1.004 1.004 1.000 1.000 1.000 0.998 0.998 0.998 0.999 0.999 0.999
2.519 2.295 1.583 2.435 2.219 1.794 1.987 1.868 1.924 1.966 1.886 1.886
0.756 0.872 1.065 0.739 0.880 0.979 0.913 0.989 0.938 0.918 0.969 0.951
2.800 3.793 3.664 2.850 3.556 3.483 3.348 4.064 3.358 3.368 3.955 3.393
Under-damped Over-damped Over-damped
The estimated values obtained2 by using the LCE and BO methods for this model with the three processes are presented in Tables 1±3. Due to changes in the integration methods used in the simulations, there are small differences between the IADs values2 and the ones obtained here. Since uniform basis is required for comparison, our values are presented in the tables. The sampling frequency that was used by KR is not given2. Usually, it is recommended to use a sampling frequency, which is 10±20 times higher than the closedloop bandwidth frequency10. For the processes given by equations (14)±(16), the upper limit frequency is about
a
0.943 0.673 0.704 0.575
IAD 0.3553 0.1658 0.0744 0.4781 0.1877 0.0334 0.0602 0.1083 0.0434 0.0860 0.0689 0.0391
1 Hz. However, if this sampling rate is used, poor results are obtained with the BO method. Thus a sampling frequency of 2 Hz is used for data acquisition and the ®nal time for all the simulations is 40 s. With the SLSM method, the closed loop frequency function is ®rst calculated for each test data. For a set-point unity step9: …¥ fc ( jv) = yÅ jv ( yÅ y(t)) exp( jvt)dt (18) ê ê ê 0
Since the same model gain values are used as those used by
Table 3. Estimation of model parameters for P3 (s). Test gain 0.6 0.4 0.2 0.1
Response
Method
km
tm
jm
h
Under-damped
BO LCE SLSM BO LCE SLSM BO LCE SLSM BO LCE SLSM
0.995 0.995 0.995 0.998 0.998 0.998 0.999 0.999 0.999 0.999 0.999 0.999
2.000 1.866 1.999 1.930 1.831 2.000 2.354 2.336 2.000 2.272 2.262 2.000
0.860 0.960 0.871 0.873 0.947 0.870 0.730 0.743 0.870 0.777 0.784 0.870
1.780 2.333 1.493 1.840 2.318 1.493 1.252 1.398 1.493 1.295 1.404 1.492
Under-damped Over-damped Over-damped
Trans IChemE, Vol 78, Part A, March 2000
a
0.513 0.447 0.138 0.105
IAD 0.2939 0.4209 0.0914 0.2637 0.3476 0.0942 0.2116 0.1862 0.0970 0.1314 0.1237 0.0960
296
CHERES and EYDELZON Table 4. Estimation of SODT models parameters with PI controllers in the loops. Response
Noise*
km
tm
jm
h
IAD
P1 (s)
Under-damped
Ps (s)
Under-damped
P3 (s)
Under-damped
0 0.01 0 0.01 0 0.01
0.996 0.990 0.999 0.999 0.996 0.990
3.545 3.473 1.934 2.068 2.088 2.269
1.128 1.134 0.938 0.901 0.859 0.817
0.942 0.955 3.344 3.207 1.352 1.195
0.0521 0.1406 0.0491 0.0919 0.0849 0.1177
Process
* In this and subsequent tables, Noise represents a normally distributed signal with zero mean and standard deviation of 0.01.
Figure 1. fc ( jv) of P1 (s) and the proportional controller with a gain of 4.
KR, yÅ in equation (18) is calculated in this special case from the following closed loop relation: km kc yÅ = R (19) 1 + km kc The maximal value of the calculated frequency depends on the application. Here controller tuning is the object, therefore the closed loop bandwidth frequency is selected. Eight points of the closed loop frequency are then calculated in the interval (0, Bandwidth frequency]. A typical plot of fc ( jv) is presented in Figure 1. Now f ( jv) is calculated according to equation (4), and a typical plot is depicted in Figure 2. It is emphasized that the model gain values obtained by KR (see Tables 1±3) are utilized. Using them and equations (8)±(9), (11)±(13), the value of the remaining parameters are derived. The results are listed in Tables 1±3. As can be seen, the SLSM results with the smallest IADs, and the differences between the methods increase, as the test response is more oscillatory. Moreover, the SLSM results are consistent and this feature is emphasized as the process order is increased. For instance, with the 5th order process (Table 3) the IAD of the SLSM ranges from 0.0914±0.0970, whereas the BO results vary from 0.1314±0.2939 and the LCE ranges are 0.1237±0.4209.
Figure 2. The Bode plot against f ( jv ) of P1 (s).
Obviously the SOD parameters can be estimated with a PI controller in the loop. Suppose the PI ones with the following transfer functions are used in the previous closed loops: 0.246 C1 (s) = 2.5 + with P1 (s) (20) s 0.133 C2 (s) = 0.5 + with P2 (s) (21) s 0.18 C3 (s) = 0.14 + with P3 (s) (22) s All of these controllers yield under-damped step responses of the closed loops. These step responses are sampled and recorded. In order to calculate fc ( jv), yÅ has to be ®xed. However, since PI controllers are used, yÅ is equal to the set point step change. This change is used in equation (18) to ®nd fc ( jv). Since only the closed loop input±output data are used, there is no way to calculate the model gain from steady state considerations. Therefore, it and all the other parameters are estimated by using all of the equations (7)± (13). This may lead to a bias in the estimated model gains and consequently increases the IAD measures. The estimation results are presented in Table 4. Comparing these with the previous SLSM results with under-damped responses, it is clear that a small gain bias results with a smaller IAD and vice versa. Effect of Noise As many real systems contain noise, it is desirable to evaluate the methods in the presence of noise. A noise signal is introduced at the process outputs and the estimation is repeated with the SLSM method and the PI controllers in the loops. The estimated values are depicted in Table 4. For the same process, the IAD values, which result from a noise free, test data and a noisy one are very close. Numerical errors and random ¯uctuations in the data even result in smaller IADs with two noisy data cases as compared to the free noise ones. The above noisy data were obtained from under-damped test responses, whereas KR recommended using overdamped test data, especially with the simplest method of BO. They show that though it is simple, it gives a good model ®t when the system response is over-damped2. Thus it is of interest to compare the SLSM with the BO in the case of over-damped test data. The two smallest controller gains were used with P1 (s) and measurement noise to generate the test data. The relevant part of the data is presented in Trans IChemE, Vol 78, Part A, March 2000
PARAMETER ESTIMATION OF A SECOND ORDER MODEL
297
Figure 3. The closed loop noisy data resulted from a P controller with a gain of 0.5.
Figure 4. Comparison between the responses of P1 (s) and its models obtained from the 0.5 Test gain of Table 6.
Table 5, and in Figure 3 the data graph which is related to the 2nd row of Table 5 is presented. The yÅ values in Table 5 are the mean of the ®rst ®ve last data points. The data are used with the BO method to estimate P1 (s) parameters. These estimations are depicted in Table 6. It should be noted that they differ from the ones obtained by KR. This is probably because different noise generator and sampling time are used. The noisy data are also used with our method and the results are added to Table 6. The results of the 3rd and 4th row of this table are also demonstrated in Figure 4. Obviously, the SLSM model response is much closer to the true one than the BO one. Based on the data in Table 4 and 6, it can be concluded that the SLSM results are more accurate and robust than the BO results are.
linear which results in simple algorithm without the drawback of multiple solutions. Compared with the reaction curve methods2 SLSM has the following advantages: (a) SLSM can be used with any type of controller, whereas the previous methods are limited to a proportional one. (b) With SLSM and other frequency domain methods a variety of test signals can be utilized and not necessarily step ones. A comparative basis from the literature is used to test the results. It is demonstrated that in this case the SLSM yields consistent results, which are better than the results obtained with the reaction curve methods. Moreover, the SLSM results are more consistent and more robust to noise. This feature and the previous advantages make the SLSM attractive in process modelling and automatic tuning. Note that the application of the SLSM requires data acquisition and subsequent computer analysis. This is a disadvantage if these means are not available at the plant ¯oor.
CONCLUSIONS A method for the estimation of SOD parameters in the frequency domain is presented. The method can be applied to over and under-damped closed loop dynamics without disturbing the controller settings. The obtained method is
Table 5. Data of closed loop step response with P1 (s) and proportional controller. Test gain 0.8 0.5
Response
Noise
yÅ
t14
t55
t91
Over-damped Over-damped
0.01 0.01
0.438 0.328
2.5 2.5
5.0 5.5
8.00 9.5
Table 6. Estimation of model parameters of P1 (s) in the presence of noise. Test gain
Response
0.8
Over-damped
0.5
Method
BO SLSM Over-damped BO SLSM true values
km
tm
jm
h
0.974 0.974 0.977 0.977 1.000
3.589 3.636 3.733 3.778 3.464
1.001 1.086 0.967 1.073 1.155
0.845 0.881 0.595 0.657 1.00
Trans IChemE, Vol 78, Part A, March 2000
IAD 0.5716 0.4700 0.7323 0.4256 0
NOMENCLATURE a, b C(s), C1 (s), C2 (s), C3 (s) fc ( jv ) f ( jv) G(s) j JA , JP h km kc M(s) P1 (s), P2 (s), P3 (s) R s t t14 , t55 , t91 x, u, z y, yÅ ym1 yp1 , yp2
denominator coef®cients of model controller transfer functions frequency functions model transfer function imaginary unit amplitude and phase estimators dead time gain of model controller gain closed loop transfer functions process transfer functions set point change Laplace variable elapsed time time to reach 14%, 55% and 91% of process steady state value. de®ned by equation (7) process output and its steady state value 1st minimum value of the response 1st and 2nd peak values of response, respectively
Greek letters a tm
model lead time model time constant
298 jm v
CHERES and EYDELZON model damping coef®cient frequency variable
REFERENCES 1. Sung, S. W., O, J. and Lee, I., 1996, Automating tuning of PID controller using second±order plus time delay model, J of Chem Eng Japan, 29, 6: 990±999. 2. Krishnaswamy, P. R. and Rangaiah, G. P., 1996, Closed-loop identi®cation of second order dead time process models, Trans IChemE 74(A1): 30±34. 3. Srinivas, N. and Chidambaram, M., 1996, Comparison of on-line controller tuning methods for unstable systems, Process Control and Quality, 8: 177±183. 4. Juan, A. and Rodrigues, E. S., 1984, Extension of a new method of online controller tuning, Can J Chem Eng, 62: 802±807. 5. Young, G. E., Suresh Rao and Chatufale, K. S., 1995, V.R, Blockrecursive identi®cation of parameters and delay in the presence of noise, J Dyn Sys Measurm Contr, 117: 600±607. 6. Kulessky, R. and Nudelman, G., 1998, Power boiler control loops optimal tuning, Melecon ’98 Proc, Tel-Aviv: 484±488.
7. Ferrettti, G., Maffezzoni, C. and Scattolin, R., 1996, On the identi®ability of the time delay with least-square methods, Automatica, 32: 449±453. 8. Huang, C.-T., Chou, C.-J. and Wang, J.-L., 1996, Tuning of PID controllers based on the second-order model by calculation, J of The Chin IChE, 27(2): 107±120. 9. Luyben, W. L., 1973, Process Modeling Simulation and Control for Chemical Engineers, (McGraw-Hill, New York) 278±299. 10. Poulin, E., Pomerleau, A., Desbiens, A. and Hodouin, D., 1996, Development and evaluation of an auto-tuning and adaptive PID controller, Automatica, 32(1): 71±82.
ADDRESS Correspondence concerning this paper should be addressed to Dr E. Cheres, Planning Development and Technology Division, The Israel Electric Corp Ltd, POB 10, Haifa, Israel. (E-mail:
[email protected]). The manuscript was received 7 December 1998 and accepted for publication after revision 18 August 1999.
Trans IChemE, Vol 78, Part A, March 2000