Process Control and Optimization, VOLUME II - Unicauca

The response of a single-speed floating controller to a sinusoidal measurement signal. ..... ing idle (see next section for details), or with an antireset windup feature ..... Velocity algorithms have the advantages of providing bump- less transfer ...
417KB taille 10 téléchargements 297 vues
2.2

Control Modes—PID Controllers C. F. MOORE

(1970, 1985)

B. G. LIPTÁK

INTRODUCTION

R. BARS, J. HETTHÉSSY

(1995)

(2005)

Input signal (e)

A controller compares its measurement to its set point (r) and, based on the difference between them (e = error), generates a correction signal to the final control element (e.g., control valve) in order to eliminate the error. The way a controller responds to an error determines its character, which significantly influences the performance of the closed-loop control system. The different ways in which a controller may behave are the different control modes. They include on/off, floating, proportional (P), integral (I), differential (D), and many others. These control modes will be described in this section. A controller is called direct acting if its output increases when its measurement rises and is called reverse acting if its output decreases when its measurement rises.

Sinusoid Differential gap 0

Output signal (m) mmax

mmin

ON/OFF CONTROL

Time

The oldest control strategy is to use a switch for control. For example, if the controlled process is the room temperature, the switch would turn on the heat source when the temperature is low and turn it off when the desired comfort level is reached. A perfect on/off controller is “on” when the measurement is below the set point. Under such conditions the manipulated variable is at its maximum value. When the measured variable is above the set point, the controller is “off ” and the manipulated variable is at its minimum value. e > 0 then m = max if   e < 0 then m = min

2.2(1)

In most practical applications, due to mechanical friction or to the arcing of electrical contacts, the error must exceed a narrow band (around zero error) before a change will occur. This band is known as the differential gap, and its presence is usually desirable to minimize the cycling of the process. Figure 2.2a shows the response of an on/off controller to a sinusoidal input. The block diagram shown in Figure 2.2b can be used to analyze the behavior of an on/off controller. A dead time and 114 © 2006 by Béla Lipták

FIG. 2.2a The response of a two-position controller.

a time constant can represent the control response. The on/off control of heating processes can be represented with such dynamics. The on/off controller can be implemented by a relay having a hysteresis of h. If the error signal is greater than h, the relay is switched on, providing output value uo and if the error goes below −h, it is switched off. Figure 2.2c shows the output (manipulated variable −u) and control (controlled variable −y) signals of the on/off control system. The relay is first switched on until the controlled variable (y) reaches the value r + h. At that point it

r

e

u −h 0 h

u0 e

u

A

Td T y P(s) =

FIG. 2.2b Block diagram of an on/off control system.

Ae−sTd 1+sT

2.2 Control Modes—PID Controllers

y Td Au0

Td

T

115

(PI) mode to the on/off controller could further improve its performance.

T

SINGLE-SPEED FLOATING CONTROL g h

r

h d

t u u0

Td

T

Tout

Tin

Tout

Tin

t

FIG. 2.2c The on/off output signal (u) of the controller results in a cycling response of the controlled variable (y).

switches off, but the controlled variable keeps increasing through the duration of the switch’s dead time by the amount γ . Then it starts decreasing exponentially. When the output (y) has dropped to r − h, the relay is switched on again, but the controlled variable (y) will continue to decrease for the period of the dead time by a value of δ . This cycle is repeated as the controlled variable (y) is oscillating around a mean value. The amplitude of the oscillations is smaller if both the hysteresis band and the dead time are small. With a small hysteresis band the frequency of the oscillations becomes higher. It can be observed that the mean value of the controlled variable (y) is shifted a bit from the reference value (set point – r). This shift depends on the value of the reference signal. The performance of the on/off control system can be improved by applying a negative feedback around the relay with a proportional lag element as shown in Figure 2.2d. This feedback causes the oscillations to have a higher switch-over frequency and a smaller amplitude range. The addition of an integrating (I) or a proportional-plus-integral

