PID ALGORITHMS and TUNING METHODS
PID ALGORITHMS and TUNING METHODS
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
The system measures the process, compares it to a setpoint, and then
manipulates the output in the direction which should move the process toward
the setpoint.
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
Low gain when valve is nearly closed
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.
• Regardless of the way the valve operates, the operator is interested in the
knowing and adjusting the position of the valve, not the value of the signal.
"Up is always open"
• All controllers have some means of indicating the controller output in
terms of the valve position. When the operator increases the output as
indicated on the controller, the valve opens.
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
Transportation Lag
Most loop combine dead time and 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.
Chapter 3
The PID algorithm
Action
PROCESS ACTION
CONTROLLER ACTION
Auto/Manual
Manual Mode:
Automatic Mode:
The control algorithm manipulates the output to hold the process measurements at their
setpoints.
This should be the most common mode for normal operation.
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 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, Integral, and Derivative
Proportional and Derivative
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
Proportional band is the % change in the input which would result in a 100% change in
the output.
(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.
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.
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)
Chapter 4
Additional PID Concepts
Non-Interactive (Parallel):
Out = G(e + R+ D)
Interactive (series):
Gn = Gi (1 + Ri Di)
Rn = Ri/(1 + Ri Di)
Dn = Di/(1 + Ri Di)
External feedback
The integral function implemented using a positive 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.