Buildings.Controls.OBC.ASHRAE.G36.TerminalUnits.ParallelFanCVF.Subsequences

Package of subsequences for constant-volume parallel fan-powered terminal unit

Information

This package contains subsequences for controlling parallel fan-powered terminal unit with constant-volume fan. They are created according to Section 5.7 of ASHRAE Guideline 36, May 2020.

Package Content

Name Description
Buildings.Controls.OBC.ASHRAE.G36.TerminalUnits.ParallelFanCVF.Subsequences.ActiveAirFlow ActiveAirFlow Output the active primary airflow setpoint for constant-volume parallel fan-powered terminal unit
Buildings.Controls.OBC.ASHRAE.G36.TerminalUnits.ParallelFanCVF.Subsequences.Alarms Alarms Generate alarms of parallel fan-powered terminal unit with constant-volume fan
Buildings.Controls.OBC.ASHRAE.G36.TerminalUnits.ParallelFanCVF.Subsequences.DamperValves DamperValves Output signals for controlling constant-volume parallel fan-powered terminal unit
Buildings.Controls.OBC.ASHRAE.G36.TerminalUnits.ParallelFanCVF.Subsequences.Overrides Overrides Software switches to override setpoints
Buildings.Controls.OBC.ASHRAE.G36.TerminalUnits.ParallelFanCVF.Subsequences.SystemRequests SystemRequests Output system requests for parallel fan-powered terminal unit with constant-volume fan
Buildings.Controls.OBC.ASHRAE.G36.TerminalUnits.ParallelFanCVF.Subsequences.Validation Validation Collection of validation models

Buildings.Controls.OBC.ASHRAE.G36.TerminalUnits.ParallelFanCVF.Subsequences.ActiveAirFlow Buildings.Controls.OBC.ASHRAE.G36.TerminalUnits.ParallelFanCVF.Subsequences.ActiveAirFlow

Output the active primary airflow setpoint for constant-volume parallel fan-powered terminal unit

Buildings.Controls.OBC.ASHRAE.G36.TerminalUnits.ParallelFanCVF.Subsequences.ActiveAirFlow

Information

This sequence sets the active primary cooling maximum and minimum setpoints for parallel fan-powered terminal unit with constant volume fan. The implementation is according to the Section 5.7.4 of ASHRAE Guideline 36, May 2020.

The setpoints shall vary depending on the mode of the zone group.

Setpoint OccupiedCooldown SetupWarm-upSetbackUnoccupied
Cooling maximum (VActCooMax_flow)VCooMax_flow VCooMax_flowVCooMax_flow 000
Minimum (VActMin_flow)VOccMin_flow0 0000

Parameters

TypeNameDefaultDescription
RealVCooMax_flow Design zone cooling maximum airflow rate [m3/s]

Connectors

TypeNameDescription
input IntegerInputuOpeModZone operation mode
input RealInputVOccMin_flowOccupied minimum airflow setpoint [m3/s]
output RealOutputVActCooMax_flowActive primary cooling maximum airflow setpoint [m3/s]
output RealOutputVActMin_flowActive primary minimum airflow setpoint [m3/s]

Modelica definition

block ActiveAirFlow "Output the active primary airflow setpoint for constant-volume parallel fan-powered terminal unit" parameter Real VCooMax_flow( final quantity="VolumeFlowRate", final unit="m3/s") "Design zone cooling maximum airflow rate"; Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uOpeMod "Zone operation mode"; Buildings.Controls.OBC.CDL.Interfaces.RealInput VOccMin_flow( final unit="m3/s", final quantity="VolumeFlowRate") "Occupied minimum airflow setpoint"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput VActCooMax_flow( final min=0, final unit="m3/s", final quantity="VolumeFlowRate") "Active primary cooling maximum airflow setpoint"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput VActMin_flow( final min=0, final unit="m3/s", final quantity="VolumeFlowRate") "Active primary minimum airflow setpoint"; protected Buildings.Controls.OBC.CDL.Integers.Sources.Constant occMod( final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.occupied) "Occupied mode"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant cooDowMod( final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.coolDown) "Cool down mode"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant setUpMod( final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.setUp) "Setup mode"; Buildings.Controls.OBC.CDL.Logical.Or or3 "Check if it is in occupied, cooldown, or setup mode"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal actCooMax( final realTrue=VCooMax_flow) "Active cooling maximum flow"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal occModInd( final realTrue=1) "If in occupied mode, output 1"; Buildings.Controls.OBC.CDL.Reals.Multiply pro "Active cooling minimum, minimum airflow setpoint"; Buildings.Controls.OBC.CDL.Integers.Equal ifOcc "Check if current operation mode is occupied mode"; Buildings.Controls.OBC.CDL.Integers.Equal ifCooDow "Check if current operation mode is cooldown mode"; Buildings.Controls.OBC.CDL.Integers.Equal ifSetUp "Check if current operation mode is setup mode"; Buildings.Controls.OBC.CDL.Logical.Or or2 "Check if it is in occupied, cooldown, or setup mode"; equation connect(occMod.y, ifOcc.u1); connect(cooDowMod.y, ifCooDow.u1); connect(setUpMod.y, ifSetUp.u1); connect(uOpeMod, ifOcc.u2); connect(uOpeMod, ifCooDow.u2); connect(uOpeMod, ifSetUp.u2); connect(ifOcc.y, or3.u1); connect(ifCooDow.y, or3.u2); connect(ifOcc.y, occModInd.u); connect(VOccMin_flow, pro.u2); connect(occModInd.y, pro.u1); connect(actCooMax.y, VActCooMax_flow); connect(pro.y, VActMin_flow); connect(or3.y, or2.u1); connect(or2.y, actCooMax.u); connect(ifSetUp.y, or2.u2); end ActiveAirFlow;

Buildings.Controls.OBC.ASHRAE.G36.TerminalUnits.ParallelFanCVF.Subsequences.Alarms Buildings.Controls.OBC.ASHRAE.G36.TerminalUnits.ParallelFanCVF.Subsequences.Alarms

Generate alarms of parallel fan-powered terminal unit with constant-volume fan

Buildings.Controls.OBC.ASHRAE.G36.TerminalUnits.ParallelFanCVF.Subsequences.Alarms

Information

This block outputs alarms of parallel fan-powered terminal unit with constant volume fan. The implementation is according to the Section 5.7.6 of ASHRAE Guideline 36, May 2020.

Low airflow

  1. If the zone is in occupied mode and after the AHU supply fan has been enabled for staTim, if the measured airflow VPri_flow is less than 70% of setpoint VActSet_flow for 5 minutes (lowFloTim) while the setpoint is greater than zero, generate a Level 3 alarm.
  2. If the zone is in occupied mode and after the AHU supply fan has been enabled for staTim, if the measured airflow VPri_flow is less than 50% of setpoint VActSet_flow for 5 minutes (lowFloTim) while the setpoint is greater than zero, generate a Level 2 alarm.
  3. If a zone has an importance multiplier (staPreMul) of 0 for its static pressure reset Trim-Respond control loop, low airflow alarms shall be suppressed for that zone.

Low-discharging air temperature

  1. If the zone is in occupied mode and if heating hot-water plant is proven on (u1HotPla=true), and the discharge temperature (TDis) is 8 °C (15 °F) less than the setpoint (TDisSet) for 10 minuts (lowTemTim), generate a Level 3 alarm.
  2. If the zone is in occupied mode and if heating hot-water plant is proven on (u1HotPla=true), and the discharge temperature (TDis) is 17 °C (30 °F) less than the setpoint (TDisSet) for 10 minuts (lowTemTim), generate a Level 2 alarm.
  3. If a zone has an importance multiplier (hotWatRes) of 0 for its hot-water reset Trim-Respond control loop, low discharing air temperature alarms shall be suppressed for that zone.

Fan status alarm

Fan alarm is indicated by the status input being different from the output command after a period of 15 seconds after a change in output status.

  1. Command on (u1FanCom=true), status off (u1TerFan=false), generate Level 2 alarm.
  2. Command off (u1FanCom=false), status on (u1TerFan=true), generate Level 4 alarm.

Airflow sensor calibration

If the fan serving the zone has been OFF (u1Fan=false) for 10 minutes (fanOffTim), and airflow sensor reading VPri_flow is above 10% of the cooling maximum airflow setpoint VCooMax_flow, generate a Level 3 alarm.

Leaking damper

If the damper position (uDam) is 0% and airflow sensor reading VPri_flow is above 10% of the cooling maximum airflow setpoint VCooMax_flow for 10 minutes (leaFloTim) while the fan serving the zone is proven on (u1Fan=true), generate a Level 4 alarm.

