# SequenceSUPTemp

## `SequenceSUPTemp` (FB)

FUNCTION\_BLOCK SequenceSUPTemp

### Short description

> Supply air temperature control for a ventilation unit with energy recovery (continuous recirculation damper system and energy recovery) including permits for active heating and cooling.\
> \
> Typical application: Supply air temperature control in a ventilation unit

### Representation

<figure><img src="https://2592874069-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQR4vCFzt6ixgsqlR3pdR%2Fuploads%2Fgit-blob-591934933c73902035a7a1442902ecd80fef5cd7%2FSequenceSAT_FB.png?alt=media" alt=""><figcaption></figcaption></figure>

### Function description

#### General

This function block enables, after enabling ( *xOpTCon* = TRUE ), the control of the supply air temperature *rSAT* to the setpoint *rReferenceSAT* by generating the control signals *rYDamp* (recirculation damper system 0.0 - 100.0 % outdoor air ratio) and *rYER*\
(energy recovery 0.0 - 100.0 %).\
After the full utilization of the energy recovery systems, if necessary the permit for active heating ( *xEnHeat* = TRUE ) or active cooling ( *xEnCool* = TRUE ) is released.\
The control of the supply air temperature during active heating or active cooling must each be performed via a separate, external PI controller. The control signals of these external PI controllers are fed back to the inputs *rHeaterYPISAT* and *rCoolerYPISAT* to ensure energy-efficient control of the energy recovery.\
By taking into account the current outdoor temperature *rOAT* or exhaust air temperature *rRAT* the optimal energy recovery can be performed for each operating case.\
When using this block, the spatial arrangement of the components (damper system, energy recovery, heater circuit, cooling circuit, etc.) must be considered.\
\
Case 1 - Winter case: Supply air temperature < supply air setpoint, outdoor temperature < exhaust air temperature, supply air setpoint > exhaust air temperature

<figure><img src="https://2592874069-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQR4vCFzt6ixgsqlR3pdR%2Fuploads%2Fgit-blob-f924ba6a1823f922d428c2ecf19e17abef69a975%2FSequenceSAT_Bild_1.png?alt=media" alt=""><figcaption></figcaption></figure>

Case 2 - Summer case: Supply air temperature > supply air setpoint, outdoor temperature > exhaust air temperature, supply air setpoint < exhaust air temperature

<figure><img src="https://2592874069-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQR4vCFzt6ixgsqlR3pdR%2Fuploads%2Fgit-blob-a01efa2f155ba6186940a0c7fa7c3f3b28162d67%2FSequenceSAT_Bild_2.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Enable / disable of the controller *xOpTCon*

In the disabled state ( *xOpTCon* = FALSE ) no control or regulation processes take place, the outputs are fixed to the following signals / states:\
\
\&#xNAN;*rYGen* = 100.0 %\
\&#xNAN;*xEnHeat* = FALSE\
\&#xNAN;*xEnCool* = FALSE\
\&#xNAN;*rYDamp* = 100.0 %\
\&#xNAN;*rYER* = 100.0 %

#### Enable / disable of free night cooling *xFNCEn*

This input signals ( *xFNCEn* = TRUE ) the active free night cooling and locks the output for active cooling *xEnCool* regardless of the other requirements.

#### Delayed start of the control *xPRORamp* and *xHHWFrost1*

The internal sequence controller (PI controller) is locked if either the input *xPRORamp* and/or the input *xHHWFrost1* is active ( = TRUE ).\
The release of the internal sequence controller occurs with a time delay of 5 minutes after both inputs are inactive again ( = FALSE ).

#### Feedback of control signals *rHeaterYPISAT* and *rCoolerYPISAT*

The feedback of the control signals for active heating *rHeaterYPISAT* and cooling *rCoolerYPISAT* is monitored internally and evaluated as follows:\
\
Control signal *rHeaterYPISAT* > 8.0 %: Deactivation of the internal sequence controller\
Control signal *rHeaterYPISAT* < 3.0 %: Activation of the internal sequence controller after a time delay of 500 ms\
\
Control signal *rCoolYPISAT* > 8.0 %: Deactivation of the internal sequence controller\
Control signal *rCoolYPISAT* < 3.0 %: Activation of the internal sequence controller after a time delay of 500 ms

#### General control signal from the sequence control *rYGen*

