ag09_pid deadband implementation.pdf
DESCRIPTION
PID DeadbandTRANSCRIPT
APPLICATIONGUIDELINE#9PID Deadband Implementation
TAI #9: PID Deadband Implementation Page 1 of 13
R.2.3Printing:08/06/2012Controlstrategiesdepictedinthisdocumentarepublicdomain.However,allexplanationsandtextareconsideredproprietarytoTEGEnergyGroup,Inc.andmaynotbedistributedwithoutthewrittenconsentofTEGEnergyGroup,Inc.
Abstract
A PID deadband function can be useful in process controls to improve tuning characteristics and eliminate
unnecessary output adjustments when the process is near setpoint. Unfortunately, digital implementation of a PID
deadband can lead to erratic and destabilizing results. It is therefore necessary to understand the behavior of this
feature and the type of problems that can result from its use. The purpose of this document is to explain the
deadband feature embedded in a PID controller and to discuss important considerations in its implementation.
Deadband General Description
A deadband is defined as a region around the setpoint where the error is modified before PID gains are applied.
The deadband feature in a PID controller reduces the error value between the process variable (PV) and the
setpoint (SP) when it is located within the deadband region. This feature introduces the possibility of multiple
tuning strategies – a more aggressive approach when the error between the setpoint and the process variable is
large, and a less aggressive approach when the error is small. One of the major benefits of the deadband feature is
to prevent the final drive element from ‘hunting’ around the setpoint by forcing a steady state output when the
process is within the deadband.
When the error value between the process variable and the setpoint is located outside of the deadband region,
the PID gains are applied to the raw error signal. When the error is located within the deadband region, a
deadband gain is applied to the error before the PID gains are applied. The deadband error gain can be adjusted to
range from 0 to 1, effectively reducing the error value to the PID controller. It should be noted that the derivative
component of PID control is disabled while operating within the deadband.
Proprie
tary P
ropert
y of T
EG Ene
rgy G
roup,
Inc.
APPLICATIONGUIDELINE#9PID Deadband Implementation
TAI #9: PID Deadband Implementation Page 2 of 13
R.2.3Printing:08/06/2012Controlstrategiesdepictedinthisdocumentarepublicdomain.However,allexplanationsandtextareconsideredproprietarytoTEGEnergyGroup,Inc.andmaynotbedistributedwithoutthewrittenconsentofTEGEnergyGroup,Inc.
If the error is in the deadband,
Error to PID controller = raw error x deadband error gain
Else,
Error to PID controller = raw error
PV
SP
∆ Deadband
gain
P
I
-
+
RawError
AdjustedError
0 < DB gain < 1
PV
SP
∆ -
+
P
I
D
RawError
Proprie
tary P
ropert
y of T
EG Ene
rgy G
roup,
Inc.
APPLICATIONGUIDELINE#9PID Deadband Implementation
TAI #9: PID Deadband Implementation Page 3 of 13
R.2.3Printing:08/06/2012Controlstrategiesdepictedinthisdocumentarepublicdomain.However,allexplanationsandtextareconsideredproprietarytoTEGEnergyGroup,Inc.andmaynotbedistributedwithoutthewrittenconsentofTEGEnergyGroup,Inc.
Example
Figure 1 shows an example of a deadband application with the following parameters
Deadband limits = -10% and 10%
Deadband Error Gain = 0
Figure 1
Whenever the process variable is located outside the deadband (blue) the PID controller behaves normally.
However, when it is located within the deadband (red), the deadband error gain is applied to the actual error. In
this example, the deadband gain is set at zero, which effectively eliminates the error while the PV is within the
deadband region. In the plot, the PV begins outside of the deadband and the PID controller reacts normally
according to its tuning parameters of proportional gain, integral time, and derivative rate. When the PV enters the
deadband, the error between the PV and the SP is multiplied by the deadband gain of zero. This causes the output
to remain constant while the PV is located in the deadband. Once the PV leaves the deadband, the PID controller
resumes normal response to the raw error.
0
10
20
30
40
50
60
70
80
90
100
Percent (%
)
Normal Deadband Action
Process Variable
Deadband Limit
Set Point
Output
Blue region: Outside of deadbandError = 60 - 40 = 20%
Red region: Inside of deadbandActual error = 60 - 55 = 5%Effective error = 5 x 0 = 0%
Out of deadband, normal output response
Enters deadband, output holds
Output resumes reacting to changes
Reenters deadband, output holds
Leaves deadband, output decreases to react to increased error
Proprie
tary P
ropert
y of T
EG Ene
rgy G
roup,
Inc.
APPLICATIONGUIDELINE#9PID Deadband Implementation
TAI #9: PID Deadband Implementation Page 4 of 13
R.2.3Printing:08/06/2012Controlstrategiesdepictedinthisdocumentarepublicdomain.However,allexplanationsandtextareconsideredproprietarytoTEGEnergyGroup,Inc.andmaynotbedistributedwithoutthewrittenconsentofTEGEnergyGroup,Inc.
Deadband Transitions
When the process variable enters or exits the deadband, several changes in the PID controller must occur. Before
entering the deadband, the output of the PID controller is composed of proportional, integral, and derivative
components (Figure 2a). The transition into the deadband region will cause the error perceived by the controller to
be considerably reduced since the actual error is now being multiplied by the deadband gain, which in this
example is zero. Such a reduction in the effective error value will cause an abrupt, immediate reduction in the
proportional response of the PID controller (Figure 2b). In order to compensate for this abrupt change, and to
smooth transitions, the PID controller does not output the response of Figure 2b, but instead performs a hold and
track operation. During this transition cycle, the output of the PID controller is held at its previous value. The
integral term is then recalculated to reflect the total output of the PID controller (Figure 2c). After this transition
cycle, the PID controller continues to act normally according to the effective error, which is now modified by the
deadband gain. Since this operation is performed by a digital processor, the PID controller requires two scan cycles
to correctly perform the hold and track steps displayed below.1 Large process jumps and rapid transitions into and
out of the deadband can cause problems with this procedure. These problems will be discussed in the sections to
follow.
(a) Not in deadband (b) Enters deadband, deadband gain
applied to error, loss of proportional
contribution to output
(c) Integral resets to
compensate
Figure 2
Considerations – Process Variable Jump
Transitions into or out of the deadband put the PID controller in a special hold and track state while the integral
term is recalculated. One side effect of this transition state is that the first PV move out of the deadband does not
provoke a proportional output response, as would normally occur. Upon a transition out of the deadband, the PID
controller maintains its output at the previous value. By keeping the output constant during the transition cycle,
the PID controller effectively ignores the proportional change of this first step and only reacts to the subsequent
proportional changes in the error. Normally, when process variable movement is relatively smooth, a small
1 For more information on scan cycles and considerations when using digital circuits, see Application Guideline #8.
Proprie
tary P
ropert
y of T
EG Ene
rgy G
roup,
Inc.
APPLICATIONGUIDELINE#9PID Deadband Implementation
TAI #9: PID Deadband Implementation Page 5 of 13
R.2.3Printing:08/06/2012Controlstrategiesdepictedinthisdocumentarepublicdomain.However,allexplanationsandtextareconsideredproprietarytoTEGEnergyGroup,Inc.andmaynotbedistributedwithoutthewrittenconsentofTEGEnergyGroup,Inc.
transition out of the deadband does not warrant a significant proportional response; however, with a large jump in
the PV, the lack of a proportional response to that initial jump leads to an undesired lag in the response of the PID
controller output. Figure 3a shows the effects with a deadband implemented, while Figure 3b does not have a
deadband. With the deadband, the process variable (red) initially resides within the deadband and the output
(green) remains constant. When the process variable jumps to 70%, the output stays at its previous value while the
integral term is reset. From there on, the output gradually decreases, mostly due to the integral response of the
PID controller. The lack of proportional response to the PV jump significantly delays the reaction of the output
compared to the result without a deadband.
(a) Reverse-acting PID controller with deadband (b) Reverse-acting PID controller without deadband
Figure 3
0
10
20
30
40
50
60
70
80
Percent (%
)
Time0
10
20
30
40
50
60
70
80
Percent (%
)
Time
Proprie
tary P
ropert
y of T
EG Ene
rgy G
roup,
Inc.
APPLICATIONGUIDELINE#9PID Deadband Implementation
TAI #9: PID Deadband Implementation Page 6 of 13
R.2.3Printing:08/06/2012Controlstrategiesdepictedinthisdocumentarepublicdomain.However,allexplanationsandtextareconsideredproprietarytoTEGEnergyGroup,Inc.andmaynotbedistributedwithoutthewrittenconsentofTEGEnergyGroup,Inc.
Figure 4: Reverse-acting PID controller
The Noise Problem
If the process variable is close to the deadband limit, a jump in the PV due to a noisy signal can cause multiple
transitions into and out of the deadband in a short time period. Figure 4 shows an example of this situation. The
process variable starts near 40% and enters the deadband region as it approaches setpoint. Noise then causes the
process variable to exit and reenter the deadband multiple times until it finally remains in the deadband for good.
During these rapid successive transitions into and out of the deadband, the output performs three large,
destabilizing upward jumps.
This noise-induced problem comes from the relationship between scan rate of the PID controller and noise
frequency. With little noise, the scan rate is usually fast enough to complete the hold and track calculation before
the PV crosses the deadband limit again. However, with high-frequency noise, it becomes possible for the PV to
enter the deadband during one scan cycle, and jump out the next. The process variable is therefore not able to
establish itself in the deadband zone, which interferes with the hold and track operation. The inability of the PID
controller to complete this operation by the second crossing of the deadband limit leads to an undesired output
jump. To avoid this jump, the following condition must be met
scanrate 2 noisefrequency
Figure 5 meets this condition. The PV begins in the deadband region, and then exits. Since the PV stays outside of
the deadband for two scan cycles before reentering, the output does not jump as it did in Figure 4. The track and
hold function is given enough time to execute, and it performs a seamless transition.
10
20
30
40
50
60
Percent (%
)
Time
Deadband with Noise
Set Point
Process VariableOutput
Deadband Limit
Proprie
tary P
ropert
y of T
EG Ene
rgy G
roup,
Inc.
APPLICATIONGUIDELINE#9PID Deadband Implementation
TAI #9: PID Deadband Implementation Page 7 of 13
R.2.3Printing:08/06/2012Controlstrategiesdepictedinthisdocumentarepublicdomain.However,allexplanationsandtextareconsideredproprietarytoTEGEnergyGroup,Inc.andmaynotbedistributedwithoutthewrittenconsentofTEGEnergyGroup,Inc.
Figure 5
Figure 6 illustrates how the hold and track operation performed during transitions into and out of the deadband
can cause large output jumps. In the first scan cycle (Figure 6a) the process variable is located outside the
deadband and the PID controller operates normally. When the process variable first enters the deadband (Figure
6b) the PID controller reacts by maintaining the output and resetting the integral portion to compensate for the
loss of proportional contribution. After that (Figure 6c), the process variable leaves the deadband. Since the PV
was not fully established within the deadband, the PID controller fails to re-perform the hold and track operation
as it had done in the previous step. Instead, it acts normally on the new error, which is much larger than the zero
error it had while in the deadband. This sudden proportional increase is added to the output, causing a significant
jump.
(a) (b) (c)
Figure 6
10
20
30
40
50
60
70
Percent (%
)
Time
Smooth Deadband Transition
Set Point
Process Variable
Output
Deadband Limit
Proprie
tary P
ropert
y of T
EG Ene
rgy G
roup,
Inc.
APPLICATIONGUIDELINE#9PID Deadband Implementation
TAI #9: PID Deadband Implementation Page 8 of 13
R.2.3Printing:08/06/2012Controlstrategiesdepictedinthisdocumentarepublicdomain.However,allexplanationsandtextareconsideredproprietarytoTEGEnergyGroup,Inc.andmaynotbedistributedwithoutthewrittenconsentofTEGEnergyGroup,Inc.
Observable results
The effects of the previously described overcompensation are illustrated in Figure 7. The four possible scenarios
and their corresponding output reactions are depicted. The process variable is in red, the output in green, and the
deadband is the dashed black line. As shown, the output is steady during the first PV jump into or out of the
deadband. The problem of the output jump occurs when the PV returns to its original region at the next scan cycle.
This output jump depends on the direction of the PV change. The graphs in the left column show upward spikes in
the PV, causing the output to increase. The graphs in the right column show downward spikes in the PV, causing
the output to decrease.
Proprie
tary P
ropert
y of T
EG Ene
rgy G
roup,
Inc.
APPLICATIONGUIDELINE#9PID Deadband Implementation
TAI #9: PID Deadband Implementation Page 9 of 13
R.2.3Printing:08/06/2012Controlstrategiesdepictedinthisdocumentarepublicdomain.However,allexplanationsandtextareconsideredproprietarytoTEGEnergyGroup,Inc.andmaynotbedistributedwithoutthewrittenconsentofTEGEnergyGroup,Inc.
Various Process Variable Jumps and Output Responses
Figure 7
A fast PID controller scan rate causes output jumps to compound upon one another as a result of high frequency
noise. Figure 4 is an example of this phenomenon, and is presented again below in Figure 8. The PID controller that
is used has the following tuning parameters
Deadband limits at -5% and 5%
Deadband error gain = 0
Proportional gain = 1
Time Time
Time Time
Proprie
tary P
ropert
y of T
EG Ene
rgy G
roup,
Inc.
APPLICATIONGUIDELINE#9PID Deadband Implementation
TAI #9: PID Deadband Implementation Page 10 of 13
R.2.3Printing:08/06/2012Controlstrategiesdepictedinthisdocumentarepublicdomain.However,allexplanationsandtextareconsideredproprietarytoTEGEnergyGroup,Inc.andmaynotbedistributedwithoutthewrittenconsentofTEGEnergyGroup,Inc.
Figure 8
In this example, the process variable approaches setpoint, but noise causes it to enter and exit the deadband
region several times before settling. Each time the PV exits the deadband, the output jumps. This output jump is
proportional to the difference between the error value within the deadband and the error value outside of the
deadband. It is also related to the proportional gain of the PID controller. Since the deadband gain is zero in this
example, the error in the deadband is also zero. Upon the first jump back out of the deadband, the PV obtains the
value of 43%, an error of 7% that causes an output jump of 7% due to the proportional gain of 1. If the
proportional gain were 2 instead, the output jump would be 7×2 = 14%.
With this knowledge, it is possible to make several generalizations about the behavior of these output jumps. As
previously stated, the magnitude of the output jump is directly related to the proportional gain. The size of the
deadband limit also affects the size of output jumps. A large deadband limit would result in a large difference
between the error inside and the error outside the deadband, which would cause large output jumps. In addition,
the deadband gain also has an effect. If the gain is closer to 1, the output jump is less prominent since the change
in error upon transitions is smaller.
Proposed solution
To avoid these potential output jumps associated with scan time, it is necessary to have the process variable hold
its value upon transitions into and out of the deadband zone. This establishes the PV either inside or outside the
deadband over two successive scan cycles, allowing time for the hold and track operation of the PID controller to
execute.
A transport delay of two scan cycles can be used to temporarily hold the process variable. A digital circuit that
detects when the PV crosses the deadband limit can also be implemented so that the transport delay on the PV is
only activated during transitions into and out of the deadband region. The solution depicted in Figure 9 ensures
two successive scan cycles upon transition across the deadband without unnecessarily delaying the PV signal.
10
20
30
40
50
60
Percent (%
)
Time
Multiple PV jumps
Set Point
Process VariableOutput
Deadband Limit
Proprie
tary P
ropert
y of T
EG Ene
rgy G
roup,
Inc.
APPLICATIONGUIDELINE#9PID Deadband Implementation
TAI #9: PID Deadband Implementation Page 11 of 13
R.2.3Printing:08/06/2012Controlstrategiesdepictedinthisdocumentarepublicdomain.However,allexplanationsandtextareconsideredproprietarytoTEGEnergyGroup,Inc.andmaynotbedistributedwithoutthewrittenconsentofTEGEnergyGroup,Inc.
Figure 9: Transport delay logic circuit
∆
TransportDelay
H//L
H//L
OR
AND
NOT
AND
TY
N
TransportDelay
PVSP
PID
M/AStation
F(x)
-+
SP
PV
Final DriveElement
DeadbandLimit
DeadbandLimit
1 Scan Cycle
2 Scan Cycles
Proprie
tary P
ropert
y of T
EG Ene
rgy G
roup,
Inc.
APPLICATIONGUIDELINE#9PID Deadband Implementation
TAI #9: PID Deadband Implementation Page 12 of 13
R.2.3Printing:08/06/2012Controlstrategiesdepictedinthisdocumentarepublicdomain.However,allexplanationsandtextareconsideredproprietarytoTEGEnergyGroup,Inc.andmaynotbedistributedwithoutthewrittenconsentofTEGEnergyGroup,Inc.
Conclusion
Due to possible noise-induced output jumps caused by transitions into and out of the deadband region, caution
should be taken when using the deadband function. The deadband in a PID controller works well when the process
variable signal is clean, but can cause undesired output jumps when the signal is noisy and erratic. Using a
smoothing algorithm or a lag function can reduce noise, but will introduce undesired delays in the process without
ensuring protection from erratic jumps. The logic strategy proposed in this document is a possible solution to
prevent destabilizing output jumps from the deadband implementation. With this strategy, the deadband can be a
very powerful tool to reduce or eliminate valve adjustments when the process variable is close to set point.
Proprie
tary P
ropert
y of T
EG Ene
rgy G
roup,
Inc.
APPLICATIONGUIDELINE#9PID Deadband Implementation
TAI #9: PID Deadband Implementation Page 13 of 13
R.2.3Printing:08/06/2012Controlstrategiesdepictedinthisdocumentarepublicdomain.However,allexplanationsandtextareconsideredproprietarytoTEGEnergyGroup,Inc.andmaynotbedistributedwithoutthewrittenconsentofTEGEnergyGroup,Inc.
Appendix
Figure 10 depicts the entire logic circuit for a deadband simulation.
∆
PID
M/AStation
TransportDelay
LAG
A
A
∑
∆
TransportDelay
H//L
H//L
OR
AND
NOT
AND
TY
N
TransportDelay
PV
One Shot
NOT
OnDelay
TY
N
AI
SP
+ -
1 Scan Cycle
2 Scan Cycles
DeadbandLimit
DeadbandLimit
Noise Generator
Figure 10
Proprie
tary P
ropert
y of T
EG Ene
rgy G
roup,
Inc.