Process Control and Optimization, VOLUME II - Unicauca

be placed in manual. ... PID algorithms that continuously (in analog control systems) ... Velocity algorithms, which are limited to digital implemen- tation ..... Since most modern PID con- .... failure, failure of control-loop communications, or a manual .... Shinskey, F. G., Process Control Systems, 4th ed., New York: McGraw-Hill,.
214KB taille 3 téléchargements 66 vues
2.3

Control Modes—PID Variations R. R. RHINEHART

(1995, 2005)

F. G. SHINSKEY

Although the PID form represented by Equation 2.3(1) is presented as the standard form, many controller manufacturers offer a variety of modified versions. Some modifications are improvements; some are leftovers from early pneumatic implementations, and some are more traditional in certain industries than others. Regardless, the basic proportional, integral, and derivative actions are retained, so there are no conceptual barriers to using the various vendor offerings. The main issue is that the tuning behavior varies from one form to another.  1 m = KC  e + TI 

∫ e dt + T

D

de  dt 

2.3(1)

An experienced operator who is accustomed to tuning a controller having a particular PID algorithm will be baffled when another controller does not respond as expected. An operator or software program that follows a recipe procedure to determine KC, TI, and TD for the standard algorithm (Equation 2.3[1]) can be startled by the response when applying the procedure to a manufacturer-specific version. A manufacturer’s equipment usually offers a number of alternative controller forms. An unknowledgeable user may choose some of them on the whim of the moment, with the results that a variety of algorithms may exist in controllers mounted side by side or in the same control system. When various algorithms are used in the same control room, the operators will not experience consistent behavior patterns, and as a result may never become competent at tuning. A controller that “cannot be tuned” will be placed in manual. Controller tuning is an ongoing necessity. It is needed whenever process operating conditions change, when process gains and time constants change, and often when previous controller settings no longer give the desired response. Tuning is required to maintain good control, and a rational understanding of the controller form and its behavior is required for effective tuning. An understanding of the various forms of control algorithms, plus the configuration options that are offered, is also necessary to properly design and apply process control strategies. 124 © 2006 by Béla Lipták

(2005)

H. L. WADE

(2005)

PID ALGORITHMS PID algorithms that continuously (in analog control systems) or repetitively (in digital processor systems) calculate the required position of the valve or other final actuator are called position algorithms. On the other hand, algorithms that calculate the required change in position of the final actuator are called velocity, or incremental, algorithms. Velocity algorithms, which are limited to digital implementation, are covered in Section 2.4. There are three basic forms of the position PID algorithm, plus variations on each of these forms. Noninteracting Form The standard form is shown by the block diagram in Figure 2.3a and is given by Equation 2.3(1), where for a reverse acting controller, e = r – c, the difference between set point and measurement. (For a direct acting controller, e = c – r.) The units of both error e and output m are percentages of full-scale transmitter and controller outputs, respectively, and time is usually expressed in minutes. (Some manufacturers are beginning to express time in seconds, rather than minutes.) Accordingly, KC is dimensionless, the units of TI are minutes per repeat, and the units of TD are minutes. In this form the controller gain attenuates each of the controller modes. The integration is from the last time the controller was switched from manual to automatic until the present time. The integrator must be initialized, however, to prevent a “bump” in the controller output when the mode is switched

1 ∫ Ti Set point Σ r + – e

Controlled variable c

+ KC

+ TD d dt

FIG. 2.3a Block diagram, noninteracting PID controller.

Σ

b Controller output +

m

2.3 Control Modes—PID Variations

from manual to automatic. If “b” represents the integral mode contribution to the controller output, that is,

∫ e dt

K b= C TI

for conversion between reset time and reset rate are

then b0, the initial value of b, must be set to

2.3(3)

where m* is the operator-entered value of the controller output in the manual mode. Normally, b0 tracks the right-hand side of Equation 2.2(3) continuously when the controller is in manual. This form is often called the “ISA” form, although ISA has never sanctioned this or any other form of the PID. For reasons to be seen, it is also called the “noninteracting” form to distinguish it from the “interacting” form to be presented later. It is also called the “parallel” form, to distinguish it from the so-called “series” form, also to be presented later. Since there is no standard terminology among manufacturers, the user is cautioned to examine the mathematical expression representing the particular form, rather than relying on the manufacturer’s nomenclature. The proportional mode tuning parameter may be expressed as proportional band, PB, rather than controller gain, KC. Proportional band is defined as the change in measurement required to produce a full range (100%) change in controller output due to proportional control action. The equations for conversion between PB and KC are KC =

