Effect of Derivative Algorithm and Tuning Selection on the PID Control

with trying to tune a PID controller. This paper presents a quantitative comparison of alternative derivative algorithms and tuning methods for proces...
0 downloads 0 Views 123KB Size
Ind. Eng. Chem. Res. 2001, 40, 3605-3611

3605

Effect of Derivative Algorithm and Tuning Selection on the PID Control of Dead-Time Processes William L. Luyben Department of Chemical Engineering, Lehigh University, Bethlehem, Pennsylvania 18015

Many control engineers try to avoid the use of derivative action in operating units. As Isaksson and Graebe have pointed out (in a presentation at Control Systems 2000, Victoria, British Columbia, May 2000), there is an “industrial myth that derivative action does not work.” They claim that some of this is due to the need to adjust the derivative filter constant, in addition to the usual three parameters of PID controllers. Modern distributed control systems offer a variety of choices for the PID algorithm, including both series (interacting) and parallel (ideal). The many PID tuning methods that have been developed over the years have used different algorithms, and some are limited to a narrow range of parameter values (dead times). Most tuning methods require setting three tuning parameters, but some propose setting four parameters. All this complexity presents a confusing picture to the practitioner who is faced with trying to tune a PID controller. This paper presents a quantitative comparison of alternative derivative algorithms and tuning methods for processes with a wide range of dead-time/lag ratios. Results show that, when the correct algorithm is used, the IMC tuning method proposed by Morari and Zafiriou (Robust Process Control; Prentice Hall: New York, 1989) gives good performance for large-dead-time processes. The correct algorithm has a four-parameter, parallel, output-filtered PID structure. 1. Introduction Industrial use of conventional PID controllers remains widespread in many chemical processes despite two decades of activity in the application of MPC controllers and hundreds of academic papers on MPC development. The PID controller is easier to tune, more understandable, and less fragile, and it provides effective control in many processes. The vast majority of these controllers use just proportional and integral modes (PI). There are only two tuning parameters (integral time τI and gain Kc), and the PI algorithm is universally used in all controllers (analog and digital). In the continuous form, the PI controller transfer function is

Gc(s) )

CO(s) E(s)

(

) Kc 1 +

1 τIs

)

(1)

The proportional and the integral actions are additive (in parallel). In the digital form, numerical integration is used to approximate continuous integration of the error signal. A large number of tuning methods have been proposed for PI controllers. In this paper, we will use three of the most popular: Ziegler-Nichols,1 improved IMC,2 and Ciancone-Marlin.3 The use of derivative action is much less widespread. Industrial folklore explains this as being due to noisy signals. However, there appears to be more to it than just noise. In a very insightful paper, Isaksson and Graebe4 suggest that part of the problem is the use of * E-mail: [email protected]. Phone: 610-758-4256. Fax: 610758-5297.

the fixed derivative filter parameter R. The two most common types of PID controllers have the continuous transfer functions

( (

)(

) )

Gc(s) ) Kc 1 +

1 τDs + 1 ≡ PID1 τIs RτDs + 1

(2)

Gc(s) ) Kc 1 +

τDs 1 + ≡ PID2 τIs RτDs + 1

(3)

The first uses a lead/lag element to approximate the derivative action. It was used in early analog controllers and has been digitally implemented in modern DCS systems. It is called by various names: “interacting” or “commercial”. Perhaps a more descriptive label would be to call it “series” derivative. We label this type of PID controller PID1. Most of the older tuning methods used this algorithm, e.g., Ziegler-Nichols.1 They also assumed that the derivative filter parameter R had a fixed value of typically R ) 0.1. The second type of PID controller has the three modes working additively. It is called “noninteractive” or “ideal”. Perhaps a more descriptive label would be to call it “parallel” derivative. We label this type of PID controller PID2. Some of the tuning methods use this algorithm or its digital equivalent, e.g., the tuning charts proposed by Ciancone-Marlin.3 In both forms, there are four parameters: controller gain Kc, integral time τI, derivative time τD, and derivative filter parameter R. The first three are typically adjustable. Some DCS systems also permit the adjustment of R. However, there is a third form, which results from the direct synthesis design method5 or the equivalent IMC design method.2 This structure results if a Pade

10.1021/ie000844r CCC: $20.00 © 2001 American Chemical Society Published on Web 07/13/2001

3606

Ind. Eng. Chem. Res., Vol. 40, No. 16, 2001

approximation of dead time is used in the IMC design of the Smith predictor. The IMC tuning rules given by Morari and Zafiriou2 are developed for this type of PID algorithm. This PID algorithm is of the parallel type, but there is a filter that multiplies the sum of the three modes.

(

Gc(s) ) Kc 1 +

)(

)

1 1 + τDs ≡ PID3 τIs τFs + 1

2. Process and Tuning 2.1. Process Studied. The process studied has a gain, dead time, and first-order lag transfer function.

ZN

IMC

ZN CM IMC

0.5 3.81 3.68

