Buildings.Controls.OBC.ASHRAE.G36.FanCoilUnits

Control sequences for fan coil unit

Information

This package implements control modules for the fan coil unit as per the sequence of operations defined in ASHRAE Guideline 36-2021, section 5.22.

Package Content

Name Description
Buildings.Controls.OBC.ASHRAE.G36.FanCoilUnits.Controller Controller Fan coil unit controller that comprises subsequences for controlling fan speed and supply air temperature
Buildings.Controls.OBC.ASHRAE.G36.FanCoilUnits.Subsequences Subsequences Package of subsequences for fan coil unit controls
Buildings.Controls.OBC.ASHRAE.G36.FanCoilUnits.Validation Validation Package of validation models for fan coil unit controls

Buildings.Controls.OBC.ASHRAE.G36.FanCoilUnits.Controller Buildings.Controls.OBC.ASHRAE.G36.FanCoilUnits.Controller

Fan coil unit controller that comprises subsequences for controlling fan speed and supply air temperature

Buildings.Controls.OBC.ASHRAE.G36.FanCoilUnits.Controller

Information

Block for fan coil unit control. It outputs supply fan enable signal and speed signal, the supply air temperature setpoint, the zone air heating and cooling setpoints, and commanded valve positions for heating and cooling coils.

It is implemented according to the ASHRAE Guideline 36-2021, Part 5.22.

The sequences consist of the following subsequences.

Supply fan control

The supply fan control is implemented according to Part 5.22.4. It outputs the control signals for supply fan enable yFan and the fan speed yFanSpe. See Buildings.Controls.OBC.ASHRAE.G36.FanCoilUnits.Subsequences.FanSpeed for a detailed description.

Supply air temperature setpoint

The supply air temperature setpoint control sequences are implemented based on Part 5.22.4. The block outputs a supply air temperature setpoint signal TSupSet, and control signals for the heating coil yHeaCoi and the cooling coil yCooCoi. See Buildings.Controls.OBC.ASHRAE.G36.FanCoilUnits.Subsequences.SupplyAirTemperature for a detailed description.

Zone air heating and cooling setpoints

The zone air heating setpoint TZonHeaSetand cooling setpoint TZonHeaSet as well as system operation mode signal modSetPoi.yOpeMod are described at Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone.VAV.SetPoints.ModeAndSetPoints.

Plant requests

The plant requests are implemented based on Part 5.22.8. The block outputs a chilled water plant request yChiPlaReq, chilled water supply temperature reset request yChiWatResReq, hot water plant request yHotWatPlaReq and hot water supply temperature reset request yHotWatResReq. See Buildings.Controls.OBC.ASHRAE.G36.FanCoilUnits.Subsequences.PlantRequests for a detailed description.

Parameters