For self-regulating processes with little or no capacitance, the single-speed floating controller can be used. The output of this controller can either be increasing or decreasing at a certain rate. Such control is commonly used when the final control element is a single-speed reversible motor. The controller is usually provided with a neutral zone (dead zone), and when the measurement is within that zone, the output of the controller is zero. This dead zone is desirable because otherwise the manipulated variable would be changing continually in one direction or the other. With this controller, the output to the reversible motor is either forward, reverse, or off. Mathematically the singlespeed floating control is expressed as  e > + ε /2  m = +Ti t + M 01   if  e < − ε /2 then m = −Ti t + M 02 −ε /2 ≤ e ≤ ε /2  m=M 03  

2.2(2)

where t = time; m = controller output (manipulated variable); e = controller input (error signal); ε = constant defining neutral zone; Ti = controller speed constant; and Mo1, Mo2, Mo3 = constants of integration. The response of a single-speed floating controller to a sinusoidal input is shown in Figure 2.2e.

Input signal (e)

Sinusoid ⑀, dead zone

Output signal (m)

r

I or PI

e

u

u

–h 0 h e 1 1 + sTl

FIG. 2.2d The performance of an on/off controller can be improved by the addition of an inner feedback.

© 2006 by Béla Lipták

Time

FIG. 2.2e The response of a single-speed floating controller to a sinusoidal measurement signal.

116

Control Theory

A = 2" B = 14"

Kc =

A = 0.143 B

PB =

100 = 700% Kc

Open Valve stroke = 1"

Level Operating line

Close h = 7" h = 3.5" = “Set point”

7" Offset Throttling range

3.5" Offset

h = 0"

Process load

0" 0%

Set point 50%

100%

Process load

FIG. 2.2f A plain proportional controller cannot maintain its set point because in order to operate at a load other than 50%, it first has to move the manipulated variable (inflow) away from 50%, which corresponds to its set point.

THE PROPORTIONAL CONTROL MODE The proportional (P) mode alone is the simplest linear control algorithm. It is characterized by a constant relationship between the controller input and output. The adjustable parameter of the proportional mode, Kc , is called the proportional gain. It is frequently expressed in terms of percent proportional band, PB, which is inversely related to the proportional gain as shown below: Kc = 100/PB

2.2(3)

“Wide bands” (high PB values) correspond to less “sensitive” controller settings, and “narrow bands” (low PB percentages) correspond to more “sensitive” controller settings. As the name “proportional” suggests, the correction generated by the proportional control mode is proportional to the error. Equation 2.2(4) describes the operation of the proportional controller. m = Kc e + b = (100/PB)(e) + b

2.2(4)

where m = the output signal to the manipulated variable (control valve); Kc = the gain of the controller; e = the deviation from set point or error; PB = the proportional band (100/Kc); b = the live zero or bias of the output, which in pneumatic systems is usually 0.2 bars and in analog electronic loops is 4 mA. The proportional controller responds only to the present. It cannot consider the past history of the error or the possible future consequences of an error trend. It simply responds to the present value of the error. It responds to all errors in the same manner, in proportion to them. When a small error results in a large response, the gain (Kc) is said to be large or the proportional band (PB) is said to be narrow. Inversely, when a large error causes only a small response, the controller is said to have a small gain or a wide pro-

© 2006 by Béla Lipták

