Closed-Loop Automatic Tuning of Single-Input-Single-Output Systems

Jul 1, 1995 - Closed-Loop Automatic Tuning of Single-Input-Single-Output Systems. Shyh-Hong Hwang. Ind. Eng. Chem. Res. , 1995, 34 (7), pp 2406–2417...
0 downloads 0 Views 1MB Size
Ind. Eng. Chem. Res. 1996,34, 2406-2417

2406

Closed-LoopAutomatic Tuning of Single-Input-Single-Output Systems Shyh-Hong Hwangt Department of Chemical Engineering, National Cheng-Kung University, Tainan, Taiwan 70101, Republic of China

Two closed-loop autotuning methods are developed to provide superior alternatives to tune a proportional-integral-derivative (PID) controller for single-input-single-output systems. The first method is a closed-loop extension of the htrom-Hagglund autotuner. A relay is connected in the feedback loop to the PID control system to produce a stable limit cycle. On the basis of the resulting oscillations, the process is identified as a first- or second-order plus time-delay model. The second method is a time domain approach, which identifies the process as a secondorder plus time-delay model via an underdamped transient. The identification scheme permits the use of any control mode (P, PI, or PID) and any test input signal (step, pulse, or impulse) applied in setpoint. Simple-to-use correlation formulas based on the identified model are derived to provide optimum PID settings which yield the desired decay ratio, robustness, and minimum integral of the absolute error. With an initial stabilizing controller, the two methods allow the control parameters to be adjusted iteratively to the correct values. The proposed methods are demonstrated to be valid for a wide range of process dynamics and insensitive to measurement noise and disturbances.

1. Introduction Automatic tuning of single-input-single-output (SISO) systems is accomplished by measuring certain open-loop or closed-loop characteristics and determining optimum control parameters subsequently. Many autotuning methods (Yuwana and Seborg, 1982; k t r o m and Hagglund, 1984; Krishnaswamy et al., 1987) for proportional-integral-derivative (PID) controllers originated from the work of Ziegler and Nichols (1942). In the 2-N method, tuning is based on the critical gain and period which are determined by increasing the proportional gain until the stability limit is reached. In practice, this method may cause the risk of instability and is difficult to automate. To tune a PID controller automatically, the above methods utilize various techniques to estimate the critical gain and period without destabilizing the system during tuning. Yuwana and Seborg (1982) proposed the estimation of the critical gain and period based on a first-order plus time-delay model identified from a step setpoint response of the proportional control system. The method was improved later in various ways (Jutan and Rodriguez, 1984; Lee, 1989; Chen, 1989; Lee et al., 1990; Hwang, 1993; Hwang and Shiu, 1994). The main practical advantage of the method is that it requires only a single transient response experiment under stable operation. Consequently, the identification procedure is easy to implement and disruption to normal process operation can be kept small. However, the method still suffers from several shortcomings. First, since the Z-N tuning rules are followed, the method will inherit the limitations of empiricism. For example, the method does not always produce satisfactory responses especially for open-loop underdamped or nonminimum phase processes. Second, as the identification procedure presumes a simple first-order plus time-delay model, the results may not be accurate for complicated processes. Third, the identification test stipulates a step + E-mail address: [email protected]. Fax: (06) 234-4496.

input signal; other convenient alternatives, such as a pulse signal, cannot be employed. Finally, some practical issues, such as the effects of measurement noise and disturbances present during tuning, have not been explored thoroughly. k t r o m and Hagglund (1984) proposed the use of a relay in place of the proportional controller in the feedback loop for autotuning. This will introduce a periodic square wave to the process input. The critical gain and period are then approximated from the resulting controlled limit cycle in the process output. The method has the advantage that the sustained oscillation is generated under stable operation, whose amplitude can be adjusted to an acceptable level by altering the magnitude of the relay. However, the autotuner still inherits the limitations of the empirical Z-N rules. Another disadvantage is that a useful parametric model is not obtainable from a single test (Li et al., 1991). The operational principles of the above popular methods of Yuwana-Seborg and ktrom-Hagglund require that the PID control system be switched to a different control mode, proportional control or relay feedback, during an autotune test. Consequently, the identification results may not be suitable for the PID control system, and perturbation of normal process operation due to the switching is inevitable. The purpose of this work is to develop a closed-loop autotuning technique which identifies the process under PID control and diminishs the other shortcomings of the two methods. The greatest merits would be that the control parameters can be adjusted iteratively to progressively better values and that disruption to normal process operation is kept at the minimum. The paper is organized as follows. Two closed-loop autotuning methods are proposed in sections 2 and 3. The first method is a closed-loop extension of the Astrom-Hagglund autotuner. Instead of connecting directly to the process, a relay is connected in a feedback loop t o the PID control system. On the basis of the resulting oscillations, the process is identified as a firstor second-order plus time-delay model. The second method is a time domain approach, which identifies the

