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 |
Alarms
|
Zone level alarms |
ControlLoops
|
Heating and cooling control loops |
Setpoints
|
Block outputs thermal zone cooling and heating active setpoint |
ZoneStates
|
Select the zone state |
Validation
|
Collection of validation models |
Zone level alarms
Information
This block outputs zone alarms. The implementation is according to the ASHRAE
Guideline 36, Section 5.3.6.
Zone temperature alarm
-
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.
-
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.
-
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:
-
If the CO2 concentration
ppmCO2
is less than 300 ppm, or the zone is
in unoccupied mode for more than 2 hours (modChe
) and zone CO2
concentration exceeds 600 ppm, generate a Level 3 alarm. The alarm text shall
identify the sensor and indicate that it may be out of calibration.
-
If the CO2 concentration exceeds setpoint (
CO2Set
) plus 10% for more
than 10 minutes (timChe
), generate a Level 2 alarm.
Parameters
Type | Name | Default | Description |
Real | timChe | 600 | Threshold time to check temperature difference [s] |
CO2 concentration alarm |
Boolean | have_CO2Sen | false | True: the zone has CO2 sensor |
Real | modChe | 7200 | Threshold time to check unoccupied time [s] |
Real | CO2Set | 894 | CO2 setpoint in ppm |
Advanced |
Real | dTHys | 0.25 | Delta between the temperature hysteresis high and low limit [K] |
Real | ppmHys | 25 | Hysteresis to check CO2 concentration [1] |
Connectors
Type | Name | Description |
input RealInput | TZon | Measured zone temperature [K] |
input RealInput | TCooSet | Zone cooling setpoint [K] |
input RealInput | THeaSet | Zone heating setpoint [K] |
input BooleanInput | u1ResSet | True: zone setpoint temperature is being resetted |
input IntegerInput | uOpeMod | AHU operation mode status signal |
input RealInput | ppmCO2 | Measured CO2 concentration [1] |
output IntegerOutput | yTemAla | Zone temperature alarm |
output IntegerOutput | yCO2Ala | CO2 concentration alarm |
Modelica definition
block Alarms
parameter Real timChe(
final unit="s",
final quantity="Time")=600
;
parameter Boolean have_CO2Sen=false
;
parameter Real modChe(
final unit="s",
final quantity="Time")=7200
;
parameter Real CO2Set=894
;
parameter Real dTHys(
final unit="K",
final quantity="TemperatureDifference")=0.25
;
parameter Real ppmHys(
final unit="1")=25
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TZon(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature") ;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TCooSet(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature") ;
Buildings.Controls.OBC.CDL.Interfaces.RealInput THeaSet(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature") ;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1ResSet
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uOpeMod
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput ppmCO2(
final unit="1")
if have_CO2Sen
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yTemAla
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yCO2Ala
if have_CO2Sen
;
Buildings.Controls.OBC.CDL.Reals.Subtract lowTem
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold twoDegLow(
final t=2,
final h=dTHys)
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold thrDegLow(
final t=3,
final h=dTHys)
;
Buildings.Controls.OBC.CDL.Reals.Subtract higTem
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold twoDegHig(
final t=2,
final h=dTHys)
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold thrDegHig(
final t=3,
final h=dTHys)
;
Buildings.Controls.OBC.CDL.Utilities.Assert higTemAla3(
final message="Warning: zone temperature is 2 degC higher than the cooling setpoint")
;
Buildings.Controls.OBC.CDL.Logical.Not not1 ;
Buildings.Controls.OBC.CDL.Logical.Not notSupTemAla
;
Buildings.Controls.OBC.CDL.Logical.And and2
;
Buildings.Controls.OBC.CDL.Logical.And and1
;
Buildings.Controls.OBC.CDL.Logical.And and3
;
Buildings.Controls.OBC.CDL.Logical.And and4
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt(
final integerTrue=3)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt2(
final integerTrue=3)
;
Buildings.Controls.OBC.CDL.Integers.Equal levThrHig
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant levTwo(
final k=2) ;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant levThr(
final k=3) ;
Buildings.Controls.OBC.CDL.Utilities.Assert higTemAla2(
final message="Warning: zone temperature is 3 degC higher than the cooling setpoint")
;
Buildings.Controls.OBC.CDL.Logical.Not not2 ;
Buildings.Controls.OBC.CDL.Integers.Equal levTwoHig
;
Buildings.Controls.OBC.CDL.Utilities.Assert lowTemAla3(
final message="Warning: zone temperature is 2 degC lower than the heating setpoint")
;
Buildings.Controls.OBC.CDL.Logical.Not not3 ;
Buildings.Controls.OBC.CDL.Integers.Equal levThrLow
;
Buildings.Controls.OBC.CDL.Utilities.Assert lowTemAla2(
final message="Warning: zone temperature is 3 degC lower than the heating setpoint")
;
Buildings.Controls.OBC.CDL.Logical.Not not4 ;
Buildings.Controls.OBC.CDL.Integers.Equal levTwoLow
;
Buildings.Controls.OBC.CDL.Reals.LessThreshold lesThr(
final t=300,
final h=ppmHys)
if have_CO2Sen
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr(
final t=600,
final h=ppmHys)
if have_CO2Sen
;
Buildings.Controls.OBC.CDL.Logical.And and5
if have_CO2Sen
;
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 ;
Buildings.Controls.OBC.CDL.Logical.Not not5
if have_CO2Sen ;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr1(
final t=1.1*CO2Set,
final h=ppmHys)
if have_CO2Sen
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt4(
final integerTrue=3)
if have_CO2Sen
;
Buildings.Controls.OBC.CDL.Logical.Not not6
if have_CO2Sen ;
Buildings.Controls.OBC.CDL.Logical.And and6
if have_CO2Sen
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt5(
final integerTrue=2)
if have_CO2Sen
;
Buildings.Controls.OBC.CDL.Utilities.Assert lowTemAla5(
final message="Warning: the zone CO2 concentration exceeds setpoint plus 10%.")
if have_CO2Sen ;
Buildings.Controls.OBC.CDL.Integers.Add temAla
;
Buildings.Controls.OBC.CDL.Integers.Add co2Ala
if have_CO2Sen
;
Buildings.Controls.OBC.CDL.Logical.TrueDelay tenMinDur(
final delayTime=timChe)
;
Buildings.Controls.OBC.CDL.Logical.TrueDelay tenMinDur1(
final delayTime=timChe)
;
Buildings.Controls.OBC.CDL.Logical.TrueDelay tenMinDur2(
final delayTime=timChe)
;
Buildings.Controls.OBC.CDL.Logical.TrueDelay tenMinDur3(
final delayTime=timChe)
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant cooDowMod(
final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.coolDown)
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant warUpMod(
final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.warmUp)
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu3
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu4
;
Buildings.Controls.OBC.CDL.Logical.Or or2
;
Buildings.Controls.OBC.CDL.Logical.Or or1
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu1
if have_CO2Sen
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant unoMod(
final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.unoccupied)
if have_CO2Sen ;
Buildings.Controls.OBC.CDL.Logical.TrueDelay twoHou(
final delayTime=modChe)
if have_CO2Sen
;
Buildings.Controls.OBC.CDL.Logical.Or or3
if have_CO2Sen
;
Buildings.Controls.OBC.CDL.Logical.TrueDelay tenMinDur4(
final delayTime=timChe)
if have_CO2Sen
;
Buildings.Controls.OBC.CDL.Integers.Switch higTemAla
;
Buildings.Controls.OBC.CDL.Integers.Switch lowTemAla
;
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;
Heating and cooling control loops
Information
This block outputs the heating and cooling control loop signal. The implementation
is according to the ASHRAE Guideline 36, Section 5.3.4.
-
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.
-
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).
-
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).
-
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
Type | Name | Default | Description |
Cooling control |
Real | kCooCon | 0.1 | Gain of controller for cooling control loop |
Real | TiCooCon | 900 | Time constant of integrator block for cooling control loop [s] |
Heating control |
Real | kHeaCon | 0.1 | Gain of controller for heating control loop |
Real | TiHeaCon | 900 | Time constant of integrator block for heating control loop [s] |
Advanced |
Real | timChe | 30 | Threshold time to check the zone temperature status [s] |
Real | dTHys | 0.25 | Delta between the temperature hysteresis high and low limit [K] |
Real | looHys | 0.01 | Threshold value to check if the controller output is near zero [1] |
Connectors
Type | Name | Description |
input RealInput | TCooSet | Zone cooling setpoint [K] |
input RealInput | TZon | Measured zone temperature [K] |
input RealInput | THeaSet | Zone heating setpoint [K] |
output RealOutput | yCoo | Cooling control signal [1] |
output RealOutput | yHea | Heating control signal [1] |
Modelica definition
block ControlLoops
parameter Real kCooCon=0.1
;
parameter Real TiCooCon(unit="s")=900
;
parameter Real kHeaCon=0.1
;
parameter Real TiHeaCon(unit="s")=900
;
parameter Real timChe(unit="s")=30
;
parameter Real dTHys(unit="K")=0.25
;
parameter Real looHys(unit="1")=0.01
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TCooSet(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature") ;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TZon(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature") ;
Buildings.Controls.OBC.CDL.Interfaces.RealInput THeaSet(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature") ;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yCoo(
final min=0,
final max=1,
final unit="1") ;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yHea(
final min=0,
final max=1,
final unit="1") ;
Buildings.Controls.OBC.CDL.Reals.PIDWithReset conCoo(
final controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI,
final k=kCooCon,
final Ti=TiCooCon,
final reverseActing=false)
;
Buildings.Controls.OBC.CDL.Reals.PIDWithReset conHea(
final controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI,
final k=kHeaCon,
final Ti=TiHeaCon)
;
protected
Buildings.Controls.OBC.CDL.Reals.Less enaHeaLoo(
final h=dTHys)
;
Buildings.Controls.OBC.CDL.Reals.Less enaCooLoo(
final h=dTHys)
;
Buildings.Controls.OBC.CDL.Logical.TrueDelay disCoo(
final delayTime=timChe)
;
Buildings.Controls.OBC.CDL.Logical.Not colZon
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal zerCoo(
final realTrue=0,
final realFalse=1)
;
Buildings.Controls.OBC.CDL.Reals.Multiply cooConSig
;
Buildings.Controls.OBC.CDL.Logical.Not holZon
;
Buildings.Controls.OBC.CDL.Logical.TrueDelay disHea(
final delayTime=timChe)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal zerHea(
final realTrue=0,
final realFalse=1)
;
Buildings.Controls.OBC.CDL.Reals.Multiply heaConSig
;
Buildings.Controls.OBC.CDL.Reals.LessThreshold zerCon(
final t=looHys,
final h=0.8*looHys)
;
Buildings.Controls.OBC.CDL.Reals.LessThreshold zerCon1(
final t=looHys,
final h=0.8*looHys)
;
Buildings.Controls.OBC.CDL.Logical.And disCooCon
;
Buildings.Controls.OBC.CDL.Logical.And disHeaCon
;
equation
connect(TZon, enaHeaLoo.u1);
connect(THeaSet, enaHeaLoo.u2);
connect(TZon, enaCooLoo.u2);
connect(TCooSet, enaCooLoo.u1);
connect(TCooSet,conCoo. u_s);
connect(TZon,conCoo. u_m);
connect(enaCooLoo.y,conCoo. trigger);
connect(enaCooLoo.y, colZon.u);
connect(conCoo.y, cooConSig.u1);
connect(THeaSet,conHea. u_s);
connect(TZon,conHea. u_m);
connect(enaHeaLoo.y, holZon.u);
connect(enaHeaLoo.y,conHea. trigger);
connect(conHea.y, heaConSig.u1);
connect(zerCon.y, disCoo.u);
connect(conCoo.y, zerCon.u);
connect(conHea.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;
Block outputs thermal zone cooling and heating active setpoint
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.
-
According to Guideline 36, Section 3.1.1.1, zone setpoints shall be based on zone
type.
Zone Type |
Occupied |
Unoccupied |
Heating | Cooling |
Heating | Cooling |
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) |
- Each zone shall have separate occupied and unoccupied heating and cooling
setpoints.
- 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.
-
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.
-
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.
- As a default, the active occupied cooling setpoint shall be limited between 22 °C
(72 °F) and 27 °C (80 °F);
- 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.
- 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).
- 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).
- 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.
- 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.
- Hierarchy of setpoint adjustments: the following adjustment restrictions
shall prevail in order from highest to lowest priority.
- Setpoint overlap restriction
- Absolute limits on local setpoint adjustment
- Window swtiches
- Demand limit (a. Occupancy sensors; b. Local setpoint adjustment)
- Scheduled setpoints based on zone group mode
Parameters
Type | Name | Default | Description |
Sensors |
Boolean | have_occSen | | Check if the zone has occupancy sensor |
Boolean | have_winSen | | Check if the zone has window status sensor |
Setpoint adjustable setting |
Boolean | have_locAdj | true | True: the zone has local setpoint adjustment knob |
Boolean | sepAdj | true | True: cooling and heating setpoint can be adjusted separately |
Boolean | ignDemLim | true | True: exempt the individual zone from demand limit setpoint adjustment |
Setpoints limits setting |
Real | TActCoo_max | 300.15 | Maximum active cooling setpoint [K] |
Real | TActCoo_min | 295.15 | Minimum active cooling setpoint [K] |
Real | TActHea_max | 295.15 | Maximum active heating setpoint [K] |
Real | TActHea_min | 291.15 | Minimum active heating setpoint [K] |
Real | TWinOpeCooSet | 322.15 | Cooling setpoint when window is open [K] |
Real | TWinOpeHeaSet | 277.15 | Heating setpoint when window is open [K] |
Demand control |
Setpoint adjustment |
Real | incTSetDem_1 | 0.5 | Cooling setpoint increase value (degC) when cooling demand limit level 1 is imposed [K] |
Real | incTSetDem_2 | 1 | Cooling setpoint increase value (degC) when cooling demand limit level 2 is imposed [K] |
Real | incTSetDem_3 | 2 | Cooling setpoint increase value (degC) when cooling demand limit level 3 is imposed [K] |
Real | decTSetDem_1 | 0.5 | Heating setpoint decrease value (degC) when heating demand limit level 1 is imposed [K] |
Real | decTSetDem_2 | 1 | Heating setpoint decrease value (degC) when heating demand limit level 2 is imposed [K] |
Real | decTSetDem_3 | 2 | Heating setpoint decrease value (degC) when heating demand limit level 3 is imposed [K] |
Connectors
Type | Name | Description |
input IntegerInput | uOpeMod | AHU operation mode status signal |
input RealInput | TOccCooSet | Occupied zone cooling setpoint [K] |
input RealInput | TUnoCooSet | Unoccupied zone cooling setpoint [K] |
input RealInput | TOccHeaSet | Occupied zone heating setpoint [K] |
input RealInput | TUnoHeaSet | Unoccupied zone heating setpoint [K] |
input RealInput | setAdj | The adjustment value for both heating and cooling setpoints if it allows only single setpoint adjustment [K] |
input RealInput | cooSetAdj | Cooling setpoint adjustment value [K] |
input RealInput | heaSetAdj | Heating setpoint adjustment value [K] |
input IntegerInput | uCooDemLimLev | Cooling demand limit level |
input IntegerInput | uHeaDemLimLev | Heating demand limit level |
input BooleanInput | u1Occ | Occupancy sensor (occupied=true, unoccupied=false) |
input BooleanInput | u1Win | Window status, normally closed (true), when windows open, it becomes false |
output RealOutput | TCooSet | Cooling setpoint temperature [K] |
output RealOutput | THeaSet | Heating setpoint temperature [K] |
output IntegerOutput | yAla | Alarm level |
Modelica definition
block Setpoints
parameter Boolean have_occSen ;
parameter Boolean have_winSen
;
parameter Boolean have_locAdj=true
;
parameter Boolean sepAdj=true
;
parameter Boolean ignDemLim = true
;
parameter Real TActCoo_max(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=300.15
;
parameter Real TActCoo_min(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=295.15
;
parameter Real TActHea_max(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=295.15
;
parameter Real TActHea_min(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=291.15
;
parameter Real TWinOpeCooSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=322.15
;
parameter Real TWinOpeHeaSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=277.15
;
parameter Real incTSetDem_1(unit="K")=0.5
;
parameter Real incTSetDem_2(unit="K")=1
;
parameter Real incTSetDem_3(unit="K")=2
;
parameter Real decTSetDem_1(unit="K")=0.5
;
parameter Real decTSetDem_2(unit="K")=1
;
parameter Real decTSetDem_3(unit="K")=2
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uOpeMod
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TOccCooSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature") ;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TUnoCooSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TOccHeaSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature") ;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TUnoHeaSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput setAdj(
final unit="K",
final quantity="TemperatureDifference")
if have_locAdj
and not sepAdj
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput cooSetAdj(
final unit="K",
final quantity="TemperatureDifference")
if have_locAdj
and sepAdj
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput heaSetAdj(
final unit="K",
final quantity="TemperatureDifference")
if have_locAdj
and sepAdj
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uCooDemLimLev
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uHeaDemLimLev
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1Occ
if have_occSen
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1Win
if have_winSen
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput TCooSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature") ;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput THeaSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature") ;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yAla ;
Buildings.Controls.OBC.CDL.Logical.Or or2
;
Buildings.Controls.OBC.CDL.Logical.Edge edg ;
Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler cooSetFre
;
Buildings.Controls.OBC.CDL.Logical.Not not3 ;
Buildings.Controls.OBC.CDL.Logical.Or or5
;
Buildings.Controls.OBC.CDL.Logical.Or3 or1
;
Buildings.Controls.OBC.CDL.Logical.Not not1 ;
Buildings.Controls.OBC.CDL.Reals.AddParameter addPar3(
final p=incTSetDem_3)
;
Buildings.Controls.OBC.CDL.Reals.AddParameter addPar1(
final p=incTSetDem_2)
;
Buildings.Controls.OBC.CDL.Reals.AddParameter addPar2(
final p=incTSetDem_1)
;
Buildings.Controls.OBC.CDL.Reals.Multiply pro6
;
Buildings.Controls.OBC.CDL.Reals.Multiply pro
;
Buildings.Controls.OBC.CDL.Reals.Multiply pro1
;
Buildings.Controls.OBC.CDL.Reals.Multiply pro2
;
Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler heaSetFre
;
Buildings.Controls.OBC.CDL.Logical.Or3 or4 ;
Buildings.Controls.OBC.CDL.Logical.Not not2 ;
Buildings.Controls.OBC.CDL.Reals.Multiply pro7
;
Buildings.Controls.OBC.CDL.Reals.AddParameter addPar6(
final p=-decTSetDem_1)
;
Buildings.Controls.OBC.CDL.Reals.AddParameter addPar5(
final p=-decTSetDem_2)
;
Buildings.Controls.OBC.CDL.Reals.AddParameter addPar4(
final p=-decTSetDem_3)
;
Buildings.Controls.OBC.CDL.Reals.Multiply pro5
;
Buildings.Controls.OBC.CDL.Reals.Multiply pro4
;
Buildings.Controls.OBC.CDL.Reals.Multiply pro3
;
Buildings.Controls.OBC.CDL.Logical.Timer tim(
final t=300)
;
Buildings.Controls.OBC.CDL.Logical.TrueHoldWithReset truHol(
final duration=60)
;
Buildings.Controls.OBC.CDL.Logical.Edge edg1
;
Buildings.Controls.OBC.CDL.Reals.AddParameter heaSetDec(
final p=-0.5)
;
Buildings.Controls.OBC.CDL.Reals.AddParameter cooSetInc(
final p=0.5)
;
Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler cooSetSam
;
Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler heaSetSam
;
Buildings.Controls.OBC.CDL.Reals.Add add1 ;
Buildings.Controls.OBC.CDL.Reals.Add add2 ;
Buildings.Controls.OBC.CDL.Reals.Limiter cooSetLim(
final uMax=TActCoo_max,
final uMin=TActCoo_min)
;
Buildings.Controls.OBC.CDL.Reals.Limiter heaSetLim(
final uMax=TActHea_max,
final uMin=TActHea_min)
;
Buildings.Controls.OBC.CDL.Reals.AddParameter addPar(
final p=-0.5)
;
protected
Buildings.Controls.OBC.CDL.Integers.Equal intEqu
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu1
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu2
;
Buildings.Controls.OBC.CDL.Logical.Or3 or3
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt(
final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.warmUp)
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt1(
final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.coolDown)
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt2(
final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.occupied)
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant cooSetAdjCon(
final k=have_locAdj)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant con(
final k=0) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant con3(
final k=0)
if not have_locAdj
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant con4(
final k=0)
if not have_locAdj
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant heaSetAdjCon(
final k=have_locAdj)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant con1(
final k=0) ;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant con2(
final k=ignDemLim)
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant conTru(
final k=true)
if not have_occSen
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant conFal(
final k=false)
if not have_winSen
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant winSenCon(
final k=have_winSen)
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant have_occSenCon(
final k=have_occSen)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant cooSetWinOpe(
final k=TWinOpeCooSet)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant heaSetWinOpe(
final k=TWinOpeHeaSet)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant alaZer(
final k=-0.2)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant alaFou(
final k=3.8)
;
Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea1
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea6
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea2
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea3
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea4
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea5
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea7
;
Buildings.Controls.OBC.CDL.Logical.And and11
;
Buildings.Controls.OBC.CDL.Logical.Not not5 ;
Buildings.Controls.OBC.CDL.Reals.Less les
;
Buildings.Controls.OBC.CDL.Reals.Greater gre
;
Buildings.Controls.OBC.CDL.Reals.Greater gre2
;
Buildings.Controls.OBC.CDL.Reals.Switch swi
;
Buildings.Controls.OBC.CDL.Reals.Switch swi1
;
Buildings.Controls.OBC.CDL.Reals.Switch swi2
;
Buildings.Controls.OBC.CDL.Reals.Switch swi3
;
Buildings.Controls.OBC.CDL.Reals.Switch swi4
;
Buildings.Controls.OBC.CDL.Reals.Switch swi6
;
Buildings.Controls.OBC.CDL.Reals.Switch swi7
;
Buildings.Controls.OBC.CDL.Reals.Switch swi8
;
Buildings.Controls.OBC.CDL.Reals.Switch swi9
;
Buildings.Controls.OBC.CDL.Reals.Switch swi10
;
Buildings.Controls.OBC.CDL.Reals.Switch swi11
;
Buildings.Controls.OBC.CDL.Reals.Switch swi12
;
Buildings.Controls.OBC.CDL.Reals.Switch swi13
;
Buildings.Controls.OBC.CDL.Reals.Switch swi14
;
Buildings.Controls.OBC.CDL.Reals.Switch swi15
;
Buildings.Controls.OBC.CDL.Reals.Switch swi16
;
Buildings.Controls.OBC.CDL.Reals.Switch swi17
;
Buildings.Controls.OBC.CDL.Reals.Switch swi18
;
Buildings.Controls.OBC.CDL.Reals.Switch swi19
;
Buildings.Controls.OBC.CDL.Reals.Switch swi20
;
Buildings.Controls.OBC.CDL.Reals.Switch swi21
;
Buildings.Controls.OBC.CDL.Reals.Switch swi22
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu7
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt8(
final k=Buildings.Controls.OBC.ASHRAE.G36.Types.DemandLimitLevels.heating3)
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu8
;
Buildings.Controls.OBC.CDL.Logical.Not not4 ;
Buildings.Controls.OBC.CDL.Logical.And and10
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt6(
final k=Buildings.Controls.OBC.ASHRAE.G36.Types.DemandLimitLevels.heating1)
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu6
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt7(
final k=Buildings.Controls.OBC.ASHRAE.G36.Types.DemandLimitLevels.heating2)
;
Buildings.Controls.OBC.CDL.Integers.GreaterThreshold intGreThr
;
Buildings.Controls.OBC.CDL.Integers.GreaterThreshold intGreThr1
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt3(
final k=Buildings.Controls.OBC.ASHRAE.G36.Types.DemandLimitLevels.cooling1)
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu3
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt4(
final k=Buildings.Controls.OBC.ASHRAE.G36.Types.DemandLimitLevels.cooling2)
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu4
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt5(
final k=Buildings.Controls.OBC.ASHRAE.G36.Types.DemandLimitLevels.cooling3)
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu5
;
Buildings.Controls.OBC.CDL.Reals.Add add3 ;
Buildings.Controls.OBC.CDL.Reals.Add add4 ;
Buildings.Controls.OBC.CDL.Reals.Add add5 ;
Buildings.Controls.OBC.CDL.Reals.Add add6 ;
Buildings.Controls.OBC.CDL.Reals.Add add7 ;
Buildings.Controls.OBC.CDL.Reals.Add add8 ;
Buildings.Controls.OBC.CDL.Logical.Not winOpe
if have_winSen ;
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(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(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);
connect(u1Win, winOpe.u);
connect(winOpe.y, and11.u2);
connect(winOpe.y, swi14.u2);
connect(winOpe.y, swi15.u2);
end Setpoints;
Select the zone state
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.
-
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.
-
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.
-
The zone state is deadband when it is neither in heating state nor in cooling state.
Parameters
Type | Name | Default | Description |
Real | uLow | 0.01 | Hysteresis parameter uLow for heating and cooling control signals to avoid chattering [1] |
Real | uHigh | 0.05 | Hysteresis parameter uHigh for heating and cooling control signals to avoid chattering [1] |
Connectors
Modelica definition
block ZoneStates
parameter Real uLow(
final unit = "1") = 0.01
;
parameter Real uHigh(
final unit = "1") = 0.05
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uHea ;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uCoo ;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yZonSta ;
protected
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToIntHea(
final integerFalse=0,
final integerTrue=Buildings.Controls.OBC.ASHRAE.G36.Types.ZoneStates.heating)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToIntCoo(
final integerFalse=0,
final integerTrue=Buildings.Controls.OBC.ASHRAE.G36.Types.ZoneStates.cooling)
;
Buildings.Controls.OBC.CDL.Logical.Nor isDea ;
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToIntDea(
final integerFalse=0,
final integerTrue=Buildings.Controls.OBC.ASHRAE.G36.Types.ZoneStates.deadband)
;
Buildings.Controls.OBC.CDL.Logical.And isHea ;
Buildings.Controls.OBC.CDL.Reals.Hysteresis hysUHea(
final uLow=uLow,
final uHigh=uHigh)
;
Buildings.Controls.OBC.CDL.Reals.Hysteresis hysUCoo(
final uLow=uLow,
final uHigh=uHigh)
;
Buildings.Controls.OBC.CDL.Reals.Subtract uHeaMinUCoo
;
Buildings.Controls.OBC.CDL.Logical.And isCoo ;
Buildings.Controls.OBC.CDL.Reals.Hysteresis hysU(
final uLow=-uLow,
final uHigh=uLow)
;
Buildings.Controls.OBC.CDL.Logical.Not notHea ;
Buildings.Controls.OBC.CDL.Integers.Add addInt ;
Buildings.Controls.OBC.CDL.Integers.Add addInt1 ;
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;