PidA Function Block

The PidA function block is designed to break away from the backward compatibility of older PID implementations. This function block is used for various applications such as temperature, pressure, humidity, CO2, and flow control. The control output is calculated based on the Setpoint and the Controlled Value. Depending on the configuration, the output will have a value ranging from 0 to 100 % or from -100 to 100 %.

The controller can be triggered by the application in any time interval. Via a manual input, the control output can be set to a manual value, which then serves as the start value for further PID control. The proportional part can be deactivated via Proportional Band = 0, so that a pure integral or a integral and differential control algorithm is possible. In this case, an internal Proportional Band = 1 is used for the formula

A change of the Operation mode resets the Integral Part. If the control deviation is < Deadband, then a new PID output value is calculated after the Deadband Delay has expired

Figure 1: PidA Function Block

Figure 2: PidA Property Sheet

Figure 3: PidA Logic Diagram

Formula:

Error

Proportional Part

Integral Part

The integral Part is reset when the Operation mode changes.

Derivative Part

PID Output

Out is limited to be 0-100% or -100-100 % depending on the operation mode.

Out is calculated if abs (Setpoint - Controlled Value) >= Deadband or if the Deadband Delay time is expired.

Input

Input Name

Description

Enable

The input enables or disables the calculation of the PID algorithm.

• Bool: 0: Out = 0 %, 1: Out = PID enabled, Default = Null = PID enabled.

Calculate

Normally the PID algorithm is calculated according to the DDC interval. With a constantly changing actual value, this leads to a constantly changing output. The PID calculation can be triggered from the application via this input. The PID calculation can be stopped and triggered via this input. If relays are used to control the valve drives, this input can be used to prevent the relays from being switched on and off frequently.

  • With "Remain old Out", the I-component remains at its old value and no new I-component is added to the integral. The integration is stopped and the D-component is set to 0 %.

  • With "Calculate PID", the I-component is integrated again and the D-component is calculated again. The DeltaTime used for the formula is measured in the function block; it is the time since the last calculation of the I and D components.

  • With "Calculate P only" only the P component is recalculated while the I component remains at its old value.

Enum: - 0 = Remain old Out, - 1= Calculate PID, 2 = Calculate P only, Default = Null = Calculate PID any DDC cycle.

Controlled Value

IThe input represents the present sensor value (temperature, pressure, etc).

Numeric: 32-Bit floating point value (float), Default = Null.

Setpoint

The input represents the setpoint controlled by the PID algorithm.

Numeric: 32-Bit floating point value (float), Default = Null.

Manual

The PID output can be set to a specific value via this input. When changing from Manual to Auto, the PID output starts at the previous Manual value. This behavior is achieved by correcting the integral part internally as long as a manual value is available. Example: A critical valve is opened to 50 % manually. This input is then switched to Auto. The PID output starts regulation at 50%

Numeric: 32-Bit floating point value (float), Default = Null.

Operation

(In & Par)

PidA will decide the operation based on this input. Four modes of operation:

Off: means that the P+I+D parts are set to 0 %. The internal integral timer is stopped, however Manual and Bias are valid.

DIRECT:means that the output increases to get a larger actual value. If a heating valve is opened more, then there is a higher temperature; if an air damper is opened more, then there is more air volume; if the light is dimmed up, then there is more brightness. If Controlled Value < Setpoint, the calculated Out value varies from 0 to 100 %.

REVERSE: means that the output increases to get a smaller actual value. If a cooling valve is opened more, then there is a lower temperature; if an air damper is opened more, then there is less CO2 in the room. The output is from 0 to 100 %. If Controlled Value > Setpoint, the calculated Out value varies from 0 to 100 %.

DIRECT AND REVERSE means that the output increases to get a larger actual value. In this operating mode, however, the output is between -100 % and 100 %. A typical application is to achieve a constant outlet temperature with a cooler and heater by outputting negative values to the cooler and positive values to the heater. However, this type of control should not be used to control room temperatures, as it only recognizes a single setpoint. If Controlled Value < Setpoint, the calculated Out value varies from -100 to 100 %.

Enum:

  • 1 = Off

  • 2 = Direct

  • 3 = Reverse

  • 4 = Direct and Reverse

  • Default = Null = Use Operation Par

