Sequences for VAV reheat terminal unit
Information
This package contains sequences for VAV reheat terminal unit. They are created
according to ASHRAE Guideline 36, Part 5.E.
Package Content
Name |
Description |
DamperValves
|
Output signals for controlling VAV reheat box damper and valve position |
SystemRequests
|
Output system requests for VAV reheat terminal unit control |
SetPoints
|
Output setpoints for terminal unit control |
Validation
|
Collection of validation models |
Output signals for controlling VAV reheat box damper and valve position
Information
This sequence sets the damper and valve position for VAV reheat terminal unit.
The implementation is according to ASHRAE Guideline 36 (G36), PART 5.E.6. The
calculation is done following the steps below.
-
When the zone state is cooling (uCoo>0
), then the cooling loop output
uCoo
shall be mapped to the airflow
setpoint from the cooling minimum VActCooMin_flow
to the cooling maximum
VActCooMax_flow
airflow setpoints. The hot water valve is closed (yHeaVal=0
)
unless the discharge air temperature TDis
is below the minimum
setpoint (10 °C).
-
If supply air temperature TSup
from the AHU is greater than
room temperature TZon
, cooling supply airflow setpoint shall be
no higher than the minimum.
-
When the zone state is Deadband (uCoo=0
and uHea=0
), then
the active airflow setpoint shall be the minimum airflow setpoint VActMin_flow
.
Hot water valve is closed unless the discharge air temperature is below the minimum
setpoint (10 °C).
-
When the zone state is Heating (uHea>0
), then
the heating loop shall maintain space temperature at the heating setpoint
as follows:
- From 0-50%, the heating loop output
uHea
shall reset the
discharge temperature setpoint from current AHU SAT setpoint TSup
to a maximum of dTDisZonSetMax
above space temperature setpoint. The airflow
setpoint shall be the heating minimum VActHeaMin_flow
.
- From 50-100%, if the discharge air temperature
TDis
is
greater than room temperature plus 2.8 Kelvin, the heating loop output uHea
shall reset the airflow setpoint from the heating minimum airflow setpoint
VActHeaMin_flow
to the heating maximum airflow setpoint
VActHeaMax_flow
.
-
The hot water valve (or modulating electric heating coil) shall be modulated
to maintain the discharge temperature at setpoint.
-
The VAV damper shall be modulated by a control loop to maintain the measured
airflow at the active setpoint.
The sequences of controlling damper and valve position for VAV reheat terminal
unit are described in the following figure below.
Parameters
Type | Name | Default | Description |
Real | dTDisZonSetMax | 11 | Zone maximum discharge air temperature above heating setpoint [K] |
Real | TDisMin | 283.15 | Lowest discharge air temperature [K] |
Valve |
SimpleController | controllerTypeVal | Buildings.Controls.OBC.CDL.T... | Type of controller |
Real | kVal | 0.5 | Gain of controller for valve control [1/K] |
Real | TiVal | 300 | Time constant of integrator block for valve control [s] |
Real | TdVal | 0.1 | Time constant of derivative block for valve control [s] |
Damper |
Boolean | have_pressureIndependentDamper | true | True: the VAV damper is pressure independent (with built-in flow controller) |
SimpleController | controllerTypeDam | Buildings.Controls.OBC.CDL.T... | Type of controller |
Real | kDam | 0.5 | Gain of controller for damper control [1] |
Real | TiDam | 300 | Time constant of integrator block for damper control [s] |
Real | TdDam | 0.1 | Time constant of derivative block for damper control [s] |
Real | V_flow_nominal | | Nominal volume flow rate, used to normalize control error [m3/s] |
Connectors
Type | Name | Description |
input RealInput | uHea | Heating control signal [1] |
input RealInput | uCoo | Cooling control signal [1] |
input RealInput | VActCooMax_flow | Active cooling maximum airflow rate [m3/s] |
input RealInput | VActCooMin_flow | Active cooling minimum airflow rate [m3/s] |
input RealInput | VActMin_flow | Active minimum airflow rate [m3/s] |
input RealInput | VActHeaMin_flow | Active heating minimum airflow rate [m3/s] |
input RealInput | VActHeaMax_flow | Active heating maximum airflow rate [m3/s] |
input RealInput | VDis_flow | Measured discharge airflow rate airflow rate [m3/s] |
input RealInput | TSup | Supply air temperature from central air handler [K] |
input RealInput | THeaSet | Zone heating setpoint temperature [K] |
input RealInput | TZon | Measured zone temperature [K] |
input RealInput | TDis | Measured discharge air temperature [K] |
input IntegerInput | uOpeMod | Zone operation mode |
output RealOutput | yDam | Signal for VAV damper [1] |
output RealOutput | yHeaVal | Reheater valve position [1] |
output RealOutput | VDisSet_flow | Discharge airflow setpoint [m3/s] |
output RealOutput | TDisHeaSet | Discharge airflow setpoint temperature for heating [K] |
Modelica definition
block DamperValves
parameter Real dTDisZonSetMax(
final unit="K",
final displayUnit="K",
final quantity="TemperatureDifference")=11
;
parameter Real TDisMin(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")=283.15
;
parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerTypeVal=
Buildings.Controls.OBC.CDL.Types.SimpleController.PI
;
parameter Real kVal(
final unit="1/K")=0.5
;
parameter Real TiVal(
final unit="s",
final quantity="Time")=300
;
parameter Real TdVal(
final unit="s",
final quantity="Time")=0.1
;
parameter Boolean have_pressureIndependentDamper = true
;
parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerTypeDam=
Buildings.Controls.OBC.CDL.Types.SimpleController.PI
;
parameter Real kDam(
final unit="1")=0.5
;
parameter Real TiDam(
final unit="s",
final quantity="Time")=300
;
parameter Real TdDam(
final unit="s",
final quantity="Time")=0.1
;
parameter Real V_flow_nominal(
final unit="m3/s",
final quantity="VolumeFlowRate",
final min=1E-10)
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uHea(
final min=0,
final max=1,
final unit="1")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uCoo(
final min=0,
final max=1,
final unit="1")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput VActCooMax_flow(
final min=0,
final unit="m3/s",
final quantity="VolumeFlowRate")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput VActCooMin_flow(
final min=0,
final unit="m3/s",
final quantity="VolumeFlowRate")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput VActMin_flow(
final min=0,
final unit="m3/s",
final quantity="VolumeFlowRate")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput VActHeaMin_flow(
final min=0,
final unit="m3/s",
final quantity="VolumeFlowRate")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput VActHeaMax_flow(
final min=0,
final unit="m3/s",
final quantity="VolumeFlowRate")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput VDis_flow(
final min=0,
final unit="m3/s",
final quantity="VolumeFlowRate")
if not have_pressureIndependentDamper
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TSup(
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.RealInput TZon(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TDis(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uOpeMod
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yDam(
final min=0,
final max=1,
final unit="1") ;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yHeaVal(
final min=0,
final max=1,
final unit="1")
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput VDisSet_flow(
final min=0,
final unit="m3/s",
final quantity="VolumeFlowRate") ;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput TDisHeaSet(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Logical.Not not1 ;
Buildings.Controls.OBC.CDL.Logical.Not not2 ;
Buildings.Controls.OBC.CDL.Logical.Not not4 ;
Buildings.Controls.OBC.CDL.Logical.And and2
;
Buildings.Controls.OBC.CDL.Logical.And and4 ;
Buildings.Controls.OBC.CDL.Reals.Line lin
;
Buildings.Controls.OBC.CDL.Reals.Line conTDisHeaSet
;
Buildings.Controls.OBC.CDL.Reals.Line lin3
;
Buildings.Controls.OBC.CDL.Reals.PIDWithReset conVal(
final controllerType=controllerTypeVal,
final k=kVal,
final Ti=TiVal,
final Td=TdVal,
final yMax=1,
final yMin=0,
u_s(
final unit="K", displayUnit="degC"),
u_m(
final unit="K", displayUnit="degC"))
;
Buildings.Controls.OBC.CDL.Reals.PIDWithReset conDam(
final controllerType=controllerTypeDam,
final k=kDam,
final Ti=TiDam,
final Td=TdDam,
final yMax=1,
final yMin=0,
final y_reset=0)
if not have_pressureIndependentDamper
;
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 swi4
;
Buildings.Controls.OBC.CDL.Reals.Switch swi5 ;
protected
Buildings.Controls.OBC.CDL.Reals.Sources.Constant conZer(
final k=0) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant conZer1(
final k=0) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant conZer2(
final k=0) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant conZer3(
final k=0) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant conZer6(
final k=0) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant conOne(
final k=1) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant conOne2(
final k=1) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant conHal(
final k=0.5) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant conHal1(
final k=0.5) ;
Buildings.Controls.OBC.CDL.Reals.AddParameter addPar(
final p=dTDisZonSetMax)
;
Buildings.Controls.OBC.CDL.Reals.AddParameter addPar1(
final p=2.8)
;
Buildings.Controls.OBC.CDL.Reals.Hysteresis hys2(
final uHigh=0.05,
final uLow=0.01)
;
Buildings.Controls.OBC.CDL.Reals.Hysteresis hys3(
final uHigh=0.05,
final uLow=0.01)
;
Buildings.Controls.OBC.CDL.Reals.Hysteresis hys4(
final uLow=TDisMin - 0.1,
final uHigh=TDisMin + 0.1)
;
Buildings.Controls.OBC.CDL.Reals.Hysteresis hys6(
final uLow=-0.1,
final uHigh=0.1)
;
Buildings.Controls.OBC.CDL.Reals.Hysteresis hys7(
final uLow=-0.1,
final uHigh=0.1)
;
Buildings.Controls.OBC.CDL.Reals.Subtract sub1
;
Buildings.Controls.OBC.CDL.Reals.Subtract sub2
;
Buildings.Controls.OBC.CDL.Logical.TrueHold truHol2(duration=600)
;
Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel3(delayTime=600)
;
Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel4(delayTime=600)
;
Buildings.Controls.OBC.CDL.Integers.Equal isUno ;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant unOcc(
final k=Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.unoccupied)
;
Buildings.Controls.OBC.CDL.Reals.Switch watValPosUno ;
Buildings.Controls.OBC.CDL.Reals.Switch damPosUno ;
Buildings.Controls.OBC.CDL.Logical.Not not5 ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant lowDisAirTem(
final k=TDisMin)
;
Buildings.Controls.OBC.CDL.Reals.Switch swi6
;
Buildings.Controls.OBC.CDL.Logical.Or or2 ;
Buildings.Controls.OBC.CDL.Logical.Not not3 ;
Buildings.Controls.OBC.CDL.Reals.Switch swi3
;
Buildings.Controls.OBC.CDL.Logical.Not not6 ;
Buildings.Controls.OBC.CDL.Logical.And and1
;
Buildings.Controls.OBC.CDL.Reals.Add add3 ;
Buildings.Controls.OBC.CDL.Reals.Add add4 ;
Buildings.Controls.OBC.CDL.Reals.Divide VDis_flowNor
if not have_pressureIndependentDamper
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant nomFlow(
final k=V_flow_nominal)
;
Buildings.Controls.OBC.CDL.Reals.Divide VDisSet_flowNor
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai(
final k=1)
if have_pressureIndependentDamper
;
equation
connect(uCoo, lin.u);
connect(conZer.y, lin.x1);
connect(VActCooMin_flow, lin.f1);
connect(conOne.y, lin.x2);
connect(VActCooMax_flow, lin.f2);
connect(uCoo, hys2.u);
connect(conZer1.y, swi.u3);
connect(VActMin_flow, swi1.u1);
connect(and2.y, swi1.u2);
connect(conZer2.y, swi1.u3);
connect(uHea, hys3.u);
connect(conZer3.y, conTDisHeaSet.x1);
connect(TSup, conTDisHeaSet.f1);
connect(uHea, conTDisHeaSet.u);
connect(conHal.y, conTDisHeaSet.x2);
connect(addPar.y, conTDisHeaSet.f2);
connect(THeaSet, addPar.u);
connect(uHea, lin3.u);
connect(conHal1.y, lin3.x1);
connect(conOne2.y, lin3.x2);
connect(VActHeaMax_flow, lin3.f2);
connect(VActHeaMin_flow, lin3.f1);
connect(TZon, addPar1.u);
connect(lin3.y, swi2.u1);
connect(VActHeaMin_flow, swi2.u3);
connect(TDis, hys4.u);
connect(swi2.y, swi4.u1);
connect(conZer6.y, swi4.u3);
connect(VActMin_flow, swi5.u1);
connect(and4.y, swi5.u2);
connect(lin.y, swi5.u3);
connect(swi5.y, swi.u1);
connect(hys4.y, not4.u);
connect(TSup, sub2.u1);
connect(TZon, sub2.u2);
connect(sub2.y, hys6.u);
connect(hys6.y, and4.u2);
connect(conTDisHeaSet.y, sub1.u1);
connect(addPar1.y, sub1.u2);
connect(sub1.y, hys7.u);
connect(conTDisHeaSet.y, TDisHeaSet);
connect(hys3.y, truHol2.u);
connect(truHol2.y, swi4.u2);
connect(hys2.y, truDel4.u);
connect(truDel4.y, and4.u1);
connect(truDel4.y, swi.u2);
connect(truHol2.y, not2.u);
connect(truDel4.y, not1.u);
connect(not1.y, and2.u1);
connect(not2.y, and2.u2);
connect(conVal.u_m, TDis);
connect(hys7.y, swi2.u2);
connect(unOcc.y, isUno.u1);
connect(isUno.u2, uOpeMod);
connect(isUno.y, watValPosUno.u2);
connect(conZer2.y, watValPosUno.u1);
connect(watValPosUno.y, yHeaVal);
connect(conZer2.y, damPosUno.u1);
connect(conDam.y, damPosUno.u3);
connect(damPosUno.y, yDam);
connect(isUno.y, damPosUno.u2);
connect(isUno.y, not5.u);
connect(not5.y, conDam.trigger);
connect(truHol2.y, or2.u2);
connect(truDel3.y, not3.u);
connect(not3.y, or2.u1);
connect(or2.y, swi6.u2);
connect(conTDisHeaSet.y, swi6.u1);
connect(swi6.u3, lowDisAirTem.y);
connect(swi3.y, watValPosUno.u3);
connect(truHol2.y, not6.u);
connect(not6.y, and1.u2);
connect(and1.y, swi3.u2);
connect(conVal.y, swi3.u3);
connect(swi3.u1, conZer2.y);
connect(not3.y, and1.u1);
connect(not4.y, truDel3.u);
connect(not5.y, conVal.trigger);
connect(swi6.y, conVal.u_s);
connect(swi1.y, add4.u1);
connect(swi4.y, add4.u2);
connect(swi.y, add3.u1);
connect(add4.y, add3.u2);
connect(add3.y, VDisSet_flow);
connect(VDis_flow, VDis_flowNor.u1);
connect(nomFlow.y, VDis_flowNor.u2);
connect(VDis_flowNor.y, conDam.u_m);
connect(nomFlow.y, VDisSet_flowNor.u2);
connect(add3.y, VDisSet_flowNor.u1);
connect(VDisSet_flowNor.y, conDam.u_s);
connect(VDisSet_flowNor.y, gai.u);
connect(gai.y, damPosUno.u3);
end DamperValves;
Output system requests for VAV reheat terminal unit control
Information
This sequence outputs the system reset requests, i.e.,
-
the cooling supply air temperature
reset requests
yZonTemResReq
,
-
the static pressure reset requests
yZonPreResReq
,
-
the hot water reset requests
yHeaValResReq
, and
-
the boiler plant reset requests
yHeaPlaReq
.
The calculations are according to ASHRAE
Guideline 36 (G36), PART 5.E.9, in the steps shown below.
a. Cooling SAT reset requests yZonTemResReq
-
If the zone temperature
TZon
exceeds the zone cooling setpoint
TZonCooSet
by 2.8 °C (5 °F)) for 2 minutes and after suppression
period due to setpoint change per G36 Part 5.A.20, send 3 requests
(yZonTemResReq=3
).
-
Else if the zone temperature
TZon
exceeds the zone cooling setpoint
TZonCooSet
by 1.7 °C (3 °F) for 2 minutes and after suppression
period due to setpoint change per G36 Part 5.A.20, send 2 requests
(yZonTemResReq=3
).
-
Else if the cooling loop
uCoo
is greater than 95%, send 1 request
(yZonTemResReq=1
) until uCoo
is less than 85%.
-
Else if
uCoo
is less than 95%, send 0 request (yZonTemResReq=0
).
b. Static pressure reset requests yZonPreResReq
-
If the measured airflow
VDis_flow
is less than 50% of setpoint
VDisSet_flow
while it is greater than zero for 1 minute, send 3 requests
(yZonPreResReq=3
).
-
Else if the measured airflow
VDis_flow
is less than 70% of setpoint
VDisSet_flow
while it is greater than zero for 1 minute, send 2 requests
(yZonPreResReq=2
).
-
Else if the damper position
uDam
is greater than 95%, send 1 request
(yZonPreResReq=1
) until uDam
is less than 85%.
-
Else if
uDam
is less than 95%, send 0 request (yZonPreResReq=0
).
c. If there is a hot water coil (have_heaWatCoi=true
),
hot water reset requests yHeaValResReq
-
If the discharge air temperature
TDis
is 17 °C (30 °F)
less than the setpoint TDisHeaSet
for 5 minutes, send 3 requests
(yHeaValResReq=3
).
-
Else if the discharge air temperature
TDis
is 8.3 °C (15 °F)
less than the setpoint TDisHeaSet
for 5 minutes, send 2 requests
(yHeaValResReq=2
).
-
Else if the hot water valve position
uHeaVal
is greater than 95%, send 1 request
(yHeaValResReq=1
) until uHeaVal
is less than 85%.
-
Else if
uHeaVal
is less than 95%, send 0 request (yHeaValResReq=0
).
d. If there is hot water coil (have_heaWatCoi=true
) and a boiler plant
(have_boiPla=true
), send the boiler plant that serves the zone a boiler
plant requests yHeaPlaReq
as follows:
-
If the hot water valve position
uHeaVal
is greater than 95%, send 1 request
(yHeaPlaReq=1
) until uHeaVal
is less than 10%.
-
Else if
uHeaVal
is less than 95%, send 0 request (yHeaPlaReq=0
).
Implementation
Some input signals are time sampled, because the output that is generated
from these inputs are used in the trim and respond logic, which
is also time sampled. However, signals that use a delay are not
sampled, as sampling were to change the dynamic response.
Parameters
Type | Name | Default | Description |
Real | samplePeriod | 120 | Sample period of component, set to the same value as the trim and respond that process yPreSetReq [s] |
Boolean | have_heaWatCoi | | Flag, true if there is a hot water coil |
Boolean | have_heaPla | | Flag, true if there is a boiler plant |
Real | errTZonCoo_1 | 2.8 | Limit value of difference between zone temperature and cooling setpoint
for generating 3 cooling SAT reset requests [K] |
Real | errTZonCoo_2 | 1.7 | Limit value of difference between zone temperature and cooling setpoint
for generating 2 cooling SAT reset requests [K] |
Real | errTDis_1 | 17 | Limit value of difference between discharge air temperature and its setpoint
for generating 3 hot water reset requests [K] |
Real | errTDis_2 | 8.3 | Limit value of difference between discharge air temperature and its setpoint
for generating 2 hot water reset requests [K] |
Duration times |
Real | durTimTem | 120 | Duration time of zone temperature exceeds setpoint [s] |
Real | durTimFlo | 60 | Duration time of airflow rate less than setpoint [s] |
Real | durTimDisAir | 300 | Duration time of discharge air temperature is less than setpoint [s] |
Connectors
Type | Name | Description |
input RealInput | TZon | Zone temperature [K] |
input RealInput | TZonCooSet | Zone cooling setpoint temperature [K] |
input RealInput | uCoo | Cooling loop signal [1] |
input RealInput | VDis_flow | Measured discharge airflow rate [m3/s] |
input RealInput | VDisSet_flow | Discharge airflow rate setpoint [m3/s] |
input RealInput | yDam_actual | Actual damper position [1] |
input RealInput | TDisHeaSet | Discharge airflow setpoint temperature for heating [K] |
input RealInput | TDis | Measured discharge airflow temperature [K] |
input RealInput | uHeaVal | Heating valve position [1] |
output IntegerOutput | yZonPreResReq | Zone static pressure reset requests |
output IntegerOutput | yZonTemResReq | Zone cooling supply air temperature reset request |
output IntegerOutput | yHeaValResReq | Hot water reset requests |
output IntegerOutput | yHeaPlaReq | Heating plant request |
Modelica definition
block SystemRequests
parameter Real samplePeriod(
final unit="s",
final quantity="Time")=120
;
parameter Boolean have_heaWatCoi
;
parameter Boolean have_heaPla ;
parameter Real errTZonCoo_1(
final unit="K",
final displayUnit="K",
final quantity="TemperatureDifference")=2.8
;
parameter Real errTZonCoo_2(
final unit="K",
final displayUnit="K",
final quantity="TemperatureDifference")=1.7
;
parameter Real errTDis_1(
final unit="K",
final displayUnit="K",
final quantity="TemperatureDifference")=17
;
parameter Real errTDis_2(
final unit="K",
final displayUnit="K",
final quantity="TemperatureDifference")=8.3
;
parameter Real durTimTem(
final unit="s",
final quantity="Time")=120
;
parameter Real durTimFlo(
final unit="s",
final quantity="Time")=60
;
parameter Real durTimDisAir(
final unit="s",
final quantity="Time")=300
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TZon(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TZonCooSet(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uCoo(
final min=0,
final max=1,
final unit="1")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput VDis_flow(
final min=0,
final unit="m3/s",
final quantity="VolumeFlowRate") ;
Buildings.Controls.OBC.CDL.Interfaces.RealInput VDisSet_flow(
final min=0,
final unit="m3/s",
quantity="VolumeFlowRate")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput yDam_actual(
final min=0,
final max=1,
final unit="1") ;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TDisHeaSet(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
if have_heaWatCoi
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TDis(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
if have_heaWatCoi
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uHeaVal(
final min=0,
final max=1,
final unit="1")
if have_heaWatCoi ;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yZonPreResReq
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yZonTemResReq
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yHeaValResReq
if have_heaWatCoi
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yHeaPlaReq
if (have_heaWatCoi
and have_heaPla)
;
Buildings.Controls.OBC.CDL.Reals.Hysteresis hys(
final uLow=errTZonCoo_1 - 0.1,
final uHigh=errTZonCoo_1 + 0.1)
;
Buildings.Controls.OBC.CDL.Reals.Hysteresis hys3(
final uLow=errTZonCoo_2 - 0.1,
final uHigh=errTZonCoo_2 + 0.1)
;
Buildings.Controls.OBC.CDL.Reals.Hysteresis hys4(
final uLow=0.85,
final uHigh=0.95)
;
Buildings.Controls.OBC.CDL.Reals.Hysteresis hys5(
final uLow=0.85,
final uHigh=0.95)
;
Buildings.Controls.OBC.CDL.Reals.Hysteresis hys7(
final uHigh=0.01,
final uLow=0.005)
;
Buildings.Controls.OBC.CDL.Reals.Hysteresis hys8(
final uLow=-0.1,
final uHigh=0.1)
if have_heaWatCoi
;
Buildings.Controls.OBC.CDL.Reals.Hysteresis hys9(
final uLow=-0.1,
final uHigh=0.1)
if have_heaWatCoi
;
Buildings.Controls.OBC.CDL.Reals.Hysteresis hys10(
final uLow=0.85,
final uHigh=0.95)
if have_heaWatCoi
;
Buildings.Controls.OBC.CDL.Reals.Hysteresis hys11(
final uHigh=0.95,
final uLow=0.1)
if (have_heaWatCoi
and have_heaPla)
;
protected
Buildings.Controls.OBC.CDL.Discrete.Sampler samTZonCooSet(
final samplePeriod=samplePeriod)
;
Buildings.Controls.OBC.CDL.Discrete.UnitDelay uniDel(
final samplePeriod=samplePeriod)
;
Buildings.Controls.OBC.CDL.Reals.Abs abs ;
Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler triSam
;
Buildings.Controls.OBC.CDL.Logical.Edge edg ;
Buildings.Controls.OBC.CDL.Logical.Latch lat ;
Buildings.Controls.OBC.CDL.Logical.Latch lat1 ;
Buildings.Controls.OBC.CDL.Logical.Timer tim ;
Buildings.Controls.OBC.CDL.Reals.Greater gre1
;
Buildings.Controls.OBC.CDL.Reals.Hysteresis hys2(
final uLow=0.05,
final uHigh=0.15)
;
Buildings.Controls.OBC.CDL.Reals.Min supTim ;
Buildings.Controls.OBC.CDL.Reals.Sources.CivilTime modTim
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai(
final k=540)
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai1(
final k=0.5)
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai2(
final k=0.7)
;
Buildings.Controls.OBC.CDL.Reals.Subtract sub1
;
Buildings.Controls.OBC.CDL.Reals.Subtract sub2
;
Buildings.Controls.OBC.CDL.Reals.Subtract sub3
;
Buildings.Controls.OBC.CDL.Reals.Subtract sub6
if have_heaWatCoi
;
Buildings.Controls.OBC.CDL.Reals.Subtract sub7
if have_heaWatCoi
;
Buildings.Controls.OBC.CDL.Reals.AddParameter addPar(
final p=errTDis_1)
if have_heaWatCoi
;
Buildings.Controls.OBC.CDL.Reals.AddParameter addPar1(
final p=errTDis_2)
if have_heaWatCoi
;
Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt ;
Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt1 ;
Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt2
if have_heaWatCoi
;
Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt3
if (have_heaWatCoi
and
have_heaPla)
;
Buildings.Controls.OBC.CDL.Logical.And and1 ;
Buildings.Controls.OBC.CDL.Logical.And and2 ;
Buildings.Controls.OBC.CDL.Logical.And and3 ;
Buildings.Controls.OBC.CDL.Logical.And and4 ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant con(
final k=samplePeriod) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant conZer(
final k=0.0)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant thrCooResReq(
final k=
3.0) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant twoCooResReq(
final k=
2.0) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant oneCooResReq(
final k=1.0)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant zerCooReq(
final k=0.0)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant thrPreResReq(
final k=
3.0) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant twoPreResReq(
final k=
2.0) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant zerPreResReq(
final k=
0.0) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant onePreResReq(
final k=
1.0) ;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant thrHeaResReq(
final k=3)
if have_heaWatCoi
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant twoHeaResReq(
final k=2)
if have_heaWatCoi
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant oneHeaResReq(
final k=
1.0)
if have_heaWatCoi
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant zerHeaResReq(
final k=
0.0)
if have_heaWatCoi
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant zerBoiPlaReq(
final k=
0.0)
if (have_heaWatCoi
and have_heaPla)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant oneBoiPlaReq(
final k=
1.0)
if (have_heaWatCoi
and have_heaPla)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant maxSupTim(k=1800)
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant con5(k=true) ;
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 swi5 ;
Buildings.Controls.OBC.CDL.Reals.Switch swi6 ;
Buildings.Controls.OBC.CDL.Reals.Switch swi7
if have_heaWatCoi
;
Buildings.Controls.OBC.CDL.Reals.Switch swi8
if have_heaWatCoi
;
Buildings.Controls.OBC.CDL.Reals.Switch swi9
if have_heaWatCoi
;
Buildings.Controls.OBC.CDL.Reals.Switch swi10
if (have_heaWatCoi
and
have_heaPla)
;
Buildings.Controls.OBC.CDL.Logical.TrueHold truHol(duration=samplePeriod)
;
Buildings.Controls.OBC.CDL.Logical.Switch logSwi ;
Buildings.Controls.OBC.CDL.Logical.TrueDelay tim1(delayTime=durTimTem)
;
Buildings.Controls.OBC.CDL.Logical.TrueDelay tim2(delayTime=durTimTem)
;
Buildings.Controls.OBC.CDL.Logical.TrueDelay tim3(delayTime=durTimFlo)
;
Buildings.Controls.OBC.CDL.Logical.TrueDelay tim4(delayTime=durTimDisAir)
if have_heaWatCoi
;
Buildings.Controls.OBC.CDL.Logical.TrueDelay tim5(delayTime=durTimDisAir)
if have_heaWatCoi
;
Buildings.Controls.OBC.CDL.Discrete.Sampler sampler(
final samplePeriod=samplePeriod)
;
Buildings.Controls.OBC.CDL.Discrete.Sampler sampler1(
final samplePeriod=samplePeriod)
;
Buildings.Controls.OBC.CDL.Discrete.Sampler sampler2(
final samplePeriod=samplePeriod)
;
Buildings.Controls.OBC.CDL.Discrete.Sampler sampler4(
final samplePeriod=samplePeriod)
;
Buildings.Controls.OBC.CDL.Reals.Greater greVDis50
;
Buildings.Controls.OBC.CDL.Reals.Greater greVDis70
;
Buildings.Controls.OBC.CDL.Reals.Less les
;
Buildings.Controls.OBC.CDL.Logical.Not notLes
;
equation
connect(sub2.y, hys.u);
connect(TZonCooSet, samTZonCooSet.u);
connect(samTZonCooSet.y, uniDel.u);
connect(triSam.y, gai.u);
connect(hys2.y, lat.u);
connect(lat.y, tim.u);
connect(edg.y, triSam.trigger);
connect(lat.y, edg.u);
connect(edg.y, lat1.clr);
connect(modTim.y, gre1.u1);
connect(con.y, gre1.u2);
connect(gre1.y, swi.u2);
connect(sub1.y, swi.u1);
connect(conZer.y, swi.u3);
connect(swi.y, abs.u);
connect(abs.y, triSam.u);
connect(abs.y, hys2.u);
connect(and2.y, swi1.u2);
connect(thrCooResReq.y, swi1.u1);
connect(sub3.y, hys3.u);
connect(twoCooResReq.y, swi2.u1);
connect(swi2.y, swi1.u3);
connect(and1.y, swi2.u2);
connect(hys5.y, swi3.u2);
connect(oneCooResReq.y, swi3.u1);
connect(swi3.y, swi2.u3);
connect(zerCooReq.y, swi3.u3);
connect(swi1.y, reaToInt.u);
connect(reaToInt.y, yZonTemResReq);
connect(and3.y, swi4.u2);
connect(thrPreResReq.y, swi4.u1);
connect(and4.y, swi5.u2);
connect(twoPreResReq.y, swi5.u1);
connect(swi5.y, swi4.u3);
connect(hys4.y, swi6.u2);
connect(onePreResReq.y, swi6.u1);
connect(zerPreResReq.y, swi6.u3);
connect(swi6.y, swi5.u3);
connect(swi4.y, reaToInt1.u);
connect(reaToInt1.y, yZonPreResReq);
connect(TDis, addPar.u);
connect(addPar.y, sub6.u2);
connect(TDisHeaSet, sub6.u1);
connect(sub6.y, hys8.u);
connect(addPar1.y, sub7.u2);
connect(sub7.y, hys9.u);
connect(hys9.y, tim5.u);
connect(thrHeaResReq.y, swi7.u1);
connect(twoHeaResReq.y, swi8.u1);
connect(swi8.y, swi7.u3);
connect(TDis, addPar1.u);
connect(TDisHeaSet, sub7.u1);
connect(uHeaVal, hys10.u);
connect(hys10.y, swi9.u2);
connect(oneHeaResReq.y, swi9.u1);
connect(zerHeaResReq.y, swi9.u3);
connect(swi9.y, swi8.u3);
connect(swi7.y, reaToInt2.u);
connect(reaToInt2.y, yHeaValResReq);
connect(uHeaVal, hys11.u);
connect(hys11.y, swi10.u2);
connect(oneBoiPlaReq.y, swi10.u1);
connect(zerBoiPlaReq.y, swi10.u3);
connect(swi10.y, reaToInt3.u);
connect(reaToInt3.y,yHeaPlaReq);
connect(truHol.y, lat.clr);
connect(lat.y, logSwi.u2);
connect(con5.y, logSwi.u3);
connect(lat1.y, logSwi.u1);
connect(logSwi.y, and2.u1);
connect(logSwi.y, and1.u1);
connect(gai.y, supTim.u1);
connect(maxSupTim.y, supTim.u2);
connect(tim5.y, swi8.u2);
connect(hys8.y, tim4.u);
connect(tim4.y, swi7.u2);
connect(hys7.y, tim3.u);
connect(tim3.y, and3.u1);
connect(tim3.y, and4.u1);
connect(hys3.y, tim2.u);
connect(tim2.y, and1.u2);
connect(hys.y, tim1.u);
connect(tim1.y, and2.u2);
connect(sampler.u, VDisSet_flow);
connect(sampler.y, gai1.u);
connect(sampler.y, gai2.u);
connect(sampler1.u, VDis_flow);
connect(yDam_actual, sampler2.u);
connect(sampler2.y, hys4.u);
connect(uCoo, sampler4.u);
connect(sampler4.y, hys5.u);
connect(hys7.u, VDisSet_flow);
connect(greVDis50.u1, gai1.y);
connect(greVDis50.u2, sampler1.y);
connect(greVDis50.y, and3.u2);
connect(gai2.y, greVDis70.u1);
connect(sampler1.y, greVDis70.u2);
connect(greVDis70.y, and4.u2);
connect(tim.y, les.u1);
connect(supTim.y, les.u2);
connect(notLes.y, truHol.u);
connect(lat1.u, notLes.y);
connect(les.y, notLes.u);
connect(samTZonCooSet.y, sub2.u2);
connect(TZon, sub2.u1);
connect(TZon, sub3.u1);
connect(samTZonCooSet.y, sub3.u2);
connect(samTZonCooSet.y, sub1.u1);
connect(uniDel.y, sub1.u2);
end SystemRequests;