Leaking valve

If the valve position (uVal) is 0% for 15 minutes (valCloTim), discharing air temperature TDis is above AHU supply temperature TSup by 3 °C (5 °F), and the fan serving the zone is proven on (u1Fan=true), gemerate a Level 4 alarm.

Parameters

TypeNameDefaultDescription
HeatingCoilheaCoiBuildings.Controls.OBC.ASHRA...Heating coil type
RealstaPreMul Importance multiplier for the zone static pressure reset control loop
RealhotWatRes Importance multiplier for the hot water reset control loop
RealVCooMax_flow Design zone cooling maximum airflow rate [m3/s]
ReallowFloTim300Threshold time to check low flow rate [s]
ReallowTemTim600Threshold time to check low discharge temperature [s]
RealcomChaTim15Threshold time after fan command change [s]
RealfanOffTim600Threshold time to check fan off [s]
RealleaFloTim600Threshold time to check damper leaking airflow [s]
RealvalCloTim900Threshold time to check valve leaking water flow [s]
Advanced
RealfloHys0.05Near zero flow rate, below which the flow rate or difference will be seen as zero [m3/s]
RealdTHys0.25Temperature difference hysteresis below which the temperature difference will be seen as zero [K]
RealdamPosHys0.05Near zero damper position, below which the damper will be seen as closed [1]
RealvalPosHys0.05Near zero valve position, below which the valve will be seen as closed [1]
RealstaTim1800Delay triggering alarms after enabling AHU supply fan [s]

Connectors

TypeNameDescription
input RealInputVPri_flowMeasured primary airflow rate airflow rate [m3/s]
input RealInputVActSet_flowActive airflow setpoint [m3/s]
input BooleanInputu1FanAHU supply fan status
input BooleanInputu1FanComTerminal fan command on
input BooleanInputu1TerFanTerminal fan proven on
input IntegerInputuOpeModZone operation mode
input RealInputuDamDamper position setpoint [1]
input RealInputuValActual valve position [1]
input RealInputTSupTemperature of the air supplied from central air handler [K]
input BooleanInputu1HotPlaHot water plant status
input RealInputTDisMeasured discharge air temperature [K]
input RealInputTDisSetDischarge air temperature setpoint [K]
output IntegerOutputyLowFloAlaLow airflow alarms
output IntegerOutputyFloSenAlaAirflow sensor calibration alarm
output IntegerOutputyFanStaAlaFan status alarm
output IntegerOutputyLeaDamAlaLeaking damper alarm
output IntegerOutputyLeaValAlaLeaking valve alarm
output IntegerOutputyLowTemAlaLow discharge air temperature alarms

Modelica definition

