Buildings.Templates.Plants.HeatPumps.Components.Controls

Controllers

Information

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 for heat pump plant models.

Extends from Modelica.Icons.VariantsPackage (Icon for package containing variants).

Package Content

Name Description
Buildings.Templates.Plants.HeatPumps.Components.Controls.AirToWater AirToWater Controller for AWHP plant
Buildings.Templates.Plants.HeatPumps.Components.Controls.OpenLoop OpenLoop Open-loop controller
Buildings.Templates.Plants.HeatPumps.Components.Controls.PrimaryPumpSignalRouting PrimaryPumpSignalRouting Primary pump signal routing between plant bus and controller connectors

Buildings.Templates.Plants.HeatPumps.Components.Controls.AirToWater Buildings.Templates.Plants.HeatPumps.Components.Controls.AirToWater

Controller for AWHP plant

Buildings.Templates.Plants.HeatPumps.Components.Controls.AirToWater

Information

This class implements the sequence of operation for plants with air-to-water heat pumps. It is based on the controller Buildings.Templates.Plants.Controls.HeatPumps.AirToWater.

Control points

The control sequence requires the following external input points in addition to those already included in the AWHP plant template.

Extends from Buildings.Templates.Plants.HeatPumps.Components.Interfaces.PartialController (Interface for heat pump plant controller).

Parameters

TypeNameDefaultDescription
Controllerdat Parameter record for controller
Booleanhave_senVHeaWatPrictl.have_senVHeaWatPriSet to true for plants with primary HW flow sensor
Booleanhave_senVHeaWatLooctl.have_senVHeaWatLooSet to true for plants with HW loop flow sensor
Booleanhave_senVHeaWatSecctl.have_senVHeaWatSecSet to true for plants with secondary HW flow sensor
Booleanhave_senVChiWatPrictl.have_senVChiWatPriSet to true for plants with primary CHW flow sensor
Booleanhave_senVChiWatLooctl.have_senVChiWatLooSet to true for plants with CHW loop flow sensor
Booleanhave_senVChiWatSecctl.have_senVChiWatSecSet to true for plants with secondary CHW flow sensor
Booleanhave_senTHeaWatPriRetctl.have_senTHeaWatPriRetSet to true for plants with primary HW return temperature sensor
Booleanhave_senTHeaWatLooRetctl.have_senTHeaWatLooRetSet to true for plants with HW loop return temperature sensor
Booleanhave_senTChiWatPriRetctl.have_senTChiWatPriRetSet to true for plants with primary CHW return temperature sensor
Booleanhave_senTChiWatLooRetctl.have_senTChiWatLooRetSet to true for plants with CHW loop return temperature sensor
Booleanhave_senTHeaWatSecSupctl.have_senTHeaWatSecSupSet to true for plants with secondary HW supply temperature sensor
Booleanhave_senTChiWatSecSupctl.have_senTChiWatSecSupSet to true for plants with secondary CHW supply temperature sensor
Booleanhave_senTHeaWatSecRetctl.have_senTHeaWatSecRetSet to true for plants with secondary HW return temperature sensor
Booleanhave_senTChiWatSecRetctl.have_senTChiWatSecRetSet to true for plants with secondary CHW return temperature sensor
Configuration
HeatPumpPlantcfg Plant configuration parameters
ControllertypBuildings.Templates.Plants.H...Type of controller
IntegernAirHan Number of air handling units served by the plant
IntegernEquZon Number of terminal units (zone equipment) served by the plant
Sensors
Booleanhave_senTPriRet_selectfalseSet to true for plants with primary CHW/HW return temperature sensor
Booleanhave_senTLooRet_selectfalseSet to true for plants with CHW/HW loop return temperature sensor (load side of minimum flow bypass)
Booleanhave_senDpHeaWatRemWirfalseSet to true for remote HW differential pressure sensor(s) hardwired to plant or pump controller
IntegernSenDpHeaWatRem1Number of remote HW differential pressure sensors used for HW pump speed control
Booleanhave_senDpChiWatRemWirhave_senDpHeaWatRemWirSet to true for remote CHW differential pressure sensor(s) hardwired to plant or pump controller
IntegernSenDpChiWatRem1Number of remote CHW differential pressure sensors used for CHW pump speed control
Plant enable
Booleanhave_inpSchfalseSet to true to provide schedule via software input point

Connectors

TypeNameDescription
BusbusPlant control bus
BusbusAirHan[nAirHan]Air handling unit control bus
BusbusEquZon[nEquZon]Terminal unit control bus

Modelica definition

