You are on page 1of 26

PID CONTROL

By N. Asyiddin
EMPTY PAGE
TABLE OF CONTENTS
INTRODUCTION ............................................................................................................................. 1
PROPORTIONAL CONTROL......................................................................................................... 3
Example:................................................................................................................................... 4
ON/OFF CONTROL ........................................................................................................................ 4
PROPORTIONAL-INTEGRAL CONTROL ..................................................................................... 5
Example:................................................................................................................................... 6
PROPORTIONAL-INTEGRAL-DERIVATIVE CONTROL .............................................................. 7
CASCADE CONTROL .................................................................................................................... 9
JACKETED VESSEL CONTROL .......................................................................................................... 9
BALL MILL CONTROL .................................................................................................................... 10
RATIO/BIAS CONTROL .................................................................................................................. 11
TIME PROPORTIONED OUTPUTS .................................................................................................... 11
SQUARE ROOT LINEARISATION...................................................................................................... 13
PROCESS CONTROLLER TUNING GUIDELINES ..................................................................... 14
Proportional term definition .................................................................................................... 14
Comparison of units used for controller integral settings ....................................................... 15
ULTIMATE SENSITIVITY METHOD ................................................................................................... 15
Determining ‘usable’ controller settings ................................................................................. 18
REACTION CURVE (OPEN LOOP) METHOD ....................................................................................... 19
INTEGRATING PROCESSES ............................................................................................................ 21
CASCADE CONTROL LOOPS ........................................................................................................... 22
EMPTY PAGE
PID CONTROL
Introduction
Process control in the chemical processing industry has been used since the turn of the century,
but efforts to understand feedback control were not extensive until the 1920's. The laying of the
Trans-Atlantic communications cable necessitated the development of predictable and reliable
transmission control. The foundations of modern control theory were set in this era.

The product of the original research in transmission control is the Proportional-Integral-Derivative


(PID) controller that is now used extensively for industrial feedback control. In this chapter, the
theory of the PID controller is explained. Rather than treating PID as a single entity, P, PI and PID
controllers are discussed to illustrate the effect of each element. The development of the PID
algorithm is explained step by step to provide a general understanding for the reader.

A feedback controller is designed to generate an output that causes some corrective effort to be
applied to a process so as to drive a measurable process variable towards a desired value known
as the setpoint. The controller uses an actuator to affect the process and a sensor to measure the
results.
Virtually all feedback controllers determine their output by observing the error between the
setpoint and a measurement of the process variable. Errors occur when an operator changes the
setpoint intentionally or when a disturbance or a load on the process changes the process
variable accidentally. The controller’s mission is to eliminate the error automatically.

A block diagram of a typical feedback control loop is shown in Figure 1. The setpoint is fed into a
comparator for comparison to the process value. For the household thermostat, the process value
is the temperature of the house. The control algorithm makes the decision and generates the
control output. The process is affected by the control output, resulting in a change in the process
value. Ultimately, the process output will change sufficiently that the process value will approach
the setpoint value.

setpoint + error Control output process value


Process
Algorithm

process value
optional

Figure 1: Typical Feedback Control Loop

Consider for example, the mechanical flow controller depicted in the diagram below. A portion of
the water flowing through the tube is bled off through the nozzle on the left, driving the spherical
float upwards in proportion to the flow rate. If the flowrate slows because of a disturbance such as
leakage, the float falls and the valve opens until the desired flow rate is restored.

P ID CONT R OL 1
A mechanical flow controller
manipulates the valve to
maintain the downstream flow
rate in spite of the leakage.
The size of the valve opening
at time t is V(t). The flowrate
is measured by the vertical
position of the float F(t). The
gain of the controller is A/B.
This arrangement would be
entirely impractical for a
modern flow control
application, but a similar
principle was actually used in
James Watt’s original fly-ball
governor. Watt used a float to
measure the speed of his
steam engine (through a
mechanical linkage) and a
lever arm to adjust the steam
flow to keep the speed
constant.

In this example, the water flowing through the tube is the process, and its flowrate is the process
variable that is to be measured and controlled. The lever arm serves as the controller, taking the
process variable measured by the float’s position and generating an output that moves the valve’s
piston. Adjusting the length of the piston rod sets the desired flowrate; a longer rod corresponds
to a lower setpoint and vice versa.