portional setting. The gain in digital control system (DCS) control packages is usually adjustable from 0 to 8, while in analog controllers it can usually be adjusted from 0.02 to about 25. Proportional Offset The main limitation of plain proportional control is that it cannot keep the controlled variable on set point. Let us consider the level control system shown in Figure 2.2f. The float-type proportional controller can only respond to a load change (change in the outflow of water) because it must experience a change in level before it can respond. Therefore, the only condition when this process will be on set point is when the load is 50%. In all other cases the level will have to travel up or down on its “operating line” as a function of the load. The difference between the actual value of the level and set point is called the offset, because this is the amount by which the process is off set point. The gain of this mechanical controller is the ratio of the lengths of the two arms around the pivot. Kc = A/B = 2/14 = 0.143, or PB = 700%. One can increase the gain of this controller by moving the pivot to the right. This would result in requiring a smaller change in level to fully stroke the valve, which in turn would narrow the throttling range of the system and would make the operating line more horizontal. It is evident that by increasing the gain, one can reduce (but not eliminate) the offset. If the controller gain is very high, the presence of the offset is no longer noticeable, and it seems as if the controller is keeping the process on set point. Unfortunately, most processes become unstable if their controller is set with such high gain. The only exceptions are the very slow processes. For this reason the use of plain proportional control is limited to slow processes that can tolerate high controller gains (narrow proportional bands). These include the float-type valves, thermostats, and humidostats. In other processes, the offset inherent in proportional control (Figure 2.2g) cannot be tolerated.

2.2 Control Modes—PID Controllers

New pressure on valve corrects offset

Error (e) Total P&l correction

Set point

Offset Error Ti

Time

Integral correction Proportional correction

B = 2A A

b r + –

e y

Kc (1 + 1 ) Ti s

+

+

m

Manipulated variable From sensor or controlled variable

FIG. 2.2h The contribution of the integral mode to the controller’s output signal (m) is a function of the area under the error curve.

THE INTEGRAL MODE The integral (I) control mode is also sometimes called reset mode because after a load change it returns the controlled variable to set point and eliminates the offset, which the plain proportional controller cannot do. The mathematical expression of the integral-only controller is 1 Ti

∫ e dt + b

2.2(5)

while the mathematical expression for a proportional-plus integral (PI) controller is  1 m = Kc  e + T i 



∫ edt  + b

2.2(6)

The term Ti is the integral time setting of the controller. It is also called reset time or repetition time, because with a step input, the output of a pure integrator reaches the value of the step input during the integral time, assuming b = 0. The integral mode has been introduced in order to eliminate the offset that plain proportional control cannot remove. The reason proportional control must result in an offset is because it disregards the past history of the error. In other words, it disregards the mass or energy that should have been but was not added to (or removed from) the process, and therefore, by concerning itself only with the present, it leaves the accumulated effect of past errors uncorrected. The integral mode, on the other hand, continuously looks at the total past history of the error by continuously integrating the area under the error curve and eliminates the offset by forcing the addition (or removal) of mass or energy that should have been added (or removed) in the past. Figure 2.2h illustrates the correction generated by the integral mode in response to a supposed error curve indicated

© 2006 by Béla Lipták

Correction (m)

Time

FIG. 2.2g After a permanent load change, the proportional controller is incapable of returning the process back to the set point and an offset results. The smaller the controller’s gain, the larger will be the offset.

m=

117

with a dotted line in the figure. It also shows the proportional and the combined (PI) correction. Note that when the error is constant and therefore the proportional correction is also constant, the integral correction is rising at a constant rate because the area under the error curve is still rising. When the error and with it the proportional correction are both dropping, the integral correction is still rising because the area under the error curve is still rising. When the error reaches zero, the integral correction is at its maximum. It is this new signal level going to the control valve that serves to eliminate the offset. The units of setting the integral time are usually given in “repeats/minute” or in “minutes/repeat.” In DCS systems, the integral setting of control loops can usually be set from 0 to 300 repeats/minute, or from 0.2 seconds to about 60 minutes or more in units of minutes/repeat. The meaning of the term “repeats/minute” (or its inverse) can be understood by referring to Figure 2.2h. Here, in the middle section of the error curve, the error is constant and therefore the proportional correction is also constant (A). If the length of the duration of the middle section is one integral time (Ti ), the integral mode is going to repeat the proportional correction by the end of the first integral time (B = 2A). The integral mode will keep repeating (adding “A” amount of correction) after the passage of each integral time during which the error still exists. The shorter the integral time, the more often the proportional correction is repeated (the more repeats/minute), and thus the more effective is the integral contribution. Pure integral control (floating control) is seldom used, except on very noisy measurements as in some valve position or flow control systems, where the PI loop is usually tuned to have a low gain and lots of reset (integral). The proportional mode acts as a noise amplifier, while the integral mode