model AirToWater "Controller for AWHP plant" extends Buildings.Templates.Plants.HeatPumps.Components.Interfaces.PartialController( final typ=Buildings.Templates.Plants.HeatPumps.Types.Controller.AirToWater, final have_senVHeaWatPri=ctl.have_senVHeaWatPri, final have_senVHeaWatLoo=ctl.have_senVHeaWatLoo, final have_senVHeaWatSec=ctl.have_senVHeaWatSec, final have_senVChiWatPri=ctl.have_senVChiWatPri, final have_senVChiWatLoo=ctl.have_senVChiWatLoo, final have_senVChiWatSec=ctl.have_senVChiWatSec, final have_senTHeaWatPriRet=ctl.have_senTHeaWatPriRet, final have_senTChiWatPriRet=ctl.have_senTChiWatPriRet, final have_senTHeaWatLooRet=ctl.have_senTHeaWatLooRet, final have_senTChiWatLooRet=ctl.have_senTChiWatLooRet, final have_senTHeaWatSecSup=ctl.have_senTHeaWatSecSup, final have_senTChiWatSecSup=ctl.have_senTChiWatSecSup, final have_senTHeaWatSecRet=ctl.have_senTHeaWatSecRet, final have_senTChiWatSecRet=ctl.have_senTChiWatSecRet); Buildings.Templates.Plants.Controls.HeatPumps.AirToWater ctl( final typ=cfg.typ, final is_priOnl=cfg.typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1Only, final TChiWatSupSet_max=dat.TChiWatSupSet_max, final TChiWatSup_nominal=dat.TChiWatSup_nominal, final THeaWatSupSet_min=dat.THeaWatSupSet_min, final THeaWatSup_nominal=dat.THeaWatSup_nominal, final TOutChiWatLck=dat.TOutChiWatLck, final TOutHeaWatLck=dat.TOutHeaWatLck, final VChiWatHp_flow_min=fill(dat.VChiWatHp_flow_min, cfg.nHp), final VChiWatHp_flow_nominal=fill(dat.VChiWatHp_flow_nominal, cfg.nHp), final VChiWatPhp_flow_min=fill(dat.VChiWatPhp_flow_min, cfg.nPhp), final VChiWatPhp_flow_nominal=fill(dat.VChiWatPhp_flow_nominal, cfg.nPhp), final VChiWatPri_flow_nominal=dat.VChiWatPri_flow_nominal, final VChiWatSec_flow_nominal=dat.VChiWatSec_flow_nominal, final VHeaWatHp_flow_min=fill(dat.VHeaWatHp_flow_min, cfg.nHp), final VHeaWatHp_flow_nominal=fill(dat.VHeaWatHp_flow_nominal, cfg.nHp), final VHeaWatPhp_flow_min=fill(dat.VHeaWatPhp_flow_min, cfg.nPhp), final VHeaWatPhp_flow_nominal=fill(dat.VHeaWatPhp_flow_nominal, cfg.nPhp), final VHeaWatPri_flow_nominal=dat.VHeaWatPri_flow_nominal, final VHeaWatSec_flow_nominal=dat.VHeaWatSec_flow_nominal, final capCooHp_nominal=fill(dat.capCooHp_nominal, cfg.nHp), final capCooPhp_nominal=fill(dat.capCooPhp_nominal, cfg.nPhp), final capCooShcPhp_nominal=fill(dat.capCooShcPhp_nominal, cfg.nPhp), final capHeaHp_nominal=fill(dat.capHeaHp_nominal, cfg.nHp), final capHeaPhp_nominal=fill(dat.capHeaPhp_nominal, cfg.nPhp), final capHeaShcPhp_nominal=fill(dat.capHeaShcPhp_nominal, cfg.nPhp), final cp_default=if cfg.have_heaWat then cfg.cpHeaWat_default else cfg.cpChiWat_default, final dpChiWatRemSet_max=dat.dpChiWatRemSet_max, final dpChiWatRemSet_min=dat.dpChiWatRemSet_min, final dpHeaWatRemSet_max=dat.dpHeaWatRemSet_max, final dpHeaWatRemSet_min=dat.dpHeaWatRemSet_min, final capCooHrc_min=dat.capCooHrc_min, final capHeaHrc_min=dat.capHeaHrc_min, final COPHeaHrc_nominal=dat.COPHeaHrc_nominal, final TChiWatSupHrc_min=dat.TChiWatSupHrc_min, final THeaWatSupHrc_max=dat.THeaWatSupHrc_max, final have_inpSch=have_inpSch, final have_pumChiWatPriDedHp_select=cfg.have_pumChiWatPriDedHp, final have_pumPriHdr=cfg.typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Headered, final have_pumHeaWatPriVar_select=cfg.typPumHeaWatPri == Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable, final have_pumChiWatPriVar_select=cfg.typPumChiWatPri == Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable, final have_senDpChiWatRemWir=cfg.have_senDpChiWatRemWir, final have_senDpHeaWatRemWir=cfg.have_senDpHeaWatRemWir, final have_senTPriRet_select=have_senTPriRet_select, final have_senTLooRet_select=have_senTLooRet_select, final have_valHpInlIso=cfg.have_valHpInlIso, final have_valHpOutIso=cfg.have_valHpOutIso, final have_valPhpInlIso=cfg.have_valPhpInlIso, final have_valPhpOutIso=cfg.have_valPhpOutIso, final nHp_select=cfg.nHp, final nPhp_select=cfg.nPhp, final nPumChiWatPri_select=cfg.nPumChiWatPri, final nPumChiWatSec_select=cfg.nPumChiWatSec, final nPumHeaWatPri_select=cfg.nPumHeaWatPri, final nPumHeaWatSec_select=cfg.nPumHeaWatSec, final nSenDpChiWatRem=nSenDpChiWatRem, final nSenDpHeaWatRem=nSenDpHeaWatRem, final plrSta=dat.plrSta, final rho_default=if cfg.have_heaWat then cfg.rhoHeaWat_default else cfg.rhoChiWat_default, final schCoo=dat.schCoo, final schHea=dat.schHea, final staHp=dat.staHp, final idxAltHp_select=dat.idxAltHp, final yPumChiWatPri_min=dat.yPumChiWatPri_min, yPumChiWatPriDedHpSet=dat.yPumChiWatPriDedHpSet, yPumChiWatPriDedPhpSet=dat.yPumChiWatPriDedPhpSet, yPumChiWatPriHdrSet=dat.yPumChiWatPriHdrSet, final yPumChiWatSec_min=dat.yPumChiWatSec_min, final yPumHeaWatPri_min=dat.yPumHeaWatPri_min, yPumHeaWatPriDedHpSet=dat.yPumHeaWatPriDedHpSet, yPumHeaWatPriDedPhpSet=dat.yPumHeaWatPriDedPhpSet, yPumHeaWatPriHdrSet=dat.yPumHeaWatPriHdrSet, final yPumHeaWatSec_min=dat.yPumHeaWatSec_min) "Plant controller"; Buildings.Controls.OBC.CDL.Integers.MultiSum reqPlaHeaWatAirHan( final nin=nAirHan) if cfg.have_heaWat "Sum of HW plant requests from AHU"; Buildings.Controls.OBC.CDL.Integers.MultiSum reqPlaHeaWatEquZon( final nin=nEquZon) if cfg.have_heaWat "Sum of HW plant requests from zone equipment"; Buildings.Controls.OBC.CDL.Integers.MultiSum reqResHeaWatAirHan(nin=1) if cfg.have_heaWat "Sum of HW reset requests from AHU"; Buildings.Controls.OBC.CDL.Integers.MultiSum reqResHeaWatEquZon( final nin=nEquZon) if cfg.have_heaWat "Sum of HW reset requests from zone equipment"; Buildings.Controls.OBC.CDL.Integers.MultiSum reqResChiWatAirHan( final nin=nAirHan) if cfg.have_chiWat "Sum of CHW reset requests from AHU"; Buildings.Controls.OBC.CDL.Integers.MultiSum reqPlaChiWatEquZon( final nin=nEquZon) if cfg.have_chiWat "Sum of CHW plant requests from zone equipment"; Buildings.Controls.OBC.CDL.Integers.MultiSum reqResChiWatEquZon( final nin=nEquZon) if cfg.have_chiWat "Sum of CHW reset requests from zone equipment"; Buildings.Controls.OBC.CDL.Integers.MultiSum reqPlaChiWatAirHan( final nin=nAirHan) if cfg.have_chiWat "Sum of CHW plant requests from AHU"; Buildings.Templates.Plants.Controls.Utilities.PlaceholderInteger phReqPlaHeaWatAirHan( final have_inp=cfg.have_heaWat, final u_internal=0) "Placeholder value if signal is not available"; Buildings.Templates.Plants.Controls.Utilities.PlaceholderInteger phReqPlaChiWatAirHan( final have_inp=cfg.have_chiWat, final u_internal=0) "Placeholder value if signal is not available"; Buildings.Templates.Plants.Controls.Utilities.PlaceholderInteger phReqResHeaWatAirHan( final have_inp=cfg.have_heaWat, final u_internal=0) "Placeholder value if signal is not available"; Buildings.Templates.Plants.Controls.Utilities.PlaceholderInteger phReqResChiWatAirHan( final have_inp=cfg.have_chiWat, final u_internal=0) "Placeholder value if signal is not available"; Buildings.Templates.Plants.Controls.Utilities.PlaceholderInteger phReqPlaHeaWatEquZon( final have_inp=cfg.have_heaWat, final u_internal=0) "Placeholder value if signal is not available"; Buildings.Templates.Plants.Controls.Utilities.PlaceholderInteger phReqPlaChiWatEquZon( final have_inp=cfg.have_chiWat, final u_internal=0) "Placeholder value if signal is not available"; Buildings.Templates.Plants.Controls.Utilities.PlaceholderInteger phReqResHeaWatEquZon( final have_inp=cfg.have_heaWat, final u_internal=0) "Placeholder value if signal is not available"; Buildings.Templates.Plants.Controls.Utilities.PlaceholderInteger phReqResChiWatEquZon( final have_inp=cfg.have_chiWat, final u_internal=0) "Placeholder value if signal is not available"; Buildings.Controls.OBC.CDL.Integers.Add reqPlaHeaWat "Sum of HW plant requests of all loads served"; Buildings.Controls.OBC.CDL.Integers.Add reqPlaChiWat "Sum of CHW plant requests of all loads served"; Buildings.Controls.OBC.CDL.Integers.Add reqResHeaWat "Sum of HW reset requests of all loads served"; Buildings.Controls.OBC.CDL.Integers.Add reqResChiWat "Sum of CHW reset requests of all loads served"; Buildings.Templates.Plants.Controls.Pumps.Generic.ResetLocalDifferentialPressure resDpHeaWatLoc[nSenDpHeaWatRem]( dpLocSet_min=fill(dat.dpHeaWatLocSet_min, nSenDpHeaWatRem), dpLocSet_max=fill(dat.dpHeaWatLocSet_max, nSenDpHeaWatRem)) if cfg.have_heaWat and not have_senDpHeaWatRemWir "Local HW DP reset"; Buildings.Templates.Plants.Controls.Pumps.Generic.ResetLocalDifferentialPressure resDpChiWatLoc[nSenDpChiWatRem]( dpLocSet_min=fill(dat.dpChiWatLocSet_min, nSenDpChiWatRem), dpLocSet_max=fill(dat.dpChiWatLocSet_max, nSenDpChiWatRem)) if cfg.have_chiWat and not have_senDpChiWatRemWir "Local CHW DP reset"; Buildings.Templates.Plants.Controls.Utilities.PlaceholderReal THeaWatLooOrSecRet(final have_inp=have_senTHeaWatLooRet, have_inpPh=true) if have_senTHeaWatLooRet or have_senTHeaWatSecRet "Select sensor based on plant configuration"; Buildings.Templates.Plants.Controls.Utilities.PlaceholderReal TChiWatLooOrSecRet(final have_inp=have_senTChiWatLooRet, have_inpPh=true) if have_senTChiWatLooRet or have_senTChiWatSecRet "Select sensor based on plant configuration"; Buildings.Templates.Plants.Controls.Utilities.PlaceholderReal VHeaWatLooOrSec( final have_inp=have_senVHeaWatLoo, have_inpPh=true) if have_senVHeaWatLoo or have_senVHeaWatSec "Select sensor based on plant configuration"; Buildings.Templates.Plants.Controls.Utilities.PlaceholderReal VChiWatLooOrSec( final have_inp=have_senVChiWatLoo, have_inpPh=true) if have_senVChiWatLoo or have_senVChiWatSec "Select sensor based on plant configuration"; equation /* Control point connection - start */ // Inputs from plant control bus connect(bus.TChiWatPriRet, ctl.TChiWatPriRet); connect(bus.TChiWatPriSup, ctl.TChiWatPriSup); connect(bus.TChiWatSecSup, ctl.TChiWatSecSup); connect(bus.THeaWatPriRet, ctl.THeaWatPriRet); connect(bus.THeaWatPriSup, ctl.THeaWatPriSup); connect(bus.THeaWatSecSup, ctl.THeaWatSecSup); connect(bus.TOut, ctl.TOut); connect(bus.VChiWatPri_flow, ctl.VChiWatPri_flow); connect(bus.VHeaWatPri_flow, ctl.VHeaWatPri_flow); connect(bus.dpChiWatLoc, ctl.dpChiWatLoc); connect(bus.dpChiWatLocSet, ctl.dpChiWatLocSet); connect(bus.dpChiWatRem, ctl.dpChiWatRem); connect(bus.dpChiWatRem, resDpChiWatLoc.dpRem); connect(bus.dpHeaWatLoc, ctl.dpHeaWatLoc); connect(bus.dpHeaWatLocSet, ctl.dpHeaWatLocSet); connect(bus.dpHeaWatRem, ctl.dpHeaWatRem); connect(bus.dpHeaWatRem, resDpHeaWatLoc.dpRem); connect(busHp.y1_actual, ctl.u1Hp_actual); connect(busPhp.y1_actual, ctl.u1Php_actual); connect(rouPumChiWatPri.y1Hdr_actual, ctl.u1PumChiWatPriHdr_actual); connect(rouPumChiWatPri.y1DedHp_actual, ctl.u1PumChiWatPriDedHp_actual); connect(rouPumChiWatPri.y1DedPhp_actual, ctl.u1PumChiWatPriDedPhp_actual); connect(busPumChiWatSec.y1_actual, ctl.u1PumChiWatSec_actual); connect(rouPumHeaWatPri.y1Hdr_actual, ctl.u1PumHeaWatPriHdr_actual); connect(rouPumHeaWatPri.y1DedHp_actual, ctl.u1PumHeaWatPriDedHp_actual); connect(rouPumHeaWatPri.y1DedPhp_actual, ctl.u1PumHeaWatPriDedPhp_actual); connect(busPumHeaWatSec.y1_actual, ctl.u1PumHeaWatSec_actual); connect(bus.u1SchCoo, ctl.u1SchCoo); connect(bus.u1SchHea, ctl.u1SchHea); connect(busHrc.y1_actual, ctl.u1Hrc_actual); connect(bus.TChiWatRetUpsHrc, ctl.TChiWatRetUpsHrc); connect(bus.THeaWatRetUpsHrc, ctl.THeaWatRetUpsHrc); // Outputs to plant control bus connect(ctl.THeaWatSupHpSet, busHp.THeaWatSet); connect(ctl.TChiWatSupHpSet, busHp.TChiWatSet); connect(ctl.THeaWatSupPhpSet, busPhp.THeaWatSet); connect(ctl.TChiWatSupPhpSet, busPhp.TChiWatSet); connect(ctl.TChiWatSupSet, bus.TChiWatSupSet); connect(ctl.THeaWatSupSet, bus.THeaWatSupSet); connect(ctl.dpChiWatRemSet, bus.dpChiWatRemSet); connect(ctl.dpHeaWatRemSet, bus.dpHeaWatRemSet); connect(ctl.y1HeaHp, busHp.y1Hea); connect(ctl.y1Hp, busHp.y1); connect(ctl.y1HeaPhp, busPhp.y1Hea); connect(ctl.y1CooPhp, busPhp.y1Coo); connect(ctl.y1PumChiWatPriDedHp, rouPumChiWatPri.y1DedHp); connect(ctl.y1PumChiWatPriDedPhp, rouPumChiWatPri.y1DedPhp); connect(ctl.y1PumChiWatPriHdr, rouPumChiWatPri.y1Hdr); connect(ctl.y1PumChiWatSec, busPumChiWatSec.y1); connect(ctl.y1PumHeaWatPriDedHp, rouPumHeaWatPri.y1DedHp); connect(ctl.y1PumHeaWatPriDedPhp, rouPumHeaWatPri.y1DedPhp); connect(ctl.y1PumHeaWatPriHdr, rouPumHeaWatPri.y1Hdr); connect(ctl.y1PumHeaWatSec, busPumHeaWatSec.y1); connect(ctl.y1ValChiWatHpInlIso, busValChiWatHpInlIso.y1); connect(ctl.y1ValChiWatHpOutIso, busValChiWatHpOutIso.y1); connect(ctl.y1ValHeaWatHpInlIso, busValHeaWatHpInlIso.y1); connect(ctl.y1ValHeaWatHpOutIso, busValHeaWatHpOutIso.y1); connect(ctl.y1ValChiWatPhpInlIso, busValChiWatPhpInlIso.y1); connect(ctl.y1ValChiWatPhpOutIso, busValChiWatPhpOutIso.y1); connect(ctl.y1ValHeaWatPhpInlIso, busValHeaWatPhpInlIso.y1); connect(ctl.y1ValHeaWatPhpOutIso, busValHeaWatPhpOutIso.y1); connect(ctl.yValHeaWatMinByp, busValHeaWatMinByp.y); connect(ctl.yValChiWatMinByp, busValChiWatMinByp.y); connect(ctl.yPumChiWatPriDedHp, rouPumChiWatPri.yDedHp); connect(ctl.yPumChiWatPriDedPhp, rouPumChiWatPri.yDedPhp); connect(ctl.yPumChiWatPriHdr, rouPumChiWatPri.yHdr); connect(ctl.yPumChiWatSec, busPumChiWatSec.y); connect(ctl.yPumHeaWatPriDedHp, rouPumHeaWatPri.yDedHp); connect(ctl.yPumHeaWatPriDedPhp, rouPumHeaWatPri.yDedPhp); connect(ctl.yPumHeaWatPriHdr, rouPumHeaWatPri.yHdr); connect(ctl.yPumHeaWatSec, busPumHeaWatSec.y); connect(ctl.y1Hrc, busHrc.y1); connect(ctl.y1CooHrc, busHrc.y1Coo); connect(ctl.THeaWatSupHrcSet, busHrc.THeaWatSet); connect(ctl.TChiWatSupHrcSet, busHrc.TChiWatSet); connect(ctl.y1PumChiWatHrc, busPumChiWatHrc.y1); connect(ctl.y1PumHeaWatHrc, busPumHeaWatHrc.y1); /* Control point connection - stop */ connect(busAirHan.reqResChiWat, reqResChiWatAirHan.u); connect(busEquZon.reqPlaHeaWat, reqPlaHeaWatEquZon.u); connect(busEquZon.reqResHeaWat, reqResHeaWatEquZon.u); connect(busEquZon.reqPlaChiWat, reqPlaChiWatEquZon.u); connect(busEquZon.reqResChiWat, reqResChiWatEquZon.u); connect(busAirHan.reqPlaChiWat, reqPlaChiWatAirHan.u); connect(busAirHan.reqPlaHeaWat, reqPlaHeaWatAirHan.u); connect(busAirHan.reqResHeaWat, reqResHeaWatAirHan.u[1:1]); connect(reqPlaHeaWatAirHan.y, phReqPlaHeaWatAirHan.u); connect(reqPlaChiWatAirHan.y, phReqPlaChiWatAirHan.u); connect(reqResHeaWatAirHan.y, phReqResHeaWatAirHan.u); connect(reqResChiWatAirHan.y, phReqResChiWatAirHan.u); connect(reqPlaHeaWatEquZon.y, phReqPlaHeaWatEquZon.u); connect(reqPlaChiWatEquZon.y, phReqPlaChiWatEquZon.u); connect(reqResChiWatEquZon.y, phReqResChiWatEquZon.u); connect(reqResHeaWatEquZon.y, phReqResHeaWatEquZon.u); connect(phReqPlaHeaWatAirHan.y, reqPlaHeaWat.u1); connect(phReqPlaHeaWatEquZon.y, reqPlaHeaWat.u2); connect(phReqPlaChiWatAirHan.y, reqPlaChiWat.u1); connect(phReqPlaChiWatEquZon.y, reqPlaChiWat.u2); connect(phReqResHeaWatAirHan.y, reqResHeaWat.u1); connect(phReqResChiWatAirHan.y, reqResChiWat.u1); connect(phReqResHeaWatEquZon.y, reqResHeaWat.u2); connect(phReqResChiWatEquZon.y, reqResChiWat.u2); connect(reqPlaHeaWat.y, ctl.nReqPlaHeaWat); connect(reqPlaChiWat.y, ctl.nReqPlaChiWat); connect(reqResHeaWat.y, ctl.nReqResHeaWat); connect(reqResChiWat.y, ctl.nReqResChiWat); connect(resDpHeaWatLoc.dpLocSet, ctl.dpHeaWatLocSet); connect(resDpChiWatLoc.dpLocSet, ctl.dpChiWatLocSet); connect(ctl.dpChiWatRemSet, resDpChiWatLoc.dpRemSet); connect(ctl.dpHeaWatRemSet, resDpHeaWatLoc.dpRemSet); connect(bus.THeaWatLooRet, THeaWatLooOrSecRet.u); connect(bus.THeaWatSecRet, THeaWatLooOrSecRet.uPh); connect(bus.TChiWatLooRet, TChiWatLooOrSecRet.u); connect(bus.TChiWatSecRet, TChiWatLooOrSecRet.uPh); connect(bus.VHeaWatLoo_flow, VHeaWatLooOrSec.u); connect(bus.VHeaWatSec_flow, VHeaWatLooOrSec.uPh); connect(bus.VChiWatLoo_flow, VChiWatLooOrSec.u); connect(bus.VChiWatSec_flow, VChiWatLooOrSec.uPh); connect(VChiWatLooOrSec.y, ctl.VChiWatLooOrSec_flow); connect(VHeaWatLooOrSec.y, ctl.VHeaWatLooOrSec_flow); connect(TChiWatLooOrSecRet.y, ctl.TChiWatLooOrSecRet); connect(THeaWatLooOrSecRet.y, ctl.THeaWatLooOrSecRet); end AirToWater;