Note:Typically, the operation mode is from the WallmoduleA function block. In this case, the output OutSetptMd (Off, Clg, Htg) is connected to Operation via a NumericSelect function block.

Proportional Band (Xp)

(In & Par)

Proportional Band behavior depends on Operation. The Xp value is used to calculate both the P component and the I and D components. Small values lead to fast control behavior, but tend to oscillate. The P component can be deactivated via the value 0, the I and D components are still calculated. A pure integral controller can thus be configured via the value 0.

Recommended settings for different applications

  • For room temperature control with FCU: Xp =1.5 °C, Tn =1500 sec, Td = 0 sec.

  • For constant light control: Xp = 0 Lux, Tn = 20000, Td = 0 sec (with LightA) or Xp = 600, Tn = 70 sec, Td = 0 sec.

Numeric: 32-Bit floating point value (float), Default = Null = Use Proportional Band Par

Integral Time (Tn)

(In & Par)

The Tn value is used to calculate the Integral component. The integral component prevents a permanent deviation by increasing or decreasing the integral component after a periodic time interval (DDC time or from Calculate Input). 0 means that there is no Integral part calculated

Numeric: 32-Bit floating point value (float), Default = Null = Use Integral Time Par.

Derivative Time (Td)

(In & Par)

The Td value is used to calculate the Derivative component. It corrects the future error based on the current rate of change of the error by increasing or decreasing the derivative component. 0 means that there is no Derivative part calculated.

Numeric: 32-Bit floating point value (float), Default = 0 sec = Use Derivative Time Par.

Deadband

(In & Par)

If the absolute difference between the setpoint and actual value is smaller than the deadband, an error of 0 is used for the calculation. The I component (and thus also the output ‘Out’) remains at the last calculated value. A Deadband Delay is started

If the control deviation is smaller than the deadband, then the PID is calculated in the time intervals of the deadband delay. As soon as the control deviation is greater than the deadband, the timer is stopped and the PID is calculated in each DDC cycle.

Numeric: 32-Bit floating point value (float), Default = 0 = Use Deadband Par.

Deadband Delay

(In & Par)

The Deadband Delay is used to slowly adjust even small control deviations without causing oscillation. If the control deviation is smaller than the deadband, then the Deadband Delay is started. If the Deadband Delay is expired then the PID is calculated and the timer is restarted. If the control deviation is higher than the deadband, then the Deadband Delay is stopped.

Numeric: 32-Bit floating point value (float), Default = 0 sec = Use Deadband Delay Par

Table 1: Inputs of PidA Function

Output

Output Name

Description

Out

This is the calculated controller output, calculated based on the PID formula. This output is typically connected to an output function block. With a cooling/heating control, the output is connected either to a cooling or heating output depending on the Setpoint Mode of the wall module.

Numeric: 32-Bit floating point value (float), 0-100 % or -100-100 % depending on Operation

Aux

The output is currently not used. It will be used for future enhancements.

Table 2: Outputs of PidA Function

Parameter

Parameter Name

Description

Operation Par

(In & Par)

Since this parameter is also available as an input, please refer to the description of the input Operation.

Default = 2 = Direct

Proportional Band Par

(In & Par)

Since this parameter is also available as an input, please refer to the description of the input Proportional Band.

Default = 1.5 K

Integral Time Par (Tn)

(In & Par)

Since this parameter is also available as an input, please refer to the description of the input Integral Time.

Default = 1500 sec

Derivative Time par (Td)

(In & Par)

Since this parameter is also available as an input, please refer to the description of the input Derivative Time.

Default = 0 sec = Derivate Part is disabled

Deadband Par

(In & Par)

Since this parameter is also available as an input, please refer to the description of the input Deadband

Default = 0 = No deadband

Deadband Delay Par

(In & Par)

Since this parameter is also available as an input, please refer to the description of the input Deadband Delay.

Default = 0sec = No delay

Bias

The bias value is added to the output as an offset after the PID calculation.

Numeric: 32-Bit floating point value (float), Default = Null = 0 %.

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

Aux: To enable or disable the Aux feature

Table 3: Parameters of PidA Function

Examples

Refer to General Description for general information about IRMN4 Function Blocks.