118

Control Theory

Controlled variable

Uncontrolled Integral control Proportional control

Proportional plus integral control

Set point

Offset

Time

FIG. 2.2i The different responses of a process variable to a load change in the process when it is uncontrolled and also when it is under P, I, and PI control.

integrates the area under the noisy error curve and gives a smooth average. PI control is the most widely used control mode configuration and is used in all except the easiest applications, such as thermostats, and the most difficult applications, such as temperature or composition control. These difficult processes have large inertia that causes slow performance, and therefore the addition of rate (derivative) action accelerates the response of the control loop. Figure 2.2i illustrates a process variable’s response to a load change in the process when it is uncontrolled and also when it is under P, I, and PI control. Reset Windup It is often the case that the solving of one problem introduces another. While the introduction of the integral mode has solved the problem of offset, it has introduced another worry that has to do with the very nature of the integral mode. The fact that integral looks at the past history of the error and integrates it is good and useful when the loop is operational, but it can be a problem when the loop is idle. When the plant is shut down for the night, the controllers do not need to integrate the errors under the error curves. Similarly, it would be desirable to “turn off” the integral mode in a surge controller when there is no surge or in a reactor temperature controller during heat-up. Other cases where integration of the error is undesirable include a selective control system, when a particular controller is not selected for control, or in a cascade master, if the operator has switched the loop off cascade, etc. Under these conditions it is not desirable for the integral mode to stay active because if it does, it will eventually

© 2006 by Béla Lipták

saturate, and its output will either drop to zero or rise to the maximum value of the air or power supply. Once saturated, the controller will not be ready to take control when called upon to do so but will actually upset the process by trying to introduce an equal and opposite area of error, which it has experienced during its idle state. In all such installations the controller must be provided with either external reset, which protects it from ever becoming idle (see next section for details), or with an antireset windup feature, which protects it from saturating in its idle state. In selective and cascade control loops, external feedback is the most often applied solution. Here, instead of looking at its own output, which can be blocked, the integral mode of the controller looks at an external feedback signal (such as the opening of the valve), which cannot be blocked. In surge control or reactor heat-up applications the chosen solution usually is to use the slave measurement as the external reset signal to prevent saturation. In some control systems, when a windup limit is reached, the integral (repeats/minute) is increased 8-, 16-, or even 32-fold, in order to speed the “unwinding” process and return the algorithm to normal operation. In DCS systems these functions are implemented in software.

THE DERIVATIVE MODE The proportional mode considers the present state of the process error, and the integral mode looks at the past history of the error, while the derivative mode anticipates the future values of the error and acts on that prediction. This third control mode became necessary as the size of processing equipment increased and, correspondingly, the mass and the thermal inertia of such equipment also became greater. For such large processes it is not good enough to respond to an error when it has already evolved because the flywheel effect (the inertia or momentum) of these large processes makes it very difficult to stop or reverse a trend once it has evolved. The purpose of the derivative mode is to predict the process errors before they have evolved and take corrective action in advance. Figure 2.2j describes the derivative response to the same error curve that has been used earlier. In the middle portion of the illustration where the error is constant, the derivative contribution to the output signal (to the control valve) is zero. This is because the derivative contribution given below by Equation 2.2(7) is based on the rate at which the error is changing, and in this region that rate of change is zero.  d  m = Kc e + Td e  + b dt  

2.2(7)

In a controller, derivative action is used not by itself, but in combination with the proportional (PD) or with the proportional and integral control modes (PID controller).

2.2 Control Modes—PID Controllers

Error (e)

Correction (m)

Derivative contribution

Proportional correction

Error Time

Td

r + −

e

Kc (1 + Td s)

m

To the manipulated variable

y

FIG. 2.2j The contribution of the derivative mode to the total output signal (m) is a function of the rate at which the error is changing.