Buildings.Templates.Plants.HeatPumps.Components.Controls.OpenLoop Buildings.Templates.Plants.HeatPumps.Components.Controls.OpenLoop

Open-loop controller

Buildings.Templates.Plants.HeatPumps.Components.Controls.OpenLoop

Information

This is an open loop controller providing control inputs for the plant model Buildings.Templates.Plants.HeatPumps.AirToWater. It is only used for testing purposes.

Extends from Buildings.Templates.Plants.HeatPumps.Components.Interfaces.PartialController (Interface for heat pump plant controller).

Parameters

TypeNameDefaultDescription
Controllerdat Parameter record for controller
Booleanhave_senVHeaWatPri Set to true for plants with primary HW flow sensor
Booleanhave_senVHeaWatLoo Set to true for plants with HW loop flow sensor
Booleanhave_senVHeaWatSec Set to true for plants with secondary HW flow sensor
Booleanhave_senVChiWatPri Set to true for plants with primary CHW flow sensor
Booleanhave_senVChiWatLoo Set to true for plants with CHW loop flow sensor
Booleanhave_senVChiWatSec Set to true for plants with secondary CHW flow sensor
Booleanhave_senTHeaWatPriRet Set to true for plants with primary HW return temperature sensor
Booleanhave_senTHeaWatLooRet Set to true for plants with HW loop return temperature sensor
Booleanhave_senTChiWatPriRet Set to true for plants with primary CHW return temperature sensor
Booleanhave_senTChiWatLooRet Set to true for plants with CHW loop return temperature sensor
Booleanhave_senTHeaWatSecSup Set to true for plants with secondary HW supply temperature sensor
Booleanhave_senTChiWatSecSup Set to true for plants with secondary CHW supply temperature sensor
Booleanhave_senTHeaWatSecRet Set to true for plants with secondary HW return temperature sensor
Booleanhave_senTChiWatSecRet Set to true for plants with secondary CHW return temperature sensor
Configuration
HeatPumpPlantcfg Plant configuration parameters
ControllertypBuildings.Templates.Plants.H...Type of controller
IntegernAirHan Number of air handling units served by the plant
IntegernEquZon Number of terminal units (zone equipment) served by the plant
Sensors
Booleanhave_senTPriRet_selectfalseSet to true for plants with primary CHW/HW return temperature sensor
Booleanhave_senTLooRet_selectfalseSet to true for plants with CHW/HW loop return temperature sensor (load side of minimum flow bypass)
Booleanhave_senDpHeaWatRemWirfalseSet to true for remote HW differential pressure sensor(s) hardwired to plant or pump controller
IntegernSenDpHeaWatRem1Number of remote HW differential pressure sensors used for HW pump speed control
Booleanhave_senDpChiWatRemWirhave_senDpHeaWatRemWirSet to true for remote CHW differential pressure sensor(s) hardwired to plant or pump controller
IntegernSenDpChiWatRem1Number of remote CHW differential pressure sensors used for CHW pump speed control
Plant enable
Booleanhave_inpSchfalseSet to true to provide schedule via software input point

