This package contains generic sequences for generating setpoints for various
terminal units control, according to ASHRAE Guideline 36, Part 5.B.
This sequence sets the thermal zone cooling and heating setpoints. The implementation
is according to the ASHRAE Guideline 36 (G36), PART 5.B.3. The calculation is done
following the steps below.
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.
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.
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.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.
Hierarchy of setpoint adjustments: the following adjustment restrictions
shall prevail in order from highest to lowest priority.
block ZoneTemperatures
parameter Boolean have_occSen ;
parameter Boolean have_winSen
;
parameter Boolean cooAdj=false
;
parameter Boolean heaAdj=false
;
parameter Boolean sinAdj = false
;
parameter Boolean ignDemLim = true
;
parameter Real TZonCooOnMax(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=300.15
;
parameter Real TZonCooOnMin(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=295.15
;
parameter Real TZonHeaOnMax(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=295.15
;
parameter Real TZonHeaOnMin(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=291.15
;
parameter Real TZonCooSetWinOpe(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=322.15
;
parameter Real TZonHeaSetWinOpe(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=277.15
;
parameter Real incTSetDem_1=0.56
;
parameter Real incTSetDem_2=1.1
;
parameter Real incTSetDem_3=2.2
;
parameter Real decTSetDem_1=0.56
;
parameter Real decTSetDem_2=1.1
;
parameter Real decTSetDem_3=2.2
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TZonCooSetOcc(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TZonHeaSetOcc(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TZonCooSetUno(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TZonHeaSetUno(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput setAdj(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
if (cooAdj
or sinAdj)
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput heaSetAdj(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
if heaAdj
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uOpeMod
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uCooDemLimLev
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uHeaDemLimLev
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uOccSen
if have_occSen
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uWinSta
if have_winSen
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput TZonCooSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature") ;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput TZonHeaSet(
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.Continuous.AddParameter addPar3(
final p=incTSetDem_3,
final k=1)
;
Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar1(
final p=incTSetDem_2,
final k=1)
;
Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar2(
final p=incTSetDem_1,
final k=1)
;
Buildings.Controls.OBC.CDL.Continuous.Product pro6
;
Buildings.Controls.OBC.CDL.Continuous.Product pro
;
Buildings.Controls.OBC.CDL.Continuous.Product pro1
;
Buildings.Controls.OBC.CDL.Continuous.Product 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.Continuous.Product pro7
;
Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar6(
final k=1,
final p=-decTSetDem_1)
;
Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar5(
final k=1,
final p=-decTSetDem_2)
;
Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar4(
final k=1,
final p=-decTSetDem_3)
;
Buildings.Controls.OBC.CDL.Continuous.Product pro5
;
Buildings.Controls.OBC.CDL.Continuous.Product pro4
;
Buildings.Controls.OBC.CDL.Continuous.Product pro3
;
Buildings.Controls.OBC.CDL.Logical.Timer tim(
final t=300)
;
Buildings.Controls.OBC.CDL.Logical.TrueHoldWithReset truHol(duration=60)
;
Buildings.Controls.OBC.CDL.Logical.Edge edg1
;
Buildings.Controls.OBC.CDL.Continuous.AddParameter heaSetDec(
p=-1.1,
final k=1)
;
Buildings.Controls.OBC.CDL.Continuous.AddParameter cooSetInc(
p=1.1,
final k=1)
;
Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler cooSetSam
;
Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler heaSetSam
;
Buildings.Controls.OBC.CDL.Continuous.Add add1 ;
Buildings.Controls.OBC.CDL.Continuous.Add add2 ;
Buildings.Controls.OBC.CDL.Continuous.Limiter cooSetLim(
final uMax=TZonCooOnMax,
final uMin=TZonCooOnMin)
;
Buildings.Controls.OBC.CDL.Continuous.Limiter heaSetLim(
final uMax=TZonHeaOnMax,
final uMin=TZonHeaOnMin)
;
Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar(
p=-0.56,
final k=1)
;
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_PR1.Types.OperationModes.warmUp)
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt1(
final k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.coolDown)
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt2(
final k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.occupied)
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant cooSetAdjCon(k=(cooAdj
or sinAdj))
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con(
final k=0) ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con3(
final k=0)
if not (cooAdj
or sinAdj)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con4(
final k=0)
if not heaAdj
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant heaSetAdjCon(
final k=heaAdj)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con1(
final k=0) ;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant sinSetAdjCon(
final k=sinAdj)
;
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.Continuous.Sources.Constant cooSetWinOpe(
final k=TZonCooSetWinOpe)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant heaSetWinOpe(
final k=TZonHeaSetWinOpe)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant alaZer(k=-0.2)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant alaFou(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.Continuous.Less les
;
Buildings.Controls.OBC.CDL.Continuous.Greater gre
;
Buildings.Controls.OBC.CDL.Continuous.Greater gre2
;
Buildings.Controls.OBC.CDL.Logical.Switch swi
;
Buildings.Controls.OBC.CDL.Logical.Switch swi1
;
Buildings.Controls.OBC.CDL.Logical.Switch swi2
;
Buildings.Controls.OBC.CDL.Logical.Switch swi3
;
Buildings.Controls.OBC.CDL.Logical.Switch swi4
;
Buildings.Controls.OBC.CDL.Logical.Switch swi5
;
Buildings.Controls.OBC.CDL.Logical.Switch swi6
;
Buildings.Controls.OBC.CDL.Logical.Switch swi7
;
Buildings.Controls.OBC.CDL.Logical.Switch swi8
;
Buildings.Controls.OBC.CDL.Logical.Switch swi9
;
Buildings.Controls.OBC.CDL.Logical.Switch swi10
;
Buildings.Controls.OBC.CDL.Logical.Switch swi11
;
Buildings.Controls.OBC.CDL.Logical.Switch swi12
;
Buildings.Controls.OBC.CDL.Logical.Switch swi13
;
Buildings.Controls.OBC.CDL.Logical.Switch swi14
;
Buildings.Controls.OBC.CDL.Logical.Switch swi15
;
Buildings.Controls.OBC.CDL.Logical.Switch swi16
;
Buildings.Controls.OBC.CDL.Logical.Switch swi17
;
Buildings.Controls.OBC.CDL.Logical.Switch swi18
;
Buildings.Controls.OBC.CDL.Logical.Switch swi19
;
Buildings.Controls.OBC.CDL.Logical.Switch swi20
;
Buildings.Controls.OBC.CDL.Logical.Switch swi21
;
Buildings.Controls.OBC.CDL.Logical.Switch swi22
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu7
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt8(
k=Buildings.Controls.OBC.ASHRAE.G36_PR1.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(
k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.DemandLimitLevels.heating1)
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu6
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt7(
k=Buildings.Controls.OBC.ASHRAE.G36_PR1.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(
k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.DemandLimitLevels.cooling1)
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu3
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt4(
k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.DemandLimitLevels.cooling2)
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu4
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt5(
k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.DemandLimitLevels.cooling3)
;
Buildings.Controls.OBC.CDL.Integers.Equal intEqu5
;
Buildings.Controls.OBC.CDL.Continuous.Add add3 ;
Buildings.Controls.OBC.CDL.Continuous.Add add4 ;
Buildings.Controls.OBC.CDL.Continuous.Add add5 ;
Buildings.Controls.OBC.CDL.Continuous.Add add6 ;
Buildings.Controls.OBC.CDL.Continuous.Add add7 ;
Buildings.Controls.OBC.CDL.Continuous.Add add8 ;
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(TZonCooSetOcc, swi.u1);
connect(TZonCooSetUno, swi.u3);
connect(TZonHeaSetOcc, swi1.u1);
connect(TZonHeaSetUno, 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(intEqu2.y, swi2.u2);
connect(heaSetAdjCon.y, swi5.u2);
connect(con1.y, swi5.u3);
connect(swi5.y, swi6.u3);
connect(sinSetAdjCon.y, swi6.u2);
connect(swi6.y, add1.u2);
connect(add1.y, swi3.u1);
connect(heaSetAdj, swi5.u1);
connect(con4.y, swi5.u1);
connect(swi4.y, swi6.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(uOccSen, 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(uWinSta, 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(uWinSta, swi14.u2);
connect(uWinSta, 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(TZonCooSetUno, les.u2);
connect(TZonCooSetUno, swi9.u3);
connect(TZonHeaSetUno, gre.u2);
connect(TZonHeaSetUno, 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, TZonHeaSet);
connect(swi9.y, TZonCooSet);
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(tim.passed, truHol.u);
end ZoneTemperatures;