Description

This is a PID (Proportional/Integral/Derivative) loop control function block.

It calculates the deviation between the collected data and a setpoint, then feedbacks it as a control result to calculate a new output value. Doing so, the system data reaches or stabilizes near the setpoint. It proves mathematically that in case of stabilization errors or process iterations caused by other control methods, the PID feedback loop can maintain the system stability very well.

Function

This function block can be used in HVAC applications to control variables such as temperature, pressure, flow and speed. It uses three algorithms to adjust the controlled value.

  • Proportional: Use the current value to control. It multiplies the proportional gain (Kp) and the deviation between the setpoint and current input, then uses the product to calculate the output of the block. The output is proportional to the deviation. For example, if the proportional band range of a heat controller is 10...20 °C and the setpoint is 20 °C, then the controller outputs 100 % at 10 °C, 50 % at 15 °C, 10 % at 19 °C, and 0 at 20 °C.
  • Integral: Use a value over a period to control. It multiplies the integral gain (Ki) and the deviation between the setpoint and input value (constant) over a period, then uses the product to calculate the output of the block. 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 considering future error and 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 combines the above three control methods. Proportional control makes the control very timely and fast; integration control, taking into account the factors of time accumulation, is able to eliminate deviation and achieve a comparatively ideal control process; derivative control, capable of foreseeing the future trend of the deviation, can produce advanced control effect and improve the dynamic performance of the system. Derivative control cannot be used alone and needs to be combined with the other two controls (P and I) to become a PD or PID controller. The PID control schematic is as follows:

Input

PIN

Description

Enable

Enables or disables the PID control.

Direct Proportion

Defines the control direction:

  • True: Direct proportional control. If the input value (Xctr) increases, the control output also increases. Used for cooling and dehumidification control processes.
  • False: Inverse proportional control. If the input value (Xctr) increases, the control output decreases. Used for heating, humidification and constant pressure variable frequency control processes.

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, water level, etc.

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, after seven program cycles, the control output value remains unchanged until 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, this function block outputs 1/10 of a 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.

If it is zero, the integration control does not work.

Differential Time(s)

Derivative control constant.

The larger the value, the stronger the derivative control; the smaller the value, the weaker the derivative control.

If the value is zero, the derivative control does not work.

Min output

Max output

The minimal/maximal value of the output.

Output

PIN

Description

PID output

PID control output, a numeric value between 0 and 100. 0 is for system output OFF and 100 for system maximum output.

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 four-pipe air conditioning unit coil application: When cold water passes through the independent cooling coil, the cooling valve adjusts output proportionally according to the current temperature value and setpoint.

Example 2 Heating valve control process (inverse proportional control)

Use PID to control an analog heating valve in four-pipe air conditioning unit coil application: When hot water passes through the independent heating coil, the heating valve adjusts output counter-proportionally according to the current temperature value 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 analog cooling valve in four-pipe air conditioning unit coil application: When cold water passes through the independent cooling coil, the cooling valve adjusts output proportionally according to the current temperature value and setpoint.

Example 5 Fan pressure variable frequency control process (direct proportion control)

Use PID to adjust fan variable frequency according to the setpoint and current values such air pressure and CO2.