block Alarms "Generate alarms of parallel fan-powered terminal unit with constant-volume fan" parameter Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil heaCoi=Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Heating coil type"; parameter Real staPreMul "Importance multiplier for the zone static pressure reset control loop"; parameter Real hotWatRes "Importance multiplier for the hot water reset control loop"; parameter Real VCooMax_flow( final quantity="VolumeFlowRate", final unit="m3/s") "Design zone cooling maximum airflow rate"; parameter Real lowFloTim( final unit="s", final quantity="Time")=300 "Threshold time to check low flow rate"; parameter Real lowTemTim( final unit="s", final quantity="Time")=600 "Threshold time to check low discharge temperature"; parameter Real comChaTim( final unit="s", final quantity="Time")=15 "Threshold time after fan command change"; parameter Real fanOffTim( final unit="s", final quantity="Time")=600 "Threshold time to check fan off"; parameter Real leaFloTim( final unit="s", final quantity="Time")=600 "Threshold time to check damper leaking airflow"; parameter Real valCloTim( final unit="s", final quantity="Time")=900 "Threshold time to check valve leaking water flow"; parameter Real floHys( final quantity="VolumeFlowRate", final unit="m3/s")=0.05 "Near zero flow rate, below which the flow rate or difference will be seen as zero"; parameter Real dTHys( final unit="K", final quantity="TemperatureDifference")=0.25 "Temperature difference hysteresis below which the temperature difference will be seen as zero"; parameter Real damPosHys( final unit="1")=0.05 "Near zero damper position, below which the damper will be seen as closed"; parameter Real valPosHys( final unit="1")=0.05 "Near zero valve position, below which the valve will be seen as closed"; parameter Real staTim( final unit="s", final quantity="Time")=1800 "Delay triggering alarms after enabling AHU supply fan"; Buildings.Controls.OBC.CDL.Interfaces.RealInput VPri_flow( final min=0, final unit="m3/s", final quantity="VolumeFlowRate") "Measured primary airflow rate airflow rate"; Buildings.Controls.OBC.CDL.Interfaces.RealInput VActSet_flow( final min=0, final unit="m3/s", final quantity="VolumeFlowRate") "Active airflow setpoint"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1Fan "AHU supply fan status"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1FanCom "Terminal fan command on"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1TerFan "Terminal fan proven on"; Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uOpeMod "Zone operation mode"; Buildings.Controls.OBC.CDL.Interfaces.RealInput uDam( final min=0, final unit="1") "Damper position setpoint"; Buildings.Controls.OBC.CDL.Interfaces.RealInput uVal( final min=0, final unit="1") "Actual valve position"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TSup( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") "Temperature of the air supplied from central air handler"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1HotPla if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Hot water plant status"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TDis( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") "Measured discharge air temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TDisSet( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Discharge air temperature setpoint"; Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yLowFloAla "Low airflow alarms"; Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yFloSenAla "Airflow sensor calibration alarm"; Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yFanStaAla "Fan status alarm"; Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yLeaDamAla "Leaking damper alarm"; Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yLeaValAla "Leaking valve alarm"; Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yLowTemAla if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Low discharge air temperature alarms"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai( final k=0.5) "Percentage of the setpoint"; Buildings.Controls.OBC.CDL.Reals.Less les( final h=floHys) "Check if measured airflow is less than threshold"; Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel( final delayTime=lowFloTim) "Check if the measured airflow has been less than threshold value for threshold time"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr( final t=floHys, final h=0.5*floHys) "Check if setpoint airflow is greater than zero"; Buildings.Controls.OBC.CDL.Reals.Greater gre( final h=floHys) "Check if measured airflow is less than threshold"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai1( final k=0.7) "Percentage of the setpoint"; Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel1( final delayTime=lowFloTim) "Check if the measured airflow has been less than threshold value for threshold time"; Buildings.Controls.OBC.CDL.Logical.And and2 "Measured airflow has been less than threshold value for sufficient time"; Buildings.Controls.OBC.CDL.Logical.And and1 "Measured airflow has been less than threshold value for sufficient time"; Buildings.Controls.OBC.CDL.Integers.Switch lowFloAla "Low airflow alarm"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt( final k=2) "Level 2 alarm"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt( final integerTrue=3) "Convert boolean true to level 3 alarm"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant conInt1( final k=staPreMul) "Importance multiplier for zone static pressure reset"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr1 "Check if the multiplier is greater than zero"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt1 "Suppress the alarm when multiplier is zero"; Buildings.Controls.OBC.CDL.Integers.Multiply proInt "Low flow alarms"; Buildings.Controls.OBC.CDL.Logical.And and14 "Logical and"; Buildings.Controls.OBC.CDL.Logical.Not not1 "Logical not"; Buildings.Controls.OBC.CDL.Utilities.Assert assMes( final message="Warning: airflow is less than 50% of the setpoint.") "Level 2 low airflow alarm"; Buildings.Controls.OBC.CDL.Logical.And and4 "Logical and"; Buildings.Controls.OBC.CDL.Logical.Not not2 "Logical not"; Buildings.Controls.OBC.CDL.Utilities.Assert assMes1( final message="Warning: airflow is less than 70% of the setpoint.") "Level 3 low airflow alarm"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant cooMaxFlo( final k=VCooMax_flow) "Cooling maximum airflow setpoint"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai2( final k=0.1) "Percentage of the setpoint"; Buildings.Controls.OBC.CDL.Logical.Not not3 "Logical not"; Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel2( final delayTime=fanOffTim) "Check if the input has been true for more than threshold time"; Buildings.Controls.OBC.CDL.Reals.Greater gre1( final h=floHys) "Check if measured airflow is greater than threshold"; Buildings.Controls.OBC.CDL.Logical.And and5 "Check if the measured airflow is greater than the threshold and the AHU supply fan is OFF"; Buildings.Controls.OBC.CDL.Logical.Not not4 "Logical not"; Buildings.Controls.OBC.CDL.Utilities.Assert assMes2( final message="Warning: airflow sensor should be calibrated.") "Level 3 airflow sensor alarm"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt2( final integerTrue=3) "Convert boolean true to level 3 alarm"; Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel3( final delayTime=leaFloTim) "Check if the input has been true for more than threshold time"; Buildings.Controls.OBC.CDL.Reals.LessThreshold cloDam( final t=damPosHys, final h=0.5*damPosHys) "Check if damper position is near zero"; Buildings.Controls.OBC.CDL.Logical.And leaDamAla "Check if generating leak damper alarms"; Buildings.Controls.OBC.CDL.Logical.Not not5 "Logical not"; Buildings.Controls.OBC.CDL.Utilities.Assert assMes3( final message="Warning: the damper is leaking.") "Level 4 leaking damper alarm"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt3( final integerTrue=4) "Convert boolean true to level 4 alarm"; Buildings.Controls.OBC.CDL.Reals.Less les1( final h=dTHys) if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Discharge temperature lower than setpoint by a threshold"; Buildings.Controls.OBC.CDL.Reals.AddParameter addPar( final p=-17) if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Setpoint temperature minus a threshold"; Buildings.Controls.OBC.CDL.Reals.Less les2( final h=dTHys) if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Discharge temperature lower than setpoint by a threshold"; Buildings.Controls.OBC.CDL.Reals.AddParameter addPar1( final p=-8) if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Setpoint temperature minus a threshold"; Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel4( final delayTime=lowTemTim) if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Check if the discharge temperature has been less than threshold value for threshold time"; Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel5( final delayTime=lowTemTim) if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Check if the discharge temperature has been less than threshold value for threshold time"; Buildings.Controls.OBC.CDL.Logical.And and6 if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Discharge temperature has been less than threshold and the hot water plant is proven on"; Buildings.Controls.OBC.CDL.Logical.And and7 if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Logical and"; Buildings.Controls.OBC.CDL.Logical.Not not6 if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Logical not"; Buildings.Controls.OBC.CDL.Utilities.Assert assMes4( final message="Warning: discharge air temperature is 17 degC less than the setpoint.") if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Level 2 low discharge air temperature alarm"; Buildings.Controls.OBC.CDL.Integers.Switch lowTemAla if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Low discharge temperature alarm"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt2( final k=2) if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Level 2 alarm"; Buildings.Controls.OBC.CDL.Logical.And and8 if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Discharge temperature has been less than threshold and the hot water plant is proven on"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt4( final integerTrue=3) if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Convert boolean true to level 3 alarm"; Buildings.Controls.OBC.CDL.Logical.And and9 if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Logical and"; Buildings.Controls.OBC.CDL.Logical.Not not7 if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Logical not"; Buildings.Controls.OBC.CDL.Utilities.Assert assMes5( final message="Warning: discharge air temperature is 8 degC less than the setpoint.") if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Level 3 low airflow alarm"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant conInt3( final k=hotWatRes) if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Importance multiplier for hot water reset control"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr2 if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Check if the multiplier is greater than zero"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt5 if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Suppress the alarm when multiplier is zero"; Buildings.Controls.OBC.CDL.Integers.Multiply proInt1 if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Low discharge air temperature alarms"; Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel6( final delayTime=valCloTim) "Check if the input has been true for more than threshold time"; Buildings.Controls.OBC.CDL.Reals.LessThreshold cloVal( final t=valPosHys, final h=0.5*valPosHys) "Check if valve position is near zero"; Buildings.Controls.OBC.CDL.Reals.AddParameter addPar2( final p=3) "AHU supply temperature plus 3 degree"; Buildings.Controls.OBC.CDL.Reals.Greater gre2( final h=dTHys) "Discharge temperature greate than AHU supply temperature by a threshold"; Buildings.Controls.OBC.CDL.Logical.And leaValAla1 "Check if generating leak valve alarms, one of two stacked And blocks"; Buildings.Controls.OBC.CDL.Logical.And leaValAla2 "Check if generating leak valve alarms, one of two stacked And blocks"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt6( final integerTrue=4) "Convert boolean true to level 4 alarm"; Buildings.Controls.OBC.CDL.Logical.Not not8 "Logical not"; Buildings.Controls.OBC.CDL.Utilities.Assert assMes6( final message="Warning: the valve is leaking.") "Level 4 leaking valve alarm"; Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel7( final delayTime=comChaTim) "Check if the fan has been commond on for threshold time"; Buildings.Controls.OBC.CDL.Logical.And and11 "Check if the terminal fan has been commond on for threshold time and fan is still off"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt4( final k=2) "Level 2 alarm"; Buildings.Controls.OBC.CDL.Integers.Switch fanStaAla "Fan status alarm"; Buildings.Controls.OBC.CDL.Logical.Not not9 "Logical not"; Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel8( final delayTime=comChaTim) "Check if the fan has been commond off for threshold time"; Buildings.Controls.OBC.CDL.Logical.And and10 "Check if the terminal fan has been commond off for threshold time and fan is still on"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt7( final integerTrue=4) "Convert boolean true to level 3 alarm"; Buildings.Controls.OBC.CDL.Logical.Not not10 "Logical not"; Buildings.Controls.OBC.CDL.Utilities.Assert assMes7( final message="Warning: fan has been commanded ON but still OFF.") "Level 2 fan status alarm"; Buildings.Controls.OBC.CDL.Logical.Not not11 "Logical not"; Buildings.Controls.OBC.CDL.Utilities.Assert assMes8( final message="Warning: fan has been commanded OFF but still ON.") "Level 4 fan status alarm"; Buildings.Controls.OBC.CDL.Logical.Not not12 "Logical not"; Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel9( final delayTime=lowFloTim) "Check if the active flow setpoint has been greater than zero for the threshold time"; Buildings.Controls.OBC.CDL.Logical.TrueDelay fanIni( final delayTime=staTim) "Check if the AHU supply fan has been enabled for threshold time"; Buildings.Controls.OBC.CDL.Logical.And and12 "True: AHU fan is enabled and the discharge flow is lower than the threshold"; Buildings.Controls.OBC.CDL.Logical.And and13 "True: AHU fan is enabled and the discharge flow is lower than the threshold"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant occMod( final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.occupied) "Occupied mode"; Buildings.Controls.OBC.CDL.Integers.Equal isOcc "Check if current operation mode is occupied mode"; Buildings.Controls.OBC.CDL.Logical.And and3 "Logical and"; Buildings.Controls.OBC.CDL.Logical.And and15 "Logical and"; Buildings.Controls.OBC.CDL.Logical.And and16 "Check if the terminal fan has been commond off for threshold time and fan is still on"; Buildings.Controls.OBC.CDL.Logical.And and17 "Check if the terminal fan has been commond on for threshold time and fan is still off"; Buildings.Controls.OBC.CDL.Logical.And leaDamAla1 "Check if generating leak damper alarms"; Buildings.Controls.OBC.CDL.Logical.And and18 if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Logical and"; Buildings.Controls.OBC.CDL.Logical.And and19 if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Logical and"; equation connect(VActSet_flow, gai.u); connect(VPri_flow, les.u1); connect(VActSet_flow, greThr.u); connect(VActSet_flow, gai1.u); connect(VPri_flow, gre.u2); connect(gai1.y, gre.u1); connect(truDel.y, and2.u1); connect(truDel1.y, and1.u2); connect(conInt.y, lowFloAla.u1); connect(booToInt.y, lowFloAla.u3); connect(conInt1.y, greThr1.u); connect(greThr1.y, booToInt1.u); connect(lowFloAla.y, proInt.u1); connect(booToInt1.y, proInt.u2); connect(not1.y, assMes.u); connect(and2.y, and14.u1); connect(greThr1.y, and14.u2); connect(and1.y, and4.u1); connect(greThr1.y, and4.u2); connect(not2.y, assMes1.u); connect(cooMaxFlo.y, gai2.u); connect(u1Fan, not3.u); connect(gai2.y, gre1.u2); connect(gre1.y, and5.u1); connect(not4.y, assMes2.u); connect(booToInt2.y, yFloSenAla); connect(proInt.y, yLowFloAla); connect(uDam, cloDam.u); connect(u1Fan, leaDamAla.u2); connect(not5.y, assMes3.u); connect(booToInt3.y, yLeaDamAla); connect(VPri_flow, gre1.u1); connect(TDis, les1.u1); connect(TDisSet, addPar.u); connect(addPar.y, les1.u2); connect(TDis, les2.u1); connect(TDisSet, addPar1.u); connect(addPar1.y, les2.u2); connect(conInt2.y, lowTemAla.u1); connect(not6.y, assMes4.u); connect(booToInt4.y, lowTemAla.u3); connect(not7.y, assMes5.u); connect(conInt3.y, greThr2.u); connect(greThr2.y, booToInt5.u); connect(lowTemAla.y, proInt1.u1); connect(booToInt5.y, proInt1.u2); connect(proInt1.y, yLowTemAla); connect(uVal, cloVal.u); connect(TSup, addPar2.u); connect(TDis, gre2.u1); connect(addPar2.y, gre2.u2); connect(not8.y, assMes6.u); connect(booToInt6.y, yLeaValAla); connect(u1FanCom, truDel7.u); connect(u1FanCom, not9.u); connect(not9.y, truDel8.u); connect(u1FanCom, and11.u2); connect(not9.y, and10.u2); connect(conInt4.y, fanStaAla.u1); connect(booToInt7.y, fanStaAla.u3); connect(fanStaAla.y, yFanStaAla); connect(not10.y, assMes7.u); connect(not11.y, assMes8.u); connect(u1TerFan, and10.u1); connect(u1TerFan, not12.u); connect(not12.y, and11.u1); connect(greThr.y, truDel9.u); connect(truDel9.y, and1.u1); connect(truDel9.y, and2.u2); connect(and5.y, truDel2.u); connect(truDel2.y, booToInt2.u); connect(truDel2.y, not4.u); connect(not3.y, and5.u2); connect(gre1.y, leaDamAla.u1); connect(truDel3.y, booToInt3.u); connect(truDel3.y, not5.u); connect(truDel6.y, booToInt6.u); connect(truDel6.y, not8.u); connect(and6.y, truDel4.u); connect(les1.y, and6.u1); connect(u1HotPla, and6.u2); connect(and8.y, truDel5.u); connect(truDel5.y, and9.u1); connect(les2.y, and8.u1); connect(u1HotPla, and8.u2); connect(les.y, and13.u1); connect(and13.y, truDel.u); connect(gre.y, and12.u1); connect(and12.y, truDel1.u); connect(u1Fan, fanIni.u); connect(fanIni.y, and13.u2); connect(fanIni.y, and12.u2); connect(uOpeMod, isOcc.u1); connect(occMod.y, isOcc.u2); connect(greThr2.y, and9.u2); connect(greThr2.y, and7.u2); connect(truDel4.y, and7.u1); connect(gai.y, les.u2); connect(and14.y, and15.u1); connect(and15.y, lowFloAla.u2); connect(and4.y, and3.u1); connect(and3.y, booToInt.u); connect(and15.y, not1.u); connect(and3.y, not2.u); connect(isOcc.y, and15.u2); connect(isOcc.y, and3.u2); connect(and11.y, and17.u1); connect(and17.y, fanStaAla.u2); connect(and16.y, booToInt7.u); connect(and17.y, not10.u); connect(and16.y, not11.u); connect(and10.y, and16.u1); connect(truDel8.y, and16.u2); connect(truDel7.y, and17.u2); connect(leaDamAla.y, leaDamAla1.u1); connect(leaDamAla1.y, truDel3.u); connect(cloDam.y, leaDamAla1.u2); connect(and7.y, and19.u1); connect(and19.y, lowTemAla.u2); connect(and9.y, and18.u1); connect(and18.y, booToInt4.u); connect(and19.y, not6.u); connect(and18.y, not7.u); connect(isOcc.y, and19.u2); connect(isOcc.y, and18.u2); connect(leaValAla1.y, leaValAla2.u1); connect(u1Fan, leaValAla1.u2); connect(cloVal.y, leaValAla1.u1); connect(gre2.y, leaValAla2.u2); connect(leaValAla2.y, truDel6.u); end Alarms;