As illustrated in Figure 2.2j, when the error is rising (on the left of the figure), the derivative contribution is positive and is a function of the slope of the error curve. The unit of the derivative setting is the derivative time (Td ). This is the length of time by which the D-mode (derivative mode) “looks into the future.” In other words, if the derivative mode is set for a time Td , it will generate a corrective action immediately when the error starts changing, and the size of that correction will equal the size of the correction that the proportional mode would have generated Td time later. The longer the Td setting, the further into the future the D-mode predicts and the larger its corrective contribution. When the slope of the error is positive (measurement is moving up relative to the set point), the derivative contribution will also rise, if the controller is direct-acting. On the right side of Figure 2.2j, the error is still positive (measurement is above the set point), but the derivative contribution is already negative, as it is anticipating the future occurrence when the loop might overshoot in the negative direction and is correcting for that future occurrence now. The derivative (or rate) setting is in units of time and usually can be adjusted from a few seconds to up to 10 hours or more. The applications for PD control loops (with proportional plus derivative effect) are few. They sometimes include the slave controller in temperature cascade systems, if the goal is to increase the sensitivity of the slave loop beyond what the maximum gain can provide. Another application of PD control is batch neutralization, where the derivative mode protects against overshooting the target (pH = 7) while the P-mode reopens the reagent valve for a few droplets at a time as neutrality is approached. PID control (with proportional plus integral plus derivative modes acting in) is more widely used, and its applications include most temperature and closed-loop composition control applications.

© 2006 by Béla Lipták

119

In most cases, when derivative action is used, the filtering of the measurement or error signal is also required, because otherwise it would respond to noise and to all abrupt input changes with excessively high changes in its output signal. The smaller the filter time constant is relative to the derivative time constant, the more effective will be the derivative mode. Limitations of the Derivative Mode Because the derivative mode acts on the rate at which the error signal changes, it can also cause unnecessary upsets because, for example, it will react to the sudden set point changes made by the operator. It will also amplify noise and will cause upsets when the measurement signal changes occur in steps (as in a chromatograph, for example). In such situations special precautions are recommended. For example, it is necessary to change the control algorithm so that it will be insensitive to sudden set point changes. It is necessary to make sure that the derivative contribution to the output signal going to the control valve will respond not to them, but only to the rate at which the measurement changes. This change is aimed at making the derivative mode to act on the measurement only (Equation 2.2[8]), but not on the error (Equation 2.2[9]).  1 m = Kc  e + T i 

∫ e dt − T

 1 m = Kc  e + Ti 

d

 y + b 

2.2(8)

d  e + b dt 

2.2(9)

d dt

∫ e dt + T

d

Some might prefer to eliminate the set point effect on the proportional contribution also. In that case, Equation 2.2(8) would be revised as follows:  1 m = Kc  − y + T i 

∫ e dt − T

d

d  y + b dt 

2.2(10)

Excessive noise and step changes in the measurement can also be corrected by filtering out any change in the measurement that occurs faster than the maximum speed of response of the process. DCS systems, as part of their software library, are provided with adjustable filters on each process variable. Table 2.2k gives a summary of PID equations, while Figure 2.2l illustrates the responses to a step change in the set point of a pure P, a pure I, and a pure D control mode, and also gives the step responses of the PI, PD, and PID controllers. The operation with a plain proportional controller (P) produces a large steady-state error. If an integral-only (I) controller is used, it continues to integrate the area under the error curve until the process variable is returned to set point. Adding the proportional mode to the integral mode provides a bit faster response. With a PD controller, the controller

120

Control Theory

TABLE 2.2k Mathematical Descriptions of the Conventional Control Modes Symbol

Description

Mathematical Expression

Input Step:

I

m = Kc e + b

Proportional

m=

Integral (reset)

1 Ti

I

∫ e dt + b

Proportional-plusintegral

PD

Proportional-plusderivative



 e dt  + b 

 d  m = Kc e + Td e  + b dt  

Proportional-plusintegral-plus-derivative

m = kt2

PI  1 m = Kc e + Ti 

Three-Mode PID

