Area Method for a Biased Relay Feedback System - Industrial

Jun 17, 2010 - The relay feedback system often shows an asymmetric response because ... data and parametric models compared with previous approaches...
0 downloads 0 Views 435KB Size
8016

Ind. Eng. Chem. Res. 2010, 49, 8016–8020

Area Method for a Biased Relay Feedback System 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, Texas 78712

The relay feedback system often shows an asymmetric response because of initial transient states, disturbances, and process nonlinearity. To restore a symmetric response of the relay feedback system, an iterative adjustment of input or output bias is required. Instead of trying to obtain a symmetric response, the asymmetric response can be analyzed to estimate the ultimate data or a parametric model of process. However, the asymmetric response causes additional errors in estimating the ultimate properties of the process. An area method is proposed to reduce these errors. Because integrals (areas) of the relay responses reduce the effects of the high-order harmonic terms significantly, the proposed method shows better accuracy in obtaining frequency response data and parametric models compared with previous approaches. Introduction 1

Since Astrom and Hagglund introduced an autotuning method that uses the relay feedback test, many researches and applications have been reported.2,3 Many commercially available controllers have this feature and use the symmetric oscillation of a relay feedback system. However, some relay feedback systems show asymmetric oscillation due to the transient initial states, disturbances, and processes nonlinearities. Conventional simple analysis of the symmetric relay oscillation which is based on ignoring the higher harmonic terms has errors in estimating the ultimate gain and period of a process to tune controllers. The asymmetric response causes additional errors. Methods to reject sources of asymmetric responses and restore symmetric relay oscillations have been available.4-6 These methods use iterative adjustments of input and/or output bias. The asymmetric response has additional information about the process steady state gain in addition to the ultimate information when the relay feedback test is started from the initial steady state condition. Sometimes, the asymmetric response is intentionally used instead of the symmetric responses for this steady state information of the process.5,7 The process steady state gain information can be used to obtain a first order plus time delay (FOPTD) model. Wang et al.7 derived exact expressions relating the parameters of the FOPTD process to the measured point data of the relay response and presented a method to extract the model parameters of the FOPTD model. Some simple single loop controllers can employ this asymmetric response with their own correlation rules. Their tuning results are somewhat poor because the estimated ultimate gain and period can be very poor and their correlation rules have limited performance. For FOPTD processes, the ultimate period errors can be over 50%.5 Here, to reduce these errors, the area method that shows considerable improvements in estimating the ultimate gain and period for the symmetric relay response8 is applied. Four characteristic areas are used to find a frequency response and the ultimate gain/period of process. When the relay feedback test * To whom correspondence should be addressed. Tel.: +82-53-9505620. Fax: +82-53-950-6615. E-mail: [email protected].

is started from the initial steady state, the asymmetric response also provides the process steady state gain. With this process information at zero frequency, we can obtain the FOPTD model. Simulations show that the proposed method provides a better estimation of ultimate information and FOPTD models. Considering that relay feedback tests in industry often result in asymmetric responses, the proposed method can be effectively applied to improve commercial relay feedback autotuning systems.

Discussion Relay Feedback Method with a Biased Relay. A relay feedback system shows an asymmetric response when it is started from a transient state or when there are disturbances and nonlinearities. This asymmetric response can be interpreted as input or output bias as shown in Figure 1. Let the input and output trajectories which are fully developed (cyclic steady state) be u(t) and y(t) for the relay feedback system with a biased relay, respectively. Then it can be represented by a Fourier series as

Figure 1. Responses of the relay feedback system with an output bias.

10.1021/ie1003027  2010 American Chemical Society Published on Web 06/17/2010

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

8017



u(t) ) c0 +

∑ c cos(kωt) k

k)1

4h ) (4R - 1)h + π sin(2Rπ) cos(ωt) + 4h sin(4Rπ) cos(2ωt) + · · · π 2 c0 ) (4R - 1)h p/2 4h sin(2kRπ) ck ) 2 , u(t) cos(kωt) dt ) p -p/2 kπ t1 R) 2(t1 + t2)



k ) 1, 2, · · ·

(1) Here h is the relay amplitude, t1 and t2 are the times of relay on and relay off, respectively; the oscillation period is p ) t1 + t2 and ω ) 2π/p is the angular frequency of the relay feedback oscillation. For R ) 1/4, the response is symmetric and the asymmetry becomes more severe as R decreases. The output corresponding to u(t) is y(t) ) y0 + c1 |G(jω)| cos(ωt + ∠G(jω)) + c2 |G(j2ω)| cos(2ωt + ∠G(j2ω)) + · · ·

