Control sequences for terminal units
Information
This package contains control sequences for terminal units.
Package Content
Name |
Description |
Controller
|
Controller for room VAV box |
ModeAndSetPoints
|
Output zone setpoint with operation mode selection |
Reheat
|
Sequences for VAV reheat terminal unit |
SetPoints
|
Generic sequences of generating setpoints for terminal units control |
Validation
|
Collection of validation models |
Controller for room VAV box
Information
Controller for terminal box of VAV system with reheat according to ASHRAE
Guideline 36, Part 5.E. It outputs damper position yDam
,
hot water valve position yVal
, AHU cooling supply temperature
setpoint reset request yZonTemResReq
, and static pressure setpoint
reset request yZonPreResReq
.
The sequence consists of four subsequences.
a. Heating and cooling control loop
The subsequence is implementd according to Part 5.B.5. The measured zone
temperature TRoo
, zone setpoints temperatures TRooHeaSet
and
TRooCooSet
are inputs to the block conHeaLoo
and
conCooLoo
to generate the control loop signal.
b. Active airflow setpoint calculation
This sequence sets the active maximum and minimum airflow according to
Part 5.E.3-5. Depending on operation modes uOpeMod
, it sets the
airflow rate limits for cooling and heating supply. See
Buildings.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.Reheat.SetPoints.ActiveAirFlow.
c. Damper and valve control
This sequence sets the damper and valve position for VAV reheat terminal unit.
The implementation is according to Part 5.E.6. According to heating and cooling
control loop signal, it calculates the discharge air temperature setpoint
TDisSet
. Along with the defined maximum and minimum airflow, measured
zone temperature, the sequence outputs yDam
, yVal
,
TDisSet
and discharge airflow rate setpoint VDisSet
.
See
Buildings.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.Reheat.DamperValves.
d. System reset requests generation
According to Part 5.E.9, this sequence outputs the system reset requests, i.e.
cooling supply air temperature reset requests yZonTemResReq
,
static pressure reset requests yZonPreResReq
, hot water reset
requests yHeaValResReq
, and the boiler plant reset requests
yHeaPlaReq
. See
Buildings.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.Reheat.SystemRequests.
Parameters
Type | Name | Default | Description |
Time | samplePeriod | | Sample period of component, set to the same value as the trim and respond that process yPreSetReq [s] |
VolumeFlowRate | V_flow_nominal | | Volume flow rate of this thermal zone [m3/s] |
Area | AFlo | | Area of the zone [m2] |
Cooling loop signal |
SimpleController | controllerTypeCoo | Buildings.Controls.OBC.CDL.T... | Type of controller |
Real | kCoo | 0.1 | Gain for cooling control loop signal [1/K] |
Time | TiCoo | 900 | Time constant of integrator block for cooling control loop signal [s] |
Time | TdCoo | 0.1 | Time constant of derivative block for cooling control loop signal [s] |
Heating loop signal |
SimpleController | controllerTypeHea | Buildings.Controls.OBC.CDL.T... | Type of controller |
Real | kHea | 0.1 | Gain for heating control loop signal [1/K] |
Time | TiHea | 900 | Time constant of integrator block for heating control loop signal [s] |
Time | TdHea | 0.1 | Time constant of derivative block for heating control loop signal [s] |
Valve |
SimpleController | controllerTypeVal | Buildings.Controls.OBC.CDL.T... | Type of controller |
Real | kVal | 0.5 | Gain of controller for valve control |
Time | TiVal | 300 | Time constant of integrator block for valve control [s] |
Time | TdVal | 0.1 | Time constant of derivative block for valve control [s] |
Damper |
SimpleController | controllerTypeDam | Buildings.Controls.OBC.CDL.T... | Type of controller |
Real | kDam | 0.5 | Gain of controller for damper control [1] |
Time | TiDam | 300 | Time constant of integrator block for damper control [s] |
Time | TdDam | 0.1 | Time constant of derivative block for damper control [s] |
Airflow setpoint |
Zone sensors |
Boolean | have_occSen | false | Set to true if the zone has occupancy sensor |
Boolean | have_winSen | false | Set to true if the zone has window status sensor |
Boolean | have_CO2Sen | false | Set to true if the zone has CO2 sensor |
Nominal conditions |
VolumeFlowRate | VCooMax | V_flow_nominal | Zone maximum cooling airflow setpoint [m3/s] |
VolumeFlowRate | VMin | 0.15*V_flow_nominal | Zone minimum airflow setpoint [m3/s] |
VolumeFlowRate | VHeaMax | V_flow_nominal | Zone maximum heating airflow setpoint [m3/s] |
VolumeFlowRate | VMinCon | 0.1*V_flow_nominal | VAV box controllable minimum [m3/s] |
Real | outAirPerAre | 3e-4 | Outdoor air rate per unit area [m3/(s.m2)] |
VolumeFlowRate | outAirPerPer | 2.5e-3 | Outdoor air rate per person [m3/s] |
Real | CO2Set | 894 | CO2 setpoint in ppm |
Damper and valve |
Parameters |
TemperatureDifference | dTDisMax | 11 | Zone maximum discharge air temperature above heating setpoint [K] |
Temperature | TDisMin | 283.15 | Lowest discharge air temperature [K] |
System requests |
Parameters |
Boolean | have_heaWatCoi | true | Flag, true if there is a hot water coil |
Boolean | have_heaPla | false | Flag, true if there is a boiler plant |
TemperatureDifference | cooSetDif_1 | 2.8 | Limit value of difference between zone temperature and cooling setpoint
for generating 3 cooling SAT reset requests [K] |
TemperatureDifference | cooSetDif_2 | 1.7 | Limit value of difference between zone temperature and cooling setpoint
for generating 2 cooling SAT reset requests [K] |
TemperatureDifference | disAirSetDif_1 | 17 | Limit value of difference between discharge air temperature and its setpoint
for generating 3 hot water reset requests [K] |
TemperatureDifference | disAirSetDif_2 | 8.3 | Limit value of difference between discharge air temperature and its setpoint
for generating 2 hot water reset requests [K] |
Duration times |
Time | durTimTem | 120 | Duration time of zone temperature exceeds setpoint [s] |
Time | durTimFlo | 60 | Duration time of airflow rate less than setpoint [s] |
Time | durTimDisAir | 300 | Duration time of discharge air temperature is less than setpoint [s] |
Connectors
Type | Name | Description |
input RealInput | TRooHeaSet | Setpoint temperature for room for heating [K] |
input RealInput | TRooCooSet | Setpoint temperature for room for cooling [K] |
input RealInput | TRoo | Measured room temperature [K] |
input RealInput | TDis | Measured supply air temperature after heating coil [K] |
input RealInput | VDis | Measured discharge airflow rate [m3/s] |
input RealInput | TSupAHU | AHU supply air temperature [K] |
input RealInput | ppmCO2 | Measured CO2 concentration |
input RealInput | nOcc | Number of occupants |
input BooleanInput | uWin | Window status, true if open, false if closed |
input IntegerInput | uOpeMod | Zone operation mode |
output RealOutput | yVal | Signal for heating coil valve [1] |
output RealOutput | yDam | Signal for VAV damper [1] |
output IntegerOutput | yZonTemResReq | Zone cooling supply air temperature reset request |
output IntegerOutput | yZonPreResReq | Zone static pressure reset requests |
Modelica definition
block Controller
parameter Modelica.SIunits.Time samplePeriod
;
parameter Modelica.SIunits.VolumeFlowRate V_flow_nominal
;
parameter Modelica.SIunits.Area AFlo ;
parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerTypeCoo=
Buildings.Controls.OBC.CDL.Types.SimpleController.PI ;
parameter Real kCoo(
final unit="1/K") = 0.1
;
parameter Modelica.SIunits.Time TiCoo=900
;
parameter Modelica.SIunits.Time TdCoo=0.1
;
parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerTypeHea=
Buildings.Controls.OBC.CDL.Types.SimpleController.PI
;
parameter Real kHea(
final unit="1/K")=0.1
;
parameter Modelica.SIunits.Time TiHea=900
;
parameter Modelica.SIunits.Time TdHea=0.1
;
parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerTypeVal=
Buildings.Controls.OBC.CDL.Types.SimpleController.PI
;
parameter Real kVal=0.5
;
parameter Modelica.SIunits.Time TiVal=300
;
parameter Modelica.SIunits.Time TdVal=0.1
;
parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerTypeDam=
Buildings.Controls.OBC.CDL.Types.SimpleController.PI
;
parameter Real kDam(
final unit="1")=0.5
;
parameter Modelica.SIunits.Time TiDam=300
;
parameter Modelica.SIunits.Time TdDam=0.1
;
parameter Boolean have_occSen=false
;
parameter Boolean have_winSen=false
;
parameter Boolean have_CO2Sen=false
;
parameter Modelica.SIunits.VolumeFlowRate VCooMax=V_flow_nominal
;
parameter Modelica.SIunits.VolumeFlowRate VMin=0.15*V_flow_nominal
;
parameter Modelica.SIunits.VolumeFlowRate VHeaMax=V_flow_nominal
;
parameter Modelica.SIunits.VolumeFlowRate VMinCon=0.1*V_flow_nominal
;
parameter Real outAirPerAre(
final unit = "m3/(s.m2)")=3e-4
;
parameter Modelica.SIunits.VolumeFlowRate outAirPerPer=2.5e-3
;
parameter Real CO2Set=894 ;
parameter Modelica.SIunits.TemperatureDifference dTDisMax=11
;
parameter Modelica.SIunits.Temperature TDisMin=283.15
;
parameter Boolean have_heaWatCoi=true
;
parameter Boolean have_heaPla=false
;
parameter Modelica.SIunits.TemperatureDifference cooSetDif_1=2.8
;
parameter Modelica.SIunits.TemperatureDifference cooSetDif_2=1.7
;
parameter Modelica.SIunits.TemperatureDifference disAirSetDif_1=17
;
parameter Modelica.SIunits.TemperatureDifference disAirSetDif_2=8.3
;
parameter Modelica.SIunits.Time durTimTem=120
;
parameter Modelica.SIunits.Time durTimFlo=60
;
parameter Modelica.SIunits.Time durTimDisAir=300
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TRooHeaSet(
final quantity="ThermodynamicTemperature",
final unit = "K",
displayUnit = "degC",
min=0)
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TRooCooSet(
final quantity="ThermodynamicTemperature",
final unit = "K",
displayUnit = "degC",
min=0)
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TRoo(
final quantity="ThermodynamicTemperature",
final unit = "K",
displayUnit = "degC",
min=0)
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TDis(
final quantity="ThermodynamicTemperature",
final unit = "K",
displayUnit = "degC",
min=0)
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput VDis(
final unit="m3/s",
quantity="VolumeFlowRate")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TSupAHU(
final quantity="ThermodynamicTemperature",
final unit = "K",
displayUnit = "degC",
min=0)
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput ppmCO2
if have_CO2Sen
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput nOcc
if have_occSen
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uWin
if have_winSen
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uOpeMod
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yVal(
min=0,
max=1,
final unit="1")
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yDam(
min=0,
max=1,
final unit="1")
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yZonTemResReq
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yZonPreResReq
;
Buildings.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.Reheat.SetPoints.ActiveAirFlow
actAirSet(
final AFlo=AFlo,
final have_occSen=have_occSen,
final have_winSen=have_winSen,
final have_CO2Sen=have_CO2Sen,
final VCooMax=VCooMax,
final VMin=VMin,
final VHeaMax=VHeaMax,
final VMinCon=VMinCon,
final outAirPerAre=outAirPerAre,
final outAirPerPer=outAirPerPer,
final CO2Set=CO2Set)
;
Buildings.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.Reheat.DamperValves damVal(
final controllerTypeVal=controllerTypeVal,
final kVal=kVal,
final TiVal=TiVal,
final TdVal=TdVal,
final controllerTypeDam=controllerTypeDam,
final kDam=kDam,
final TiDam=TiDam,
final TdDam=TdDam,
final dTDisMax=dTDisMax,
final TDisMin=TDisMin,
V_flow_nominal=
max(VCooMax, VHeaMax))
;
Buildings.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.Reheat.SystemRequests sysReq(
final samplePeriod=samplePeriod,
final have_heaWatCoi=have_heaWatCoi,
final have_heaPla=have_heaPla,
final cooSetDif_1=cooSetDif_1,
final cooSetDif_2=cooSetDif_2,
final disAirSetDif_1=disAirSetDif_1,
final disAirSetDif_2=disAirSetDif_2,
final durTimTem=durTimTem,
final durTimFlo=durTimFlo,
final durTimDisAir=durTimDisAir)
;
Buildings.Controls.OBC.CDL.Continuous.LimPID conHeaLoo(
final controllerType=controllerTypeHea,
final k=kHea,
final Ti=TiHea,
final Td=TdHea,
final yMax=1,
final yMin=0,
reset=Buildings.Controls.OBC.CDL.Types.Reset.Parameter)
;
Buildings.Controls.OBC.CDL.Continuous.LimPID conCooLoo(
final controllerType=controllerTypeCoo,
final k=kCoo,
final Ti=TiCoo,
final Td=TdCoo,
final yMax=1,
final yMin=0,
reverseAction=true,
reset=Buildings.Controls.OBC.CDL.Types.Reset.Parameter)
;
protected
CDL.Integers.Equal isUnOcc ;
CDL.Integers.Sources.Constant conIntUn(
final k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.unoccupied)
;
CDL.Logical.Not isNotUn ;
equation
connect(sysReq.TCooSet, TRooCooSet);
connect(sysReq.TRoo, TRoo);
connect(sysReq.VDisSet, damVal.VDisSet);
connect(sysReq.VDis, VDis);
connect(sysReq.TDisSet, damVal.TDisSet);
connect(damVal.yDam, yDam);
connect(damVal.yHeaVal, yVal);
connect(damVal.VDis, VDis);
connect(damVal.TDis, TDis);
connect(sysReq.TDis, TDis);
connect(sysReq.uDam, damVal.yDam);
connect(damVal.yHeaVal, sysReq.uHeaVal);
connect(TRoo, damVal.TRoo);
connect(damVal.TSup, TSupAHU);
connect(actAirSet.VActCooMax, damVal.VActCooMax);
connect(actAirSet.VActCooMin, damVal.VActCooMin);
connect(actAirSet.VActMin, damVal.VActMin);
connect(actAirSet.VActHeaMin, damVal.VActHeaMin);
connect(actAirSet.VActHeaMax, damVal.VActHeaMax);
connect(damVal.THeaSet, TRooHeaSet);
connect(actAirSet.VActCooMax, damVal.VActCooMax);
connect(actAirSet.VActCooMin, damVal.VActCooMin);
connect(actAirSet.VActMin, damVal.VActMin);
connect(actAirSet.VActHeaMin, damVal.VActHeaMin);
connect(actAirSet.VActHeaMax, damVal.VActHeaMax);
connect(actAirSet.uOpeMod, uOpeMod);
connect(sysReq.yZonTemResReq, yZonTemResReq);
connect(sysReq.yZonPreResReq, yZonPreResReq);
connect(actAirSet.ppmCO2, ppmCO2);
connect(actAirSet.nOcc, nOcc);
connect(actAirSet.uWin, uWin);
connect(TRooHeaSet, conHeaLoo.u_s);
connect(TRooCooSet, conCooLoo.u_s);
connect(TRoo, conHeaLoo.u_m);
connect(TRoo, conCooLoo.u_m);
connect(conCooLoo.y, damVal.uCoo);
connect(conHeaLoo.y, damVal.uHea);
connect(conCooLoo.y, sysReq.uCoo);
connect(damVal.uOpeMod, uOpeMod);
connect(conIntUn.y, isUnOcc.u1);
connect(uOpeMod, isUnOcc.u2);
connect(isUnOcc.y, isNotUn.u);
connect(isNotUn.y, conCooLoo.trigger);
connect(isNotUn.y, conHeaLoo.trigger);
end Controller;
Output zone setpoint with operation mode selection
Information
Block that outputs zone setpoint temperature (TCooSet
, THeaSet
)
and system operation mode (yOpeMod
). When operation mode is in freeze
protection setback mode, it also outputs a level 3 freeze protection alarm
yFreProSta
. The sequences are implemented according to ASHRAE
Guideline 36, Part 5.B.3 and 5.C.6.
The sequence consists of two subsequences.
Operation mode selector
The subsequence outputs 7 types system operation mode (occupied, warmup,
cool-down, setback, freeze protection setback, setup, unoccupied) according
to current time, the time to next occupied hours tNexOcc
,
current zone temperature TZon
. See
Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.OperationMode.
Zone setpoint temperature reset
This sequence is implemented according to Part 5.B.3. It sets zone setpoint
according to the global giving setpoint, local setpoint adjustments, demand
limits adjustment, window status and occupancy stataus. See
Buildings.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.SetPoints.ZoneTemperatures.
Parameters
Type | Name | Default | Description |
Integer | numZon | | Total number of served VAV boxes |
Temperature | THeaOn | 293.15 | Heating setpoint during on [K] |
Temperature | THeaOff | 285.15 | Heating setpoint during off [K] |
Temperature | TCooOn | 297.15 | Cooling setpoint during on [K] |
Temperature | TCooOff | 303.15 | Cooling setpoint during off [K] |
Operation mode |
Parameters |
Time | preWarCooTim | 10800 | Maximum cool-down/warm-up time [s] |
TemperatureDifference | bouLim | 1.1 | Value limit to indicate the end of setback/setup mode [K] |
Temperature | freProThrVal | 277.55 | Threshold zone temperature value to activate freeze protection mode [K] |
Temperature | freProEndVal | 280.35 | Threshold zone temperature value to finish the freeze protection mode [K] |
Test setting |
Time | warCooTim | 1800 | Defined cool-down/warm-up time [s] |
Setpoint adjust |
Sensors |
Boolean | have_occSen | false | Check if the zone has occupancy sensor |
Boolean | have_winSen | false | Check if the zone has window status sensor |
Adjustable settings |
Boolean | cooAdj | false | Flag, set to true if both cooling and heating setpoint are adjustable separately |
Boolean | heaAdj | false | Flag, set to true if heating setpoint is adjustable |
Boolean | sinAdj | false | Flag, set to true if both cooling and heating setpoint are adjustable through a single common knob |
Boolean | ignDemLim | true | Flag, set to true to exempt individual zone from demand limit setpoint adjustment |
Limits |
Temperature | TCooOnMax | 300.15 | Maximum cooling setpoint during on [K] |
Temperature | TCooOnMin | 295.15 | Minimum cooling setpoint during on [K] |
Temperature | THeaOnMax | 295.15 | Maximum heating setpoint during on [K] |
Temperature | THeaOnMin | 291.15 | Minimum heating setpoint during on [K] |
Temperature | TCooWinOpe | 322.15 | Cooling setpoint when window is open [K] |
Temperature | THeaWinOpe | 277.15 | Heating setpoint when window is open [K] |
Demands settings |
TemperatureDifference | incSetDem_1 | 0.56 | Cooling setpoint increase value when cooling demand limit level 1 is imposed [K] |
TemperatureDifference | incSetDem_2 | 1.1 | Cooling setpoint increase value when cooling demand limit level 2 is imposed [K] |
TemperatureDifference | incSetDem_3 | 2.2 | Cooling setpoint increase value when cooling demand limit level 3 is imposed [K] |
TemperatureDifference | decSetDem_1 | 0.56 | Heating setpoint decrease value when heating demand limit level 1 is imposed [K] |
TemperatureDifference | decSetDem_2 | 1.1 | Heating setpoint decrease value when heating demand limit level 2 is imposed [K] |
TemperatureDifference | decSetDem_3 | 2.2 | Heating setpoint decrease value when heating demand limit level 3 is imposed [K] |
Integer | cooDemLimLevCon | Buildings.Controls.OBC.ASHRA... | Cooling demand limit level |
Integer | heaDemLimLevCon | Buildings.Controls.OBC.ASHRA... | Heating demand limit level |
Boolean | winStaCon | false | Window status, set to true if window is open |
Connectors
Type | Name | Description |
input RealInput | TZon[numZon] | Measured zone temperatures [K] |
input RealInput | tNexOcc | Time to next occupied period [s] |
input RealInput | setAdj[numZon] | Setpoint adjustment value [K] |
input RealInput | heaSetAdj[numZon] | Heating setpoint adjustment value [K] |
input BooleanInput | uOcc | Current occupancy period, true if it is in occupant period |
input BooleanInput | uOccSen[numZon] | Occupancy sensor (occupied=true, unoccupied=false) |
input BooleanInput | uWinSta[numZon] | Window status (open=true, close=false) |
output RealOutput | TCooSet[numZon] | Cooling setpoint temperature [K] |
output RealOutput | THeaSet[numZon] | Heating setpoint temperature [K] |
output IntegerOutput | yOpeMod | Operation mode |
Modelica definition
block ModeAndSetPoints
parameter Integer numZon(min=2)
;
parameter Modelica.SIunits.Temperature THeaOn=293.15
;
parameter Modelica.SIunits.Temperature THeaOff=285.15
;
parameter Modelica.SIunits.Temperature TCooOn=297.15
;
parameter Modelica.SIunits.Temperature TCooOff=303.15
;
parameter Modelica.SIunits.Time preWarCooTim=10800
;
parameter Modelica.SIunits.TemperatureDifference bouLim=1.1
;
parameter Modelica.SIunits.Temperature freProThrVal=277.55
;
parameter Modelica.SIunits.Temperature freProEndVal=280.35
;
parameter Modelica.SIunits.Time warCooTim=1800
;
parameter Boolean have_occSen=false
;
parameter Boolean have_winSen=false
;
parameter Boolean cooAdj=false
;
parameter Boolean heaAdj=false
;
parameter Boolean sinAdj=false
;
parameter Boolean ignDemLim=true
;
parameter Modelica.SIunits.Temperature TCooOnMax=300.15
;
parameter Modelica.SIunits.Temperature TCooOnMin=295.15
;
parameter Modelica.SIunits.Temperature THeaOnMax=295.15
;
parameter Modelica.SIunits.Temperature THeaOnMin=291.15
;
parameter Modelica.SIunits.Temperature TCooWinOpe=322.15
;
parameter Modelica.SIunits.Temperature THeaWinOpe=277.15
;
parameter Modelica.SIunits.TemperatureDifference incSetDem_1=0.56
;
parameter Modelica.SIunits.TemperatureDifference incSetDem_2=1.1
;
parameter Modelica.SIunits.TemperatureDifference incSetDem_3=2.2
;
parameter Modelica.SIunits.TemperatureDifference decSetDem_1=0.56
;
parameter Modelica.SIunits.TemperatureDifference decSetDem_2=1.1
;
parameter Modelica.SIunits.TemperatureDifference decSetDem_3=2.2
;
parameter Integer cooDemLimLevCon=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.DemandLimitLevels.cooling0
;
parameter Integer heaDemLimLevCon=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.DemandLimitLevels.heating0
;
parameter Boolean winStaCon=false
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TZon[numZon](
each final unit="K",
each quantity="ThermodynamicTemperature")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput tNexOcc(
final unit="s",
quantity="Time")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput setAdj[numZon](
each final unit="K",
each quantity="ThermodynamicTemperature")
if (cooAdj
or sinAdj)
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput heaSetAdj[numZon](
each final unit="K",
each quantity="ThermodynamicTemperature")
if heaAdj
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uOcc
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uOccSen[numZon]
if have_occSen
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uWinSta[numZon]
if have_winSen
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput TCooSet[numZon](
each final unit="K",
each quantity="ThermodynamicTemperature") ;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput THeaSet[numZon](
each final unit="K",
each quantity="ThermodynamicTemperature") ;
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yOpeMod
;
Buildings.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.SetPoints.ZoneTemperatures
TSetZon[numZon](
each final have_occSen=have_occSen,
each final have_winSen=have_winSen,
each final cooAdj=cooAdj,
each final heaAdj=heaAdj,
each final sinAdj=sinAdj,
each final ignDemLim=ignDemLim,
each final TCooOnMax=TCooOnMax,
each final TCooOnMin=TCooOnMin,
each final THeaOnMax=THeaOnMax,
each final THeaOnMin=THeaOnMin,
each final TCooWinOpe=TCooWinOpe,
each final THeaWinOpe=THeaWinOpe,
each final incSetDem_1=incSetDem_1,
each final incSetDem_2=incSetDem_2,
each final incSetDem_3=incSetDem_3,
each final decSetDem_1=decSetDem_1,
each final decSetDem_2=decSetDem_2,
each final decSetDem_3=decSetDem_3)
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant cooDemLimLev[numZon](
each k=cooDemLimLevCon)
;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant heaDemLimLev[numZon](
each k=heaDemLimLevCon) ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TSetRooHeaOn(
final k=THeaOn)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TSetRooHeaOff(
final k=THeaOff)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TSetRooCooOn(
final k=TCooOn)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TSetRooCooOff(
final k=TCooOff)
;
Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.OperationMode opeModSel(
final numZon=numZon,
final preWarCooTim=preWarCooTim,
final bouLim=bouLim,
final freProThrVal=freProThrVal,
final freProEndVal=freProEndVal)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant tCooDowHeaUp[numZon](
each final k=warCooTim)
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant cloWin[numZon](
each k=false)
if not have_winSen
;
protected
Buildings.Controls.OBC.CDL.Routing.RealReplicator reaRep(nout=numZon)
;
Buildings.Controls.OBC.CDL.Routing.RealReplicator reaRep1(nout=numZon)
;
Buildings.Controls.OBC.CDL.Routing.RealReplicator reaRep2(nout=numZon)
;
Buildings.Controls.OBC.CDL.Routing.RealReplicator reaRep3(nout=numZon)
;
Buildings.Controls.OBC.CDL.Routing.IntegerReplicator intRep(nout=numZon);
equation
connect(TSetZon.uCooDemLimLev,cooDemLimLev. y);
connect(heaDemLimLev.y,TSetZon. uHeaDemLimLev);
connect(tCooDowHeaUp.y,opeModSel. cooDowTim);
connect(tCooDowHeaUp.y,opeModSel. warUpTim);
connect(TSetRooCooOn.y,opeModSel. TCooSet);
connect(opeModSel.THeaSet,TSetRooHeaOn. y);
connect(opeModSel.TUnoHeaSet,TSetRooHeaOff. y);
connect(opeModSel.TUnoCooSet,TSetRooCooOff. y);
connect(TSetZon.TCooSet, TCooSet);
connect(TSetZon.THeaSet, THeaSet);
connect(opeModSel.yOpeMod, yOpeMod);
connect(opeModSel.TZon, TZon);
connect(setAdj, TSetZon.setAdj);
connect(heaSetAdj, TSetZon.heaSetAdj);
connect(TSetZon.uOccSen, uOccSen);
connect(TSetZon.uWinSta, uWinSta);
connect(uWinSta, opeModSel.uWinSta);
connect(cloWin.y, opeModSel.uWinSta);
connect(TSetRooCooOn.y, reaRep.u);
connect(reaRep.y, TSetZon.occCooSet);
connect(TSetRooHeaOn.y, reaRep1.u);
connect(reaRep1.y, TSetZon.occHeaSet);
connect(TSetRooHeaOff.y, reaRep2.u);
connect(reaRep2.y, TSetZon.unoHeaSet);
connect(TSetRooCooOff.y, reaRep3.u);
connect(reaRep3.y, TSetZon.unoCooSet);
connect(opeModSel.yOpeMod, intRep.u);
connect(intRep.y, TSetZon.uOpeMod);
connect(uOcc, opeModSel.uOcc);
connect(tNexOcc, opeModSel.tNexOcc);
end ModeAndSetPoints;