5 1.13 0.534

10 1.04 0.287

Kc τI Kc τI λ Kc τI

PI Tuning 1.73 1.42 1.3 1.1 0.85 1.47 1.25

0.515 8.90 0.35 3.3 8.5 0.412 3.5

0.473 18.3 0.3 5.5 17 0.353 5.5

Kc τI τD Kc τI τD λ Kc τI τD τF

PID Tuning 2.24 0.855 0.214 1.5 1.0 0.15 0.125 2.0 1.25 0.20 0.10

0.66 5.90 1.48 0.4 3.0 1.2 1.25 0.56 3.5 0.71 0.50

0.612 11.0 2.74 0.3 5.0 2.7 2.5 0.48 6.0 0.83 1.0

environment, they would typically be determined experimentally from a relay feedback test.

For PI controllers, Kc ) Ku/2.2 and τI ) Pu/1.2 For PID controllers, Kc ) Ku/1.7, τI ) Pu/2, and τD ) Pu/8 2.2.2. IMC Tuning (IMC). The “improved IMC” tuning developed by Morari and Zafiriou2 requires the selection of a tuning parameter λ, which is approximately equivalent to the desired closed-loop time constant. The recommended values of λ and of the other controller parameters are

For PI controllers, λ ) max(1.7D, 0.2τo), KcKp )

-Ds

Kpe τos + 1

D Ku ωu

CM

(4)

There are four adjustable constants, so it can only be used with a tuning method that gives all four parameters. We label this type of PID controller PID3. Isaksson and Graebe4 studied PID1 and PID2 with two processes: a gain/integrator (GM(s) ) Kp/s) and a dead time/lag [GM(s) ) e-s/(s + 1)]. They discussed conversion between the two algorithms and illustrated the advantages of making all four parameters adjustable. One of these advantages is decreased sensitivity to noisy signals. This paper studies the effects of algorithm selection and tuning method selection of PID controllers for deadtime/lag processes over a wide range of dead times. The work is motivated by our perceived need for some clarification in the confusing picture of what derivative algorithm to select and what tuning method to use. The problems are accentuated in processes with large dead times. As shown by Rivera et al.6 and illustrated below, the use of the standard Ziegler-Nichols tuning method with derivative action leads to very poor (even unstable) control of processes with large dead times.

GM(s) )

Table 1. Tuning Constants

(5)

Kp and τo, the process open-loop gain and time constant, respectively, are set equal to unity, so that all results can be scaled in terms of ratios as follows: time t/τo, dead time D/τo, controller gain KcKp, integral time τI/τo, and derivative time τD/τo. A broad range of dead timeto-open loop time constant ratios are explored: D/τo ) 0.5 to D/τo ) 10. Load disturbances are used in the comparison studies because they are usually the most important disturbance in continuous processes. The load disturbance is a unit step at time zero, and it affects the controlled variable through a first-order lag with time constant τo. If disturbances in set point were considered, we would have to consider the issue of whether the derivative action is on the error signal or on the process variable signal. 2.2. Tuning Methods. Three tuning methods are compared using the three types of PID algorithms. 2.2.1. Ziegler-Nichols Tuning (ZN). The following are the tuning rules of the classical Ziegler-Nichols1 tuning method when the ultimate gain Ku and ultimate period Pu are known. For the dead-time/lag process, they are easily found numerically by calculating the point at which the phase angle reaches -180°. In a plant

2τo + D , and 2λ τI ) τo + D/2

For PID controllers, λ ) max(0.25D, 0.2τo), KcKp ) τI ) τo + D/2, τD )

2τo+D

,

2(λ + D)

τ oD λD , and τF ) 2τo + D 2(λ + D)

2.2.3. Ciancone-Marlin Tuning (CM). A useful tuning procedure given in Marlin3 incorporates performance in addition to considering practical issues such as signal noise and control valve saturation. Graphs for estimating controller gain and integral time for PI controllers are given on page 306 of Marlin’s textbook. Graphs for estimating the PID tuning constants are given on page 301 of the same work. Table 1 gives numerical values of the tuning constants used in all the methods for three values of dead time. 3. Results 3.1. PI Results. For purposes of reference, Figure 1 gives results for PI control of the dead-time/lag process for three values of dead time. What is important to note in these PI results is that all of the tuning methods give stable control. For small dead times, all three tuning methods give similar results. The ZN and IMC methods

Ind. Eng. Chem. Res., Vol. 40, No. 16, 2001 3607

Figure 1. PI control.

Figure 2. PID control with D/τo ) 0.5.

3608

Ind. Eng. Chem. Res., Vol. 40, No. 16, 2001

Figure 3. PID control with D/τo ) 5.

Figure 4. PID control with D/τo ) 10.

Ind. Eng. Chem. Res., Vol. 40, No. 16, 2001 3609

Figure 5. PID2 and PID3 control with D/τo ) 5 and 10.

Figure 6. PID2 and PID3 control with noise (D/τo ) 10).