Sinusoid:

D

Two-Mode PI

Ramp:

P

One-Mode P

Pulse:

Control modes

 1 m = Kc e + Ti 

∫ e dt + T

d

d  e + b dt 

causes an initial overshoot and a steady-state error. A properly tuned PID controller reduces the initial overshoot and returns the controlled variable to set point. Figure 2.2m separately describes the responses of the above controllers and control modes to a variety of disturbance inputs. Figure 2.2n shows the process responses of a closed loop with different control algorithms when they respond to a unit step change in set point. It can be seen that the integral mode returns the process to set point while the derivative amplifies transients. Inverse Derivative Control Mode A special-purpose control action used on extremely fast processes is the so-called inverse derivative mode. As the name implies, it is the exact opposite of the derivative mode. While the output of the derivative mode is directly proportional to the rate of change in the error, the output of the inverse derivative mode is inversely proportional to the rate of change in error.

m = (kt + k)t PD PID

FIG. 2.2m Responses of the P, I, D control modes and of the PI, PD, and PID controllers to a variety of input disturbances.

Inverse derivative is used to reduce the gain of a controller at high frequencies and is therefore useful in stabilizing a flow loop. The proportional-plus-inverse-derivative controller provides high gain to minimize offset at low frequency and low gain to stabilize at high frequency. Inverse derivative can also be added to a proportional-plusintegral controller to stabilize flow and other loops requiring very low proportional gain for stability. One should add inverse derivatives only when the loop is unstable at the minimum gain setting of the proportional-plus-integral controller. Since inverse derivative is available in a separate unit, it can be added to the loop when stability problems are encountered. Interestingly, the addition of the inverse derivative, if properly tuned, has little effect on the natural frequency of the loop. 1.4 1.2 PID

I

PI

1 PD 0.8

P

P

PI 0.6

I

PD

D

PID

FIG. 2.2l The responses to a step change in set point of the P, I, D control modes and of the PI, PD, and PID controllers.

© 2006 by Béla Lipták

0.4 0.2 0

0

20

40

60

80

100

120

FIG. 2.2n The unit-step responses of P, I, PI, PD, and PID controllers.

2.2 Control Modes—PID Controllers

actual “working” settings (PB, Ti, and Td) that the process “sees” are as follows:

E L1

X Air

Ps

Pb Reverseacting relay

Po

L2

Bellows

Bellows

Integral (reset) orifice Kf

PB = PBo /(1 + Tdo /Tio)

2.2(11)

Ti = Tdo + Tio

2.2(12)

Td = (Tdo)(Tio)/(Tdo + Tio)

2.2(13)

While interaction is somewhat confusing, the interacting controller has a major advantage: the actual working derivative (Td ) can never become more than one-quarter of the Ti. This feature contributes to the safety of using this controller because if it were possible to make Td > Ti /4, the controller action would reverse, which could cause accidents. Nowadays, the different DCS and PLC suppliers use a variety of PID control algorithms. Table 2.2p illustrates the working principles of the three most widely used versions, the interacting, the noninteracting, and the parallel algorithms. It should be understood that on the one hand all of these are usable, but on the other hand their settings will mean different things, and the noninteracting and parallel algorithms do need software protection against an operator accidentally setting Td to exceed Ti /4.

Kf = spring constant

Derivative (rate) orifice

Y

FIG. 2.2o Interaction was unavoidable in the pneumatic PID controller because its components were physically interconnected, and a change in one tuning setting affected the others.

PID ALGORITHM VARIATIONS Equations 2.2(8) and 2.2(9) are referred to as noninteracting PID equations. Such interacting behavior was unavoidable when pneumatic controllers were used because their three settings were physically interconnected (Figure 2.2o); if one setting changed, it affected all the others. In these so-called interacting controllers, if we designate the PID settings on the controller knobs as PBo (proportional band), Tio (minutes/repeat), and Tdo, it can be shown that the

