Description
This is a PID (proportional, integral, derivative) loop control function block.
It calculates the deviation between the collected data and the setpoint and feeds it back as a control result to calculate a new output value. In doing so, the system data stabilizes near the setpoint. Mathematically, it proves that, in the event of stabilization errors or process iterations caused by other control methods, the PID feedback loop can effectively maintain system stability.
Function
The function block can be used in heating, ventilation, and air conditioning (HVAC) applications to control variables such as temperature, pressure, flow, and speed. Three algorithms adjust the controlled value.
- Proportional: Control using the current value. It multiplies the proportional gain (Kp) by the deviation between the setpoint and the current input. Then, it uses the product to calculate the output of the block. The output is proportional to the deviation. For instance, if a heat controller's proportional band range is 10...20 °C and the setpoint is 20 °C, the controller outputs100 % at 10 °C, 50 % at 15 °C, 10 % at 19 °C, and 0 % at 20 °C.
- Integral: Control using a value over a period. It multiplies the integral gain (Ki) by the deviation between the setpoint and the constant input value over a period. Then, it uses the product to calculate the block's output. The output is proportional to the deviation. The constant determines the control effect. The smaller the constant, the stronger the control. The greater the constant, the weaker the control.
- Derivative: The first derivative of the error is calculated by considering the future error, which is then multiplied by the derivative gain (Kd). Derivative control reacts to changes in the system. The greater the derivative control, the faster the control system reacts.
The PID control block incorporates the three aforementioned control methods. Proportional control provides a fast and timely response. Integration control takes time accumulation into account to eliminate deviations and achieve an ideal control process. Derivative control can foresee the future trend of deviation to produce an advanced control effect and improve the system's dynamic performance. However, derivative control cannot be used alone and must be combined with the other two controls (P and I) to form a PD or PID controller. The PID control schematic is as follows:
Input
PIN | Description | |||
|---|---|---|---|---|
Enable | Enables or disables PID control. | |||
Direct Proportion | Defines the control direction:
| |||
Xctr---P | Yctr | |||
Direct proportion | < 0 | 0 % | ||
≥ 0 | 0...100 % | |||
Inverse proportion | > 0 | 0 % | ||
≤ 0 | 0...100 % | |||
Input | Control inputs, normally the measured values obtained by sensors in the system, such as temperature and water level. | |||
Setpoint | The set reference value. The input value can be reached or maintained at the reference value via PID control. | |||
Dead Zone | If the deviation is less than half of the dead zone value [Sp] - [Xctr] < [Nz]/2, the control output value remains unchanged for seven program cycles. It changes only when the deviation exceeds the zone. | |||
Scale Factor | Kp must be greater than 0. Set Kp to adjust the gain effect of the ratio. The larger the value, the greater the gain effect. If the scale factor is set to 0.1, the output is 1/10 of the deviation. If it is set to 100, the output is 100 times the deviation. | |||
Integral Time(s) | Integral control constant. The larger the value, the weaker the integral control. The smaller the value, the stronger the integral control. The integral control does not work for a value of zero. | |||
Differential Time(s) | Derivative control constant. The larger the value, the stronger the derivative control. The smaller the value, the weaker the derivative control. The derivative control does not work for a value of zero. | |||
Min output Max output | The minimum and maximum values of the output. | |||
Output
PIN | Description |
|---|---|
PID output | PID control output. It is a numeric value between 0 and 100. A value of 0 indicates that the system output is off, while a value of 100 indicates that the system output is at maximum. |
Input value
PIN | Data type | Unit | Default value | Range |
|---|---|---|---|---|
Enable | Digital | N/A | N/A | True, false |
Direct Proportion | Digital | N/A | N/A | True, false |
Input | Analog | N/A | N/A | 0...65535 |
Setpoint | Analog | N/A | N/A | |
Dead Zone | Analog | N/A | N/A | |
Scale Factor | Analog | N/A | 10 | |
Integral Time(s) | Analog | Second | 128 | |
Differential Time(s) | Analog | Second | 0 | |
Min output | Analog | % | 0 | 0...100 |
Max output | Analog | % | 100 |
Output value
PIN | Data type | Unit | Default value | Range |
|---|---|---|---|---|
PID output | Analog | % | N/A | 0...100 |
Example 1 Cooling valve control process (direct proportional control)
Use PID to control an analog cooling valve in a four-pipe air conditioning unit coil application. When cold water passes through the independent cooling coil, the valve adjusts its output proportionally according to the current temperature and setpoint.
Example 2 Heating valve control process (inverse proportional control)
Use PID to control an analog heating valve in a four-pipe air conditioning unit coil application. When hot water passes through the independent heating coil, the valve adjusts its output counter-proportionally according to the current temperature and setpoint.
Example 3 Humidifying process (inverse proportional control)
Use PID to control an analog humidification valve and adjust output counter-proportionally according to the current humidity value and setpoint.
Example 4 Cooling valve dehumidification process (direct proportion control)
Use PID to control the analog cooling valve in a four-pipe air conditioning unit coil application. When cold water passes through the independent cooling coil, the valve adjusts its output proportionally according to the current temperature and setpoint.
Example 5 Fan pressure variable frequency control process (direct proportion control)
Use PID to adjust the fan's variable frequency according to the setpoint and current values such as air pressure and CO2.