Connectors

TypeNameDescription
BusbusPlant control bus
BusbusAirHan[nAirHan]Air handling unit control bus
BusbusEquZon[nEquZon]Terminal unit control bus

Modelica definition

block OpenLoop "Open-loop controller" extends Buildings.Templates.Plants.HeatPumps.Components.Interfaces.PartialController( final typ=Buildings.Templates.Plants.HeatPumps.Types.Controller.OpenLoop); Buildings.Controls.OBC.CDL.Reals.Sources.Constant THeaWatSupSet[nHp + nPhp]( y(each final unit="K", each displayUnit="degC"), each k=Buildings.Templates.Data.Defaults.THeaWatSupMed) "HW supply temperature set point"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TChiWatSupSet[nHp + nPhp]( y(each final unit="K", each displayUnit="degC"), each k=Buildings.Templates.Data.Defaults.TChiWatSup) "CHW supply temperature set point"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1ValHeaWatHpInlIso[nHp]( each table=[0, 0; 1, 1; 3, 0], each timeScale=1000, each period=5000) if cfg.have_hp and cfg.have_heaWat and cfg.have_valHpInlIso "Heat pump inlet HW isolation valve opening signal"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1ValHeaWatHpOutIso[nHp]( each table=[0, 0; 1, 1; 3, 0], each timeScale=1000, each period=5000) if cfg.have_hp and cfg.have_heaWat and cfg.have_valHpOutIso "Heat pump outlet HW isolation valve opening signal"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1ValChiWatHpInlIso[nHp]( each table=[0, 0; 3.1, 1; 5, 0], each timeScale=1000, each period=5000) if cfg.have_hp and cfg.have_chiWat and cfg.have_valHpInlIso "Heat pump inlet CHW isolation valve opening signal"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1ValChiWatHpOutIso[nHp]( each table=[0, 0; 3.1, 1; 5, 0], each timeScale=1000, each period=5000) if cfg.have_hp and cfg.have_chiWat and cfg.have_valHpOutIso "Heat pump outlet CHW isolation valve opening signal"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1Hp[nHp]( each table=[0, 0; 1, 1], each timeScale=1000, each period=5000) if cfg.have_hp "Heat pump start/stop command"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1HeaHp[nHp]( each table=[0, 1; 3, 0], each timeScale=1000, each period=5000) if cfg.have_hp and cfg.is_rev "Heat pump heating mode command"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1PumHeaWatPri[cfg.nPumHeaWatPri]( each table=if cfg.typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Headered or cfg.have_pumChiWatPriDedHp or not cfg.have_chiWat then [0,0; 1,1; 3, 0; 5,0] else [0,0; 1,1; 3,0; 3.1,1; 5,0], each timeScale=1000, each period=5000) if cfg.have_heaWat "Primary CHW pump start/stop command"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1PumChiWatPri[cfg.nPumChiWatPri]( each table=[0, 0; 3.1, 1; 5, 0], each timeScale=1000, each period=5000) if cfg.typPumChiWatPri <> Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.None "Primary CHW pump start/stop command"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1PumHeaWatSec[cfg.nPumHeaWatSec]( each table=[0, 0; 1, 1; 3, 0; 5, 0], each timeScale=1000, each period=5000) if cfg.typPumHeaWatSec <> Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.None "Secondary HW pump start/stop command"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1PumChiWatSec[cfg.nPumChiWatSec]( each table=[0, 0; 3.1, 1; 5, 1], each timeScale=1000, each period=5000) if cfg.typPumChiWatSec <> Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.None "Secondary CHW pump start/stop command"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant yPumHeaWatSec(k=1) if cfg.typPumHeaWatSec <> Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.None "Secondary HW pump speed signal"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant yPumChiWatSec(k=1) if cfg.typPumChiWatSec <> Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.None "Secondary CHW pump speed signal"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant yPumHeaWatPriHdr( k=dat.yPumHeaWatPriHdrSet) if cfg.typPumHeaWatPri == Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable and cfg.typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Headered "Headered primary HW pump speed signal"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant yPumChiWatPriHdr( k=dat.yPumChiWatPriHdrSet) if cfg.typPumChiWatPri == Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable and cfg.typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Headered "Headered primary CHW pump speed signal"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant yPumHeaWatPriDed[cfg.nPumHeaWatPri]( k=cat(1, fill(dat.yPumHeaWatPriDedHpSet, cfg.nHp), fill(dat.yPumHeaWatPriDedPhpSet, cfg.nPhp))) if cfg.typPumHeaWatPri == Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable and cfg.typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Dedicated "Dedicated primary HW pump speed signal"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant yPumChiWatPriDed[cfg.nPumChiWatPri]( k=if cfg.have_pumChiWatPriDedHp then cat(1, fill(dat.yPumChiWatPriDedHpSet, cfg.nHp), fill(dat.yPumChiWatPriDedPhpSet, cfg.nPhp)) else fill(dat.yPumChiWatPriDedPhpSet, cfg.nPhp)) if cfg.typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Dedicated and cfg.typPumChiWatPri == Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable "Dedicated primary CHW pump speed signal"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1ValChiWatPhpInlIso[nPhp]( each table=[0, 0; 3.1, 1; 5, 0], each timeScale=1000, each period=5000) if cfg.have_php and cfg.have_chiWat and cfg.have_valPhpInlIso "Polyvalent HP inlet CHW isolation valve opening signal"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1ValChiWatPhpOutIso[nPhp]( each table=[0, 0; 3.1, 1; 5, 0], each timeScale=1000, each period=5000) if cfg.have_php and cfg.have_chiWat and cfg.have_valPhpOutIso "Polyvalent HP outlet CHW isolation valve opening signal"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1ValHeaWatPhpInlIso[nPhp]( each table=[0, 0; 1, 1; 3, 0; 5, 0], each timeScale=1000, each period=5000) if cfg.have_php and cfg.have_heaWat and cfg.have_valPhpInlIso "Polyvalent HP inlet HW isolation valve opening signal"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1ValHeaWatPhpOutIso[nPhp]( each table=[0, 0; 1, 1; 3, 0; 5, 0], each timeScale=1000, each period=5000) if cfg.have_php and cfg.have_heaWat and cfg.have_valPhpOutIso "Polyvalent HP outlet HW isolation valve opening signal"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1HeaPhp[nPhp]( each table=[0, 0; 1, 1; 4, 0], each timeScale=1000, each period=5000) if cfg.have_php "Polyvalent HP heating on/off command"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1CooPhp[nPhp]( each table=[0, 0; 2.5, 1], each timeScale=1000, each period=5000) if cfg.have_php "Polyvalent HP cooling on/off command"; equation /* Control point connection - start */ connect(TChiWatSupSet[nHp + 1:nHp + nPhp].y, busPhp.TChiWatSet); connect(THeaWatSupSet[nHp + 1:nHp + nPhp].y, busPhp.THeaWatSet); connect(y1Hp.y[1], busHp.y1); connect(y1HeaHp.y[1], busHp.y1Hea); connect(y1PumChiWatPri.y[1], busPumChiWatPri.y1); connect(yPumChiWatPriHdr.y, busPumChiWatPri.y); connect(yPumChiWatPriDed.y, busPumChiWatPri.y); connect(y1PumChiWatSec.y[1], busPumChiWatSec.y1); connect(yPumChiWatSec.y, busPumChiWatSec.y); connect(y1PumHeaWatPri.y[1], busPumHeaWatPri.y1); connect(yPumHeaWatPriHdr.y, busPumHeaWatPri.y); connect(yPumHeaWatPriDed.y, busPumHeaWatPri.y); connect(y1PumHeaWatSec.y[1], busPumHeaWatSec.y1); connect(yPumHeaWatSec.y, busPumHeaWatSec.y); connect(TChiWatSupSet[1:nHp].y, busHp.TChiWatSet); connect(THeaWatSupSet[1:nHp].y, busHp.THeaWatSet); connect(y1CooPhp.y[1], busPhp.y1Coo); connect(y1HeaPhp.y[1], busPhp.y1Hea); connect(y1ValChiWatHpInlIso.y[1], busValChiWatHpInlIso.y1); connect(y1ValChiWatHpOutIso.y[1], busValChiWatHpOutIso.y1); connect(y1ValHeaWatHpInlIso.y[1], busValHeaWatHpInlIso.y1); connect(y1ValHeaWatHpOutIso.y[1], busValHeaWatHpOutIso.y1); connect(y1ValChiWatPhpInlIso.y[1], busValChiWatPhpInlIso.y1); connect(y1ValChiWatPhpOutIso.y[1], busValChiWatPhpOutIso.y1); connect(y1ValHeaWatPhpInlIso.y[1], busValHeaWatPhpInlIso.y1); connect(y1ValHeaWatPhpOutIso.y[1], busValHeaWatPhpOutIso.y1); /* Control point connection - stop */ end OpenLoop;