TypeNameDefaultDescription
Booleanhave_winSenfalseTrue if the zone has window status sensor
Booleanhave_occSenfalseTrue if the zone has occupancy sensor
RealheaDea0.1Heating loop signal limit above which controller operation changes from deadband mode to heating mode [1]
RealcooDea0.1Cooling loop signal limit above which controller operation changes from deadband mode to cooling mode [1]
System and building parameters
CoolingCoilcooCoiBuildings.Controls.OBC.ASHRA...Cooling coil type
HeatingCoilheaCoiBuildings.Controls.OBC.ASHRA...Heating coil type
PID parameters
Cooling loop control
SimpleControllercooConTypBuildings.Controls.OBC.CDL.T...Type of cooling loop signal controller
RealkCoo0.1Gain for cooling control loop signal [1/K]
RealTiCoo900Time constant of integrator block for cooling control loop signal [s]
RealTdCoo0.1Time constant of derivative block for cooling control loop signal [s]
Heating loop control
SimpleControllerheaConTypBuildings.Controls.OBC.CDL.T...Type of heating loop signal controller
RealkHea0.1Gain for heating control loop signal [1/K]
RealTiHea900Time constant of integrator block for heating control loop signal [s]
RealTdHea0.1Time constant of derivative block for heating control loop signal [s]
Cooling coil control
SimpleControllercooCoiConTypBuildings.Controls.OBC.CDL.T...Type of cooling coil controller
RealkCooCoi0.1Gain for cooling coil control signal [1/K]
RealTiCooCoi900Time constant of integrator block for cooling coil control signal [s]
RealTdCooCoi0.1Time constant of derivative block for cooling coil control signal [s]
Heating coil control
SimpleControllerheaCoiConTypBuildings.Controls.OBC.CDL.T...Type of heating coil controller
RealkHeaCoi0.1Gain for heating coil control signal [1/K]
RealTiHeaCoi900Time constant of integrator block for heating coil control signal [s]
RealTdHeaCoi0.1Time constant of derivative block for heatinging coil control signal [s]
Supply air setpoints
RealuCooFan_min0.5Cooling loop signal limit at which supply air temperature is at minimum and fan speed starts to be modified [1]
RealuHeaFan_min0.5Heating loop signal limit at which supply air temperature is at maximum and fan speed starts to be modified [1]
Temperature limits
RealTSupSet_max Maximum supply air temperature for heating [K]
RealTSupSet_min Minimum supply air temperature for cooling [K]
Fan speed
RealdeaSpe0.1Deadband mode fan speed [1]
Fan speed - Heating
RealuHeaFan_max1Maximum heating loop signal at which fan speed is modified [1]
RealheaSpe_max1Maximum fan speed for heating [1]
RealheaSpe_min0.1Minimum fan speed for heating [1]
Fan speed - Cooling
RealuCooFan_max1Maximum cooling loop signal at which fan speed is modified [1]
RealcooSpe_max1Maximum fan speed for cooling [1]
RealcooSpe_min0.1Minimum fan speed for cooling [1]
Adjust temperature setpoint
General
Booleanhave_locAdjtrueFlag, set to true if both cooling and heating setpoint are adjustable through a single common knob
BooleansepAdjfalseTrue: cooling and heating setpoint can be adjusted separately
BooleanignDemLimfalseFlag, set to true to exempt individual zone from demand limit setpoint adjustment
Advanced
RealbouLim1Threshold of temperature difference for indicating the end of setback or setup mode
Limits
RealTActCoo_max300.15Maximum cooling setpoint during on [K]
RealTActCoo_min295.15Minimum cooling setpoint during on [K]
RealTActHea_max295.15Maximum heating setpoint during on [K]
RealTActHea_min291.15Minimum heating setpoint during on [K]
RealTWinOpeCooSet322.15Cooling setpoint when window is open [K]
RealTWinOpeHeaSet277.15Heating setpoint when window is open [K]
Demand control adjustment
RealincTSetDem_10.56Cooling setpoint increase value (degK) when cooling demand limit level 1 is imposed [K]
RealincTSetDem_21.1Cooling setpoint increase value (degK) when cooling demand limit level 2 is imposed [K]
RealincTSetDem_32.2Cooling setpoint increase value (degK) when cooling demand limit level 3 is imposed [K]
RealdecTSetDem_10.56Heating setpoint decrease value (degK) when heating demand limit level 1 is imposed [K]
RealdecTSetDem_21.1Heating setpoint decrease value (degK) when heating demand limit level 2 is imposed [K]
RealdecTSetDem_32.2Heating setpoint decrease value (degK) when heating demand limit level 3 is imposed [K]
Request limits
Chilled water plant requests
RealchiWatPlaReqLim00.1Valve position limit below which zero chilled water plant requests are sent when one request was previously being sent [1]
RealchiWatPlaReqLim10.95Valve position limit above which one chilled water plant request is sent [1]
Chilled water temperature reset requests
RealchiWatResReqLim00.85Valve position limit below which zero chilled water reset requests are sent when one request was previously being sent [1]
RealchiWatResReqLim22.78Temperature difference limit between setpoint and supply air temperature above which two chilled water reset requests are sent [K]
RealchiWatResReqTimLim2300Time period for which chiWatResReqLim2 has to be exceeded before two chilled water reset requests are sent [s]
RealchiWatResReqLim35.56Temperature difference limit between setpoint and supply air temperature above which three chilled water reset requests are sent [K]
RealchiWatResReqTimLim3300Time period for which chiWatResReqLim3 has to be exceeded before three chilled water reset requests are sent [s]
Hot water requests
RealhotWatPlaReqLim00.1Valve position limit below which zero hot water plant requests are sent when one request was previously being sent [1]
RealhotWatResReqLim00.85Valve position limit below which zero hot water reset requests are sent when one request was previously being sent [1]
RealhotWatPlaReqLim10.95Valve position limit above which one hot water plant request is sent [1]
RealhotWatResReqLim28Temperature difference limit between setpoint and supply air temperature above which two hot water reset requests are sent [K]
RealhotWatResReqTimLim2300Time period for which hotWatResReqLim2 has to be exceeded before two hot water reset requests are sent [s]
RealhotWatResReqLim317Temperature difference limit between setpoint and supply air temperature above which three hot water reset requests are sent [K]
RealhotWatResReqTimLim3300Time period for which hotWatResReqLim3 has to be exceeded before three hot water reset requests are sent [s]
Advanced
RealuLow-0.1Lower limit of the hysteresis for checking temperature difference [1]
RealuHigh0.1Higher limit of the hysteresis for checking temperature difference [1]
RealdeaHysLim0.05Hysteresis limits for cooling and heating loop signals for deadband mode transitions [1]
RealTHys0.1Hysteresis for checking temperature difference [K]
RealdFanSpe0.05Fan speed hysteresis difference [1]
Operation mode
RealpreWarCooTim10800Maximum cool-down or warm-up time [s]