Digital Algorithms When PID algorithms are implemented in the digital world by DCS systems, what used to be integration in the analog world becomes summation, and what used to be time differential in the analog world becomes difference. The scan period of DCS systems is fixed at around 0.5 seconds or is

TABLE 2.2p Conversions and Relationships Between the Different PID Algorithms Types of Algorithms

Standard or Noninteracting

Equation for  1 Output (m) = Kc  e + Ti 

Interacting

∫ edt + T

d

de  +b dt 

 1 Kc  e + Ti 

Parallel

∫ edt + T

d

d  e +b dt 

Kc e +

1 Ti

∫ edt + T

d

de +b dt

Block Diagram Representation 1 ∫ dt Ti e 1 + Td d dt

Kc

+ +

Kc

m

e

Kc (1 + 1 ∫ dt) Ti

1 + Td d dt

m

PB = PB0

Working Ti (minutes/repeat)

Ti = Tio

Working Td (minutes)

Td = Tdo

PB =

PB0 1 + Tdo /Tio

Ti = Tdo + Tio Td =

(Tdo )(Tio ) Tio + Tdo

Where: PBo , Tio , and Pdo are the proportional, integral, and derivative settings on the controller.

© 2006 by Béla Lipták

e

1 Ti

∫ edt

Td d dt

Working PB (100/Kc)

121

PB = PB0 Ti = (Tio)(Kc) Td = Tdo /Kc

+ +

+m

Control Theory

selectable for each loop from 0.1, 0.2, 0.5, 1.0, 5.0, 10, or 30 seconds. The DCS system does not continuously evaluate the status of each measurement, but looks at them intermittently. This increases the dead time of the loop by two “scan periods” (the period between readings of a measurement) and bases its algorithm calculations on the “present” and the “previous” error. There are two basic types of digital algorithms in use. One is called positional. This means that the full output signal to the valve is recalculated every time the measurement is looked at (Equation 2.2[14]).  1 m = Kc  e +  Ti

n

∑ o

 T e dt + d ∆e + b ∆ t 

2.2(14)

where ∆t = scan period; ∆e = change between the previous n and the present value of the error; and ∑ 0 e = the sum of all previous errors between time zero and time n. The other type of calculation is called a velocity algorithm. In that case, the value of the previous output signal (m) is held in memory, and only the required change in that output signal is calculated (Equation 2.2[15]).   T 1 ∆ m = Kc  ∆e + e∆ t + d ∆( ∆ e) Ti ∆t  

2.2(15)

where ∆(∆e) = the change in the change in the error between the previous and the present scan period. The positional algorithm is preferred when the measurement is noisy because it works with the error and not the rate of error change when calculating its proportional correction. Velocity algorithms have the advantages of providing bumpless transfer, less reset windup (0 or 100%) and are better suited for controlling servomotor-driven devices. Their main limitations include noise sensitivity, likelihood to oscillate, and lack of an internal reference.