Buildings.Controls.OBC.ASHRAE.G36.TerminalUnits.ParallelFanCVF.Subsequences.DamperValves Buildings.Controls.OBC.ASHRAE.G36.TerminalUnits.ParallelFanCVF.Subsequences.DamperValves

Output signals for controlling constant-volume parallel fan-powered terminal unit

Buildings.Controls.OBC.ASHRAE.G36.TerminalUnits.ParallelFanCVF.Subsequences.DamperValves

Information

This sequence sets the fan status, damper and valve position for constant-volume parallel fan-powered terminal unit. The implementation is according to Section 5.7.5 of ASHRAE Guideline 36, May 2020. The calculation is done following the steps below.

  1. When the zone state is cooling (uCoo > 0), then the cooling loop output uCoo shall be mapped to the airflow setpoint from the minimum VActMin_flow to the cooling maximum VActCooMax_flow airflow setpoints. The heating coil is disabled (yVal=0).
    • If supply air temperature TSup from the AHU is greater than room temperature TZon, cooling supply airflow setpoint shall be no higher than the minimum.
  2. When the zone state is deadband (uCoo=0 and uHea=0), then the active airflow setpoint shall be the minimum airflow setpoint VActMin_flow. The heating coil is disabled (yVal=0).
  3. When the zone state is heating (uHea > 0),
    • As the heating-loop output uHea increases from 0% to 100%, it shall reset the discharge temperature THeaDisSet from the current AHU setpoint temperature TSupSet to a maximum of dTDisZonSetMax above space temperature setpoint.
    • The airflow setpoint shall be the minimum flow VActMin_flow.
    • The heating coil shall be modulated to maintain the discharge temperature at setpoint.
  4. The VAV damper shall be modulated by a control loop to maintain the measured airflow at the active setpoint.
  5. Fan control
    • Fan shall run whenever zone state is heating.
    • The fan shall run in deadband and cooling zone state when the primary airflow rate VPri_flow is less than the minimum outdoor airflow setpoint VOAMin_flow (if using California Title 24, it should be the zone absolute minimum outdoor airflow rate) for 1 minute, and shall shut off when the VPri_flow is above VOAMin_flow (or the zone absolute minimum outdoor airflow rate) by 10% for 3 minutes.

The sequences of controlling fan, damper position for constant-volume parallel fan-powered terminal unit are described in the following figure below.

Image of damper control for constant-volume parallel fan-powered terminal unit

As specified in Section 5.7.7 of ASHRAE Guideline 36, the airflow setpoint could be override by providing software switches that interlock to a system-level point to:

  1. when oveFloSet equals to 1, force the zone airflow setpoint VPri_flow_Set to zero,
  2. when oveFloSet equals to 2, force the zone airflow setpoint VPri_flow_Set to zone cooling maximum airflow rate VCooMax_flow,
  3. when oveFloSet equals to 3, force the zone airflow setpoint VPri_flow_Set to zone minimum airflow setpoint VMin_flow.

Parameters

TypeNameDefaultDescription
RealdTDisZonSetMax11Zone maximum discharge air temperature above heating setpoint [K]
RealVMin_flow Design zone minimum airflow setpoint [m3/s]
RealVCooMax_flow Design zone cooling maximum airflow rate [m3/s]
Valve
SimpleControllercontrollerTypeValBuildings.Controls.OBC.CDL.T...Type of controller
RealkVal0.5Gain of controller for valve control [1/K]
RealTiVal300Time constant of integrator block for valve control [s]
RealTdVal0.1Time constant of derivative block for valve control [s]
Damper
SimpleControllercontrollerTypeDamBuildings.Controls.OBC.CDL.T...Type of controller
RealkDam0.5Gain of controller for damper control [1]
RealTiDam300Time constant of integrator block for damper control [s]
RealTdDam0.1Time constant of derivative block for damper control [s]
Advanced
RealdTHys0.25Temperature difference hysteresis below which the temperature difference will be seen as zero [K]
ReallooHys0.05Loop output hysteresis below which the output will be seen as zero [1]
RealfloHys0.01Hysteresis for checking airflow rate [m3/s]
RealiniDam0.01Initial damper position when the damper control is enabled [1]

Connectors

TypeNameDescription
input IntegerInputoveFloSetIndex of overriding flow setpoint, 1: set to zero; 2: set to cooling maximum; 3: set to minimum flow; 4: set to heating maximum
input RealInputVPri_flowMeasured primary airflow rate [m3/s]
input RealInputuCooCooling control signal [1]
input RealInputVActCooMax_flowActive primary cooling maximum airflow rate [m3/s]
input RealInputTSupTemperature of the air supplied from central air handler [K]
input RealInputTZonMeasured zone temperature [K]
input RealInputVActMin_flowActive primary minimum airflow rate [m3/s]
input BooleanInputu1FanAHU supply fan status
input RealInputTSupSetSupply air temperature setpoint from central air handler [K]
input RealInputTHeaSetZone heating setpoint temperature [K]
input RealInputuHeaHeating control signal [1]
input RealInputTDisMeasured discharge air temperature [K]
input IntegerInputuOpeModZone operation mode
input RealInputVOAMin_flowMinimum outdoor airflow setpoint [m3/s]
output RealOutputVPri_flow_SetPrimary airflow setpoint [m3/s]
output RealOutputyDamVAV damper commanded position [1]
output RealOutputTHeaDisSetDischarge airflow setpoint temperature for heating [K]
output RealOutputyValHot water valve commanded position [1]
output BooleanOutputy1FanTerminal fan command on

