# Area Methods for Relay Feedback Tests

Post on 03-Feb-2017

212 views

TRANSCRIPT

Area Methods for Relay Feedback Tests

Jietae Lee* and Su Whan Sung

Department of Chemical Engineering, Kyungpook National UniVersity, Taegu 702-701, Korea

Thomas F. Edgar

Department of Chemical Engineering, UniVersity of Texas, Austin, TX78712

The amplitude and period of the relay feedback oscillation are used to obtain the ultimate parameter of adynamic process and to tune a proportional-integral-derivative (PID) controller automatically. Equationsfor the ultimate gain and period are based on ignoring higher harmonic terms in the relay feedback response.The integral of the relay feedback response can suppress the higher harmonic terms, and the amplitude ofthis integral has been found to be better for estimating the ultimate gain of a process. As extensions, simplermethods that use several area calculations of the relay feedback response are proposed and shown to providemore accurate frequency responses, ultimate gain and period, and parametric models.

Introduction

A feedback system where a relay is put in the feedback loopwill oscillate. The oscillation period is close to the ultimateperiod when the higher harmonic terms are attenuated suf-ficiently by the process dynamics. The ultimate gain can alsobe obtained by measuring the amplitude of oscillation. Theultimate gain and period are used to tune proportional-integral-derivative (PID) controllers.1 This relay feedback system canbe easily implemented in field with minimal efforts and is oneof the standard methods to tune PID controllers automatically.2,3

When attenuation of the higher harmonic terms by the processdynamics is not sufficient, there exist considerable errors inestimation of the ultimate gain and period. Several methods suchas a saturation relay,3 relay with a P control preload,4 and atwo level relay5 were introduced to obtain more accurateultimate gain and period of the process by suppressing the highorder harmonic terms in the relay output. Asymmetric relayoscillations due to unknown load disturbances cause additionalerrors in the ultimate parameter estimations. Methods to rejectunknown load disturbances and restore symmetric relay oscil-lations have been proposed.6-8

Parametric models from several measurements of the relayfeedback oscillation including the oscillation amplitude can beobtained.9-11 For example, Luyben9 used the shape factor toextract a three-parameter model from the cyclic steady state partof the relay response. However, methods that use only the cyclicsteady state part cannot provide acceptable robustness foruncertainty such as process/model mismatch and nonlinearity.They may provide poor model parameters such as negative gainwhen the model structure is different from that of the process.11

A relay experiment with a subsequent P control experiment oranother relay feedback test can be used to obtain a parametricmodel robustly.12,13

Huang et al.14 used the integral of the relay transients to obtainthe steady state gain of the process. Recently, Lee et al.15

proposed methods to extract more accurate frequency responsedata and parametric models from the response of a singleconventional relay feedback test and its integral. Integrals ofthe relay responses make the fundamental frequency term moredominant compared to the higher harmonic terms, resulting in

better accuracy in estimating frequency responses and modelparameters. This paper extends the previous method of integralof the relay feedback response and proposes methods usingintegrals of the conventional relay feedback responses. Thesemodifications enhance identification performances withoutmodifying the relay feedback system. Accurate estimates offrequency responses of the first and third harmonics, ultimategain/period and parametric models are obtained. Since theconventional relay feedback method is used, the proposedmethods share the practical and theoretical merits of theconventional relay feedback method. Because it is not necessaryto store whole trajectories and the computations are simple, theproposed methods can be implemented easily as an enhancementof standard commercial PID controllers.

Conventional Relay Feedback Method. A classical relayfeedback system shown in Figure 1a is considered. This relayfeedback system will produce a stable oscillation. Astrom andHagglund1 used this oscillation to extract approximate ultimatedata and tune PID controllers automatically. The approximateultimate period Pu and ultimate gain Kcu are

Pu ) p

Kcu )4hay

(1)

* To whom correspondence should be addressed. Tel.: +82-53-950-5620. Fax: +82-53-950-6615. E-mail: jtlee@knu.ac.kr. Figure 1. Relay feedback system and responses.