(2)

Figure 2. Relay feedback responses for FOPTD processes, G(s) ) exp(-θs)/ (s + 1).

∫ y(t) dt B ) - ∫ y(t) dt C ) ∫ y(t) dt D) ∫ y(t) dt 1 -(A + B) + (C + D) y ) ∫ y(t) dt ) p p

4h π(amax - amin)/2

-Rp Rp

0 p/2

Rp p-Rp

Pu ) p Kcu )

0

A)-

where G(s) is the process transfer function. Neglecting the high harmonic terms and assuming that ∠G(jω) ≈ -π and R ≈ 1/4, we obtain y(t) ≈ y0 - 4h|G(jω)| cos(ωt)/π. Then, the resulting approximate ultimate period Pu and ultimate gain Kcu are

(4)

p/2

p

(3)

where amax and amin are the maximum and minimum value of y(t) as shown in Figure 1, respectively. It should be noted that the estimated ultimate period and gain are approximate because the high harmonic terms are neglected. As a result, the ultimate data of eq 3 contain errors. It is shown5 that for a FOPTD process the ultimate gain error is relatively constant for a change of R. On the other hand the ultimate period error increases considerably as R decreases. For example, the ultimate period error is more than 20% for R ) 1/7. These errors may not be acceptable. To reduce these errors, a method using the integrals of responses has been proposed recently for the symmetric response.8 Here this method is further extended to the asymmetric response. Asymmetric relay responses are obtained by introducing output biases ∆a as in Figure 1. It is noted that ∆a does not guarantee a given ratio of ∆a/a and a given asymmetric parameter R because they are also dependent on the process dynamics to be identified. Figure 2 shows responses of the relay feedback system with output bias for the first order plus time delay process with time delays of 0.5 and 5. We can see that a large output bias (|∆a/a| ≈ 1) is required for a time delay of 5 to obtain a small asymmetric parameter of R. Hence a small asymmetric parameter R will not appear for a large time delay process when a moderate output bias (∆a/a is not large) is used. Equations corresponding to areas in Figure 1b are derived next. First let

0

0

for an asymmetric relay response y(t) at the cyclic steady state. Here p is the period of relay oscillation. Since y(-Rp) ) y(Rp) ) 0, we have 1 1 (y(-Rp) + y(Rp)) ) y0 + c1 |G(jω)| (cos(-Rωp + 2 2 ∠G(jω)) + cos(Rωp + ∠G(jω))) + 1 c2 |G(j2ω)| (cos(-2Rωp + ∠G(jω)) + 2 cos(2Rωp + ∠G(jω))) + · · · ) y0 + c1 |G(jω)| cos(2Rπ) cos(∠G(jω)) +

(5)

c2 |G(j2ω)| cos(4Rπ) cos(∠G(j2ω)) + · · · )0

and consequently y0 ) -

4h (sin(2Rπ) cos(2Rπ)|G(jω)| cos(∠G(jω)) + π (6)

1 sin(4Rπ) cos(4Rπ)|G(j2ω)| cos(∠G(j2ω)) + · · · ) 2 Consider the following integrals: q1 )



p

0

(m1(t) - (4R - 1)) y(t) dt ) -(A + B) (C + D) - (4R - 1)y0p (7)

8018

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

Table 1. Modulation Functions

q2 )

∫ m (t) y(t) dt ) (A - B) + (C - D) p

(8)

2

0

π2 8hp

where (see Table 1)

m1(t) )

{

m2(t) )

{

-1, t ∈ (-p/2, -Rp) 1, t ∈ (-Rp, Rp) -1, t ∈ (Rp, p/2)

(9)

-1, t ∈ (-p/2, 0) 1, t ∈ (0, p/2)

(10)

Fourier series of the above weighting functions m1(t) and m2(t) are10 m1(t) - (4R - 1) )

m2(t) )

4 sin(2Rπ) cos(ωt) + π 1 sin(4Rπ) cos(2ωt) + · · · 2

(

4 1 sin(ωt) + sin(3ωt) + · · · π 3

(

)

)

(11)

(12)

Applying the orthogonal characteristics of sinusoidal functions (Appendix A), we have p 4 sin(2Rπ) q1 ) c1 |G(jω)| cos(∠G(jω)) + 2 π p 4 sin(4Rπ) c2 |G(j2ω)| cos(∠G(j2ω)) + · · · 2 2π 2 ) 8ph sin (2Rπ) |G(jω)| cos(∠G(jω)) + π2

