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:
- Cancel out the current error directly (Proportional)
- The amount of time the error has continued uncorrected (Integral)
- Anticipate the future error from the rate of change of the error over time (Derivative)
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
+ 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 +
Kp*Td*dErr/dt |
Setpoints
| Name | Range | Description |
| Action |
For Spyder Relay model only:
Under this setting:
|
user specified inputs |
| bias | 0 to 100% | user specified inputs |
Configuration
- 0 = Direct acting
- 1 = reverse acting
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.