The Pid functional block compares a process's measured value to a reference setpoint value. The difference (or error signal) is then used to calculate a new value for a manipulatable process input that returns the measured value to the desired set point. The Pid functional block, unlike simpler control algorithms, can adjust the process outputs based on the error signal's history and rate of change, resulting in more accurate and stable control.
Figure 1: Pid Function Block |
Figure 2: Pid Property Sheet |
Each change of operation resets the integral part. If error < deadband, PID is calculated after the Deadband Delay is expired. After a change from Manual to Auto, Out starts with last manual value.
To deactivate the proportional part (100/Xp*Err), the Proportional Band Xp is set to 0; however, the integral part is still calculated with an internal Proportional Band with Xp=1.
Figure 3: Pid Logic Diagram
In a PID loop, correction is calculated from the error in three ways:
Examples:
Inputs
Input Name |
Description |
Stop |
Used to enable or disable the PID calculation. Bool: 0:PID enabled, 1: Out=0 %, "null"=PID enabled |
Controlled Value |
It represents the actual measured value. |
Setpoint |
It is 32-Bit floating set point. It represents the setpoint controlled by the PID algorithm. |
Operation (In & Par) |
This is Enum point. There are three operations: Direct: 0 = Direct (Clg - 0-200%). Proportional Band = 0 > Out = 0%. Reverse: 1= Reverse (Htg - 0-200%). Proportional Band = 0 > Out = 0%. DependingOnSign: 2 = Depending on sign of Throttling Range. If throttling range < 0, it is reverse action. If throttling range >= 0, it is direct action. |
Proportional Band (In & Par) |
It cancels out the current error directly. |
Integral Time (In & Par) |
The amount of time the error has continued uncorrected. The Integral Time is limited to 0 (100 -Bias -100/Xp * Err). If Xp==0 -> Then use Xp=1 for the integral part. |
Derivative Time (In & Par) |
It anticipates the future error from the rate of change of the error over time. |
Deadband (In & Par) |
Deadband is the absolute value that error must be greater than before the output will change. |
Deadband Delay (In & Par) |
If the deadband is activated and the deadband timer has expired, a new PID calculation is performed. The Deadband Timer is restarted. It ensures that even small control deviations are softly compensated without oscillation. |
Table 1: Inputs of Pid Function
Outputs
Output Name |
Description |
Out |
Output (%) = Bias+ 100/Xp * Err+ 100/(Xp*Tn) * Integral(Err)*dt+ 100/Xp* Td*dErr/dt |
Table 2: Outputs of Pid Function
Parameters
Parameter Name |
Description |
Operation Par (In & Par) |
This is Enum point. There are three operations: Direct: 0 = Direct (Clg - 0-200%). Proportional Band = 0 > Out = 0%. Reverse: 1= Reverse (Htg - 0-200%). Proportional Band = 0 > Out = 0%. DependingOnSign: 2 = Depending on sign of Throttling Range. If throttling range < 0, it is reverse action. if throttling range >= 0, it is direct action. |
Proportional Band Par (In & Par) |
If Proportional Band is "null", Proportional Band Par is used as parameter. |
Integral Time Par (In & Par) |
If Integral Time is "null", Integral Time Par is used as parameter. |
Derivative Time par (In & Par) |
If Derivative Time is "null", Derivative Time Par is used as parameter. |
Deadband Par |
If Deadband is "null", Deadband Par is used as parameter. |
Deadband Delay Par (In & Par) |
If Deadband Delay is "null", Deadband Delay Par is used as parameter. |
Bias |
Defines the amount added to the output for pure P-Control. |
Out Save |
Master Sync Enabled : If you set it to "true" the last output will be set as output for one cycle after the controller restarts. The application can use it to return to the same state before the controller restart. Out: To enable or disable the Out feature. |
Table 3: Parameters of Pid Function
Examples
1. Application with PI with Direct and Reverse operations:
|
|
Figure 4: Application with PI with Direct and Reverse operations
2. Application with P with Direct and Reverse operations:
|
|
Figure 5: Application with P with Direct and Reverse operations
Refer to General Description for general information about IRMN4 Function Blocks.