Output setpoints for AHU control
Information
This package contains sequences generating setpoints for single zone VAV AHU control.
Package Content
Name |
Description |
CoolingCoil
|
Controller for cooling coil valve |
FreezeProtection
|
Freeze protection sequence for single zone air handling unit |
ModeAndSetPoints
|
Output zone setpoint with operation mode selection |
PlantRequests
|
Output plant requests for single zone 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 relief fans control for AHUs using actuated relief dampers with relief fan(s) |
ReturnFan
|
Return fan control for single zone AHU |
Supply
|
Supply air set point for single zone VAV system |
Validation
|
Collection of validation models |
Controller for cooling coil valve
Information
This block outputs the cooling coil control signal if the fan is on and the zone is
in cooling status (see
Buildings.Controls.OBC.ASHRAE.G36.Types.ZoneStates).
Otherwise, the control signal for the coil is set to 0
.
The implementation is according to the Section 5.18.5.3 of ASHRAE Guideline 36, May 2020.
Parameters
Type | Name | Default | Description |
Cooling coil loop signal |
SimpleController | controllerTypeCooCoi | Buildings.Controls.OBC.CDL.T... | Type of controller |
Real | kCooCoi | 0.1 | Gain for cooling coil control loop signal [1/K] |
Real | TiCooCoi | 900 | Time constant of integrator block for cooling coil control loop signal [s] |
Real | TdCooCoi | 0.1 | Time constant of derivative block for cooling coil control loop signal [s] |
Connectors
Type | Name | Description |
input RealInput | TSupCooSet | Cooling supply air temperature setpoint [K] |
input RealInput | TAirSup | Supply air temperature measurement [K] |
input IntegerInput | uZonSta | Zone state |
input BooleanInput | u1SupFan | Supply fan proven on |
output RealOutput | yCooCoi | Cooling coil valve commanded position |
Modelica definition
block CoolingCoil
parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerTypeCooCoi=
Buildings.Controls.OBC.CDL.Types.SimpleController.PI
;
parameter Real kCooCoi(
final unit="1/K")=0.1
;
parameter Real TiCooCoi(
final unit="s")=900
;
parameter Real TdCooCoi(
final unit="s")=0.1
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TSupCooSet(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TAirSup(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uZonSta ;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1SupFan
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yCooCoi
;
protected
Buildings.Controls.OBC.CDL.Integers.Equal intEqu
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt(
final k=Buildings.Controls.OBC.ASHRAE.G36.Types.ZoneStates.cooling)
;
Buildings.Controls.OBC.CDL.Continuous.PIDWithReset cooCoiPI(
final controllerType=controllerTypeCooCoi,
final k=kCooCoi,
final Ti=TiCooCoi,
final Td=TdCooCoi,
final reverseActing=false)
;
Buildings.Controls.OBC.CDL.Continuous.Switch switch ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant const(k=0) ;
Buildings.Controls.OBC.CDL.Logical.And and2 ;
equation
connect(const.y, switch.u3);
connect(cooCoiPI.trigger, u1SupFan);
connect(cooCoiPI.u_s, TSupCooSet);
connect(cooCoiPI.u_m, TAirSup);
connect(switch.y, yCooCoi);
connect(intEqu.y, and2.u1);
connect(and2.u2, u1SupFan);
connect(and2.y, switch.u2);
connect(conInt.y, intEqu.u1);
connect(uZonSta, intEqu.u2);
connect(cooCoiPI.y, switch.u1);
end CoolingCoil;
Freeze protection sequence for single zone air handling unit
Information
Freeze protection sequence for single zone AHU system. It is developed based on Section
5.18.11 of ASHRAE Guideline 36, May 2020.
-
If the supply air temperature
TAirSup
drops below 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 °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 °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 |
BuildingPressureControlTypes | buiPreCon | | Type of building pressure control system |
FreezeStat | freSta | | Type of freeze stat |
Boolean | have_hotWatCoi | true | True: the AHU has hot water heating coil |
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 valve commanded position [1] |
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. If the stat is normally open (the input is normally true), when enabling freeze protection, the input becomes false. If the stat is normally close, vice versa. |
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 valve commanded position [1] |
input RealInput | TAirMix | Measured mixed air temperature [K] |
output IntegerOutput | yFreProSta | Freeze protection stage index |
output BooleanOutput | y1EneCHWPum | Energize chilled water pump |
output RealOutput | yRetDam | Return air damper commanded position [1] |
output RealOutput | yOutDam | Outdoor air damper commanded position [1] |
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 RealOutput | yRelFan | Relief fan commanded speed [1] |
output RealOutput | yCooCoi | Cooling coil valve commanded position [1] |
output RealOutput | yHeaCoi | Heating coil valve commanded position [1] |
output IntegerOutput | yHotWatPlaReq | Request to heating hot-water plant |
output IntegerOutput | yAla | Alarm level |
Modelica definition
block FreezeProtection
parameter Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes
buiPreCon
;
parameter Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat freSta
;
parameter Boolean have_hotWatCoi=true
;
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")
;
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 have_hotWatCoi ;
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")
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1FreSta
if (freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Connected_to_BAS_NO
or freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Connected_to_BAS_NC)
;
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)
;
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.BuildingPressureControlTypes.ReturnFanCalculatedAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.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.BuildingPressureControlTypes.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReturnFanCalculatedAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReturnFanDp)
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1RelFan
if buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.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.BuildingPressureControlTypes.ReliefFan)
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uCooCoi(
final min=0,
final max=1,
final unit="1") ;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TAirMix(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yFreProSta
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1EneCHWPum
;
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.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.BuildingPressureControlTypes.ReturnFanCalculatedAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.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.BuildingPressureControlTypes.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReturnFanCalculatedAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReturnFanDp)
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1RelFan
if buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.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.BuildingPressureControlTypes.ReliefFan)
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yCooCoi(
final min=0,
final max=1,
final unit="1") ;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yHeaCoi(
final min=0,
final max=1,
final unit="1")
if have_hotWatCoi ;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yHotWatPlaReq
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yAla ;
Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr(
final t=273.15 + 4,
final h=Thys)
;
Buildings.Controls.OBC.CDL.Logical.Timer tim(
final t=300)
;
Buildings.Controls.OBC.CDL.Integers.Switch hotWatPlaReq
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt(
final k=minHotWatReq)
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Continuous.Switch minVen
;
Buildings.Controls.OBC.CDL.Continuous.PID heaCoiCon1(
final controllerType=heaCoiCon,
final k=k,
final Ti=Ti,
final Td=Td,
final yMax=yMax,
final yMin=yMin)
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Continuous.Switch heaCoi1
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr(
final t=273.15 + 7,
final h=Thys)
;
Buildings.Controls.OBC.CDL.Logical.Latch lat
;
Buildings.Controls.OBC.CDL.Logical.Timer tim1(
final t=300)
;
Buildings.Controls.OBC.CDL.Logical.Edge endStaOne
;
Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr1(
final t=273.15 + 3,
final h=Thys)
;
Buildings.Controls.OBC.CDL.Logical.Timer tim2(
final t=300)
;
Buildings.Controls.OBC.CDL.Logical.TrueFalseHold holSta2(
final trueHoldDuration=3600,
final falseHoldDuration=0)
;
Buildings.Controls.OBC.CDL.Continuous.Switch outDam2
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con(
final k=0)
;
Buildings.Controls.OBC.CDL.Continuous.Switch retDam2
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con1(
final k=1)
;
Buildings.Controls.OBC.CDL.Integers.Switch intSwi1
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt1(
final k=3)
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt2(
final k=0)
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Logical.Timer tim3(
final t=900)
;
Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr2(
final t=273.15 + 1,
final h=Thys)
;
Buildings.Controls.OBC.CDL.Logical.Timer tim4(
final t=300)
;
Buildings.Controls.OBC.CDL.Logical.Or3 or3
;
Buildings.Controls.OBC.CDL.Logical.Latch lat1
;
Buildings.Controls.OBC.CDL.Continuous.Switch supFan
if not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
;
Buildings.Controls.OBC.CDL.Continuous.Switch retFan
if (buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReturnFanCalculatedAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReturnFanDp)
and not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
;
Buildings.Controls.OBC.CDL.Continuous.Switch relFan
if (buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReliefFan)
and not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con3(
final k=0)
;
Buildings.Controls.OBC.CDL.Continuous.Switch outDam
if not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
;
Buildings.Controls.OBC.CDL.Continuous.Switch cooCoi
if not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
;
Buildings.Controls.OBC.CDL.Integers.Switch hotWatPlaReq3
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt3(
final k=minHotWatReq)
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Continuous.Max max1
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Continuous.PID heaCoiMod(
final controllerType=heaCoiCon,
final k=k,
final Ti=Ti,
final Td=Td,
final yMax=yMax,
final yMin=yMin)
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con4(
final k=273.15 + 27)
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Continuous.Switch heaCoiPos
if have_hotWatCoi
and not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
;
Buildings.Controls.OBC.CDL.Integers.Switch intSwi3
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt4(
final k=2) ;
Buildings.Controls.OBC.CDL.Utilities.Assert shuDowWar(
final message="Warning: the unit is shut down by freeze protection!")
;
Buildings.Controls.OBC.CDL.Logical.Not not1
;
Buildings.Controls.OBC.CDL.Utilities.Assert disMinVenWar(
final message="Warning: minimum ventilation was interrupted by freeze protection!")
;
Buildings.Controls.OBC.CDL.Logical.Not not2
;
Buildings.Controls.OBC.CDL.Logical.Timer tim5(
final t=3600)
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt5(
final k=0)
;
Buildings.Controls.OBC.CDL.Logical.Latch lat2
;
Buildings.Controls.OBC.CDL.Logical.Edge endStaTwo
;
Buildings.Controls.OBC.CDL.Logical.Or or2 ;
Buildings.Controls.OBC.CDL.Logical.FallingEdge falEdg
;
Buildings.Controls.OBC.CDL.Continuous.Switch retDam
if not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant supTemSet(
final k=273.15+ 6)
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Integers.Switch intSwi2
;
Buildings.Controls.OBC.CDL.Integers.Switch intSwi4
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt6(
final k=2)
;
Buildings.Controls.OBC.CDL.Integers.Switch intSwi5
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt7(
final k=1)
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt8(
final k=0)
;
Buildings.Controls.OBC.CDL.Logical.FallingEdge falEdg1
if (freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Connected_to_BAS_NO
or freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Connected_to_BAS_NC)
;
Buildings.Controls.OBC.CDL.Logical.Switch logSwi
if (freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Connected_to_BAS_NO
or freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Connected_to_BAS_NC)
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant norOpe(
final k=freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Connected_to_BAS_NO)
if (freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Connected_to_BAS_NO
or freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Connected_to_BAS_NC)
;
Buildings.Controls.OBC.CDL.Logical.Not norFal
if (freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Connected_to_BAS_NO
or freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Connected_to_BAS_NC)
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant con2(
final k=false)
if (freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.No_freeze_stat
or freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment)
;
Buildings.Controls.OBC.CDL.Logical.Not norSta1
if buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReliefFan
;
Buildings.Controls.OBC.CDL.Logical.And and2
if (buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReliefFan)
and not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
;
Buildings.Controls.OBC.CDL.Logical.And and1
if (buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReturnFanCalculatedAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReturnFanDp)
and not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
;
Buildings.Controls.OBC.CDL.Logical.Not norSta2
if (buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReturnFanCalculatedAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReturnFanDp)
;
Buildings.Controls.OBC.CDL.Logical.Not norSta3 ;
Buildings.Controls.OBC.CDL.Logical.And and3
if not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
;
Buildings.Controls.OBC.CDL.Continuous.MultiplyByParameter gai4(
final k=1)
if freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
;
Buildings.Controls.OBC.CDL.Continuous.MultiplyByParameter gai1(
final k=1)
if freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
;
Buildings.Controls.OBC.CDL.Logical.Or or1
if freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
;
Buildings.Controls.OBC.CDL.Continuous.MultiplyByParameter gai2(
final k=1)
if freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
;
Buildings.Controls.OBC.CDL.Logical.Or or4
if (buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReturnFanCalculatedAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReturnFanDp)
and freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
;
Buildings.Controls.OBC.CDL.Continuous.MultiplyByParameter gai3(
final k=1)
if (buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReturnFanCalculatedAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReturnFanDp)
and freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
;
Buildings.Controls.OBC.CDL.Logical.Or or5
if (buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReliefFan)
and freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
;
Buildings.Controls.OBC.CDL.Continuous.MultiplyByParameter gai5(
final k=1)
if (buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.ReliefFan)
and freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
;
Buildings.Controls.OBC.CDL.Continuous.MultiplyByParameter gai6(
final k=1)
if freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
;
Buildings.Controls.OBC.CDL.Continuous.MultiplyByParameter gai7(
final k=1)
if have_hotWatCoi
and freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment
;
Buildings.Controls.OBC.CDL.Logical.Pre pre
;
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(con1.y, retDam2.u1);
connect(uRetDam, retDam2.u3);
connect(conInt1.y, intSwi1.u1);
connect(lesThr1.y, tim3.u);
connect(TAirSup, lesThr2.u);
connect(tim3.passed, or3.u1);
connect(tim4.passed, or3.u2);
connect(u1SofSwiRes, lat1.clr);
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, cooCoi.u3);
connect(lat1.y, cooCoi.u2);
connect(con1.y, cooCoi.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(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(uHeaCoi, heaCoi1.u3);
connect(heaCoi1.y, heaCoiPos.u3);
connect(heaCoiPos.y, yHeaCoi);
connect(tim5.passed, endStaTwo.u);
connect(endStaTwo.y, lat2.clr);
connect(lat2.y, outDam2.u2);
connect(lat2.y, not2.u);
connect(lat2.y, retDam2.u2);
connect(lat2.y, intSwi1.u2);
connect(or2.y, lat.u);
connect(falEdg.y, or2.u2);
connect(lat2.y, falEdg.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(cooCoi.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(u1FreSta, norFal.u);
connect(norOpe.y, logSwi.u2);
connect(logSwi.y, or3.u3);
connect(logSwi.y, falEdg1.u);
connect(falEdg1.y, lat1.clr);
connect(con2.y, or3.u3);
connect(u1RelFan, and2.u1);
connect(lat1.y, norSta1.u);
connect(norSta1.y, and2.u2);
connect(u1RetFan, and1.u1);
connect(lat1.y, norSta2.u);
connect(norSta2.y, and1.u2);
connect(lat1.y, norSta3.u);
connect(u1SupFan, and3.u1);
connect(norSta3.y, and3.u2);
connect(and2.y, y1RelFan);
connect(and1.y, y1RetFan);
connect(and3.y, y1SupFan);
connect(uRetDam, gai4.u);
connect(gai4.y, yRetDam);
connect(uOutDam, gai1.u);
connect(gai1.y, yOutDam);
connect(u1SupFan, or1.u1);
connect(u1SupFan, or1.u2);
connect(or1.y, y1SupFan);
connect(uSupFan, gai2.u);
connect(gai2.y, ySupFan);
connect(u1RetFan, or4.u1);
connect(u1RetFan, or4.u2);
connect(or4.y, y1RetFan);
connect(uRetFan, gai3.u);
connect(gai3.y, yRetFan);
connect(u1RelFan, or5.u1);
connect(u1RelFan, or5.u2);
connect(or5.y, y1RelFan);
connect(uRelFan, gai5.u);
connect(gai5.y, yRelFan);
connect(uCooCoi, gai6.u);
connect(gai6.y, yCooCoi);
connect(uHeaCoi, gai7.u);
connect(gai7.y, yHeaCoi);
connect(u1FreSta, logSwi.u1);
connect(norFal.y, logSwi.u3);
connect(lesThr2.y, tim4.u);
connect(lat1.y, supFan.u2);
connect(or3.y, pre.u);
connect(pre.y, lat1.u);
connect(holSta2.y, lat2.u);
connect(tim.passed, or2.u1);
end FreezeProtection;
Output zone setpoint with operation mode selection
Information
Block that outputs the zone setpoint temperature (TCooSet
,
THeaSet
) and system operation mode (yOpeMod
).
The sequence consists of the following two subsequences.
Operation mode selector
The subsequence outputs one of seven types of system operation mode (occupied, warm-up,
cooldown, setback, freeze protection setback, setup, unoccupied) according
to current time, the time to next occupied hours tNexOcc
and
current zone temperature TZon
.
See
Buildings.Controls.OBC.ASHRAE.G36.ZoneGroups.OperationMode.
Zone setpoint temperature reset
It sets the zone temperature setpoint according to the globally specified setpoints,
the local setpoint adjustments, the demand limits adjustment, the window status
and the occupancy status. See
Buildings.Controls.OBC.ASHRAE.G36.ThermalZones.Setpoints.
Usage
This version is for a single zone only to be used in the Single Zone VAV sequence.
Parameters
Type | Name | Default | Description |
Boolean | have_winSen | | Check if the zone has window status sensor |
Boolean | have_occSen | | Check if the zone has occupancy sensor |
Setpoints adjustment |
Adjustable settings |
Boolean | have_locAdj | | True: the zone has local setpoint adjustment knob |
Boolean | sepAdj | | True: cooling and heating setpoint can be adjusted separately |
Boolean | ignDemLim | | Flag, set to true to exempt individual zone from demand limit setpoint adjustment |
Limits |
Real | TActCoo_max | 300.15 | Maximum active cooling setpoint [K] |
Real | TActCoo_min | 295.15 | Minimum active cooling setpoint [K] |
Real | TActHea_max | 295.15 | Maximum active heating setpoint [K] |
Real | TActHea_min | 291.15 | Minimum active heating setpoint [K] |
Real | TWinOpeCooSet | 322.15 | Cooling setpoint when window is open [K] |
Real | TWinOpeHeaSet | 277.15 | Heating setpoint when window is open [K] |
Demand control adjustment |
Real | incTSetDem_1 | 0.5 | Cooling setpoint increase value (degC) when cooling demand limit level 1 is imposed |
Real | incTSetDem_2 | 1 | Cooling setpoint increase value (degC) when cooling demand limit level 2 is imposed |
Real | incTSetDem_3 | 2 | Cooling setpoint increase value (degC) when cooling demand limit level 3 is imposed |
Real | decTSetDem_1 | 0.5 | Heating setpoint decrease value (degC) when heating demand limit level 1 is imposed |
Real | decTSetDem_2 | 1 | Heating setpoint decrease value (degC) when heating demand limit level 2 is imposed |
Real | decTSetDem_3 | 2 | Heating setpoint decrease value (degC) when heating demand limit level 3 is imposed |
Advanced |
Real | bouLim | 1 | Threshold of temperature difference for indicating the end of setback or setup mode |
Real | uLow | -0.1 | Low limit of the hysteresis for checking temperature difference |
Real | uHigh | 0.1 | High limit of the hysteresis for checking temperature difference |
Operating mode |
Real | preWarCooTim | 10800 | Maximum cool-down or warm-up time [s] |
Real | TZonFreProOn | 277.15 | Threshold temperature to activate the freeze protection mode [K] |
Real | TZonFreProOff | 280.15 | Threshold temperature to end the freeze protection mode [K] |
Connectors
Type | Name | Description |
input RealInput | cooDowTim | Cool-down time retrieved from optimal cool-down block [s] |
input RealInput | warUpTim | Warm-up time retrieved from optimal warm-up block [s] |
input BooleanInput | u1Win | Window status: true=open, false=close |
input RealInput | TZon | Zone temperature [K] |
input RealInput | TOccHeaSet | Occupied heating setpoint [K] |
input RealInput | TOccCooSet | Occupied cooling setpoint [K] |
input RealInput | TUnoHeaSet | Unoccupied heating setpoint [K] |
input RealInput | TUnoCooSet | Unoccupied cooling setpoint [K] |
input BooleanInput | u1Occ | Zone occupancy status according to the schedule: true=occupied, false=unoccupied |
input RealInput | tNexOcc | Time to next occupied period [s] |
input RealInput | setAdj | Setpoint adjustment value |
input RealInput | cooSetAdj | Cooling setpoint adjustment value |
input RealInput | heaSetAdj | Heating setpoint adjustment value |
input BooleanInput | u1OccSen | Occupancy sensor (occupied=true, unoccupied=false) |
input IntegerInput | uCooDemLimLev | Cooling demand limit level |
input IntegerInput | uHeaDemLimLev | Heating demand limit level |
output IntegerOutput | yOpeMod | Operation mode |
output RealOutput | TCooSet | Cooling setpoint temperature [K] |
output RealOutput | THeaSet | Heating setpoint temperature [K] |
Modelica definition
block ModeAndSetPoints
parameter Boolean have_winSen ;
parameter Boolean have_occSen ;
parameter Boolean have_locAdj
;
parameter Boolean sepAdj
;
parameter Boolean ignDemLim
;
parameter Real TActCoo_max(
unit="K",
displayUnit="degC")=300.15
;
parameter Real TActCoo_min(
unit="K",
displayUnit="degC")=295.15
;
parameter Real TActHea_max(
unit="K",
displayUnit="degC")=295.15
;
parameter Real TActHea_min(
unit="K",
displayUnit="degC")=291.15
;
parameter Real TWinOpeCooSet(
unit="K",
displayUnit="degC")=322.15
;
parameter Real TWinOpeHeaSet(
unit="K",
displayUnit="degC")=277.15
;
parameter Real incTSetDem_1=0.5
;
parameter Real incTSetDem_2=1
;
parameter Real incTSetDem_3=2
;
parameter Real decTSetDem_1=0.5
;
parameter Real decTSetDem_2=1
;
parameter Real decTSetDem_3=2
;
parameter Real bouLim=1
;
parameter Real uLow=-0.1
;
parameter Real uHigh=0.1
;
parameter Real preWarCooTim(unit="s")=10800
;
parameter Real TZonFreProOn(
unit="K",
displayUnit="degC")=277.15
;
parameter Real TZonFreProOff(
unit="K",
displayUnit="degC")=280.15
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput cooDowTim(
final unit="s",
final quantity="Time")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput warUpTim(
final unit="s",
final quantity="Time") ;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1Win
if have_winSen
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TZon(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TOccHeaSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature") ;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TOccCooSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature") ;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TUnoHeaSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature") ;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TUnoCooSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature") ;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1Occ
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput tNexOcc(
final unit="s",
final quantity="Time") ;
Buildings.Controls.OBC.CDL.Interfaces.RealInput setAdj
if have_locAdj
and not sepAdj
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput cooSetAdj
if have_locAdj
and sepAdj
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput heaSetAdj
if have_locAdj
and sepAdj ;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1OccSen
if have_occSen
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uCooDemLimLev
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uHeaDemLimLev
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yOpeMod ;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput TCooSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature") ;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput THeaSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature") ;
Buildings.Controls.OBC.ASHRAE.G36.ZoneGroups.OperationMode opeModSel(
final nZon=1,
final preWarCooTim=preWarCooTim,
final TZonFreProOn=TZonFreProOn,
final TZonFreProOff=TZonFreProOff) ;
Buildings.Controls.OBC.ASHRAE.G36.ThermalZones.Setpoints TZonSet(
final have_occSen=have_occSen,
final have_winSen=have_winSen,
final have_locAdj=have_locAdj,
final sepAdj=sepAdj,
final ignDemLim=ignDemLim,
final TActCoo_max=TActCoo_max,
final TActCoo_min=TActCoo_min,
final TActHea_max=TActHea_max,
final TActHea_min=TActHea_min,
final TWinOpeCooSet=TWinOpeCooSet,
final TWinOpeHeaSet=TWinOpeHeaSet,
final incTSetDem_1=incTSetDem_1,
final incTSetDem_2=incTSetDem_2,
final incTSetDem_3=incTSetDem_3,
final decTSetDem_1=decTSetDem_1,
final decTSetDem_2=decTSetDem_2,
final decTSetDem_3=decTSetDem_3) ;
Buildings.Controls.OBC.ASHRAE.G36.ZoneGroups.ZoneStatus zonSta(
final bouLim=bouLim,
final have_winSen=have_winSen,
final uLow=uLow,
final uHigh=uHigh) ;
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger colZon
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger hotZon
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant winSta(
final k=false)
if not have_winSen
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant occSta(
final k=true)
if not have_occSen
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt
;
equation
connect(zonSta.cooDowTim, cooDowTim);
connect(zonSta.warUpTim, warUpTim);
connect(zonSta.u1Win, u1Win);
connect(zonSta.TZon, TZon);
connect(zonSta.yCooTim, opeModSel.maxCooDowTim);
connect(zonSta.yWarTim, opeModSel.maxWarUpTim);
connect(zonSta.yHigOccCoo, opeModSel.u1HigOccCoo);
connect(zonSta.yOccHeaHig, opeModSel.u1OccHeaHig);
connect(zonSta.yUnoHeaHig, colZon.u);
connect(colZon.y, opeModSel.totColZon);
connect(zonSta.yHigUnoCoo, hotZon.u);
connect(hotZon.y, opeModSel.totHotZon);
connect(zonSta.yUnoHeaHig, opeModSel.u1SetBac);
connect(zonSta.yEndSetBac, opeModSel.u1EndSetBac);
connect(TZon, opeModSel.TZonMin);
connect(zonSta.yHigUnoCoo, opeModSel.u1SetUp);
connect(zonSta.yEndSetUp, opeModSel.u1EndSetUp);
connect(opeModSel.u1Occ, u1Occ);
connect(opeModSel.tNexOcc, tNexOcc);
connect(opeModSel.yOpeMod, TZonSet.uOpeMod);
connect(TZonSet.uCooDemLimLev, uCooDemLimLev);
connect(TZonSet.uHeaDemLimLev, uHeaDemLimLev);
connect(opeModSel.yOpeMod, yOpeMod);
connect(TZonSet.TCooSet, TCooSet);
connect(TZonSet.THeaSet, THeaSet);
connect(winSta.y, booToInt.u);
connect(u1Win, booToInt.u);
connect(booToInt.y, opeModSel.uOpeWin);
connect(TZonSet.setAdj, setAdj);
connect(TZonSet.heaSetAdj, heaSetAdj);
connect(u1OccSen, TZonSet.u1Occ);
connect(occSta.y, TZonSet.u1Occ);
connect(u1Win, TZonSet.u1Win);
connect(cooSetAdj, TZonSet.cooSetAdj);
connect(TOccHeaSet,zonSta.TOccHeaSet);
connect(TOccCooSet,zonSta.TOccCooSet);
connect(TUnoHeaSet,zonSta.TUnoHeaSet);
connect(TUnoCooSet,zonSta.TUnoCooSet);
connect(TOccHeaSet, TZonSet.TOccHeaSet);
connect(TOccCooSet, TZonSet.TOccCooSet);
connect(TUnoHeaSet, TZonSet.TUnoHeaSet);
connect(TUnoCooSet, TZonSet.TUnoCooSet);
end ModeAndSetPoints;
Output plant requests for single zone air handling unit
Information
This sequence outputs the system reset requests for single zone air handling unit. The
implementation is according to the Section 5.18.15 of ASHRAE Guideline 36, May 2020.
chilled water reset request yChiWatResReq
-
If the supply air temperature
TAirSup
exceeds the cooling supply air temperature
set point TSupCoo
by 3 °C (5 °F) for 2 minutes, send 3 requests.
-
If the supply air temperature
TAirSup
exceeds the cooling supply air temperature
set point TSupCoo
by 2 °C (3 °F) for 2 minutes, send 2 requests.
-
Else if the chilled water valve position
uCooCoi_actual
is greater than
95%, send 1 request until the uCooCoi_actual
is less than 85%.
-
Else if the chilled water valve position
uCooCoi_actual
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
uCooCoi_actual
is greater than
95%, send 1 request until the uCooCoi_actual
is less than 10%.
-
Else if the chilled water valve position
uCooCoi_actual
is less than 95%,
send 0 request.
If there is a hot-water coil (have_hotWatCoi=true
), hot-water
reset requests yHotWatResReq
-
If the supply air temperature
TAirSup
is 17 °C (30 °F) less than
the heating supply air temperature set point TSupHeaEco
for 5 minutes, send 3
requests.
-
Else if the supply air temperature
TAirSup
is 8 °C (15 °F) less than
the heating supply air temperature set point TSupHeaEco
for 5 minutes, send 2
requests.
-
Else if the hot water valve position
uHeaCoi_actual
is greater than
95%, send 1 request until the uHeaCoi_actual
is less than 85%.
-
Else if the hot water valve position
uHeaCoi_actual
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
uHeaCoi_actual
is greater than 95%, send 1
request until the hot water valve position is less than 10%.
-
If the hot water valve position
uHeaCoi_actual
is less than 95%, send 0 requests.
Parameters
Type | Name | Default | Description |
Boolean | have_hotWatCoi | true | True: the AHU has hot water heating coil |
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 | TSupCoo | Cooling supply air temperature setpoint [K] |
input RealInput | uCooCoi_actual | Cooling coil valve actual position [1] |
input RealInput | TSupHeaEco | Heating supply air temperature setpoint [K] |
input RealInput | uHeaCoi_actual | Heating coil valve actual 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 Boolean have_hotWatCoi = true
;
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 TSupCoo(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uCooCoi_actual(
final unit="1",
final min=0,
final max=1)
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TSupHeaEco(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uHeaCoi_actual(
final unit="1",
final min=0,
final max=1)
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yChiWatResReq
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yChiPlaReq
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yHotWatResReq
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yHotWatPlaReq
if have_hotWatCoi
;
protected
Buildings.Controls.OBC.CDL.Continuous.Subtract cooSupTemDif
;
Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr(
final t=3,
final h=Thys)
;
Buildings.Controls.OBC.CDL.Continuous.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.Continuous.GreaterThreshold greThr2(
final t=0.95,
final h=posHys)
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant thr(
final k=3) ;
Buildings.Controls.OBC.CDL.Integers.Switch chiWatRes3
;
Buildings.Controls.OBC.CDL.Integers.Switch chiWatRes2
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant two(
final k=2)
;
Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr(
final t=0.85,
final h=posHys)
;
Buildings.Controls.OBC.CDL.Logical.Latch lat
;
Buildings.Controls.OBC.CDL.Integers.Switch chiWatRes1
;
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
;
Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr1(
final t=0.1,
final h=posHys)
;
Buildings.Controls.OBC.CDL.Integers.Switch intSwi3
;
Buildings.Controls.OBC.CDL.Continuous.Subtract heaSupTemDif
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr3(
final t=17,
final h=Thys)
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr4(
final t=8,
final h=Thys)
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel2(
final delayTime=300)
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel3(
final delayTime=300)
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Integers.Switch hotWatRes3
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Integers.Switch hotWatRes2
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr2(
final t=0.85,
final h=posHys)
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr5(
final t=0.95,
final h=posHys)
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Logical.Latch lat2
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Integers.Switch hotWatRes1
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr3(
final t=0.1,
final h=posHys)
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Logical.Latch lat3
if have_hotWatCoi
;
Buildings.Controls.OBC.CDL.Integers.Switch intSwi1
if have_hotWatCoi
;
equation
connect(TAirSup, cooSupTemDif.u1);
connect(TSupCoo, cooSupTemDif.u2);
connect(cooSupTemDif.y, greThr.u);
connect(greThr.y, truDel.u);
connect(greThr1.y, truDel1.u);
connect(cooSupTemDif.y, greThr1.u);
connect(uCooCoi_actual, 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(uCooCoi_actual, 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(uCooCoi_actual, 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(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(uHeaCoi_actual, greThr5.u);
connect(greThr5.y, lat2.u);
connect(uHeaCoi_actual, 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(uHeaCoi_actual, 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);
connect(TSupHeaEco, heaSupTemDif.u1);
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.18.8 of ASHRAE Guideline G36, May 2020.
In Section 3.2.2.3, find the relief damper position setpoint limits:
-
relDam_min
: the relief damper position that maintainx a building pressure
of 12 Pa (0.05 in. of water) while the economizer is positioned to provide minimum
outdoor airflow while the supply fan is at minimum speed.
-
relDam_max
: the relief damper position that maintainx a building pressure
of 12 Pa (0.05 in. of water) while the economizer damper is fully open and the fan
speed is at cooling maximum.
Relief damper shall be enabled when the associated supply fan is proven on and any
outdoor air damper is open, and disabled and closed otherwise.
Relief damper position shall be reset lineary from relDam_min
to
relDam_max
as the commanded economizer damper position goes from
uOutDam_min
to 100% open.
Parameters
Type | Name | Default | Description |
Real | relDam_min | | Relief-damper position that maintains a building pressure of 12 Pa while the economizer damper is positioned to provide minimum outdoor air while the supply fan is at minimum speed |
Real | relDam_max | | Relief-damper position that maintains a building pressure of 12 Pa while the economizer damper is fully open and the fan speed is at cooling maximum |
Advanced |
Real | posHys | 0.05 | Hysteresis for damper position check |
Connectors
Type | Name | Description |
input RealInput | uOutDam_min | Outdoor air damper minimum position [1] |
input RealInput | uOutDam | Outdoor damper position [1] |
input BooleanInput | u1SupFan | Supply fan command on |
output RealOutput | yRelDam | Relief damper commanded position [1] |
Modelica definition
block ReliefDamper
parameter Real relDam_min
;
parameter Real relDam_max
;
parameter Real posHys=0.05
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uOutDam_min(
final min=0,
final max=1,
final unit="1")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uOutDam(
final min=0,
final max=1,
final unit="1")
;
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.Continuous.GreaterThreshold greThr(
final t=0.05,
final h=posHys)
;
Buildings.Controls.OBC.CDL.Logical.And and2
;
Buildings.Controls.OBC.CDL.Continuous.Switch swi
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant zerDam(
final k=0) ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant minRel(
final k=relDam_min)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant maxRel(
final k=relDam_max)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant fulOpe(
final k=1)
;
Buildings.Controls.OBC.CDL.Continuous.Line relDam(
final limitBelow=true,
final limitAbove=true)
;
equation
connect(zerDam.y, swi.u3);
connect(swi.y, yRelDam);
connect(greThr.y, and2.u1);
connect(u1SupFan, and2.u2);
connect(and2.y, swi.u2);
connect(uOutDam, relDam.u);
connect(uOutDam_min, relDam.x1);
connect(minRel.y, relDam.f1);
connect(relDam.y, swi.u1);
connect(uOutDam, greThr.u);
connect(fulOpe.y, relDam.x2);
connect(maxRel.y, relDam.f2);
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) |
input BooleanInput | u1SupFan | AHU supply fan proven on status |
output RealOutput | yDpBui | Building static pressure difference, relative to ambient (positive if pressurized) |
output RealOutput | yDam | Damper commanded position [1] |
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(
displayUnit="Pa",
final quantity="PressureDifference")
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1SupFan
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yDpBui(
displayUnit="Pa",
final quantity="PressureDifference")
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yDam(
final unit="1",
final min=0,
final max=1)
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yRelFan(
final unit="1",
final max=1)
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1RelFan
;
Buildings.Controls.OBC.CDL.Continuous.MovingAverage movMea(
final delta=300)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant dpBuiSetPoi(
final k=dpBuiSet)
;
Buildings.Controls.OBC.CDL.Continuous.Divide div1
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conOne(
final k=1)
;
Buildings.Controls.OBC.CDL.Continuous.PID conP(
final controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.P,
final k=k,
final reverseActing=false)
;
Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr(
final t=0.05,
final h=hys)
;
Buildings.Controls.OBC.CDL.Continuous.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.Continuous.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.Continuous.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.Continuous.Multiply pro1 ;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea1
;
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(relDam.y, booToRea1.u);
connect(booToRea1.y, yDam);
connect(pro1.y, yRelFan);
connect(relFan.y, y1RelFan);
end ReliefFan;
Sequence for relief fans control for AHUs using actuated relief dampers with relief fan(s)
Information
Sequence for controlling 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 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) |
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) |
output RealOutput | yRelFan[nRelFan] | Relief fan commanded speed [1] |
output RealOutput | yDam[nRelFan] | Relief 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(
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(
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.Continuous.MatrixGain enaRel(
final K=relFanMat)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea[nSupFan]
;
Buildings.Controls.OBC.CDL.Continuous.MultiplyByParameter gai[nRelFan](
final k=staVec)
;
Buildings.Controls.OBC.CDL.Continuous.MovingAverage movMea(
final delta=300)
;
Buildings.Controls.OBC.CDL.Continuous.Divide div1
;
Buildings.Controls.OBC.CDL.Continuous.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.Continuous.Multiply pro
;
Buildings.Controls.OBC.CDL.Continuous.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.Continuous.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.Continuous.GreaterThreshold greThr1[nRelFan](
final t=
fill(0.5, nRelFan))
;
Buildings.Controls.OBC.CDL.Logical.And enaDam[nRelFan]
;
Buildings.Controls.OBC.CDL.Continuous.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.Continuous.Subtract sub2[nRelFan]
;
Buildings.Controls.OBC.CDL.Continuous.Multiply pro1[nRelFan]
;
Buildings.Controls.OBC.CDL.Continuous.MultiMin mulMin(nin=nRelFan)
;
Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator reaRep(
final nout=nRelFan)
;
Buildings.Controls.OBC.CDL.Continuous.Subtract sub1[nRelFan]
;
Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr1[nRelFan](
final t=
fill(0.5, nRelFan))
;
Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar[nRelFan](
final p=
fill(nRelFan + 1, nRelFan))
;
Buildings.Controls.OBC.CDL.Continuous.Switch swi[nRelFan]
;
Buildings.Controls.OBC.CDL.Continuous.Abs abs1[nRelFan]
;
Buildings.Controls.OBC.CDL.Continuous.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.Continuous.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.Continuous.Multiply pro2[nRelFan]
;
Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar1[nRelFan](
final p=
fill(nRelFan + 1, nRelFan))
;
Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr4[nRelFan](
final t=
fill(0.5, nRelFan))
;
Buildings.Controls.OBC.CDL.Continuous.Switch swi1[nRelFan]
;
Buildings.Controls.OBC.CDL.Continuous.MultiMin mulMin1(
final nin=nRelFan) ;
Buildings.Controls.OBC.CDL.Continuous.Subtract sub3[nRelFan]
;
Buildings.Controls.OBC.CDL.Continuous.Abs abs2[nRelFan]
;
Buildings.Controls.OBC.CDL.Continuous.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.Continuous.Limiter lim(
final uMax=1,
final uMin=relFanSpe_min)
;
Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator reaRep2(
final nout=nRelFan)
;
Buildings.Controls.OBC.CDL.Continuous.Multiply pro3[nRelFan]
;
Buildings.Controls.OBC.CDL.Logical.Switch logSwi2[nRelFan]
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant dpBuiSetPoi(
final k=dpBuiSet)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conOne(
final k=1)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con(
final k=0)
;
Buildings.Controls.OBC.CDL.Continuous.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.Continuous.Multiply mul[nRelFan]
;
Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr3[nRelFan](
final t=
fill(0.5, nRelFan))
;
Buildings.Controls.OBC.CDL.Logical.MultiAnd mulAnd1(
final nin=nRelFan) ;
Buildings.Controls.OBC.CDL.Continuous.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 single zone AHU
Information
Sequence for controlling return fan yRetFan
for single AHUs.
It is implemented according to Section 5.18.10 of ASHRAE Guideline G36, May 2020.
-
Exhaust damper shall open whenever associated supply fan is proven on.
-
Return fan shall run whenever associated supply fan is proven on.
-
Return fan speed shall be the same as supply fan speed with a user adjustable offset.
See Section 3.2.1.5 for details about the offset.
-
Exhaust damper shall be closed when return fan is disabled.
Parameters
Type | Name | Default | Description |
Real | speDif | -0.1 | Speed difference between supply and return fan to maintain building pressure at desired pressure |
Connectors
Type | Name | Description |
input RealInput | uSupFan_actual | Actual supply fan speed [1] |
input BooleanInput | u1SupFan | Supply fan command on |
output BooleanOutput | y1ExhDam | Exhaust damper commanded on |
output RealOutput | yRetFan | Return fan commanded speed [1] |
output BooleanOutput | y1RetFan | Return fan command on |
Modelica definition
block ReturnFan
parameter Real speDif=-0.1
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uSupFan_actual(
final min=0,
final max=1,
final unit="1")
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1SupFan
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1ExhDam
;
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.Continuous.AddParameter addPar(
final p=speDif)
;
Buildings.Controls.OBC.CDL.Continuous.Switch swi ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con(
final k=0) ;
equation
connect(uSupFan_actual, addPar.u);
connect(u1SupFan, swi.u2);
connect(con.y, swi.u3);
connect(addPar.y, swi.u1);
connect(swi.y, yRetFan);
connect(u1SupFan, y1ExhDam);
connect(u1SupFan, y1RetFan);
end ReturnFan;
Supply air set point for single zone VAV system
Information
Block that outputs the set points for the supply air temperature for
cooling, heating and economizer control, and the fan speed for a single zone VAV system.
The implementation is according to the Section 5.18.4 of ASHRAE Guideline 36, May 2020.
Fan speed setpoint
The supply fan shall run whenever the unit is in any mode other than unoccupied mode.
Also, a ramp function should be applied to prevent changes in fan speed of more
than 10% per minute.
Minimum, medium, and maximum fan speeds shall be as follows:
-
Minimum speed
minSpe
, maximum cooling speed maxCooSpe
, and
maximum heatng speed maxHeaSpe
shall be given per Section 3.2.2.1 of
ASHRAE Guideline 36.
-
Medium fan speed shall be reset linearly based on outdoor air temperature
TOut
from minSpe
when outdoor air temperature is greater
than or equal to Endpoint 1 to maxCooSpe
when TOut
is
less than or equal to Endpoint 2.
-
Endpoint 1: the lesser of zone temperature
TZon
plus 0.5 °C (1 °F)
and maximum supply air dew point TSupDew_max
.
-
Endpoint 2: the lesser of zone temperature
TZon
minus 6 °C (10 °F)
and maximum supply air dew point TSupDew_max
minus 1 °C (2 °F).
Control mapping
-
For a heating-loop signal
uHea
of 100% to spePoiOne
(default 50%),
fan speed is reset from maxHeaSpe
to minSpe
.
-
For a heating-loop signal
uHea
of spePoiOne
to 0%,
fan speed set point is minSpe
.
-
In deadband (
uHea=0
, uCoo=0
), fan speed set point is
minSpe
.
-
For a cooling-loop signal
uCoo
of 0% to spePoiTwo
(default 25%),
fan speed is minSpe
.
-
For a cooling-loop signal
uCoo
of spePoiTwo
to spePoiThr
(default 50%), fan speed is reset from minSpe
to medium fan speed.
-
For a cooling-loop signal
uCoo
of spePoiThr
to spePoiFou
(default 75%), fan speed is medium.
-
For a cooling-loop signal of
uCoo
spePoiFou
to 100%, fan speed
is reset from medium to maxCooSpe
.
The figure below shows the sequence.
Supply temperature setpoints
The output TSupCooSet
is to be used to control the cooling coil,
and the output
TSupHeaEcoSet
is to be used to control the heating coil and the
economizer dampers.
When it is in deadband state, the output TSupCooSet
and TSupHeaEcoSet
shall be average of the zone heating setpoint THeaSet
and the zone
cooling setpoint TCooSet
but shall be no lower than TSupDea_min
,
21 °C (70 °F),
and no higher than TSupDea_max
, 24 °C (75 °F),
Control mapping
-
For a heating-loop signal
uHea
of 100% to temPoiOne
(default 50%),
TSupHeaEcoSet
should be TSup_max
.
-
For a heating-loop signal
uHea
of temPoiOne
to 0%,
TSupHeaEcoSet
is reset from TSup_max
to the deadband value.
-
In deadband (
uHea=0
, uCoo=0
), TSupHeaEcoSet
is
the deadband value.
-
For a cooling-loop signal
uCoo
of 0% to temPoiTwo
(default 25%),
TSupHeaEcoSet
is reset from deadband value to TSup_min
minus
1 °C (2 °F), while TSupCooSet
is the deadband value.
-
For a cooling-loop signal
uCoo
of temPoiTwo
to temPoiThr
(default 50%),
TSupHeaEcoSet
and TSupCooSet
are unchanged.
-
For a cooling-loop signal
uCoo
of temPoiThr
to temPoiFou
(default 75%),
TSupHeaEcoSet
remains at TSup_min
minus
1 °C (2 °F), while TSupCooSet
is reset from the deadband value
to TSup_min
.
-
For a cooling-loop signal
uCoo
of temPoiFou
to 100%,
TSupHeaEcoSet
and TSupCooSet
are unchanged.
The figure below shows the sequence.
Note that the inputs uHea
and uCoo
must be computed
based on the same temperature sensors and control loops.
Parameters
Type | Name | Default | Description |
Temperatures |
Real | TSup_max | | Maximum supply air temperature for heating [K] |
Real | TSup_min | | Minimum supply air temperature for cooling [K] |
Real | TSupDew_max | | Maximum supply air dew-point temperature. It's typically only needed in humid type “A” climates. A typical value is 17°C.
For mild and dry climates, a high set point (e.g. 24°C) should be entered for maximum efficiency [K] |
Real | TSupDea_min | 294.15 | Minimum supply temperature when it is in deadband state [K] |
Real | TSupDea_max | 297.15 | Maximum supply temperature when it is in deadband state [K] |
Speed |
Real | maxHeaSpe | | Maximum fan speed for heating [1] |
Real | maxCooSpe | | Maximum fan speed for cooling [1] |
Real | minSpe | | Minimum fan speed [1] |
Advanced |
Real | looHys | 0.01 | Loop output hysteresis below which the output will be seen as zero [1] |
Temperatures |
Real | temPoiOne | 0.5 | Point 1 on x-axis of control map for temperature control, when it is in heating state [1] |
Real | temPoiTwo | 0.25 | Point 2 on x-axis of control map for temperature control, when it is in cooling state [1] |
Real | temPoiThr | 0.5 | Point 3 on x-axis of control map for temperature control, when it is in cooling state [1] |
Real | temPoiFou | 0.75 | Point 4 on x-axis of control map for temperature control, when it is in cooling state [1] |
Speed |
Real | spePoiOne | 0.5 | Point 1 on x-axis of control map for speed control, when it is in heating state [1] |
Real | spePoiTwo | 0.25 | Point 2 on x-axis of control map for speed control, when it is in cooling state [1] |
Real | spePoiThr | 0.5 | Point 3 on x-axis of control map for speed control, when it is in cooling state [1] |
Real | spePoiFou | 0.75 | Point 4 on x-axis of control map for speed control, when it is in cooling state [1] |
Connectors
Type | Name | Description |
input IntegerInput | uOpeMod | AHU operation mode status signal |
input RealInput | TZon | Zone temperature [K] |
input RealInput | TOut | Outdoor air temperature [K] |
input RealInput | uHea | Heating control signal [1] |
input RealInput | uCoo | Cooling control signal [1] |
input RealInput | TCooSet | Cooling setpoints for zone temperature [K] |
input RealInput | THeaSet | Heating setpoints for zone temperature [K] |
output RealOutput | y | Fan speed [1] |
output BooleanOutput | y1SupFan | Supply fan commanded status |
output RealOutput | TSupHeaEcoSet | Temperature setpoint for heating coil and for economizer [K] |
output RealOutput | TSupCooSet | Cooling supply air temperature setpoint [K] |
Modelica definition
block Supply
parameter Real TSup_max(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
parameter Real TSup_min(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
parameter Real TSupDew_max(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
parameter Real TSupDea_min(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=294.15
;
parameter Real TSupDea_max(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=297.15
;
parameter Real maxHeaSpe(
final min=0,
final max=1,
final unit="1")
;
parameter Real maxCooSpe(
final min=0,
final max=1,
final unit="1")
;
parameter Real minSpe(
final min=0,
final max=1,
final unit="1")
;
parameter Real looHys(
final unit="1")=0.01
;
parameter Real temPoiOne(
final unit="1",
final min=0,
final max=1)=0.5
;
parameter Real temPoiTwo(
final unit="1",
final min=0,
final max=1)=0.25
;
parameter Real temPoiThr(
final unit="1",
final min=0,
final max=1)=0.5
;
parameter Real temPoiFou(
final unit="1",
final min=0,
final max=1)=0.75
;
parameter Real spePoiOne(
final unit="1",
final min=0,
final max=1)=0.5
;
parameter Real spePoiTwo(
final unit="1",
final min=0,
final max=1)=0.25
;
parameter Real spePoiThr(
final unit="1",
final min=0,
final max=1)=0.5
;
parameter Real spePoiFou(
final unit="1",
final min=0,
final max=1)=0.75
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uOpeMod
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TZon(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TOut(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature") ;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uHea(
final min=0,
final max=1,
final unit="1")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uCoo(
final min=0,
final max=1,
final unit="1")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TCooSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput THeaSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput y(
final min=0,
final max=1,
final unit="1") ;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1SupFan
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput TSupHeaEcoSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput TSupCooSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
protected
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant fanOff(
final k=0)
;
Buildings.Controls.OBC.CDL.Continuous.Switch fanSpe ;
Buildings.Controls.OBC.CDL.Continuous.LimitSlewRate ramLim(
final raisingSlewRate=1/600,
final Td=60)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant maxDewPoi(
final k=TSupDew_max)
;
Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar(
final p=-1)
;
Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar1(
final p=-6)
;
Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar2(
final p=0.5)
;
Buildings.Controls.OBC.CDL.Continuous.Min endPoiTwo
;
Buildings.Controls.OBC.CDL.Continuous.Min endPoiOne
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant minFanSpe(
final k=minSpe)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant maxCooFanSpe(
final k=maxCooSpe)
;
Buildings.Controls.OBC.CDL.Continuous.Line medFanSpe
;
Buildings.Controls.OBC.CDL.Continuous.Average aveZonSet
;
Buildings.Controls.OBC.CDL.Continuous.Limiter lim(
final uMax=TSupDea_max,
final uMin=TSupDea_min)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant one(
final k=1)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant zer(
final k=0)
;
Buildings.Controls.OBC.CDL.Continuous.Line heaFanSpe
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant speOnePoi(
final k=spePoiOne)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant maxHeaFanSpe(
final k=maxHeaSpe)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant speTwoPoi(
final k=spePoiTwo)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant speThrPoi(
final k=spePoiThr)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant speFouPoi(
final k=spePoiFou)
;
Buildings.Controls.OBC.CDL.Continuous.Line cooFanSpe1
;
Buildings.Controls.OBC.CDL.Continuous.Line cooFanSpe2
;
Buildings.Controls.OBC.CDL.Continuous.Max spe
;
Buildings.Controls.OBC.CDL.Continuous.Line heaSupTem
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant temOnePoi(
final k=temPoiOne)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant maxSupTem(
final k=TSup_max)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant temTwoPoi(
final k=temPoiTwo)
;
Buildings.Controls.OBC.CDL.Continuous.Line cooSupTem
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant supCooTem(
final k=TSup_min)
;
Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar3(
final p=-1)
;
Buildings.Controls.OBC.CDL.Continuous.Line cooSupTem1
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant temThrPoi(
final k=temPoiThr)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant temFouPoi(
final k=temPoiFou)
;
Buildings.Controls.OBC.CDL.Continuous.Switch cooFan
;
Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold heaSta(
final t=looHys,
final h=0.8*looHys)
;
Buildings.Controls.OBC.CDL.Continuous.Switch supTemSet
;
Buildings.Controls.OBC.CDL.Continuous.Switch supTemSet1
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant unoMod(
final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.unoccupied)
;
Buildings.Controls.OBC.CDL.Integers.Equal isUnoMod
;
Buildings.Controls.OBC.CDL.Logical.Not not1
;
Buildings.Controls.OBC.CDL.Continuous.Greater gre(
final h=spePoiFou - spePoiThr)
;
equation
connect(unoMod.y, isUnoMod.u1);
connect(uOpeMod, isUnoMod.u2);
connect(isUnoMod.y, fanSpe.u2);
connect(fanOff.y, fanSpe.u1);
connect(fanSpe.y, ramLim.u);
connect(maxDewPoi.y, addPar.u);
connect(addPar.y, endPoiTwo.u1);
connect(addPar1.y, endPoiTwo.u2);
connect(addPar2.y, endPoiOne.u1);
connect(maxDewPoi.y, endPoiOne.u2);
connect(endPoiTwo.y, medFanSpe.x1);
connect(maxCooFanSpe.y, medFanSpe.f1);
connect(endPoiOne.y, medFanSpe.x2);
connect(minFanSpe.y, medFanSpe.f2);
connect(TOut, medFanSpe.u);
connect(TCooSet, aveZonSet.u1);
connect(THeaSet, aveZonSet.u2);
connect(aveZonSet.y, lim.u);
connect(uHea, heaFanSpe.u);
connect(speTwoPoi.y, cooFanSpe1.x1);
connect(minFanSpe.y, cooFanSpe1.f1);
connect(speThrPoi.y, cooFanSpe1.x2);
connect(medFanSpe.y, cooFanSpe1.f2);
connect(uCoo, cooFanSpe1.u);
connect(speFouPoi.y, cooFanSpe2.x1);
connect(medFanSpe.y, cooFanSpe2.f1);
connect(one.y, cooFanSpe2.x2);
connect(maxCooFanSpe.y, cooFanSpe2.f2);
connect(uCoo, cooFanSpe2.u);
connect(heaFanSpe.y, spe.u1);
connect(uHea, heaSupTem.u);
connect(speOnePoi.y, heaFanSpe.x1);
connect(minFanSpe.y, heaFanSpe.f1);
connect(one.y, heaFanSpe.x2);
connect(maxHeaFanSpe.y, heaFanSpe.f2);
connect(zer.y, heaSupTem.x1);
connect(lim.y, heaSupTem.f1);
connect(temOnePoi.y, heaSupTem.x2);
connect(maxSupTem.y, heaSupTem.f2);
connect(zer.y, cooSupTem.x1);
connect(lim.y, cooSupTem.f1);
connect(temTwoPoi.y, cooSupTem.x2);
connect(supCooTem.y, addPar3.u);
connect(addPar3.y, cooSupTem.f2);
connect(temThrPoi.y, cooSupTem1.x1);
connect(lim.y, cooSupTem1.f1);
connect(temFouPoi.y, cooSupTem1.x2);
connect(supCooTem.y, cooSupTem1.f2);
connect(cooFanSpe1.y, cooFan.u1);
connect(cooFanSpe2.y, cooFan.u3);
connect(cooFan.y, spe.u2);
connect(uHea, heaSta.u);
connect(heaSta.y, supTemSet.u2);
connect(heaSupTem.y, supTemSet.u1);
connect(cooSupTem.y, supTemSet.u3);
connect(heaSta.y, supTemSet1.u2);
connect(cooSupTem1.y, supTemSet1.u3);
connect(heaSupTem.y, supTemSet1.u1);
connect(spe.y, fanSpe.u3);
connect(ramLim.y, y);
connect(supTemSet.y, TSupHeaEcoSet);
connect(supTemSet1.y, TSupCooSet);
connect(uCoo, cooSupTem.u);
connect(uCoo, cooSupTem1.u);
connect(TZon, addPar1.u);
connect(TZon, addPar2.u);
connect(isUnoMod.y, not1.u);
connect(not1.y, y1SupFan);
connect(speFouPoi.y, gre.u1);
connect(uCoo, gre.u2);
connect(gre.y, cooFan.u2);
end Supply;