All control blocks that form the control sequence of a system
are instantiated into one single class, a so-called control section.
This package contains such control sections.
This is an implementation of the control sequence specified in ASHRAE (2021)
for multiple-zone VAV air handlers.
It contains the following components.
block G36VAVMultiZone
extends Buildings.Templates.AirHandlersFans.Components.Interfaces.PartialControllerVAVMultizone
(
final typ=Buildings.Templates.AirHandlersFans.Types.Controller.G36VAVMultiZone);
parameter String idZon[nZon]
;
parameter String namGro[:]
;
parameter String namGroZon[nZon]
;
final parameter Integer nGro(
final min=1)=
size(namGro, 1)
;
final parameter Buildings.Controls.OBC.ASHRAE.G36.Types.ASHRAEClimateZone ashCliZon=
datAll.ashCliZon
;
final parameter Buildings.Controls.OBC.ASHRAE.G36.Types.Title24ClimateZone tit24CliZon=
datAll.tit24CliZon
;
final parameter Boolean isZonInGro[nGro, nZon]=
{{namGro[i]==namGroZon[j]
for j
in 1:nZon}
for i
in 1:nGro}
;
final parameter Integer isZonInGroInt[nGro, nZon]=
{{
if isZonInGro[i, j]
then 1
else 0
for j
in 1:nZon}
for i
in 1:nGro}
;
final parameter Integer isZonInGroIntTra[nZon, nGro]=
{{isZonInGroInt[i, j]
for i
in 1:
size(isZonInGroInt, 1)}
for j
in 1:
size(isZonInGroInt, 2)}
;
final parameter Integer nZonPerGro[nGro](
each final min=1) = {
sum(isZonInGroInt[i])
for i
in 1:nGro}
;
final parameter Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil typCoiCoo=
if coiCoo.typ==Buildings.Templates.Components.Types.Coil.WaterBasedCooling
then
Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased
elseif coiCoo.typ==Buildings.Templates.Components.Types.Coil.EvaporatorMultiStage
or
coiCoo.typ==Buildings.Templates.Components.Types.Coil.EvaporatorVariableSpeed
then
Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.DXCoil
else Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.None
;
final parameter Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil typCoiHea=
if coiHeaPre.typ==Buildings.Templates.Components.Types.Coil.WaterBasedHeating
or
coiHeaReh.typ==Buildings.Templates.Components.Types.Coil.WaterBasedHeating
then Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
elseif coiHeaPre.typ==Buildings.Templates.Components.Types.Coil.ElectricHeating
or
coiHeaPre.typ==Buildings.Templates.Components.Types.Coil.ElectricHeating
then Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.Electric
else Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.None
;
parameter Boolean have_perZonRehBox=false
;
final parameter Modelica.Units.SI.VolumeFlowRate VOutUnc_flow_nominal=
dat.VOutUnc_flow_nominal
;
final parameter Modelica.Units.SI.VolumeFlowRate VOutTot_flow_nominal=
dat.VOutTot_flow_nominal
;
final parameter Modelica.Units.SI.VolumeFlowRate VOutAbsMin_flow_nominal=
dat.VOutAbsMin_flow_nominal
;
final parameter Modelica.Units.SI.VolumeFlowRate VOutMin_flow_nominal=
dat.VOutMin_flow_nominal
;
final parameter Modelica.Units.SI.PressureDifference dpDamOutMinAbs=
dat.dpDamOutMinAbs
;
final parameter Modelica.Units.SI.PressureDifference dpDamOutMin_nominal=
dat.dpDamOutMin_nominal
;
final parameter Modelica.Units.SI.PressureDifference pAirSupSet_rel_max=
dat.pAirSupSet_rel_max
;
final parameter Modelica.Units.SI.PressureDifference pAirRetSet_rel_min=
dat.pAirRetSet_rel_min
;
final parameter Modelica.Units.SI.PressureDifference pAirRetSet_rel_max=
dat.pAirRetSet_rel_max
;
final parameter Real yFanSup_min=
dat.yFanSup_min
;
final parameter Modelica.Units.SI.Temperature TAirSupSet_min(
displayUnit="degC")=dat.TAirSupSet_min
;
final parameter Modelica.Units.SI.Temperature TAirSupSet_max(
displayUnit="degC")=dat.TAirSupSet_max
;
final parameter Modelica.Units.SI.Temperature TOutRes_min(
displayUnit="degC")=dat.TOutRes_min
;
final parameter Modelica.Units.SI.Temperature TOutRes_max(
displayUnit="degC")=dat.TOutRes_max
;
final parameter Real yFanRel_min=
dat.yFanRel_min
;
final parameter Real yFanRet_min=
dat.yFanRet_min
;
final parameter Modelica.Units.SI.VolumeFlowRate dVFanRet_flow=
dat.dVFanRet_flow
;
Buildings.Controls.OBC.ASHRAE.G36.AHUs.MultiZone.VAV.Controller ctl(
final eneStd=stdEne,
final venStd=stdVen,
final ashCliZon=ashCliZon,
final tit24CliZon=tit24CliZon,
final have_frePro=have_frePro,
final freSta=typFreSta,
final minOADes=typSecOut,
final buiPreCon=buiPreCon,
final ecoHigLimCon=typCtlEco,
final cooCoi=typCoiCoo,
final heaCoi=typCoiHea,
final have_perZonRehBox=have_perZonRehBox,
final VUncDesOutAir_flow=VOutUnc_flow_nominal,
final VDesTotOutAir_flow=VOutTot_flow_nominal,
final VAbsOutAir_flow=VOutAbsMin_flow_nominal,
final VDesOutAir_flow=VOutAbsMin_flow_nominal,
final pMaxSet=pAirSupSet_rel_max,
final supFanSpe_min=yFanSup_min,
final retFanSpe_min=yFanRet_min,
final TSupCoo_min=TAirSupSet_min,
final TSupCoo_max=TAirSupSet_max,
final TOut_min=TOutRes_min,
final TOut_max=TOutRes_max,
final have_CO2Sen=have_CO2Sen,
final dpAbsMinOutDam=dpDamOutMinAbs,
final dpDesMinOutDam=dpDamOutMin_nominal,
final difFloSet=dVFanRet_flow,
final p_rel_RetFan_min=pAirRetSet_rel_min,
final p_rel_RetFan_max=pAirRetSet_rel_max)
;
Buildings.Controls.OBC.ASHRAE.G36.AHUs.MultiZone.VAV.SetPoints.OutdoorAirFlow.ASHRAE62_1.SumZone
aggZonVen_A621(
final nZon=nZon,
final nGro=nGro,
final zonGroMat=isZonInGroInt,
final zonGroMatTra=isZonInGroIntTra)
if stdVen==Buildings.Controls.OBC.ASHRAE.G36.Types.VentilationStandard.ASHRAE62_1
;
Buildings.Controls.OBC.ASHRAE.G36.AHUs.MultiZone.VAV.SetPoints.OutdoorAirFlow.Title24.SumZone
aggZonVen_T24(
final nZon=nZon,
final nGro=nGro,
final zonGroMat=isZonInGroInt,
final have_CO2Sen=have_CO2Sen)
if stdVen==Buildings.Controls.OBC.ASHRAE.G36.Types.VentilationStandard.California_Title_24
;
Buildings.Controls.OBC.ASHRAE.G36.ZoneGroups.ZoneStatusDuplicator repSigZon(
final nZon=nZon,
final nZonGro=nGro)
;
Buildings.Controls.OBC.ASHRAE.G36.ZoneGroups.GroupStatus staGro[nGro](
final nBuiZon=
fill(nZon, nGro),
final nGroZon=nZonPerGro,
final zonGroMsk=isZonInGro)
;
Buildings.Controls.OBC.ASHRAE.G36.ZoneGroups.OperationMode opeModSel[nGro](
final nZon=nZonPerGro)
;
Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator TAirSupSet(
final nout=nZon)
;
Buildings.Controls.OBC.CDL.Integers.MultiSum reqZonTemRes(
final nin=nZon,
final k=
fill(1, nZon))
;
Buildings.Controls.OBC.CDL.Integers.MultiSum reqZonPreRes(
final nin=nZon,
final k=
fill(1, nZon))
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant u1FreSta(k=false)
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant u1SofSwiRes(k=false)
;
Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicator y1FanSup_actual(
final nout=nZon)
;
Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator TAirSup(
final nout=nZon)
;
Buildings.Controls.OBC.CDL.Routing.IntegerVectorReplicator intVecRep(
final nin=nGro,
final nout=nZon)
;
Buildings.Controls.OBC.CDL.Integers.MultiSum asgOpeMod[nZon](
each final nin=nGro,
final k=isZonInGroIntTra)
;
Buildings.Controls.OBC.ASHRAE.G36.ZoneGroups.ZoneGroupSystem ahuMod(
final nGro=nGro)
;
equation
connect(bus.pAirSup_rel, ctl.dpDuc);
connect(bus.TOut, ctl.TOut);
connect(bus.TAirSup, ctl.TAirSup);
if typSecOut==Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.SingleDamper
then
connect(bus.VOut_flow, ctl.VAirOut_flow);
end if;
if typSecOut==Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.DedicatedDampersAirflow
then
connect(bus.VOutMin_flow, ctl.VAirOut_flow);
end if;
connect(bus.dpAirOutMin, ctl.dpMinOutDam);
connect(bus.hAirOut, ctl.hAirOut);
connect(bus.TAirRet, ctl.TAirRet);
connect(bus.hAirRet, ctl.hAirRet);
connect(bus.pBui_rel, ctl.dpBui);
connect(bus.TAirMix, ctl.TAirMix);
connect(bus.fanSup.y1_actual, ctl.u1SupFan);
connect(bus.fanRel.y1_actual, ctl.u1RelFan);
connect(bus.fanSup.V_flow, ctl.VAirSup_flow);
connect(bus.fanRet.V_flow, ctl.VAirRet_flow);
connect(bus.fanSup.y1_actual, y1FanSup_actual.u);
connect(bus.TAirSup, TAirSup.u);
connect(busTer.yReqZonPreRes, reqZonPreRes.u);
connect(busTer.yReqZonTemRes, reqZonTemRes.u);
connect(busTer.VAdjPopBreZon_flow, aggZonVen_A621.VAdjPopBreZon_flow);
connect(busTer.VAdjAreBreZon_flow, aggZonVen_A621.VAdjAreBreZon_flow);
connect(busTer.VAirDis_flow, aggZonVen_A621.VZonPri_flow);
connect(busTer.VMinOA_flow, aggZonVen_A621.VMinOA_flow);
connect(busTer.VZonAbsMin_flow, aggZonVen_T24.VZonAbsMin_flow);
connect(busTer.VZonDesMin_flow, aggZonVen_T24.VZonDesMin_flow);
connect(busTer.yCO2, aggZonVen_T24.uCO2);
connect(busTer.y1OveOccZon, repSigZon.zonOcc);
connect(busTer.y1OccSch, repSigZon.u1Occ);
connect(busTer.tNexOcc, repSigZon.tNexOcc);
connect(busTer.yCooTim, repSigZon.uCooTim);
connect(busTer.yWarTim, repSigZon.uWarTim);
connect(busTer.yOccHeaHig, repSigZon.u1OccHeaHig);
connect(busTer.yHigOccCoo, repSigZon.u1HigOccCoo);
connect(busTer.yUnoHeaHig, repSigZon.u1UnoHeaHig);
connect(busTer.TZonHeaUnoSet, repSigZon.THeaSetOff);
connect(busTer.yEndSetBac, repSigZon.u1EndSetBac);
connect(busTer.yHigUnoCoo, repSigZon.u1HigUnoCoo);
connect(busTer.TZonCooUnoSet, repSigZon.TCooSetOff);
connect(busTer.yEndSetUp, repSigZon.u1EndSetUp);
connect(busTer.TZon, repSigZon.TZon);
connect(busTer.y1Win, repSigZon.u1Win);
connect(ctl.yMinOutDam, bus.damOutMin.y);
connect(ctl.y1MinOutDam, bus.damOutMin.y1);
connect(ctl.yRetDam, bus.damRet.y);
connect(ctl.yRelDam, bus.damRel.y);
connect(ctl.y1RelDam, bus.damRel.y1);
connect(ctl.yOutDam, bus.damOut.y);
connect(ctl.y1EneCHWPum, bus.y1PumChiWat);
connect(ctl.y1SupFan, bus.fanSup.y1);
connect(ctl.ySupFan, bus.fanSup.y);
connect(ctl.y1RetFan, bus.fanRet.y1);
connect(ctl.yRetFan, bus.fanRet.y);
connect(ctl.y1RelFan, bus.fanRel.y1);
connect(ctl.yRelFan, bus.fanRel.y);
connect(ctl.yCooCoi, bus.coiCoo.y);
connect(ctl.yHeaCoi, bus.coiHea.y);
connect(ctl.yAla, bus.ala);
connect(ctl.yChiWatResReq, bus.reqChiWatRes);
connect(ctl.yChiPlaReq, bus.reqChiWatPla);
connect(ctl.yHotWatResReq, bus.reqHeaWatRes);
connect(ctl.yHotWatPlaReq, bus.reqHeaWatPla);
connect(TAirSupSet.y, busTer.TAirSupSet);
connect(TAirSup.y, busTer.TAirSup);
connect(y1FanSup_actual.y, busTer.y1FanSup_actual);
connect(staGro.uGroOcc, opeModSel.u1Occ);
connect(staGro.nexOcc, opeModSel.tNexOcc);
connect(staGro.yCooTim, opeModSel.maxCooDowTim);
connect(staGro.yWarTim, opeModSel.maxWarUpTim);
connect(staGro.yOccHeaHig, opeModSel.u1OccHeaHig);
connect(staGro.yHigOccCoo, opeModSel.u1HigOccCoo);
connect(staGro.yEndSetBac, opeModSel.u1EndSetBac);
connect(staGro.TZonMin, opeModSel.TZonMin);
connect(staGro.yHotZon, opeModSel.totHotZon);
connect(staGro.ySetUp, opeModSel.u1SetUp);
connect(staGro.yEndSetUp, opeModSel.u1EndSetUp);
connect(staGro.yOpeWin, opeModSel.uOpeWin);
connect(reqZonTemRes.y,ctl. uZonTemResReq);
connect(reqZonPreRes.y,ctl. uZonPreResReq);
connect(repSigZon.y1ZonOcc, staGro.zonOcc);
connect(repSigZon.y1Occ, staGro.u1Occ);
connect(repSigZon.ytNexOcc, staGro.tNexOcc);
connect(repSigZon.yCooTim, staGro.uCooTim);
connect(repSigZon.yWarTim, staGro.uWarTim);
connect(repSigZon.y1OccHeaHig, staGro.u1OccHeaHig);
connect(repSigZon.y1HigOccCoo, staGro.u1HigOccCoo);
connect(repSigZon.y1UnoHeaHig, staGro.u1UnoHeaHig);
connect(repSigZon.yTHeaSetOff, staGro.THeaSetOff);
connect(repSigZon.y1EndSetBac, staGro.u1EndSetBac);
connect(repSigZon.y1HigUnoCoo, staGro.u1HigUnoCoo);
connect(repSigZon.yTCooSetOff, staGro.TCooSetOff);
connect(repSigZon.y1EndSetUp, staGro.u1EndSetUp);
connect(repSigZon.yTZon, staGro.TZon);
connect(repSigZon.y1Win, staGro.u1Win);
connect(staGro.yColZon, opeModSel.totColZon);
connect(staGro.ySetBac, opeModSel.u1SetBac);
connect(aggZonVen_A621.VSumAdjPopBreZon_flow, ctl.VSumAdjPopBreZon_flow);
connect(aggZonVen_A621.VSumAdjAreBreZon_flow, ctl.VSumAdjAreBreZon_flow);
connect(aggZonVen_A621.VSumZonPri_flow, ctl.VSumZonPri_flow);
connect(aggZonVen_A621.uOutAirFra_max, ctl.uOutAirFra_max);
connect(aggZonVen_T24.VSumZonAbsMin_flow, ctl.VSumZonAbsMin_flow);
connect(aggZonVen_T24.VSumZonDesMin_flow, ctl.VSumZonDesMin_flow);
connect(aggZonVen_T24.yMaxCO2, ctl.uCO2Loo_max);
connect(ctl.TAirSupSet, TAirSupSet.u);
connect(opeModSel.yOpeMod, aggZonVen_A621.uOpeMod);
connect(opeModSel.yOpeMod, aggZonVen_T24.uOpeMod);
connect(opeModSel.yOpeMod, intVecRep.u);
connect(asgOpeMod.y, busTer.yOpeMod);
connect(intVecRep.y, asgOpeMod.u);
connect(opeModSel.yOpeMod, ahuMod.uOpeMod);
connect(ahuMod.yAhuOpeMod, ctl.uAhuOpeMod);
connect(u1FreSta.y, ctl.u1FreSta);
connect(u1SofSwiRes.y, ctl.u1SofSwiRes);
end G36VAVMultiZone;
This is an open loop controller providing control inputs
for the templates within
Buildings.Templates.AirHandlersFans.
It is mainly used for testing purposes.