0888-5885l95l2634-24Q6~09.00fQ 0 1995 American Chemical Society

Ind. Eng. Chem. Res., Vol. 34, No. 7 , 1995 9407

I

L

h

' I

0

(a) Method A 2h

0

0

1,

c

Time

CP

(b) Method B

Figure 1. Closed-loop systems for (a) method A and (b) method B.

process as a second-order plus time-delay model via an underdamped transient. The identification procedure permits the use of any control mode (P, PI, or PID) and any test input signal (step, pulse, or impulse) applied in setpoint. Section 4 presents simple-to-usecorrelation formulas based on the identified model to provide optimum PID control parameters which yield the desired decay ratio, robustness, and minimum integral of the absolute error. Section 5 compares the proposed tuning algorithms with several conventional tuning rules. Five examples are simulated in section 6 t o demonstrate the superiority of the present approach. Section 7 discusses the sensitivity of the proposed methods toward measurement noise and disturbances present during tuning.

2. Closed-Loop Identification Scheme: Method A

For identification purposes, the PID control system is excited by connecting a relay in a feedback path from the process output to the controller reference as depicted in Figure la. (Schei (1992) used a more complicated structure.) With a step change of magnitude h applied before and after the relay, the reference signal R will vary in a square form between 0 and 2h as illustrated in Figure 2a, where the amplitude of the relay function is also h. The resulting process input and output oscillations, M and C, are plotted in Figure 2a. The process is assumed to be an open-loop stable process and is modeled as a second-order plus time-delay transfer function:

C

tP

tm

Time

Figure 2. Typical test responses for (a) method A and (b)method B.

where k is the proportional gain and ZI and ZD denote, respectively, the integral and derivative times. The constant 6 is set small (0.05 in this work) to approximate the ideal behavior of the PID controller. The describing function analysis indicates that the closed-loop relay system will oscillate at the frequency wc where

The amplitude of the output oscillation, a, can be approximated as (3b) Note that the oscillation frequency wc will vary with the controller settings. Equations 3 lead to one point on the Nyquist curve of the process transfer function a t w = oc:

where kp is the steady-state gain and d is the time delay. The time constant t and the damping coefficient are related t o y1 and y2 as LGp(jw,) = -180" - LGC(jw,)

Here, the commercial PID controller is employed to avoid an extremely large signal occurring in the controller output due to purely derivative action, which is of the form

(4b)

This point with the frequency close to the operating frequency of the PID control system provides reliable information about the process dynamics. In addition to this point, the resulting oscillations can be used t o calculate the steady-state gain k p as follows. It is known that

2408 Ind. Eng. Chem. Res., Vol. 34, No. 7, 1995

Since C(t) and M(t) will become periodic functions with the same period T (= 2n/wC),the evaluation of the two integrals in the above equation can be simplified by integrating over only one period, i.e., (6) where to denotes an arbitrary time after the transients die out. This is a distinct advantage of the scheme over the original relay technique of h r o m and Hagglund, which is not capable of estimating the steady-state gain from the resulting oscillations. (Luyben (1987) and Papastathopoulou and Luyben (1990) proposed the use of an additional step response test to estimate the steady-state gain.) Given the information in eqs 4 and the steady-state gain, the first-order plus time-delay model, eq 1 with 71 = 0, is obtained easily. To obtain a second-order plus time-delay model, an additional piece of information extracted from the resulting oscillation is required. It is observed from Figure 2a that the reference signal t o the PID control system, R , remains initially at the value of 2h until the process output signal C first reaches the value of h, causing the relay to change the sign of its output. The corresponding time is denoted tr as indicated in Figure 2a. This is essentially the time required for the response of the PID control system GCL(S)to first reach the value of h when the system is subject to a step change of magnitude 2h in setpoint. This information together with eqs 4 and the known steady-state gain yields the second-order plus time-delay model. Li et al. (1991) attempted t o derive the second-order plus time-delay model based on the information from two ktrom-Hagglund autotune tests a t two different frequencies. The problem became solving four equations for four unknown model parameters. However, it was claimed that solutions could rarely be found due primarily to the inherent inaccuracy in the relay technique. They then suggested the determination of the "best" parameters in the least-squares sense. Such difficulty is never met in the present approach, which always yields a unique set of model parameters based on a single closed-loop relay test. It is assumed that an initial stabilizing controller is established prior to the autotuning. For processes that are open-loop stable, a stabilizing controller might often be established by conservative guess or by simple response experiments. Despite this inconvenience, the proposed scheme does not require that the initial gain settings be close estimates of the desirable final settings. Even if the guess is extremely poor, the identification scheme in conjunction with appropriate tuning rules is able t o arrive at progressively better model parameters in an iterative manner. The iteration procedure involves using the controller settings obtained from the present tuning run for the test gains of a new run. This unique feature will be corroborated with an example in a later section.

where lz, k ~ and , k D are the proportional, integral, and derivative gains, respectively. These gains are related to the conventional gain, reset time, and derivative time in eq 2 as

