Buildings.Controls.OBC.ASHRAE.G36.ThermalZones

Package of sequences for calculating temperature setpoint

Information

This package contains sequences that would be needed for calculating temperature setpoint according to ASHRAE G36 section 5.3.

Package Content

Name Description
Buildings.Controls.OBC.ASHRAE.G36.ThermalZones.Alarms Alarms Zone level alarms
Buildings.Controls.OBC.ASHRAE.G36.ThermalZones.ControlLoops ControlLoops Heating and cooling control loops
Buildings.Controls.OBC.ASHRAE.G36.ThermalZones.Setpoints Setpoints Block outputs thermal zone cooling and heating active setpoint
Buildings.Controls.OBC.ASHRAE.G36.ThermalZones.ZoneStates ZoneStates Select the zone state
Buildings.Controls.OBC.ASHRAE.G36.ThermalZones.Validation Validation Collection of validation models

Buildings.Controls.OBC.ASHRAE.G36.ThermalZones.Alarms Buildings.Controls.OBC.ASHRAE.G36.ThermalZones.Alarms

Zone level alarms

Buildings.Controls.OBC.ASHRAE.G36.ThermalZones.Alarms

Information

This block outputs zone alarms. The implementation is according to the ASHRAE Guideline 36, Section 5.3.6.

Zone temperature alarm

  1. High-temperature alarm
    • If the zone temperature TZon is 2 °C (3 °F) above the cooling setpoint TCooSet for 10 minutes (timChe), generate Level 3 alarm.
    • If the zone temperature TZon is 3 °C (5 °F) above the cooling setpoint TCooSet for 10 minutes (timChe), generate Level 2 alarm.
  2. Low-temperature alarm
    • If the zone temperature TZon is 2 °C (3 °F) below the heating setpoint THeaSet for 10 minutes (timChe), generate Level 3 alarm.
    • If the zone temperature TZon is 3 °C (5 °F) below the heating setpoint THeaSet for 10 minutes (timChe), generate Level 2 alarm.
  3. Suppress zone temperature alarms as follows:
    • After zone setpoint is changed per Section 5.1.20 of Guideline 36, uResSet=true.
    • While zone group is in warm-up or cooldown modes.

For zones with CO2 sensors:

Parameters

TypeNameDefaultDescription
RealtimChe600Threshold time to check temperature difference [s]
CO2 concentration alarm
Booleanhave_CO2SenfalseTrue: the zone has CO2 sensor
RealmodChe7200Threshold time to check unoccupied time [s]
RealCO2Set894CO2 setpoint in ppm
Advanced
RealdTHys0.25Delta between the temperature hysteresis high and low limit [K]
RealppmHys25Hysteresis to check CO2 concentration [1]

Connectors

TypeNameDescription
input RealInputTZonMeasured zone temperature [K]
input RealInputTCooSetZone cooling setpoint [K]
input RealInputTHeaSetZone heating setpoint [K]
input BooleanInputu1ResSetTrue: zone setpoint temperature is being resetted
input IntegerInputuOpeModAHU operation mode status signal
input RealInputppmCO2Measured CO2 concentration [1]
output IntegerOutputyTemAlaZone temperature alarm
output IntegerOutputyCO2AlaCO2 concentration alarm

Modelica definition