Buildings.Templates.Plants.HeatPumps.Components.Controls.PrimaryPumpSignalRouting Buildings.Templates.Plants.HeatPumps.Components.Controls.PrimaryPumpSignalRouting

Primary pump signal routing between plant bus and controller connectors

Buildings.Templates.Plants.HeatPumps.Components.Controls.PrimaryPumpSignalRouting

Information

This block routes the primary pump start and stop commands, speed commands (for variable speed pumps) and status signals between the connectors exposed to the primary pump controller and the plant bus. Depending on the primary pump arrangement, the signals are either mapped to the headered pump connectors or split between the dedicated pump connectors serving the reversible heat pumps and those serving the polyvalent heat pumps.

Parameters

TypeNameDefaultDescription
PumpsPrimarytyp Type of primary pumps
PumpArrangementtypArr Type of primary pump arrangement
IntegernPum Number of primary pumps
IntegernHp Number of heat pumps
IntegernPhp Number of polyvalent heat pumps

Connectors

TypeNameDescription
output BooleanOutputy1Hdr_actual[nPum]Pump status – Headered pumps
output BooleanOutputy1DedHp_actual[nHp]Pump status – HP dedicated pumps
output BooleanOutputy1DedPhp_actual[nPhp]Pump status – Polyvalent HP dedicated pumps
input BooleanInputy1Hdr[nPum]Pump start command – Headered pumps
input BooleanInputy1DedHp[nHp]Pump start command – HP dedicated pumps
input BooleanInputy1DedPhp[nPhp]Pump start command – Polyvalent HP dedicated pumps
input RealInputyHdrPump speed command – Headered pumps
input RealInputyDedHp[nHp]Pump speed command – HP dedicated pumps
input RealInputyDedPhp[nPhp]Pump speed command – Polyvalent HP dedicated pumps
BusbusMain connector for all pumps