|G(jω) | )

(

q3

) ( 2

+

q2 sin(2Rπ)

sin (2Rπ) - sin (4Rπ)/(4 cos(4Rπ)) ∠G(jω) ≡ -π + φ ) -π q2 q3 arctan / sin(2Rπ) sin2(2Rπ) - sin2(4Rπ)/(4 cos(4Rπ))

((

2

2

)(

)

2

))

(16)

When R ) 1/4, the relay oscillation is symmetric and eq 16 yields a symmetric response as shown by Lee et al.9 The proposed method is applied to several processes. Figure 3 shows relative errors in estimations of G(jω) for FOPTD processes. The size of error is dependent on R or |∆a/a|. When R ) 1/4 or |∆a/a| ) 0, the relay oscillation is symmetric and errors can be made to be very small.9 As R decreases or |∆a/a| increases, errors will increase. For R > 1/5 or |∆a/a| < 0.5, errors are below 10% for FOPTD processes with the ratio of time delay over time constant up to 5. Ultimate Gain and Period. In the previous works, p and 1/G(jω) are used for the ultimate period and the ultimate gain, respectively. They can have errors over 50%.5 However, we have additional information on ∠G(jω), thus errors in the ultimate period Pu and the ultimate gain Kcu can be reduced. For this, we use a linear correction as Kcu ) (1 + 0.3φ)/|G(jω)| Pu ) (1 - 0.4φ)p

(17)

Figure 4 shows errors in eq 17 for FOPTD processes. We can see that errors can be greatly reduced by the proposed method

(13)

2ph sin2(4Rπ) |G(j2ω)| cos(∠G(j2ω)) + · · · π2 q2 ) - p 4 c1 |G(jω)| sin(∠G(jω)) - 0 - · · · 2π 8ph sin(2Rπ) |G(jω)| sin(∠G(jω)) - 0 - · · · )π2

(14)

Estimation of G(jω). From eqs 6 and 13, a quantity that has no second harmonic term, q3 ) q1 + p sin(4Rπ) y0 π cos(4Rπ)

(

)

2 ) 8hp sin2(2Rπ) - sin (4Rπ) × 2 4 cos(4Rπ) π

|G(jω)|cos(∠G(jω)) + 0 + · · ·

can be obtained. From eqs 14 and 15,

(15) Figure 3. Relative errors in estimations of G(jω) (|G(jω) - Gexact(jω)|/| Gexact (jω)|).

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

8019

compared the conventional approach of eq 3. Relative errors of the ultimate gain and period are within 5% for R over 1/6. Parametric Model Identification. When the relay feedback test starts from an initial steady state, the process steady state gain is G(0) ) y0 /u0

(18)

With this steady state gain and the ultimate information, we can obtain a FOPTD model.3 This parametric process model is

Figure 6. A flowchart of the proposed method to obtain the ultimate gain and period of process.

very useful in tuning the PID controller automatically. Consider the FOPTD model

Figure 4. Relative errors of estimated Kcu and Pu for the process G(s) ) exp(-θs)/(s + 1).

Gm(s) )

(19)

Then we have τ) θ)

Figure 5. Nyquist plots of the process (G(s) ) (-s + 1) exp(-s)/(s + 1)5) and its FOPTD models (Wang et al.: exp(-4.24s)/(2.99s + 1); proposed (R ) 1/6): exp(-4.85s)/(2.85s + 1)).

ke-θs τs + 1

1 ω

k ) -1 ( |G(jω)| 2

-∠G(jω) - arctan(τω) ω

(20) (21)

Here k ) G(0) ) y0/u0. These equations are such that G(jω) ) (ke-jθω)/(jτω + 1). Simulations. Figure 6 shows a flowchart to obtain the ultimate gain and period of process. To obtain the FOPTD model, the relay feedback experiment should be started at the initial steady state and computations for eqs 18-21 are added. The proposed methods are applied to high order processes and inverse response processes with time delays. Results are compared with those of the conventional methods. Table 2 shows relative errors of the ultimate gain/period and the integral of square errors (ISE) of the FOPTD model. Here the output bias which provides the relay feedback response of R ) 1/6 is first obtained iteratively, and analytic relay

Table 2. Simulation Results ultimate data e

/(2s + 1)

5

(-s + 1)e-s/(s + 1)5

e

-0.5s

a

/((s + 1)(s + s + 1)) 2

ISE ) ∫0