Ind. Eng. Chem. Res. 2010, 49, 78077813 7807

10.1021/ie901546j 2010 American Chemical SocietyPublished on Web 11/20/2009

where p is the period of oscillation and ay is the measuredamplitude of process output. The ultimate period and gain ineq 1 are approximate due to ignoring the high harmonic termsin the process output. As a result, the ultimate period and gainof eq 1 show relative errors up to 5% and 18%, respectively,for first-order plus time delay (FOPTD) processes, which maynot be acceptable.

Let the input and output trajectories which are fully developed(cyclic steady state) be u(t) and y(t) for the conventional relayfeedback system, respectively (Figure 1b). The relay output (asquare wave) can be represented by a Fourier series17

u(t) ) 4h (sin(t) +

13

sin(3t) + 15

sin(5t) + ), ) 2/p(2)

where h is the relay amplitude and p is the period of relayfeedback oscillation. The output corresponding to u(t) of eq 2is16

y(t) ) 4h (|G(j)| sin(t + G(j)) +

13

|G(j3)| sin(3t + G(j3)) + )(3)where G(s) is the process transfer function. From eq 3,

y(p/4) ) 4h (|G(j)| cos(G(j)) -

13

|G(j3)| cos(G(j3)) + ) ayy(0) ) 4h

(|G(j)| sin(G(j)) +13

|G(j3)| sin(G(j3)) + ) ) 0(4)By neglecting the high harmonic terms, eq 4 leads to eq 1, theestimates of ultimate gain/period of G(s). Methods such as asaturation relay,3 relay with a P control preload,4 and a twolevel relay5 use u(t) with smaller higher harmonic terms toreduce errors in eq 1. The integral of y(t) reduces the higherharmonic terms in y(t), and methods by Lee et al.15 use this. Infact, we can find exact G(j) from the two integrals of 0py(t)cos(t) dt and 0py(t) sin(t) dt.16 Here, simple methods thatapproximate these integrals are proposed.

Areas of Relay Oscillation. First the following two areas asshown in Figure 1b are considered

A ) 0p/4 y(t) dtB ) p/4p/2 y(t) dt (5)

These can describe the integral

q1 ) 0p q(t)y(t) dt ) 2(0p/4 y(t) dt + p/4p/2 y(t) dt)) 2(A + B)

q2 ) 0p q(t - p4)y(t) dt ) 2(0p/4 y(t) dt - p/4p/2 y(t) dt)) 2(A - B) (6)

where (Table 1)

q(t) ) { 1, t (0, p/2)-1, t (p/2, p)q(t ( p) ) q(t)

(7)

The Fourier series of the square wave q(t) is q(t) )(4/)(sin(t) + (1/3) sin(3t) + ...).17 Since q(t - p/4) )(4/)(cos(t) - (1/3) cos(3t) + ...) and

y(t) ) 4h (|G(j)| sin(t + G(j)) +

13

|G(j3)| sin(3t + G(j3)) + )) 4h

(|G(j)| cos(G(j)) sin(t) +|G(j)| sin(G(j))cos(t) +

13

|G(j3)| cos(G(j3)) sin(3t) +

13

|G(j3)| sin(G(j3)) cos(3t) + )(8)

we have (Appendix)17

q1 )8hp

2 (|G(j)| cos(G(j)) +19

|G(j3)| cos(G(j3)) + )q2 )

8hp

2 (|G(j)| sin(G(j)) -19

|G(j3)| sin(G(j3)) + )(9)

In addition to the above areas, an additional two areas asshown in Figure 1b are considered for better estimates

C ) 0p/4 ty(t) dtD ) p/4p/2 ty(t) dt (10)

For the triangular wave (Table 1)