100 PB

2.3(4)

PB =

100 KC

2.3(5)

The integral (reset) mode tuning parameter is often expressed as the reset rate, TR, rather than as integral or reset time, TI. The units of TR are repeats/minute. The equations

Set point Σ r + –

e

Controlled variable c

FIG. 2.3b Block diagram, interacting PID controller.

© 2006 by Béla Lipták

TR =

1 TI

2.3(6)

TI =

1 TR

2.3(7)

2.3(2)

 de  b0 = m * −  K C e + TD  dt  

KC

Although there is no technological advantage in using either KC or PB for the proportional mode tuning, or TI or TR for the integral mode tuning, the use of TR has the psychological advantage that if faster integral action is desired, a larger number is set for TR. If both proportional and integral mode tuning parameters are changed, then Equation 2.3(1) becomes m=

100  de  e + TR e dt + TD  PB  dt 



2.3(8)

Interacting Form The interacting controller form is also called a “rate-beforereset” or “series” form algorithm. The “series” nomenclature arises from block diagram notation, in which the integral block is in series with the derivative block, whereas in the standard controller, the integral and derivative blocks are in parallel. The “parallel” nomenclature is also used in the next topic to describe an algorithm with independent gains on each mode. Therefore the “series/parallel” nomenclature can be misleading. In the interactive controller, shown by the block diagram in Figure 2.3b and by  de 1 m = KC′  e + TD′ +  dt T ′ I



 de    e + TD′ dt  dt  , 

2.3(9)

integral action is taken on both the error and derivative terms. There is no technological advantage of Equation 2.3(9) over Equation 2.3(1), since with corresponding tuning, the performance of each is the same. Furthermore, if the derivative is not used (TD′ = 0), then the interacting and noninteracting controllers are identical in both form and performance. The interacting controller represents a physically realizable construction

+ TD d dt

125

Σ

+

+ 1 ∫ Ti

Σ

Controller output +

m

126

Control Theory

of pneumatic devices, and is offered by vendors of electronic analog and digital systems so that new controllers will have a tuning response similar to certain pneumatic equipment that is being replaced. Rearrangement of Equation 2.3(9) gives m = KC′

TI′ + TD′  1 e +  TI′ TI′ + TD′



e dt +

de   TI ′ + TD′ dt  TI ′ TD′

2.3(10) which shows exactly the same functional form as Equation 2.3(1). It also shows interactive behavior because adjustment of either TI′ or TD′ will affect the effective controller gain and both the effective integral and derivative times. K C′ , TI′ , and TD′ represent values actually entered for the noninteracting controller. The effective values of gain, integral, and derivative settings for an identical noninteracting, or standard, controller are given by KC = KC′

TI′ + TD′ TI′

TI = TI ′ + TD′ TD =

TI ′ TD′ TI ′ + TD′

2.3(11) 2.3(12) 2.3(13)

If one has tuning parameters for a standard, or noninteracting, controller, Equation 2.3(1), then the corresponding tuning for Equation 2.3(10) is KC′ = 0.5 KC (1 + 1 − 4 TD /TI )

2.3(14)

TI ′ = 0.5 TI (1 + 1 − 4 TD /TI )

2.3(15)

TD′ = 0.5 TD (1 − 1 − 4 TD /TI )

2.3(16)

Many conventional tuning rules define TD = TI /4. In this case, the corresponding tuning for the interacting controller is KC′ = KC /2 and TI ′ = TD′ = TI /2. The interacting controller cannot duplicate a standard controller if TD > TI /4. Noisy process signals should be smoothed or averaged before being applied to the control algorithm. A first-order filter (exponentially weighted moving average [EWMA]) is the standard offering. If the filter is used within the algorithm itself, it may be applied to the error signal, so that the filtered value of the error, ef, replaces e in Equations 2.3(1) and 2.3(9). The filter equation is T

de f dt

= e − ef

2.3(17)

where T is the time constant of the filter. Since process noise is especially amplified by derivative action, some vendors

© 2006 by Béla Lipták

make the filter time constant some multiple of the derivative time, TD , so that T = α TD

2.3(18)

Typical values for α range from 0.05 to 0.1. In pneumatic and electronic analog systems, α had a fixed value; in digital systems, α may or may not be accessible to the user. Some manufacturers refer to the reciprocal of α as “derivative gain.” Since filtering in essence averages new data with old data, the filtered value lags behind the process. The filtered variable dynamics are slower than the process, which means that (1) the controller must be tuned using the filtered data and (2) if the filter time constant is changed the controller may have to be retuned. By combining Equations 2.3(17) and 2.3(9) and expressing the relationship in Laplace notation, the transfer function from error to controller output for an interacting controller with filter is (T s + 1)(TI S + 1) m (s ) = KC D e( s ) (α TD s + 1)TI S