Hwang and Shiu (1994) have developed a closed-loop identification scheme based on a single step response experiment. In this work, their scheme is generalized and adapted to suit practical applications. The identification test can now be carried out for any test input signal (step, pulse, or impulse) under any control mode (P, PI, or PID). The required data measured from the resulting underdamped transient are the first peak value C,, the first minimum value Cm, and the corresponding times t, and tm as depicted in Figure 2b. Supposing that a step input of magnitude A is applied in setpoint, the closed-loop test response C(s) is expressed as

where &,&I, and &D are the arbitrarily selected test gains large enough to cause an underdamped response. Assuming that the response is dominated by a pair of complex conjugate poles 6 &j& andor a real pole 0 , the test response can be approximated as

C(t)=

+

A h k J ( l + &kp)- M,e Ht-d) sin[Nt - d) 41 P control A - MleHt-d)sin[&(t - d) 41 MZet(t-d) PI and PID control (9)

l

+ +

Note that fi is nonexistent for proportional control. Using a 212 Pad6 approximation, e

-&

+ +

- 1 - d ~ / 2 d2s2/12 1 ds/2 d2s2/12

-

+

for the time-delay term in the denominator of eq 8, the coefficients MI, M2,and 4 in eq 9 can be derived as functions of kp, 6, &, and d . (The detailed derivation is omitted here because of space limitation.) The values of kp, 6, h, and d can then be solved by matching the resulting equation with the measured first peak and first minimum data, i.e., dC &tp) = 0 dC &tm) = 0

3. Closed-Loop Identification Scheme: Method

B Consider the SISO control loop shown in Figure lb. The ideal PID controller can be parametrized as

The solution of the four simultaneous equations can be obtained by any root-finding routine. To initiate the routine, proper guesses for d and ~9are suggested as

Ind. Eng. Chem. Res., Vol. 34, No. 7, 1995 2409 27

d = 2 t p - t m and G=tm

(a)DR

- tp

5

-

4

-

3

-

2

-

1

-

-

0.2

-

r-1 .5

A similar formulation for solving the model parameters is readily obtainable for an identification test involving a pulse or impulse test input signal.

IAE -

kP

4. Tuning Algorithms

The proposed two schemes identify the process under normal operating conditions. This is a desirable feature for autotuning, which allows the control parameters t o be updated iteratively according t o prescribed tuning rules. The derivation of tuning rules is based on the identified second- or first-order plus time-delay model and the placement of the dominant closed-loop poles. The primary objective is t o achieve the desired decay ratio and minimum integral of the absolute error. The decay ratio is the ratio of two successive peaks of a damped oscillation. The integral of the absolute error (IAE), considering the entire closed-loopresponse, is calculated as

0

I

1

0.0

1 .o

0.5

-

d/r

1.6

-

3

-

2

-

1

-

IAE -

kps

2.6

, -

(b) r = 1.5 5

2.0

5-0.7-

DR-0.3

-

.-.-

-

. 1

0 0.0

0.5

1 .o

d/r

1.5

2.0

2.6

1.5

2.0

2.6

(C) DR-0.2. -1.5

- o/o = I = 1.1 - - o/o: o/o.= 1.2

4

IAE -

where

kP 7

e(t) = R(t)- C(t) 1

Two other popular integral error criteria are the integral of the squared error (ISE) and the integral of the time weighted absolute error (ITAE):

ISE =