r(t) ) {t, t [0, p/4)-t + p/2, t [p/4, 3p/4)t - p, t [3p/4, p)

r(t ( p) ) r(t)

(11)

we have

q3 ) 0p r(t)y(t) dt ) 2(0p/4 ty(t) dt +p/4p/2 (p/2 - t)y(t) dt) ) 2(C - D) + pB

q4 ) 0p r(t - p4)y(t) dt ) 2(0p/4 (p/4 - t)y(t) dt -p/4p/2 (t - p/4)y(t) dt) ) -2(C + D) + p2(A + B)(12)

The Fourier series of r(t) is17

r(t) ) 2p2(sin(t) -

19

sin(3t) + ) (13)

Hence we have

q3 )4hp2

3(|G(j)| cos(G(j)) - 1

27|G(j3)| cos(G(j3) + )

q4 )4hp2

3(|G(j)| sin(G(j)) + 1

27|G(j3)| sin(G(j3) + )

(14)

These quantities are summarized in Table 2.

Two-Area (2A) Method. Utilizing the above quantities andignoring higher harmonic terms, we can obtain the amplituderatio and phase angle of G(j). One of the simplest equationsis

7808 Ind. Eng. Chem. Res., Vol. 49, No. 17, 2010

|G(j)| ) 2

8hpq12 + q2

2 ) 2

4hp(A + B)2 + (A - B)2

) G(j) + ) arctan(q2q1) ) arctan(A - BA + B)(15)

Equation 15 uses only two areas of A and B. Because |A -B| , |A + B|, G(jw) and |G(jw)| (2/(4hp))(A + B).Consequently we have Kcu 4hp/(2(A + B)), which is thesame as the expression given in the work of Lee et al.15 Theperformance of eq 15 is very similar to that in the work of Leeet al.15 However, eq 15 provides the phase angle information.Errors in eq 15 are due to the third and higher harmonic terms.

Two-Area with Amplitude (2AA) Method. To reduce errorsdue to the third harmonic term of G(j3), we combine eqs 4and 9. That is, let

q5 )34

q1 +14

2p

ay )8hp

2(|G(j)| cos(G(j)) + 0 + 2

25

|G(j5)| cos(G(j5) + )

q6 )34

q2 +14

2p

0 ) 34

q2 )8hp

2(|G(j)| sin(G(j)) +

0 + 225

|G(j5)| sin(G(j5) + )(16)

Then we have

|G(j)| ) 2

8hpq52 + q6

2 )

2

8hp(34q1 + 14 2p ay)2 + (34q2)2 ) arctan(q6q5) ) arctan(q2/(q1 + 2pay3 ))

(17)

Table 1. Weighting Functions for Integrations of the Output

Table 2. Equations for Some Quantitiesa

quantity series expression

y(0) ) 04h (|G(j)| sin(G(j)) +

13

|G(j3)| sin(G(j3)) + )

y(p/4) ) ay4h (|G(j)| cos(G(j)) -

13

|G(j3)| cos(G(j3)) + )

q1 ) 0pq(t)y(t) dt ) 2(A + B)8hp

2 (|G(j)| cos(G(j)) +19

|G(j3)| cos(G(j3)) + )

q2 ) 0pq(t -(p/4))y(t) dt ) 2(A - B)8hp

2 (|G(j)| sin(G(j)) -19

|G(j3)| sin(G(j3)) + )

q3 ) 0pr(t)y(t) dt ) 2(C - D) + pB4hp2

3 (|G(j)| cos(G(j)) -1

27|G(j3)| cos(G(j3)) + )

q4 ) 0pr(t -(p/4))y(t) dt ) -2(C + D) + 0.5p(A + B)4hp2

3 (|G(j)| sin(G(j)) +1

27|G(j3)| sin(G(j3)) + )

a A ) 0p/4y(t) dt, B ) p/4p/2y(t) dt, C ) 0p/4ty(t)dt, D ) p/4p/2ty(t)dt.

Ind. Eng. Chem. Res., Vol. 49, No. 17, 2010 7809