2.3(19)

Except for a modification that makes the derivative mode sensitive only to measurement changes, this transfer function is representative of most analog controllers and many implementations in digital systems. Parallel Form Whereas either the interacting or noninteracting forms of the PID are widely used in the process industries, the parallel form, also called the “independent gains” form, of PID is often used in power generation, drive control systems, robotics, and other applications. Figure 2.3c and Equation 2.3(20) presents the independent gains form of PID.



m = K P e + K I e dt + K D

de dt

2.3(20)

KP , KI, and KD are called the proportional gain, integral gain, and derivative gain, respectively. KP is a dimensionless num–1 ber, KI is in units of time , and KD is in units of time. There is no technological advantage of the parallel form of PID, since with corresponding tuning, the behavior of this form and either of the other forms will be identical. If one has tuning KI ∫

Set point r +

Σ

– e

Controlled variable c

KP

KD d dt

FIG. 2.3c Block diagram, parallel PID controller.

Controller output

+ +

Σ

+

m

2.3 Control Modes—PID Variations

parameters for a noninteracting controller, Equation 2.3(1), then the corresponding tuning parameters for Equation 2.3(20) are K P = KC

2.3(21)

KC TI

2.3(22)

KI =

2.3(23)

A slight advantage of this form of configuration is that an integral-only controller can be obtained by simply setting KC and KD to zero. That cannot be done with either of the other forms if the integral tuning parameter is TI, minutes/repeat.

SET-POINT RESPONSE SOFTENING The algorithms presented previously may cause undesirable process effects whenever a set-point change is made. Each term acts on the error. Because the error is a deviation from set point, a sudden set-point change becomes a sudden change in error, which in turn causes an output spike — often an undesirable feature. Even if derivative is not being used, a set-point change will cause a “bump” in controller output; the size of this bump will be the magnitude of the set-point change times the controller gain. Another problem with setpoint changes has to do with controller tuning. If a controller is tuned for optimum response to a set-point change, it will likely be too conservative for elimination of disturbances to the loop. The rate of recovery of the controlled variable will be much slower than its rate of departure. On the other hand, controller settings that produce optimum disturbance rejection tend to cause large overshoot on set-point changes. This is especially true of lag-dominant loops such as most liquid level, temperature, pressure, and composition loops. To avoid this undesirable behavior, several modifications that can soften the response to a set-point change can be used. In general, these modifications can be applied to any of the three forms of PID algorithm presented earlier. Derivative and Proportional Actions The algorithm can be modified so that either the derivative mode, or both the derivative and proportional modes, act only on the measurement. Output spiking due to the derivative mode and output bumping due to the proportional response are prevented, while the tuned controller response to a loop disturbance is unchanged. Derivative-on-error or -measurement and proportional-on-error or -measurement are often userconfiguration choices. If both are chosen, the form of a noninteracting algorithm becomes



e dt − TD

dc  dt 

2.3(24)

Because of the elimination of output spikes and output bumps, the controller can be tuned for a more aggressive

© 2006 by Béla Lipták

response to disturbances. Conventional tuning rules (e.g., Ziegler–Nichols) will produce a very sluggish response to set-point change if proportional-on-measurement is chosen. The response to a measurement disturbance will be the same if the proportional acts on the error or on measurement. Set-Point Filtering

K D = KC TD

 1 m = KC  − c + TI 

127

With proportional-on-measurement there may be a serious degradation in the response to a set-point change, since immediately following the set-point change, only the integral mode will act on the deviation. Since most modern PID controllers feature bumpless transfer between the manual and automatic modes, the response is the same as if the set point had been changed with the controller in manual, with the controller then switched to automatic. To achieve the advantage of improved disturbance rejection due to more aggressive tuning of the PID yet avoid the degraded response following a set-point change, a lead-lag filter can be placed on the set point.  λT s + 1  r ′(s ) =  I  r (s )  TI s + 1 

2.3(25)

Here, r(s) is the (transform of) the actual set point; r ′(s) is the modified set point used by the PID algorithm; TI is the integral time used by the PID, and λ is the lead-lag ratio. When λ is set to 1.0, there is no filtering; when set to zero, the filter is a first-order lag whose time constant is equal to the integral time. When Equation 2.3(25) is combined with the transform of Equation 2.3(1), using only the proportional and integral modes, the result is  r ( s ) − c( s )  m(s) = KC  λr (s) − c(s) +  TI s  

