Package with sequences that output control setpoints
Information
This package contains generic setpoint sequences for
either AHU or terminal units control.
Package Content
Name |
Description |
OperationMode
|
Block that outputs the operation mode |
TrimAndRespond
|
Block to inplement trim and respond logic |
ZoneStatus
|
Block that outputs zone temperature status |
Validation
|
Collection of validation models |
Block that outputs the operation mode
Information
This block outputs VAV system operation mode. It is implemented according to
ASHRAE guideline G36, PART 5.C.6 (zone group operating modes).
The block has the modes listed below.
Occupied Mode
A Zone Group is in the occupied mode when
occupancy input uOcc
is true. This input shall be retrieved from
other sequences that specifies occupancy variation and time remaining to the
next occupied period tNexOcc
.
Warmup Mode
Warmup mode shall start based on the zone with the longest calculated warm up
time warUpTim
requirement, but no earlier than 3 hours before
the start of the scheduled occupied period, and shall end at the scheduled
occupied start time. Zones where the window switch indicates that a window
is open shall be ignored. Note that for each zone, the optimal warm-up time
warUpTim
shall be obtained from an Optimal Start
sequences, computed in a separate block.
The figure below shows the sequence.
Cool-Down Mode
Cool-down mode shall start based on the zone with the longest calculated
cool-down time cooDowTim
requirement, but no earlier than 3 hours
before the start of the scheduled occupied period, and shall end at the
scheduled occupied start time. Zones where the window switch indicates that a
window is open shall be ignored. Note that the each zone cooDowTim
shall be obtained from an Optimal Start sequences, computed in a
separate block.
Setback Mode
During unoccupied mode, if any 5 zones (or all zones, if fewer than 5)
in the zone group fall below their unoccupied heating setpoints
TZonHeaSetUno
, the zone group shall enter setback mode until
all spaces in the zone group are 1.1 °C (2 °F) above their
unoccupied setpoints.
Freeze Protection Setback Mode
During unoccupied Mode, if any single zone falls below 4.4 °C
(40 °F), the zone group shall enter setback mode until all zones
are above 7.2 °C (45 °F), and a Level 3 alarm
yFreProSta
shall be set.
Setup Mode
During unoccupied mode, if any 5 zones (or all zones, if fewer than 5)
in the zone group rise above their unoccupied cooling setpoints TZonCooSetUno
,
the zone group shall enter setup mode until all spaces in the zone group
are 1.1 °C (2 °F) below their unoccupied setpoints. Zones
where the window switch indicates that a window is open shall be ignored.
Unoccupied Mode
Unoccupied mode shall be active if the zone group is not in any other mode.
Parameters
Type | Name | Default | Description |
Integer | numZon | numZon(min=1) | Number of zones |
Real | preWarCooTim | 10800 | Maximum cool-down or warm-up time [s] |
Real | TZonFreProOn | 277.55 | Threshold zone temperature value to activate freeze protection mode [K] |
Real | TZonFreProOff | 280.35 | Threshold zone temperature value to finish the freeze protection mode [K] |
Sensors |
Boolean | have_winSen | | Check if the zone has window status sensor |
Connectors
Type | Name | Description |
input BooleanInput | uOcc | Zone occupancy status: true=occupied, false=unoccupied |
input RealInput | tNexOcc | Time to next occupied period [s] |
input RealInput | maxCooDowTim | Maximum cool-down time among all the zones [s] |
input RealInput | maxWarUpTim | Maximum warm-up time among all the zones [s] |
input BooleanInput | occHeaHigMin | True when the occupied heating setpoint temperature is higher than the minimum zone temperature |
input BooleanInput | maxHigOccCoo | True when the maximum zone temperature is higher than the occupied cooling setpoint |
input BooleanInput | uWinSta | Window status: true=open, false=close |
input IntegerInput | totColZon | Total number of cold zone |
input BooleanInput | unoHeaHigMin | True when the unoccupied heating setpoint is higher than minimum zone temperature |
input RealInput | TZonMax | Maximum zone temperature [K] |
input RealInput | TZonMin | Minimum zone temperature [K] |
input IntegerInput | totHotZon | Total number of hot zone |
input BooleanInput | maxHigUnoCoo | True when the maximum zone temperature is higher than unoccupied cooling setpoint |
output IntegerOutput | yOpeMod | Operation mode |
Modelica definition
block OperationMode
parameter Boolean have_winSen
;
parameter Integer numZon(min=1) ;
parameter Real preWarCooTim(unit="s") = 10800
;
parameter Real TZonFreProOn(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature") = 277.55
;
parameter Real TZonFreProOff(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature") = 280.35
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uOcc
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput tNexOcc(
final unit="s",
final quantity="Time")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput maxCooDowTim(
final unit="s",
final quantity="Time") ;
Buildings.Controls.OBC.CDL.Interfaces.RealInput maxWarUpTim(
final unit="s",
final quantity="Time") ;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput occHeaHigMin
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput maxHigOccCoo
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uWinSta
if have_winSen
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput totColZon
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput unoHeaHigMin
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TZonMax(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TZonMin(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput totHotZon
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput maxHigUnoCoo
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yOpeMod
;
protected
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant occModInd(
final k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.occupied)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant unoPerInd(
final k=0)
;
Buildings.Controls.OBC.CDL.Logical.Switch corCooDowTim ;
Buildings.Controls.OBC.CDL.Logical.Switch corWarUpTim ;
Buildings.Controls.OBC.CDL.Integers.GreaterThreshold intGreThr(
final threshold=4) ;
Buildings.Controls.OBC.CDL.Integers.GreaterThreshold intGreThr1(
final threshold=numZon - 1)
;
Buildings.Controls.OBC.CDL.Logical.FallingEdge falEdg
;
Buildings.Controls.OBC.CDL.Logical.Latch lat
;
Buildings.Controls.OBC.CDL.Logical.Latch lat1
;
Buildings.Controls.OBC.CDL.Logical.Latch lat2
;
Buildings.Controls.OBC.CDL.Logical.FallingEdge falEdg1
;
Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys2(
final pre_y_start=true,
final uHigh=0,
final uLow=-60)
;
Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys3(
final pre_y_start=true,
final uHigh=0,
final uLow=-60)
;
Buildings.Controls.OBC.CDL.Continuous.Add add5(
final k1=-1)
;
Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys4(
final pre_y_start=false,
final uHigh=0,
final uLow=-60)
;
Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys5(
final pre_y_start=false,
final uHigh=0,
final uLow=-60)
;
Buildings.Controls.OBC.CDL.Continuous.Add add6(
final k1=-1)
;
Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys9(
final pre_y_start=false,
final uLow=-0.1,
final uHigh=0.1)
;
Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar(
final p=TZonFreProOn,
final k=-1)
;
Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys10(
final pre_y_start=false,
final uLow=-0.1,
final uHigh=0.1)
;
Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar1(
final k=1,
final p=(-1)*TZonFreProOff)
;
Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar2(
final p=preWarCooTim,
final k=-1)
;
Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar3(
final p=preWarCooTim,
final k=-1)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant maxWarCooTime(
final k=preWarCooTim)
;
Buildings.Controls.OBC.CDL.Logical.Latch lat3
;
Buildings.Controls.OBC.CDL.Logical.Latch lat4
;
Buildings.Controls.OBC.CDL.Integers.GreaterThreshold intGreThr2(
final threshold=4) ;
Buildings.Controls.OBC.CDL.Integers.GreaterThreshold intGreThr3(
final threshold=numZon - 1) ;
Buildings.Controls.OBC.CDL.Integers.Add addInt ;
Buildings.Controls.OBC.CDL.Integers.Add addInt1 ;
Buildings.Controls.OBC.CDL.Integers.Add addInt2 ;
Buildings.Controls.OBC.CDL.Integers.Add addInt3 ;
Buildings.Controls.OBC.CDL.Integers.Add addInt4 ;
Buildings.Controls.OBC.CDL.Integers.Add addInt5 ;
Buildings.Controls.OBC.CDL.Conversions.RealToInteger occMod
;
Buildings.Controls.OBC.CDL.Conversions.RealToInteger setBacMod
;
Buildings.Controls.OBC.CDL.Conversions.RealToInteger freProSetBacMod
;
Buildings.Controls.OBC.CDL.Conversions.RealToInteger setUpMod
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt1(
final integerTrue=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.warmUp)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt(
final integerTrue=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.coolDown)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt3(
final integerTrue=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.unoccupied)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea6(
final realTrue=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.setUp)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea4(
final realTrue=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.freezeProtection)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea3(
final realTrue=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.setBack)
;
Buildings.Controls.OBC.CDL.Utilities.Assert assMes(
final message="Level 3 alarm: freeze protection setback")
;
Buildings.Controls.OBC.CDL.Logical.Not not2 ;
Buildings.Controls.OBC.CDL.Logical.And and1 ;
Buildings.Controls.OBC.CDL.Logical.And and2 ;
Buildings.Controls.OBC.CDL.Logical.Or or1
;
Buildings.Controls.OBC.CDL.Logical.Or3 or3
;
Buildings.Controls.OBC.CDL.Logical.Or or4
;
Buildings.Controls.OBC.CDL.Logical.Or3 or5
;
Buildings.Controls.OBC.CDL.Logical.Or or6
;
Buildings.Controls.OBC.CDL.Logical.Switch swi
;
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.Not not3 ;
Buildings.Controls.OBC.CDL.Logical.Not not4 ;
Buildings.Controls.OBC.CDL.Logical.Not not5 ;
Buildings.Controls.OBC.CDL.Integers.GreaterThreshold notOcc(
final threshold=1)
if have_winSen
;
Buildings.Controls.OBC.CDL.Logical.And and3
if have_winSen
;
Buildings.Controls.OBC.CDL.Logical.Not not1
if have_winSen ;
Buildings.Controls.OBC.CDL.Utilities.Assert winOpe(
final message="Level 4 alarm: window open during modes other than occupied mode")
if
have_winSen
;
equation
connect(swi.y, occMod.u);
connect(occModInd.y, swi.u1);
connect(unoPerInd.y, swi.u3);
connect(intGreThr.y, or1.u1);
connect(intGreThr1.y, or1.u2);
connect(or1.y, lat.u);
connect(falEdg.y, lat.clr);
connect(lat.y, booToRea3.u);
connect(unoPerInd.y, swi3.u1);
connect(or3.y, swi3.u2);
connect(lat1.y, booToRea4.u);
connect(or3.y, swi4.u2);
connect(unoPerInd.y, swi4.u1);
connect(or4.y, lat2.u);
connect(falEdg1.y, lat2.clr);
connect(lat2.y, booToRea6.u);
connect(or3.y, swi5.u2);
connect(unoPerInd.y, swi5.u1);
connect(swi3.y, setBacMod.u);
connect(swi4.y, freProSetBacMod.u);
connect(swi5.y, setUpMod.u);
connect(lat.y, or5.u1);
connect(lat1.y, or5.u2);
connect(lat2.y, or5.u3);
connect(or5.y, or6.u1);
connect(or3.y, or6.u2);
connect(or6.y, not2.u);
connect(not2.y,booToInt3. u);
connect(and2.y, booToInt.u);
connect(and1.y, booToInt1.u);
connect(and2.y, or3.u2);
connect(and1.y, or3.u1);
connect(uOcc, swi.u2);
connect(uOcc, or3.u3);
connect(hys2.y, corCooDowTim.u2);
connect(hys3.y, corWarUpTim.u2);
connect(add5.y, hys4.u);
connect(hys4.y, and2.u1);
connect(tNexOcc, add5.u1);
connect(corCooDowTim.y, add5.u2);
connect(tNexOcc, add6.u1);
connect(corWarUpTim.y, add6.u2);
connect(add6.y, hys5.u);
connect(hys5.y, and1.u1);
connect(addPar.y, hys9.u);
connect(hys9.y, lat1.u);
connect(addPar1.y, hys10.u);
connect(hys10.y, lat1.clr);
connect(addPar2.y, hys2.u);
connect(addPar3.y, hys3.u);
connect(maxWarCooTime.y, corCooDowTim.u3);
connect(maxWarCooTime.y, corWarUpTim.u3);
connect(booToRea3.y, swi3.u3);
connect(booToRea4.y, swi4.u3);
connect(booToRea6.y, swi5.u3);
connect(lat3.y, and1.u2);
connect(lat4.y, and2.u2);
connect(hys4.y, not3.u);
connect(hys5.y, not4.u);
connect(not4.y, lat3.clr);
connect(not3.y, lat4.clr);
connect(lat1.y, not5.u);
connect(not5.y, assMes.u);
connect(maxCooDowTim, addPar2.u);
connect(maxCooDowTim, corCooDowTim.u1);
connect(maxWarUpTim, addPar3.u);
connect(maxWarUpTim, corWarUpTim.u1);
connect(occHeaHigMin, lat3.u);
connect(maxHigOccCoo, lat4.u);
connect(unoHeaHigMin, falEdg.u);
connect(TZonMax, addPar.u);
connect(TZonMin, addPar1.u);
connect(maxHigUnoCoo, falEdg1.u);
connect(totColZon, intGreThr.u);
connect(totColZon, intGreThr1.u);
connect(totHotZon, intGreThr2.u);
connect(totHotZon, intGreThr3.u);
connect(intGreThr2.y, or4.u1);
connect(intGreThr3.y, or4.u2);
connect(booToInt.y, addInt.u1);
connect(booToInt1.y, addInt.u2);
connect(occMod.y, addInt1.u1);
connect(addInt.y, addInt1.u2);
connect(setBacMod.y, addInt2.u1);
connect(freProSetBacMod.y, addInt2.u2);
connect(setUpMod.y, addInt3.u2);
connect(addInt2.y, addInt3.u1);
connect(addInt3.y, addInt4.u1);
connect(booToInt3.y, addInt4.u2);
connect(addInt1.y, addInt5.u1);
connect(addInt4.y, addInt5.u2);
connect(addInt5.y, yOpeMod);
connect(uWinSta, and3.u1);
connect(notOcc.y, and3.u2);
connect(and3.y, not1.u);
connect(addInt5.y, notOcc.u);
connect(not1.y, winOpe.u);
end OperationMode;
Block to inplement trim and respond logic
Information
This block implements the trim and respond logic according to ASHRAE guideline G36,
PART 5.A.15 (trim and respond setpoint reset logic).
The trim and respond logic shall reset setpoint within the range minSet
to
maxSet
.
When the associated device is off (uDevSta=false
), the setpoint
shall be iniSet
.
The reset logic shall be active while the associated device is proven
on (uDevSta=true
), starting delTim
after initial
device start command.
When active, every time step samplePeriod
, trim the setpoint by
triAmo
.
If there are more than numIgnReq
requests, respond by changing
the setpoint by resAmo*(numOfReq-numIgnReq)
, i.e., the number of
requests minus the number of ignored requests, but no more than maxRes
.
In other words, every time step
samplePeriod
:
- Change setpoint by
triAmo
;
- If
numOfReq > numIgnReq
, also change setpoint by resAmo*(numOfReq
-numIgnReq)
but no more than maxRes
.
Parameters
Type | Name | Default | Description |
Real | iniSet | | Initial setpoint |
Real | minSet | | Minimum setpoint |
Real | maxSet | | Maximum setpoint |
Real | delTim | delTim(final unit="s", final... | Delay time [s] |
Real | samplePeriod | samplePeriod(final unit="s",... | Sample period of component [s] |
Integer | numIgnReq | | Number of ignored requests |
Real | triAmo | | Trim amount |
Real | resAmo | | Respond amount (must have opposite sign of triAmo) |
Real | maxRes | | Maximum response per time interval (must have same sign as resAmo) |
Connectors
Type | Name | Description |
input IntegerInput | numOfReq | Number of requests from zones/systems |
input BooleanInput | uDevSta | On/Off status of the associated device |
output RealOutput | y | Setpoint that have been reset |
Modelica definition
block TrimAndRespond
parameter Real iniSet ;
parameter Real minSet ;
parameter Real maxSet ;
parameter Real delTim(
final unit="s",
final quantity="Time",
final min=100*1E-15) ;
parameter Real samplePeriod(
final unit="s",
final quantity="Time",
final min=1E-3)
;
parameter Integer numIgnReq ;
parameter Real triAmo ;
parameter Real resAmo ;
parameter Real maxRes ;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput numOfReq
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uDevSta
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput y
;
Buildings.Controls.OBC.CDL.Logical.TrueDelay tim(
final delayTime=delTim + samplePeriod,
final delayOnInit=true)
;
Buildings.Controls.OBC.CDL.Continuous.GreaterEqualThreshold greThr
;
Buildings.Controls.OBC.CDL.Logical.Switch netRes ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant resAmoCon(
final k=resAmo)
;
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.UnitDelay uniDel(
final samplePeriod=samplePeriod,
final y_start=iniSet)
;
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.Discrete.Sampler sampler(
final samplePeriod=samplePeriod)
;
Buildings.Controls.OBC.CDL.Continuous.LessEqualThreshold lesEquThr1
;
Buildings.Controls.OBC.CDL.Continuous.GreaterEqualThreshold greEquThr
;
Buildings.Controls.OBC.CDL.Continuous.GreaterEqualThreshold greEquThr1
;
Buildings.Controls.OBC.CDL.Continuous.Gain gai(
final k=-1) ;
protected
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant iniSetCon(k=iniSet)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant numIgnReqCon(k=numIgnReq)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant triAmoCon(k=triAmo)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant maxResCon(k=maxRes)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant maxSetCon(k=maxSet)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant zerTri(k=0)
;
Buildings.Controls.OBC.CDL.Conversions.IntegerToReal intToRea
;
Buildings.Controls.OBC.CDL.Continuous.Add difReqIgnReq(k1=-1)
;
Buildings.Controls.OBC.CDL.Continuous.Add add1
;
Buildings.Controls.OBC.CDL.Continuous.Add add2 ;
Buildings.Controls.OBC.CDL.Continuous.Min minInp
;
Buildings.Controls.OBC.CDL.Continuous.Min min1
;
Buildings.Controls.OBC.CDL.Logical.And and2
;
Buildings.Controls.OBC.CDL.Logical.Not not1 ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant minSetCon(k=minSet)
;
Buildings.Controls.OBC.CDL.Continuous.Max maxInp
;
Buildings.Controls.OBC.CDL.Utilities.Assert assMes(
final message="Trim amount 'triAmo' and respond amount 'resAmo' must have opposite signs.")
;
Buildings.Controls.OBC.CDL.Utilities.Assert assMes2(
final message="Respond amount 'resAmo' and maximum respond amount 'maxRes' must have same sign.")
;
Buildings.Controls.OBC.CDL.Continuous.Abs abs ;
Buildings.Controls.OBC.CDL.Continuous.Abs abs1 ;
equation
connect(numIgnReqCon.y, difReqIgnReq.u1);
connect(difReqIgnReq.y, greThr.u);
connect(pro.y, minInp.u1);
connect(triAmoCon.y, add2.u1);
connect(add2.y, netRes.u1);
connect(iniSetCon.y, swi.u3);
connect(swi.y, y);
connect(maxSetCon.y, min1.u2);
connect(add1.y, min1.u1);
connect(uniDel.y, add1.u1);
connect(sampler.y, difReqIgnReq.u2);
connect(triAmoCon.y, swi1.u1);
connect(zerTri.y, swi1.u3);
connect(greThr.y, and2.u2);
connect(and2.y, netRes.u2);
connect(iniSetCon.y, swi2.u1);
connect(swi2.y, swi.u1);
connect(swi2.y, uniDel.u);
connect(uDevSta, not1.u);
connect(not1.y, swi2.u2);
connect(min1.y, maxInp.u1);
connect(minSetCon.y, maxInp.u2);
connect(numOfReq, intToRea.u);
connect(intToRea.y, sampler.u);
connect(difReqIgnReq.y, pro.u1);
connect(uDevSta, tim.u);
connect(tim.y, swi.u2);
connect(tim.y, swi1.u2);
connect(and2.u1, tim.y);
connect(maxInp.y, swi2.u3);
connect(triAmoCon.y, pro1.u1);
connect(resAmoCon.y, pro1.u2);
connect(pro1.y, lesEquThr1.u);
connect(lesEquThr1.y, assMes.u);
connect(resAmoCon.y, pro2.u1);
connect(maxResCon.y, pro2.u2);
connect(pro2.y, greEquThr.u);
connect(greEquThr.y, assMes2.u);
connect(resAmoCon.y, abs.u);
connect(abs.y, pro.u2);
connect(maxResCon.y, abs1.u);
connect(abs1.y, minInp.u2);
connect(minInp.y, swi3.u1);
connect(resAmoCon.y, greEquThr1.u);
connect(greEquThr1.y, swi3.u2);
connect(netRes.y, add1.u2);
connect(swi1.y, netRes.u3);
connect(minInp.y, gai.u);
connect(gai.y, swi3.u3);
connect(swi3.y, add2.u2);
end TrimAndRespond;
Block that outputs zone temperature status
Information
This block outputs single zone status. It includes outputs as following:
-
the times for cooling-down (
yCooTim
) and warm-up (yWarTim
) the zone,
-
yOccHeaHigMin
: if the zone occupied heating setpoint TZonHeaSetOcc
is higher than the minimum zone temperature TZonMin
of the zone group (if the
zone is in a multiple zone system), or the zone temperature
(TZonMin
= TZon
) (if it is in a single zone system),
-
yMaxHigOccCoo
: if the maximum zone temperature TZonMax
of the zone
group (if the zone is in a multiple zone system), or the zone temperature
(TZonMax
= TZon
) (if it is in a single zone system), is higher
than the zone occupied cooling setpoint TZonCooSetOcc
,
-
yLowUnoHea
: if the zone temperature TZon
is lower than
the unoccupied heating setpoint TZonHeaSetUno
,
-
yUnoHeaHigMin
: if the zone unoccupied heating setpoint TZonHeaSetUno
is higher than the minimum zone temperature TZonMin
of the zone group (if the
zone is in a multiple zone system), or the zone temperature
(TZonMin
= TZon
) (if it is in a single zone system),
-
yMaxHigUnoCoo
: if the maximum zone temperature TZonMax
of the zone
group (if the zone is in a multiple zone system), or the zone temperature
(TZonMax
= TZon
) (if it is in a single zone system), is higher
than the zone unoccupied cooling setpoint TZonCooSetUno
,
-
yHigUnoCoo
: if the zone temperature TZon
is higher than
the unoccupied cooling setpoint TZonCooSetUno
,
Parameters
Type | Name | Default | Description |
Real | bouLim | 1.1 | Value limit to indicate the end of setback or setup mode [K] |
Boolean | have_winSen | false | Check if the zone has window status sensor |
Connectors
Type | Name | Description |
input RealInput | cooDowTim | Cool-down time retrieved from optimal cool-down block [s] |
input RealInput | warUpTim | Warm-up time retrieved from optimal warm-up block [s] |
input BooleanInput | uWinSta | Window status: true=open, false=close |
input RealInput | TZonHeaSetOcc | Occupied heating setpoint temperature [K] |
input RealInput | TZonCooSetOcc | Occupied cooling setpoint temperature [K] |
input RealInput | TZonMax | Maximum zone temperature in the zone group [K] |
input RealInput | TZon | Single zone temperature [K] |
input RealInput | TZonMin | Minimum zone temperature in the zone group [K] |
input RealInput | TZonHeaSetUno | Unoccupied heating setpoint temperature [K] |
input RealInput | TZonCooSetUno | Unoccupied cooling setpoint temperature [K] |
output RealOutput | yCooTim | Cool-down time [s] |
output RealOutput | yWarTim | Warm-up time [s] |
output BooleanOutput | yOccHeaHigMin | True when the occupied heating setpoint temperature is higher than the minimum zone temperature |
output BooleanOutput | yMaxHigOccCoo | True when the maximum zone temperature is higher than the occupied cooling setpoint |
output BooleanOutput | yLowUnoHea | True when zone temperature is lower than unoccupied heating setpoint |
output BooleanOutput | yUnoHeaHigMin | True when the unoccupied heating setpoint is higher than minimum zone temperature |
output BooleanOutput | yMaxHigUnoCoo | True when the maximum zone temperature is higher than unoccupied cooling setpoint |
output BooleanOutput | yHigUnoCoo | True when the zone temperature is higher than the unoccupied cooling setpoint |
Modelica definition
block ZoneStatus
parameter Real bouLim(
final unit="K",
final displayUnit="K",
final quantity="TemperatureDifference",
final min=0.5) = 1.1
;
parameter Boolean have_winSen=false
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput cooDowTim(
final unit="s",
final quantity="Time")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput warUpTim(
final unit="s",
final quantity="Time")
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uWinSta
if have_winSen
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TZonHeaSetOcc(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TZonCooSetOcc(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TZonMax(
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 TZonMin(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TZonHeaSetUno(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TZonCooSetUno(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yCooTim(
final unit="s",
final quantity="Time") ;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yWarTim(
final unit="s",
final quantity="Time") ;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yOccHeaHigMin
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yMaxHigOccCoo
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yLowUnoHea
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yUnoHeaHigMin
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yMaxHigUnoCoo
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yHigUnoCoo
;
protected
Buildings.Controls.OBC.CDL.Continuous.Product pro
;
Buildings.Controls.OBC.CDL.Continuous.Product pro1
;
Buildings.Controls.OBC.CDL.Continuous.Add add(
final k2=-1)
;
Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys(
final pre_y_start=false,
final uLow=-0.1,
final uHigh=0.1)
;
Buildings.Controls.OBC.CDL.Continuous.Add add1(
final k1=-1)
;
Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys1(
final pre_y_start=false,
final uLow=-0.1,
final uHigh=0.1)
;
Buildings.Controls.OBC.CDL.Continuous.Add add2(
final k1=-1)
;
Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys2(
final pre_y_start=false,
final uLow=-0.1,
final uHigh=0.1)
;
Buildings.Controls.OBC.CDL.Continuous.Add add3(
final k2=-1)
;
Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys3(
final uLow=-0.5*bouLim,
final uHigh=0.5*bouLim,
final pre_y_start=false)
;
Buildings.Controls.OBC.CDL.Continuous.Add add5(
final k2=-1)
;
Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys5(
final pre_y_start=false,
final uLow=-0.1,
final uHigh=0.1)
;
Buildings.Controls.OBC.CDL.Continuous.Add add4(
final k2=-1)
;
Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys4(
final pre_y_start=false,
final uLow=-0.5*bouLim,
final uHigh=0.5*bouLim)
;
Buildings.Controls.OBC.CDL.Logical.Not not1 ;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea ;
Buildings.Controls.OBC.CDL.Logical.Switch swi
;
Buildings.Controls.OBC.CDL.Logical.Switch swi1
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant con(
final k=false)
if not have_winSen
;
equation
connect(cooDowTim, pro.u1);
connect(warUpTim, pro1.u1);
connect(booToRea.y, pro.u2);
connect(booToRea.y, pro1.u2);
connect(TZonHeaSetOcc, add.u1);
connect(TZonMin, add.u2);
connect(add.y, hys.u);
connect(TZonCooSetOcc, add1.u1);
connect(TZonMax, add1.u2);
connect(add1.y, hys1.u);
connect(uWinSta, not1.u);
connect(uWinSta, swi.u2);
connect(TZonHeaSetUno, swi.u1);
connect(TZon, swi.u3);
connect(swi.y, add2.u1);
connect(TZonHeaSetUno, add2.u2);
connect(add2.y, hys2.u);
connect(TZonMin, add3.u2);
connect(TZonHeaSetUno, add3.u1);
connect(add3.y, hys3.u);
connect(uWinSta, swi1.u2);
connect(TZonCooSetUno, swi1.u1);
connect(TZon, swi1.u3);
connect(swi1.y, add5.u1);
connect(TZonCooSetUno, add5.u2);
connect(add5.y, hys5.u);
connect(TZonMax, add4.u1);
connect(TZonCooSetUno, add4.u2);
connect(add4.y, hys4.u);
connect(not1.y, booToRea.u);
connect(hys.y, yOccHeaHigMin);
connect(hys1.y, yMaxHigOccCoo);
connect(pro.y, yCooTim);
connect(pro1.y, yWarTim);
connect(hys2.y, yLowUnoHea);
connect(hys3.y,yUnoHeaHigMin);
connect(hys4.y, yMaxHigUnoCoo);
connect(hys5.y, yHigUnoCoo);
connect(con.y, not1.u);
connect(con.y, swi.u2);
connect(con.y, swi1.u2);
end ZoneStatus;