Modelica definition

block PrimaryPumpSignalRouting "Primary pump signal routing between plant bus and controller connectors" parameter Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary typ "Type of primary pumps"; parameter Buildings.Templates.Components.Types.PumpArrangement typArr "Type of primary pump arrangement"; parameter Integer nPum "Number of primary pumps"; parameter Integer nHp "Number of heat pumps"; parameter Integer nPhp "Number of polyvalent heat pumps"; Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1Hdr_actual[nPum] if typArr == Buildings.Templates.Components.Types.PumpArrangement.Headered "Pump status – Headered pumps"; Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1DedHp_actual[nHp] if typArr == Buildings.Templates.Components.Types.PumpArrangement.Dedicated and nHp > 0 "Pump status – HP dedicated pumps"; Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1DedPhp_actual[nPhp] if typArr == Buildings.Templates.Components.Types.PumpArrangement.Dedicated and nPhp > 0 "Pump status – Polyvalent HP dedicated pumps"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput y1Hdr[nPum] if typArr == Buildings.Templates.Components.Types.PumpArrangement.Headered "Pump start command – Headered pumps"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput y1DedHp[nHp] if typArr == Buildings.Templates.Components.Types.PumpArrangement.Dedicated and nHp > 0 "Pump start command – HP dedicated pumps"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput y1DedPhp[nPhp] if typArr == Buildings.Templates.Components.Types.PumpArrangement.Dedicated and nPhp > 0 "Pump start command – Polyvalent HP dedicated pumps"; Buildings.Controls.OBC.CDL.Interfaces.RealInput yHdr if typArr == Buildings.Templates.Components.Types.PumpArrangement.Headered and typ == Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable "Pump speed command – Headered pumps"; Buildings.Controls.OBC.CDL.Interfaces.RealInput yDedHp[nHp] if typArr == Buildings.Templates.Components.Types.PumpArrangement.Dedicated and typ == Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable and nHp > 0 "Pump speed command – HP dedicated pumps"; Buildings.Controls.OBC.CDL.Interfaces.RealInput yDedPhp[nPhp] if typArr == Buildings.Templates.Components.Types.PumpArrangement.Dedicated and typ == Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable and nPhp > 0 "Pump speed command – Polyvalent HP dedicated pumps"; Buildings.Templates.Components.Interfaces.Bus bus "Main connector for all pumps"; equation connect(y1Hdr, bus.y1); connect(yHdr, bus.y); connect(y1Hdr_actual, bus.y1_actual); connect(y1DedHp, bus.y1[1:nHp]); connect(yDedHp, bus.y[1:nHp]); connect(y1DedHp_actual, bus.y1_actual[1:nHp]); connect(y1DedPhp, bus.y1[nPum - nPhp + 1:nPum]); connect(yDedPhp, bus.y[nPum - nPhp + 1:nPum]); connect(y1DedPhp_actual, bus.y1_actual[nPum - nPhp + 1:nPum]); end PrimaryPumpSignalRouting;