Figure 2 shows errors in eq 17 for FOPTD processes andcritically damped second-order plus time delay (SOPTD)processes. We can see that errors in the amplitude ratios arewithin 5%. Errors in eq 17 are due to approximation of y(p/4)) ay and the fifth and higher harmonic terms.

Four-Area (4A) Method. Consider the following quantities

q7 ) q1 +6p

q3 )32hp

2 (|G(j)| cos(G(j)) + 0 +2

125|G(j5)| cos(G(j5)) + )

q8 ) q2 +6p

q4 )32hp

2(|G(j)| sin(G(j)) + 0 +

2125

|G(j5)| sin(G(j5)) + (18)

Consequently,

|G(j)| ) 2

32hpq72 + q8

7

) arctan(q8q7)(19)

will have estimation errors smaller than eq 17 because eq 18has smaller fifth harmonic terms than eq 16.

The weighting function corresponding to eq 18 is (Table 1)

qr6(t) ) q(t) + 6p

r(t) ) 16 (sin(t) + 0 +

225

sin(5t) + )(20)

Figure 2. Relative errors in |G(jw)| and the angle for processes, G(s) )exp(-s)/(s + 1)n.

Figure 3. Relative errors in Kcu and Pu for processes, G(s) ) exp(-s)/(s + 1).

Figure 4. Estimates (circles) of G(j) and G(j3).

Figure 5. Estimated models for the process, G(s) ) exp(-s)/(s + 1)-(2s + 1)(4s + 1).

7810 Ind. Eng. Chem. Res., Vol. 49, No. 17, 2010

This has no third harmonic term and eliminates the thirdharmonic terms in eq 18. Figure 2 shows errors in eq 19 forFOPTD processes and critically damped SOPTD processes. Wecan see that errors in the amplitude ratios are within 1%. Errorsin eq 19 are due to the fifth and higher harmonic terms.

Ultimate Gain and Period. Previously, Kcu ) 1/|G(j)| wasused. In this case, the accurate estimation of |G(j)| does notguarantee the accuracy of Kcu and there can be a significanterror in Kcu because the oscillation period can differ from theultimate period. Previous methods without changing the shapeof relay output have no way to reduce errors in estimating theultimate gain because the information of G(j) is notestimated. On the other hand, we have information aboutG(j) and the estimation errors in the ultimate gain and periodcan be reduced with correlations. For this, we use a linearcorrection as

Kcu ) (1 + 0.15)/ |G(j)|Pu ) (1 - 0.3)p

(21)

These correlations are obtained from results of the low-orderprocesses. Figure 3 shows errors of estimates of the ultimategain and period for FOPTD processes. For a higher-orderprocess, the phase angle is very small and both estimates withand without correlations will yield accurate ultimate gain andperiod.

Estimation of G(j3). The frequency response at thefrequency of 3 can be obtained with combining quantities ofq1-q4 differently. Consider

Figure 6. Flowchart of the 4A method to compute the ultimate gain andthe ultimate period of the process.

Table 3. Simulation Results

ultimate data parametric model

process eq 1 proposed FOPTD15 proposed

e-s

(s + 1)(2s + 1)(4s + 1)0.5 Kcu ) 6.05 (-3.5%) Kcu ) 6.23 (-0.6%) exp(-2.48s)/(8.70s + 1) exp(-1.18s)/(3.27s + 1)2(Kcu ) 6.26 Pu ) 8.96) Pu ) 9.10 (1.5%) Pu ) 9.00 (0.4%) IAEa ) 3.66 IAE ) 0.223 Kcu ) 2.35 (-3.8%) Kcu ) 2.46 (0.7%) exp(-5.24s)/(5.86s + 1) exp(-3.67s)/(3.15s + 1)2(Kcu ) 2.44 Pu ) 16.54) Pu ) 16.4 (-0.9%) Pu ) 16.5 (-0.2%) IAE ) 1.10 IAE ) 0.06

(-0.5s + 1)e-s