SAMPLE-AND-HOLD ALGORITHMS When the dead time of a control loop exceeds the time-constant of that loop, the conventional PID algorithms cannot provide acceptable control. This is because the controller cannot distinguish between a nonresponding manipulated variable and one that is responding but whose effect cannot yet be detected because of the transportation lag (dead time) in the system. This lack of response to a change in output during the dead-time period causes the controller to overreact and makes the loop unstable. For such applications the sample-and-hold type algorithms are used. These algorithms are identical to the previously discussed PID algorithms except that they activate the PID algorithm for only part of the time. After the output signal (m) is changed to a new quantity, it is sealed at its last value (by setting the measurement of the controller equal to its set

© 2006 by Béla Lipták

Sampled-data Measurement controller output (m) (c)

122

Set point (r) Dead time

Manual

Auto Manual

Auto Manual

Time

FIG. 2.2q Sample-and-hold controllers are periodically switched from manual to automatic and back again. They are used mostly on dead time processes.

point) and it is held at that constant value until the dead time of the loop is exhausted. When the dead time has passed, the controller is switched back to automatic and its output (m) is adjusted based on the new measurement it “sees” at that time, using the PID algorithm. Figure 2.2q shows how these periods of manual and automatic operating modes are alternated. A timer sets the time period for which the controller is switched to manual. The timer setting is adjusted to exceed the dead time of the loop. The only difference between conventional PID and its sample-and-hold variety is in the tuning of the loops: the sample-and-hold controller has less time to make the same amount of correction that the conventional PID would and therefore needs to do it faster. This means that the integral setting must be increased in proportion to the reduction in time when the loop is in automatic. CONCLUSIONS In this section the basic control modes and control algorithms were described. The next sections of this chapter will cover some of the more sophisticated analog and digital PID algorithm variations. In summation one might say that on/off and plain proportional control is suited only to the easiest (fast with little dead time) processes, which do not need to be kept on a set point. The addition of integral action returns the controller to set point, but this PI controller must be protected from reset windup, usually by external reset. The addition of derivative provides anticipation into the future, but requires protection from noise and sudden set point changes. Inverse-derivative is used to stabilize fast and noisy processes. Sample-and-hold algorithms are required if the dead time (transportation lag) of the process is long. Digital algorithms are discussed in more detail later, and it should suffice here to say that positional ones are better suited to the control of noisy processes, while velocity algorithms are preferred for the bumpless control of servomotor-driven devices.

2.2 Control Modes—PID Controllers

Bibliography Åström, K. J., and Hägglund, T., PID Controllers: Theory, Design and Tuning, Research Triangle Park, NC: ISA, 1995. Butterworths, W. R., Advanced Process Control, New York: McGraw-Hill, 1981. Corripio, A. B., Tuning of Industrial Control Systems, Research Triangle Park, NC: ISA, 1990. Dorf, R. C., and Bishop, R. H., Modern Control Systems, 7th ed., Reading, MA: Addison-Wesley, 1995. Eckman, D. P., Automatic Process Control, New York: John Wiley & Sons, 1958. Franklin, G. F., Powell, J. D., and Emami-Naeini, A., Feedback Control of Dynamic Systems, 3rd ed., Reading, MA: Addison-Wesley, 1994. Golten, J., and Werver, A., Control System Design and Simulation, New York: McGraw-Hill, 1991. Goodwin, G. C., Graebe, S. F., and Salgado, M. E., Control System Design, Englewood Cliffs, NJ: Prentice Hall, 2001. Hougen, J. O., Measurements and Control Applications for Practicing Engineers, Boston: Cahners Books, 1972. Jones, B. E., Instrumentation, Measurement and Feedback, New York: McGraw-Hill, 1977. Korn, G., Interactive System Simulation, New York: McGraw-Hill, 1989.

© 2006 by Béla Lipták

123

Kuo, B. C., Automatic Control Systems, New York: John Wiley & Sons, 2003. Levine, W. S., (Ed.), The Control Handbook, Boca Raton, FL: CRC Press, 1996. Luyben, W. L., Process Modeling, Simulation and Control for Chemical Engineers, 2nd ed., New York: McGraw-Hill, 1990. Luyben, W. L., and Luyben, M. L., Essentials of Process Control, New York: McGraw-Hill, 1997. Nachtigal, C. N., Instrumentation and Control, New York: Wiley, 1990. Phillips, C. L., and Harbor, R. D., Feedback Control Systems, 4th ed., Englewood Cliffs, NJ: Prentice Hall, 1999. Randhawd, R. S., “Understanding the Lazy Integral,” Instruments and Control Systems, January 1983. Rohrs, C. E., Melsa, J. L., and Schultz, D. G., Linear Control Systems, New York: McGraw-Hill, 1993. Seborg, D. E., Edgar, T. F., and Mellichamp, D. A., Process Dynamics and Control, New York: John Wiley & Sons, 1989. Skogestad, S., and Postlethwaite, I., Multivariable Feedback Control, New York: John Wiley & Sons, 1996. Shinskey, F. G., Process Control Systems: Application, Design and Tuning, 4th ed., New York: McGraw-Hill, 1998. 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.