Buildings.Templates.Plants.Controls.Enabling
Plant enable/disable
Information
This package contains control sequences to enable or disable chilled water or hot water plants.
Package Content
Name | Description |
---|---|
Enable | Plant enable |
Validation | Collection of validation models |
Buildings.Templates.Plants.Controls.Enabling.Enable
Plant enable
Information
The plant is enabled when it has been disabled for at least the duration dtRun
and:
-
Number of plant requests > number of ignored requests
nReqIgn
, and -
For cooling systems: outdoor air temperature > outdoor air lockout
temperature
TOutLck
, and -
For heating systems: outdoor air temperature < outdoor air lockout
temperature
TOutLck
, and - The enable schedule is active.
The plant is disabled when it has been enabled for at least the duration
dtRun
and:
-
Number of plant requests ≤ number of ignored requests
nReqIgn
for at least the durationdtReq
, or -
For cooling systems: outdoor air temperature < outdoor air lockout
temperature
TOutLck
minus hysteresisdTOutLck
, or -
For heating systems: outdoor air temperature > outdoor air lockout
temperature
TOutLck
plus hysteresisdTOutLck
, or - The plant enable schedule is inactive.
Parameters
Type | Name | Default | Description |
---|---|---|---|
Application | typ | Type of application | |
Boolean | have_inpSch | false | Set to true to provide schedule via software input point |
Real | sch[:, 2] | [0, 1; 24*3600, 1] | Enable schedule |
Real | TOutLck | if typ == Buildings.Template... | Outdoor air lockout temperature [K] |
Real | dTOutLck | 0.5 | Hysteresis for outdoor air lockout temperature [K] |
Integer | nReqIgn | 0 | Number of ignored requests |
Real | dtRun | 15*60 | Minimum runtime of enable and disable states [s] |
Real | dtReq | 3*60 | Runtime with low number of request before disabling [s] |
Connectors
Type | Name | Description |
---|---|---|
input BooleanInput | u1Sch | System enable via schedule |
input IntegerInput | nReqPla | Number of plant requests |
input RealInput | TOut | Outdoor air temperature [K] |
output BooleanOutput | y1 | Enable command |
Modelica definition
block Enable
"Plant enable"
parameter Buildings.Templates.Plants.Controls.Types.Application typ
"Type of application";
parameter Boolean have_inpSch=false
"Set to true to provide schedule via software input point";
parameter Real sch[:, 2]=[
0, 1;
24 * 3600, 1]
"Enable schedule";
parameter Real TOutLck(
final min=100,
final unit="K")=if typ == Buildings.Templates.Plants.Controls.Types.Application.Heating
then 18 + 273.15 else 15 + 273.15
"Outdoor air lockout temperature";
parameter Real dTOutLck(
final min=0,
final unit="K")=0.5
"Hysteresis for outdoor air lockout temperature";
parameter Integer nReqIgn(
min=0)=0
"Number of ignored requests";
parameter Real dtRun(
final min=0,
final unit="s")=15 * 60
"Minimum runtime of enable and disable states";
parameter Real dtReq(
final min=0,
final unit="s")=3 * 60
"Runtime with low number of request before disabling";
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1Sch
if have_inpSch
"System enable via schedule";
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput nReqPla
"Number of plant requests";
Buildings.Controls.OBC.CDL.Interfaces.RealInput TOut(
final unit="K",
final quantity="ThermodynamicTemperature",
displayUnit="degC")
"Outdoor air temperature";
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1
"Enable command";
Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable schEna(
final table=sch,
final period=max(sch[:, 1]))
if not have_inpSch
"Enable schedule";
Buildings.Controls.OBC.CDL.Integers.GreaterThreshold greIgn(
final t=nReqIgn)
"Return true if number of requests > number of ignored requests";
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greLck(
final t=TOutLck)
if typ == Buildings.Templates.Plants.Controls.Types.Application.Cooling
"Return true if OAT > lockout temperature";
Buildings.Controls.OBC.CDL.Reals.LessThreshold lesLck(
final t=TOutLck)
if typ == Buildings.Templates.Plants.Controls.Types.Application.Heating
"Return true if OAT < lockout temperature";
Buildings.Controls.OBC.CDL.Logical.Pre preEna
"Left limit (in discrete-time) of enable signal";
Buildings.Controls.OBC.CDL.Logical.Timer timEna(
final t=dtRun)
"Return true if system has been enabled for specified duration";
Buildings.Controls.OBC.CDL.Logical.Not dis
"Return true if disabled";
Buildings.Controls.OBC.CDL.Logical.Timer runDis(
final t=dtRun)
"Return true if system has been disabled for specified duration";
Buildings.Controls.OBC.CDL.Logical.MultiAnd mulAnd(
nin=4)
"Combine enable conditions";
Buildings.Controls.OBC.CDL.Logical.MultiOr mulOr(
nin=3)
"Combine disable conditions";
Buildings.Controls.OBC.CDL.Logical.Not disSch
"Return true if disabled by schedule";
Buildings.Controls.OBC.CDL.Integers.LessEqualThreshold lowIgn(
final t=nReqIgn)
"Return true if number of requests ≤ number of ignored requests";
Buildings.Controls.OBC.CDL.Logical.Timer timLowReq(
final t=dtReq)
"Return true if low number of requests for specified duration";
Buildings.Controls.OBC.CDL.Reals.LessThreshold lowLckHys(
final t=TOutLck - dTOutLck)
if typ == Buildings.Templates.Plants.Controls.Types.Application.Cooling
"Return true if OAT < lockout temperature - hysteresis";
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greLckHys(
final t=TOutLck + dTOutLck)
if typ == Buildings.Templates.Plants.Controls.Types.Application.Heating
"Return true if OAT > lockout temperature + hysteresis";
Buildings.Controls.OBC.CDL.Logical.And andRun
"Disable conditions met AND enable minimum runtime exceeded";
Buildings.Controls.OBC.CDL.Logical.Latch lat
"Clear enable signal if disable conditions are met";
equation
connect(nReqPla, greIgn.u);
connect(TOut, greLck.u);
connect(TOut, lesLck.u);
connect(preEna.y, dis.u);
connect(dis.y, runDis.u);
connect(preEna.y, timEna.u);
connect(runDis.passed, mulAnd.u[1]);
connect(schEna.y[1], mulAnd.u[2]);
connect(u1Sch, mulAnd.u[2]);
connect(greIgn.y, mulAnd.u[3]);
connect(schEna.y[1], disSch.u);
connect(u1Sch, disSch.u);
connect(disSch.y, mulOr.u[1]);
connect(nReqPla, lowIgn.u);
connect(lowIgn.y, timLowReq.u);
connect(timLowReq.passed, mulOr.u[2]);
connect(greLck.y, mulAnd.u[4]);
connect(lesLck.y, mulAnd.u[4]);
connect(TOut, lowLckHys.u);
connect(lowLckHys.y, mulOr.u[3]);
connect(TOut, greLckHys.u);
connect(greLckHys.y, mulOr.u[3]);
connect(timEna.passed, andRun.u1);
connect(mulOr.y, andRun.u2);
connect(y1, lat.y);
connect(mulAnd.y, lat.u);
connect(andRun.y, lat.clr);
connect(y1, preEna.u);
end Enable;