PID (PV and SP)
Function Code 19
This function provides proportional, integral and derivative
P ID action on an error signal developed from the process variable
S2 (1 9 )
S1
SP
N (PV) and set point (SP) inputs. The block has four inputs and
PV
S3
TR
one output. Besides the PV and the SP inputs, there are track
S4
TS reference and track switch input signals. If the track switch
<S4> is a zero, the output will follow the track reference signal
<S3>. This provides smooth control transfers from manual to
automatic mode. The parameters for the function block
include an overall gain multiplier (S5), a proportional constant
(S6), an integral constant (S7) and a derivative gain constant
(S8).
Outputs
Blk Type Description
N R Output is PID signal in engineering units (EU)
Specifications
Spec Tune Default Type Range Description
S1 N 5 I Note 1 Block address of process variable input
S2 N 5 I Note 1 Block address of set point
S3 N 5 I Note 1 Block address of track reference signal
S4 N 1 I Note 1 Block address of track switch signal:
0 = track
1 = release
S5 Y 1.000 R Full (K) gain multiplier
S6 Y 1.000 R Full (KP) proportional constant
S7 Y 0.000 R 0 - 9.2 E18 (KI) integral constant (1/min)
S8 Y 0.000 R Full (KD) derivative constant (min)
S9 Y 105.000 R Full High output limit
S10 Y -5.000 R Full Low output limit
S11 Y 0 B 0 or 1 Set point change:
0 = normal
1 = integral only (KI ≠ 0)
WBPEEUI210504C0 19 - 1
Specifications (continued)
Spec Tune Default Type Range Description
S12 Y 0 B 0 or 1 Controller action on error:
0 = reverse acting on error
1 = direct acting on error
NOTES:
1. Maximum values are: 9,998 for the BRC-100, IMMFP11/12
31,998 for the HAC
Explanation
This function supports two modes: direct and reverse. The
function is in the direct mode when S12 is a logic 1 and in the
reverse mode when S12 is a logic 0.
Direct Mode The set point <S2> subtracts from the process variable input
(S4 = 1 and S12 = 1) <S1>.
Reverse Mode The process variable input <S1> is subtracted from the set
(S4 = 1 and S12 = 0) point <S2>.
Refer to Figure 19-1 for an illustration of the PID algorithm for
function code 19.
S5 The purpose of the gain multiplier (S5) is to convert or scale
the output. Typically it is used to convert the output to percent
for input to a station or output to a field device. Figure 19-2
shows an example.
To calculate S5 in engineering units, use the equation:
DESIRED SPAN-
S5 = ----------------------------------------------
CURRENT SPAN
To calculate S5 in percent, use the equation:
100
S5 = ----------------------------------------------------------------
( 〈 S1〉 max ) – ( 〈 S1〉 min )
For example, with the function in the direct mode, the range of
the process variable signal is zero to 200 cubic feet per second
and the maximum control output is 100 percent.
19 - 2 WBPEEUI210504C0
The gain multiplier (S5) is determined as follows:
100
S5 = ----------------------
( 200 – 0 )
S5 = 0.5
Controller Start-Up PIDOutput = <S3>
(Block 10 – start-up in
progress = 1)
Manual Mode PIDOutput = <S3>
(S4 = 0)
High and Low Output Specifications S9 and S10 set the limits of the output block
Limits (S9 and S10) value (N). The default values of S9 and S10 provide an output
range of -5.000 to +105.000. When a negative output is antici-
pated, the low output limit (S10) must be adjusted in a nega-
tive direction to encompass the limits of the output signal
range.
Set Point Change (S11) Set point modifier. This specification defines the action taken
on a set point change. A normal setting results in a jump in
the control output due to the proportional contribution created
by a set point change. When set to integral only on set point
change, the proportional and derivative contributions of the
error are not applied with set point changes. This action elimi-
nates the jump in the control output and results in an integral
only action on a change in set point.
0 = normal
1 = integral only on set point change
Examples
Figure 19-1 illustrates the PID algorithm for function code 19.
Figure 19-2 shows how the PID block is typically used with a
station in a control loop.
Notes for Figure 19-1
Note 1 - Bias The bias term is either equal to the value of the combined pro-
portional plus integral term calculated when Ki was last set to
a value greater than zero (normal reset), or it is equal to the
value of the track reference (external reset or tracking).
WBPEEUI210504C0 19 - 3
SP –SP
REVERSE D IR E C T
P R O P O RT IO N A L
P LU S B IA S
(S E E N OT E 1)
D IR E C T +
PV + +
Σ ERROR
K *K P
P R O P O R T IO N A L O N LY
Σ
–PV REVERSE
OUTPUT
+
(S E E N O TE 3)
T R AC K
REFERENCE T R AC K
P R O P O R T IO N A L R E LE A S E
P LU S IN T E G R A L
(W H E N K I > 0) (S E E
B IA S N OT E 3)
(W H E N K I ≤ 0)
(S E E N OT E 3) (S E E N O T E 1) KI ≤ 0
K *K I * ∆t +
IN T E G R A L
O N LY O N 60 KI > 0
Σ
EXTERNAL RESET
S E T P O IN T (S E E N O TE 2) +
CHANGE OR
T R AC K IS E N A B LE D
+
NORMAL KI ≤ 0 IN TE R N A L
+ IN T E G R A L -1
ERROR
C A LC U LAT IO N Σ Σ +
Z
KI > 0
+
NORMAL RESET
K *K P (S E E N O TE 2 )
D E LTA 60*K *K A *K D
ERROR 60*K *K D + K A * ∆t
+ (S E E N OT E 3)
+
ERROR
Σ Σ D E R IVAT IV E
– +
-1 6 0*K *K D -1
Z 60*K *K D + K A * ∆t
Z
T 0 1 62 2 A
Figure 19-1. PID (PV and SP)
Note 2 - Normal Reset, When Ki is less than zero (proportional plus integral), the inter-
Auto Select Reset and nal value of the integral term is determined based on the PID
External Reset reset mode specified in S5 of function code 82.
When S5 equals zero (normal reset), the PID calculates the
value of the internal integral by summing the proportional
term with the previous value of the internal integral.
When S5 equals two (external reset), the PID sets the value of
the internal integral to the value of the current track reference.
When S5 equals one (auto selected external reset), the PID sets
the value of the internal integral to the value of the current
track reference only if the value of the PID output from the
previous execution period does not match the current track
19 - 4 WBPEEUI210504C0
M/A
MFC/P
(80) CONTROL
S1 SP
PV OUTPUT
PID S2 32
SP O
PROCESS (19) 31
S2 S3 A
VARIABLE SP A
S1 30 S4 33
PV TR C/R
S3 S5 35
TR TS C
S4 S18 34
TS MI C-F
S19 36
AX
S5 = 1.0 S20 C/R
S6 = 1.0 S21
S7 = 2.0 LX
S8 = 0.0 S22 CX
S9 = 105.0 S24 HAA
S10 = -5.0 S25
S11 = 0 LAA
S12 = 0 S26 Had
S27 LDA
S28 AO
S29 TRS2
S1 (33) S30 T
NOT 37
TRPV
S6 = 5
S7 = 90.0
S8 = 10.0
S9 = 5.0
S10 = 100.0
S11 = 0.0
S12 = 0
S13 = -5.0
S14 = 0.0
S15 = 0
S16 = 255
S17 = 0
S23 = 0
S31 = 60.0
T01623A
Figure 19-2. PID Control with Deviation
reference value. Otherwise, the PID calculates the internal
integral value as if it were set for normal reset. The auto select
external reset mode only applies when Ki is less than zero.
When Ki is greater than zero (proportional only), the auto
selection is disabled.
Note 3 - Range Limiting The track reference, the proportional plus integral term, and
the output are all range limited based on the high and low lim-
its specified in S9 and S10 respectively. The high and low
range limits for the derivative term are:
Derivative high limit = output high limit – output low limit
Derivative low limit = output low limit – output high limit
WBPEEUI210504C0 19 - 5
WBPEEUI210504C0