block Alarms "Zone level alarms" parameter Real timChe( final unit="s", final quantity="Time")=600 "Threshold time to check temperature difference"; parameter Boolean have_CO2Sen=false "True: the zone has CO2 sensor"; parameter Real modChe( final unit="s", final quantity="Time")=7200 "Threshold time to check unoccupied time"; parameter Real CO2Set=894 "CO2 setpoint in ppm"; parameter Real dTHys( final unit="K", final quantity="TemperatureDifference")=0.25 "Delta between the temperature hysteresis high and low limit"; parameter Real ppmHys( final unit="1")=25 "Hysteresis to check CO2 concentration"; 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 TCooSet( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") "Zone cooling setpoint"; Buildings.Controls.OBC.CDL.Interfaces.RealInput THeaSet( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") "Zone heating setpoint"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1ResSet "True: zone setpoint temperature is being resetted"; Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uOpeMod "AHU operation mode status signal"; Buildings.Controls.OBC.CDL.Interfaces.RealInput ppmCO2( final unit="1") if have_CO2Sen "Measured CO2 concentration"; Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yTemAla "Zone temperature alarm"; Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yCO2Ala if have_CO2Sen "CO2 concentration alarm"; Buildings.Controls.OBC.CDL.Continuous.Subtract lowTem "Zone temperature below the heating setpoint"; Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold twoDegLow( final t=2, final h=dTHys) "Check if the zone temperature is 2 degC lower than the heating setpoint"; Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold thrDegLow( final t=3, final h=dTHys) "Check if the zone temperature is 3 degC lower than the heating setpoint"; Buildings.Controls.OBC.CDL.Continuous.Subtract higTem "Zone temperature above the cooling setpoint"; Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold twoDegHig( final t=2, final h=dTHys) "Check if the zone temperature is 2 degC higher than the cooling setpoint"; Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold thrDegHig( final t=3, final h=dTHys) "Check if the zone temperature is 3 degC higher than the cooling setpoint"; Buildings.Controls.OBC.CDL.Utilities.Assert higTemAla3( final message="Warning: zone temperature is 2 degC higher than the cooling setpoint") "Level 3 high temperature alarm"; Buildings.Controls.OBC.CDL.Logical.Not not1 "Logical not"; Buildings.Controls.OBC.CDL.Logical.Not notSupTemAla "Do not suppress temperature alarms"; Buildings.Controls.OBC.CDL.Logical.And and2 "Check if alarms should be generated"; Buildings.Controls.OBC.CDL.Logical.And and1 "Check if alarms should be generated"; Buildings.Controls.OBC.CDL.Logical.And and3 "Check if alarms should be generated"; Buildings.Controls.OBC.CDL.Logical.And and4 "Check if alarms should be generated"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt( final integerTrue=3) "Level 3 high temperature alarm"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt2( final integerTrue=3) "Level 3 low temperature alarm"; Buildings.Controls.OBC.CDL.Integers.Equal levThrHig "Check if generating level 3 high temperature alarm"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant levTwo( final k=2) "Level 2 alarm"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant levThr( final k=3) "Level 3 alarm"; Buildings.Controls.OBC.CDL.Utilities.Assert higTemAla2( final message="Warning: zone temperature is 3 degC higher than the cooling setpoint") "Level 2 high temperature alarm"; Buildings.Controls.OBC.CDL.Logical.Not not2 "Logical not"; Buildings.Controls.OBC.CDL.Integers.Equal levTwoHig "Check if generating level 2 high temperature alarm"; Buildings.Controls.OBC.CDL.Utilities.Assert lowTemAla3( final message="Warning: zone temperature is 2 degC lower than the heating setpoint") "Level 3 low temperature alarm"; Buildings.Controls.OBC.CDL.Logical.Not not3 "Logical not"; Buildings.Controls.OBC.CDL.Integers.Equal levThrLow "Check if generating level 3 low temperature alarm"; Buildings.Controls.OBC.CDL.Utilities.Assert lowTemAla2( final message="Warning: zone temperature is 3 degC lower than the heating setpoint") "Level 2 low temperature alarm"; Buildings.Controls.OBC.CDL.Logical.Not not4 "Logical not"; Buildings.Controls.OBC.CDL.Integers.Equal levTwoLow "Check if generating level 2 low temperature alarm"; Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr( final t=300, final h=ppmHys) if have_CO2Sen "Check if the CO2 concentration is less than threshold"; Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr( final t=600, final h=ppmHys) if have_CO2Sen "Check if the CO2 concentration is greater than threshold"; Buildings.Controls.OBC.CDL.Logical.And and5 if have_CO2Sen "Check if it has been in unoccupied mode for long time and CO2 concentration exceeds threshold"; Buildings.Controls.OBC.CDL.Utilities.Assert lowTemAla4( final message="Warning: the zone CO2 concentration exceeds 600 ppm in unoccupied mode. The CO2 sensor may be out of calibration.") if have_CO2Sen "Level 3 CO2 alarm"; Buildings.Controls.OBC.CDL.Logical.Not not5 if have_CO2Sen "Logical not"; Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr1( final t=1.1*CO2Set, final h=ppmHys) if have_CO2Sen "Check if the CO2 concentration exceeds setpoint plus 10%"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt4( final integerTrue=3) if have_CO2Sen "Level 3 CO2 concentration alarm"; Buildings.Controls.OBC.CDL.Logical.Not not6 if have_CO2Sen "Logical not"; Buildings.Controls.OBC.CDL.Logical.And and6 if have_CO2Sen "Check if it has been in unoccupied mode for long time and CO2 concentration exceeds threshold"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt5( final integerTrue=2) if have_CO2Sen "Level 2 CO2 concentration alarm"; Buildings.Controls.OBC.CDL.Utilities.Assert lowTemAla5( final message="Warning: the zone CO2 concentration exceeds setpoint plus 10%.") if have_CO2Sen "Level 2 CO2 alarm"; Buildings.Controls.OBC.CDL.Integers.Add temAla "Zone temperature alarm"; Buildings.Controls.OBC.CDL.Integers.Add co2Ala if have_CO2Sen "CO2 concentration alarm"; Buildings.Controls.OBC.CDL.Logical.TrueDelay tenMinDur( final delayTime=timChe) "Check if it has been over threshold time"; Buildings.Controls.OBC.CDL.Logical.TrueDelay tenMinDur1( final delayTime=timChe) "Check if it has been over threshold time"; Buildings.Controls.OBC.CDL.Logical.TrueDelay tenMinDur2( final delayTime=timChe) "Check if it has been over threshold time"; Buildings.Controls.OBC.CDL.Logical.TrueDelay tenMinDur3( final delayTime=timChe) "Check if it has been over threshold time"; 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 warUpMod( final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.warmUp) "Warm-up mode"; Buildings.Controls.OBC.CDL.Integers.Equal intEqu3 "Check if current operation mode is setback mode"; Buildings.Controls.OBC.CDL.Integers.Equal intEqu4 "Check if current operation mode is warmup mode"; Buildings.Controls.OBC.CDL.Logical.Or or2 "Cooldown or warm-up mode"; Buildings.Controls.OBC.CDL.Logical.Or or1 "Check if the zone temperature alarms should be suppressed"; Buildings.Controls.OBC.CDL.Integers.Equal intEqu1 if have_CO2Sen "Check if current operation mode is warmup mode"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant unoMod( final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.unoccupied) if have_CO2Sen "Unoccupied mode"; Buildings.Controls.OBC.CDL.Logical.TrueDelay twoHou( final delayTime=modChe) if have_CO2Sen "Check if it has been in unoccupied mode by threshold time"; Buildings.Controls.OBC.CDL.Logical.Or or3 if have_CO2Sen "Check if should generate level 3 alarm"; Buildings.Controls.OBC.CDL.Logical.TrueDelay tenMinDur4( final delayTime=timChe) if have_CO2Sen "Check if it has been over threshold time"; Buildings.Controls.OBC.CDL.Integers.Switch higTemAla "High temperature alarms"; Buildings.Controls.OBC.CDL.Integers.Switch lowTemAla "Low temperature alarms"; equation connect(lowTem.y, twoDegLow.u); connect(lowTem.y, thrDegLow.u); connect(higTem.y, twoDegHig.u); connect(higTem.y, thrDegHig.u); connect(TZon, higTem.u1); connect(TCooSet, higTem.u2); connect(THeaSet, lowTem.u1); connect(cooDowMod.y, intEqu3.u1); connect(warUpMod.y, intEqu4.u1); connect(uOpeMod, intEqu3.u2); connect(uOpeMod, intEqu4.u2); connect(intEqu3.y, or2.u1); connect(intEqu4.y, or2.u2); connect(u1ResSet, or1.u1); connect(or2.y, or1.u2); connect(or1.y, notSupTemAla.u); connect(twoDegHig.y, and2.u1); connect(thrDegHig.y, and1.u1); connect(twoDegLow.y, and3.u1); connect(thrDegLow.y, and4.u1); connect(and2.y, tenMinDur2.u); connect(and1.y, tenMinDur3.u); connect(and3.y, tenMinDur.u); connect(and4.y, tenMinDur1.u); connect(not1.y, higTemAla3.u); connect(tenMinDur2.y, booToInt.u); connect(tenMinDur.y, booToInt2.u); connect(notSupTemAla.y, and2.u2); connect(notSupTemAla.y, and1.u2); connect(notSupTemAla.y, and3.u2); connect(notSupTemAla.y, and4.u2); connect(not2.y, higTemAla2.u); connect(not3.y, lowTemAla3.u); connect(not4.y, lowTemAla2.u); connect(levThrHig.y, not1.u); connect(levTwoHig.y, not2.u); connect(levThrLow.y, not3.u); connect(levTwoLow.y, not4.u); connect(levThr.y, levThrHig.u2); connect(levThr.y, levThrLow.u2); connect(levTwo.y, levTwoHig.u2); connect(levTwo.y, levTwoLow.u2); connect(unoMod.y, intEqu1.u1); connect(uOpeMod, intEqu1.u2); connect(ppmCO2, greThr.u); connect(intEqu1.y, twoHou.u); connect(twoHou.y, and5.u1); connect(greThr.y, and5.u2); connect(ppmCO2, lesThr.u); connect(and5.y, or3.u1); connect(lesThr.y, or3.u2); connect(not5.y, lowTemAla4.u); connect(greThr1.y, tenMinDur4.u); connect(ppmCO2, greThr1.u); connect(or3.y, and6.u1); connect(tenMinDur4.y, not6.u); connect(not6.y, and6.u2); connect(and6.y, not5.u); connect(and6.y, booToInt4.u); connect(tenMinDur4.y, booToInt5.u); connect(not6.y, lowTemAla5.u); connect(booToInt4.y, co2Ala.u1); connect(booToInt5.y, co2Ala.u2); connect(temAla.y, yTemAla); connect(co2Ala.y, yCO2Ala); connect(TZon, lowTem.u2); connect(tenMinDur3.y, higTemAla.u2); connect(tenMinDur1.y, lowTemAla.u2); connect(levTwo.y, higTemAla.u1); connect(levTwo.y, lowTemAla.u1); connect(booToInt.y, higTemAla.u3); connect(booToInt2.y, lowTemAla.u3); connect(higTemAla.y, levTwoHig.u1); connect(higTemAla.y, levThrHig.u1); connect(higTemAla.y, temAla.u1); connect(lowTemAla.y, levTwoLow.u1); connect(lowTemAla.y, levThrLow.u1); connect(lowTemAla.y, temAla.u2); end Alarms;