Modelica definition

block DamperValves "Output signals for controlling constant-volume parallel fan-powered terminal unit" parameter Real dTDisZonSetMax(unit="K")=11 "Zone maximum discharge air temperature above heating setpoint"; parameter Real VMin_flow( final quantity="VolumeFlowRate", final unit="m3/s") "Design zone minimum airflow setpoint"; parameter Real VCooMax_flow( final quantity="VolumeFlowRate", final unit="m3/s") "Design zone cooling maximum airflow rate"; parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerTypeVal= Buildings.Controls.OBC.CDL.Types.SimpleController.PI "Type of controller"; parameter Real kVal(unit="1/K")=0.5 "Gain of controller for valve control"; parameter Real TiVal(unit="s")=300 "Time constant of integrator block for valve control"; parameter Real TdVal(unit="s")=0.1 "Time constant of derivative block for valve control"; parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerTypeDam= Buildings.Controls.OBC.CDL.Types.SimpleController.PI "Type of controller"; parameter Real kDam(unit="1")=0.5 "Gain of controller for damper control"; parameter Real TiDam(unit="s")=300 "Time constant of integrator block for damper control"; parameter Real TdDam(unit="s")=0.1 "Time constant of derivative block for damper control"; parameter Real dTHys(unit="K")=0.25 "Temperature difference hysteresis below which the temperature difference will be seen as zero"; parameter Real looHys(unit="1")=0.05 "Loop output hysteresis below which the output will be seen as zero"; parameter Real floHys(unit="m3/s")=0.01 "Hysteresis for checking airflow rate"; parameter Real iniDam(unit="1")=0.01 "Initial damper position when the damper control is enabled"; Buildings.Controls.OBC.CDL.Interfaces.IntegerInput oveFloSet "Index of overriding flow setpoint, 1: set to zero; 2: set to cooling maximum; 3: set to minimum flow; 4: set to heating maximum"; Buildings.Controls.OBC.CDL.Interfaces.RealInput VPri_flow( final min=0, final unit="m3/s", final quantity="VolumeFlowRate") "Measured primary airflow rate"; Buildings.Controls.OBC.CDL.Interfaces.RealInput uCoo( final min=0, final max=1, final unit="1") "Cooling control signal"; Buildings.Controls.OBC.CDL.Interfaces.RealInput VActCooMax_flow( final min=0, final unit="m3/s", final quantity="VolumeFlowRate") "Active primary cooling maximum airflow rate"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TSup( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") "Temperature of the air supplied from central air handler"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TZon( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") "Measured zone temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealInput VActMin_flow( final min=0, final unit="m3/s", final quantity="VolumeFlowRate") "Active primary minimum airflow rate"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1Fan "AHU supply fan status"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TSupSet( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") "Supply air temperature setpoint from central air handler"; Buildings.Controls.OBC.CDL.Interfaces.RealInput THeaSet( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") "Zone heating setpoint temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealInput uHea( final min=0, final max=1, final unit="1") "Heating control signal"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TDis( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") "Measured discharge air temperature"; Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uOpeMod "Zone operation mode"; Buildings.Controls.OBC.CDL.Interfaces.RealInput VOAMin_flow( final min=0, final unit="m3/s", final quantity="VolumeFlowRate") "Minimum outdoor airflow setpoint"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput VPri_flow_Set( final min=0, final unit="m3/s", final quantity="VolumeFlowRate") "Primary airflow setpoint"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yDam( final min=0, final max=1, final unit="1") "VAV damper commanded position"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput THeaDisSet( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") "Discharge airflow setpoint temperature for heating"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yVal( final min=0, final max=1, final unit="1") "Hot water valve commanded position"; Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1Fan "Terminal fan command on"; protected Buildings.Controls.OBC.CDL.Logical.And and4 "Logical and"; Buildings.Controls.OBC.CDL.Reals.Line lin "Active airflow setpoint for cooling"; Buildings.Controls.OBC.CDL.Reals.Switch swi "Output active cooling airflow according to cooling control signal"; Buildings.Controls.OBC.CDL.Reals.Switch swi5 "Airflow setpoint when it is in cooling state"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant conZer( final k=0) "Constant zero"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant conOne( final k=1) "Constant one"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr1( final t=looHys, final h=0.5*looHys) "Check if it is cooling state"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr( final t=dTHys, final h=0.5*dTHys) "Check if supply air temperature is greater than room temperature"; Buildings.Controls.OBC.CDL.Reals.Subtract sub2 "Calculate temperature difference between AHU supply air and room "; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr2( final t=looHys, final h=0.5*looHys) "Check if it is heating state"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant conZer3( final k=0) "Constant zero"; Buildings.Controls.OBC.CDL.Reals.AddParameter addPar( final p=dTDisZonSetMax) "Maximum heating discharge temperature"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant conHal( final k=1) "Constant real value"; Buildings.Controls.OBC.CDL.Reals.Line conTDisHeaSet "Discharge air temperature for heating"; Buildings.Controls.OBC.CDL.Reals.PIDWithReset conVal( final controllerType=controllerTypeVal, final k=kVal, final Ti=TiVal, final Td=TdVal, final yMax=1, final yMin=0, u_s(final unit="K", displayUnit="degC"), u_m(final unit="K", displayUnit="degC")) "Hot water valve controller"; Buildings.Controls.OBC.CDL.Reals.Switch swi1 "Hot water valve position, close the valve when the zone is not in heating state"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant unOcc( final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.unoccupied) "Constant signal for unoccupied mode"; Buildings.Controls.OBC.CDL.Integers.Equal isUno "Output true if the operation mode is unoccupied"; Buildings.Controls.OBC.CDL.Reals.Switch swi2 "Hot water valve position"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant nomFlow( final k=VCooMax_flow) "Nominal volume flow rate"; Buildings.Controls.OBC.CDL.Reals.Divide VDisSet_flowNor "Normalized setpoint for discharge volume flow rate"; Buildings.Controls.OBC.CDL.Reals.Divide VDis_flowNor "Normalized discharge volume flow rate"; Buildings.Controls.OBC.CDL.Reals.PIDWithReset conDam( final controllerType=controllerTypeDam, final k=kDam, final Ti=TiDam, final Td=TdDam, final yMax=1, final yMin=0, final y_reset=iniDam) "Damper position controller"; Buildings.Controls.OBC.CDL.Reals.Switch swi3 "Air damper position"; Buildings.Controls.OBC.CDL.Reals.Less les( final h=floHys) "Check if the discharge airflow rate is less than minimum outdoor airflow setpoint"; Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel7( final delayTime=60) "Check if the discharge flow rate has been less than minimum outdoor airflow setpoint for a threshold time"; Buildings.Controls.OBC.CDL.Logical.Latch lat "Hold fan On status"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai1( final k=1.1) "Gain factor"; Buildings.Controls.OBC.CDL.Reals.Greater gre "Check if the discharge airflow rate is greater than minimum outdoor airflow setpoint by 10%"; Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel1( final delayTime=180) "Check if the discharge flow rate has been greater than minimum outdoor airflow setpoint by 10% for a threshold time"; Buildings.Controls.OBC.CDL.Logical.Switch logSwi "Switch fan control depending on if the zone state is heating"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant con( final k=true) "Constant true"; Buildings.Controls.OBC.CDL.Logical.Switch logSwi1 "Terminal fan status"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant con1( final k=false) "Constant false"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt(final k=1) "Constant 1"; Buildings.Controls.OBC.CDL.Integers.Equal forZerFlo "Check if forcing zone airflow setpoint to zero"; Buildings.Controls.OBC.CDL.Integers.Equal forCooMax "Check if forcing zone airflow setpoint to cooling maximum"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt1(final k=2) "Constant 2"; Buildings.Controls.OBC.CDL.Integers.Equal forMinFlo "Check if forcing zone airflow setpoint to minimum flow"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt2(final k=3) "Constant 3"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal zerFlo( final realTrue=0) "Force zone airflow setpoint to zero"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal cooMax( final realTrue=VCooMax_flow) "Force zone airflow setpoint to cooling maximum"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal minFlo( final realTrue=VMin_flow) "Force zone airflow setpoint to zone minimum flow"; Buildings.Controls.OBC.CDL.Reals.Add add2 "Add up two inputs"; Buildings.Controls.OBC.CDL.Reals.Add add1 "Add up inputs"; Buildings.Controls.OBC.CDL.Reals.Switch swi4 "Airflow setpoint after considering override"; Buildings.Controls.OBC.CDL.Logical.Or or3 "Check if the airflow setpoint should be overrided"; Buildings.Controls.OBC.CDL.Logical.Or or2 "Check if the airflow setpoint should be overrided"; equation connect(uCoo, lin.u); connect(conZer.y, lin.x1); connect(conOne.y, lin.x2); connect(VActCooMax_flow, lin.f2); connect(uCoo, greThr1.u); connect(and4.y, swi5.u2); connect(lin.y, swi5.u3); connect(swi5.y, swi.u1); connect(TSup, sub2.u1); connect(sub2.y, greThr.u); connect(greThr.y, and4.u2); connect(greThr1.y, and4.u1); connect(greThr1.y, swi.u2); connect(VActMin_flow, swi5.u1); connect(VActMin_flow, lin.f1); connect(uHea, greThr2.u); connect(VActMin_flow, swi.u3); connect(conZer3.y, conTDisHeaSet.x1); connect(TSupSet, conTDisHeaSet.f1); connect(uHea, conTDisHeaSet.u); connect(conHal.y, conTDisHeaSet.x2); connect(THeaSet, addPar.u); connect(addPar.y, conTDisHeaSet.f2); connect(greThr2.y, conVal.trigger); connect(TZon, sub2.u2); connect(TDis, conVal.u_m); connect(conTDisHeaSet.y, conVal.u_s); connect(conTDisHeaSet.y, THeaDisSet); connect(greThr2.y, swi1.u2); connect(conVal.y, swi1.u1); connect(unOcc.y, isUno.u1); connect(uOpeMod, isUno.u2); connect(isUno.y, swi2.u2); connect(conZer3.y, swi1.u3); connect(conZer3.y, swi2.u1); connect(swi1.y, swi2.u3); connect(swi2.y, yVal); connect(nomFlow.y, VDisSet_flowNor.u2); connect(VDisSet_flowNor.y, conDam.u_s); connect(VPri_flow, VDis_flowNor.u1); connect(nomFlow.y, VDis_flowNor.u2); connect(swi3.y, yDam); connect(isUno.y, swi3.u2); connect(conZer3.y, swi3.u1); connect(conDam.y, swi3.u3); connect(VDis_flowNor.y, conDam.u_m); connect(VOAMin_flow, les.u2); connect(les.y, truDel7.u); connect(truDel7.y, lat.u); connect(VOAMin_flow, gai1.u); connect(VPri_flow, gre.u1); connect(gai1.y, gre.u2); connect(gre.y, truDel1.u); connect(truDel1.y, lat.clr); connect(greThr2.y, logSwi.u2); connect(con.y, logSwi.u1); connect(lat.y, logSwi.u3); connect(logSwi.y, logSwi1.u3); connect(isUno.y, logSwi1.u2); connect(con1.y, logSwi1.u1); connect(logSwi1.y, y1Fan); connect(VPri_flow, les.u1); connect(oveFloSet,forZerFlo. u1); connect(conInt.y,forZerFlo. u2); connect(oveFloSet,forCooMax. u1); connect(conInt1.y,forCooMax. u2); connect(oveFloSet,forMinFlo. u1); connect(conInt2.y,forMinFlo. u2); connect(forZerFlo.y,zerFlo. u); connect(forCooMax.y,cooMax. u); connect(forMinFlo.y,minFlo. u); connect(cooMax.y,add2. u1); connect(zerFlo.y,add1. u1); connect(forZerFlo.y,or3. u1); connect(forCooMax.y,or3. u2); connect(add1.y, swi4.u1); connect(add2.y,add1. u2); connect(minFlo.y,add2. u2); connect(swi.y, swi4.u3); connect(swi4.y, VPri_flow_Set); connect(swi4.y, VDisSet_flowNor.u1); connect(u1Fan, conDam.trigger); connect(or2.y, swi4.u2); connect(or3.y, or2.u2); connect(forMinFlo.y, or2.u1); end DamperValves;

Buildings.Controls.OBC.ASHRAE.G36.TerminalUnits.ParallelFanCVF.Subsequences.Overrides Buildings.Controls.OBC.ASHRAE.G36.TerminalUnits.ParallelFanCVF.Subsequences.Overrides

Software switches to override setpoints

Buildings.Controls.OBC.ASHRAE.G36.TerminalUnits.ParallelFanCVF.Subsequences.Overrides

Information

This block considers the overrides to the setpoints for parallel fan-powered unit with constant-volume fan. The implementation is according to the Section 5.7.7 of ASHRAE Guideline 36, May 2020.

Provide software switches that interlock to a system-level point to:

  1. when oveDamPos equals to 1, force the damper to full closed by setting yDam to 0,
  2. when oveDamPos equals to 2, force the damper to full open by setting yDam to 1.
  3. when uHeaOff equals to true, force the heating valve to full closed by setting yVal to 0.
  4. When oveFan equals to 1, force the fan to turn OFF.
  5. When oveFan equals to 2, force the fan to turn ON.

Connectors

TypeNameDescription
input IntegerInputoveDamPosIndex of overriding damper position, 1: set to close; 2: set to open
input RealInputuDamDamper commanded position [1]
input BooleanInputuHeaOffOverride heating valve position, true: close heating valve
input RealInputuValHeating valve commanded position [1]
input IntegerInputoveFanIndex of overriding fan status, 1: turn fan off; 2: turn fan on
input BooleanInputu1FanTerminal fan status
output RealOutputyDamDamper commanded position, after considering override [1]
output RealOutputyValHeating valve commanded position, after considering override [1]
output BooleanOutputy1FanFan command on

Modelica definition

block Overrides "Software switches to override setpoints" Buildings.Controls.OBC.CDL.Interfaces.IntegerInput oveDamPos "Index of overriding damper position, 1: set to close; 2: set to open"; Buildings.Controls.OBC.CDL.Interfaces.RealInput uDam( final min=0, final unit="1") "Damper commanded position"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uHeaOff "Override heating valve position, true: close heating valve"; Buildings.Controls.OBC.CDL.Interfaces.RealInput uVal( final min=0, final unit="1") "Heating valve commanded position"; Buildings.Controls.OBC.CDL.Interfaces.IntegerInput oveFan "Index of overriding fan status, 1: turn fan off; 2: turn fan on"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1Fan "Terminal fan status"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yDam( final min=0, final unit="1") "Damper commanded position, after considering override"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yVal( final min=0, final unit="1") "Heating valve commanded position, after considering override"; Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1Fan "Fan command on"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt3( final k=1) "Constant 1"; Buildings.Controls.OBC.CDL.Integers.Equal intEqu3 "Check if forcing damper to full close"; Buildings.Controls.OBC.CDL.Integers.Equal intEqu4 "Check if forcing damper to full open"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt4( final k=2) "Constant 2"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal cloDam( final realTrue=0) "Full closed damper position"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal opeDam( final realTrue=1) "Full open damper position"; Buildings.Controls.OBC.CDL.Reals.Add add3 "Add up inputs"; Buildings.Controls.OBC.CDL.Logical.Or or2 "Check if the damper setpoint position should be overrided"; Buildings.Controls.OBC.CDL.Reals.Switch swi1 "Damper setpoint position after considering override"; Buildings.Controls.OBC.CDL.Reals.Multiply pro "Valve position setpoint after considering override"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea( final realTrue=0, final realFalse=1) "Convert boolean true to real 0"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt5( final k=1) "Constant 1"; Buildings.Controls.OBC.CDL.Integers.Equal intEqu1 "Check if forcing fan to turn off"; Buildings.Controls.OBC.CDL.Integers.Equal intEqu2 "Check if forcing fan to turn on"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt6( final k=2) "Constant 2"; Buildings.Controls.OBC.CDL.Logical.Switch logSwi "Fan status after considering override"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant con( final k=false) "Turn fan off"; Buildings.Controls.OBC.CDL.Logical.Switch logSwi1 "Logical switch"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant con1( final k=true) "Turn fan on"; equation connect(conInt3.y, intEqu3.u2); connect(conInt4.y,intEqu4. u2); connect(oveDamPos, intEqu3.u1); connect(oveDamPos, intEqu4.u1); connect(intEqu3.y, cloDam.u); connect(intEqu4.y, opeDam.u); connect(cloDam.y, add3.u1); connect(opeDam.y, add3.u2); connect(intEqu3.y, or2.u1); connect(intEqu4.y, or2.u2); connect(add3.y, swi1.u1); connect(or2.y, swi1.u2); connect(uDam, swi1.u3); connect(swi1.y, yDam); connect(uHeaOff, booToRea.u); connect(booToRea.y, pro.u1); connect(uVal, pro.u2); connect(pro.y, yVal); connect(conInt5.y,intEqu1. u2); connect(conInt6.y,intEqu2. u2); connect(oveFan, intEqu2.u1); connect(oveFan, intEqu1.u1); connect(intEqu1.y, logSwi.u2); connect(con.y, logSwi.u1); connect(intEqu2.y, logSwi1.u2); connect(con1.y, logSwi1.u1); connect(u1Fan, logSwi1.u3); connect(logSwi1.y, logSwi.u3); connect(logSwi.y, y1Fan); end Overrides;

Buildings.Controls.OBC.ASHRAE.G36.TerminalUnits.ParallelFanCVF.Subsequences.SystemRequests Buildings.Controls.OBC.ASHRAE.G36.TerminalUnits.ParallelFanCVF.Subsequences.SystemRequests

Output system requests for parallel fan-powered terminal unit with constant-volume fan

Buildings.Controls.OBC.ASHRAE.G36.TerminalUnits.ParallelFanCVF.Subsequences.SystemRequests

Information

This sequence outputs the system reset requests for parallel fan-powered terminal unit with constant-voume fan. The implementation is according to the Section 5.7.8 of ASHRAE Guideline 36, May 2020.

Cooling SAT reset requests yZonTemResReq

  1. If the zone temperature TZon exceeds the zone cooling setpoint TCooSet by 3 °C (5 °F)) for 2 minutes and after suppression period (uAftSup=true) due to setpoint change per G36 Part 5.1.20, send 3 requests (yZonTemResReq=3).
  2. Else if the zone temperature TZon exceeds the zone cooling setpoint TCooSet by 2 °C (3 °F) for 2 minutes and after suppression period (uAftSup=true) due to setpoint change per G36 Part 5.1.20, send 2 requests (yZonTemResReq=2).
  3. Else if the cooling loop uCoo is greater than 95%, send 1 request (yZonTemResReq=1) until uCoo is less than 85%.
  4. Else if uCoo is less than 95%, send 0 request (yZonTemResReq=0).