3610

Ind. Eng. Chem. Res., Vol. 40, No. 16, 2001

Figure 7. Sensitivity to process parameter changes.

give quite sluggish responses for large dead times. The CM settings (heavy curve in the figure) are the best of the three over the range of dead times studied. 3.2. PID Results. Figures 2-7 give results for PID control of the dead-time process using alternative derivative algorithms. In Figure 2, the dead time is small (D/τo ) 0.5). The CM and IMC results are similar. The ZN results are somewhat more oscillatory. We can see the beginnings of some sharp spikes in the manipulated variable M. This is a result of the derivative action on the error signal coming through the dead time. The PID1 and PID2 algorithms give similar results when IMC and CM tuning methods are used but somewhat different results with ZN tuning. In Figure 3, the dead time is increased by a factor of 10 (D/τo ) 5). The ZN settings give very unsatisfactory results that feature large spikes in the manipulated variables and continued oscillations over a long time period. The IMC and CM settings provide fairly effective control. The parallel and series algorithms give similar but not identical results. The parallel PID2 algorithm gives somewhat smaller swings in the controlled and manipulated variables for the CM settings, as one would expect because they were developed using this algorithm. A comparison of the PI results given in Figure 1 with the PID results given in Figure 3 shows the improvement in control performance achieved by the use of derivative action (smaller closed-loop time constant). This improvement is only obtained if the correct tuning method is used. In Figure 4, the dead-time/lag ratio is increased to D/τo ) 10. Now the ZN settings give unstable responses,

as discussed by Rivera et al.6 An engineer trying to tune this loop could easily interpret these results incorrectly as being due to noise. Both the CM and IMC tuning results show some spikes, but stable operation is achieved. Figure 5 provides a comparison between the threeparameter PID2 algorithm with CM and IMC tuning and the four-parameter PID3 algorithm. Remember that the difference between these algorithms is the location of the filter (see eqs 3 and 4) and the number of adjustable parameters. In PID2, the derivative action is filtered with a fixed value of R ) 0.1. In PID3, the controller output is filtered by the lag with time constant τF, which is a tuning parameter. 3.3. Noise and Robustness. In Figure 6, the effect of noise is illustrated. The PID3 and PID2 algorithms with CM tuning are compared for D/τo ) 10. The series filter of the PID3 algorithm reduces the impact of the noise on the variability of the manipulated variable. Figure 7 gives results for the PID3 and PID2 algorithms when the process gain and dead time are both increased by 20, 30, and 40%. The controllers are tuned for a process gain of Kp ) 1 and a dead time of D/τo ) 10. Then, the actual process parameters are changed. These results show that the PID3 algorithm with IMC tuning is quite robust. The PID2 algorithm begins to produce quite erratic behavior as the process parameters change. 4. Conclusion It is hoped that this paper has helped to clear up some of the confusion about the selection of the derivative

Ind. Eng. Chem. Res., Vol. 40, No. 16, 2001 3611

algorithm and the appropriate tuning method, particularly for processes with large dead times. If dead times are small, good performance can be achieved even without derivative action using a number of traditional tuning methods. In situations where derivative action is required to improve performance and dead times are large, the four-parameter, output-filtered PID3 algorithm provides effective control performance. Acknowledgment The author thanks Tom Marlin (McMasters) and Dave Leach (Air Products) for several informative discussions. Nomenclature CM ) Ciancone-Marlin tuning CO ) controller output signal D ) dead time E ) error signal Gc ) controller transfer function GM ) process open-loop transfer function IMC ) IMC tuning Kc ) controller gain Kp ) process gain M ) manipulated variable PID1 ) series algorithm PID2 ) parallel algorithm with filter on derivative PID3 ) parallel algorithm with filter on controller output

Pu ) ultimate period Y ) controlled variable ZN ) Ziegler-Nichols tuning ωu ) ultimate frequency λ ) closed-loop time constant τD ) derivative constant τF ) PID3 filter constant τI ) integral time τo ) open-loop time constant

Literature Cited (1) Ziegler, J. G.; Nichols, N. B. Optimum settings for automatic controllers. Trans. ASME 1942, Nov, 759. (2) Morari, M.; Zafiriou, E. Robust Process Control; Prentice Hall: New York, 1989. (3) Marlin, T. E. Process Control; McGraw-Hill: New York, 1995. (4) Isaksson, A. J.; Graebe, S. F. The derivative filter is an integral part of PID design. Presented at Control Systems 2000, Victoria, British Columbia, May 2000. (5) Ogunnaike, B. A.; Ray, W. H. Process Dynamics, Modeling and Control; Oxford University Press: New York, 1994. (6) Rivera, D. E.; Morari, M.; Skogestad, S. Internal model control. 4. PID controller design. Ind. Eng. Chem. Process Des. Dev. 1986, 25, 252.

Received for review September 28, 2000 Revised manuscript received February 16, 2001 Accepted May 25, 2001 IE000844R