2.3(26)

Another way of viewing this modification is to consider taking a linear combination of proportional-on-error and proportional-on-measurement. From Equation 2.3(1), the proportional mode contribution to the output is Kc (r − c). From Equation 2.3(24), the proportional mode contribution to the output is −Kc c. A linear combination of these becomes

λ KC (r − c) − (1 − λ ) KC c = KC (λr − c)

2.3(27)

which, after transformation, is the same as the proportional mode contribution exhibited by Equation 2.3(26). A value for λ of 0.4 produces almost no set-point overshoot, whereas a value of 0.5 will produce a minimum integral of absolute error (IAE) response with about 10% set-point overshoot. These results will vary somewhat with the dynamics of the process and the tuning of the controller. One manufacturer offers a “two-degree-of-freedom” controller in which linear combinations of both the proportional modes and derivative modes can be chosen.  1 m = KC  ( λ r − c) + T I 



e dt + TD

d (δ r − c)   dt 

2.3(28)

128

Control Theory

Some manufacturers offer a set-point ramping option that prevents both output spikes and bumps by eliminating sudden set point changes. Although any of the set-point softening techniques described here can be an advantage for single loop control or for the primary controller of a cascade configuration, neither set-point ramping nor proportional-on-measurement should be used on the secondary controller of a cascade loop, as that would degrade the responsiveness of the secondary loop. WINDUP ACCOMMODATION The integral is an accumulator that, in digital algorithms, continuously adds the deviation from set point to the previous sum. Whenever an error persists for a long time, the integral can grow to the largest value the assigned processor memory can hold. For analog systems, the integral can grow to the maximum signal value, usually beyond the limits of 0 or 100%. This is called integral or reset windup. Since the controller output is the sum of the three controller terms, the output will be dominated by the wound-up integral mode and will “max out” with the control valve either fully open or fully closed. When the error is subsequently removed or even changes sign, the integral windup continues to maintain the output saturated for a long time. This control action will persist until the negative error accumulation equals the previously accumulated positive error and thus permits the integral mode to “unwind.” Whenever a controller is not in control, the integral mode can wind up unless other provisions are made. Such situations include the controller being in the manual mode, a constraint being encountered (such as a valve stem at a limit), a primary controller of a cascade strategy being in automatic with its secondary in manual or local automatic, or the use of an override control strategy. Also, process conditions such as sensor failure, failure of control-loop communications, or a manual process bypass used for control or shutdown of a portion of the process can prevent a controller from being in control. Therefore it is desirable for every controller containing the integral mode to have antireset windup provisions. There are a variety of offerings. Conceptually the simplest solution is to specify a limit on the integral contribution to the total output signal. The maximum and minimum reasonable values for the integral contribution correspond to the maximum and minimum controller outputs. For the standard controller: I max = mmax TI /KC

2.3(29)

I min = mmin TI /KC

2.3(30)

Where integral limits are used, conventional practice uses 95% of the maximum:

© 2006 by Béla Lipták

I U.L. = I min + .95( I max − I min )

2.3(31)

I L.L. = I min + .05( I max − I min )

2.3(32)

However, the 95% value has been arbitrarily selected and can therefore be changed. A closely associated strategy is to inhibit integral accumulation if the output hits a limit. With either of the mechanisms above, the integral windup will be limited to values corresponding to the fully open or fully closed valve positions. It is possible for the integral mode to wind up to fully open when the proper value should only be 30% open. In that case, the integral will keep the output excessively high, and until it unsaturates and has time to unwind, it will persist in introducing a process error in the opposite direction. To accelerate the return of the integral contribution to its proper value, some controllers will make the integral accumulation 16 times faster when coming off a limited value. These mechanisms generally work, but 95% limits, 16-times-faster recovery, and allowing some windup are not always the best solutions. For digital systems, if a controller can detect when it is unable to control, then it can go into an “initialization” mode that forces the integral mode output to a value that will permit graceful recovery whenever the controller is again able to control. Situations when a controller can detect that it is unable to control include being in the manual mode, having the valve stem reach a limit (if valve stem position is detected and transmitted back to the controller) or, if the controller is a primary controller of a cascade configuration, having the secondary controller in some mode other than fully automatic cascade. If b represents the integral mode contribution to the output, then in the initialization mode, b can be reset using Equation 2.3(3), where m* represents the operator-entered output value in the manual mode, the detected valve stem position, or the set point of the secondary controller.

