Output setpoints for AHU control
Information
This package contains sequences generating setpoints for VAV AHU control.
Package Content
Name |
Description |
FreezeProtection
|
Freeze protection sequence for multizone air handling unit |
PlantRequests
|
Output plant requests for multizone air handling unit |
ReliefDamper
|
Relief damper control for AHUs using actuated dampers without fan |
ReliefFan
|
Sequence for control of relief fan in AHU |
ReliefFanGroup
|
Sequence for controlling relief fan group |
ReturnFanAirflowTracking
|
Return fan control for AHUs using return fan with airflow tracking |
ReturnFanDirectPressure
|
Return fan control with direct building pressure control |
SupplyFan
|
Block to control multi zone VAV AHU supply fan |
SupplySignals
|
Multizone VAV AHU supply air temperature control loop and coil valves position |
SupplyTemperature
|
Supply air temperature setpoint for multi zone system |
OutdoorAirFlow
|
Package of sequences for calculating minimum outdoor airflow rate |
Validation
|
Collection of validation models |
Freeze protection sequence for multizone air handling unit
Information
Freeze protection sequence for multizone AHU system. It is developed based on Section
5.16.12 of ASHRAE Guideline 36, May 2020.
-
If the supply air temperature
TAirSup
drops below 4.4 °C (40 °F)
for 5 minutes, send two (or more, as required to ensure that heating plant is active,
minHotWatReq
) heating hot-water plant requests, override the outdoor
air damper to the minimum position, and modulate the heating coil to maintain a suppy
air temperature of at least 6 °C (42 °F).
Disable this function when supply air temperature rises above 7 °C (45 °F) for
5 minutes.
-
If the supply air temperature
TAirSup
drops below 3.3 °C (38 °F)
for 5 minutes, fully close both the economizer damper and the minimum outdoor air
damper for 1 hour and set a Level 3 alarm noting that minimum ventilation was
interrupted. After 1 hour, the unit shall resume minimum outdoor air ventilation
and enter the previous stage of freeze protection.
-
If it is warm enough that the supply air temperature rises above 7 °C (45 °F)
with minimum ventilation, the unit will remain in Stage 1 freeze protection for 5
minutes then resume normal operation.
-
Upon signal from the freeze-stat (if installed),
or if supply air temperature drops below 3.3 °C (38 °F) for 15 minutes or
below 1 °C (34 °F) for 5 minutes, shut down supply and return (or relief)
fan(s), close outdoor air damper, open the cooling-coil valve to 100%, and energize
the CHW pump system. Also send two (or more, as required to ensure that heating plant
is active,
minHotWatReq
) heating hot-water plant requests,
modulate the heating coil to maintain the higher of the supply air temperature or
the mixed air temperature at 27 °C (80 °F), and set a Level 2 alarm indicating
the unit is shut down by freeze protection.
-
If a freeze-protection shutdown is triggered by a low air temperature sensor reading,
it shall remain in effect until it is reset by a software switch from the operator's
workstation. (If a freeze-stat with a physical reset switch is used instead, there
shall be no software reset switch.)
Parameters
Type | Name | Default | Description |
Boolean | have_frePro | true | True: enable freeze protection |
PressureControl | buiPreCon | Buildings.Controls.OBC.ASHRA... | Type of building pressure control system |
OutdoorAirSection | minOADes | Buildings.Controls.OBC.ASHRA... | Design of minimum outdoor air and economizer function |
FreezeStat | freSta | Buildings.Controls.OBC.ASHRA... | Type of freeze stat |
HeatingCoil | heaCoi | Buildings.Controls.OBC.ASHRA... | Heating coil type |
CoolingCoil | cooCoi | Buildings.Controls.OBC.ASHRA... | Cooling coil type |
Integer | minHotWatReq | 2 | Minimum heating hot-water plant request to active the heating plant |
Heating coil controller |
SimpleController | heaCoiCon | Buildings.Controls.OBC.CDL.T... | Heating coil controller |
Real | k | 1 | Gain of coil controller [1] |
Real | Ti | 0.5 | Time constant of integrator block [s] |
Real | Td | 0.1 | Time constant of derivative block [s] |
Real | yMax | 1 | Upper limit of output |
Real | yMin | 0 | Lower limit of output |
Advanced |
Real | Thys | 0.25 | Hysteresis for checking temperature difference [K] |
Connectors
Type | Name | Description |
input RealInput | uOutDamPosMin | Minimum economizer damper position limit as returned by the damper position limits sequence [1] |
input RealInput | uOutDam | Economizer outdoor air damper commanded position [1] |
input RealInput | uHeaCoi | Heating coil commanded position [1] |
input RealInput | uMinOutDam | Minimum outdoor air damper commanded position [1] |
input BooleanInput | u1MinOutDam | Minimum outdoor air damper command on position |
input RealInput | uRetDam | Economizer return air damper commanded position [1] |
input RealInput | TAirSup | Measured supply air temperature [K] |
input BooleanInput | u1FreSta | Freeze protection stat signal. The stat is normally close (the input is normally true), when enabling freeze protection, the input becomes false |
input BooleanInput | u1SofSwiRes | Freeze protection reset signal from software switch |
input BooleanInput | u1SupFan | Supply fan commanded on |
input RealInput | uSupFan | Supply fan commanded speed [1] |
input BooleanInput | u1RetFan | Return fan commanded on |
input RealInput | uRetFan | Return fan commanded speed [1] |
input BooleanInput | u1RelFan | Relief fan commanded on |
input RealInput | uRelFan | Relief fan commanded speed [1] |
input RealInput | uCooCoi | Cooling coil commanded position [1] |
input RealInput | TAirMix | Measured mixed air temperature [K] |
output IntegerOutput | yFreProSta | Freeze protection stage index |
output BooleanOutput | y1EneCHWPum | Commanded on to energize chilled water pump |
output RealOutput | yRetDam | Return air damper commanded position [1] |
output RealOutput | yOutDam | Outdoor air damper commanded position [1] |
output RealOutput | yMinOutDam | Minimum outdoor air damper commanded position [1] |
output BooleanOutput | y1MinOutDam | Minimum outdoor air damper command on position |
output BooleanOutput | y1SupFan | Supply fan commanded on |
output RealOutput | ySupFan | Supply fan commanded speed [1] |
output BooleanOutput | y1RetFan | Return fan commanded on |
output RealOutput | yRetFan | Return fan commanded speed [1] |
output BooleanOutput | y1RelFan | Relief fan commanded on |
output BooleanOutput | y1RelDam | True: 2-position relief damper is commanded open |
output RealOutput | yRelFan | Relief fan commanded speed [1] |
output RealOutput | yCooCoi | Cooling coil commanded position [1] |
output RealOutput | yHeaCoi | Heating coil commanded position [1] |
output IntegerOutput | yHotWatPlaReq | Request to heating hot-water plant |
output IntegerOutput | yAla | Alarm level |
Modelica definition
block FreezeProtection
parameter Boolean have_frePro=true
;
parameter Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl buiPreCon=
Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefDamper
;
parameter Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection minOADes=Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.DedicatedDampersAirflow
;
parameter Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat freSta=Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.No_freeze_stat
;
parameter Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil heaCoi=Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
;
parameter Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil cooCoi=Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased
;
parameter Integer minHotWatReq=2
;
parameter Buildings.Controls.OBC.CDL.Types.SimpleController heaCoiCon=Buildings.Controls.OBC.CDL.Types.SimpleController.PI
;
parameter Real k(unit="1")=1
;
parameter Real Ti(unit="s")=0.5
;
parameter Real Td(unit="s")=0.1
;
parameter Real yMax=1
;
parameter Real yMin=0
;
parameter Real Thys(unit="K")=0.25
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uOutDamPosMin(
final min=0,
final max=1,
final unit="1")
if have_frePro
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uOutDam(
final min=0,
final max=1,
final unit="1") ;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uHeaCoi(
final min=0,
final max=1,
final unit="1")
if (heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
or heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.Electric)
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uMinOutDam(
final min=0,
final max=1,
final unit="1")
if minOADes == Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.DedicatedDampersAirflow
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1MinOutDam
if minOADes == Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.DedicatedDampersPressure
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uRetDam(
final min=0,
final max=1,
final unit="1") ;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TAirSup(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
if have_frePro
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1FreSta
if freSta ==
Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_BAS
and
have_frePro
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1SofSwiRes
if (freSta ==
Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.No_freeze_stat
or freSta ==
Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment)
and have_frePro
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1SupFan
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uSupFan(
final min=0,
final max=1,
final unit="1")
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1RetFan
if (buiPreCon ==
Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanDp)
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uRetFan(
final min=0,
final max=1,
final unit="1")
if (buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanDp)
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1RelFan
if buiPreCon ==
Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefFan
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uRelFan(
final min=0,
final max=1,
final unit="1")
if buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefFan
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uCooCoi(
final min=0,
final max=1,
final unit="1")
if (cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased
or cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.DXCoil)
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TAirMix(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
if (heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
or heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.Electric)
and have_frePro
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yFreProSta
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1EneCHWPum
if have_frePro
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yRetDam(
final min=0,
final max=1,
final unit="1")
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yOutDam(
final min=0,
final max=1,
final unit="1")
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yMinOutDam(
final min=0,
final max=1,
final unit="1")
if minOADes == Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.DedicatedDampersAirflow
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1MinOutDam
if minOADes == Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.DedicatedDampersPressure
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1SupFan
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput ySupFan(
final min=0,
final max=1,
final unit="1")
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1RetFan
if (buiPreCon ==
Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanDp)
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yRetFan(
final min=0,
final max=1,
final unit="1")
if (buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanDp)
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1RelFan
if buiPreCon ==
Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefFan
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1RelDam
if buiPreCon ==
Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefFan
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yRelFan(
final min=0,
final max=1,
final unit="1")
if buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefFan
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yCooCoi(
final min=0,
final max=1,
final unit="1")
if (cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased
or cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.DXCoil)
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yHeaCoi(
final min=0,
final max=1,
final unit="1")
if (heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
or heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.Electric)
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yHotWatPlaReq
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yAla
if have_frePro
;
protected
Buildings.Controls.OBC.CDL.Reals.LessThreshold lesThr(
final t=273.15 + 4.4,
final h=Thys)
if have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Timer tim(
final t=300)
if have_frePro
;
Buildings.Controls.OBC.CDL.Integers.Switch hotWatPlaReq
if heaCoi ==
Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
and
have_frePro
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt(
final k=minHotWatReq)
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
and have_frePro
;
Buildings.Controls.OBC.CDL.Reals.Switch minVen
if have_frePro
;
Buildings.Controls.OBC.CDL.Reals.PID heaCoiCon1(
final controllerType=heaCoiCon,
final k=k,
final Ti=Ti,
final Td=Td,
final yMax=yMax,
final yMin=yMin)
if (heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
or heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.Electric)
and have_frePro
;
Buildings.Controls.OBC.CDL.Reals.Switch heaCoi1
if (heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
or heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.Electric)
and have_frePro
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr(
final t=273.15 + 7,
final h=Thys)
if have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Latch lat
if have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Timer tim1(
final t=300)
if have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Edge endStaOne
if have_frePro
;
Buildings.Controls.OBC.CDL.Reals.LessThreshold lesThr1(
final t=273.15 + 3.3,
final h=Thys)
if have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Timer tim2(
final t=300)
if have_frePro
;
Buildings.Controls.OBC.CDL.Logical.TrueFalseHold holSta2(
final trueHoldDuration=3600,
final falseHoldDuration=0)
if have_frePro
;
Buildings.Controls.OBC.CDL.Reals.Switch outDam2
if have_frePro
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant con(
final k=0)
if have_frePro
;
Buildings.Controls.OBC.CDL.Reals.Switch minOutDam2
if minOADes ==
Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.DedicatedDampersAirflow
and have_frePro
;
Buildings.Controls.OBC.CDL.Reals.Switch retDam2
if have_frePro
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant con1(
final k=1)
if have_frePro
;
Buildings.Controls.OBC.CDL.Integers.Switch intSwi1
if have_frePro
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt1(
final k=3)
if have_frePro
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt2(
final k=0)
if heaCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
and have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Timer tim3(
final t=900)
if have_frePro
;
Buildings.Controls.OBC.CDL.Reals.LessThreshold lesThr2(
final t=273.15 + 1,
final h=Thys)
if have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Timer tim4(
final t=300)
if have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Or or8
if have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant con2(
final k=false)
if not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_BAS
and have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Latch lat1
if have_frePro
;
Buildings.Controls.OBC.CDL.Reals.Switch supFan
if (
not freSta ==
Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment)
and have_frePro
;
Buildings.Controls.OBC.CDL.Reals.Switch retFan
if (buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanDp)
and (
not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment)
and have_frePro
;
Buildings.Controls.OBC.CDL.Reals.Switch relFan
if buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefFan
and (
not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment)
and have_frePro
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant con3(
final k=0)
if have_frePro
;
Buildings.Controls.OBC.CDL.Reals.Switch outDam
if (
not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment)
and have_frePro
;
Buildings.Controls.OBC.CDL.Reals.Switch cooCoiVal
if (
not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment)
and have_frePro
and (cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased
or cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.DXCoil)
;
Buildings.Controls.OBC.CDL.Integers.Switch hotWatPlaReq3
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
and have_frePro
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt3(
final k=minHotWatReq)
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
and have_frePro
;
Buildings.Controls.OBC.CDL.Reals.Max max1
if (heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
or heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.Electric)
and have_frePro
;
Buildings.Controls.OBC.CDL.Reals.PID heaCoiMod(
final controllerType=heaCoiCon,
final k=k,
final Ti=Ti,
final Td=Td,
final yMax=yMax,
final yMin=yMin)
if (heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
or heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.Electric)
and have_frePro
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant con4(
final k=273.15 + 27)
if (heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
or heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.Electric)
and have_frePro
;
Buildings.Controls.OBC.CDL.Reals.Switch heaCoiPos
if (heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
or heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.Electric)
and (
not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment)
and have_frePro
;
Buildings.Controls.OBC.CDL.Integers.Switch intSwi3
if have_frePro
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt4(
final k=2)
if have_frePro
;
Buildings.Controls.OBC.CDL.Utilities.Assert shuDowWar(
final message="Warning: the unit is shut down by freeze protection!")
if have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Not not1
if have_frePro
;
Buildings.Controls.OBC.CDL.Utilities.Assert disMinVenWar(
final message="Warning: minimum ventilation was interrupted by freeze protection!")
if have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Not not2
if have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Timer tim5(
final t=3600)
if have_frePro
;
Buildings.Controls.OBC.CDL.Reals.Switch minOutDam
if minOADes ==
Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.DedicatedDampersAirflow
and (
not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment)
and have_frePro
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt5(
final k=0)
if have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Latch lat2
if have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Edge endStaTwo
if have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Or or2
if have_frePro
;
Buildings.Controls.OBC.CDL.Reals.Switch retDam
if (
not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment)
and have_frePro
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant supTemSet(
final k=273.15+ 6)
if (heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
or heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.Electric)
and have_frePro
;
Buildings.Controls.OBC.CDL.Integers.Switch intSwi2
if have_frePro
;
Buildings.Controls.OBC.CDL.Integers.Switch intSwi4
if have_frePro
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt6(
final k=2)
if have_frePro
;
Buildings.Controls.OBC.CDL.Integers.Switch intSwi5
if have_frePro
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt7(
final k=1)
if have_frePro
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt8(
final k=0)
if have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Switch minOutDam3
if minOADes == Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.DedicatedDampersPressure
and have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant con5(
final k=false)
if minOADes == Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.DedicatedDampersPressure
and have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Switch minOutDam1
if (minOADes ==
Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.DedicatedDampersPressure
and not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment)
and have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Not norFal
if freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_BAS
and have_frePro
;
Buildings.Controls.OBC.CDL.Logical.FallingEdge falEdg
if freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_BAS
and have_frePro
;
Buildings.Controls.OBC.CDL.Logical.And and1
if (buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanDp)
and (
not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment)
and have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Not norSta3
if (buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanDp)
and have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Not norSta1
if have_frePro
;
Buildings.Controls.OBC.CDL.Logical.And and2
if (
not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment)
and have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Not norSta2
if (buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefFan)
and have_frePro
;
Buildings.Controls.OBC.CDL.Logical.And and3
if buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefFan
and (
not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment)
and have_frePro
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai(
final k=1)
if ((heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
or heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.Electric)
and freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment)
and have_frePro
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai1(
final k=1)
if freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
and have_frePro
and (cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased
or cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.DXCoil)
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai2(
final k=1)
if (buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefFan
and freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment)
and have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Or or1
if buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefFan
and (
not ((
not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment)
and have_frePro))
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai3(
final k=1)
if ((buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanDp)
and freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment)
and have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Or or4
if (buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanDp)
and not ((
not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment)
and have_frePro)
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai4(
final k=1)
if freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
and have_frePro
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai5(
final k=1)
if freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
and have_frePro
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai6(
final k=1)
if (minOADes == Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.DedicatedDampersAirflow
and freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment)
and have_frePro
;
Buildings.Controls.OBC.CDL.Logical.Or or5
if minOADes == Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.DedicatedDampersPressure
and (
not (
not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
and have_frePro))
;
Buildings.Controls.OBC.CDL.Logical.Or or6
if not ((
not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment)
and have_frePro)
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai7(
final k=1)
if freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
and have_frePro
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai8(
final k=1)
if not have_frePro
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt9(
final k=0)
if not have_frePro ;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai9(
final k=1)
if not have_frePro
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai10(
final k=1)
if (
not
have_frePro)
and minOADes == Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.DedicatedDampersAirflow
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai11(
final k=1)
if not have_frePro
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai12(
final k=1)
if (
not
have_frePro)
and (buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanDp)
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai13(
final k=1)
if (
not
have_frePro)
and buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefFan
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai14(
final k=1)
if (
not
have_frePro)
and (cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased
or cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.DXCoil)
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai15(
final k=1)
if (
not have_frePro)
and (heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
or heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.Electric)
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt10(
final k=0)
if (
not have_frePro)
and heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Logical.Or or7
if have_frePro
;
equation
connect(lesThr.y, tim.u);
connect(TAirSup, lesThr.u);
connect(conInt.y, hotWatPlaReq.u1);
connect(uOutDamPosMin, minVen.u1);
connect(supTemSet.y, heaCoiCon1.u_s);
connect(TAirSup, heaCoiCon1.u_m);
connect(heaCoiCon1.y, heaCoi1.u1);
connect(TAirSup, greThr.u);
connect(greThr.y, tim1.u);
connect(tim1.passed, endStaOne.u);
connect(endStaOne.y, lat.clr);
connect(lat.y, hotWatPlaReq.u2);
connect(lat.y, minVen.u2);
connect(lat.y, heaCoi1.u2);
connect(TAirSup, lesThr1.u);
connect(lesThr1.y, tim2.u);
connect(tim2.passed, holSta2.u);
connect(con.y, outDam2.u1);
connect(con.y, minOutDam2.u1);
connect(con1.y, retDam2.u1);
connect(uRetDam, retDam2.u3);
connect(conInt1.y, intSwi1.u1);
connect(lesThr1.y, tim3.u);
connect(lesThr2.y, tim4.u);
connect(TAirSup, lesThr2.u);
connect(u1SofSwiRes, lat1.clr);
connect(lat1.y, supFan.u2);
connect(lat1.y, retFan.u2);
connect(lat1.y, relFan.u2);
connect(con3.y, supFan.u1);
connect(con3.y, retFan.u1);
connect(con3.y, relFan.u1);
connect(uSupFan, supFan.u3);
connect(uRetFan, retFan.u3);
connect(uRelFan, relFan.u3);
connect(supFan.y, ySupFan);
connect(relFan.y, yRelFan);
connect(retFan.y, yRetFan);
connect(con3.y, outDam.u1);
connect(lat1.y, outDam.u2);
connect(uCooCoi, cooCoiVal.u3);
connect(lat1.y, cooCoiVal.u2);
connect(con1.y, cooCoiVal.u1);
connect(conInt3.y, hotWatPlaReq3.u1);
connect(lat1.y, hotWatPlaReq3.u2);
connect(TAirMix, max1.u2);
connect(TAirSup, max1.u1);
connect(max1.y, heaCoiMod.u_m);
connect(con4.y, heaCoiMod.u_s);
connect(heaCoiMod.y, heaCoiPos.u1);
connect(lat1.y, heaCoiPos.u2);
connect(lat1.y, intSwi3.u2);
connect(conInt4.y, intSwi3.u1);
connect(lat1.y, not1.u);
connect(not1.y, shuDowWar.u);
connect(not2.y, disMinVenWar.u);
connect(holSta2.y, tim5.u);
connect(lat1.y, minOutDam.u2);
connect(con3.y, minOutDam.u1);
connect(uOutDam, minVen.u3);
connect(minVen.y, outDam2.u3);
connect(outDam2.y, outDam.u3);
connect(conInt2.y, hotWatPlaReq.u3);
connect(conInt5.y, intSwi1.u3);
connect(intSwi1.y, intSwi3.u3);
connect(intSwi3.y, yAla);
connect(hotWatPlaReq.y, hotWatPlaReq3.u3);
connect(hotWatPlaReq3.y, yHotWatPlaReq);
connect(minOutDam2.y, minOutDam.u3);
connect(minOutDam.y, yMinOutDam);
connect(uMinOutDam, minOutDam2.u3);
connect(uHeaCoi, heaCoi1.u3);
connect(heaCoi1.y, heaCoiPos.u3);
connect(heaCoiPos.y, yHeaCoi);
connect(holSta2.y, lat2.u);
connect(tim5.passed, endStaTwo.u);
connect(endStaTwo.y, lat2.clr);
connect(lat2.y, outDam2.u2);
connect(lat2.y, minOutDam2.u2);
connect(lat2.y, not2.u);
connect(lat2.y, retDam2.u2);
connect(lat2.y, intSwi1.u2);
connect(tim.passed, or2.u1);
connect(or2.y, lat.u);
connect(lat1.y, retDam.u2);
connect(con3.y, retDam.u1);
connect(retDam2.y, retDam.u3);
connect(retDam.y, yRetDam);
connect(lat1.y, y1EneCHWPum);
connect(outDam.y, yOutDam);
connect(cooCoiVal.y, yCooCoi);
connect(conInt1.y, intSwi2.u1);
connect(lat1.y, intSwi2.u2);
connect(lat2.y, intSwi4.u2);
connect(conInt6.y, intSwi4.u1);
connect(intSwi4.y, intSwi2.u3);
connect(lat.y, intSwi5.u2);
connect(intSwi5.y, intSwi4.u3);
connect(conInt7.y, intSwi5.u1);
connect(intSwi2.y, yFreProSta);
connect(conInt8.y, intSwi5.u3);
connect(endStaTwo.y, or2.u2);
connect(u1MinOutDam, minOutDam3.u3);
connect(lat2.y, minOutDam3.u2);
connect(con5.y, minOutDam3.u1);
connect(lat1.y, minOutDam1.u2);
connect(minOutDam1.y, y1MinOutDam);
connect(minOutDam3.y, minOutDam1.u3);
connect(con5.y, minOutDam1.u1);
connect(u1FreSta,norFal. u);
connect(or8.y, lat1.u);
connect(falEdg.y, lat1.clr);
connect(u1RetFan, and1.u1);
connect(and1.y, y1RetFan);
connect(norSta3.y, and1.u2);
connect(lat1.y, norSta3.u);
connect(u1SupFan, and2.u1);
connect(and2.y, y1SupFan);
connect(norSta1.y, and2.u2);
connect(lat1.y, norSta1.u);
connect(u1RelFan, and3.u1);
connect(and3.y, y1RelFan);
connect(norSta2.y,and3. u2);
connect(lat1.y, norSta2.u);
connect(uHeaCoi, gai.u);
connect(gai.y, yHeaCoi);
connect(uCooCoi, gai1.u);
connect(gai1.y, yCooCoi);
connect(uRelFan, gai2.u);
connect(gai2.y, yRelFan);
connect(u1RelFan, or1.u1);
connect(u1RelFan, or1.u2);
connect(or1.y, y1RelFan);
connect(uRetFan, gai3.u);
connect(gai3.y, yRetFan);
connect(u1RetFan, or4.u1);
connect(u1RetFan, or4.u2);
connect(or4.y, y1RetFan);
connect(uRetDam, gai4.u);
connect(gai4.y, yRetDam);
connect(uOutDam, gai5.u);
connect(gai5.y, yOutDam);
connect(uMinOutDam, gai6.u);
connect(gai6.y, yMinOutDam);
connect(u1MinOutDam, or5.u1);
connect(u1MinOutDam, or5.u2);
connect(or5.y, y1MinOutDam);
connect(u1SupFan, or6.u1);
connect(u1SupFan, or6.u2);
connect(or6.y, y1SupFan);
connect(uSupFan, gai7.u);
connect(gai7.y, ySupFan);
connect(norFal.y, falEdg.u);
connect(conInt9.y, yFreProSta);
connect(gai8.y, yRetDam);
connect(gai9.y, yOutDam);
connect(uRetDam, gai8.u);
connect(uOutDam, gai9.u);
connect(gai10.y, yMinOutDam);
connect(uMinOutDam, gai10.u);
connect(gai11.y, ySupFan);
connect(uSupFan, gai11.u);
connect(uRetFan, gai12.u);
connect(gai12.y, yRetFan);
connect(uRelFan, gai13.u);
connect(gai13.y, yRelFan);
connect(uCooCoi, gai14.u);
connect(gai14.y, yCooCoi);
connect(gai15.y, yHeaCoi);
connect(uHeaCoi, gai15.u);
connect(conInt10.y, yHotWatPlaReq);
connect(or1.y, y1RelDam);
connect(and3.y, y1RelDam);
connect(tim3.passed, or7.u1);
connect(tim4.passed, or7.u2);
connect(or7.y, or8.u1);
connect(norFal.y, or8.u2);
connect(con2.y, or8.u2);
end FreezeProtection;
Output plant requests for multizone air handling unit
Information
This sequence outputs the system reset requests for multiple zone air handling unit. The
implementation is according to the Section 5.16.16 of ASHRAE Guideline 36, May 2020.
Chilled water reset request yChiWatResReq
-
If the supply air temperature
TAirSup
exceeds the supply air temperature
set point TAirSupSet
by 3 °C (5 °F) for 2 minutes, send 3 requests.
-
If the supply air temperature
TAirSup
exceeds the supply air temperature
set point TAirSupSet
by 2 °C (3 °F) for 2 minutes, send 2 requests.
-
Else if the chilled water valve position
uCooCoiSet
is greater than
95%, send 1 request until the uCooCoiSet
is less than 85%.
-
Else if the chilled water valve position
uCooCoiSet
is less than 95%,
send 0 request.
Chiller plant request yChiPlaReq
Send the chiller plant that serves the system a chiller plant request as follows:
-
If the chilled water valve position
uCooCoiSet
is greater than
95%, send 1 request until the uCooCoiSet
is less than 10%.
-
Else if the chilled water valve position
uCooCoiSet
is less than 95%,
send 0 request.
If there is a hot-water coil, hot-water
reset requests yHotWatResReq
-
If the supply air temperature
TAirSup
is 17 °C (30 °F) less than
the supply air temperature set point TAirSupSet
for 5 minutes, send 3
requests.
-
Else if the supply air temperature
TAirSup
is 8 °C (15 °F) less than
the supply air temperature set point TAirSupSet
for 5 minutes, send 2
requests.
-
Else if the hot water valve position
uHeaCoiSet
is greater than
95%, send 1 request until the uHeaCoiSet
is less than 85%.
-
Else if the hot water valve position
uHeaCoiSet
is less than 95%,
send 0 request.
If there is a hot-water coil and heating hot-water plant, heating hot-water
plant reqeusts yHotWatPlaReq
Send the heating hot-water plant that serves the air handling unit a heating hot-water
plant request as follows:
-
If the hot water valve position
uHeaCoiSet
is greater than 95%, send 1
request until the hot water valve position is less than 10%.
-
If the hot water valve position
uHeaCoiSet
is less than 95%, send 0 requests.
Parameters
Type | Name | Default | Description |
HeatingCoil | heaCoi | Buildings.Controls.OBC.ASHRA... | Heating coil type |
CoolingCoil | cooCoi | Buildings.Controls.OBC.ASHRA... | Cooling coil type |
Advanced |
Real | Thys | 0.1 | Hysteresis for checking temperature difference |
Real | posHys | 0.05 | Hysteresis for checking valve position difference |
Connectors
Type | Name | Description |
input RealInput | TAirSup | Measured supply air temperature [K] |
input RealInput | TAirSupSet | Setpoint for supply air temperature [K] |
input RealInput | uCooCoiSet | Commanded ooling coil valve position [1] |
input RealInput | uHeaCoiSet | Commanded heating coil valve position [1] |
output IntegerOutput | yChiWatResReq | Chilled water reset request |
output IntegerOutput | yChiPlaReq | Chiller plant request |
output IntegerOutput | yHotWatResReq | Hot water reset request |
output IntegerOutput | yHotWatPlaReq | Hot water plant request |
Modelica definition
block PlantRequests
parameter Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil heaCoi=Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
;
parameter Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil cooCoi=Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased
;
parameter Real Thys = 0.1
;
parameter Real posHys = 0.05
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TAirSup(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TAirSupSet(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uCooCoiSet(
final unit="1",
final min=0,
final max=1)
if cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uHeaCoiSet(
final unit="1",
final min=0,
final max=1)
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yChiWatResReq
if cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yChiPlaReq
if cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yHotWatResReq
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yHotWatPlaReq
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
;
protected
Buildings.Controls.OBC.CDL.Reals.Subtract cooSupTemDif
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr(
final t=3,
final h=Thys)
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr1(
final t=2,
final h=Thys)
;
Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel(
final delayTime=120)
;
Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel1(
final delayTime=120)
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr2(
final t=0.95,
final h=posHys)
if cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant thr(
final k=3) ;
Buildings.Controls.OBC.CDL.Integers.Switch chiWatRes3
if cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Integers.Switch chiWatRes2
if cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant two(
final k=2)
;
Buildings.Controls.OBC.CDL.Reals.LessThreshold lesThr(
final t=0.85,
final h=posHys)
if cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Logical.Latch lat
if cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Integers.Switch chiWatRes1
if cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant one(
final k=1) ;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant zer(
final k=0) ;
Buildings.Controls.OBC.CDL.Logical.Latch lat1
if cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Reals.LessThreshold lesThr1(
final t=0.1,
final h=posHys)
if cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Integers.Switch intSwi3
if cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Reals.Subtract heaSupTemDif
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr3(
final t=17,
final h=Thys)
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr4(
final t=8,
final h=Thys)
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel2(
final delayTime=300)
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel3(
final delayTime=300)
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Integers.Switch hotWatRes3
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Integers.Switch hotWatRes2
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Reals.LessThreshold lesThr2(
final t=0.85,
final h=posHys)
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr5(
final t=0.95,
final h=posHys)
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Logical.Latch lat2
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Integers.Switch hotWatRes1
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Reals.LessThreshold lesThr3(
final t=0.1,
final h=posHys)
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Logical.Latch lat3
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
;
Buildings.Controls.OBC.CDL.Integers.Switch intSwi1
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
;
equation
connect(TAirSup, cooSupTemDif.u1);
connect(TAirSupSet, cooSupTemDif.u2);
connect(cooSupTemDif.y, greThr.u);
connect(greThr.y, truDel.u);
connect(greThr1.y, truDel1.u);
connect(cooSupTemDif.y, greThr1.u);
connect(uCooCoiSet, greThr2.u);
connect(truDel.y, chiWatRes3.u2);
connect(thr.y, chiWatRes3.u1);
connect(truDel1.y, chiWatRes2.u2);
connect(two.y, chiWatRes2.u1);
connect(greThr2.y, lat.u);
connect(uCooCoiSet, lesThr.u);
connect(lesThr.y, lat.clr);
connect(one.y, chiWatRes1.u1);
connect(lat.y, chiWatRes1.u2);
connect(chiWatRes1.y, chiWatRes2.u3);
connect(chiWatRes2.y, chiWatRes3.u3);
connect(zer.y, chiWatRes1.u3);
connect(chiWatRes3.y, yChiWatResReq);
connect(greThr2.y, lat1.u);
connect(uCooCoiSet, lesThr1.u);
connect(lesThr1.y, lat1.clr);
connect(lat1.y, intSwi3.u2);
connect(one.y, intSwi3.u1);
connect(zer.y, intSwi3.u3);
connect(intSwi3.y, yChiPlaReq);
connect(TAirSupSet, heaSupTemDif.u1);
connect(TAirSup, heaSupTemDif.u2);
connect(greThr3.y, truDel2.u);
connect(greThr4.y, truDel3.u);
connect(heaSupTemDif.y, greThr3.u);
connect(heaSupTemDif.y, greThr4.u);
connect(truDel2.y, hotWatRes3.u2);
connect(thr.y, hotWatRes3.u1);
connect(hotWatRes2.y, hotWatRes3.u3);
connect(two.y, hotWatRes2.u1);
connect(truDel3.y, hotWatRes2.u2);
connect(hotWatRes3.y, yHotWatResReq);
connect(uHeaCoiSet, greThr5.u);
connect(greThr5.y, lat2.u);
connect(uHeaCoiSet, lesThr2.u);
connect(lesThr2.y, lat2.clr);
connect(lat2.y, hotWatRes1.u2);
connect(one.y, hotWatRes1.u1);
connect(zer.y, hotWatRes1.u3);
connect(hotWatRes1.y, hotWatRes2.u3);
connect(uHeaCoiSet, lesThr3.u);
connect(lesThr3.y, lat3.clr);
connect(greThr5.y, lat3.u);
connect(lat3.y, intSwi1.u2);
connect(one.y, intSwi1.u1);
connect(zer.y, intSwi1.u3);
connect(intSwi1.y, yHotWatPlaReq);
end PlantRequests;
Relief damper control for AHUs using actuated dampers without fan
Information
Sequence for controlling actuated relief damper yRelDam
for AHUs using
actuated relief damper without a fan.
It is implemented according to Section 5.16.8 of ASHRAE Guideline G36, May 2020.
-
Relief dampers shall be enabled when the associated supply fan is proven on
(
u1SupFan = true
), and disabled otherwise.
-
When enabled, use a P-only control loop to modulate relief dampers to maintain building
static pressure
dpBui
at its setpoint, which is by defaul
12 Pa (0.05 inchWC).
-
Close damper when disabled.
Parameters
Type | Name | Default | Description |
Real | dpBuiSet | 12 | Building static pressure difference relative to ambient (positive to pressurize the building) [Pa] |
Real | k | 0.5 | Gain, applied to building pressure control error normalized with dpBuiSet [1] |
Connectors
Type | Name | Description |
input RealInput | dpBui | Building static pressure difference, relative to ambient (positive if pressurized) [Pa] |
input BooleanInput | u1SupFan | Supply fan status |
output RealOutput | yRelDam | Relief damper commanded position [1] |
Modelica definition
block ReliefDamper
parameter Real dpBuiSet(
final unit="Pa",
final quantity="PressureDifference",
max=30) = 12
;
parameter Real k(min=0, unit="1") = 0.5
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput dpBui(
final unit="Pa",
displayUnit="Pa")
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1SupFan
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yRelDam(
final unit="1",
final min=0,
final max=1) ;
protected
Buildings.Controls.OBC.CDL.Reals.Switch swi
;
Buildings.Controls.OBC.CDL.Reals.Subtract conErr(
u1(
final unit="Pa", displayUnit="Pa"),
u2(
final unit="Pa", displayUnit="Pa"),
y(
final unit="Pa", displayUnit="Pa"))
;
Buildings.Controls.OBC.CDL.Reals.PID conP(
final controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.P,
final k=k,
final reverseActing=false)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant zerDam(
final k=0)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant dpBuiSetPoi(
final k=dpBuiSet) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant zer(
final k=0)
;
equation
connect(u1SupFan, swi.u2);
connect(dpBuiSetPoi.y, conErr.u2);
connect(conErr.y, conP.u_m);
connect(zer.y, conP.u_s);
connect(conP.y, swi.u1);
connect(zerDam.y, swi.u3);
connect(dpBui, conErr.u1);
connect(swi.y, yRelDam);
end ReliefDamper;
Sequence for control of relief fan in AHU
Information
Sequence for controling relief fan that is part of AHU. It is developed based on
Section 5.16.9 of ASHRAE Guideline 36, May 2020, with the modification to accommodate
the single relief fan control.
-
The relief fan shall be enabled when the AHU supply fan is proven ON
(
u1SupFan=true
), and shall be disabled otherwise.
-
Building static pressure (
dpBui
) shall be time averaged with a sliding
5-minute window and 15 second sampling rate (to dampen fluctuations). The average
value shall be that displayed and used for control.
-
A P-only control loop maintains the building pressure at a set point (
dpBuiSet
)
of 12 Pa (0.05 in. of water) with an output ranging from 0% to 100%. The loop is disabled
and output set to zero when the relief fan is disabled.
-
Fan speed shall be equal to the PID signal but no less than the minimum speed.
-
When relief system is enabled, and the control loop
output is above 5%, open the motorized dampers to the relief fans;
close the dampers when the loop output drops to 0% for 5 minutes.
-
When the control loop output is above minimum speed (
relFanSpe_min
) plus 15%
by 7 minutes, start the relief fan.
-
When the control loop output is below minimum speed (
relFanSpe_min
)
by 5 minutes, shut off the relief fan.
Parameters
Type | Name | Default | Description |
Real | relFanSpe_min | 0.1 | Relief fan minimum speed |
Real | dpBuiSet | 12 | Building static pressure difference relative to ambient (positive to pressurize the building) [Pa] |
Pressure controller |
Real | k | 1 | Gain, normalized using dpBuiSet [1] |
Advanced |
Real | hys | 0.005 | Hysteresis for checking the controller output value |
Connectors
Type | Name | Description |
input RealInput | dpBui | Building static pressure difference, relative to ambient (positive if pressurized) [Pa] |
input BooleanInput | u1SupFan | AHU supply fan proven on status |
output RealOutput | yDpBui | Building static pressure difference, relative to ambient (positive if pressurized) [Pa] |
output BooleanOutput | y1RelDam | True: 2-position relief damper commanded open |
output RealOutput | yRelFan | Relief fan commanded speed [1] |
output BooleanOutput | y1RelFan | Relief fan commanded on |
Modelica definition
block ReliefFan
parameter Real relFanSpe_min(
final min=0,
final max=1)= 0.1
;
parameter Real dpBuiSet(
final unit="Pa",
final quantity="PressureDifference",
final max=30) = 12
;
parameter Real k(
final unit="1") = 1
;
parameter Real hys = 0.005
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput dpBui(
final unit="Pa",
displayUnit="Pa",
final quantity="PressureDifference")
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1SupFan
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yDpBui(
final unit="Pa",
displayUnit="Pa",
final quantity="PressureDifference")
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1RelDam
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yRelFan(
final unit="1",
final max=1)
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1RelFan
;
Buildings.Controls.OBC.CDL.Reals.MovingAverage movMea(
final delta=300)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant dpBuiSetPoi(
final k=dpBuiSet)
;
Buildings.Controls.OBC.CDL.Reals.Divide div1
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant conOne(
final k=1)
;
Buildings.Controls.OBC.CDL.Reals.PID conP(
final controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.P,
final k=k,
final reverseActing=false)
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr(
final t=0.05,
final h=hys)
;
Buildings.Controls.OBC.CDL.Reals.LessThreshold lesThr(
final t=0.005,
final h=hys)
;
Buildings.Controls.OBC.CDL.Logical.Timer tim(
final t=300)
;
Buildings.Controls.OBC.CDL.Logical.And and2
;
Buildings.Controls.OBC.CDL.Logical.Latch lat
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr2(
final t=relFanSpe_min + 0.15,
final h=hys)
;
Buildings.Controls.OBC.CDL.Logical.Timer upTim(
final t=420)
;
Buildings.Controls.OBC.CDL.Reals.LessThreshold lesThr3(
final t=relFanSpe_min,
final h=hys)
;
Buildings.Controls.OBC.CDL.Logical.Timer dowTim(
final t=300)
;
Buildings.Controls.OBC.CDL.Logical.Latch lat1
;
Buildings.Controls.OBC.CDL.Logical.Or relDam
;
Buildings.Controls.OBC.CDL.Logical.And relFan
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea2
;
Buildings.Controls.OBC.CDL.Reals.Multiply pro1 ;
equation
connect(dpBui, movMea.u);
connect(dpBuiSetPoi.y, div1.u2);
connect(movMea.y, div1.u1);
connect(div1.y, conP.u_m);
connect(conOne.y, conP.u_s);
connect(conP.y, greThr.u);
connect(greThr.y, and2.u1);
connect(conP.y, lesThr.u);
connect(lesThr.y, tim.u);
connect(tim.passed, lat.clr);
connect(and2.y, lat.u);
connect(u1SupFan, and2.u2);
connect(conP.y, greThr2.u);
connect(greThr2.y, upTim.u);
connect(conP.y, lesThr3.u);
connect(lesThr3.y, dowTim.u);
connect(upTim.passed, lat1.u);
connect(dowTim.passed, lat1.clr);
connect(lat.y, relDam.u1);
connect(u1SupFan, relFan.u1);
connect(lat1.y, relFan.u2);
connect(relFan.y, relDam.u2);
connect(relFan.y, booToRea2.u);
connect(booToRea2.y, pro1.u2);
connect(conP.y, pro1.u1);
connect(movMea.y, yDpBui);
connect(pro1.y, yRelFan);
connect(relFan.y, y1RelFan);
connect(relDam.y, y1RelDam);
end ReliefFan;
Sequence for controlling relief fan group
Information
Sequence for controlling group of relief fans and their dampers for AHUs using actuated
relief dampers with relief fan(s). It is developed based on Section 5.16.9 of ASHRAE
Guideline 36, May 2020.
-
All operating relief fans that serve a common or shared air volume shall be grouped
and controlled as if they were one system, running at the same speed and using the same
control loop, even if they are associated with different AHUs.
-
A relief fan shall be enabled when its associated supply fan is proven ON
(
u1SupFan=true
), and shall be disabled otherwise.
-
Building static pressure (
dpBui
) shall be time averaged with a sliding
5-minute window and 15 second sampling rate (to dampen fluctuations). The average
value shall be that displayed and used for control.
-
A P-only control loop maintains the building pressure at a set point (
dpBuiSet
)
of 12 Pa (0.05 in. of water) with an output ranging from 0% to 100%. The loop is disabled
and output set to zero when all fans in the relief system group are disabled.
-
Fan speed signal to all operating fans in the relief system group shall be the same
and shall be equal to the PID signal but no less than the minimum speed. Except for
Stage 0, discharge dampers of all relief fans shall be open only when fan is commanded
ON.
-
Stage 0 (barometric relief). When relief system is enabled, and the control loop
output is above 5%, open the motorized dampers to all relief fans serving the relief
system group that are enabled; close the dampers when the loop output drops to 0% for
5 minutes.
-
Stage Up. When control loop output is above minimum speed (
relFanSpe_min
)
plus 15%, start stage-up timer. Each time the timer reaches 7 minutes, start the next
relief fan (and open the associated damper) in the relief system group, per staging order,
and reset the timer to 0. The timer is reset to 0 and frozen if control loop is below minimum
speed plus 15%. Note, when staging from Stage 0 (no relief fans) to Stage 1 (one relief
fan), the discharge dampers of all nonoperating relief fans must be closed.
-
Stage Down. When PID loop is below minimum speed (
relFanSpe_min
), start stage-down
timer. Each time the timer reaches 5 minutes, shut off lag fan per staging order and
reset the timer to 0. The timer is reset to 0 and frozen if PID loop rises above minimum
speed or all fans are OFF. If all fans are OFF, go to Stage 0 (all dampers open and all
fans OFF).
-
For fans in a Level 2 alarm and status is OFF, discharge damper shall be closed when
is above Stage 0.
Parameters
Type | Name | Default | Description |
Integer | nSupFan | 2 | Total number of AHU supply fans that are serving the same common space |
Integer | nRelFan | 4 | Total number of relief fans that are serving the same common space |
Real | relFanSpe_min | 0.1 | Relief fan minimum speed |
Integer | staVec[nRelFan] | {2,3,1,4} | Vector of the order for staging up relief fan, i.e. the 1st element means the 1st relief fan and its value showing its sequence when staging up |
Integer | relFanMat[nRelFan, nSupFan] | {{1,0},{1,0},{0,1},{0,1}} | Relief fan matrix with relief fan as row index and AHU supply fan as column index. It flags which relief fan is associated with which supply fan |
Real | dpBuiSet | 12 | Building static pressure difference relative to ambient (positive to pressurize the building) [Pa] |
Pressure controller |
Real | k | 1 | Gain, normalized using dpBuiSet [1] |
Advanced |
Real | hys | 0.005 | Hysteresis for checking the controller output value |
Connectors
Type | Name | Description |
input BooleanInput | u1SupFan[nSupFan] | AHU supply fan proven on status |
input RealInput | dpBui | Building static pressure difference, relative to ambient (positive if pressurized) [Pa] |
input IntegerInput | uRelFanAla[nRelFan] | Relief fan current alarm index |
input BooleanInput | u1RelFan[nRelFan] | Relief fan proven on status |
output RealOutput | yDpBui | Building static pressure difference, relative to ambient (positive if pressurized) [Pa] |
output RealOutput | yRelFan[nRelFan] | Relief fan commanded speed [1] |
output RealOutput | yDam[nRelFan] | Damper commanded position [1] |
Modelica definition
block ReliefFanGroup
parameter Integer nSupFan = 2
;
parameter Integer nRelFan = 4
;
parameter Real relFanSpe_min(
final min=0,
final max=1)= 0.1
;
parameter Integer staVec[nRelFan] = {2,3,1,4}
;
parameter Integer relFanMat[nRelFan, nSupFan] = {{1,0},{1,0},{0,1},{0,1}}
;
parameter Real dpBuiSet(
final unit="Pa",
final quantity="PressureDifference",
final max=30) = 12
;
parameter Real k(
final unit="1") = 1
;
parameter Real hys = 0.005
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1SupFan[nSupFan]
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput dpBui(
final unit="Pa",
displayUnit="Pa",
final quantity="PressureDifference")
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uRelFanAla[nRelFan]
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1RelFan[nRelFan]
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yDpBui(
final unit="Pa",
displayUnit="Pa",
final quantity="PressureDifference")
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yRelFan[nRelFan](
final unit=
fill("1", nRelFan),
final max=
fill(1, nRelFan)) ;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yDam[nRelFan](
final unit=
fill("1",nRelFan),
final min=
fill(0,nRelFan),
final max=
fill(1,nRelFan)) ;
Buildings.Controls.OBC.CDL.Reals.MatrixGain enaRel(
final K=relFanMat)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea[nSupFan]
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai[nRelFan](
final k=staVec)
;
Buildings.Controls.OBC.CDL.Reals.MovingAverage movMea(
final delta=300)
;
Buildings.Controls.OBC.CDL.Reals.Divide div1
;
Buildings.Controls.OBC.CDL.Reals.PID conP(
final controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.P,
final k=k,
final reverseActing=false)
;
Buildings.Controls.OBC.CDL.Logical.MultiOr enaRelGro(
final nin=nSupFan)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea1
;
Buildings.Controls.OBC.CDL.Reals.Multiply pro
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr(
final t=0.05,
final h=hys)
;
Buildings.Controls.OBC.CDL.Logical.And and2
;
Buildings.Controls.OBC.CDL.Logical.Latch lat ;
Buildings.Controls.OBC.CDL.Reals.LessThreshold lesThr(
final t=0.005,
final h=hys)
;
Buildings.Controls.OBC.CDL.Logical.Timer tim(
final t=300)
;
Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicator booRep(
final nout=nRelFan)
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr1[nRelFan](
final t=
fill(0.5, nRelFan))
;
Buildings.Controls.OBC.CDL.Logical.And enaDam[nRelFan]
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr2(
final t=relFanSpe_min + 0.15,
final h=hys)
;
Buildings.Controls.OBC.CDL.Logical.Timer upTim(
final t=420)
;
Buildings.Controls.OBC.CDL.Logical.Pre pre(
final pre_u_start=true)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea2[nRelFan]
;
Buildings.Controls.OBC.CDL.Reals.Subtract sub2[nRelFan]
;
Buildings.Controls.OBC.CDL.Reals.Multiply pro1[nRelFan]
;
Buildings.Controls.OBC.CDL.Reals.MultiMin mulMin(nin=nRelFan)
;
Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator reaRep(
final nout=nRelFan)
;
Buildings.Controls.OBC.CDL.Reals.Subtract sub1[nRelFan]
;
Buildings.Controls.OBC.CDL.Reals.LessThreshold lesThr1[nRelFan](
final t=
fill(0.5, nRelFan))
;
Buildings.Controls.OBC.CDL.Reals.AddParameter addPar[nRelFan](
final p=
fill(nRelFan + 1, nRelFan))
;
Buildings.Controls.OBC.CDL.Reals.Switch swi[nRelFan]
;
Buildings.Controls.OBC.CDL.Reals.Abs abs1[nRelFan]
;
Buildings.Controls.OBC.CDL.Reals.LessThreshold lesThr2[nRelFan](
final t=
fill(0.5, nRelFan))
;
Buildings.Controls.OBC.CDL.Logical.Or or2[nRelFan]
;
Buildings.Controls.OBC.CDL.Logical.Latch lat2
;
Buildings.Controls.OBC.CDL.Reals.LessThreshold lesThr3(
final t=relFanSpe_min,
final h=hys)
;
Buildings.Controls.OBC.CDL.Logical.Timer dowTim(
final t=300)
;
Buildings.Controls.OBC.CDL.Logical.Pre pre1(
final pre_u_start=true)
;
Buildings.Controls.OBC.CDL.Reals.Multiply pro2[nRelFan]
;
Buildings.Controls.OBC.CDL.Reals.AddParameter addPar1[nRelFan](
final p=
fill(nRelFan + 1, nRelFan))
;
Buildings.Controls.OBC.CDL.Reals.LessThreshold lesThr4[nRelFan](
final t=
fill(0.5, nRelFan))
;
Buildings.Controls.OBC.CDL.Reals.Switch swi1[nRelFan]
;
Buildings.Controls.OBC.CDL.Reals.MultiMin mulMin1(
final nin=nRelFan) ;
Buildings.Controls.OBC.CDL.Reals.Subtract sub3[nRelFan]
;
Buildings.Controls.OBC.CDL.Reals.Abs abs2[nRelFan]
;
Buildings.Controls.OBC.CDL.Reals.LessThreshold lesThr5[nRelFan](
final t=
fill(0.5, nRelFan))
;
Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator reaRep1(
final nout=nRelFan)
;
Buildings.Controls.OBC.CDL.Logical.Xor xor[nRelFan]
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt[nRelFan]
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt1[nRelFan]
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt2[nRelFan]
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu[nRelFan]
;
Buildings.Controls.OBC.CDL.Logical.MultiAnd mulAnd(
final nin=nRelFan)
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu1[nRelFan]
;
Buildings.Controls.OBC.CDL.Logical.MultiAnd mulAnd2(
final nin=nRelFan)
;
Buildings.Controls.OBC.CDL.Logical.Latch lat1
;
Buildings.Controls.OBC.CDL.Logical.Switch logSwi[nRelFan]
;
Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicator booRep1(
final nout=nRelFan)
;
Buildings.Controls.OBC.CDL.Logical.Switch logSwi1[nRelFan]
;
Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicator booRep2(
final nout=nRelFan)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea3[nRelFan]
;
Buildings.Controls.OBC.CDL.Reals.Limiter lim(
final uMax=1,
final uMin=relFanSpe_min)
;
Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator reaRep2(
final nout=nRelFan)
;
Buildings.Controls.OBC.CDL.Reals.Multiply pro3[nRelFan]
;
Buildings.Controls.OBC.CDL.Logical.Switch logSwi2[nRelFan]
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant dpBuiSetPoi(
final k=dpBuiSet)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant conOne(
final k=1)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant con(
final k=0)
;
Buildings.Controls.OBC.CDL.Reals.Switch swi2
;
Buildings.Controls.OBC.CDL.Logical.MultiOr mulOr(nin=nRelFan)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea4[nRelFan]
;
Buildings.Controls.OBC.CDL.Logical.Not not1
;
Buildings.Controls.OBC.CDL.Logical.And and1
;
Buildings.Controls.OBC.CDL.Logical.And and3
;
Buildings.Controls.OBC.CDL.Logical.Not not2 ;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu2[nRelFan]
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt[nRelFan](
final k=
fill(2, nRelFan))
;
Buildings.Controls.OBC.CDL.Logical.Not not3[nRelFan] ;
Buildings.Controls.OBC.CDL.Logical.And and4[nRelFan]
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea5[nRelFan](
final realTrue=
fill(0, nRelFan),
final realFalse=
fill(1, nRelFan))
;
Buildings.Controls.OBC.CDL.Reals.Multiply mul[nRelFan]
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr3[nRelFan](
final t=
fill(0.5, nRelFan))
;
Buildings.Controls.OBC.CDL.Logical.MultiAnd mulAnd1(
final nin=nRelFan) ;
Buildings.Controls.OBC.CDL.Reals.Switch swi3[nRelFan]
;
Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicator booRep4(
final nout=nRelFan)
;
Buildings.Controls.OBC.CDL.Logical.Switch logSwi3[nRelFan]
;
Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel[nRelFan](
final delayTime=
fill(2, nRelFan))
;
Buildings.Controls.OBC.CDL.Logical.MultiOr mulOr1(
final nin=nRelFan)
;
Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicator booRep5(
final nout=nRelFan)
;
Buildings.Controls.OBC.CDL.Logical.Not not5[nRelFan] ;
Buildings.Controls.OBC.CDL.Logical.Not not6[nRelFan] ;
Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel1[nRelFan](
final delayTime=
fill(2, nRelFan))
;
equation
connect(u1SupFan, booToRea.u);
connect(enaRel.u, booToRea.y);
connect(enaRel.y, gai.u);
connect(dpBui, movMea.u);
connect(conOne.y, conP.u_s);
connect(movMea.y, div1.u1);
connect(dpBuiSetPoi.y, div1.u2);
connect(div1.y, conP.u_m);
connect(u1SupFan, enaRelGro.u);
connect(booToRea1.y, pro.u1);
connect(enaRelGro.y, booToRea1.u);
connect(conP.y, greThr.u);
connect(enaRelGro.y, and2.u2);
connect(greThr.y, and2.u1);
connect(and2.y, lat.u);
connect(conP.y, lesThr.u);
connect(lesThr.y, tim.u);
connect(tim.passed, lat.clr);
connect(lat.y, booRep.u);
connect(gai.y, greThr1.u);
connect(greThr1.y, enaDam.u1);
connect(booRep.y, enaDam.u2);
connect(u1RelFan, booToRea2.u);
connect(enaRel.y, sub2.u1);
connect(booToRea2.y, sub2.u2);
connect(gai.y, pro1.u1);
connect(sub2.y, pro1.u2);
connect(mulMin.y, reaRep.u);
connect(lesThr1.y, swi.u2);
connect(pro1.y, swi.u3);
connect(pro1.y, addPar.u);
connect(addPar.y, swi.u1);
connect(gai.y, sub1.u1);
connect(reaRep.y, sub1.u2);
connect(sub1.y, abs1.u);
connect(abs1.y, lesThr2.u);
connect(lesThr2.y, or2.u1);
connect(booToRea2.y, pro2.u2);
connect(gai.y, pro2.u1);
connect(pro2.y, addPar1.u);
connect(pro2.y, lesThr4.u);
connect(lesThr4.y, swi1.u2);
connect(addPar1.y, swi1.u1);
connect(pro2.y, swi1.u3);
connect(swi1.y, mulMin1.u);
connect(mulMin1.y, reaRep1.u);
connect(reaRep1.y, sub3.u2);
connect(gai.y, sub3.u1);
connect(sub3.y, abs2.u);
connect(abs2.y, lesThr5.u);
connect(lesThr5.y, xor.u1);
connect(booToInt.y, intEqu.u1);
connect(booToInt1.y, intEqu.u2);
connect(intEqu.y, mulAnd.u);
connect(booToInt1.y, intEqu1.u1);
connect(booToInt2.y, intEqu1.u2);
connect(intEqu1.y, mulAnd2.u);
connect(lat2.y, booRep1.u);
connect(lat1.y, booRep2.u);
connect(booRep2.y, logSwi1.u2);
connect(mulAnd2.y, lat1.clr);
connect(conP.y, lesThr3.u);
connect(xor.y, logSwi1.u1);
connect(conP.y, greThr2.u);
connect(booRep1.y, logSwi.u2);
connect(or2.y, logSwi.u1);
connect(u1RelFan, xor.u2);
connect(u1RelFan, logSwi1.u3);
connect(u1RelFan, booToInt1.u);
connect(u1RelFan, or2.u2);
connect(logSwi.y, booToRea3.u);
connect(conP.y, lim.u);
connect(lim.y, pro.u2);
connect(booToRea3.y, pro3.u2);
connect(pro3.y, yRelFan);
connect(reaRep2.y, pro3.u1);
connect(con.y, swi2.u3);
connect(mulOr.y, swi2.u2);
connect(movMea.y, yDpBui);
connect(logSwi2.y, booToRea4.u);
connect(not1.y, pre.u);
connect(and1.y, upTim.u);
connect(greThr2.y, and1.u1);
connect(not2.y, pre1.u);
connect(lesThr3.y, and3.u1);
connect(and3.y, dowTim.u);
connect(uRelFanAla, intEqu2.u1);
connect(conInt.y, intEqu2.u2);
connect(u1RelFan, not3.u);
connect(intEqu2.y, and4.u1);
connect(not3.y, and4.u2);
connect(and4.y, booToRea5.u);
connect(booToRea4.y, mul.u1);
connect(booToRea5.y, mul.u2);
connect(mul.y, yDam);
connect(enaDam.y, logSwi2.u3);
connect(logSwi.y, logSwi2.u1);
connect(upTim.passed, not1.u);
connect(upTim.passed, lat2.u);
connect(dowTim.passed, not2.u);
connect(dowTim.passed, lat1.u);
connect(enaRel.y, greThr3.u);
connect(greThr3.y, mulOr.u);
connect(pro.y, swi2.u1);
connect(swi2.y, reaRep2.u);
connect(pro1.y, lesThr1.u);
connect(not3.y, mulAnd1.u);
connect(mulAnd1.y, booRep4.u);
connect(booRep4.y, swi3.u2);
connect(pro1.y, swi3.u1);
connect(swi.y, swi3.u3);
connect(swi3.y, mulMin.u);
connect(pre1.y, and3.u2);
connect(u1RelFan, logSwi3.u1);
connect(booRep4.y, logSwi3.u2);
connect(logSwi1.y, logSwi3.u3);
connect(logSwi3.y, logSwi.u3);
connect(pre.y, and1.u2);
connect(truDel.y, booToInt.u);
connect(or2.y, truDel.u);
connect(mulAnd.y, lat2.clr);
connect(logSwi.y, mulOr1.u);
connect(mulOr1.y, booRep5.u);
connect(booRep5.y, logSwi2.u2);
connect(not6.y, booToInt2.u);
connect(truDel1.y, not6.u);
connect(not5.y, truDel1.u);
connect(xor.y, not5.u);
end ReliefFanGroup;
Return fan control for AHUs using return fan with airflow tracking
Information
Sequence for controlling return fan yRetFan
for AHUs using return fan
with airflow tracking.
It is implemented according to Section 5.16.11 of ASHRAE Guideline G36, May 2020.
-
Return fan operates whenever associated supply fan is proven on
(
u1SupFan = true
).
-
Return fan speed shall be controlled to maintain return airflow equal to supply
airflow less differential
difFloSet
, as determined per section 3.2.1.5.
-
Relief or exhaust dampers shall be enabled when the associated supply and return
fans are proven on and closed otherwise. Exhaust dampers shall modulate as the inverse
of the return air damper per section 5.16.2.3. This is implemented in
Buildings.Controls.OBC.ASHRAE.G36.AHUs.MultiZone.VAV.Economizers.Subsequences.Modulations.ReturnFan
Parameters
Type | Name | Default | Description |
Real | difFloSet | | Airflow differential between supply air and return air fans required to maintain building pressure at desired pressure [m3/s] |
Fan controller |
SimpleController | conTyp | Buildings.Controls.OBC.CDL.T... | Type of controller |
Real | k | 1 | Gain, normalized using dpBuiSet [1] |
Real | Ti | 0.5 | Time constant of integrator block [s] |
Real | Td | 0.1 | Time constant of derivative block [s] |
Real | maxSpe | 1 | Upper limit of output |
Real | minSpe | 0 | Lower limit of output |
Connectors
Type | Name | Description |
input RealInput | VAirSup_flow | Measured AHU supply airflow rate [m3/s] |
input RealInput | VAirRet_flow | Measured AHU return airflow rate [m3/s] |
input BooleanInput | u1SupFan | Supply fan status |
output RealOutput | yRetFan | Return fan commanded speed [1] |
output BooleanOutput | y1RetFan | Return fan commanded on |
Modelica definition
block ReturnFanAirflowTracking
parameter Real difFloSet(
final unit="m3/s",
final quantity="VolumeFlowRate")
;
parameter Buildings.Controls.OBC.CDL.Types.SimpleController conTyp=
Buildings.Controls.OBC.CDL.Types.SimpleController.PI
;
parameter Real k(
final unit="1") = 1
;
parameter Real Ti(
final unit="s",
final quantity="Time")=0.5
;
parameter Real Td(
final unit="s",
final quantity="Time")=0.1
;
parameter Real maxSpe=1
;
parameter Real minSpe=0
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput VAirSup_flow(
final unit="m3/s",
final min=0,
final quantity="VolumeFlowRate") ;
Buildings.Controls.OBC.CDL.Interfaces.RealInput VAirRet_flow(
final unit="m3/s",
final min=0,
final quantity="VolumeFlowRate") ;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1SupFan
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yRetFan(
final unit="1",
final min=0,
final max=1) ;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1RetFan
;
Buildings.Controls.OBC.CDL.Reals.PID conP(
final controllerType=conTyp,
final k=k,
final Ti=Ti,
final Td=Td,
final yMax=maxSpe,
final yMin=minSpe)
;
protected
Buildings.Controls.OBC.CDL.Reals.Switch swi
;
Buildings.Controls.OBC.CDL.Reals.Subtract conErr(
u1(
final unit="m3/s", displayUnit="m3/s"),
u2(
final unit="m3/s", displayUnit="m3/s"),
y(
final unit="m3/s", displayUnit="m3/s"))
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant zerSpe(
final k=0) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant difFlo(
final k=difFloSet) ;
equation
connect(u1SupFan, swi.u2);
connect(zerSpe.y, swi.u3);
connect(swi.y,yRetFan);
connect(VAirSup_flow, conErr.u1);
connect(difFlo.y, conErr.u2);
connect(conErr.y, conP.u_s);
connect(VAirRet_flow, conP.u_m);
connect(conP.y, swi.u1);
connect(u1SupFan, y1RetFan);
end ReturnFanAirflowTracking;
Return fan control with direct building pressure control
Information
Setpoint for return fan discharge pressure and relief air damper
for a multi zone VAV AHU according to Section 5.16.10 of ASHRAE Guideline G36, May 2020.
Note that this sequence assumes that the AHU units with return fan having the
return fan with direct building pressure control have the minimum outdoor air damper.
-
Return fan operates whenever associated supply fan is proven on and is
off otherwise.
-
Return fan is controlled to maintain return fan discharge static pressure
at setpoint dpBuiSet
.
-
Relief damper is only enabled when the associated supply and return
fans are proven on (u1SupFan=true
) and the minimum outdoor air damper is open
(to be controlled in a separate sequence).
The relief dampers is closed when the fan is disabled.
-
The building static pressure is time averaged with a sliding 5-minute window
to dampen fluctuations. The averaged value shall be displayed and is used
for control.
-
When the relief damper is enabled, a control loop modulates the relief damper
in sequence with the return fan static pressure setpoint as shown in the figure
below to maintain the building pressure equal to dpBuiSet
,
which is by default 12 Pa (0.05 inches).
The output signal of the building pressure control is as follows:
-
From 0 to 0.5, the building pressure control loop modulates the exhaust
dampers from
yRelDam = 0
(closed) to yRelDam = 1
(open).
-
From 0.5 to 1, the building pressure control loop resets the return fan
discharge static pressure setpoint from
p_rel_RetFan_min
to p_rel_RetFan_max
. The p_rel_RetFan_min
and
p_rel_RetFan_max
are specified in Section 3.2.1.4.
Parameters
Type | Name | Default | Description |
Real | dpBuiSet | 12 | Building static pressure difference relative to ambient (positive to pressurize the building) [Pa] |
Real | p_rel_RetFan_min | 2.4 | Return fan discharge static pressure difference minimum setpoint,no less than 2.4 Pa [Pa] |
Real | p_rel_RetFan_max | 40 | Return fan discharge static pressure maximum setpoint [Pa] |
Real | disSpe_min | | Return fan speed when providing the minimum return fan discharge static pressure difference [1] |
Real | disSpe_max | | Return fan speed when providing the maximum return fan discharge static pressure difference [1] |
Pressure controller |
SimpleController | conTyp | Buildings.Controls.OBC.CDL.T... | Type of controller |
Real | k | 1 | Gain, normalized using dpBuiSet [1] |
Real | Ti | 0.5 | Time constant of integrator block [s] |
Real | Td | 0.1 | Time constant of derivative block [s] |
Connectors
Type | Name | Description |
input RealInput | dpBui | Building static pressure difference, relative to ambient (positive if pressurized) [Pa] |
input BooleanInput | u1MinOutAirDam | Minimum outdoor air damper status, true when it is open |
input BooleanInput | u1SupFan | Supply fan status |
output RealOutput | yDpBui | Averaged building static pressure [Pa] |
output RealOutput | yRelDam | Relief damper commanded position [1] |
output RealOutput | dpDisSet | Return fan discharge static pressure setpoint [Pa] |
output RealOutput | yRetFan | Return fan commanded speed [1] |
output BooleanOutput | y1RetFan | Return fan commanded on |
Modelica definition
block ReturnFanDirectPressure
parameter Real dpBuiSet(
final unit="Pa",
final quantity="PressureDifference",
final max=30) = 12
;
parameter Real p_rel_RetFan_min(
final unit="Pa",
final quantity="PressureDifference",
final min=0,
final max=1000) = 2.4
;
parameter Real p_rel_RetFan_max(
final unit="Pa",
final quantity="PressureDifference",
final min=0,
final max=1000) = 40
;
parameter Real disSpe_min(
final unit="1",
final min=0,
final max=1)
;
parameter Real disSpe_max(
final unit="1",
final min=0,
final max=1)
;
parameter Buildings.Controls.OBC.CDL.Types.SimpleController conTyp=
Buildings.Controls.OBC.CDL.Types.SimpleController.PI
;
parameter Real k(
final unit="1") = 1
;
parameter Real Ti(
final unit="s",
final quantity="Time")=0.5
;
parameter Real Td(
final unit="s",
final quantity="Time")=0.1
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput dpBui(
final unit="Pa",
displayUnit="Pa")
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1MinOutAirDam
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1SupFan
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yDpBui(
final unit="Pa",
displayUnit="Pa")
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yRelDam(
final unit="1",
final min=0,
final max=1)
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput dpDisSet(
final unit="Pa",
displayUnit="Pa",
final min=0) ;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yRetFan(
final unit="1",
final min=0,
final max=1)
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1RetFan
;
Buildings.Controls.OBC.CDL.Reals.MovingAverage movMea(
final delta=300)
;
Buildings.Controls.OBC.CDL.Reals.PID conP(
final controllerType=conTyp,
final k=k,
final Ti=Ti,
final Td=Td)
;
Buildings.Controls.OBC.CDL.Reals.Line linExhAirDam
;
Buildings.Controls.OBC.CDL.Reals.Line linRetFanStaPre
;
Buildings.Controls.OBC.CDL.Reals.Switch swi1
;
Buildings.Controls.OBC.CDL.Reals.Switch swi
;
Buildings.Controls.OBC.CDL.Reals.Divide div ;
Buildings.Controls.OBC.CDL.Reals.Line linRetFanSpe ;
Buildings.Controls.OBC.CDL.Reals.Switch swi2
;
protected
Buildings.Controls.OBC.CDL.Reals.Sources.Constant dpBuiSetPoi(
final k=dpBuiSet) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant retFanDisPreMin(
final k=p_rel_RetFan_min) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant retFanDisPreMax(
final k=p_rel_RetFan_max) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant zer(
final k=0)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant zer1(
final k=0)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant con(
final k=0.5)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant one(
final k=1)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant conOne(
final k=1)
;
Buildings.Controls.OBC.CDL.Logical.And enaDam
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant retFanSpeMin(
final k=disSpe_min)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant retFanSpeMax(
final k=disSpe_max)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant zer2(
final k=0)
;
equation
connect(movMea.u, dpBui);
connect(swi.u2, u1SupFan);
connect(swi.u3, zer.y);
connect(zer1.y, linExhAirDam.x1);
connect(zer1.y, linExhAirDam.f1);
connect(con.y, linExhAirDam.x2);
connect(one.y, linExhAirDam.f2);
connect(con.y, linRetFanStaPre.x1);
connect(one.y, linRetFanStaPre.x2);
connect(retFanDisPreMin.y, linRetFanStaPre.f1);
connect(retFanDisPreMax.y, linRetFanStaPre.f2);
connect(linRetFanStaPre.y, swi.u1);
connect(linExhAirDam.y, swi1.u1);
connect(swi1.y,yRelDam);
connect(zer1.y, swi1.u3);
connect(swi.y, dpDisSet);
connect(conP.y, linExhAirDam.u);
connect(conP.y, linRetFanStaPre.u);
connect(dpBuiSetPoi.y, div.u2);
connect(movMea.y, div.u1);
connect(conOne.y, conP.u_s);
connect(div.y, conP.u_m);
connect(movMea.y, yDpBui);
connect(u1MinOutAirDam, enaDam.u1);
connect(u1SupFan, enaDam.u2);
connect(enaDam.y, swi1.u2);
connect(linRetFanStaPre.y, linRetFanSpe.u);
connect(retFanDisPreMin.y, linRetFanSpe.x1);
connect(retFanSpeMin.y, linRetFanSpe.f1);
connect(retFanDisPreMax.y, linRetFanSpe.x2);
connect(retFanSpeMax.y, linRetFanSpe.f2);
connect(linRetFanSpe.y, swi2.u1);
connect(zer2.y, swi2.u3);
connect(u1SupFan, swi2.u2);
connect(swi2.y, yRetFan);
connect(u1SupFan, y1RetFan);
end ReturnFanDirectPressure;
Block to control multi zone VAV AHU supply fan
Information
Supply fan control for a multi zone VAV AHU according to Section 5.16.1 of
ASHRAE Guideline G36, May 2020.
Supply fan start/stop
- Supply fan shall run when system is in the Cool-down, Setup, or Occupied mode
- If there are any VAV-reheat boxes on perimeter zones, supply fan shall also
run when system is in Setback or Warmup mode
Static pressure setpoint reset
Static pressure setpoint shall be reset using trim-respond logic using following
parameters as a starting point:
Variable | Value | Definition |
Device | AHU Supply Fan | Associated device |
SP0 | iniSet | Initial setpoint |
SPmin | minSet | Minimum setpoint |
SPmax | maxSet | Maximum setpoint |
Td | delTim | Delay timer |
T | samplePeriod | Time step |
I | numIgnReq | Number of ignored requests |
R | uZonPreResReq | Number of requests |
SPtrim | triAmo | Trim amount |
SPres | resAmo | Respond amount |
SPres_max | maxRes | Maximum response per time interval |
Static pressure control
Supply fan speed is controlled with a PI controller to maintain duct static pressure at setpoint
when the fan is proven on. The setpoint for the PI controller and the measured
duct static pressure are normalized with the maximum design static presssure
maxSet
.
Where the zone groups served by the system are small,
provide multiple sets of gains that are used in the control loop as a function
of a load indicator (such as supply fan airflow rate, the area of the zone groups
that are occupied, etc.).
Parameters
Type | Name | Default | Description |
System configuration |
Boolean | have_perZonRehBox | false | Check if there is any VAV-reheat boxes on perimeter zones |
Trim and respond for pressure setpoint |
Real | iniSet | 120 | Initial setpoint [Pa] |
Real | minSet | 25 | Minimum setpoint [Pa] |
Real | maxSet | | Duct design maximum static pressure. It is the Max_DSP shown in Section 3.2.1.1 of Guideline 36 [Pa] |
Real | delTim | 600 | Delay time after which trim and respond is activated [s] |
Real | samplePeriod | 120 | Sample period [s] |
Integer | numIgnReq | 2 | Number of ignored requests |
Real | triAmo | -12.0 | Trim amount [Pa] |
Real | resAmo | 15 | Respond amount (must be opposite in to triAmo) [Pa] |
Real | maxRes | 32 | Maximum response per time interval (same sign as resAmo) [Pa] |
Fan PID controller |
SimpleController | controllerType | Buildings.Controls.OBC.CDL.T... | Type of controller |
Real | k | 0.1 | Gain of controller, normalized using maxSet [1] |
Real | Ti | 60 | Time constant of integrator block [s] |
Real | Td | 0.1 | Time constant of derivative block [s] |
Real | maxSpe | 1 | Maximum allowed fan speed [1] |
Real | minSpe | 0.1 | Lowest allowed fan speed if fan is on [1] |
Real | iniSpe | 0.1 | Initial speed when fan is enabled. It has to be greater than the lowest allowed speed [1] |
Connectors
Type | Name | Description |
input IntegerInput | uOpeMod | System operation mode |
input RealInput | dpDuc | Measured duct static pressure [Pa] |
input IntegerInput | uZonPreResReq | Zone static pressure reset requests |
output BooleanOutput | y1SupFan | Supply fan command on |
output RealOutput | ySupFan | Supply fan commanded speed [1] |
Modelica definition
block SupplyFan
parameter Boolean have_perZonRehBox = false
;
parameter Real iniSet(
final unit="Pa",
final quantity="PressureDifference") = 120
;
parameter Real minSet(
final unit="Pa",
final quantity="PressureDifference") = 25
;
parameter Real maxSet(
final unit="Pa",
final quantity="PressureDifference")
;
parameter Real delTim(
final unit="s",
final quantity="Time")= 600
;
parameter Real samplePeriod(
final unit="s",
final quantity="Time") = 120 ;
parameter Integer numIgnReq = 2
;
parameter Real triAmo(
final unit="Pa",
final quantity="PressureDifference") = -12.0
;
parameter Real resAmo(
final unit="Pa",
final quantity="PressureDifference") = 15
;
parameter Real maxRes(
final unit="Pa",
final quantity="PressureDifference") = 32
;
parameter Buildings.Controls.OBC.CDL.Types.SimpleController
controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI ;
parameter Real k(
final unit="1")=0.1
;
parameter Real Ti(
final unit="s",
final quantity="Time",
min=0)=60
;
parameter Real Td(
final unit="s",
final quantity="Time",
final min=0) = 0.1
;
parameter Real maxSpe(min=0.1, max=1, unit="1") = 1
;
parameter Real minSpe(min=0.1, max=1, unit="1") = 0.1
;
parameter Real iniSpe(min=minSpe, max=1, unit="1") = 0.1
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uOpeMod
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput dpDuc(
final unit="Pa",
final quantity="PressureDifference") ;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uZonPreResReq
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1SupFan
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput ySupFan(
min=0,
max=1,
final unit="1")
;
Buildings.Controls.OBC.ASHRAE.G36.Generic.TrimAndRespond staPreSetRes(
final iniSet=iniSet,
final minSet=minSet,
final maxSet=maxSet,
final delTim=delTim,
final samplePeriod=samplePeriod,
final numIgnReq=numIgnReq,
final triAmo=triAmo,
final resAmo=resAmo,
final maxRes=maxRes)
;
Buildings.Controls.OBC.CDL.Reals.PIDWithReset conSpe(
final controllerType=controllerType,
final k=k,
final Ti=Ti,
final Td=Td,
final yMax=maxSpe,
final yMin=minSpe,
final y_reset=iniSpe) ;
protected
Buildings.Controls.OBC.CDL.Reals.Sources.Constant zerSpe(k=0)
;
Buildings.Controls.OBC.CDL.Reals.Switch swi
;
Buildings.Controls.OBC.CDL.Logical.Or or1
;
Buildings.Controls.OBC.CDL.Logical.Or or2
if have_perZonRehBox
;
Buildings.Controls.OBC.CDL.Logical.Or or3
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant con(
k=false)
if not have_perZonRehBox
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt(
k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.coolDown)
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt4(
k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.warmUp)
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt1(
k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.setUp)
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt2(
k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.occupied)
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt3(
k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.setBack)
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu1
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu2
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu3
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu4
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant gaiNor(
final k=maxSet)
;
Buildings.Controls.OBC.CDL.Reals.Divide norPSet
;
Buildings.Controls.OBC.CDL.Reals.Divide norPMea
;
Buildings.Controls.OBC.CDL.Discrete.FirstOrderHold firOrdHol(
final samplePeriod=samplePeriod)
;
Buildings.Controls.OBC.CDL.Logical.Or or4
;
equation
connect(or2.y, or1.u2);
connect(or1.y, y1SupFan);
connect(or1.y, staPreSetRes.uDevSta);
connect(or1.y, swi.u2);
connect(conSpe.y, swi.u1);
connect(zerSpe.y, swi.u3);
connect(swi.y, ySupFan);
connect(uZonPreResReq, staPreSetRes.numOfReq);
connect(con.y, or1.u2);
connect(intEqu.y, or3.u1);
connect(intEqu1.y, or3.u2);
connect(conInt.y, intEqu.u2);
connect(conInt1.y, intEqu1.u2);
connect(conInt2.y, intEqu2.u2);
connect(conInt3.y, intEqu3.u2);
connect(conInt4.y, intEqu4.u2);
connect(uOpeMod, intEqu.u1);
connect(uOpeMod, intEqu1.u1);
connect(uOpeMod, intEqu2.u1);
connect(uOpeMod, intEqu3.u1);
connect(uOpeMod, intEqu4.u1);
connect(intEqu3.y, or2.u1);
connect(intEqu4.y, or2.u2);
connect(norPSet.y, conSpe.u_s);
connect(norPMea.y, conSpe.u_m);
connect(staPreSetRes.y, firOrdHol.u);
connect(conSpe.trigger, or1.y);
connect(gaiNor.y, norPSet.u2);
connect(dpDuc, norPMea.u1);
connect(gaiNor.y, norPMea.u2);
connect(firOrdHol.y, norPSet.u1);
connect(intEqu2.y, or4.u1);
connect(or4.y, or1.u1);
connect(or3.y, or4.u2);
end SupplyFan;
Multizone VAV AHU supply air temperature control loop and coil valves position
Information
Block that outputs the supply temperature control loop signal,
and the coil valve postions for VAV system with multiple zones,
implemented according to Section 5.16.2.3 of the ASHRAE Guideline G36, May 2020.
The supply air temperature control loop signal uTSup
is computed using a PI controller that tracks the supply air temperature
setpoint TSupSet
.
If the fan is off, then uTSup = 0
.
Heating valve control signal (or modulating electric heating
coil if applicable) yHeaCoi
and cooling valve control signal yCooCoi
are sequenced based on the supply air temperature control loop signal uTSup
.
From uTSup = uHea_max
to uTSup = -1
,
yHeaCoi
increases linearly from 0 to 1.
Similarly, uTSup = uCoo_min
to uTSup = +1
,
yCooCoi
increases linearly from 0 to 1.
The output uTSup
can be used in a controller for the economizer.
Parameters
Type | Name | Default | Description |
Boolean | have_heaCoi | true | True: the AHU has heating coil. It could be the hot water coil, or the electric heating coil |
Boolean | have_cooCoi | true | True: the AHU has cooling coil. It could be the chilled water coil, or the direct expansion coil |
SimpleController | controllerType | Buildings.Controls.OBC.CDL.T... | Type of controller for supply air temperature signal |
Real | kTSup | 0.05 | Gain of controller for supply air temperature signal [1/K] |
Real | TiTSup | 600 | Time constant of integrator block for supply temperature control signal [s] |
Real | TdTSup | 0.1 | Time constant of derivative block for supply temperature control signal [s] |
Real | uHea_max | -0.25 | Upper limit of controller signal when heating coil is off. Require -1 < uHea_max < uCoo_min < 1. [1] |
Real | uCoo_min | 0.25 | Lower limit of controller signal when cooling coil is off. Require -1 < uHea_max < uCoo_min < 1. [1] |
Connectors
Type | Name | Description |
input RealInput | TAirSup | Measured supply air temperature [K] |
input RealInput | TAirSupSet | Supply air temperature setpoint [K] |
input BooleanInput | u1SupFan | Supply fan status |
output RealOutput | yHeaCoi | Heating coil commanded position [1] |
output RealOutput | yCooCoi | Cooling coil commanded position [1] |
output RealOutput | uTSup | Supply temperature control signal [1] |
Modelica definition
block SupplySignals
parameter Boolean have_heaCoi=true
;
parameter Boolean have_cooCoi=true
;
parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerType=
Buildings.Controls.OBC.CDL.Types.SimpleController.PI
;
parameter Real kTSup(
final unit="1/K")=0.05
;
parameter Real TiTSup(
final unit="s",
final quantity="Time")=600
;
parameter Real TdTSup(
final unit="s",
final quantity="Time")=0.1
;
parameter Real uHea_max(
final min=-0.9,
final unit="1")=-0.25
;
parameter Real uCoo_min(
final max=0.9,
final unit="1")=0.25
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TAirSup(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TAirSupSet(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1SupFan
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yHeaCoi(
final min=0,
final max=1,
final unit="1")
if have_heaCoi ;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yCooCoi(
final min=0,
final max=1,
final unit="1")
if have_cooCoi
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput uTSup(
final max=1,
final unit="1",
final min=-1)
;
Buildings.Controls.OBC.CDL.Reals.PIDWithReset conTSup(
final controllerType=controllerType,
final k=kTSup,
final Ti=TiTSup,
final Td=TdTSup,
final yMax=1,
final yMin=-1,
final reverseActing=false,
final y_reset=0)
;
protected
Buildings.Controls.OBC.CDL.Reals.Switch swi
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant uHeaMaxCon(
final k=uHea_max)
if have_heaCoi
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant negOne(
final k=-1)
if have_heaCoi
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant uCooMinCon(
final k=uCoo_min)
if have_cooCoi
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant zer(
final k=0)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant one(
final k=1)
;
Buildings.Controls.OBC.CDL.Reals.Line conSigCoo(
final limitBelow=true,
final limitAbove=false)
if have_cooCoi
;
Buildings.Controls.OBC.CDL.Reals.Line conSigHea(
final limitBelow=false,
final limitAbove=true)
if have_heaCoi
;
equation
connect(zer.y,swi. u3);
connect(TAirSup, conTSup.u_m);
connect(negOne.y,conSigHea. x1);
connect(one.y,conSigHea. f1);
connect(swi.y,conSigHea. u);
connect(swi.y,conSigCoo. u);
connect(uHeaMaxCon.y,conSigHea. x2);
connect(zer.y,conSigHea. f2);
connect(uCooMinCon.y,conSigCoo. x1);
connect(zer.y,conSigCoo. f1);
connect(one.y,conSigCoo. x2);
connect(one.y,conSigCoo. f2);
connect(conSigHea.y, yHeaCoi);
connect(conSigCoo.y, yCooCoi);
connect(swi.y,uTSup);
connect(TAirSupSet, conTSup.u_s);
connect(u1SupFan, swi.u2);
connect(conTSup.y, swi.u1);
connect(u1SupFan, conTSup.trigger);
end SupplySignals;
Supply air temperature setpoint for multi zone system
Information
Block that outputs the supply air temperature setpoint and the coil valve control
inputs for VAV system with multiple zones, implemented according to Section 5.16.2 of
the ASHRAE Guideline G36, May 2020.
The control loop is enabled when the supply air fan u1SupFan
is proven on,
and disabled and the output set to deadband (no heating, minimum economizer) otherwise.
The supply air temperature setpoint is computed as follows.
Setpoints for TSupCoo_min
, TSupCoo_max
,
TOut_min
, TOut_max
Per Section 3.1.4.1, the setpoints are design information.
-
The
TSupCoo_min
should be set no lower than the design coil leaving air
temperature to prevent excessive chilled water temperature reset requests.
-
The
TSupCoo_max
is typically 18 °C (65 °F) in mild and dry climates
and 16 °C (60 °F) or lower in humid climates. It should not typically be
greater than 18 °C (65 °F).
-
The default range of outdoor air temperature (
TOut_min=16°C
,
TOut_max=21°C
) used to reset the occupied mode TSupSet
was chosen to maximize economizer hours. It may be preferable to use a lower
range of outdoor air temperature (e.g. TOut_min=13°C
,
TOut_max=18°C
) to minimize fan energy.
During occupied and Setup modes (uOpeMod=1
, uOpeMod=2
)
The TSupSet
shall be reset from TSupCoo_min
when the outdoor
air temperature is TOut_max
and above, proportionally up to
maximum supply temperature when the outdoor air temperature is TOut_min
and
below. The maximum supply temperature shall be reset using trim and respond logic between
TSupCoo_min
and TSupCoo_max
. Parameters suggested for the
trim and respond logic are shown in the table below. They require adjustment
during the commissioning and tuning phase.
Variable | Value | Definition |
Device | AHU Supply Fan | Associated device |
SP0 | iniSet | Initial setpoint |
SPmin | TSupCoo_min | Minimum setpoint |
SPmax | TSupCoo_max | Maximum setpoint |
Td | delTim | Delay timer |
T | samplePeriod | Time step |
I | numIgnReq | Number of ignored requests |
R | uZonTemResReq | Number of requests |
SPtrim | triAmo | Trim amount |
SPres | resAmo | Respond amount |
SPres_max | maxRes | Maximum response per time interval |
During Cool-down modes (uOpeMod=3
)
Supply air temperature setpoint TSupSet
shall be TSupCoo_min
.
During Setback and Warmup modes (uOpeMod=4
, uOpeMod=5
)
Supply air temperature setpoint TSupSet
shall be TSupWarUpSetBac
.
Parameters
Type | Name | Default | Description |
Temperatures |
Real | TSupCoo_min | 285.15 | Lowest cooling supply air temperature setpoint when the outdoor air temperature is at the
higher value of the reset range and above [K] |
Real | TSupCoo_max | 291.15 | Highest cooling supply air temperature setpoint. It is typically 18 degC (65 degF)
in mild and dry climates, 16 degC (60 degF) or lower in humid climates [K] |
Real | TOut_min | 289.15 | Lower value of the outdoor air temperature reset range. Typically value is 16 degC (60 degF) [K] |
Real | TOut_max | 294.15 | Higher value of the outdoor air temperature reset range. Typically value is 21 degC (70 degF) [K] |
Real | TSupWarUpSetBac | 308.15 | Supply temperature in warm up and set back mode [K] |
Trim and respond logic |
Real | delTim | 600 | Delay timer [s] |
Real | samplePeriod | 120 | Sample period of component [s] |
Integer | numIgnReq | 2 | Number of ignorable requests for TrimResponse logic |
Real | triAmo | 0.1 | Trim amount [K] |
Real | resAmo | -0.2 | Response amount [K] |
Real | maxRes | -0.6 | Maximum response per time interval [K] |
Connectors
Type | Name | Description |
input RealInput | TOut | Outdoor air temperature [K] |
input BooleanInput | u1SupFan | Supply fan status |
input IntegerInput | uOpeMod | System operation mode |
input IntegerInput | uZonTemResReq | Zone cooling supply air temperature reset request |
output RealOutput | TAirSupSet | Supply air temperature setpoint [K] |
Modelica definition
block SupplyTemperature
parameter Real TSupCoo_min(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=285.15
;
parameter Real TSupCoo_max(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=291.15
;
parameter Real TOut_min(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=289.15
;
parameter Real TOut_max(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=294.15
;
parameter Real TSupWarUpSetBac(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=308.15
;
parameter Real delTim(
final unit="s",
final quantity="Time") = 600
;
parameter Real samplePeriod(
final unit="s",
final quantity="Time",
final min=1E-3) = 120
;
parameter Integer numIgnReq = 2
;
parameter Real triAmo(
final unit="K",
displayUnit="K",
final quantity="TemperatureDifference") = 0.1
;
parameter Real resAmo(
final unit="K",
displayUnit="K",
final quantity="TemperatureDifference") = -0.2
;
parameter Real maxRes(
final unit="K",
displayUnit="K",
final quantity="TemperatureDifference") = -0.6
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TOut(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1SupFan
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uOpeMod
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uZonTemResReq
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput TAirSupSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.ASHRAE.G36.Generic.TrimAndRespond maxSupTemRes(
final delTim=delTim,
final iniSet=iniSet,
final minSet=minSet,
final maxSet=maxSet,
final samplePeriod=samplePeriod,
final numIgnReq=numIgnReq,
final triAmo=triAmo,
final resAmo=resAmo,
final maxRes=maxRes) ;
protected
parameter Real TDeaBan(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=273.15+26
;
parameter Real iniSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=TSupCoo_max
;
parameter Real maxSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=TSupCoo_max
;
parameter Real minSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=TSupCoo_min
;
Buildings.Controls.OBC.CDL.Reals.Line lin
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant minOutTem(
final k=TOut_min)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant maxOutTem(
final k=TOut_max)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant minSupTem(
final k=TSupCoo_min)
;
Buildings.Controls.OBC.CDL.Logical.And and1
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant supTemWarUpSetBac(
final k=TSupWarUpSetBac)
;
Buildings.Controls.OBC.CDL.Reals.Switch swi1
;
Buildings.Controls.OBC.CDL.Reals.Switch swi2
;
Buildings.Controls.OBC.CDL.Reals.Switch swi3
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant cooDowMod(
final k=3) ;
Buildings.Controls.OBC.CDL.Integers.LessThreshold intLesThr1(
final t=6)
;
Buildings.Controls.OBC.CDL.Integers.GreaterThreshold intGreThr1(
final t=3)
;
Buildings.Controls.OBC.CDL.Integers.LessThreshold intLesThr2(
final t=3)
;
Buildings.Controls.OBC.CDL.Integers.GreaterThreshold intGreThr2(
final t=0)
;
Buildings.Controls.OBC.CDL.Logical.And and2
;
Buildings.Controls.OBC.CDL.Reals.Switch swi4
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu
;
CDL.Reals.Sources.Constant TDea(
final k=TDeaBan)
;
equation
connect(minOutTem.y, lin.x1);
connect(TOut, lin.u);
connect(maxOutTem.y, lin.x2);
connect(minSupTem.y, lin.f2);
connect(and1.y, swi1.u2);
connect(supTemWarUpSetBac.y, swi1.u1);
connect(minSupTem.y, swi2.u1);
connect(swi2.y, swi1.u3);
connect(u1SupFan, swi3.u2);
connect(swi1.y, swi3.u1);
connect(intLesThr1.y, and1.u1);
connect(intGreThr1.y, and1.u2);
connect(uOpeMod, intLesThr1.u);
connect(uOpeMod, intGreThr1.u);
connect(uZonTemResReq, maxSupTemRes.numOfReq);
connect(u1SupFan, maxSupTemRes.uDevSta);
connect(maxSupTemRes.y, lin.f1);
connect(swi3.y, TAirSupSet);
connect(cooDowMod.y, intEqu.u2);
connect(uOpeMod, intEqu.u1);
connect(intEqu.y, swi2.u2);
connect(uOpeMod, intLesThr2.u);
connect(uOpeMod, intGreThr2.u);
connect(intLesThr2.y, and2.u1);
connect(intGreThr2.y, and2.u2);
connect(and2.y, swi4.u2);
connect(lin.y, swi4.u1);
connect(swi4.y, swi2.u3);
connect(TDea.y, swi4.u3);
connect(TDea.y, swi3.u3);
end SupplyTemperature;