Static pressure reset requests yZonPreResReq

  1. If the measured airflow VPri_flow is less than 50% of setpoint VSet_flow while the setpoint is greater than zero and the damper position uDam is greater than 95% for 1 minute, send 3 requests (yZonPreResReq=3).
  2. Else if the measured airflow VPri_flow is less than 70% of setpoint VSet_flow while the setpoint is greater than zero and the damper position uDam is greater than 95% for 1 minute, send 2 requests (yZonPreResReq=2).
  3. Else if the damper position uDam is greater than 95%, send 1 request (yZonPreResReq=1) until uDam is less than 85%.
  4. Else if the damper position uDam is less than 95%, send 0 request (yZonPreResReq=0).

If there is a hot-water coil, hot-water reset requests yHeaValResReq

  1. If the discharging air temperature TDis is 17 °C (30 °F) thrTDis_1 less than the setpoint TDisSet for 5 minutes, send 3 requests.
  2. Else ff the discharging air temperature TDis is 8 °C (15 °F) thrTDis_1 less than the setpoint TDisSet for 5 minutes, send 2 requests.
  3. Else if the hot water valve position uVal is greater than 95%, send 1 request until the hot water valve position is less than 85%.
  4. Else if the hot water valve position uVal is less than 95%, send 0 request.