Buildings.Controls.OBC.ASHRAE.G36.ThermalZones.ControlLoops Buildings.Controls.OBC.ASHRAE.G36.ThermalZones.ControlLoops

Heating and cooling control loops

Buildings.Controls.OBC.ASHRAE.G36.ThermalZones.ControlLoops

Information

This block outputs the heating and cooling control loop signal. The implementation is according to the ASHRAE Guideline 36, Section 5.3.4.

  1. Two separate control loops, the cooling loop and the heating loop, shall operate to maintain space temperature at set point.
    • The heating loop shall be enabled whenever the space temperature TZon is below the current zone heating setpoint temperature THeaSet and disabled when space temperature is above the current zone heating setpoint temperature and the loop output is zero for 30 seconds. The loop may remain active at all times if provisions are made to minimize integral windup.
    • The cooling loop shall be enabled whenever the space temperature TZon is above the current zone cooling setpoint temperature TCooSet and disabled when space temperature is below the current zone cooling setpoint temperature and the loop output is zero for 30 seconds. The loop may remain active at all times if provisions are made to minimize integral windup.
  2. The cooling loop shall maintain the space temperature at the cooling setpoint. The output of the loop shall be a software point ranging from 0% (no cooling) to 100% (full cooling).
  3. The heating loop shall maintain the space temperature at the heating setpoint. The output of the loop shall be a software point ranging from 0% (no heating) to 100% (full heating).
  4. Loops shall use proportional plus integral logic or other technology with similar performance. Proportional-only control is not acceptable, although the integral gain shall be small relative to the proportional gain. P and I gains shall be adjustable by the operator.

Parameters

TypeNameDefaultDescription
Cooling control
RealkCooCon0.1Gain of controller for cooling control loop
RealTiCooCon900Time constant of integrator block for cooling control loop [s]
Heating control
RealkHeaCon0.1Gain of controller for heating control loop
RealTiHeaCon900Time constant of integrator block for heating control loop [s]
Advanced
RealtimChe30Threshold time to check the zone temperature status [s]
RealdTHys0.25Delta between the temperature hysteresis high and low limit [K]
ReallooHys0.01Threshold value to check if the controller output is near zero [1]

Connectors

TypeNameDescription
input RealInputTCooSetZone cooling setpoint [K]
input RealInputTZonMeasured zone temperature [K]
input RealInputTHeaSetZone heating setpoint [K]
output RealOutputyCooCooling control signal [1]
output RealOutputyHeaHeating control signal [1]

Modelica definition

block ControlLoops "Heating and cooling control loops" parameter Real kCooCon=0.1 "Gain of controller for cooling control loop"; parameter Real TiCooCon(unit="s")=900 "Time constant of integrator block for cooling control loop"; parameter Real kHeaCon=0.1 "Gain of controller for heating control loop"; parameter Real TiHeaCon(unit="s")=900 "Time constant of integrator block for heating control loop"; parameter Real timChe(unit="s")=30 "Threshold time to check the zone temperature status"; parameter Real dTHys(unit="K")=0.25 "Delta between the temperature hysteresis high and low limit"; parameter Real looHys(unit="1")=0.01 "Threshold value to check if the controller output is near zero"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TCooSet( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") "Zone cooling setpoint"; 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 THeaSet( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") "Zone heating setpoint"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yCoo( final min=0, final max=1, final unit="1") "Cooling control signal"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yHea( final min=0, final max=1, final unit="1") "Heating control signal"; protected Buildings.Controls.OBC.CDL.Continuous.PIDWithReset cooCon( final controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, final k=kCooCon, final Ti=TiCooCon, final reverseActing=false) "Cooling controller"; Buildings.Controls.OBC.CDL.Continuous.Less enaHeaLoo( final h=dTHys) "Check if heating control loop should be enabled"; Buildings.Controls.OBC.CDL.Continuous.Less enaCooLoo( final h=dTHys) "Check if cooling control loop should be enabled"; Buildings.Controls.OBC.CDL.Logical.TrueDelay disCoo( final delayTime=timChe) "Check if the controller output has been near zero for a threshold time"; Buildings.Controls.OBC.CDL.Logical.Not colZon "Check if the zone temperature is lower than the cooling setpoint"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal zerCoo( final realTrue=0, final realFalse=1) "Output zero control signal when the cooling loop should be disabled"; Buildings.Controls.OBC.CDL.Continuous.Multiply cooConSig "Cooling control loop signal"; Buildings.Controls.OBC.CDL.Continuous.PIDWithReset heaCon( final controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, final k=kHeaCon, final Ti=TiHeaCon) "Heating controller"; Buildings.Controls.OBC.CDL.Logical.Not holZon "Check if the zone temperature is higher than the heating setpoint"; Buildings.Controls.OBC.CDL.Logical.TrueDelay disHea( final delayTime=timChe) "Check if the controller output has been near zero for a threshold time"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal zerHea( final realTrue=0, final realFalse=1) "Output zero control signal when the heating loop should be disabled"; Buildings.Controls.OBC.CDL.Continuous.Multiply heaConSig "Heating control loop signal"; Buildings.Controls.OBC.CDL.Continuous.LessThreshold zerCon( final t=looHys, final h=0.8*looHys) "Check if the controller output is near zero"; Buildings.Controls.OBC.CDL.Continuous.LessThreshold zerCon1( final t=looHys, final h=0.8*looHys) "Check if the controller output is near zero"; Buildings.Controls.OBC.CDL.Logical.And disCooCon "Check if disable cooling control loop"; Buildings.Controls.OBC.CDL.Logical.And disHeaCon "Check if disable heating control loop"; equation connect(TZon, enaHeaLoo.u1); connect(THeaSet, enaHeaLoo.u2); connect(TZon, enaCooLoo.u2); connect(TCooSet, enaCooLoo.u1); connect(TCooSet, cooCon.u_s); connect(TZon, cooCon.u_m); connect(enaCooLoo.y, cooCon.trigger); connect(enaCooLoo.y, colZon.u); connect(cooCon.y, cooConSig.u1); connect(THeaSet, heaCon.u_s); connect(TZon, heaCon.u_m); connect(enaHeaLoo.y, holZon.u); connect(enaHeaLoo.y, heaCon.trigger); connect(heaCon.y, heaConSig.u1); connect(zerCon.y, disCoo.u); connect(cooCon.y, zerCon.u); connect(heaCon.y, zerCon1.u); connect(zerCon1.y, disHea.u); connect(disCoo.y, disCooCon.u1); connect(disCooCon.y, zerCoo.u); connect(colZon.y, disCooCon.u2); connect(zerCoo.y, cooConSig.u2); connect(disHea.y, disHeaCon.u1); connect(holZon.y, disHeaCon.u2); connect(disHeaCon.y, zerHea.u); connect(zerHea.y, heaConSig.u2); connect(cooConSig.y, yCoo); connect(heaConSig.y, yHea); end ControlLoops;

