Controller Algorithms
An automatic controller compares a process measurement to a desired "setpoint"
value and produces a "controller output" in response.
The first step in most algorithms is a "comparator" which calculates an "error":
This error is used to calculate a compensating change in the controller output
(CO), which when transmitted to the control element changes the
manipulator to adjust the process.
The goal of the controller is thus to reduce the error to zero in an
appropriate fashion.
Manual Control
Sometimes an operator will choose to adjust a manipulator based on intuition,
experience, etc. Such an approach is inconsistent, and not practical in a
situation where there are many control loops.
Almost all controllers will have an "auto/manual" switch, which can be used to
toggle between open loop (controller disengaged) and closed loop (automatic
control) operation.
On-Off Control
The simplest control algorithm is on-off control. This approach is employed by
most home thermostats.
- "Bang-bang" action -- not smooth
- Usually need to design a "dead band" to prevent chattering
Proportional Control (P-only Control)
On-off control takes exactly the same action for small errors as it does
for huge ones. The resulting cycling might be reduced if the controller
was able to make big changes when error is big, but small
changes when error is small.
- "Bias" (c0 in Riggs) is the desired constant value when
error is zero. Usually the bias is the nominal steady-state value of the
signal to the final element. The bias term takes effect the moment the
controller is switched on (placed in automatic) unless it is designed to
provide "bumpless transfer".
- A dimensionless gain KcD=1 means that a 10% change in error will
produce a 10% change in controller output. Dimensionless gains are the
preferred approach whenever dealing with control signals; but when analyzing
loops process variables may be used instead of signals, hence gains will not be
dimensionless.
- Controllers are "tuned" by picking Kc to produce a desired output
response. The primary effect of increasing Kc is faster
response.
- Controllers are "direct acting" (output increases with increasing error) or
"reverse acting" (control output decreases with increasing error). The
selection of control action is based on understanding of the process and safety
and operability considerations. It is directly linked with the "failure
position" of the final elements. [Warning: Some books
(notably Seborg, et al.) define direct and reverse acting the opposite of this
definition.]
Some controllers (especially older models) use "proportional band" instead of "gain":
the gain must be dimensionless for this to work.
A P-only controller won't necessarily drive a process back to perfect
setpoint. The permanent error which results is called "offset". This is
because the gain of a process under proportional control has a
(1+KcKp) term in the denominator.
Consequently, offset decreases as Kc increases. Be
warned though, too big of a gain can drive a process unstable.
Integral Control (Reset)
In many cases, would like to completely eliminate offset, so need a way to
penalize persistent errors.
- Eliminates offset, since the integral will exist whenever there is
error. Integral action is necessary to eliminate offset and any other
steady state deviation from setpoint.
- Usually combined with proportional action to make a PI controller. "I only"
will be very slow, since it won't act until the error has begun to accumulate.
- Integral action makes a loop more oscillatory
When a fixed error -- caused by calibration problems, valve saturation,
overrides, etc. -- continues for a long time, the integrator can stick at
a large value. This is called "reset windup". Most controllers have an
"anti-reset windup" feature, where the error is calculated as the
difference between setpoint and controller output rather than setpoint and
process measurement, at least for the integral control calculations.
Derivative Control (Rate)
PI control is effected only by the magnitude and persistence of the error.
There are times when it would be nice if could move the output faster when
error is changing rapidly.

This is the algorithm for an "ideal" derivative action. Looking at it, you
should suspect that it will not be easy to implement.
- A "D only" controller would be silly. It wouldn't be doing anything when
the error wasn't changing.
- Derivative action is not used too much. Only between 5% (Riggs (2001)
and 20% (Luyben (1990)) of loops include derivative. One reason is that
it tends to amplify signal noise, and so is only used when it is important
to reduce oscillation.
- Should not be used if large, rapid changes in manipulators are bad.
- A sudden change in setpoint, and hence in error, can make the derivative
function suddenly very large. This "derivative kick" can be bad for a
process, so most commercial controllers use the derivative of the
measurement rather than the derivative of the error.
PID Control (Proportional-Integral-Derivative, Three Mode)
The PID controller is the workhorse of the process industries and around
90% of industrial loops are PI.

Shown is
a "position form" of the PID algorithm, so called because it provides the
control element with complete information as to where to position the
manipulator.
References:
- Luyben, W.L., Process Modeling, Simulation and Control for Chemical
Engineers (2nd Edition), McGraw-Hill, 1990, p. 222- 226, 261-262.
- Riggs, J.B., Chemical Process Control (2nd Edition),
Ferret, 2001, pp. 217-20, 230-38.
- Seborg, D.E., T.F. Edgar, D.A. Mellichamp, Process Dynamics and
Control, John Wiley, 1989, pp. 184-193.
R.M. Price
Original: 10/15/93
Modified: 2/3/94, 3/3/97, 3/16/98, 12/8/98; 7/1/2003, 8/10/2004
Copyright 1998, 2003, 2004 by R.M. Price -- All Rights Reserved