If there is a hot-water coil and heating hot-water plant, heating hot-water plant reqeusts. Send the heating hot-water plant that serves the zone a heating hot-water plant request as follows:

  1. If the hot water valve position uVal is greater than 95%, send 1 request until the hot water valve position is less than 10%.
  2. If the hot water valve position uVal is less than 95%, send 0 requests.

Parameters

TypeNameDefaultDescription
HeatingCoilheaCoiBuildings.Controls.OBC.ASHRA...Heating coil type
RealthrTemDif3Threshold difference between zone temperature and cooling setpoint for generating 3 cooling SAT reset requests [K]
RealtwoTemDif2Threshold difference between zone temperature and cooling setpoint for generating 2 cooling SAT reset requests [K]
RealthrTDis_117Threshold difference between discharge air temperature and its setpoint for generating 3 hot water reset requests [K]
RealthrTDis_28Threshold difference between discharge air temperature and its setpoint for generating 2 hot water reset requests [K]
Duration times
RealdurTimTem120Duration time of zone temperature exceeds setpoint [s]
RealdurTimFlo60Duration time of airflow rate less than setpoint [s]
RealdurTimDisAir300Duration time of discharge air temperature less than setpoint [s]
Advanced
RealdTHys0.25Near zero temperature difference, below which the difference will be seen as zero [K]
RealfloHys Near zero flow rate, below which the flow rate or difference will be seen as zero [m3/s]
ReallooHys Loop output hysteresis below which the output will be seen as zero [1]
RealdamPosHys Near zero damper position, below which the damper will be seen as closed [1]
RealvalPosHys Near zero valve position, below which the valve will be seen as closed [1]
RealsamplePeriod120Sample period of component, set to the same value as the trim and respond that process yPreSetReq [s]

Connectors

TypeNameDescription
input BooleanInputuAftSupAfter suppression period due to the setpoint change
input RealInputTCooSetZone cooling setpoint temperature [K]
input RealInputTZonZone temperature [K]
input RealInputuCooCooling loop signal [1]
input RealInputVSet_flowDischarge airflow rate setpoint [m3/s]
input RealInputVPri_flowMeasured primary airflow rate [m3/s]
input RealInputuDamDamper position setpoint [1]
input RealInputTDisSetDischarge airflow setpoint temperature for heating [K]
input RealInputTDisMeasured discharge airflow temperature [K]
input RealInputuValHot water valve position [1]
output IntegerOutputyZonTemResReqZone cooling supply air temperature reset request
output IntegerOutputyZonPreResReqZone static pressure reset requests
output IntegerOutputyHeaValResReqHot water reset requests
output IntegerOutputyHotWatPlaReqRequest to heating hot-water plant

Modelica definition