Suppose that at time t the valve opening is V(t) inches and the resulting flowrate is sufficient to
push the float to a height of F(t) inches. This process is said to have a gain of Gp = F(t)/V(t). The
gain of a process shows how much the process variable changes when the controller output
changes. In this case,
F(t) = Gp V(t) [1].

Equation [1] is an example of a process model that quantifies the relationships between the
controller’s efforts and its effects on the process variable.

The controller also has a gain Gc, which determines the controller’s output at time t according to

V(t) = Gc (Fmax - F(t)) [2]

The constant Fmax is the highest possible float position, achieved when the valve’s piston is
completely depressed. The geometry of the lever arm shows that Gc = A/B, since the valve’s
piston will move A inches for every B inches that the float moves. In other words, the quantity
(Fmax - F(t)) that enters the controller as an input "gains" strength by a factor of A/B before it is
output to the process as a control effort V(t).

Note that controller equation [2] can also be expressed as

V(t) = Gc (Fset - F(t)) + VB [3]

where Fset is the desired float position (achieved when the flow rate equals the setpoint) and VB =
Gc (Fmax - Fset) is a constant known as the bias. A controller’s bias represents the control effort
required to maintain the process variable at its setpoint in the absence of a load.

2 P ID CONT R OL
Proportional Control
The proportional controller produces an output that is proportional to the difference between the
setpoint and the process value. This difference is commonly referred to as the error. The greater
the error, the greater the output of the controller. The equation for the output from a proportional
controller is given as:

m = k × e + ms

where:
m is the controller output
K is the gain
e is the error = (setpoint – process value)
ms is a constant

The error term is calculated as the difference of the setpoint and the process value. Thus, these
two values must be measured in the same units.

K is the controller's proportional gain. It is the adjustable parameter in the controller that enables
it to be tuned. By adjusting the gain, the magnitude of the control output can be changed for a
given error. The parameter ms is equal to the steady state output required to produce an error of
zero. When the error is zero, it can be seen from equation 1 that the controller output is
necessarily equal to ms. Thus, the steady-state error in a process controlled by a proportional
controller is equal to zero if there are no changes in the process.

A problem arises with proportional control when a disturbance is introduced to the process.
Disturbances result in a steady-state error (ess) as shown in Figure 2. The best way to explain the
effect of a disturbance is through the following example.

Process
process value

Value setpoint
Response
ess

time
t1

Controller ms
output

Output
Response

time
t1

Figure 2: Proportional Controller Response

P ID CONT R OL 3
Example:
A proportional controller is used to control the temperature of a house. The constant ms has been
chosen so that the house temperature is 21°C. With this value of ms there is no error.
Unfortunately, a window is left open on a winter day. The value of ms is insufficient to keep the
temperature at 21°C resulting in an error. Since it is a proportional controller, the presence of an
error causes the output of the controller to increase by the amount K × e, but this increase is
insufficient to raise the temperature of the house to the setpoint of 21°C. Thus, a steady-state
error results.

Figure 2 shows the process value and the response of a P controller to a disturbance introduced
at time t1. At t1, the process value is equal to the setpoint and the controller output is ms. The
disturbance causes the process value to fall below the setpoint. The resulting time varying error,
causes the controller output to increase. This causes the error to decrease, but a steadystate
error (ess) must persist in order to maintain the increased output of the controller.

Thus proportional controllers are very sensitive to disturbances, and given sufficient time and
disturbances, a steady-state error will result.

On/Off Control
A special case of the proportional controller is the On/Off controller (sometimes called a bang-
bang controller). As the name implies, there are only two states of the output of an on/off
controller – on or off. There are no inbetween states. The typical household thermostat is an
example of this type of controller.

The equation for the on/off controller is:

m = K × e, and K = ∞
where:
m is the controller output
K is the gain = ∞
e is the error = (setpoint – process value)

