PID

The PID controller compares a measured value from a process with a reference setpoint value. The difference (or error signal) is then used to calculate a new value for an input that can be manipulated to the process that brings the measured value of the process back to its desired setpoint. Unlike simpler control algorithms, the PID controller can adjust process outputs based on the history and rate of change of the error signal, which gives more accurate and stable control.

In a PID loop, correction is calculated from the error in three ways:

Err = Sensor - Set Point

Kp = 100/Proportional Band

Ti = Integral Time (seconds)

Td = Derivative Time (sec)

Bias = proportional offset (%)

Output (%) = bias + Kp*Err + Kp/Ti integral.gif (1765 bytes)      + Kp*Td*dErr/dt

Logic Inputs

Input Name Input Value Logic Value Description
disable unconnected 0 PID function runs.
  VAL != 0.0 1 PID function is disabled. Output set to zero.
  0 0 PID function runs.
  invalid 0 PID function runs.

Analog Inputs

Range
Input Name Low High Input Value Description
sensor >=- infinity <+ infinity unconnected PID function disabled.
Output set to 0.
invalid
setPt >=- infinity <+ infinity unconnected PID function disabled.
Output set to 0.
invalid Same as unconnected.
tr 0< <+ infinity unconnected PID function disabled.
Output set to 0.
invalid Same as unconnected.
0 PID function disabled.
Output set to 0
VAL < low val = low
intgTime 0 <+ infinity unconnected PID function disabled.
Output set to 0.
(sec) invalid Disable Integral Action.
0 Disable Integral Action.
VAL < low IT = low
dervTime 0 <+ infinity unconnected Disable Derivative action.
invalid Disable Derivative action.
0 Disable Derivative action.
VAL < low DT = low
deadBand 0 < tr unconnected same as 0 input
invalid same as 0 input
VAL < low or VAL >= tr DB = 0
0 disable Dead Band action
dbDelay 0 65565 dead band delay
unconnected same as 0 input
invalid same as 0 input
0 dead ban action enabled without delay
VAL < low DeadBandDelay = low

Output

Output Name Range Description
OUTPUT -200 to +200 % Output (%) = bias + Kp*Err + Kp/Ti integral.gif (1765 bytes)+ Kp*Td*dErr/dt

Setpoints

Name Range Description
Action
  • 0 = Direct acting
  • 1 = reverse acting

For Spyder Relay model only:

  • 2 = sign of TR.

Under this setting:

  • if throttling range < 0, reverse action
  • if throttling range >= 0, direct action
user specified inputs
bias 0 to 100% user specified inputs

Configuration

  1. Specify revAct
  1. Specify the bias: 0 to 100%.

When Disable/Initialize input is TRUE, The Output and the integral are set to 0 and the block stops running. If Direct/Reverse is set to reverse, then Err term is set to -Err.

When Err < Dead band, Err is set to zero until Dead band Delay time has elapsed and Err is still in the dead band.

To prevent integral wind up, the integral portion of the total error output is limited to 100%.

From iteration to iteration, the Function Block keeps track of the old proportional error, integral error, and dead band timer. On power up/reset these are cleared.