Connectors

TypeNameDescription
input BooleanInputu1OccCurrent occupancy period, true if it is in occupant period
input BooleanInputu1WinWindow status, normally closed (true), when windows open, it becomes false
input BooleanInputu1FanFan proven on signal
input IntegerInputuCooDemLimLevCooling demand limit level
input IntegerInputuHeaDemLimLevHeating demand limit level
input IntegerInputnOccNumber of occupants
input RealInputwarUpTimWarm-up time retrieved from optimal warm-up block [s]
input RealInputcooDowTimCool-down time retrieved from optimal cool-down block [s]
input RealInputtNexOccTime to next occupied period [s]
input RealInputTZonMeasured zone temperatures [K]
input RealInputTSupMeasured supply air temperature [K]
input RealInputsetAdjSetpoint adjustment value [K]
input RealInputcooSetAdjCooling setpoint adjustment value [K]
input RealInputheaSetAdjHeating setpoint adjustment value [K]
input RealInputTOccHeaSetOccupied heating setpoint temperature [K]
input RealInputTOccCooSetOccupied cooling setpoint temperature [K]
input RealInputTUnoHeaSetUnoccupied heating setpoint temperature [K]
input RealInputTUnoCooSetUnoccupied cooling setpoint temperature [K]
output BooleanOutputy1FanFan command on status
output IntegerOutputyChiWatResReqChilled water reset request
output IntegerOutputyChiPlaReqChiller plant requests
output IntegerOutputyHotWatResReqHot water reset requests
output IntegerOutputyHotWatPlaReqHot water plant requests
output RealOutputTSupSetSupply air temperature setpoint [K]
output RealOutputyFanFan command speed [1]
output RealOutputTZonHeaSetHeating setpoint temperature [K]
output RealOutputTZonCooSetCooling setpoint temperature [K]
output RealOutputyCooCoiCooling coil control signal [1]
output RealOutputyHeaCoiHeating coil control signal [1]

Modelica definition