This control signal in the range 0.0 - 100.0 % (0.0% = maximum energy recovery, 100.0 = no energy recovery) is primarily generated by the internal sequence controller and influenced by the input variables *rSAT* (supply air temperature), *rReferenceSAT* (supply air setpoint), *rOAT* (outdoor air temperature) and *rRAT* (exhaust air temperature).

#### Enable / disable of active heating *xEnHeat*

The permit for active heating is active ( = TRUE ) if the following conditions are simultaneously met:\
\
\&#xNAN;*xOptCon* = TRUE\
(outdoor temperature > exhaust air temperature AND *rYGen* > 99% ) OR (outdoor temperature < exhaust air temperature AND *rYGen* < 1% )\
\
In all other situations active heating is disabled ( = FALSE ).

#### Enable / disable of active cooling *xEnCool*

The permit for active cooling is active ( = TRUE ) if the following conditions are simultaneously met:\
\
\&#xNAN;*xOptCon* = TRUE\
(outdoor temperature > exhaust air temperature AND *rYGen* < 1% ) OR (outdoor temperature < exhaust air temperature AND *rYGen* > 99% )\
\&#xNAN;*xFNCEn* = FALSE\
\&#xNAN;*rAverage2h* > **rSetpoint\_CoolOAT** (disable active cooling at low outdoor temperatures)\
\
In all other situations active cooling is disabled ( = FALSE ).

#### Control signal for the damper system *rYDamp*

The control signal for the damper system (0.0 - 100.0 %, 0.0 % = no outdoor air fraction, 100.0 % = maximum outdoor air fraction) is generated depending on the general control signal from the sequence control *rYGen* as follows:\
\
The control signal *rYGen* is in the range *r1Damp* to *r2Damp* linearly converted into a signal in the range of 0.0 - 100.0 and limited.

#### Control signal for the energy recovery system *rYER*

The control signal for the energy recovery (0.0 - 100.0 %, 0.0 % = no energy recovery, 100.0 % = maximum energy recovery) is generated depending on the general control signal from the sequence control *rYGen* as follows:\
\
The control signal *rYGen* is in the range *r1Er* to *r2Er* linearly converted into a signal in the range of 100.0 - 0.0 and limited.

### CODESYS

InOut:

| Scope       | Name                | Type    | Initial      |
| ----------- | ------------------- | ------- | ------------ |
| Input       | `rSAT`              | `REAL`  |              |
| Input       | `rReferenceSAT`     | `REAL`  |              |
| Input       | `xOpTCon`           | `BOOL`  |              |
| Input       | `xFNCEn`            | `BOOL`  | FALSE        |
| Input       | `rOAT`              | `REAL`  |              |
| Input       | `rRAT`              | `REAL`  |              |
| Input       | `rAverage2h`        | `REAL`  |              |
| Input       | `xPRORamp`          | `BOOL`  | FALSE        |
| Input       | `xHHWFrost1`        | `BOOL`  | FALSE        |
| Input       | `rHeaterYPISAT`     | `REAL`  | 0.0          |
| Input       | `rCoolerYPISAT`     | `REAL`  | 0.0          |
| Output      | `rYGen`             | `REAL`  |              |
| Output      | `xEnHeat`           | `BOOL`  |              |
| Output      | `xEnCool`           | `BOOL`  |              |
| Output      | `rYDamp`            | `REAL`  |              |
| Output      | `rYER`              | `REAL`  |              |
| Output      | `xAuto`             | `BOOL`  |              |
| Input Const | `rSetpoint_CoolOAT` | `REAL`  | 14.0         |
| Input Const | `r2ER`              | `REAL`  | 100.0        |
| Input Const | `r1ER`              | `REAL`  | 30.0         |
| Input Const | `r2Damp`            | `REAL`  | 30.0         |
| Input Const | `r1Damp`            | `REAL`  | 0.0          |
| Input Const | `rTn`               | `REAL`  | 200.0        |
| Input Const | `rKp`               | `REAL`  | 3.5          |
| Input Const | `rManValueYER`      | `REAL`  |              |
| Input Const | `eManModeYER`       | eMANNUM | eMANNUM.Auto |
| Input Const | `rManValueYDamp`    | `REAL`  |              |
| Input Const | `eManModeYDamp`     | eMANNUM | eMANNUM.Auto |
| Input Const | `eManModeCool`      | eMANBIN | eMANBIN.Auto |
| Input Const | `eManModeHeat`      | eMANBIN | eMANBIN.Auto |
| Input Const | `rManValueYGen`     | `REAL`  |              |
| Input Const | `eManModeYGen`      | eMANNUM | eMANNUM.Auto |