K [e(t)I2dt

0.5

1 .o

d/r

= 1.5.

It should be noted that using a single criterion such as minimum IAE,ISE, or ITAE is sufficient in finding the optimal control parameters but the results may be misleading (Coughanowr, 1991). For example, the resulting transient for a step setpoint change may have too much overshoot or the system may lack robustness. Here, a second criterion, namely the decay ratio, is employed to adjust the overshoot of the transient or the robustness of the system. The idea of dominant pole placement was proposed by Hwang and Chang (1987). They indicated that for the majority of PID control systems, the closed-loop response is dominated by three poles, a complex pair and a real pole. The real pole is introduced by integral action. The optimal controller settings can be obtained by placing properly the three dominant poles. For purely proportional control, the decay ratio of the closedloop response can be well approximated by the dominant complex pair (a k j w ) as (11)

For PI control, there is an additional degree of freedom that can be used to position the dominant real pole as

r = vla

0.0

Figure 3. Error integral IAE as a function of (a) r for PI regulator control with DR = 0.2, (b) DR for PI regulator control with r = 1.5, and (c) w for PID regulator control with DR = 0.2 and r

ITAE = Jtle(t)l dt

DR = exp(2ndo)

0

(12)

The choice of the values for DR and r is crucial for minimizing IAE. Parts a and b of Figure 3 are plots of the IAE value of the PI regulator control system (i.e.,

for step load changes) against dlz and 5 for various r's and DRs. It appears that DR = 0.2 and r = 1.5 yields nearly minimum IAE for a wide range of dlt and 5. This implies that the difficult task of minimizing IAE can be accomplished simply by placing the dominant poles properly for regulator control. Not only does the criterion of r = 1.5 yield minimum IAE but also results with nearly minimum ISE and ITAE as shown in Figure 4. The same results (not shown) apply to PID regulator control systems. For PID control, one last criterion is required. It is found that the frequency of oscillation (estimated closely by the imaginary part of the dominant complex poles) should be chosen to be approximately 1.1 times the critical frequency to provide minimum IAE as illustrated in Figure 3c. This agrees with the rule of thumb which states that the oscillation frequency for PID control should be roughly equal to the critical frequency. In fact, using larger derivative action to give a higher oscillation frequency may not necessarily improve the response. For servo control (i.e., for step setpoint changes), it is often required that the transient has a small overshoot. This can be accomplished by decreasing DR. The IAE value of the PI servo control system is plotted against dlz and 5 for various r's and DRs in Figure 5. Obviously, minimum IAE cannot be obtained by specifyingconstant values of DR and r as in the regulator control case. However, it is found that choosing DR = 0.1 and letting r vary from 1to 0.5 does satisfactorily ensure both small overshoot and small IAE as will be elaborated in later

2410 Ind. Eng. Chem. Res., Vol. 34, No. 7, 1995

I

1 .o

0.5

0.0

dl 7

1.5

2.0

2.5

0 l

1

I

I

6

I

2

3

I

I

4

r

I

-

I

(b) r=l

5 -

IAE -

- ~ ~ d . 1 5 DRd.1 DRd.05

-

-

-

3 -

-

4

7

1 .o

0.5

0.0

dl 7

1.5

2.5

2.0

Figure 4. Error integrals ISE and ITAE of PI regulator control systems as functions of r for DR = 0.2.

0

r

3

2

4

Figure 5. Error integral IAE as a function of (a) r for PI servo control with DR = 0.1, and (b) DR for PI servo control with r = 1.

sections. For PID control, the value of the derivative gain used by the Z-N rules is adopted. The dominant poles of the PID feedback system are determined by the following closed-loop characteristic equation:

yls2

l

A=

y1

+ d y 4 3 + d2kHkd6- 2 d k & J 3 ( d y l / 3+ d 2 k & f 6 ) u H U = OHd

(15~) (154

+ y# + 1 + (k + kIls + kDS)kpe-ds= 0 (13)

Using a 2l1 Pad6 approximation for the time-delay term, e

-ds

+

- 1 - 2dsI3 d2s2I6 1 dsl3

+

-

and defining the dimensionless gains p1 and pz as

kH - k

P1

=K, k1

p2==

In eqs 14, KH and W H denote the critical gain and frequency of the PD control system (in contrast to the conventional critical gain and frequency of the proportional control system):

+

k H = 7 -9- [ d 2 dY2 M k D k P Y1-=+ g 2d k p 18 d4 49d2y,2 d2yl 7d3y2 5dyly2 -9 162 9

(Yip +m+=

+-

+--

(14b)

Equation 13 becomes

1 OH =

where

(15b)

Jyl

+ k,K,

+ d y 4 3 + d2kHkp/6- 2dkDkp/3

(16b)

Note that KH and W H are functions of the derivative gain k D and reduce to the conventional critical gain and frequency K , and wU (as used by the Z-N rules) as K D = 0. The parameter 1 denotes the magnitude of the normalized additional real pole at ( K , k l , KD) = (KH, 0, K D ) . Note that its value approaches infinity for a firstorder plus time-delay model under PI control (yl = 0 and K D = 0).

Ind. Eng. Chem. Res., Vol. 34, No. 7, 1995 2411 Table 1. Variable Coefficients for Eq 17 a1

a2 a3 a4

5 1

DR = 0.25

DR = 0.2

DR = 0.15

DR = 0.1

0.439 -0.556 -0.86 1.13

0.484 -0.541 -0.863 1.12

0.535 -0.523 -0.863 1.11

0.594 -0.501 -0.864 1.09

Table 2. Variable Coefficients for Eq 18a load changes setpoint changes (r = 1.5) (DR = 0.1) D R = 0.25 D R = 0.2 DR = 0.15 r = 1 r = 0.75 r = 0.5 1.14 1.14 1.11 1.03 1.09 1.07 -0.497 -0.482 -0.466 -0.467 -0.466 -0.51 0.0759 0.0724 0.068 0.0647 0.0657 0.0667 1.22 1.28 1.15 1.2 1.26 1.31 0.542 0.55 0.564 0.495 0.506 0.519 -0.986 -0.978 -0.959 -1.1 -1.03 -1.07 0.616 0.514 0.558 0.659 0.773 0.698 0.786 0.76 0.738 0.724 0.778 0.675 -0.469 -0.467 -0.441 -0.426 -0.415 -0.472 0.0609 0.0609 0.0569 0.0551 0.0575 0.061 0.822 0.789 0.794 0.622 0.674 0.584 -0.435 -0.447 -0.549 -0.527 -0.541 -0.439 0.0514 0.052 0.0607 0.112 0.11 0.126

The above specifications on DR and r can be met by solving eq 15a. For convenience, simple-to-use correlation formulas for optimal PID parameters are obtained after tedious manipulation as (i) P control

p l = u,[l

+ u2ln(a)][l + u3A-' + u,A-~Y/~ (17)

I

i

i

i

i

(a) Load changes

-

Equation (15a) Correlations

4 -

3 -

IAE

-

0.5

0.0

1 .o

1.5

2.0

1

1

2.5

dl 7 6

I

5 -

1

-

-

Equation (15a) Correlations

-

4 -

-

IAE

- 3 7 2 -

-

1 -

I

0

1

1

1

(ii) PI and PID control

+

+

b,(l b2a b3a2)//3 b,(b,)*(l b6A-l b7A-2)//3 b,(l+ bga bloa2)//3

+

+

+

A I20 31A

d / r = 0.5 0

1

2 r

3

4

5

0 ' 0

I

1

\

I

I

1

2 c

3

4

5

Figure 7. Comparison of IAE values of PI and PID regulator control systems tuned using various methods for second-order plus time-delay processes.

Figure 8. Comparison of the IAE values of PI and PID servo control systems tuned using various methods for second-order plus time-delay processes.

Identification tests for example 1are performed under

model) produces satisfactory responses for a PI controller, whereas for a PID controller it gives less accurate results. They can, however, be improved by an iteration procedure. The IMC rules require that the process be fitted to a first-order plus time-delay model. The openloop fitting technique, used by Cohen and Coon (1953), is employed. The IMC method uses two filter time constants, i.e., e = 0 and z, for comparison. Corresponding load responses of the controlled and manipulated variables, C and M,are plotted in Figures 9 and 10 for further verification. It seems that the controllers tuned by Methods A-2d and B produce much better responses of the controlled variable a t the expense of larger control action than the htrom-Hagglund and IMC methods. The proposed closed-loop autotuning algorithms can update the control parameters iteratively to the correct final values. This feature is particularly useful for difficult processes which cannot be described well by the assumed simple model or for the situations where the guess of initial test gains are extremely poor. For illustration, example 4 is tuned automatically by method A-ld to obtain PI control parameters for step setpoint changes. Since this example is a difficult open-loop underdamped process for a first-order plus time-delay model, an iteration procedure seems to be necessary. Figure l l a shows the autotune experiments initiated by a conservative proportional only controller (k = 1.4 compared to the ultimate gain of 3.2). Note that this guess of test gain is just large enough to excite oscillations. The desired PI settings (k = 1.1, k~ = 0.568) are obtained in two iteration steps. The resulting setpoint response is found to be satisfactory. The third run (not

PI and PID control using the Z-N settings as initial test gains for the two methods. Optimal PI settings are obtained based on a single PI-identification test, while optimal PID settings are obtained based on a single PID-identification test. For method A, the process is identified as a second-order and a first-order plus timedelay model. For method B, two input conditions are considered, i.e., a step change and a pulse change of duration 2 in setpoint. The results are illustrated in Table 4. It reveals that the identification schemes yield fairly good approximations to the process in view of the close estimation of the dominant poles a t the selected test gains. Consequently, the resultant controller settings based on dominant pole placement produce performance with desirable IAE and DR for all cases. The validity of the proposed algorithms over a wide range of process dynamics is demonstrated by simulating examples 2-5. The four examples, representative of moderate time-delay, high-order, open-loop underdamped, and positive-zero behavior, are tuned using the two methods. For examples 2 and 3, optimal PI and PID settings are obtained based on PI- and PIDidentification tests, respectively. The initial test gains are selected to be the Z-N settings. It is found that even though the assumed model is quite different from the real processes, a single identification test is sufficient for arriving at satisfactory control parameters. Table 5 reveals that methods A-2d and B (both using the second-orderplys time-delay model) are far superior to the method of Astrom and Hagglund and the IMC method by virtue of the smaller IAE values produced. Method A-ld (using the first-order plus time-delay

2414 Ind. Eng.Chem. Res., Vol. 34, No. 7, 1995 Table 4. PI, and PPIdentification and Tuning Results Using the Proposed Methods for Example 1 (PI, h = 1.44, h~ = 0.408; PID, k = 2.2, k~ = 1, AD = 1) method A using method B with method A using method B with second-order plus first-order plus a step change a pulse change time-delay model time-delay model in setpoint in setpoint exact PI Control -0.365 fj1.13, -0.286 fj1.12, -0.284 f9 . 1 2 , -0.285 k j l . 1 1 , dominant poles -0.279 fj1.12, -0.207 -0.206 -0.207 -0.206 -0.217 (a fjh,0 ) 1.27, 0.605 1.4, 0.682 1.28, 0.612 1.28, 0.613 1.28,0.607 k, kI 1.99 1.98 IAE 1.98 2.06 1.98 0.19 0.26 0.20 0.20 0.20 DR PID Control dominant poles -0.455 ij1.56, -0.608 fj l 7 7 , -0.457 fj1.51, -0.452 f j 1 . 5 3 , -0.457 kj1.52, (6* j h , D) -0.603 -0.621 -0.576 -0.576 -0.575 2.44, 1.18,1.27 2.42, 1.17, 1.26 2.45, 1.18, 1.28 k, kI, k D 2.38, 1.14, 1.21 2.4, 1.12, 0.992 1.05 0.895 0.897 IAE 0.916 0.894 0.23 0.21 0.20 DR 0.19 0.21 ~

Table 5. Validity of the Proposed Algorithms over Arbitrary Process Dynamicsa example 2 example 3 IAE IAE IAE IAE load setpoint load setpoint method A-2d 4.56 5.09 4.35 5.27 PI 2.77 3.62 2.02 3.35 PID method A-ld 5.25 4.57 5.75 4.69 PI 2.88 3.89 2.71 4.42 PID method B PI 4.56 5.09 4.37 5.35 2.80 3.65 2.10 3.61 PID Astrom- Hagglund 7.44 7.49 5.59 PI 6.07 3.40 3.86 2.55 3.66 PID IMC (e = 0) PI PID IMC (e = t) 6.02 5.99 7.15 7.17 PI 4.85 4.85 6.14 6.15 PID a

- denotes unstable response.

needed in practice) confums that the tuning has converged (k = 1.06, k~ = 0.562). An initial stabilizing controller can also be established by the h t r o m Hagglund (A-H) method, and the purpose of the proposed method is to improve the performance. Figure l l b shows the autotune experiments (runs I1 and 111) with such an initial PI controller established in run I. It follows that run I1 yields the nearly converged PI settings (k = 1.18, kr = 0.58) as confirmed by the next iteration run (k = 1.08, k~ = 0.568). The resulting setpoint response is superior to that produced by the A-H method as clearly seen in the figure. It should be noted that for both cases, satisfactory controller settings are obtainable in two tests. When the control system encounters frequent step setpoint changes, method B, using the transient response under normal operating conditions for identification, is able to provide desirable self-tuning capability. Process 5, having a rather large positive zero, is employed for demonstration. The results are illustrated in Figure 12. The control system is first tuned by the method based on the P-control identification (step I). The resulting transient of the PI control system (step 111, although quite satisfactory, is retuned by the method to provide even better response (step 111). As the system continues to operate, the steady-state gain first vanes from 1to 1.5 (step W )and then the positive zero varies from 1 to 0.67 (step VI). It appears that the proposed method senses the changed conditions and adjusts the

~~

1 .o

1

I

I

(a) PI Control

--- ..-.....

Method A-2d -MethodB A-H IMC(p=T)

0.5

-

0.0

-1.5

I 0

I

I

I

1

10

20

30

40

50

Time

.

i ." n

(b) PID Control

-

Method A-2d

0.5

Method B - - - A-H

-...-..IMC(p=.r) 0.0

-1.5

I\

'C

I

1

I

1

1

I

0

10

20

30

40

50

Time

Figure 9. Comparison of load responses for example 2 tuned using various methods.

control parameters automatically to provide a desirable response (steps V and VII). The results also show that the method is quite robust to severe model mismatch. 7. Sensitivity toward Measurement Noise and Disturbances

Test response data can be severely distorted in the presence of measurement noise and disturbances. For practical applications, it is important that the proposed algorithms are effective in such a noisy environment. In this study, the closed-loop system of example 1 is tuned using methods A-ld and B subject t o white measurement noise and a periodic disturbance, an external upset, or a slow drifting disturbance. Example 1is first simulated with white measurement noise and a periodic disturbance added to the process

Ind. Eng. Chem. Res., Vol. 34, No. 7, 1995 2415 1.0

I

I

1

-

1.5

I

I

I

1

I

I

I

I

60

00

100

120

I

1

I

1

60

00

100

120

(a) PI Control Method A-2d -MethodB A-H

-..-...-- - IMC(p=T)

0.5

-

t

0.0

n

-0.5

-1 .o

-.-

-1.5 10

0

1.o

20

30

40

I

I

50

Time 1I

20

40

I

I

I

0

20

40

Time

(b) PID Control

.-.

0.5

1.5

0

---

...

Method A-2d Method B A-H IMC(p=T)

-

0.0

-0.5

-1 .o

".-

-1.5 0

10

20

30

40

50

Time

Figure 10. Comparison of load responses for example 3 tuned using various methods.

output. The standard deviation for the measurement noise is lo%, and the disturbance is a sine wave with a frequency of 20 r a d s and an amplitude of 25%. The noisy response for autotuning using method A-ld is shown in Figure 13a. To retrieve the required data, smoothing of the noisy data is done by least-squares fitting using a fifth-order polynomial. For method A-ld, the third and the fourth peaks are located by the leastsquares technique and the first-order plus time-delay model is calculated using the noisy data of one cycle between the two peaks. For method B, the second-order plus time-delay model is calculated using the first peak and the first minimum value estimated via the leastsquares technique. As clearly indicated in Tables 6 and 7, the algorithms with least-squares smoothing give quite satisfactory PI settings for load changes. Another practical concern is that an unmeasured static upset could arise anytime during identification experiments, interfering with the system response. Example 1 is tuned by methods A-ld and B with identification tests performed in the presence of a 20% step upset added to the process input at t = 1s, a time before the occurrence of the first peak. Tables 6 and 7 indicate that the resultant PI and PID controllers produce satisfactory performance for load changes in view of ZAE and DR. A realistic disturbance situation is simulated by passing white noise with SD = 0.1% through the autoregressive-integrating model:

H(z) =

1 (1- z-l)(l - 0.98)

This type of disturbance model represents a slow,

Time

Figure 11. Iteration procedures of the PI control system of example 4 using method A-ld and resulting setpoint responses. The initial stable controller is established by (a) Fonservative guess as proportional control with k = 1.4 and (b) the Astram-Hagglund autotuner.

drifting disturbance a t the process output, causing asymmetric output oscillations for method A-ld as depicted in Figure 13b. Using the data between the second and third peaks, method A-ld still yields fair PI settings as indicated in Table 6 . However, Method B is found to be quite sensitive to this type of disturbance. 8. Conclusions

The proposed closed-loopautotuning algorithms, methods A and B, provide superior alternatives to tune a PID controller. Method B, based on the transient response data, takes much less time for identification than method A, which stipulates the appearance of a limit cycle. Method A, on the other hand, is more suited to nonlinear systems due to the use of the nonlinear relay element. Compared to the ktrom-Hagglund open-loop autotuner, method A enables the autotune procedure to be performed under normal operating conditions &e., PID control mode) and hence allows correct controller settings t o be approached by iterations for difficult processes. Compared t o the method of Yuwana and Seborg, method B is more flexible to permit the use of any control mode and any type of input signal during an identification test and provides desirable self-tuning capability for frequent setpoint changes. Tuning rules as functions of the identified model parameters are available in convenient correlation form. For each experimental run, the closed-loop relay system of method A produces one point on the Nyquist

2416 Ind. Eng. Chem. Res., Vol. 34, No. 7, 1995 Table 6. Insensitivity of Method A-ld toward Measurement Noise and Disturbances Using Example 1 with h = 1 for Demonstration step disturbance of 0.5 sin(2~t)+ white noise O2 at = slow, drifting (SD= 0.2) PI PID disturbance PI control control control PI control k kI ko

IAE

DR I

I

Time Figure 12. Self-tuning capability of method B for example 5. Step I: a P-identification experiment. Step 11: the resulting transient. Step IV: 50% increase in kp. Step VI: 33% decrease in positive zero. Steps 111,V, and VII: the desirable responses after retuned. 4

I

I

IAE DR

-2 5

0

15

10

20

Time 3

I

I

I

I

1

I

2

1.49 0.599 0 1.95 0.27

2.5 1.07 1 1.07 0.28

1.61 0.648 0 2.03 0.33

Table 7. Insensitivity of Method B toward Measurement Noise and Disturbances Using Example 1 with a Unit Step Change in Setpoint for Demonstration step disturbance of 0.25 sin(2Ot) + magnitude 0.2 at t = 1 white noise (SD = 0.1) PI control PI control PID control 1.39 2.45 k 1.33 kI 0.645 0.563 1.12 kD

I

1.4 0.723 0 2.15 0.28

0 2.01 0.23

0 1.94 0.22

1.17 0.949 0.22

The validity of a tuning technique over a wide range of process dynamics relies on proper characterization of the process. In the present approaches, the process is characterized properly in terms of the dominant poles, whose position is subsequently used to design the controller. The close estimation of the dominant poles by the proposed identification schemes renders the present methods effective for a wide variety of process dynamics and very robust regarding measurement noise and disturbances. Although a single response test with arbitrarily selected initial gains is usually sufficient for arriving at desirable control parameters, both methods allow the control parameters to be updated iteratively in several tests to the correct values. This iterative nature is a unique advantage of the proposed closed-loop autotuning methods over the previous ones.

Acknowledgment c

1

The author is grateful for partial financial support by the National Science Council under Grant No. NSC-

82-0402-E006-456.

0 disturbance -1

0

I

I

I

I

1

5

10

15

20

25

30

Time

Figure 13. Noisy step setpoint responses for PI-identification tests based on method A-ld subject to (a)white noise and a periodic disturbance and (b) a slow, drifting disturbance.

curve with the oscillation frequency determined by the controller settings. This frequency, generated by exciting the PID control system, is closer t o the normal operating frequency than the critical frequency used by the Astrom-Hagglund autotuner. This point on the Nyquist curve then provides a better approximation of the process dynamics. The method utilizes two simple models, a first-order and a second-order plus time-delay transfer function. For a PI controller setting, using the first-order plus time-delay model is usually sufficient. For a PID controller setting, it is suggested that the second-order plus time-delay model be used.

Nomenclature A = amplitude of a step signal a = amplitude of the limit cycle from the process C = controlled variable C, = first peak value C, = first minimum value D = disturbance d = time delay DR = decay ratio Gp = process transfer function Gc = controller transfer function GCL= closed-looptransfer function h = magnitude of relay K = proportional gain k~ = integral gain k~ = derivative gain K H = critical gain for PD control k p = steady-state gain k, = critical gain for P control M = manipulated variable Mi = coefficients given in eq 9

Ind. Eng. Chem. Res., Vol. 34, No. 7,1995 2417

R = reference signal r = ratio defined in eq 12 t , = first minimum time t, = first peak time t, = time required for the process output signal to first reach the value of h Greek letters

a = parameter given in eq 15d /3 = parameter given in eq 15e

5 = damping coefficient 1 = magnitude of the normalized additional real pole pi = normalized controller gains 4 = phase angle e = filter time constant of the IMC rules o = real part of the dominant complex poles ‘t = time constant ZD = integral time ZI = derivative time u = dominant real pole w = imaginary part of the dominant complex poles wc = oscillation frequency WH = critical frequency for PD control wu = critical frequency for P control Literature Cited Astrom, K. J.; Hagglund, T. Automatic Tuning of Simple Regulators with Specifications on Phase and Amplitude Margins. Automatica 1984,20,645-651. Chen, C. L. A Simple Method for On-Line Identification and Controller Tuning. AIChE J. 1989,35,2037-2039. Chien, I-L. IMC-PID Controller Design-An Extension. Proceedings of the ZFAC Symposium on Adaptive Control of Chemical Processes, Copenhagen, Denmark, 1988;pp 147-152. Cohen, G. H.; Coon, G. A. Theoretical Considerations of Retarded Control. Trans. ASME 1953,75,827-834. Coughanowr, D. R. Process Systems Analysis and Control; McGraw-Hill: New York, 1991. Hwang, S. H. Adaptive Dominant Pole Design of PID Controllers Based on a Single Closed-Loop Test. Chem. Eng. Commun. 1993,124,131-152.

Hwang, S. H.; Chang, H. C. A Theoretical Examination of ClosedLoop Properties and Tuning Methods of Single-LoopPI Controllers. Chem. Eng. Sei. 1987,42,2395-2415. Hwang, S. H.;Shiu, S. J. A New Auto-Tuning Method with Specifications on Dominant Pole Placement. Znt. J . Control 1994,60,265-282. Jutan, A.; Rodriguez, E. S., 11. Extension of a New Method for On-Line Controller Tuning. AIChE J. 1984,62,802-807. Krishnaswamy, P. R.; Chan, B. E. M.; Rangaiah, G. P. ClosedLoop Tuning of Process Control Systems. Chem. Eng. Sei. 1987, 42,2173-2182. Lee, J. On-Line PID Controller Tuning from a Single, Closed-Loop Test. MChE J . 1989,35,329-331. Lee, J.; Cho, W.; Edgar, T. F. An Improved Technique for PID Controller Tuning from Closed-Loop Tests. AIChE J . 1990,36, 1891-1895. Li, W.; Eskinat, E.; Luyben, W. L. An Improved Autotune Identification Method. Znd. Eng. Chem. Res. 1991,30,15301541. Luyben, W. L. Derivation of Transfer Functions for Highly Nonlinear Distillations Column. Znd. Eng. Chem. Res. 1987,26, 2490-2495. Papastathopoulou, H.S.;Luyben, W. L. A New Method for the Derivation of Steady-State Gains for Multivariable Process. Znd. Eng. Chem. Res. 1990,29,366-369. Rivera, D. E.; Morari, M.; Skogestad, S. Internal Model Control. 4. PID Controller Design. Znd. Eng. Chem. Process Des. Dev. 1986,25,252-265. Schei, T. S. A Method for Closed-Loop Automatic Tuning of PID Controllers. Automutica 1992,28,587-591. Yuwana, M.; Seborg, D. E. A New Method for On-Line Controller Tuning. AZChE J . 1982,28,434-439. Ziegler, J. G.; Nichols, N. B. Optimum Settings for Automatic Controllers. Trans. ASME 1942,64,759-768.

Received for review September 6 , 1994 Revised manuscript received March 23, 1995 Accepted April 18, 1995@

IE9405271

@

Abstract published in Advance A C S Abstracts, J u n e 1,

1995.