proposed (R ) /6)

Wang et al. (1997)

proposed (R ) 1/6)

Kcu ) 2.15 (7.2%)

Kcu ) 1.99 (-0.6%)

Pu ) 11.58 (4.3%)

Pu ) 11.06 (-0.3%)

exp (-3.63s)/(3.405s + 1) (ISEa ) 6.7 × 10-3)

exp(-3.71s)/(2.99s + 1) (ISE ) 2.6 × 10-3)

Kcu ) 1.56 (3.6%)

Kcu ) 1.53 (2.0%)

Pu ) 14.04 (6.4%)

Pu ) 13.10 (-0.8%)

exp(-4.24s)/(2.99s + 1) (ISE ) 3.7 × 10-3)

exp(-4.85s)/(2.31s + 1) (ISE ) 0.1 × 10-3)

Kcu ) 1.81 (8.6%)

Kcu ) 1.64 (-1.6%)

Pu ) 5.86 (2.6%)

Pu ) 5.68 (-0.5%)

exp(-2.1s)/(1.15s + 1) (ISE ) 4.5 × 10-2)

(exp(-2.03s)/(1.15s + 1) (ISE ) 3.5 × 10-2)

|G(jω) - Gm(jω)| dω.

2π/Pu

2

FOPTD model

Shen et al.

process -2s

5

1

8020

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

responses3 are used for implementation errors such as errors due to the sampling time. Figure 5 shows Nyquist plots for FOPTD models and the process, G(s) ) (-s + 1) exp(-s)/(s + 1).5 We can see that the proposed method provides an excellent FOPTD model. Conclusions

Appendix A: Orthogonality of Trigonometric Functions (Kreyszig, 1999) For a set of trigonometric functions, {1, cos (ωt), cos (2ωt), ..., sin (ωt), sin (2ωt), ...}, we have

{

0, p/2, sin(nωt) cos(mωt) dt ) 0 0 0, p p/2, cos(nωt) cos(mωt) dt ) 0 p, p

0 p

sin(nωt) sin(mωt) dt )

p

0

p p f(t) g(t) dt ) Rmξa + βmξb 2 2

(A2)

for functions of f(t) ) R0 + R1 cos (ωt) + β1 sin (ωt) + R2 cos (2ωt) + β2 sin (2ωt) + · · · and g(t) ) ξa cos(mωt) + ξb sin(mωt). Literature Cited

A method to reduce errors in estimating the ultimate gain/period and the FOPTD model from a biased relay feedback response is proposed, which uses four area measurements of the biased relay feedback response. By removing the effect of the second harmonic term and reducing the effects of higher harmonic terms with integration, errors in estimating the frequency response can be reduced considerably. The method can be implemented in commercial PID controllers because computations are very simple.

∫ ∫ ∫



{

n*m n)m n*m n)m*0 n)m)0

(A1)

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

(1) Astrom, K. J.; Hagglund, T. Automatic tuning of simple regulators with specifications on phase and amplitude margins. Automatica 1984, 20, 645. (2) Astrom, K. J.; Hagglund, T. PID Controllers; Instrument Society of America: Research Triangle Park, NC, 1995. (3) Yu, C. C. Autotuning of PID Controllers: A Relay Feedback Approach; Springer: London, 2006. (4) Hang, C. C.; Astrom, K. J.; Ho, W. K. Relay auto-tuning in the presence of static load disturbance. Automatica 1993, 29, 563. (5) Shen, S. H.; Wu, J. S.; Yu, C. C. Use of biased relay feedback method for system identification. AIChE J. 1996, 42, 1174. (6) Sung, S. W.; Lee, J. Relay feedback method under large static disturbances. Automatica 2006, 42, 353. (7) Wang, Q. G.; Hang, C. C.; Zou, B. Low-order modeling from relay feedback. Ind. Eng. Chem. Res. 1997, 36, 375–381. (8) Lee, J.; Sung, S. W.; Edgar, T. F. Integrals of relay feedback responses for extracting process information. AIChE J. 2007, 53, 2329– 2338. (9) Lee, J.; Sung, S. W.; Edgar, T. F. Area methods with relay feedback responses. Ind. Eng. Chem Res., published online November 20, 2009, http:// dx.doi.org/10.1021/ie901546j. (10) Kreyszig, E. AdVanced Engineering Mathematics; Wiley: New York, 1999.

ReceiVed for reView February 7, 2010 ReVised manuscript receiVed April 25, 2010 Accepted June 1, 2010 IE1003027