5526
Ind. Eng. Chem. Res. 1997, 36, 5526-5530
RESEARCH NOTES Enhanced Relay Feedback Method Su Whan Sung and In-Beum Lee* Department of Chemical Engineering, School of Environmental Engineering, Pohang University of Science and Technology, San 31 Hyoja Dong, Pohang 790-784, Korea
An enhanced relay feedback identification method is proposed to identify three frequency data sets from one relay feedback test. The identified data sets are exact for time-invariant linear systems. The method also gives the exact frequency data set corresponding to the multiple of the relay frequency in the presence of a static disturbance. This means that, even though the initial state is not steady state or wrong reference values for relay on-off are specified, it provides an exact data set. I. Introduction PID controllers have been widely used in industry because of their simple structure and robustness to modeling errors. Their three tuning parameters should be determined appropriately based on the dynamics of the process. However, it is tedious and dangerous to tune these parameters by using conventional approaches such as trial and error, continuous cycling, or process reaction curve methods. To overcome these disadvantages, a relay feedback identification method was proposed to obtain the ultimate data of the process and tune the adjustable parameters of PID controllers automatically (Åstro¨m and Ha¨gglund (1984)). Many researchers pay attention to this method since it is very simple and guarantees a stable closed-loop response for the usual processes. The relay feedback identification uses a square signal to perturb the process. The theory to identify the ultimate information is based on the Fourier series of the square signal where only the fundamental term of the series is considered. In general, the obtained ultimate frequency and gain have acceptable accuracy for the usual processes (Li et al. (1991)). However, since the square signal is approximated by one sinusoidal signal, it is always possible for high-order harmonic terms to be dominant. Then, good accuracy cannot be guaranteed. So, a modified relay feedback method was proposed to obtain the ultimate data set more accurately compared with the original method (Sung et al. (1995)). Here, they used a six-step signal instead of the twostep signal (original relay feedback signal) to reduce the harmonic terms. Also, a saturation-relay feedback method can be used to reduce the higher order harmonic terms (Shen et al. (1996a)). The responses of the relay feedback become severely asymmetric in the presence of static disturbances. Then, the ultimate data sets are estimated inaccurately because of a big discrepancy between a sinusoidal wave and the asymmetric response. To overcome this problem, some researchers (Hang et al. (1993), Shen et al. (1996b), Park et al. (1997)) biased the relay output systematically as much as the magnitude of the static * To whom all correspondence should be addressed. Email:
[email protected]. Telephone: 82-562-279-2274. Fax: 82-562-279-2699. S0888-5885(97)00332-1 CCC: $14.00
input disturbance. Also, a zero frequency data set (static gain or dc gain) as well as ultimate data sets can be identified by the above-mentioned approaches using an artificial step disturbance. As another approach, a biased-relay feedback was introduced to identify static gain and ultimate data set simultaneously (Shen et al. (1996c)). But, in this method, the obtained ultimate data set is more inaccurate than the above-mentioned approaches. The ideal relay feedback method can provide only an ultimate data set. On the other hand, an artificial time delay can be used to identify a desired lower frequency data set (Kim (1995), Tan et al. (1996)). All the above methods can identify only one or two frequency data sets so that the tuning performance of the PID controller is limited. Furthermore, the obtained data sets are inaccurate because the approximation using the Fourier series is included in the theoretical development step. These disadvantages can be overcome very simply. We propose an enhanced relay feedback method using the Fourier analysis to acquire three frequency data sets from one relay feedback test. It also provides better accuracy compared with previous ones in the case of extracting one or two frequency data sets from the ideal or biased relay feedback test. Here, even though it is simple, the obtained data sets are the same as those of the process exactly. The proposed identification strategy may contribute much in providing a model for the automatic tuning of the PID controller. II. Relay Feedback Identification Using Fourier Analysis Consider the following theorem (Fourier analysis) to estimate frequency data sets from the relay feedback test. Theorem 1 can be inferred from the fact that different frequency signals pass through the linear timeinvariant system independently. But, we prove it for completeness. Theorem 1. If a process input (control output) u(t) and the process output y(t) are periodic functions with a period of Pr, the following is true for linear time© 1997 American Chemical Society
Ind. Eng. Chem. Res., Vol. 36, No. 12, 1997 5527
invariant systems.
∫0∞y(t) exp(-jωt) dt G(jω) ≡ ∞ ) ∫0 u(t) exp(-jωt) dt ∫tt+P y(t) exp(-jωt) dt ∫tt+P u(t) exp(-jωt) dt r
r
(1)
and
∫0∞y(t) dt ∫tt+P y(t) dt G(0) ) ∞ ) ∫0 u(t) dt ∫tt+P u(t) dt
Figure 1. Typical responses of the ideal relay feedback.
r
(2)
r
Here, ω is a multiple of ωr ) 2π/Pr. Proof. From the definition of the periodic function, y(t) ) y(t + Pr), and since ω is a multiple of ωr ) 2π/Pr, exp(-jωt) ) exp(-jω(t + Pr)). Therefore,
y(t) exp(-jωt) ) y(t + Pr) exp(-jω(t + Pr))
(3)
Therefore, y(t) exp(-jωt) is a periodic function with the period of Pr. Then, the following is accomplished.
∫0∞y(t) exp(-jωt) dt )
∫t
lim {N
Nf∞
t+Pr
y(t) exp(-jωt) dt} (4)
Therefore, (1) can be justified as shown in the following equation.
∫0∞y(t) exp(-jωt) dt ) ∫0∞u(t) exp(-jωt) dt t+P {N∫t y(t) exp(-jωt) dt} ) lim t+P Nf∞ {N∫t u(t) exp(-jωt) dt} ∫tt+P y(t) exp(-jωt) dt ∫tt+P u(t) exp(-jωt) dt
r
r
(7)
u(t) dt
Here, G(0) and G ˆ (0) represent the static gain of the process and the estimate of (2), respectively. Proof. Let us assume the following input disturbance.
for τ < td for τ g td
∫tt+P y(t) exp(-jωt) dt G(jω) ) t+P ∫t u(t) exp(-jωt) dt + d∫tt+P exp(-jωt) dt r
(5)
r
r
(8)
Also, since u(t) and y(t) are periodic functions with the period of Pr r
∫t
Then, (1) becomes as follows.
r
r
dPr t+Pr
d(τ) ) d (constant)
r
t+P t+P {N∫t y(t) dt} ∫t y(t) dt ∫0∞y(t) dt ) lim ) ∫0∞u(t) dt Nf∞ {N∫tt+P u(t) dt} ∫tt+P u(t) dt
G(0) - G ˆ (0) )G(0)
d(τ) ) arbitrary
r
r
Contrarily, the previous relay feedback method provides an erroneous frequency data set since the output of the relay and the process output are assumed as one sinusoidal signal in the theoretical development. Consider the following theorem to prove the algorithm (1) still provides an exact frequency data even though constant disturbances enter. Theorem 2. If a finite input disturbance is constant after td (td < t) and the period of relay reaches a steady state after time t, the algorithm (1) provides the exact data set corresponding to the frequency of relay for any arbitrary disturbances and the following is complete.
(6)
Q.E.D. In this study, we would consider only the case of ω ) ωr and ω ) 2ωr since the consideration of more frequency information would be redundant to the PID controller design. We can identify frequency data sets using (1) (hereafter, algorithm (1)) and (2) only if the process is activated periodically by a test signal. The activated process input and output by the ideal relay feedback become periodic odd functions with the period of Pr when t is sufficiently large as shown in Figure 1. Therefore, we can identify the frequency data set corresponding to the relay period (Pr) by calculating (1) using a numerical integration method. Here, it should be noted that the obtained frequency data sets are exact.
r Here, ∫t+P exp(-jωt) dt is zero since ω is ωr or 2ωr. t Therefore, (1) provides an exact frequency data regardless of any above-mentioned disturbances. Next, (2) becomes
∫tt+P y(t) dt r
G(0) )
∫tt+P u(t) dt + dPr r
(9)
and the estimate of (2) is
∫tt+P y(t) dt G ˆ (0) ) t+P ∫t u(t) dt r
r
(10)
Then, (7) can be derived by a simple manipulation. Q.E.D. The algorithm (1) can overcome very simply many disadvantages of previous relay feedback methods. From theorem 2, we can recognize that the frequency data set corresponding to the multiple of the relay
5528 Ind. Eng. Chem. Res., Vol. 36, No. 12, 1997
Figure 2. Typical responses of a relay feedback for a static disturbance.
Figure 3. Typical responses of a biased-relay feedback.
frequency is not affected by the above-mentioned disturbance. Also, we can infer that, even though wrong reference values for deviation variables are specified or the initial state is not a steady state at the start of the relay feedback, the algorithm (1) would provide still an exact data set because these effects can be considered as one of the above-mentioned disturbances. Contrarily, the previous relay feedback identification method provides a more deteriorated data set when the disturbance enters or wrong initial values are specified. Typical relay feedback responses are shown in Figure 2 when a disturbance enters. Here, the process output and the relay output are so severely asymmetric that they are very different from one sinusoidal signal. Therefore, it is inevitable that the original relay feedback method shows poorer accuracy. To improve the accuracy for disturbances, several modified relay feedback methods have been proposed (Hang et al. (1993), Shen et al. (1996b), Park et al. (1997)). However, their methods are somewhat complicated compared with the proposed strategy, and still an exact data cannot be guaranteed. According to (7) of theorem 2, the accuracy of the estimated gain by (2) becomes better as the integral of the relay output increases. It is noteworthy that we can increase the integral of the relay output by using a biased-relay feedback. Figure 3 shows responses of an input biased-relay feedback. As the bias increases, the robustness to disturbances would be enhanced due to the bigger integral of the relay output. Actually, the integral of the ideal relay feedback (no bias) is zero so that the sensitivity to disturbances is very high. Therefore, a biased-relay feedback is strongly recommended to identify the zero frequency data. Here, a previous biased-relay (Shen et al. (1996c)) can be used to identify the zero frequency. However, the identified frequency data show poorer accuracy compared with the original relay feedback method. Contrarily, the proposed strategy provides exact frequency data corresponding to the frequency of the relay regardless of a static disturbance.
Figure 4. Proposed relay feedback to identify two frequency data sets simultaneously.
On the other hand, a very favorite aspect can be found from (1) of theorem 1. That is, we can identify the frequency data set corresponding to 2ωr additionally. Until now, there is no relay feedback method to identify another frequency data set additionally except zero and relay frequency data. To identify the frequency data set corresponding to twice the relay frequency, it is natural that the signal should contain the harmonic term of the frequency when the signal is represented by the Fourier series. However, the original relay output contains only odd order harmonic terms. Therefore, the sensitivity to disturbance and nonlinearity is very high. Therefore, we should insert a signal of the frequency ω ) 2ωr to identify two frequency data simultaneously. This can be easily done by adding an additional relay output to the relay output as shown in Figure 4. Here, on-off of the additional relay is done every second on-off of a biased relay. The period (ωr) of the total relay output (process input) is that of the additional relay output. Then, we can estimate two frequency data sets simultaneously by calculating (1) of theorem 1 twice for ω ) ωr and ω ) 2ωr. Here, if a nonzero input bias is added to the relay on-off, we additionally identify the zero frequency data using (2). III. PID Controller Tuning Based on Identified Frequency Data Sets From the proposed strategy, several frequency data sets can be estimated. Then we should tune the PID controller based on the identified frequency information. It should be noted that the usual on-line tuning methods such as internal model control (IMC) (Morari and Zafiriou (1989)), Cohen-Coon (C-C) (Cohen and Coon (1953)), and integral of the time-weighted absolute value of the error ITAE-1 (Lopez et al. (1967)) and ITAE-2 rules (Sung et al. (1996)) are based on parametric models. Here, the parametric model is the first-order plus time delay or the second-order plus time delay model as follows.
first-order plus time delay model: Gm(s) )
k exp(-θs) τs + 1
(11)
second-order plus time delay model: Gm(s) )
k exp(-θs) 2 2
τ s + 2ζs + 1
(12)
Here, k, τ, θ, and ζ denote the static (DC) gain, time constant, time delay, and damping factor, respectively. These models can represent a high-order process effectively since they include a time delay term.
Ind. Eng. Chem. Res., Vol. 36, No. 12, 1997 5529
The ideal relay feedback of Figure 1 combined with the algorithm (1) can be used to obtain one frequency data set. Then the Ziegler-Nichols (ZN) rule (Ziegler and Nichols (1942)) or Åstro¨m’s tuning rule (Åstro¨m and Ha¨gglund (1984)) is used to tune the PID controller. This usually guarantees stable closed-loop responses for the usual processes. However, it should be noted that the tuning method shows a poor performance frequently since it considers only one frequency point. The IMC tuning rule and the ITAE-1 tuning rule among those based on the first-order plus time delay model and the ZN rule show the best performance for a step set-point change and a step input disturbance rejection, respectively. To obtain the first-order plus time delay model, zero frequency data and other frequency data are needed. Therefore, a biased relay of Figure 3 combined with the algorithm (1) should be used to tune the PID controller using the IMC or the ITAE-1 tuning rule. On the other hand, we can recognize that the firstorder plus time delay model cannot represent an underdamped response. Also, it cannot represent a highorder plus time delay process better compared with the second-order plus time delay model. Therefore, we can infer that the ITAE-2 based on the second-order plus time delay model shows the best control performances among all the above-mentioned rules. Moreover, it shows almost the same performance as that of the optimal tuning for the second-order plus time delay process. Zero and two other frequency data are needed to obtain the second-order plus time delay model. The parametric model from frequency data sets can be estimated with a small modification of Sung and Lee (1996). Therefore, a biased relay combined with another different relay as shown in Figure 4 is needed to tune the PID controller using the ITAE-2 tuning rule. That is, a better tuning is possible by the proposed strategy since more frequency data can be obtained compared with previous methods.
Figure 5. Control performances of the proposed autotunner and a previous autotunner.
IV. Simulation Study Figure 6. Error curve with respect to the bias.
Consider the following fourth-order process.
G(s) )
1 (s + 1) (s + 1.6s + 1) 2
2
(13)
The original relay feedback method for the automatic tuning of the PID controller can provide only an ultimate frequency data set so that the PID controller should be tuned by tuning rules such as Ziegler-Nichols (ZN) or Åstro¨m’s tuning (Åstro¨m and Ha¨gglund (1984)). On the other hand, three frequency data sets are available from the test of Figure 4 by the proposed strategy. From the obtained frequency data sets for ω ) 0.0, ω ) 2π/12.864, and ω ) 4π/12.864, we can obtain the reduced second-order plus time delay model and then the PID controller can be tuned easily by the Integral of the time-weighted absolute value of the error (ITAE-2) tuning rule (Sung et al. (1996)). Figure 5 compares the control performances of two PID controllers tuned by the ZN tuning rule based on the original relay feedback and the ITAE-2 tuning rule based on the proposed strategy. Surely, the proposed autotuner provides superior control performances for both servo (a) and regulatory (b) problems. Since the ITAE-2 tuning rule is much better than the Ziegler-Nichols (ZN) tuning rule, these results can be inferred easily. Figure 6 denotes the relative error at zero frequency
with respect to the bias under a step input disturbance (here, d ) -0.1 and the magnitude of the relay ) 1.0). As shown in Figure 6, as the bias term of the biased relay of Figure 3 increases, the robustness to the disturbance is much enhanced. This result is the same as that of theorem 2 and its discussions. Also, we can infer these results intuitively from the fact that the magnitude of the low-frequency signal becomes larger compared with that of the disturbance as we increase the bias term so that the effect of the disturbance can be reduced relatively. V. Conclusions We proposed an enhanced strategy using the Fourier analysis for the relay feedback identification method to obtain more frequency data sets from one relay test compared with previous methods. We also discussed the effects of disturbances. From simulation results and discussions we can recognize that the proposed method provides exact frequency data sets for the original as well as biased-relay feedback tests. Also, it provides a more accurate data set for disturbances compared with previous methods. Moreover, it guarantees the exact data set corresponding to the multiple of the relay frequency even though the initial state is not steady
5530 Ind. Eng. Chem. Res., Vol. 36, No. 12, 1997
state and wrong reference values for relay on-off are specified. Finally, we recommend the use of a biasedrelay test based on theorem 2 and many simulation results to identify zero frequency data. Acknowledgment This work was supported in part by the Korea Science and Engineering Foundation (KOSEF) through the Automation Research Center at Pohang University of Science and Technology. Literature Cited Åstro¨m, K. J.; Ha¨gglund, T. Automatic Tuning of Simple Regulators with Specifications on Phase and Amplitude Margins. Automatica 1984, 20, 645. Cohen, G. H.; Coon, G. A. Theoretical Considerations of Retarded Control. Trans. ASME 1953, 75, 827. Hang, C. C.; Åstro¨m, K. J.; Ho, W. K. Relay Auto-tuning in the Presence of Static Load Disturbance. Automatica 1993, 29, 563. Kim, Y. H. PI Controller Tuning Using Modified Relay Feedback Method. J. Chem. Eng. Jpn. 1995, 28, 118. Li, W.; Eskinat, E.; Luyben, W. L. An Improved Autotune Identification Method. Ind. Eng. Chem. Res. 1991, 30, 1530. Lopez, A. M.; Miller, C. L.; Smith, C. L.; Murrill, P. W. Controller Tuning Relationships Based on Integral Performance Criteria. Instrum. Technol. 1967, 14, 72. Morari, M.; Zafiriou, E. Robust Process Control; Prentice-Hall: Englewood Cliffs, NJ, 1989.
Park, J.; Sung, S. W.; Lee, I. Improved Relay Feedback with Static Load Disturbance. Automatica 1997, in press. Shen, S.; Yu, H.; Yu, C. Use of Saturation-Relay Feedback for Autotune Identification. Chem. Eng. Sci. 1996a, 51, 1187. Shen, S.; Wu, J.; Yu, C. Autotune Identification under Load Disturbance. Ind. Eng. Chem. Res. 1996b, 35, 1642. Shen, S.; Wu, J.; Yu, C. Use of Biased-Relay Feedback for System Identification. AIChE J. 1996c, 42, 1174. Sung, S. W.; Lee, I. Limitations and Countermeasures of PID Controllers. Ind. Eng. Chem. Res. 1996, 35, 2596. Sung, S. W.; Park, J.; Lee, I. Modified Relay Feedback Method. Ind. Eng. Chem. Res. 1995, 34, 4133. Sung, S. W.; O, J.; Yu, S.; Lee, J.; Lee, I. Automatic Tuning of PID Controller using Second Order Plus Time Delay Model. J. Chem. Eng. Jpn. 1996, 29, 990. Tan, K. K.; Lee, T. H.; Wang, Q. G. Enhanced Automatic Tuning Procedure for Process Control of PI/PID Controllers AIChE J. 1996, 42, 2555. Ziegler, J. G.; Nichols, N. B. Optimum Setting for Automatic Controllers. Trans. ASME 1942, 64, 759.
Received for review May 8, 1997 Revised manuscript received September 26, 1997 Accepted September 26, 1997X IE970332L
X Abstract published in Advance ACS Abstracts, November 1, 1997.