This equation is similar to that of the proportional controller. The differences are that the gain is
fixed at infinity, and the constant ms is removed (since the term K × e is so large, the term ms is
essentially zero). Therefore, for any negative error (i.e. process value greater than setpoint) an
infinitely negative output results; for any positive error, an infinitely positive output results.
In the case of the household thermostat, when the room is cold, the thermostat turns on the
furnace and when it is warm, it turns off the furnace.

4 P ID CONT R OL
Proportional-Integral Control
A proportional controller produces a steady-state error when a disturbance is introduced. This
error can be eliminated by adding integral action to the P controller. This is known as
proportional-integral (PI) control.

The equation for the output of a PI controller is:

K
T ∫
m = K ×e + e dt + ms

where:
m is the controller output
K is the gain
e is the error = setpoint – process value
T is the reset time
ms is a constant
∫e dt is the integration of all previous errors

The second term in the equation is known as the integral term. The other terms of the equation
are unchanged from the P controller equation. The parameter T is an adjustable quantity that
determines the amount of integral action in the output of the controller. The parameters K and T
allow the PI controller to be tuned. It can be seen upon inspection of equation 3 that the PI
controller becomes a P controller as T approaches a positive infinite quantity (T cannot be
negative since it measures a time quantity). As T approaches infinity, the integration term in the
equation approaches zero.

The effect of adding integral action is to remove steady-state error. When an error exists, it is
summed (integrated) with all the previous errors, thereby increasing or decreasing the output of
the PI controller (depending upon whether the error is positive or negative). Thus, as the error
accumulates in the integral term, the output changes so as to eliminate the error. A P controller
will have a constant output when a steady-state error exists, thereby perpetuating the error. A PI
controller reduces the steady-state error to zero, through the action of the integral term, as shown
in Figure 3.

Process
process value

Value setpoint
Response

time
t1
output

Controller ms
Output
Response

time
t1

Figure 3: Proportional-Integral Controller Response

P ID CONT R OL 5
Example:
The temperature regulation of the house in the previous example can be improved by using a PI
controller. If the window is opened on a cold day, a positive error results between the room
temperature and the setpoint (i.e. the room is cold). The error accumulates in the integration term
and as this term gets larger the output of the controller increases. As a result of the increase in
the controller output, the room temperature increases until the setpoint is reached.

When the setpoint is reached, the error and all the subsequent errors are zero and the integration
term becomes a constant. PI control has eliminated the steady-state error that results when a
disturbance is encountered by a P controller.

As a further illustration, assume that the window is now closed. Since a source of heat loss has
been eliminated, the temperature rises above the 21°C setpoint producing negative errors.
Summing these negative errors into the integral term decreases the output of the controller. The
temperature then falls until the setpoint is reached, at which point the error and all subsequent
errors are zero. When this occurs, the integral term ceases to decrease and becomes constant.

The output of the controller is constant and the room temperature remains at the setpoint.
Steady-state error has been avoided. Figure 3 is representative of the typical response of the
process and the PI controller to a disturbance. The steady-state error in Figure 2 is not
characteristic of the process response when regulated by a PI controller. A novel (though not
theoretically correct) way of viewing integral action is that it emulates the resetting of the setpoint.
To see what is meant by this, consider that the occupant of the house in the previous example
has found that the room temperature is below the desired level. The occupant is a P controller
and regulates the temperature. Rather than checking for an open window, the occupant raises
the thermostat setting every five minutes until the temperature is 21°C. The five minute period is
the setpoint reset time, hence the naming of the parameter T in equation 3. It is important to
understand that in a PI controller the setpoint is not altered. The integral term takes this "setpoint
resetting" into account.

6 P ID CONT R OL
Proportional-Integral-Derivative Control
The response of PI controller tends to be oscillatory. The process value continuously rises above
and falls below the setpoint. This is the result of the integral action over-compensating for the
error. The amplitude of the oscillations can be decreased by decreasing the proportional gain, K,
or by decreasing the amount of integral action by increasing T. This results in a much slower
response of the controller (i.e. a longer time to reach the setpoint once a disturbance has been
introduced). The addition of derivative control to the PI controller improves the response of the
controller when the gain and/or the integral action is decreased to eliminate the oscillatory
response.

The equation for the PID controller is:

K dp
m = K ×e +
T ∫ e dt + K × R ×
dt
+ ms