Buildings.Controls.OBC.ASHRAE.G36.ThermalZones.Setpoints Buildings.Controls.OBC.ASHRAE.G36.ThermalZones.Setpoints

Block outputs thermal zone cooling and heating active setpoint

Buildings.Controls.OBC.ASHRAE.G36.ThermalZones.Setpoints

Information

This sequence sets the thermal zone cooling and heating active setpoints. The implementation is according to the ASHRAE Guideline 36, Section 5.3.2. The calculation is done following the steps below.

  1. According to Guideline 36, Section 3.1.1.1, zone setpoints shall be based on zone type.
    Zone Type Occupied Unoccupied
    HeatingCooling HeatingCooling
    VAV 21 °C (70 °F) 24 °C (75 °F) 16 °C (60 °F) 32 °C (90 °F)
    Mechanical/electrical rooms 18 °C (65 °F) 29 °C (85 °F) 18 °C (65 °F) 29 °C (85 °F)
    Networking/computer 18 °C (65 °F) 24 °C (75 °F) 18 °C (65 °F) 24 °C (75 °F)

  2. Each zone shall have separate occupied and unoccupied heating and cooling setpoints.
  3. The active setpoints shall be determined by the operating mode of the zone group.
    • The setpoints shall be the occupied setpoints during occupied, warm-up, and cooldown modes.
    • The setpoints shall be the unoccupied setpoints during unoccupied, setback, and setup modes.
  4. The software shall prevent,
    • The heating setpoint from exceeding the cooling setpoint minus 0.5 °C (1 °F), i.e. the minimum difference between heating and cooling setpoint shall be 0.5 °C (1 °F).
    • The unoccupied heating setpoint from exceeding the occupied heating setpoint.
    • The unoccupied cooling setpoint from being less than occupied cooling setpoint.
  5. Where the zone has a local setpoint adjustment knob/button,
    • The setpoint adjustment offsets established by the occupant shall be software points that are persistent (e.g. not reset daily), but the actual offset used in control logic shall be adjusted based on limits and modes as described below.
    • The adjustment shall be capable of being limited in software.
      1. As a default, the active occupied cooling setpoint shall be limited between 22 °C (72 °F) and 27 °C (80 °F);
      2. As a default, the active occupied heating setpoint shall be limited between 18 °C (65 °F) and 22 °C (72 °F);
    • The active heating and cooling setpoint shall be independently adjustable, respecting the limits and anti-overlap logic described above. If zone thermostat provides only a single setpoint adjustment, then the adjustment shall move both the same amount, within the limits described above.
    • The adjustment shall only affect occupied setpoints in occupied mode, warm-up mode and cool-down mode and shall have no impact on setpoints in all other modes.
    • At the onset of demand limiting, the local setpoint adjustment value shall be frozen. Further adjustment of the setpoint by local controls shall be suspended for the duration of the demand limit event.
  6. Cooling demand limit setpoint adjustment. The active cooling setpoints for all zones shall be increased when a demand limit is imposed on the associated zone group. The operator shall have the ability to exempt individual zones from this adjustment through the normal Building Automation System (BAS) user interface. Changes due to demand limits are not cumulative.
    • At Demand Limit Level 1, increase setpoint by 0.5 °C (1 °F).
    • At Demand Limit Level 2, increase setpoint by 1 °C (2 °F).
    • At Demand Limit Level 3, increase setpoint by 2 °C (4 °F).
  7. Heating demand limit setpoint adjustment. The active heating setpoints for all zones shall be decreased when a demand limit is imposed on the associated zone group. The operator shall have the ability to exempt individual zones from this adjustment through the normal BAS user interface. Changes due to demand limits are not cumulative.
    • At Demand Limit Level 1, decrease setpoint by 0.5 °C (1 °F).
    • At Demand Limit Level 2, decrease setpoint by 1 °C (2 °F).
    • At Demand Limit Level 3, decrease setpoint by 2 °C (4 °F).
  8. Window switches. For zones that have operable windows with indicator switches, when the window switch indicates the window is open, the heating setpoint shall be temporarily set to 4 °C (40 °F) and the cooling setpoint shall be temporarily set to 49 °C (120 °F). When the window switch indicates the window is open during other than Occupied Mode, a Level 4 alarm shall be generated.
  9. Occupancy sensor
    • When the switch indicates the space has been unpopulated for 5 minutes continuously during the Occupied Mode, the active heating setpoint shall be decreased by 0.5 °C (1 °F) and the cooling setpoint shall be increased by 0.5 °C (1 °F).
    • When the switch indicated that the space has been populated for 1 minute continuously, the active heating and cooling setpoints shall be restored to their previously values.
  10. Hierarchy of setpoint adjustments: the following adjustment restrictions shall prevail in order from highest to lowest priority.
    1. Setpoint overlap restriction
    2. Absolute limits on local setpoint adjustment
    3. Window swtiches
    4. Demand limit (a. Occupancy sensors; b. Local setpoint adjustment)
    5. Scheduled setpoints based on zone group mode

Parameters

TypeNameDefaultDescription
Sensors
Booleanhave_occSen Check if the zone has occupancy sensor
Booleanhave_winSen Check if the zone has window status sensor
Setpoint adjustable setting
Booleanhave_locAdjtrueTrue: the zone has local setpoint adjustment knob
BooleansepAdjtrueTrue: cooling and heating setpoint can be adjusted separately
BooleanignDemLimtrueTrue: exempt the individual zone from demand limit setpoint adjustment
Setpoints limits setting
RealTActCoo_max300.15Maximum active cooling setpoint [K]
RealTActCoo_min295.15Minimum active cooling setpoint [K]
RealTActHea_max295.15Maximum active heating setpoint [K]
RealTActHea_min291.15Minimum active heating setpoint [K]
RealTWinOpeCooSet322.15Cooling setpoint when window is open [K]
RealTWinOpeHeaSet277.15Heating setpoint when window is open [K]
Demand control
Setpoint adjustment
RealincTSetDem_10.5Cooling setpoint increase value (degC) when cooling demand limit level 1 is imposed [K]
RealincTSetDem_21Cooling setpoint increase value (degC) when cooling demand limit level 2 is imposed [K]
RealincTSetDem_32Cooling setpoint increase value (degC) when cooling demand limit level 3 is imposed [K]
RealdecTSetDem_10.5Heating setpoint decrease value (degC) when heating demand limit level 1 is imposed [K]
RealdecTSetDem_21Heating setpoint decrease value (degC) when heating demand limit level 2 is imposed [K]
RealdecTSetDem_32Heating setpoint decrease value (degC) when heating demand limit level 3 is imposed [K]

Connectors

TypeNameDescription
input IntegerInputuOpeModAHU operation mode status signal
input RealInputTOccCooSetOccupied zone cooling setpoint [K]
input RealInputTUnoCooSetUnoccupied zone cooling setpoint [K]
input RealInputTOccHeaSetOccupied zone heating setpoint [K]
input RealInputTUnoHeaSetUnoccupied zone heating setpoint [K]
input RealInputsetAdjThe adjustment value for both heating and cooling setpoints if it allows only single setpoint adjustment [K]
input RealInputcooSetAdjCooling setpoint adjustment value [K]
input RealInputheaSetAdjHeating setpoint adjustment value [K]
input IntegerInputuCooDemLimLevCooling demand limit level
input IntegerInputuHeaDemLimLevHeating demand limit level
input BooleanInputu1OccOccupancy sensor (occupied=true, unoccupied=false)
input BooleanInputu1WinWindow status (open=true, close=false)
output RealOutputTCooSetCooling setpoint temperature [K]
output RealOutputTHeaSetHeating setpoint temperature [K]
output IntegerOutputyAlaAlarm level