RESET AND EXTERNAL FEEDBACK Whereas Equations 2.3(1), 2.3(8), and 2.3(20) are good conceptual models for PID controller forms, they may not be representative of physical implementation. In essentially all analog controllers and in many digital control algorithms, the integral of the error is replaced with a first-order filter on the controller output; this is part of a positive feedback loop that computes the controller output. When the time constant of the filter is the same as the integral time, TI, then the performance of the controller with reset feedback is the same as if it had pure integral mode. For the standard PI controller: m(s) = KC e(s) +

1 m( s ) TI s + 1

2.3(33)

which can be rearranged to  1  m(s) = KC  1 +  e( s )  TI s 

2.3(34)

2.3 Control Modes—PID Variations

Filter

Proportional Set point

r + –

KC

129

1

+

m

Tf s + 1

+

Output

Reset feedback Derivative

TD s + 1

1

aTD s + 1

TI s + 1

c

Lag

e–td s Dead time

Controlled variable

FIG. 2.3d Block diagram, PIDτd controller.

Note that with reset feedback there is no integrator to wind up. The output of the filter, however, can wind up to the upper or lower limit of the controller output. In addition to being a physically realizable method of construction, particularly for analog controllers, a key advantage of reset feedback is in override and cascade control structures, where the feedback is not directly from the controller output but from an external signal that would be identical to the controller output if the control loop were closed. With external reset feedback, the filter output “winds up” to the “right” value; when control is recovered there is no need for wind-down acceleration nor a need to guess at correct upper and lower integral limits.

PID d ALGORITHM A relatively simple addition to a PID controller can significantly increase its performance, both to disturbances and to set-point changes. It involves delaying the integral mode of the controller in a manner similar to the delay or dead time that exists in the process being controlled. The structure of the PID-dead time (PIDτd) controller is not unlike that of model-based controllers — it may be considered a hybrid of PID and model-based technologies. A block diagram of the controller is shown in Fig. 2.3d. Without the dead time and filter blocks, this is a standard PID controller of the “interacting” or “series” type, with integration achieved by means of reset feedback as described earlier. The PIDτd controller is capable of producing a phase lead, thereby substantially reducing the period of oscillation of a control loop. For lag-dominant processes, reducing the period of oscillation also reduces its dynamic gain, allowing a higher controller gain. This performance improvement comes with a price, however. Robustness is decreased, causing the loop to destabilize on rather small variations in process parameters unless the controller is precisely tuned. With

© 2006 by Béla Lipták

deadtime-dominant processes, the dead time in the controller must match the process dead time. Any difference between process and controller dead times will produce a high-frequency oscillation with a period of twice their difference. Robustness can be improved by the addition of the filter shown in Figure 2.3d. Its location lies in both feedback loops, making it doubly effective. However, performance is reduced by the ratio of filter time to dead time, so excessive filtering should also be avoided. When the process contains lags as well as dead time, KC can be increased further and derivative action added as well. In this role, it may be tuned much like a PID controller, with the dead time setting matched to the process dead time. But in the presence of noise, it may also be tuned as a PIτd controller, in which case optimum performance requires controller dead time to substantially exceed that of the process.

Bibliography Corripio, A. B., Tuning of Industrial Control Systems, Research Triangle Park, NC: ISA, 1990. Luyben, W. L., Process Modeling, Simulation and Control for Chemical Engineers, 2nd ed., New York: McGraw-Hill, 1990. Marlin, T. E., Process Control—Designing Process and Control Systems for Dynamic Performance, 2nd ed., New York: McGraw-Hill, 2000. Ogunnaike, B. A., and Ray, W. H., Process Dynamics, Modeling and Control, New York: Oxford University Press, 1994. Seborg, D. E., Edgar, T. F., and Mellichamp, D. A., Process Dynamics and Control, 2nd ed., New York: John Wiley & Sons, 2004. Shinskey, F. G., “PID-Deadtime Control of Distributed Processes,” Control Engineering Practice, 9: 1177–1183, 2001. Shinskey, F. G., Process Control Systems, 4th ed., New York: McGraw-Hill, 1996. Smith, C. A., and Corripio, A. B., Principles and Practice of Automatic Process Control, New York: John Wiley & Sons, 1985. Stephanopoulos, G., Chemical Process Control: An Introduction to Theory and Practice, Englewood Cliffs, NJ: Prentice Hall, 1984. Wade, H. L., Regulatory and Advanced Regulatory Control: System Design and Application, 2nd ed., Research Triangle Park, NC: ISA, 2004.