where:
m is the controller output
K is the gain
e is the error = (setpoint – process value)
T is the reset time
R is the rate gain
p is the process value
ms is a constant
∫e dt is the integration of all previous errors
dp
is the rate of change of the process value
dt

The third term in the equation is known as the derivative term, as it takes intoconsideration the
rate of change of the process value. The other terms are unchanged from the PI controller.
The parameter R is the rate gain. The PID controller can be tuned to give an adequate response
for any process, by adjusting the rate gain, along with the proportional gain and reset time. The
derivative gain is adjusted to vary the magnitude of the output change for a given change in the
process value. R is measured in time units; usually seconds.

Derivative (or anticipatory) action detects a change in the process value2 and produces an output
based upon the change. If the process value suddenly increases, the derivative action responds
to decrease the output of the controller so as to decrease the process value. Derivative action
anticipates a permanent increase or decrease in the process value, therefore improving the
response of the controller by rapidly applying an opposing output.

Figure 4 illustrates the response of a PID controller to a disturbance introduced at time t1. The
response is quicker and less oscillatory than that of a PI controller. The peak in the controller
response, known as the derivative peak, is caused by the sudden change in the process value.
Readers who have previously studied process control theory may have detected that the
derivative term in equation 4 has been subtracted from the equation for the PI controller rather
than added, as is stated in many process control textbooks. It also uses the rate of change of the
process value rather than the rate of change of the error. Textbooks often state that these two
rates are equivalent, but this is not necessarily true.

To illustrate this point consider a process at steady-state. If the setpoint is changed there is an
instantaneous and infinite rate of change in the error; but the rate of change of the process value
is zero. Simply stated:
de dp

dt dt

P ID CONT R OL 7
Process

process value
Value setpoint
Response

time
t1

output
Controller ms
Output
Response

time
t1

Figure 3: Proportional-Integral-Derivative Controller Response

during a setpoint change. As a result, the output of equation 4 is less sensitive to setpoint
changes than the equation suggested by many textbooks. Also, equation 4 is much more
sensitive to disturbances in the process, whereas the equation suggested in many textbooks can
make the process unstable.

8 P ID CONT R OL
Cascade Control
Cascade controllers are often used when two control loops are interrelated. One of the two loops
is usually fast acting, and the other slow acting with a long dead time. Usually, the slow acting
controller is the primary controller and the fast acting controller is the secondary controller. Two
examples of control situations applicable to cascade control are given below.

Jacketed Vessel Control


Jacketed vessels (Figure 5) are often used to control the temperature of products. If the jacket
volume is large relative to the tank volume, it may be very easy to overheat or overcool the jacket
contents with the result that the temperature of the tank contents will cycle about the setpoint.
Using one controller to maintain the jacket temperature with the setpoint of the controller
determined by a second product temperature controller is an effective method to achieve
accurate, high speed control.

vessel

heater jacket
control valve

steam process
output value

Secondary temperature
Controller
setpoint
process
output value

Primary
Temperature
setpoint Controller
To condenser
and boiler

Figure 5: Cascade Control of Jacketed Vessel

P ID CONT R OL 9
Ball Mill Control
Ball mills (Figure 6) operate best at specific ore loading levels. The loading level can be
measured by the current required to rotate the mill. The motor current is the main controlling
parameter and provides the input to the primary controller.
Weight belts with motor speed controls are often used to control the rate at which material is fed
to the ball mill. The fast acting weigh belt signal forms the input to the secondary controller. The
setpoint in the secondary controller is derived from the output of the primary ball mill motor
current controller.

ball mill
feed belt

belt motor belt


speed
sensor

motor

motor current
process value sensor process
output value
Secondary Primary
Controller setpoint output Controller setpoint

Figure 6: Cascade Control of a Ball Mill

10 P ID CONT R OL
Ratio/Bias Control
A ratio/bias controller sets the controller output equal to the input multiplied by a constant, plus an
optional output bias. Ratio controllers are used where an analog output must track an analog
input or output signal.
Ratio/bias controllers can also be used to provide remote setpoint inputs for PID controllers.

The equation for the ratio/bias controller is:

m = K × p × Bo
where:
m is the controller output
K is the ratio gain
p is the process value
Bo is the output bias