(s + 1)30.1 Kcu ) 2.79 (-4.9%) Kcu ) 3.06 (4.1%) exp(-1.73s)/(2.45s + 1) exp(-1.12s)/(1.25s + 1)2(Kcu ) 2.94 Pu ) 5.63) Pu ) 5.74 (2.0%) Pu ) 5.54 (-1.5%) IAE ) 0.61 IAE ) 0.073 Kcu ) 1.32 (-2.5%) Kcu ) 1.36 (0.3%) exp(-4.79s)/(1.85s + 1) exp(-4.12s)/(1.20s + 1)2(Kcu ) 1.357 Pu ) 12.54) Pu ) 12.2 (-2.6%) Pu ) 12.5 (-0.2%) IAE ) 0.22 IAE ) 0.06

a IAE (integral of absolute error) for the unit step response.

Table 4. Correction Factors for Relay Feedback Systems

Ind. Eng. Chem. Res., Vol. 49, No. 17, 2010 7811

q9 ) q1 -2p

q3 )32hp

272(0 + |G(j3)| cos(G(j3)) +27125

|G(j5)| cos(G(j5)) + )q10 ) q2 -

2p

q4 )32hp

272(0 - |G(j3)| sin(G(j3)) +27

125

|G(j5)| sin(G(j5)) + )(22)Then we have

|G(j3)| ) 272

32hpq92 + q10

2

G(j3) ) -arctan(q10q9 )(23)

The weighting function corresponding to eq 21 is (Table 1)

qr2(t) ) q(t) - 2p

r(t) ) 169(0 + sin(3t) +

925

sin(5t) + )(24)

This has no first harmonic term and eliminates the first harmonicterms in eq 21, enabling the estimation of G(j3). Figure 4shows estimation performances for G(j) and G(j3).

Parametric Model Identification. Parametric models ofprocesses are very useful. Information in the relay oscillationis usually not enough. Relay oscillation with the process steadystate gain is considered. The process steady state gain can beobtained easily in the course of relay feedback test14 or afterthe relay feedback test with a step set point change. We considera process model

G(s) ) ke-s

(s + 1)n(25)

The process order n is determined as

n ) {1, |G(j3)|/ |G(j)| g 0.32, |G(j3)|/ |G(j)| < 0.3 (26)Then, from G(j) ) ke-j/(j + 1)n, we have3

) 1( k|G(j)| )2/n - 1 (27)

) -G(j) - n arctan()

(28)

For FOPTD processes, |G(j3)|/|G(j)| g 1/3, and thethreshold value in eq 26 is chosen from this. Panda and Yu11

showed that the critically damped SOPTD model (n ) 2) iseffective for wide range of processes. Figure 5 shows Nyquistplots and step responses of parametric models obtained. Wecan see that the proposed SOPTD models are very accurate forprocesses simulated.

Applications. Figure 6 shows the flowchart to compute theultimate gain and period by the 4A method. The proposedmethods are applied to various processes. Two of them are listedin Table 3. Better results are obtained with the proposed 4Amethod. Both processes are high order and attenuate higherharmonic terms; the conventional method of eq 1 also providesaccurate estimates of ultimate gain and period. On the otherhand, in estimating the parametric model, the proposed modelsare more accurate than models of the conventional method.

The proposed area methods can be applied to other types ofrelay feedback systems whenever they show symmetric re-sponses. These include the relay with hysteresis2 and the two-

channel relay.18 With slight modifications as shown in Table 4,we can apply the proposed methods to them.

Conclusions

Methods to obtain accurate frequency responses of the firstand third harmonics and the ultimate gain/period of a processare proposed, along with parametric models from oscillationsof the conventional relay feedback system. These methods usetwo or four areas of the relay feedback response that are simpleto compute. The first and third harmonic frequency responsescan be used to adjust tuning rules based on the ultimate gainand period of process and to determine the order of parametricmodels.

Appendix (Orthogonality of Trigonometric Functions17)

For a set of trigonometric functions, {1, cos(t), cos(2t), ...,sin(t), sin(2t), ...}, we have