block Controller "Fan coil unit controller that comprises subsequences for controlling fan speed and supply air temperature" parameter Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil cooCoi=Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased "Cooling coil type"; parameter Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil heaCoi=Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Heating coil type"; parameter Boolean have_winSen=false "True if the zone has window status sensor"; parameter Boolean have_occSen=false "True if the zone has occupancy sensor"; parameter Real heaDea( final unit="1", displayUnit="1")=0.1 "Heating loop signal limit above which controller operation changes from deadband mode to heating mode"; parameter Real cooDea( final unit="1", displayUnit="1")=0.1 "Cooling loop signal limit above which controller operation changes from deadband mode to cooling mode"; parameter Buildings.Controls.OBC.CDL.Types.SimpleController cooConTyp= Buildings.Controls.OBC.CDL.Types.SimpleController.PI "Type of cooling loop signal controller"; parameter Real kCoo( final unit="1/K")=0.1 "Gain for cooling control loop signal"; parameter Real TiCoo( final unit="s")=900 "Time constant of integrator block for cooling control loop signal"; parameter Real TdCoo( final unit="s")=0.1 "Time constant of derivative block for cooling control loop signal"; parameter Buildings.Controls.OBC.CDL.Types.SimpleController heaConTyp= Buildings.Controls.OBC.CDL.Types.SimpleController.PI "Type of heating loop signal controller"; parameter Real kHea( final unit="1/K")=0.1 "Gain for heating control loop signal"; parameter Real TiHea( final unit="s")=900 "Time constant of integrator block for heating control loop signal"; parameter Real TdHea( final unit="s")=0.1 "Time constant of derivative block for heating control loop signal"; parameter Buildings.Controls.OBC.CDL.Types.SimpleController cooCoiConTyp= Buildings.Controls.OBC.CDL.Types.SimpleController.PI "Type of cooling coil controller"; parameter Real kCooCoi( final unit="1/K")=0.1 "Gain for cooling coil control signal"; parameter Real TiCooCoi( final unit="s")=900 "Time constant of integrator block for cooling coil control signal"; parameter Real TdCooCoi( final unit="s")=0.1 "Time constant of derivative block for cooling coil control signal"; parameter Buildings.Controls.OBC.CDL.Types.SimpleController heaCoiConTyp= Buildings.Controls.OBC.CDL.Types.SimpleController.PI "Type of heating coil controller"; parameter Real kHeaCoi( final unit="1/K")=0.1 "Gain for heating coil control signal"; parameter Real TiHeaCoi( final unit="s")=900 "Time constant of integrator block for heating coil control signal"; parameter Real TdHeaCoi( final unit="s")=0.1 "Time constant of derivative block for heatinging coil control signal"; parameter Real uCooFan_min( final unit="1")=0.5 "Cooling loop signal limit at which supply air temperature is at minimum and fan speed starts to be modified"; parameter Real uHeaFan_min( final unit="1")=0.5 "Heating loop signal limit at which supply air temperature is at maximum and fan speed starts to be modified"; parameter Real TSupSet_max( final unit="K", displayUnit="degC") "Maximum supply air temperature for heating"; parameter Real TSupSet_min( final unit="K", displayUnit="degC") "Minimum supply air temperature for cooling"; parameter Real deaSpe( final unit="1", displayUnit="1")=0.1 "Deadband mode fan speed"; parameter Real uHeaFan_max( final unit="1")=1 "Maximum heating loop signal at which fan speed is modified"; parameter Real heaSpe_max( final unit="1")=1 "Maximum fan speed for heating"; parameter Real heaSpe_min(unit="1")=0.1 "Minimum fan speed for heating"; parameter Real uCooFan_max(unit="1")=1 "Maximum cooling loop signal at which fan speed is modified"; parameter Real cooSpe_max( final unit="1")=1 "Maximum fan speed for cooling"; parameter Real cooSpe_min( final unit="1")=0.1 "Minimum fan speed for cooling"; parameter Boolean have_locAdj=true "Flag, set to true if both cooling and heating setpoint are adjustable through a single common knob"; parameter Boolean sepAdj=false "True: cooling and heating setpoint can be adjusted separately"; parameter Boolean ignDemLim=false "Flag, set to true to exempt individual zone from demand limit setpoint adjustment"; parameter Real bouLim=1 "Threshold of temperature difference for indicating the end of setback or setup mode"; parameter Real TActCoo_max( final unit="K", displayUnit="degC")=300.15 "Maximum cooling setpoint during on"; parameter Real TActCoo_min( final unit="K", displayUnit="degC")=295.15 "Minimum cooling setpoint during on"; parameter Real TActHea_max( final unit="K", displayUnit="degC")=295.15 "Maximum heating setpoint during on"; parameter Real TActHea_min( final unit="K", displayUnit="degC")=291.15 "Minimum heating setpoint during on"; parameter Real TWinOpeCooSet( final unit="K", displayUnit="degC")=322.15 "Cooling setpoint when window is open"; parameter Real TWinOpeHeaSet( final unit="K", displayUnit="degC")=277.15 "Heating setpoint when window is open"; parameter Real incTSetDem_1( final unit="K")=0.56 "Cooling setpoint increase value (degK) when cooling demand limit level 1 is imposed"; parameter Real incTSetDem_2( final unit="K")=1.1 "Cooling setpoint increase value (degK) when cooling demand limit level 2 is imposed"; parameter Real incTSetDem_3( final unit="K")=2.2 "Cooling setpoint increase value (degK) when cooling demand limit level 3 is imposed"; parameter Real decTSetDem_1( final unit="K")=0.56 "Heating setpoint decrease value (degK) when heating demand limit level 1 is imposed"; parameter Real decTSetDem_2( final unit="K")=1.1 "Heating setpoint decrease value (degK) when heating demand limit level 2 is imposed"; parameter Real decTSetDem_3( final unit="K")=2.2 "Heating setpoint decrease value (degK) when heating demand limit level 3 is imposed"; parameter Real chiWatPlaReqLim0( final unit="1", displayUnit="1")=0.1 "Valve position limit below which zero chilled water plant requests are sent when one request was previously being sent"; parameter Real chiWatResReqLim0( final unit="1", displayUnit="1")=0.85 "Valve position limit below which zero chilled water reset requests are sent when one request was previously being sent"; parameter Real chiWatPlaReqLim1( final unit="1", displayUnit="1")=0.95 "Valve position limit above which one chilled water plant request is sent"; parameter Real chiWatResReqLim2( final unit="K")=2.78 "Temperature difference limit between setpoint and supply air temperature above which two chilled water reset requests are sent"; parameter Real chiWatResReqTimLim2( final unit="s", displayUnit="s")=300 "Time period for which chiWatResReqLim2 has to be exceeded before two chilled water reset requests are sent"; parameter Real chiWatResReqLim3( final unit="K")=5.56 "Temperature difference limit between setpoint and supply air temperature above which three chilled water reset requests are sent"; parameter Real chiWatResReqTimLim3( final unit="s", displayUnit="s")=300 "Time period for which chiWatResReqLim3 has to be exceeded before three chilled water reset requests are sent"; parameter Real hotWatPlaReqLim0( final unit="1", displayUnit="1")=0.1 "Valve position limit below which zero hot water plant requests are sent when one request was previously being sent"; parameter Real hotWatResReqLim0( final unit="1", displayUnit="1")=0.85 "Valve position limit below which zero hot water reset requests are sent when one request was previously being sent"; parameter Real hotWatPlaReqLim1( final unit="1", displayUnit="1")=0.95 "Valve position limit above which one hot water plant request is sent"; parameter Real hotWatResReqLim2( final unit="K")=8 "Temperature difference limit between setpoint and supply air temperature above which two hot water reset requests are sent"; parameter Real hotWatResReqTimLim2( final unit="s", displayUnit="s")=300 "Time period for which hotWatResReqLim2 has to be exceeded before two hot water reset requests are sent"; parameter Real hotWatResReqLim3( final unit="K")=17 "Temperature difference limit between setpoint and supply air temperature above which three hot water reset requests are sent"; parameter Real hotWatResReqTimLim3( final unit="s", displayUnit="s")=300 "Time period for which hotWatResReqLim3 has to be exceeded before three hot water reset requests are sent"; parameter Real uLow( final unit="1", displayUnit="1")=-0.1 "Lower limit of the hysteresis for checking temperature difference"; parameter Real uHigh( final unit="1", displayUnit="1")=0.1 "Higher limit of the hysteresis for checking temperature difference"; parameter Real deaHysLim( final unit="1", displayUnit="1")=0.05 "Hysteresis limits for cooling and heating loop signals for deadband mode transitions"; parameter Real preWarCooTim( final unit="s", displayUnit="s")=10800 "Maximum cool-down or warm-up time"; parameter Real THys( final unit="K")=0.1 "Hysteresis for checking temperature difference"; parameter Real dFanSpe( final unit="1", displayUnit="1")=0.05 "Fan speed hysteresis difference"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1Occ "Current occupancy period, true if it is in occupant period"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1Win if have_winSen "Window status, normally closed (true), when windows open, it becomes false"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1Fan "Fan proven on signal"; Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uCooDemLimLev "Cooling demand limit level"; Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uHeaDemLimLev "Heating demand limit level"; Buildings.Controls.OBC.CDL.Interfaces.IntegerInput nOcc if have_occSen "Number of occupants"; Buildings.Controls.OBC.CDL.Interfaces.RealInput warUpTim( final unit="s", displayUnit="min", final quantity="Time") "Warm-up time retrieved from optimal warm-up block"; Buildings.Controls.OBC.CDL.Interfaces.RealInput cooDowTim( final unit="s", displayUnit="min", final quantity="Time") "Cool-down time retrieved from optimal cool-down block"; Buildings.Controls.OBC.CDL.Interfaces.RealInput tNexOcc( final unit="s", displayUnit="min", final quantity="Time") "Time to next occupied period"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TZon( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature") "Measured zone temperatures"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TSup( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature") "Measured supply air temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealInput setAdj( final unit="K", displayUnit="degC", final quantity="TemperatureDifference") if have_locAdj and not sepAdj "Setpoint adjustment value"; Buildings.Controls.OBC.CDL.Interfaces.RealInput cooSetAdj( final unit="K", displayUnit="degC", final quantity="TemperatureDifference") if have_locAdj and sepAdj "Cooling setpoint adjustment value"; Buildings.Controls.OBC.CDL.Interfaces.RealInput heaSetAdj( final unit="K", displayUnit="degC", final quantity="TemperatureDifference") if have_locAdj and sepAdj "Heating setpoint adjustment value"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TOccHeaSet( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature") "Occupied heating setpoint temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TOccCooSet( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature") "Occupied cooling setpoint temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TUnoHeaSet( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature") "Unoccupied heating setpoint temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TUnoCooSet( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature") "Unoccupied cooling setpoint temperature"; Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1Fan "Fan command on status"; Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yChiWatResReq if cooCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased "Chilled water reset request"; Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yChiPlaReq if cooCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased "Chiller plant requests"; Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yHotWatResReq 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 "Hot water plant requests"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput TSupSet( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature") "Supply air temperature setpoint"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yFan( final min=0, final max=1, final unit="1") "Fan command speed"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput TZonHeaSet( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature") "Heating setpoint temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput TZonCooSet( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature") "Cooling setpoint temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yCooCoi( final min=0, final max=1, final unit="1") if cooCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased or cooCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.DXCoil "Cooling coil control signal"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yHeaCoi( final min=0, final max=1, final unit="1") if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased or heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.Electric "Heating coil control signal"; Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone.VAV.SetPoints.ModeAndSetPoints modSetPoi( final have_winSen=have_winSen, final have_occSen=have_occSen, final sepAdj=sepAdj, 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 have_locAdj=have_locAdj, final ignDemLim=ignDemLim, 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, final bouLim=bouLim, final uLow=uLow, final uHigh=uHigh, final preWarCooTim=preWarCooTim) "Zone setpoint and operation mode"; Buildings.Controls.OBC.CDL.Reals.PIDWithReset cooPI( final reverseActing=false, final controllerType=cooConTyp, final k=kCoo, final Ti=TiCoo, final Td=TdCoo, r=5) if cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased or cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.DXCoil "Zone cooling control signal"; Buildings.Controls.OBC.CDL.Reals.PIDWithReset heaPI( final controllerType=heaConTyp, final k=kHea, final Ti=TiHea, final Td=TdHea, r=5) if heaCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased or heaCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.Electric "Zone heating control signal"; Buildings.Controls.OBC.ASHRAE.G36.FanCoilUnits.Subsequences.PlantRequests fcuPlaReq( final have_hotWatCoi=heaCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased, final have_chiWatCoi=cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased, final cooSpe_max=cooSpe_max, final heaSpe_max=heaSpe_max, final chiWatPlaReqLim0=chiWatPlaReqLim0, final chiWatResReqLim0=chiWatResReqLim0, final chiWatPlaReqLim1=chiWatPlaReqLim1, final chiWatResReqLim2=chiWatResReqLim2, final chiWatResReqTimLim2=chiWatResReqTimLim2, final chiWatResReqLim3=chiWatResReqLim3, final chiWatResReqTimLim3=chiWatResReqTimLim3, final hotWatPlaReqLim0=hotWatPlaReqLim0, final hotWatResReqLim0=hotWatResReqLim0, final hotWatPlaReqLim1=hotWatPlaReqLim1, final hotWatResReqLim2=hotWatResReqLim2, final hotWatResReqTimLim2=hotWatResReqTimLim2, final hotWatResReqLim3=hotWatResReqLim3, final hotWatResReqTimLim3=hotWatResReqTimLim3, final THys=THys, final dFanSpe=dFanSpe) if cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased or heaCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Block for generating chilled water requests and hot water requests for their respective plants"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant unOccMod( final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.unoccupied) "Unoccupied mode"; Buildings.Controls.OBC.CDL.Integers.Equal isUnOcc "Check if current operation mode is unoccupied mode"; Buildings.Controls.OBC.CDL.Logical.Not isOcc "If in unoccupied mode, switch off"; Buildings.Controls.OBC.CDL.Integers.GreaterEqualThreshold havOcc( final t=1) if have_occSen "Check if there is occupant"; Buildings.Controls.OBC.ASHRAE.G36.FanCoilUnits.Subsequences.SupplyAirTemperature TSupAir( final have_cooCoi=cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased or cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.DXCoil, final have_heaCoi=heaCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased or heaCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.Electric, final TSupSet_max=TSupSet_max, final uHea_max=uHeaFan_min, final TSupSet_min=TSupSet_min, final uCoo_max=uCooFan_min, final heaDea=heaDea, final cooDea=cooDea, final cooCoiConTyp=cooCoiConTyp, final kCooCoi=kCooCoi, final TiCooCoi=TiCooCoi, final TdCooCoi=TdCooCoi, final heaCoiConTyp=heaCoiConTyp, final kHeaCoi=kHeaCoi, final TiHeaCoi=TiHeaCoi, final TdHeaCoi=TdHeaCoi, final deaHysLim=deaHysLim) "Supply air temperature setpoint controller"; Buildings.Controls.OBC.ASHRAE.G36.FanCoilUnits.Subsequences.FanSpeed fanSpe( final have_cooCoi=cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased or cooCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.DXCoil, final have_heaCoi=heaCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased or heaCoi == Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.Electric, final deaSpe=deaSpe, final heaSpe_min=heaSpe_min, final uHea_min=uHeaFan_min, final heaSpe_max=heaSpe_max, final uHea_max=uHeaFan_max, final cooSpe_min=cooSpe_min, final uCoo_min=uCooFan_min, final cooSpe_max=cooSpe_max, final uCoo_max=uCooFan_max, final heaDea=heaDea, final cooDea=cooDea, final deaHysLim=deaHysLim) "Fan speed controller"; protected Buildings.Controls.OBC.CDL.Logical.Sources.Constant win( final k=false) if not have_winSen "Window status"; equation connect(unOccMod.y, isUnOcc.u2); connect(isUnOcc.y, isOcc.u); connect(TZon, cooPI.u_m); connect(isOcc.y, heaPI.trigger); connect(isOcc.y, cooPI.trigger); connect(TZon, heaPI.u_m); connect(modSetPoi.THeaSet, heaPI.u_s); connect(modSetPoi.THeaSet, TZonHeaSet); connect(modSetPoi.TCooSet, cooPI.u_s); connect(modSetPoi.TCooSet, TZonCooSet); connect(TZon, modSetPoi.TZon); connect(tNexOcc, modSetPoi.tNexOcc); connect(u1Occ, modSetPoi.u1Occ); connect(modSetPoi.yOpeMod, isUnOcc.u1); connect(win.y, modSetPoi.u1Win); connect(u1Win, modSetPoi.u1Win); connect(havOcc.y, modSetPoi.u1OccSen); connect(modSetPoi.warUpTim, warUpTim); connect(modSetPoi.cooDowTim, cooDowTim); connect(modSetPoi.uCooDemLimLev, uCooDemLimLev); connect(modSetPoi.uHeaDemLimLev, uHeaDemLimLev); connect(TSupAir.yCooCoi, yCooCoi); connect(TSupAir.yHeaCoi, yHeaCoi); connect(TSupAir.TSupSet, TSupSet); connect(fanSpe.yFan, yFan); connect(fanSpe.y1Fan, y1Fan); connect(modSetPoi.yOpeMod, fanSpe.opeMod); connect(TSup, TSupAir.TAirSup); connect(u1Fan, fanSpe.u1FanPro); connect(heaPI.y, fanSpe.uHea); connect(cooPI.y, fanSpe.uCoo); connect(modSetPoi.TCooSet,TSupAir.TZonCooSet); connect(modSetPoi.THeaSet,TSupAir.TZonHeaSet); connect(cooPI.y, TSupAir.uCoo); connect(heaPI.y, TSupAir.uHea); connect(u1Fan, TSupAir.u1Fan); connect(nOcc, havOcc.u); connect(cooSetAdj, modSetPoi.cooSetAdj); connect(heaSetAdj, modSetPoi.heaSetAdj); connect(TSup, fcuPlaReq.TAirSup); connect(fcuPlaReq.yChiWatResReq, yChiWatResReq); connect(fcuPlaReq.yChiPlaReq, yChiPlaReq); connect(fcuPlaReq.yHotWatResReq, yHotWatResReq); connect(fcuPlaReq.yHotWatPlaReq, yHotWatPlaReq); connect(TSupAir.TSupSet, fcuPlaReq.TAirSupSet); connect(fanSpe.yFan, fcuPlaReq.uFan); connect(TOccHeaSet, modSetPoi.TOccHeaSet); connect(TOccCooSet, modSetPoi.TOccCooSet); connect(TUnoHeaSet, modSetPoi.TUnoHeaSet); connect(TUnoCooSet, modSetPoi.TUnoCooSet); connect(TSupAir.yHeaCoi, fcuPlaReq.uHeaCoiSet); connect(TSupAir.yCooCoi, fcuPlaReq.uCooCoiSet); connect(setAdj, modSetPoi.setAdj); end Controller;