This equation is similar to that of the proportional controller. The difference is that it is the process
value rather than the error (setpoint - process value) which is multiplied by the gain. The
proportional controller will behave as a ratio controller if a negative gain and a setpoint of zero is
used.

Ratio/bias controllers are typically used to track the output of another controller. To illustrate this,
consider the fuel flow rate to a furnace that is controlled by a PID controller. As more fuel is
added, more air (in direct proportion) is required for combustion. A ratio controller whose input is
the output of the fuel flow controller will add the required air in direct proportion.

Time Proportioned Outputs


There are two possible types of output from a PID or ratio/bias controller: an analog signal and a
time proportioned digital output (sometimes called a pulse duration output). An analog output
sends the controller output quantity to an analog output module to generate an analog signal. A
time proportioned output sends the controller output quantity indirectly to a digital output.

Simply stated, for a time proportioned output, the output of a PID controller is used to proportion a
fixed time period into an "on-time" and an "off-time". During the on-time, a digital output is turned
on; during the off-time the output is turned off.

The length of the on-time is proportional to the magnitude of the controller output, while the off-
time is the difference between the fixed time period and the on-time. Consequently, the time
proportioned output is a train of pulses of varying widths where the pulse width corresponds
directly to the controller output.

In this way, the output simulates an analog output. Figure 7 compares a time proportioned pulse
train to an equivalent analog output. The width of the pulse is proportional to the height of the
analog output at the start of each time period T.

The control elements that are best suited to time proportioned outputs are devices that can
withstand frequent cycling between the on and off states. Such devices include solenoid valves
controlling continuous flows, forward/reverse motor screws, high power electric heaters (where
SCR controllers might be very expensive), and diaphragm valves with open/close control
solenoids.

Although it is possible to use electric motors with this type of output, excessive wear, caused by
the frequent start-ups, may result. There are operational limitations involved in using time
proportioned control. Since a timer is used to set the on-time, the resolution of the pulse output is

P ID CONT R OL 11
limited by the minimum time interval of the timer. The resolution can be improved by increasing
the length of the fixed time interval that is being partitioned. The paradox here is that by
increasing the fixed time period, the frequency of execution of the control algorithm is decreased,
which can result in unstable response in extreme cases.

Analog 100%
Output

50%

0%

T 2T 3T 4T 5T 6T 7T 8T Time

0.0T 0.8T 1.0T 0.9T 0.5T 0.1T 0.0T 0.5T 0.8T


Time 100%
Proportional
Output
50%

0%

T 2T 3T 4T 5T 6T 7T 8T Time

Figure 7: Analog and Time Proportioned Outputs

Example
Consider that the temperature of a liquid in a vessel is regulated by a PID controller with a time
proportioned output directed to a solenoid valve that admits steam to a jacket surrounding the
vessel. The timer used to set the output on-time has a resolution of 0.1 second. The fixed time
period is 10 seconds.

To illustrate the determination of the on-time consider that the PID controller has calculated an
output of 30. The timer is thus loaded with 30 tenths of a second and since a non-zero on-time is
required, the digital output to the solenoid valve is turned on.

After the timer has timed-out (after 3 seconds), the digital output is turned off for the remainder of
the time period, that is 7 seconds. Once this period has passed, the control algorithm executes
again and the cycle repeats.

12 P ID CONT R OL
Square Root Linearisation
PID controllers and ratio/bias controllers assume that the process value is linear. Some methods
of measurement product non-linear signals. The output of the measurement device does not vary
in a linear fashion with respect to the quantity being measured.

Consider the control of the flow rate of a liquid. The input to the controller is a height reading from
a manometer (or more commonly a differential pressure cell) installed on the piping. It can be
shown that the flow rate is proportional to the square root of the height of the manometer. The
equation is:

f = K p +C
where:
f is the flow rate
K is the gain
p is the process value (reading from manometer)
C is a constant adjusting for pump head, NPSH and pipe friction

To use the manometer reading as a process value it must be linearised, by taking the square
root, before the calculations of the PID controller or the ratio/bias controller can be performed.
An inherent problem with this linearisation is that the precision of the process value is no longer
linear over the range of the process value. The larger the process value, the more precise the
result of the linearisation.