0p sin(nt) sin(mt) dt ) {0, n * mp/2, n ) m0p sin(nt) cos(mt) dt ) 00p cos(nt) cos(mt) dt ) {0, n * mp/2, n ) m * 0

p, n ) m ) 0

(A1)

for p ) 2/. Applying these, we can obtain simple equationsfor integrals such as

0p f(t)g(t) dt ) p2Rma + p2mb (A2)for functions of f(t) ) R0 + R1 cos(t) + 1 sin(t) + R2cos(2t) + 2 sin(2t) + ... and g(t) ) a cos(mt) + bsin(mt).

Literature Cited

(1) Astrom, K. J.; Hagglund, T. Automatic Tuning of Simple Regulatorswith Specifications on Phase and Amplitude margins. Automatica 1984, 20,645.

(2) Astrom, K. J.; Hagglund, T. PID Controllers; Instrument Societyof America: North Carolina, 1995.

(3) Yu, C. C. Autotuning of PID Controllers: A Relay FeedbackApproach; Springer: London, 2006.

(4) Tan, K. K.; Lee, T. H.; Huang, S.; Chua, K. Y.; Ferdous, R. ImprovedCritical Point Estimation Using a Preload Relay. J. Process Control 2005, 16,445.

(5) Sung, S. W.; Park, J. H.; Lee, I. Modified Relay Feedback Method.Ind. Eng. Chem. Res. 1995, 34, 4133.

(6) Hang, C. C.; Lee, T. H.; Ho, W. K. AdaptiVe Control; InstrumentSociety of America: North Carolina, 1993.

(7) Shen, S. H.; Wu, J. S.; Yu, C. C. Autotune Identification under LoadDisturbance. Ind. Eng. Chem. Res. 1996, 35, 1642.

(8) Sung, S. W.; Lee, J. Relay Feedback Method under Large StaticDisturbances. Automatica 2006, 42, 353.

(9) Luyben, W. L. Getting More Information from Relay-feedback Tests.Ind. Eng. Chem. Res. 2001, 40, 43914402.

(10) Kaya, I.; Atherton, D. P. Parameter Estimation from RelayAutotuning with Asymmetric Limit Cycle Data. J. Process Control 2001,11, 429.

(11) Panda, R. C.; Yu, C. C. Analytic Expressions for Relay FeedbackResponses. J. Process Control 2003, 13, 48.

(12) Sung, S. W.; O, J.; Lee, I.; Lee, J.; Yi, S. H. Automatic Tuning ofPID Controller Using Second-Order Plus Time Delay Model. J. Chem. Eng.Jpn. 1996, 29, 990.

(13) Sung, S. W.; Lee, I. Enhanced Relay Feedback Method. Ind. Eng.Chem. Res. 1997, 36, 5526.

(14) Huang, H. P.; Jeng, J. C.; Luo, K. Y. Auto-tune System UsingSingle-run Relay Feedback Test and Model-based Controller Design. J.Process Control 2005, 15, 713.

7812 Ind. Eng. Chem. Res., Vol. 49, No. 17, 2010

(15) Lee, J.; Sung, S. W.; Edgar, T. F. Integrals of Relay FeedbackResponses for Extracting Process Information. AIChE J. 2007, 53, 23292338.

(16) Seborg, D. E.; Edgar, T. F.; Mellichamp, D. A. Process Dynamicsand Control, 2nd ed.; Wiley: New York, 2004.

(17) Kreyszig, E. AdVanced Engineering Mathematics; Wiley: NewYork, 1999.

(18) Friman, M.; Waller, K. V. A Two Channel Relay for Autotuning.Ind. Eng. Chem. Res. 1997, 36, 2662.

ReceiVed for reView October 1, 2009ReVised manuscript receiVed November 2, 2009

Accepted November 3, 2009

IE901546J

Ind. Eng. Chem. Res., Vol. 49, No. 17, 2010 7813