PII: S0005–1098(97)00218–5
Automatica, Vol. 34, No. 4, pp. 513—520, 1998 ( 1998 Elsevier Science Ltd. All rights reserved Printed in Great Britain 0005-1098/98 $19.00#0.00
Technical Communique
New Process Identification Method for Automatic Design of PID Controllers* SU WHAN SUNG,- IN-BEUM LEE- and JIETAE LEE‡ Key Words—Autotuning; PID; identification; frequency; weighting function.
and frequency and then the Z—N tuning rule can be used to tune the PID controller. However, the above-mentioned identification methods cannot be done in an on-line manner and require tedious procedures. Moreover, the identification performances are poor frequently due to the effects of measurement noises or disturbances. Many on-line process identification methods for the automatic tuning of the PID controller have been proposed to overcome these disadvantages. Roughly speaking, they can be classified into two categories or relay feedback methods and proportional (P) control identification methods according to the types of test signal generators. As stro¨m and Ha¨gglund (1984) identified the ultimate gain and the frequency form a relay feedback test. The relay feedback guarantees stable oscillatory closed-loop responses only if the process has a stable intersection point with the describing function of the relay. Usual stable processes and integrating processes with one integrator can be stabilized by the relay feedback test. Also, it can be applied to unstable processes with one unstable pole only if several moderate conditions are satisfied. Since the relay feedback is simple and requires only information on the sign of the process gain, it has been applied widely in industry and improved by many researchers. Li et al. (1991) obtained parametric models from two relay feedback tests. Sung et al. (1995) proposed a modified relay feedback method to obtain more accurate ultimate data by reducing highorder harmonic terms using a six-step signal. Sung et al. (1996) proposed a new identification method using the second-order plus time delay model to identify the process more accurately and a simple tuning rule for the second-order plus time delay model. Even though it is very simple and composed of algebraic equations, the performances are almost the same as those of the optimal tuning. Shen and Yu (1994) and Loh et al. (1993) extended the relay feedback method to multi-input and multi-output (MIMO) cases using the sequential loop closing concept. Shen et al. (1996) proposed an improved
Abstract—We propose a simple on-line process identification method for the automatic design of PID controllers. It can identify general time-invariant linear systems with time and frequency weighting, while retaining simplicity. We then use a model reduction method to tune PID controllers using usual tuning rules based on the first or second order plus time delay model. It can efficiently incorporate initial value problems of previous identification methods for autotuning by assigning zero weight to the initial state. The proposed method shows an acceptable robustness to measurement noises and disturbances. ( 1998 Elsevier Science Ltd. All rights reserved. 1. INTRODUCTION
Proportional integral derivative (PID) controllers have been used widely in industry due to robustness and simplicity. They show satisfactory control performance for usual processes. Moreover, Smith predictors and cascade controllers have improved control performances for large time delay processes and disturbance rejection processes. According to process dynamics, the tuning parameters should be tuned appropriately. Therefore, the dynamics of the process should be identified before tuning. Many on-line process identification methods for continuous-time systems have been developed to tune the PID controller or to provide models for the Smith predictor and the cascade controller. The process reaction curve (PRC) method can be used to obtain the first-order plus time delay model. Then, the adjustable parameters can be obtained with usual tuning rules for PID controllers such as the integral of time-weighted absolute value of the error (ITAE), Cohen—Coon (C—C), Ziegler— Nichols (ZN) methods. The continuous cycling identification method identifies the ultimate gain
*Received in final form 14 November 1997. This paper was recommended for publication in revised form by Editor Prof. P. Dorato. Corresponding author Prof. In-Beum Lee. Tel. 00 82 562 279 2274; Fax 00 82 562 279 2699; E-mail iblee@ postech.ac.kr. -Department of Chemical Engineering, School of Environmental Engineering, Pohang University of Science and Technology, San 31 Hyoja Dong, Pohang, 790-784, South Korea. ‡Department of Chemical Engineering, Kyungpook National University, Taegu 702-701, South Korea. 513
514
Technical Communiques
relay feedback method to reduce the effects of static disturbance. Yuwana and Seborg (1982) proposed a P control identification method to obtain the first order plus time delay model rather than the ultimate data set using few transient data points where the process is activated by a P controller. After them, Jutan and Rodrigez (1984), Lee (1989), Chen (1989) and Sung et al. (1994) improved it. Another P control method was proposed to identify the process using the second order plus time delay model (Lee et al., 1990). They provide a rational transfer function rather than only ultimate data set so that better tuning parameters are available compared to the relay feedback method. However, the identified frequency region by previous methods is too narrow compared to the wide operating frequency region of the controller so that satisfactory control performances cannot be achieved frequently. The identified models or ultimate information by previous methods show poor robustness to measurement noises because they use several dominant data points. Also, the initial state for the identification work should be a steady state when these identification methods are applied. We propose a new process identification method for the automatic design of the PID controller. It simply overcomes the initial value problems of previous identification methods for the autotuning by assigning zero weight to the initial state. Since it considers all measured data sets in estimating several parameters with frequency weighting, it shows a good robustness to measurement noises. Even though it is simple and does not require any complicated numerical techniques it provides better model accuracy compared to previous methods developed for autotuning. 2. THEORETICAL DEVELOPMENT OF PROPOSED IDENTIFICATION METHOD
Consider the following transform for a signal y(t) before we develop a new process identification method. tf dnw(u, t) y(t) dt. (1) dtn 0 From a simple manipulation, the following equation can be derived:
P
¹ My(t)N"y(n)(u), n
¹ n~1
G H
G
H
dny(t) dn~1y(t) "!¹ n dtn~1 dtn
di~1w(u, 0) di~1w(u, t ) f "0, i"1, 2, 2 , n. " dti~1 dti~1 (3) Now, consider the following general time-invariant linear system: y(s) G (s)" 1 u(s) b sm#b sm~1#2#b s#b m~1 1 0 . (4) " m a sn#a sn~1#2#a s#1 n n~1 1 Here, G (s) is proper, that is, m4n. u(s), y(s) denote p the Laplace transforms of the process input (controller output) and the process output, respectively. G (s) represents the transfer function of the process. p The above system (4) can approximate usual processes including time delay, nonminimum phase zeroes as accurately as desired. It can be rewritten in time domain and the following algebraic equation can be obtained by applying the transform on both sides with the consideration of equations (1)—(3): a M(!1)n½(n)(u)N#a M(!1)n~1½(n~1)(u)N n n~1 #2#a M!½(1)(u)N#½(0)(u) 1 "b M(!1)(m)º(m)(u)N m #b M(!1)(m~1) º(m~1)(u)N m~1 #2#b M!º(1)(u)N#b º(0)(u). (5) 1 0 It should be noted that the algebraic equation (5) can be derived regardless of the initial conditions because the weight satisfies equation (3). Our objective is to identify the coefficients of a and b. In equation (5), if the weight w(u, t) satisfying equation (3) is defined, we can calculate ½( j)(u), º( j)(u) for various u values using equation (1) with a numerical integration method. Then, we can estimate the coefficients of a and b from the linear algebraic equation (5) with a least-squares method. In this paper, we choose n"4 and m"3 since these specifications are sufficient to represent usual processes with good accuracy and the following weight:
G
AB
AB ABH A B
AB
t 1 t 2 1 t 3 1 t 4 f(q)" 1# # # # 3! q 4! q q 2! q 1 t 5 t # exp ! , 5! q q
dn~1w(u, t ) dn~1y(t ) f f # dtn~1 dtn~t dn~1w(u, 0) dn~1y(0) ! . dtn~1 dtn~1
Here, if we choose a weight function satisfying the following conditions, the initial and the final value of dn~1y(t)/dtn~1 can be removed from equation (2).
w(u, t)"M f (1.5q)!f (q)N exp(!jut). (2)
(6) (7)
Here, q and u are related to a time weighting and a frequency weighting, respectively. Consider
Technical Communiques Fig. 1. If we choose a small q value, the weighting value decreases more rapidly with respect to time. Roughly speaking, only the portion of the signal up to the time corresponding to 30 times of q can pass through the transform. Also, the transform amplifies the signal of frequency u and filters out other frequency signals. Then, the portion of the signal corresponding to the frequency u is mainly considered when we estimate the above coefficients. Figure 2 shows the magnitude of the transformed output ½(0)(u) with q"2 for the following signal: y(t)"cos(2t)#sin(2t).
(8)
A large-magnitude peak appears at the frequency u"2.0. From Fig. 2, we can recognize that u frequency components can pass through the defined transform. This implies that the identification method using the transform would mainly fit the
515
u frequency information of the process. In other words, if we solve the algebraic linear equation (6) using the least-squares method for many frequencies (u"u , k"1, 2, 2 ) within a desired frek quency region, the coefficients would be adjusted to approximate the desired frequency region. We recommend the following guidelines to choose appropriate q and u values. For example, assume that we use a biased-relay to activate the process. Usually, after three or four relay on-off, a cyclic steady state is achieved for usual processes. The initial part of the relay feedback contains much frequency information. But, it should be noted that the part of the signal after the cyclic steady state contains only one frequency information. Therefore, it is meaningless to consider more data sets after the steady state. Moreover, uncertainties such as noises or disturbances included in this part can
Fig. 1. Characteristic of weight with respect to q.
Fig. 2. Characteristic of transformed signal with respect to u.
516
Technical Communiques
degrade the accuracy of the model. So, it is obvious that only the portion of the activated signal before the time corresponding to a cyclic steady state should be considered. Therefore, we recommend q as about t /30, here t denotes the time corres4 4 ponding to the fourth relay on—off. Also, the desired frequency can be inferred directly by measuring the period of the relay. Another popular test signal generator is a P controller. In this case, changing the set point of the controller can activate the process. This type of the generator has an advantage compared to the relaytype generator. The magnitude of a low-frequency signal included in the activated process output is much larger than that of the relay feedback. Therefore, if we want to enhance the robustness to a static or low-frequency disturbance it would be better to use the P controller rather than the relay. In this case, recommend q as t /4 to consider the part of #the signal from 0 to about 8 times t and the #minimum and maximum desired frequency as 0 and n/t , respectively. Here, t denotes the ##closed-loop time constant corresponding to about 63% of the steady-state process output for the step set point change. To improve the robustness to uncertainties, we should adjust the starting time of the relay on—off or the set point change. The initial part of the relay on—off or the P control contains more extensive frequency information compared to the later part. Therefore, we should assign higher priority to the initial part to suppress the effects of uncertainties such as noises or disturbances. As shown in Fig. 1, the weighting value becomes relatively large from t"6q. So, the time of the relay on—off or the set point change should coincide with 6q to guarantee a good robustness to uncertainties. Also, we can adjust the degree of the activation to improve the robustness. For example, if we use the P controller as the test signal generator the magnitude of the set point should be magnified to reduce the effects of uncertainties. For the case of the biased-relay feedback, the bias or the magnitude of the relay should be chosen as a large value. On the other hand, small perturbation is surely preferred in the viewpoint of the operator. So, there exists a trade-off relation between the robustness to uncertainties and the preferred operation condition. For clarity, we summarize the recommended specifications for the transform in this paper as follows: n"4,
m"3,
t "30q, f
(9) (10)
equation (7) is the chosen weight and their derivatives are in the appendix,
(11)
q"about t /30 (relay) or about 4 t /4 (P controller), (12) #desired frequency range: from 0 to about 2]2n/P 3 (relay) or about n/t (P controller), (13) #starting time of the relay on—off or the set point change: 6q.
(14)
Here, P denotes the period of the relay. The objec3 tive function for the least-squares method is the square of the Euclidean norm of the difference between the left-hand side and the right-hand side of equation (5). The optimization problem can be solved directly. Here, we numerically calculate the integrals of the transforms, ½(i)(u), º(i)(u) at desired frequencies u ’s and then we can estimate k the coefficients of equation (4) by minimizing the objective function. It should be noted that the proposed identification method provides much more frequency information compared to previous on-line continuous-time identification methods for the automatic tuning of PID controllers and it also does not require any complicated numerical techniques such as a repetitive root finding or optimization. Almost all previous on-line process identification methods require a steady-state initial condition. Contrarily, the proposed identification method does not care what the initial state is. Discrete-time process identification methods using an auto-regressive moving average model with an exogeneous input (ARMAX) such as recursive least square (RLS), prediction error (PE), instrumental variable (IV) methods (Ljung, 1987; So¨derstro¨m and Stoica, 1989) can be used to obtain the continuous-time frequency response by reducing the sampling time and then a continuous-time transfer function can be estimated from the obtained frequency responses. However, these methods cannot be applied to a process including a long time delay term since it is very difficult to infer the time delay with acceptable accuracy by measuring the process output. 3. ON-LINE TUNING OF PID CONTROLLERS
The identified model can be used directly as the process model in a cascade control, a Smith predictor or other model-based PID controllers. On the other hand, we should reduce the identified model to the first or second order plus time delay model to tune the PID controller automatically because many developed on-line PID tuning methods are based on these models. Sung and Lee (1996) proposed a simple model reduction method to reduce a high-order model to a lower one.
Technical Communiques Other approaches can be found for the model reduction (Moore, 1981; Glover, 1984). Their methods can reduce high-order models effectively. However, it should be noted that on-line tuning rules of PID controllers are based on a low-order rational transfer function with a time delay. Also, the final objective of the autotuning is to determine the parameters of the PID controller so that the final form of the model reduction should be the first or second order plus time delay model. But, their reduction methods provide only a rational transfer function or reduced state space model. Moreover, they require some complicated numerical techniques such as singular value decomposition (SVD). Therefore, even though their methods can provide a good reduced model within a specified
517
error bound, they are not appropriate for the autotuning of PID controllers. For the first order plus time delay model, the internal model control (IMC), C—C, ITAE-1, ZN tuning rules are available. Sung et al. (1996) proposed an ITAE-2 tuning rule for the second-order plus time delay model. Here, the IMC and ITAE-1 rules are the best among tuning rules based on the first order plus time delay model for a step set point change and a step input disturbance, respectively. On the other hand, it should be noted that the first order plus time delay model has much limitations in describing high order or underdamped processes compared with the second order plus time delay model. Also, the ITAE-2 rule shows almost the same performance, as that of the optimal tuning
Fig. 3. Activated process output and input by proportional (P) controller.
Fig. 4. Identification results of the proposed identification method.
518
Technical Communiques
and the order of most processes is greater than one. So, we recommend a simple reduction method and the ITAE-2 tuning rule based on the second order plus time delay model to tune the PID controller automatically with the proposed identification method. 4. SIMULATION RESULTS
We chosen the actual process as follows: e0.2s . G (s)" 1 (s#1)3
(15)
Here, we choose 16 desired frequencies located equally between 0 and n/0.7. Figure 3 shows the
activated process outputs by the P controller with the gain of 2. Here, we choose q and the starting time of the set point change as 0.7 and 6q as discussed in the previous section. Note that the initial process output is not a steady state i.e. the initial process output value and its first derivative value are 0.3 and 0.5, respectively. Figure 4 compares the Bode plots of the real process and the model. From Fig. 4, we can recognize that the proposed identification method provides good accuracy regardless of initial conditions. Also, from many simulation studies, we realize that the identification results are almost the same for various q values. The obtained model is reduced to the second order plus time delay model by the model reduction method (Sung
Fig. 5. Control results of the proposed method-ITAE-2 and the relay feedback method-ZN. (a) set point tracking, (b) disturbance rejection.
Fig. 6. Robustness with respect to the magnitude of the set point change.
Technical Communiques and Lee, 1996). Based on the reduced model, the PID controller is tuned by Sung et al. (1996)’s tuning rule. Figure 5 shows the control performances of autotuned PID controllers based on the proposed identification and the relay feedback identification method (As stro¨m and Ha¨gglund, 1984). Since the proposed identification method can provide much frequency information, the PID controller tuned by it shows superior control performances compared to the one tuned by the ZN tuning rule based on the relay feedback identification method. Figure 6 shows the modeling error with respect to the magnitude of the set point under the same conditions of Fig. 3. Here, the static input
519
disturbance of 0.1 is added to the controller output. As shown in Fig. 6, the robustness to disturbances is much enhanced as the magnitude of the set point increases. Figure 7 shows the activated process by an inputbiased relay when the measured process output is corrupted by uniformly distributed random noise between !0.5 and 0.5. This noise is very large when we consider the practical circumstances. Here, hysteresis of the same magnitude with the noise is used to prevent a severe fluctuation of the relay output. We choose 30 desired frequencies located equally between 0.0 and 1.5. Figure 8 compares Bode plots of the model and the process with noises. The proposed method shows good
Fig. 7. Activated process output and input by an input-biased relay when measured data are corrupted by $0.5 measurement noises.
Fig. 8. Identification results when measured data are corrupted by measurement noises.
520
Technical Communiques
robustness for the chosen desired frequency range. We tried other simulations to verify the robustness to sinusoidal disturbances. The proposed identification method provided almost perfect model when the frequency of the disturbances is outside of the desired frequency range. From these results and the additional many simulations, we can recognize that the proposed method shows an acceptable robustness to measurement noises and disturbances. 5. CONCLUSIONS
We proposed a new on-line identification method for the automatic design of the PID controller to overcome the disadvantages of the previous identification methods. It shows good model accuracy and robustness to uncertainties such as noises and disturbances. Also, it does not care no matter what the initial state is. To guarantee an acceptable accuracy to disturbances, we can adjust the starting time of the relay on—off and the degree of the activation. From simulation results and analysis, we can conclude that the proposed method provides an acceptable robustness to measurement noises and disturbances.
Shen, S. and C. Yu (1994). Use of relay-feedback test for automatic tuning of multivariable systems. A.I.Ch.E. J., 40, 627. Shen, S., J. Wu and C. Yu (1996). Autotune identification under load disturbance. Automatica, 35, 1642. So¨derstro¨m, T. and P. Stoica, (1989). System Identification. Prentice-Hall, Englewood Cliffs, NJ. Sung, S. W. and I. Lee (1996). Limitations and countermeasures of PID controllers. Ind. Engng Chem. Res., 35, 2596. Sung, S. W., J. H. Park and I. Lee (1995). Modified relay feedback method. Ind. Engng Chem. Res. 34, 4133. Sung, S. W., O. J., Lee J., S. Yi and I. Lee (1996). Automatic tuning of PID controller using second order plus time delay model. J. Chem. Engng Japan, 29, 990. Sung, S. W., H. I. Park, I. Lee and D. R. Yang (1994). On-line process identification and autotuning using P-controller. First Asian Control Conference, vol. 1, 411. Yuwana, M. and D. E. Seborg (1982). A new method for on-line controller tuning. A.I.Ch.E. J., 28, 434. APPENDIX—DERIVATIVES OF THE WEIGHT IN THIS RESEARCH For simplicity, we define the followings for n"0, 1, 2, 3, 4: dnF dnf (1.5q) dnf (q) , ! , dtn dtn dtn
(A1)
dw(u, t) dF " exp(!jut)#F(!ju) exp(!jut), dt dt
(A2)
d2w(u, t) d2F dF " exp(!jut)#2 (!ju) exp(!jut) dt2 dt2 dt #F(!ju)2 exp(!jut),
Acknowledgements—This work was supported in part by the Korean Science and Engineering Foundation (KOSEF) through the Automation Research Center at Pohang University of Science and Technology.
d3w(u, t) d3F d2F " exp(!jut)#3 (!ju) exp(!jut) dt3 dt3 dt2 #3
REFERENCES As stro¨m, K. J. and T. H. Ha¨gglund (1984). Automatic tuning of simple regulators with specifications on phase and amplitude margins. Automatica, 20, 645. Chen, C. L. (1989). A simple method for on-line identification and controller tuning, A.I.Ch.E. J., 35, 2037. Glover, K. (1984). All optimal Hankel-norm approximations of linear multivariable systems and their ¸=-error bounds. Int. J. Control, 39, 1115. Jutan, A. and E. S. Rodriguez (1984). Extensions of a new method for on-line controller tuning. Can. J. Chem. Engng, 62, 802. Lee, J. (1989). On-line PID controller tuning from a single, closed-loop test. A.I.Ch.E. J., 35, 329. Lee, J., W. Cho and T. F. Edgar (1990). An improved technique for PID controller tuning from closed-loop tests. A.I.Ch.E. J., 36, 1891. Li, W., E. Eskinat and W. L. Luyben (1991). An improved autotune identification method. Ind. Engng Chem. Res., 30, 1530. Loh, A. P., C. C. Hang, C. K. Quek and V. U. Vasnani (1993). Autotuning of multiloop proportional-integral controllers using relay feedback. Ind. Engng Chem. Res., 32, 102. Ljung, L. (1987). System Identification. Prentice-Hall, Englewood Cliffs, NJ. Moore, B. C. (1981). Principal component analysis in linear systems: Controllability, observability, and model reduction. IEEE ¹rans. Autom. Control, 26, 17.
(A3)
dF (!ju)2 exp(!jut) dt
#F(!ju)3 exp(!jut),
(A4)
d3F d4w(u, t) d4F " exp(!jut)#4 (!ju) exp(!jut) dt4 dt3 dt4 #6
d2F (!ju)2 exp(!jut) dt2
#4
dF (!ju)3 exp(!jut) dt
#F(!ju)4 exp(!jut)
(A5)
Here,
AB
df 1 t 5 exp(!t/q) "! dt 120 q q
G AB ABH G AB AB ABH G AB AB AB ABH
d2f 1 t 4 1 t 5 exp(!t/q) " ! # dt2 24 q 120 q q2
(A6)
(A7)
d3f 1 t 3 1 t 4 1 t 5 exp(!t/q) " ! # ! (A8) dt3 6 q 12 q 120 q q3 1 t 5 exp(!t/q) d4f 1 t 2 1 t 3 1 t 4 " ! # ! # 2 q 8 q 120 q q4 dt4 2 q (A9)