P ID CONT R OL 13
Process Controller Tuning Guidelines
There are essentially three types of algorithms in use: ideal, parallel and series. Ideal algorithms
are generally found only in textbooks. Parallel control algorithms have three independent
(parallel) calculations for Proportional (Gain), Integral, and Derivative. An advantage of parallel
calculation construction is changes in the values to one do not affect the other two. A
disadvantage is they are difficult to manually tune. Series control algorithms are constructed so
the output of one calculation is part of the input to the next calculation, thus "upstream"
calculation changes affect "downstream" calculations. This is frequently referred to as controller
tuning interaction. Series control algorithms are the most common used in analog and digital
controllers.

Controller Algorithms

 1 Tds 
Ideal K 1 + +
 Tis Tds + 1
where:
 1   Tds + 1  K = Proportional (gain)
Series K 1 +  
 Tis   ∗ Tds + 1 Ti = Integral (seconds/repeat
Td = Derivative (seconds)
*Td = Derivative filter time
1 Tds
Parallel K+ +
Tis ∗ Tds + 1

Proportional term definition


Proportional Band % = 100/Propotional Gain

Proportional Band (Proportional Gain) Gain

1% 100.0
10% 10.0
50% 2.0
100% 1.0
500% 0.2
1,000% 0.1
Source: Control Engineering with data from Techmation Inc.

14 P ID CONT R OL
Comparison of units used for controller integral settings
Repeats per Minutes per
Seconds per repeat Repeats per minute
second repeat
1 1.00 0.0167 60.0
5 0.20 0.0833 12.0
10 0.10 0.1667 6.0
60 0.0166 1.0 1.0
120 0.0083 2.0 0.5
240 0.00417 4.0 0.25
480 0.00208 8.0 0.125
1,000 0.0010 16.6667 0.06
Source: Control Engineering with data from Techmation Inc.

PID controllers operate on an error feedback where the output is normally characterized when
there is a difference between the PV and SP. However, it is not always advantageous for a
controller to operate on an error signal. It is common practice to allow a controller to respond
differently to SP changes verses load (PV) changes. It is important to understand which algorithm
variables will be affected when the SP is changed versus when the PV is changed. Continuous
processes normally have PV load changes, while batch processes tend to have more SP
changes. Depending on how the controller is being used, how the algorithm reacts to SP and PV
changes, and how tuning constants are determined/calculated, it is possible to have a controller
perform better one way than another.

Technical libraries contain volumes on various ways to calculate controller-tuning values. One of
the most efficient and consistent ways to collect and analyze process data is to use software from
companies like ControlSoft (Cleveland, O.), Techmation (Scottsdale, Ariz.) or ExperTune
(Hubertus, Wis.). Also, most control system manufacturers offer a variety of control loop analysis
and tuning software. When software isn’t available, some useful guidelines can be applied.

Ultimate Sensitivity Method

The goal is to achieve a marginally stable controller response


(see marginally stable response chart)
Closed Loop (Loop in Automatic)
1. Choose any GAIN setting. Place INTEGRAL at maximum time (smallest
value) and place DERIVATIVE at minimum value or turn it completely off.
2. Make a 10% change in SETPOINT (SP).
3. Record the PROCESS VARIABLE (PV) and CONTROLLER OUTPUT (CO)
responses. (If process becomes unstable, place the loop in MANUAL and do
Test 1 what is needed to maintain control.)
4. If recorded response produces a stable (lagging) response, proceed to Test 2.
5. If recorded response produces an unstable (leading) response, proceed to
Test 3.

P ID CONT R OL 15
1. Double the GAIN setting (Leave INTEGRAL and DERIVATIVE the same as
Test 1).
2. Make a 10% change in SP.
3. Record the PV and CO responses. (If process becomes unstable, place the
Test 2 loop in MANUAL and do what is needed to maintain control.)
4. If recorded response produces a stable (lagging) response, repeat Test 2.
5. If recorded response produces an unstable (leading) response, proceed to
Test 3.

1. Half the GAIN setting (Leave INTEGRAL and DERIVATIVE the same as Test
1 and 2).
2. Make a 10% change in SP.
3. Record the PV and CO responses. (If process becomes unstable, place the
Test 3 loop in MANUAL and do what is needed to maintain control.)
4. If recorded response produces a stable (lagging) response, proceed to Test 2.
5. If recorded response produces an unstable (leading) response, repeat Test 3.

Repeat testing until a marginally stable response has been recorded.

16 P ID CONT R OL
Stable (lagging) response

setpoint process variable

Change in output is less than 180° out of phase


with the Process Variable input.

Unstable (leading) response

setpoint
process variable

Change in output is less than 180° out of phase


with the Process Variable input.

Marginally stable response

Ultimate
period

setpoint

process variable controller output

Change in output is 180° out of phase with the Process


Variable input. When this response is achieved the result
is termed the Ultimate Gain setting that causes a
continuous sinusoid response in the process variable.

P ID CONT R OL 17
Once a marginally stable response is obtained, all the information necessary to calculate usable
controller tuning constants is available. The following table provides guidelines useful in
determining usable tuning constants for P (proportional), PI (proportional and integral), and PID
(proportional, integral, and derivative) controllers.

Determining ‘usable’ controller settings


Controller assumptions:

• Controller algorithm is series.


• Proportional (P) is entered as gain (not proportional band).
• Integral (I) is in minutes per repeat (not repeats per minute).
• Derivative (D) is in minutes.

Multiply the ultimate gain setting in the controller by 0.56.


Proportional (P) only
The result will provide automatic control but may create a PV to SP
controller
offset. To eliminate/reduce the offset, introduce INTEGRAL (I).
Proportional and Integral 1. Multiply the ultimate gain setting in the controller by 0.45.
(PI) controller 2. Multiply the ultimate period by 0.83.
1. Multiply the ultimate gain setting in the controller by 0.67.
Proportional, Integral, and
2. Multiply the ultimate period by 0.50.
Derivative (PID) controller
3. Multiply the "ultimate period by 0.125.
Repeats A calculation of (Proportional GAIN * OFFSET).
How many times will the controller perform the (Proportional GAIN *
Repeats per minute
OFFSET) calculation in one minute?
How much time, in minutes, does it take the controller to perform 1
Minutes per repeat
(Proportional GAIN * OFFSET) calculation?
Derivative action is applied only one time when the PV moves away
from SP.
Derivative works on rate-of-change. If the PV rate-of-change is
caused by "noise," derivative may cause over-correction. Never
Derivative (D) Cautions
use derivative on a process with a noiseband greater than 0.25%.
Control loops likely to have significant noise are pressure and flow.
Level can also be noisy when stirred/agitated or splashing can/is
occurring.
Source: Control Engineering

18 P ID CONT R OL
Reaction curve (open loop) method

Many people become very nervous when a controller is placed in automatic with tuning constants
that produce cyclic, on the brink of out-of-control response. For these nervous types, a method
known as open loop (loop in manual) reaction curve testing may be less stressful.

The philosophy of open loop testing is to begin with a steady-state process, make a step change
to the final control element and record the results of the PV. Information produced by the open-
loop test is the loop deadtime and the loop time constant. Users must be accurate in determining
times for T2, the point where the PV first begins to move, and T3, the point where the PV attains
63.2% of the total PV change. Following an open-loop test the recorded information should
closely resemble the Open Loop Test Results diagram below.

Open Loop Test Results

Time
T1 T2 T3
T3 – T2 = loop time constant
T1 – T1 = loop deadtime

63.2% of 100% of
change change
in PV in PV

% change
in CO

A side benefit to conducting and recording the open-loop test is the establishment of a loop
signature for future reference in determining if the process has changed. For example, if the loop
signature is for a temperature controller on a heat exchanger, a significant change in the loop
signature could indicate the heat exchanger is losing efficiency.

Using the results of the open-loop test to calculate controller-tuning constants requires dividing
the percentage change in PV by the percentage change in CO to obtain an open-loop gain. The
open-loop gain (OLG) and control loops inherent gain (IG) are used in the formula (OLG * P(gain)
= IG). With terms rearranged, the formula becomes IG divided by OLG = P(gain).

P ID CONT R OL 19
Consider the following guidelines when calculating controller-tuning constants:

If a control loop has an inherent gain of one, and Then the proportional gain required for the
the open-loop gain is four; controller is one divided by four or 0.25.
(Place 0.25 in P constant of the controller.)
RULE #1: If loop dead time is less than or equal to Then open-loop gain times process gain
¼ the loop time constant; equals one.
COROLLARY #1: If loop dead time is Then open-loop gain times process gain
approximately ½ the loop time constant; equals 0.5
COROLLARY #2: If loop dead time is greater than Then open-loop gain times process gain
or equal to the loop time constant; equals 0.25.
NOTE: Controller scan times should be at least eight times faster than the loop time constant.
RULE #2: Integral time (IT) should be equal to loop IT = LTC when LTC is in repeats per minute.
time constant (LTC).
RULE#3: Derivative time should be less than or
equal to ¼ of LTC.
Source: Control Engineering with data from Techmation Inc.

20 P ID CONT R OL
Integrating processes
Integrating processes are those for which only one CO setting in manual mode produces a stable
(balanced) PV. Level, batch temperature, batch pressure, and pH tanks are examples of
integrating processes. Expanding on the level example, with the control loop in manual, only one
CO setting allows the amount of liquid entering a vessel to exactly equal the amount of liquid
leaving the vessel. Any other CO setting will cause the level PV to integrate upward or downward.
Gathering data for integrating processes is best accomplished using an open loop test.

Find the balance point where vessel/process input is equal to vessel/process output.
Make a 10% to 20% change in the CO setting.

After the PV has integrated 3% to 5% change the CO output back the balance point value.
Repeat step two in the opposite direction.
Repeat step three.

The reason to conduct the test in both directions is that some loops (i.e., heating and cooling) will
likely produce a different slope for each direction. When this is the case, the less aggressive
slope should be used to determine controller-tuning constants to prevent loop instability. When
unexpected graphs are produced, likely causes are stiction or backlash in the control valve.
Trying to tune such loops is nearly impossible because the controller is attempting to overcome
mechanical defects that likely will become worse with time.

Integrating processes usually produce the best overall results with medium response tuning
constants that allow some overshoot. Use caution when applying derivative to integrating
processes. If "excessive" hysteresis is found in a control valve, use only slow PI tuning constants.
Controller tuning constants for integrating processes should utilize high gain and slow integral
(small repeats per minute).

Example integrating process response graphs

Expected graph for integrating process test

2
CO
1 3 5
PV 4

Graph for integrating process test with control valve stiction

2
1
CO
3 4 5
PV

Graph for integrating process test with control valve backlash

2
1 5
CO
PV 3
4

P ID CONT R OL 21
Cascade control loops

LT FT

PV
Primary loop, PV
use PV changes
LIC tuning parameters.
Secondary loop,
Remote SP use SP changes
LIC
tuning parameters.
Do NOT use derivative action
CO

Typical Level Control Loop Cascaded To Flow Control Loop

Cascade control loops are effective when trying to maintain tight control over slow moving
variables. For example, boiler level can be tightly maintained using a level controller cascaded to
a flow controller.

To have an effective cascade control strategy the dynamics of the secondary loop must be at
least five times faster than the primary loop. (Dynamics are defined as loop dead time multiplied
by loop time constant.)

To tune a cascade control loop:

Place secondary loop in automatic (disconnect the secondary loop from the primary loop).
Conduct test and tune secondary loop.

Place secondary loop in Remote SP (connect secondary and primary loop).


Conduct test and tune primary loop.

Note: Ensure secondary loop does not have setpoint limits or unnecessary assigned alarms.
When embarking on a journey to tune all loops in a process, work from the raw material end to
the final product end beginning with flows, then pressures, followed by levels, then temperatures,
and finally what remains.

Contrary to popular belief, control loop tuning is a science. But it begins with analysis of each
component in the loop to ensure each piece of equipment in the loop is capable of performing at
its best. Once the equipment is ready, methods have been developed and repeatedly proven to
work, but it takes knowledge and patience. The pay off to having every control loop performing at
its best is a minimum 5% quality and production improvement that could go as high as 25%.

22 P ID CONT R OL

You might also like