Modelica definition

block Setpoints "Block outputs thermal zone cooling and heating active setpoint" parameter Boolean have_occSen "Check if the zone has occupancy sensor"; parameter Boolean have_winSen "Check if the zone has window status sensor"; parameter Boolean have_locAdj=true "True: the zone has local setpoint adjustment knob"; parameter Boolean sepAdj=true "True: cooling and heating setpoint can be adjusted separately"; parameter Boolean ignDemLim = true "True: exempt the individual zone from demand limit setpoint adjustment"; parameter Real TActCoo_max( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature")=300.15 "Maximum active cooling setpoint"; parameter Real TActCoo_min( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature")=295.15 "Minimum active cooling setpoint"; parameter Real TActHea_max( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature")=295.15 "Maximum active heating setpoint"; parameter Real TActHea_min( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature")=291.15 "Minimum active heating setpoint"; parameter Real TWinOpeCooSet( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature")=322.15 "Cooling setpoint when window is open"; parameter Real TWinOpeHeaSet( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature")=277.15 "Heating setpoint when window is open"; parameter Real incTSetDem_1(unit="K")=0.5 "Cooling setpoint increase value (degC) when cooling demand limit level 1 is imposed"; parameter Real incTSetDem_2(unit="K")=1 "Cooling setpoint increase value (degC) when cooling demand limit level 2 is imposed"; parameter Real incTSetDem_3(unit="K")=2 "Cooling setpoint increase value (degC) when cooling demand limit level 3 is imposed"; parameter Real decTSetDem_1(unit="K")=0.5 "Heating setpoint decrease value (degC) when heating demand limit level 1 is imposed"; parameter Real decTSetDem_2(unit="K")=1 "Heating setpoint decrease value (degC) when heating demand limit level 2 is imposed"; parameter Real decTSetDem_3(unit="K")=2 "Heating setpoint decrease value (degC) when heating demand limit level 3 is imposed"; Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uOpeMod "AHU operation mode status signal"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TOccCooSet( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature") "Occupied zone cooling setpoint"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TUnoCooSet( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature") "Unoccupied zone cooling setpoint"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TOccHeaSet( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature") "Occupied zone heating setpoint"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TUnoHeaSet( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature") "Unoccupied zone heating setpoint"; Buildings.Controls.OBC.CDL.Interfaces.RealInput setAdj( final unit="K", final quantity="TemperatureDifference") if have_locAdj and not sepAdj "The adjustment value for both heating and cooling setpoints if it allows only single setpoint adjustment"; Buildings.Controls.OBC.CDL.Interfaces.RealInput cooSetAdj( final unit="K", final quantity="TemperatureDifference") if have_locAdj and sepAdj "Cooling setpoint adjustment value"; Buildings.Controls.OBC.CDL.Interfaces.RealInput heaSetAdj( final unit="K", final quantity="TemperatureDifference") if have_locAdj and sepAdj "Heating setpoint adjustment value"; 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.BooleanInput u1Occ if have_occSen "Occupancy sensor (occupied=true, unoccupied=false)"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1Win if have_winSen "Window status (open=true, close=false)"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput TCooSet( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature") "Cooling setpoint temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput THeaSet( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature") "Heating setpoint temperature"; Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yAla "Alarm level"; Buildings.Controls.OBC.CDL.Logical.Or or2 "Check if there is cooling/heating demand limit being imposed"; Buildings.Controls.OBC.CDL.Logical.Edge edg "If demand limit is imposed"; Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler cooSetFre "Freeze current cooling setpoint when demand limit is imposed"; Buildings.Controls.OBC.CDL.Logical.Not not3 "Logical not"; Buildings.Controls.OBC.CDL.Logical.Or or5 "Check if demand limit should be ignored or if there is no demand limit"; Buildings.Controls.OBC.CDL.Logical.Or3 or1 "Check if cooling demand limit level is imposed"; Buildings.Controls.OBC.CDL.Logical.Not not1 "Logic not"; Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar3( final p=incTSetDem_3) "Increase cooling setpoint when at demand limit level 3"; Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar1( final p=incTSetDem_2) "Increase cooling setpoint when at demand limit level 2"; Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar2( final p=incTSetDem_1) "Increase cooling setpoint when at demand limit level 1"; Buildings.Controls.OBC.CDL.Continuous.Multiply pro6 "Output product of the two inputs"; Buildings.Controls.OBC.CDL.Continuous.Multiply pro "Output product of the two inputs"; Buildings.Controls.OBC.CDL.Continuous.Multiply pro1 "Output product of the two inputs"; Buildings.Controls.OBC.CDL.Continuous.Multiply pro2 "Output product of the two inputs"; Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler heaSetFre "Freeze current heating setpoint when demand limit is imposed"; Buildings.Controls.OBC.CDL.Logical.Or3 or4 "Check if heating demand limit level is imposed"; Buildings.Controls.OBC.CDL.Logical.Not not2 "Logical not"; Buildings.Controls.OBC.CDL.Continuous.Multiply pro7 "Output product of the two inputs"; Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar6( final p=-decTSetDem_1) "Decrease heating setpoint when at demand limit level 1"; Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar5( final p=-decTSetDem_2) "Decrease heating setpoint when at demand limit level 2"; Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar4( final p=-decTSetDem_3) "Decrease heating setpoint when at demand limit level 3"; Buildings.Controls.OBC.CDL.Continuous.Multiply pro5 "Output product of the two inputs"; Buildings.Controls.OBC.CDL.Continuous.Multiply pro4 "Output product of the two inputs"; Buildings.Controls.OBC.CDL.Continuous.Multiply pro3 "Output product of the two inputs"; Buildings.Controls.OBC.CDL.Logical.Timer tim( final t=300) "Check whether the zone has been unpopulated for 5 minutes continuously during occupied mode"; Buildings.Controls.OBC.CDL.Logical.TrueHoldWithReset truHol( final duration=60) "When the zone is unpopulated by more than threshold time and then becomes populated, hold the change by short period"; Buildings.Controls.OBC.CDL.Logical.Edge edg1 "Instant when the zone becomes more than 5 minutes"; Buildings.Controls.OBC.CDL.Continuous.AddParameter heaSetDec( final p=-0.5) "Heating setpoint decrease due to continuously unpopulated under occupied mode"; Buildings.Controls.OBC.CDL.Continuous.AddParameter cooSetInc( final p=0.5) "Cooling setpoint increase due to continuously unpopulated under occupied mode"; Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler cooSetSam "Sample current cooling setpoint when zone becomes unpopulated by 5 minutes"; Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler heaSetSam "Sample current heating setpoint when zone becomes unpopulated by 5 minutes"; Buildings.Controls.OBC.CDL.Continuous.Add add1 "Adjusted heating setpoint"; Buildings.Controls.OBC.CDL.Continuous.Add add2 "Adjusted cooling setpoint"; Buildings.Controls.OBC.CDL.Continuous.Limiter cooSetLim( final uMax=TActCoo_max, final uMin=TActCoo_min) "Limit occupied zone cooling setpoint"; Buildings.Controls.OBC.CDL.Continuous.Limiter heaSetLim( final uMax=TActHea_max, final uMin=TActHea_min) "Limit occupied zone heating setpoint"; Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar( final p=-0.5) "Cooling setpoint minus the minimum difference between cooling and heating setpoints"; protected Buildings.Controls.OBC.CDL.Integers.Equal intEqu "Check if current operation mode is warm-up mode"; Buildings.Controls.OBC.CDL.Integers.Equal intEqu1 "Check if current operation mode is cool-down mode"; Buildings.Controls.OBC.CDL.Integers.Equal intEqu2 "Check if current operation mode is occupied mode"; Buildings.Controls.OBC.CDL.Logical.Or3 or3 "Current operation mode is occupied, warm-up, or cooldown mode"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt( final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.warmUp) "Warm-up mode"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt1( final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.coolDown) "Cooldown mode"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt2( final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.occupied) "Occupied mode"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant cooSetAdjCon( final k=have_locAdj) "Cooling setpoint adjustable"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con( final k=0) "Zero adjustment"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con3( final k=0) if not have_locAdj "Zero adjustment"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con4( final k=0) if not have_locAdj "Zero adjustment"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant heaSetAdjCon( final k=have_locAdj) "Heating setpoint adjustable"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con1( final k=0) "Zero adjustment"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant con2( final k=ignDemLim) "Check whether the zone should exempt from setpoint adjustment due to the demand limit"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant conTru( final k=true) if not have_occSen "Constant true"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant conFal( final k=false) if not have_winSen "Constant false"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant winSenCon( final k=have_winSen) "Check if there is window status sensor"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant have_occSenCon( final k=have_occSen) "Check if there is occupancy sensor"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant cooSetWinOpe( final k=TWinOpeCooSet) "Cooling setpoint when window is open"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant heaSetWinOpe( final k=TWinOpeHeaSet) "Heating setpoint when window is open"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant alaZer( final k=-0.2) "Alarm level 0"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant alaFou( final k=3.8) "Alarm level 4"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt "Convert real input to integer output"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea "Convert boolean to real value"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea1 "Convert boolean to real value"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea6 "Convert boolean to real value"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea2 "Convert boolean to real value"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea3 "Convert boolean to real value"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea4 "Convert boolean to real value"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea5 "Convert boolean to real value"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea7 "Convert boolean to real value"; Buildings.Controls.OBC.CDL.Logical.And and11 "Check if window is open during operation modes other than occupied"; Buildings.Controls.OBC.CDL.Logical.Not not5 "Other than occupied mode"; Buildings.Controls.OBC.CDL.Continuous.Less les "Check if occupied cooling setpoint is less than unoccupied one"; Buildings.Controls.OBC.CDL.Continuous.Greater gre "Check if occupied heating setpoint is greater than unoccupied one"; Buildings.Controls.OBC.CDL.Continuous.Greater gre2 "Check if the difference between cooling and heating setpoints is less than the minimum value"; Buildings.Controls.OBC.CDL.Continuous.Switch swi "Switch between occupied and unoccupied cooling setpoint"; Buildings.Controls.OBC.CDL.Continuous.Switch swi1 "Switch between occupied and unoccupied heating setpoint"; Buildings.Controls.OBC.CDL.Continuous.Switch swi2 "Adjustment shall only affect occupied set point"; Buildings.Controls.OBC.CDL.Continuous.Switch swi3 "Setpoint can only be adjusted in occupied mode"; Buildings.Controls.OBC.CDL.Continuous.Switch swi4 "If there is no cooling adjustment, zero adjust"; Buildings.Controls.OBC.CDL.Continuous.Switch swi6 "If there is no heating adjustment, zero adjust"; Buildings.Controls.OBC.CDL.Continuous.Switch swi7 "Ensure heating setpoint being not higher than cooling setpoint minus 0.5 degC"; Buildings.Controls.OBC.CDL.Continuous.Switch swi8 "Ensure unoccupied heating setppint being lower than occupied one"; Buildings.Controls.OBC.CDL.Continuous.Switch swi9 "Ensure unoccupied cooling setppint being higher than occupied one"; Buildings.Controls.OBC.CDL.Continuous.Switch swi10 "Switch between occupied and unoccupied cooling setpoint"; Buildings.Controls.OBC.CDL.Continuous.Switch swi11 "Switch between occupied and unoccupied cooling setpoint"; Buildings.Controls.OBC.CDL.Continuous.Switch swi12 "Increase cooling setpoint when the zone is continuously unpopulated"; Buildings.Controls.OBC.CDL.Continuous.Switch swi13 "Decrease heating setpoint when the zone is continuously unpopulated"; Buildings.Controls.OBC.CDL.Continuous.Switch swi14 "Switch to TWinOpeCooSet when window is open"; Buildings.Controls.OBC.CDL.Continuous.Switch swi15 "Switch to TWinOpeHeaSet when window is open"; Buildings.Controls.OBC.CDL.Continuous.Switch swi16 "Generate level 4 alarm when window is open during modes other than occupied"; Buildings.Controls.OBC.CDL.Continuous.Switch swi17 "If it is occupied mode, cooling setpoint should be limited"; Buildings.Controls.OBC.CDL.Continuous.Switch swi18 "If it is occupied mode, heating setpoint should be limited"; Buildings.Controls.OBC.CDL.Continuous.Switch swi19 "If there is occupancy sensor, update heating setpoint according to the occupancy"; Buildings.Controls.OBC.CDL.Continuous.Switch swi20 "If there is occupancy sensor, update cooling setpoint according to the occupancy"; Buildings.Controls.OBC.CDL.Continuous.Switch swi21 "If there is window status sensor, update heating setpoint according to the window status"; Buildings.Controls.OBC.CDL.Continuous.Switch swi22 "If there is window status sensor, update cooling setpoint according to the window status"; Buildings.Controls.OBC.CDL.Integers.Equal intEqu7 "Check if the heating demand limit level is level 2"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt8( final k=Buildings.Controls.OBC.ASHRAE.G36.Types.DemandLimitLevels.heating3) "Heat demand limit level 3"; Buildings.Controls.OBC.CDL.Integers.Equal intEqu8 "Check if the heating demand limit level is level 3"; Buildings.Controls.OBC.CDL.Logical.Not not4 "Logical not"; Buildings.Controls.OBC.CDL.Logical.And and10 "Check if the zone becomes unpopulated during occupied mode"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt6( final k=Buildings.Controls.OBC.ASHRAE.G36.Types.DemandLimitLevels.heating1) "Heat demand limit level 1"; Buildings.Controls.OBC.CDL.Integers.Equal intEqu6 "Check if the heating demand limit level is level 1"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt7( final k=Buildings.Controls.OBC.ASHRAE.G36.Types.DemandLimitLevels.heating2) "Heat demand limit level 2"; Buildings.Controls.OBC.CDL.Integers.GreaterThreshold intGreThr "Check if cooling demand limit level is higher than level zero"; Buildings.Controls.OBC.CDL.Integers.GreaterThreshold intGreThr1 "Check if heating demand limit level is higher than level zero"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt3( final k=Buildings.Controls.OBC.ASHRAE.G36.Types.DemandLimitLevels.cooling1) "Cool demand limit level 1"; Buildings.Controls.OBC.CDL.Integers.Equal intEqu3 "Check if the cooling demand limit level is level 1"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt4( final k=Buildings.Controls.OBC.ASHRAE.G36.Types.DemandLimitLevels.cooling2) "Cool demand limit level 2"; Buildings.Controls.OBC.CDL.Integers.Equal intEqu4 "Check if the cooling demand limit level is level 2"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt5( final k=Buildings.Controls.OBC.ASHRAE.G36.Types.DemandLimitLevels.cooling3) "Cool demand limit level 3"; Buildings.Controls.OBC.CDL.Integers.Equal intEqu5 "Check if the cooling demand limit level is level 3"; Buildings.Controls.OBC.CDL.Continuous.Add add3 "Add real inputs"; Buildings.Controls.OBC.CDL.Continuous.Add add4 "Add real inputs"; Buildings.Controls.OBC.CDL.Continuous.Add add5 "Add real inputs"; Buildings.Controls.OBC.CDL.Continuous.Add add6 "Add real inputs"; Buildings.Controls.OBC.CDL.Continuous.Add add7 "Add real inputs"; Buildings.Controls.OBC.CDL.Continuous.Add add8 "Add real inputs"; equation connect(uOpeMod, intEqu.u1); connect(uOpeMod, intEqu1.u1); connect(uOpeMod, intEqu2.u1); connect(conInt.y, intEqu.u2); connect(conInt1.y, intEqu1.u2); connect(conInt2.y, intEqu2.u2); connect(intEqu.y, or3.u1); connect(intEqu1.y, or3.u2); connect(intEqu2.y, or3.u3); connect(TOccCooSet, swi.u1); connect(TUnoCooSet, swi.u3); connect(TOccHeaSet, swi1.u1); connect(TUnoHeaSet, swi1.u3); connect(or3.y, swi.u2); connect(or3.y, swi1.u2); connect(cooSetAdjCon.y, swi4.u2); connect(setAdj, swi4.u1); connect(con3.y, swi4.u1); connect(con.y, swi4.u3); connect(swi4.y, add2.u2); connect(swi.y, add2.u1); connect(add2.y, swi2.u1); connect(swi.y, swi2.u3); connect(swi6.y, add1.u2); connect(add1.y, swi3.u1); connect(swi1.y, add1.u1); connect(swi1.y, swi3.u3); connect(intEqu2.y, swi3.u2); connect(uCooDemLimLev, intGreThr.u); connect(uHeaDemLimLev, intGreThr1.u); connect(intGreThr1.y, or2.u2); connect(intGreThr.y, or2.u1); connect(or2.y, edg.u); connect(intEqu3.y, booToRea.u); connect(intEqu4.y, booToRea1.u); connect(intEqu5.y, booToRea2.u); connect(uCooDemLimLev, intEqu3.u1); connect(uCooDemLimLev, intEqu4.u1); connect(uCooDemLimLev, intEqu5.u1); connect(conInt3.y, intEqu3.u2); connect(conInt4.y, intEqu4.u2); connect(conInt5.y, intEqu5.u2); connect(intEqu3.y, or1.u1); connect(intEqu4.y, or1.u2); connect(intEqu5.y, or1.u3); connect(or1.y, not1.u); connect(not1.y, booToRea6.u); connect(booToRea.y, pro.u2); connect(cooSetFre.y, addPar2.u); connect(cooSetFre.y, addPar1.u); connect(cooSetFre.y, addPar3.u); connect(booToRea1.y, pro1.u2); connect(booToRea2.y, pro2.u2); connect(addPar2.y, pro.u1); connect(cooSetFre.y, pro6.u2); connect(booToRea6.y, pro6.u1); connect(addPar1.y, pro1.u1); connect(addPar3.y, pro2.u1); connect(or2.y, not3.u); connect(con2.y, or5.u1); connect(not3.y, or5.u2); connect(uHeaDemLimLev, intEqu6.u1); connect(uHeaDemLimLev, intEqu7.u1); connect(uHeaDemLimLev, intEqu8.u1); connect(conInt6.y, intEqu6.u2); connect(conInt7.y, intEqu7.u2); connect(conInt8.y, intEqu8.u2); connect(intEqu6.y, booToRea3.u); connect(intEqu7.y, booToRea4.u); connect(intEqu8.y, booToRea5.u); connect(intEqu6.y, or4.u1); connect(intEqu7.y, or4.u2); connect(intEqu8.y, or4.u3); connect(or4.y, not2.u); connect(not2.y, booToRea7.u); connect(booToRea7.y, pro7.u1); connect(heaSetFre.y, pro7.u2); connect(heaSetFre.y, addPar6.u); connect(heaSetFre.y, addPar5.u); connect(heaSetFre.y, addPar4.u); connect(addPar6.y, pro3.u1); connect(addPar5.y, pro4.u1); connect(addPar4.y, pro5.u1); connect(booToRea3.y, pro3.u2); connect(booToRea4.y, pro4.u2); connect(booToRea5.y, pro5.u2); connect(edg.y, cooSetFre.trigger); connect(edg.y, heaSetFre.trigger); connect(or5.y, swi10.u2); connect(or5.y, swi11.u2); connect(swi2.y, cooSetFre.u); connect(swi2.y, swi10.u1); connect(swi3.y, heaSetFre.u); connect(swi3.y, swi11.u1); connect(u1Occ, not4.u); connect(conTru.y, not4.u); connect(and10.y, tim.u); connect(truHol.y, edg1.u); connect(edg1.y, cooSetSam.trigger); connect(edg1.y, heaSetSam.trigger); connect(cooSetSam.y, cooSetInc.u); connect(heaSetSam.y, heaSetDec.u); connect(cooSetInc.y, swi12.u1); connect(heaSetDec.y, swi13.u1); connect(truHol.y, swi12.u2); connect(truHol.y, swi13.u2); connect(swi11.y, swi13.u3); connect(swi10.y, swi12.u3); connect(intEqu2.y, and10.u1); connect(not4.y, and10.u2); connect(swi11.y, heaSetSam.u); connect(swi10.y, cooSetSam.u); connect(have_occSenCon.y, swi20.u2); connect(have_occSenCon.y, swi19.u2); connect(swi12.y, swi20.u1); connect(swi13.y, swi19.u1); connect(swi10.y, swi20.u3); connect(swi11.y, swi19.u3); connect(intEqu2.y, not5.u); connect(u1Win, and11.u2); connect(not5.y, and11.u1); connect(and11.y, swi16.u2); connect(alaFou.y, swi16.u1); connect(alaZer.y, swi16.u3); connect(swi16.y, reaToInt.u); connect(u1Win, swi14.u2); connect(u1Win, swi15.u2); connect(cooSetWinOpe.y, swi14.u1); connect(heaSetWinOpe.y, swi15.u1); connect(winSenCon.y, swi22.u2); connect(winSenCon.y, swi21.u2); connect(swi19.y, swi15.u3); connect(swi19.y, swi21.u3); connect(swi20.y, swi14.u3); connect(swi20.y, swi22.u3); connect(swi14.y, swi22.u1); connect(swi15.y, swi21.u1); connect(conFal.y, and11.u2); connect(conFal.y, swi14.u2); connect(conFal.y, swi15.u2); connect(swi22.y, cooSetLim.u); connect(swi21.y, heaSetLim.u); connect(cooSetLim.y, swi17.u1); connect(heaSetLim.y, swi18.u1); connect(swi22.y, swi17.u3); connect(swi21.y, swi18.u3); connect(intEqu2.y, swi17.u2); connect(intEqu2.y, swi18.u2); connect(swi17.y, les.u1); connect(les.y, swi9.u2); connect(swi18.y, gre.u1); connect(gre.y, swi8.u2); connect(swi17.y, swi9.u1); connect(swi18.y, swi8.u1); connect(TUnoCooSet, les.u2); connect(TUnoCooSet, swi9.u3); connect(TUnoHeaSet, gre.u2); connect(TUnoHeaSet, swi8.u3); connect(swi9.y, addPar.u); connect(gre2.y, swi7.u2); connect(swi8.y, gre2.u1); connect(addPar.y, gre2.u2); connect(swi8.y, swi7.u3); connect(addPar.y, swi7.u1); connect(swi7.y, THeaSet); connect(swi9.y, TCooSet); connect(reaToInt.y, yAla); connect(pro6.y, add3.u1); connect(pro.y, add3.u2); connect(pro1.y, add4.u1); connect(pro2.y, add4.u2); connect(add3.y, add5.u1); connect(add4.y, add5.u2); connect(add5.y, swi10.u3); connect(pro7.y, add6.u1); connect(pro3.y, add6.u2); connect(pro4.y, add7.u1); connect(pro5.y, add7.u2); connect(add6.y, add8.u1); connect(add7.y, add8.u2); connect(add8.y, swi11.u3); connect(or3.y, swi2.u2); connect(tim.passed, truHol.u); connect(cooSetAdj, swi4.u1); connect(heaSetAdjCon.y, swi6.u2); connect(heaSetAdj, swi6.u1); connect(con1.y, swi6.u3); connect(setAdj, swi6.u1); connect(con4.y, swi6.u1); end Setpoints;

Buildings.Controls.OBC.ASHRAE.G36.ThermalZones.ZoneStates Buildings.Controls.OBC.ASHRAE.G36.ThermalZones.ZoneStates

Select the zone state

Buildings.Controls.OBC.ASHRAE.G36.ThermalZones.ZoneStates

Information

Block that outputs the zone state. It first checks if the zone is in heating state; if not, it checks if the zone is in cooling state; otherwise it is in deadband state.

These states are defined in Buildings.Controls.OBC.ASHRAE.G36.Types.ZoneStates.

The logic of the block is as follows.

  1. The zone state is heating when both of the following two conditions are satisfied: (i) The heating control signal satisfies uHea > uHigh, where uHigh is a parameter, and (ii) the following condition is satisfied uHea - uCoo > uLow, where uCoo is the cooling control signal and uLow is a parameter. The second condition is used to avoid errors when uHea > 0 and uCoo > 0 at the same time.
  2. The zone state is cooling when the zone state is not heating and the cooling control signal satisfies uCoo > uHigh, where uHigh is a parameter. If uCoo < uLow, then the zone state is not cooling.
  3. The zone state is deadband when it is neither in heating state nor in cooling state.

Parameters

TypeNameDefaultDescription
RealuLow0.01Hysteresis parameter uLow for heating and cooling control signals to avoid chattering [1]
RealuHigh0.05Hysteresis parameter uHigh for heating and cooling control signals to avoid chattering [1]

Connectors

TypeNameDescription
input RealInputuHeaHeating control signal
input RealInputuCooCooling control signal
output IntegerOutputyZonStaZone state

Modelica definition

block ZoneStates "Select the zone state" parameter Real uLow( final unit = "1") = 0.01 "Hysteresis parameter uLow for heating and cooling control signals to avoid chattering"; parameter Real uHigh( final unit = "1") = 0.05 "Hysteresis parameter uHigh for heating and cooling control signals to avoid chattering"; Buildings.Controls.OBC.CDL.Interfaces.RealInput uHea "Heating control signal"; Buildings.Controls.OBC.CDL.Interfaces.RealInput uCoo "Cooling control signal"; Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yZonSta "Zone state"; protected Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToIntHea( final integerFalse=0, final integerTrue=Buildings.Controls.OBC.ASHRAE.G36.Types.ZoneStates.heating) "Convert Boolean to Integer number"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToIntCoo( final integerFalse=0, final integerTrue=Buildings.Controls.OBC.ASHRAE.G36.Types.ZoneStates.cooling) "Convert Boolean to Integer number"; Buildings.Controls.OBC.CDL.Logical.Nor isDea "In deadband state"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToIntDea( final integerFalse=0, final integerTrue=Buildings.Controls.OBC.ASHRAE.G36.Types.ZoneStates.deadband) "Convert Boolean to Integer number"; Buildings.Controls.OBC.CDL.Logical.And isHea "In heating state if both conditions are true"; Buildings.Controls.OBC.CDL.Continuous.Hysteresis hysUHea( final uLow=uLow, final uHigh=uHigh) "Check if it is in heating state"; Buildings.Controls.OBC.CDL.Continuous.Hysteresis hysUCoo( final uLow=uLow, final uHigh=uHigh) "Check if it is in cooling state"; Buildings.Controls.OBC.CDL.Continuous.Subtract uHeaMinUCoo "Difference between uHea and uCoo"; Buildings.Controls.OBC.CDL.Logical.And isCoo "In cooling state if both inputs are true"; Buildings.Controls.OBC.CDL.Continuous.Hysteresis hysU( final uLow=-uLow, final uHigh=uLow) "Check if heating control signal is bigger than cooling control signal"; Buildings.Controls.OBC.CDL.Logical.Not notHea "Not in heating state"; Buildings.Controls.OBC.CDL.Integers.Add addInt "Add two integer inputs"; Buildings.Controls.OBC.CDL.Integers.Add addInt1 "Add two integer inputs"; equation connect(isDea.y, booToIntDea.u); connect(hysUHea.y, isHea.u1); connect(uHea, hysUHea.u); connect(uCoo,hysUCoo. u); connect(uCoo, uHeaMinUCoo.u2); connect(uHea, uHeaMinUCoo.u1); connect(isCoo.y, booToIntCoo.u); connect(hysUCoo.y, isCoo.u2); connect(uHeaMinUCoo.y, hysU.u); connect(isHea.y, booToIntHea.u); connect(isHea.y, notHea.u); connect(hysU.y, isHea.u2); connect(notHea.y, isCoo.u1); connect(isCoo.y, isDea.u2); connect(isHea.y, isDea.u1); connect(booToIntHea.y, addInt.u1); connect(booToIntCoo.y, addInt.u2); connect(addInt.y, addInt1.u1); connect(booToIntDea.y, addInt1.u2); connect(addInt1.y, yZonSta); end ZoneStates;