block SystemRequests "Output system requests for parallel fan-powered terminal unit with constant-volume fan" parameter Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil heaCoi=Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Heating coil type"; parameter Real thrTemDif( final unit="K", final quantity="TemperatureDifference")=3 "Threshold difference between zone temperature and cooling setpoint for generating 3 cooling SAT reset requests"; parameter Real twoTemDif( final unit="K", final quantity="TemperatureDifference")=2 "Threshold difference between zone temperature and cooling setpoint for generating 2 cooling SAT reset requests"; parameter Real thrTDis_1( final unit="K", final quantity="TemperatureDifference")=17 "Threshold difference between discharge air temperature and its setpoint for generating 3 hot water reset requests"; parameter Real thrTDis_2( final unit="K", final quantity="TemperatureDifference")=8 "Threshold difference between discharge air temperature and its setpoint for generating 2 hot water reset requests"; parameter Real durTimTem( final unit="s", final quantity="Time")=120 "Duration time of zone temperature exceeds setpoint"; parameter Real durTimFlo( final unit="s", final quantity="Time")=60 "Duration time of airflow rate less than setpoint"; parameter Real durTimDisAir( final unit="s", final quantity="Time")=300 "Duration time of discharge air temperature less than setpoint"; parameter Real dTHys( final unit="K", final quantity="TemperatureDifference")=0.25 "Near zero temperature difference, below which the difference will be seen as zero"; parameter Real floHys( final quantity="VolumeFlowRate", final unit="m3/s") "Near zero flow rate, below which the flow rate or difference will be seen as zero"; parameter Real looHys(unit="1") "Loop output hysteresis below which the output will be seen as zero"; parameter Real damPosHys( final unit="1") "Near zero damper position, below which the damper will be seen as closed"; parameter Real valPosHys( final unit="1") "Near zero valve position, below which the valve will be seen as closed"; parameter Real samplePeriod( final unit="s", final quantity="Time")=120 "Sample period of component, set to the same value as the trim and respond that process yPreSetReq"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uAftSup "After suppression period due to the setpoint change"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TCooSet( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") "Zone cooling setpoint temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TZon( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") "Zone temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealInput uCoo( final min=0, final max=1, final unit="1") "Cooling loop signal"; Buildings.Controls.OBC.CDL.Interfaces.RealInput VSet_flow( final min=0, final unit="m3/s", quantity="VolumeFlowRate") "Discharge airflow rate setpoint"; Buildings.Controls.OBC.CDL.Interfaces.RealInput VPri_flow( final min=0, final unit="m3/s", final quantity="VolumeFlowRate") "Measured primary airflow rate"; Buildings.Controls.OBC.CDL.Interfaces.RealInput uDam( final min=0, final max=1, final unit="1") "Damper position setpoint"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TDisSet( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Discharge airflow setpoint temperature for heating"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TDis( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Measured discharge airflow temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealInput uVal( final min=0, final max=1, final unit="1") if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Hot water valve position"; Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yZonTemResReq "Zone cooling supply air temperature reset request"; Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yZonPreResReq "Zone static pressure reset requests"; Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yHeaValResReq if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Hot water reset requests"; Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yHotWatPlaReq if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Request to heating hot-water plant"; protected Buildings.Controls.OBC.CDL.Reals.Less les( final h=dTHys) if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Check if discharge temperature is less than setpoint by a threshold"; Buildings.Controls.OBC.CDL.Reals.Less les1( final h=dTHys) if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Check if discharge temperature is less than setpoint by a threshold"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr1( final t=thrTemDif, final h=dTHys) "Check if zone temperature is greater than cooling setpoint by threshold"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr2( final t=twoTemDif, final h=dTHys) "Check if zone temperature is greater than cooling setpoint by threshold"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr3( final t=0.95, final h=damPosHys) "Check if damper position is greater than 0.95"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr( final t=0.95, final h=looHys) "Check if cooling loop signal is greater than 0.95"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr4( final t=floHys, final h=0.5*floHys) "Check if discharge airflow setpoint is greater than 0"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt "Convert boolean to integer"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt1 "Convert boolean to integer"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai1( final k=0.5) "50% of setpoint"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai2( final k=0.7) "70% of setpoint"; Buildings.Controls.OBC.CDL.Reals.Subtract sub2 "Calculate difference between zone temperature and cooling setpoint"; Buildings.Controls.OBC.CDL.Reals.Subtract sub3 "Calculate difference between zone temperature and cooling setpoint"; Buildings.Controls.OBC.CDL.Logical.And and1 "Logical and"; Buildings.Controls.OBC.CDL.Logical.And and2 "Logical and"; Buildings.Controls.OBC.CDL.Logical.And and3 "Logical and"; Buildings.Controls.OBC.CDL.Logical.And and4 "Logical and"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant thrCooResReq( final k=3) "Constant 3"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant twoCooResReq( final k=2) "Constant 2"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant thrPreResReq( final k=3) "Constant 3"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant twoPreResReq( final k=2) "Constant 2"; Buildings.Controls.OBC.CDL.Integers.Switch intSwi "Output 3 or other request "; Buildings.Controls.OBC.CDL.Integers.Switch intSwi1 "Output 2 or other request "; Buildings.Controls.OBC.CDL.Integers.Switch swi4 "Output 3 or other request "; Buildings.Controls.OBC.CDL.Integers.Switch swi5 "Output 2 or other request "; Buildings.Controls.OBC.CDL.Logical.TrueDelay tim1( final delayTime=durTimTem) "Check if it is more than threshold time"; Buildings.Controls.OBC.CDL.Logical.TrueDelay tim2( final delayTime=durTimTem) "Check if it is more than threshold time"; Buildings.Controls.OBC.CDL.Logical.TrueDelay tim3( final delayTime=durTimFlo) "Check if it is more than threshold time"; Buildings.Controls.OBC.CDL.Reals.Greater greEqu(final h=floHys) "Check if discharge airflow is less than 50% of setpoint"; Buildings.Controls.OBC.CDL.Reals.Greater greEqu1(final h=floHys) "Check if discharge airflow is less than 70% of setpoint"; Buildings.Controls.OBC.CDL.Logical.And and5 "Logical and"; Buildings.Controls.OBC.CDL.Reals.AddParameter addPar( final p=thrTDis_1) if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Discharge temperature plus threshold"; Buildings.Controls.OBC.CDL.Reals.AddParameter addPar1( final p=thrTDis_2) if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Discharge temperature plus threshold"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant thrHeaResReq( final k=3) if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Constant 3"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant twoHeaResReq( final k=2) if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Constant 2"; Buildings.Controls.OBC.CDL.Integers.Switch intSwi2 if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Output 3 or other request "; Buildings.Controls.OBC.CDL.Integers.Switch intSwi3 if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Output 2 or other request "; Buildings.Controls.OBC.CDL.Logical.TrueDelay tim4( final delayTime=durTimDisAir) if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Check if it is more than threshold time"; Buildings.Controls.OBC.CDL.Logical.TrueDelay tim5( final delayTime=durTimDisAir) if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Check if it is more than threshold time"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr5( final t=0.95, final h=valPosHys) if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Check if valve position is greater than 0.95"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt2 if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Convert boolean to integer"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr6( final t=0.95, final h=0.85) if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Check if valve position is greater than 0.95"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt3 if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Convert boolean to integer"; Buildings.Controls.OBC.CDL.Discrete.Sampler sampler( final samplePeriod=samplePeriod) "Sample input signal, as the output signal will go to the trim and respond which also samples at samplePeriod"; Buildings.Controls.OBC.CDL.Discrete.Sampler sampler1( final samplePeriod=samplePeriod) "Sample input signal, as the output signal will go to the trim and respond which also samples at samplePeriod"; Buildings.Controls.OBC.CDL.Discrete.Sampler sampler2( final samplePeriod=samplePeriod) "Sample input signal, as the output signal will go to the trim and respond which also samples at samplePeriod"; Buildings.Controls.OBC.CDL.Discrete.Sampler sampler3( final samplePeriod=samplePeriod) "Sample input signal, as the output signal will go to the trim and respond which also samples at samplePeriod"; equation connect(sub2.y, greThr1.u); connect(and2.y, intSwi.u2); connect(sub3.y, greThr2.u); connect(and1.y, intSwi1.u2); connect(and3.y, swi4.u2); connect(and4.y, swi5.u2); connect(greThr2.y, tim2.u); connect(tim2.y, and1.u2); connect(greThr1.y, tim1.u); connect(tim1.y, and2.u2); connect(greEqu.u1, gai1.y); connect(greEqu.y, and3.u2); connect(gai2.y, greEqu1.u1); connect(greEqu1.y, and4.u2); connect(uAftSup, and2.u1); connect(uAftSup, and1.u1); connect(thrCooResReq.y, intSwi.u1); connect(twoCooResReq.y, intSwi1.u1); connect(intSwi1.y, intSwi.u3); connect(intSwi.y, yZonTemResReq); connect(greThr.y, booToInt.u); connect(booToInt.y, intSwi1.u3); connect(greThr3.y, tim3.u); connect(greThr4.y, and5.u1); connect(tim3.y, and5.u2); connect(and5.y, and3.u1); connect(and5.y, and4.u1); connect(greThr3.y, booToInt1.u); connect(booToInt1.y, swi5.u3); connect(twoPreResReq.y, swi5.u1); connect(thrPreResReq.y, swi4.u1); connect(swi5.y, swi4.u3); connect(swi4.y, yZonPreResReq); connect(TDis,addPar. u); connect(TDis,addPar1. u); connect(tim5.y, intSwi3.u2); connect(tim4.y, intSwi2.u2); connect(addPar.y, les.u1); connect(TDisSet, les.u2); connect(les.y, tim4.u); connect(TDisSet, les1.u2); connect(addPar1.y, les1.u1); connect(les1.y, tim5.u); connect(yHeaValResReq, intSwi2.y); connect(thrHeaResReq.y, intSwi2.u1); connect(twoHeaResReq.y, intSwi3.u1); connect(intSwi3.y, intSwi2.u3); connect(uVal, greThr5.u); connect(greThr5.y, booToInt2.u); connect(booToInt2.y, intSwi3.u3); connect(uVal, greThr6.u); connect(greThr6.y, booToInt3.u); connect(booToInt3.y, yHotWatPlaReq); connect(TCooSet, sub3.u2); connect(TCooSet, sub2.u2); connect(TZon, sub2.u1); connect(TZon, sub3.u1); connect(uCoo, sampler.u); connect(sampler.y, greThr.u); connect(uDam, sampler3.u); connect(sampler3.y, greThr3.u); connect(greThr4.u, sampler2.y); connect(sampler2.u, VSet_flow); connect(sampler2.y, gai1.u); connect(sampler2.y, gai2.u); connect(VPri_flow, sampler1.u); connect(sampler1.y, greEqu.u2); connect(sampler1.y, greEqu1.u2); end SystemRequests;