Professional Documents
Culture Documents
Pid Algorithm and Tuning Methods: Process Control Solutions
Pid Algorithm and Tuning Methods: Process Control Solutions
and
TUNING METHODS
John A. Shaw
Process Control Solutions
585-234-5864
The PID control algorithm is used for the control of almost all loops in the process
industries, and is also the basis for many advanced control algorithms and strategies. In
order for control loops to work properly, the PID loop must be properly tuned. Standard
methods for tuning loops and criteria for judging the loop tuning have been used for
many years, but should be reevaluated for use on modern digital control systems.
While the basic algorithm has been unchanged for many years and is used in all
distributed control systems, the actual digital implementation of the algorithm has
changed and differs from one system to another and from commercial equipment to
academia.
We will discuss controller tuning methods and criteria. Also discussed will be the digital
PID control algorithm, how it works, the various implementation methods and options,
and how these affect the operation and tuning of the controller.
Chapter 1
The Feedback Control Loop
Valve Linearity
Valves are usually non-linear. That is, the flow through the valve is not the same as
the valve position. Several types of valves exist:
Linear
Equal Percentage
Quick Opening
As we will see later, the gain of the process, including the valve, is very important to
the tuning of the loop.
• If the controller is tuned for one process gain, it may not work for other process
gains.
Valve Linearity:
Installed characteristics
The flow vs. percent open curve changes due to the head loss in the piping
At low flow, the head loss through the pipes is less, leaving a larger differential
pressure across the valve.
At high flow, the head loss through the pipe is more, leaving a smaller differential
pressure across the valve.
Indication Inversion
The output
indication is
inverted.
The controller
action takes the
valve action
into acount.
Most analog
controllers
work like this.
Signal Inversion
The output
signal is
inverted.
The controller
action ignores
the valve
action.
Some
distributed
control systems
work like this.
Chapter 2
The Process Response to the Controller
Steady state relationships:
Relating valve change to measurement change
When the load changes, either the process value changes or the valve position must be
changed to compensate for the load change.
Transportation Lag
Measurement of dynamics
The dynamics differ from one loop to another.
D is "Pseudo Deadtime"—the sum of the deadtime and all lags other than the largest
lag.
Disturbances
Almost all processes contain disturbances.
The effect of the disturbance can depend on where it enters the loop.
CONTROLLER ACTION
Auto/Manual
Manual Mode:
Automatic Mode:
The control algorithm manipulates the output to hold the process measurements at
their setpoints.
Key concepts
The PID control algorithm does not "know" the correct output to bring the
process to the setpoint.
• It merely continues to move the output in the direction which should move the
process toward the setpoint.
• The algorithm must have feedback (process measurement) to perform.
The PID algorithm must be "tuned" for the particular process loop. Without
such tuning, it will not be able to function.
• To be able to tune a PID loop, each of the terms of the PID equation must be
understood.
Proportional only
Proportional and Integral (most common)
Proportional
E = Measurement - Setpoint (direct action)
Output = E * G + k
The output is equal to the error times the gain plus the manual reset.
If the manual reset stays constant, there is a fixed relationship between the setpoint,
the measurement, and the output.
Proportional—units
The proportional or gain term may be calibrated in two ways:
Gain = Output/Input
(Reverse acting)
Proportional only control produces an offset. Only the adjustment of the manual reset
removes the offset.
Proportional—Offset
Offset can be reduced by increasing gain.
Proportional control with low gain
This manual reset may be replaced by automatic reset which continues to move the
output whenever there is any error:
With the error set to zero (measurement input = setpoint), make a change in the input
and note the immediate change in output. The output will continue to change (it is
integrating the error). Note the time it takes the output to, due to the integral action,
repeat the initial change made by the gain action.
Some control vendors measure reset by repeat time in minutes. This is the time it
takes the reset (or integral) element to repeat the action of the proportional element.
Others measure reset by "repeats per minute".
Derivative
First used as a part of a temperature transmitter ("Speed-Act™" - Taylor Instrument
Companies) to overcome lag in transmitter measurement.
Derivative Contribution:
The amount of time that the derivative action advances the output is known as the
"derivative time" measured in minutes.
G = Gain
D = Derivative (minutes)
Non-Interactive (Parallel):
Gn = Gi (1 + Ri Di)
Rn = Ri/(1 + Ri Di)
Dn = Di/(1 + Ri Di)
External feedback
If the input to the positive feedback loop is taken from the signal to the process, it is
called "external feedback" or "reset feedback". At steady state the controller output is
the Gain multiplied by Error added to external feedback. If the error is zero, the output
is equal to the external feedback.
Saturation Properties
Another difference is in the "Saturation Properties"
eg. what happens when output has been at the upper or lower limit.
Standard algorithm
Similar to equation:
Output pulls away from limit one reset time before measurement crosses setpoint.
• For most applications, there is no difference. For some batch startup problems, the
"integrated velocity form" algorithm works best.
• Not as severe as the derivative effect, but still can upset the process
• An operator step change of the setpoint would cause a very large change in the
output, upsetting the process.
Tuning Criteria
or
"How do we know when its tuned"
Elementary methods
Informal methods
2 Minimum overshoot.
Mathematical criteria
Mathematical methods—minimization of index
The "by-guess-and-by-golly" method
D min. Time until the intercept of tangent line and original process value
The gain, reset, and Derivative are calculated using:
P X/DR — —
0.3/D
PI 0.9X/DR —
0.5/D
PID 1.2X/DR 0.5D
After "bumping" the output, watch for the point of inflection and note:
D=Ti - P/R
Used only on processes that will stabilize after output step change.
Gp is the process gain - the change in measured value (%) divided by the change in
output (%)
P L/GpD — —
0.3/D
PI 0.9 L/GpD —
0.5/D
PID 1.2 L/GpD 0.5D
Note the gain (Ultimate Gain, Gu,) and Period (Ultimate Period,
Pu.)
Controllability of processes
The "controllability" of a process is depends upon the gain which can be used.
The subordinate lag D is based on the deadtime and all other lags.
The maximum gain which can be used depends upon the ratio .
• Decreasing the dead time increases the maximum gain and the controllability.
• Increasing the ratio of the longest to the second longest lag also increases the
controllability.
Flow loops
Flow loops are too fast to use the standard methods of analysis and tuning.
Some flow loops using analog controllers are tuned with high gain.
This will not work with digital control.
With an analog controller, the flow loop has a predominate lag (L) of a few seconds
and no subordinate lag.
With a digital controller, the scan rate of the controller can be considered dead time.
Although this dead time is small, it is large enough when compared to L to force a
low gain.
Reset=15 to 20 repeats/min..