Buildings.Obsolete.DHC.ETS.Combined.Controls

Package with control models

Information

This package contains controllers for models in Buildings.Obsolete.DHC.ETS.Combined.

Extends from Modelica.Icons.Package (Icon for standard packages).

Package Content

Name Description
Buildings.Obsolete.DHC.ETS.Combined.Controls.Borefield Borefield Borefield controller
Buildings.Obsolete.DHC.ETS.Combined.Controls.Chiller Chiller Chiller controller
Buildings.Obsolete.DHC.ETS.Combined.Controls.HeatExchanger HeatExchanger District heat exchanger controller
Buildings.Obsolete.DHC.ETS.Combined.Controls.SideCold SideCold Control block for cold side
Buildings.Obsolete.DHC.ETS.Combined.Controls.SideHot SideHot Control block for hot side
Buildings.Obsolete.DHC.ETS.Combined.Controls.Supervisory Supervisory Supervisory controller
Buildings.Obsolete.DHC.ETS.Combined.Controls.BaseClasses BaseClasses Package with base classes for Buildings.Obsolete.DHC.ETS.Combined.Controls

Buildings.Obsolete.DHC.ETS.Combined.Controls.Borefield Buildings.Obsolete.DHC.ETS.Combined.Controls.Borefield

Borefield controller

Buildings.Obsolete.DHC.ETS.Combined.Controls.Borefield

Information

This block implements the control logic for the borefield system. The main control signal u is yielded by the hot side or cold side controller, see for instance Buildings.Obsolete.DHC.ETS.Combined.Controls.SideHot.

The system is enabled when

When the system is enabled,

Note that the first control signal for the valve is needed to stabilize the control of the system when the mass flow rate required to meet the heat or cold rejection demand is below the flow rate corresponding to the minimum pump speed.

Parameters

TypeNameDefaultDescription
RealTBorWatEntMax Maximum value of borefield water entering temperature [K]
RealspePumBorMin0.1Borefield pump minimum speed [1]

Connectors

TypeNameDescription
input RealInputyValIso_actual[2]Isolation valves return position (fractional)
input RealInputuControl signal from supervisory
output RealOutputyPumControl signal for borefield pump [kg/s]
output RealOutputyValMixControl signal for borefield mixing valve [1]
input RealInputTBorWatEntBorefield water entering temperature [K]

Modelica definition

model Borefield "Borefield controller" parameter Real TBorWatEntMax( final quantity="ThermodynamicTemperature", final unit="K", displayUnit="degC") "Maximum value of borefield water entering temperature"; parameter Real spePumBorMin( final unit="1")=0.1 "Borefield pump minimum speed"; Buildings.Controls.OBC.CDL.Interfaces.RealInput yValIso_actual[2] "Isolation valves return position (fractional)"; Buildings.Controls.OBC.CDL.Interfaces.RealInput u "Control signal from supervisory"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yPum( final unit="kg/s") "Control signal for borefield pump"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yValMix( final unit="1") "Control signal for borefield mixing valve"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TBorWatEnt( final unit="K", displayUnit="degC") "Borefield water entering temperature"; Buildings.Controls.OBC.CDL.Reals.PIDWithReset conMix( final yMin=0, final yMax=1, final reverseActing=true, y_reset=0, k=0.1, final controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, Ti(displayUnit="s")=120) "Mixing valve controller"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant maxTBorWatEnt( y(final unit="K", displayUnit="degC"), final k=TBorWatEntMax) "Maximum value of borefield water entering temperature"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold opeVal( final t=0.9, final h=0.1) "True if at least one isolation valve is open"; Buildings.Controls.OBC.CDL.Reals.MultiMax multiMax1( final nin=2) "Maximum opening"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold enaSup( final t=0.05, final h=0.025) "Borefield enabled from supervisory"; Buildings.Controls.OBC.CDL.Reals.Switch runBor "Enable borefield system pump"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant limVal( final k=0.3) "Control signal value for full opening of the valve"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant speMin( final k=spePumBorMin) "Minimum pump speed"; Buildings.Controls.OBC.CDL.Logical.And enaBor "Borefield enable signal"; Buildings.Controls.OBC.CDL.Reals.Line mapSpe "Mapping function for pump speed"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant one( final k=1) "One"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant zer( final k=0) "Zero"; Buildings.Controls.OBC.CDL.Reals.Line mapVal "Mapping function for valve opening"; Buildings.Controls.OBC.CDL.Reals.Min min1 "Minimum"; equation connect(multiMax1.y,opeVal.u); connect(yValIso_actual,multiMax1.u); connect(u,enaSup.u); connect(enaSup.y,enaBor.u1); connect(opeVal.y,enaBor.u2); connect(enaBor.y,conMix.trigger); connect(maxTBorWatEnt.y,conMix.u_s); connect(runBor.y,yPum); connect(TBorWatEnt,conMix.u_m); connect(enaBor.y,runBor.u2); connect(mapSpe.y,runBor.u1); connect(u,mapSpe.u); connect(speMin.y,mapSpe.f1); connect(min1.y,yValMix); connect(conMix.y,min1.u2); connect(mapVal.y,min1.u1); connect(one.y,mapSpe.x2); connect(one.y,mapSpe.f2); connect(one.y,mapVal.f2); connect(zer.y,mapVal.x1); connect(limVal.y,mapVal.x2); connect(u,mapVal.u); connect(limVal.y,mapSpe.x1); connect(zer.y,mapVal.f1); connect(zer.y,runBor.u3); end Borefield;

Buildings.Obsolete.DHC.ETS.Combined.Controls.Chiller Buildings.Obsolete.DHC.ETS.Combined.Controls.Chiller

Chiller controller

Buildings.Obsolete.DHC.ETS.Combined.Controls.Chiller

Information

This is a controller for the chiller system, which includes the dedicated condenser and evaporator pumps.

The system is enabled if any of the input control signals uHea or uCoo is true. When enabled,

Parameters

TypeNameDefaultDescription
RealTConWatEntMin Minimum value of condenser water entering temperature [K]
RealTEvaWatEntMax Maximum value of evaporator water entering temperature [K]

Connectors

TypeNameDescription
input BooleanInputuCooCooling enable signal
input BooleanInputuHeaHeating enable signal
input RealInputTConWatEntCondenser water entering temperature [K]
input RealInputTEvaWatEntEvaporator water entering temperature [K]
output RealOutputyValConCondenser mixing valve control signal
output RealOutputyValEvaEvaporator mixing valve control signal
output BooleanOutputyChiChiller enable signal

Modelica definition

model Chiller "Chiller controller" parameter Real TConWatEntMin( final quantity="ThermodynamicTemperature", final unit="K", displayUnit="degC") "Minimum value of condenser water entering temperature"; parameter Real TEvaWatEntMax( final quantity="ThermodynamicTemperature", final unit="K", displayUnit="degC") "Maximum value of evaporator water entering temperature"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uCoo "Cooling enable signal"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uHea "Heating enable signal"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TConWatEnt( final unit="K", displayUnit="degC") "Condenser water entering temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TEvaWatEnt( final unit="K", displayUnit="degC") "Evaporator water entering temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yValCon "Condenser mixing valve control signal"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yValEva "Evaporator mixing valve control signal"; Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yChi "Chiller enable signal"; Buildings.Controls.OBC.CDL.Logical.Or heaOrCoo "Heating or cooling enabled"; Buildings.Controls.OBC.Utilities.PIDWithEnable conValEva( final controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, final yMax=1, final yMin=0, y_reset=0, k=0.1, Ti( displayUnit="s")=60, final reverseActing=true) "Evaporator three-way valve control"; Buildings.Controls.OBC.Utilities.PIDWithEnable conValCon( final controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, final yMax=1, final yMin=0, y_reset=0, k=0.1, Ti( displayUnit="s")=60, final reverseActing=false) "Condenser three-way valve control"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant maxTEvaWatEnt( y(final unit="K", displayUnit="degC"), final k=TEvaWatEntMax) "Maximum value of evaporator water entering temperature"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant minTConWatEnt( y(final unit="K", displayUnit="degC"), final k=TConWatEntMin) "Minimum value of condenser water entering temperature"; equation connect(TEvaWatEnt,conValEva.u_m); connect(TConWatEnt,conValCon.u_m); connect(heaOrCoo.y,yChi); connect(uHea,heaOrCoo.u1); connect(uCoo,heaOrCoo.u2); connect(maxTEvaWatEnt.y,conValEva.u_s); connect(minTConWatEnt.y,conValCon.u_s); connect(conValEva.y,yValEva); connect(heaOrCoo.y,conValEva.uEna); connect(heaOrCoo.y,conValCon.uEna); connect(conValCon.y,yValCon); end Chiller;

Buildings.Obsolete.DHC.ETS.Combined.Controls.HeatExchanger Buildings.Obsolete.DHC.ETS.Combined.Controls.HeatExchanger

District heat exchanger controller

Buildings.Obsolete.DHC.ETS.Combined.Controls.HeatExchanger

Information

This block implements the control logic for the district heat exchanger, which realizes the interface between the building system and the district system.

The input signal u is yielded by the supervisory controller. The primary and secondary circuits are enabled to operate if this input signal is greater than zero and the return position of at least one isolation valve is greater than 90%. When enabled,

Note that the valve on the secondary side is needed to stabilize the control of the system when the secondary mass flow rate required to meet the heat or cold rejection demand is below the flow rate corresponding to the minimum pump speed.

Parameters

TypeNameDefaultDescription
ConnectionConfigurationconCon District connection configuration
RealspePum1Min0.1Heat exchanger primary pump minimum speed (fractional) [1]
RealspePum2Min0.1Heat exchanger secondary pump minimum speed (fractional) [1]

Connectors

TypeNameDescription
input RealInputyValIso[2]Isolation valves return position (index 1 for condenser)
output RealOutputy1District heat exchanger primary control signal [1]
output RealOutputyPum2District heat exchanger secondary pump control signal [1]
output RealOutputyVal2District heat exchanger secondary valve control signal [1]
input RealInputuControl signal for secondary side (from supervisory)

Modelica definition

model HeatExchanger "District heat exchanger controller" parameter Buildings.DHC.ETS.Types.ConnectionConfiguration conCon "District connection configuration"; parameter Real spePum1Min( final unit="1", min=0)=0.1 "Heat exchanger primary pump minimum speed (fractional)"; parameter Real spePum2Min( final unit="1", min=0.01)=0.1 "Heat exchanger secondary pump minimum speed (fractional)"; Buildings.Controls.OBC.CDL.Interfaces.RealInput yValIso[2] "Isolation valves return position (index 1 for condenser)"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput y1( final unit="1") "District heat exchanger primary control signal"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yPum2( final unit="1") "District heat exchanger secondary pump control signal"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yVal2( final unit="1") "District heat exchanger secondary valve control signal"; Buildings.Controls.OBC.CDL.Reals.Max max1 "Maximum between control signal and minimum speed or opening"; Buildings.Controls.OBC.CDL.Reals.Switch swiOff1 "Output zero if not enabled"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant min1( final k=if have_val1 then 0 else spePum1Min) "Minimum pump speed or actuator opening"; Buildings.Controls.OBC.CDL.Interfaces.RealInput u "Control signal for secondary side (from supervisory)"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr( final t=0.01, final h=0.005) "Check for heat or cold rejection demand"; Buildings.Controls.OBC.CDL.Logical.And and2 "At least one valve is open and HX circuit is enabled"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold heaRej( final t=0.9, final h=0.1) "Heat rejection if condenser isolation valve is open"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold cooRej( final t=0.9, final h=0.1) "Cold rejection if evaporator isolation valve is open"; Buildings.Controls.OBC.CDL.Logical.Or or1 "At least one valve is open "; Buildings.Controls.OBC.CDL.Reals.Sources.Constant speMin( final k=spePum2Min) "Minimum pump speed"; Buildings.Controls.OBC.CDL.Reals.Switch swiOff2 "Output zero if not enabled"; Buildings.Controls.OBC.CDL.Reals.Line mapSpe "Mapping function for pump speed"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant one( final k=1) "One"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant zer( final k=0) "Zero"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant hal( final k=0.3) "Control signal value for full opening of the valve"; Buildings.Controls.OBC.CDL.Reals.Line mapVal "Mapping function for valve opening"; protected parameter Boolean have_val1=conCon == Buildings.DHC.ETS.Types.ConnectionConfiguration.TwoWayValve "True in case of control valve on district side, false in case of a pump"; equation connect(swiOff1.y, y1); connect(max1.y,swiOff1.u1); connect(u,greThr.u); connect(greThr.y,and2.u1); connect(and2.y,swiOff1.u2); connect(cooRej.y,or1.u2); connect(heaRej.y,or1.u1); connect(or1.y,and2.u2); connect(min1.y,max1.u2); connect(swiOff2.y,yPum2); connect(one.y,mapSpe.x2); connect(one.y,mapSpe.f2); connect(u,mapSpe.u); connect(speMin.y,mapSpe.f1); connect(mapSpe.y,swiOff2.u1); connect(zer.y,swiOff2.u3); connect(zer.y,swiOff1.u3); connect(hal.y,mapSpe.x1); connect(u,mapVal.u); connect(zer.y,mapVal.x1); connect(zer.y,mapVal.f1); connect(one.y,mapVal.f2); connect(hal.y,mapVal.x2); connect(mapVal.y,yVal2); connect(and2.y,swiOff2.u2); connect(u, max1.u1); connect(yValIso[1], heaRej.u); connect(yValIso[2], cooRej.u); end HeatExchanger;

Buildings.Obsolete.DHC.ETS.Combined.Controls.SideCold Buildings.Obsolete.DHC.ETS.Combined.Controls.SideCold

Control block for cold side

Buildings.Obsolete.DHC.ETS.Combined.Controls.SideCold

Information

This block serves as the controller for the cold side of the ETS in Buildings.Obsolete.DHC.ETS.Combined.Controls.Supervisory. It computes the following control signals.

Parameters

TypeNameDefaultDescription
IntegernSouAmb1Number of ambient sources to control
RealTChiWatSupSetMin Minimum value of chilled water supply temperature set point [K]
SimpleControllercontrollerTypeBuildings.Controls.OBC.CDL.T...Type of controller
Realk0.1Gain of controller
RealTi120Time constant of integrator block [s]

Connectors

TypeNameDescription
input BooleanInputuHeaCooEnable signal for heating or cooling
input RealInputTSetSupply temperature set point (heating or chilled water) [K]
input RealInputuColCold rejection control signal
input RealInputTBotTemperature at bottom of tank [K]
output RealOutputTChiWatSupSetChilled water supply temperature set point [K]
output RealOutputyAmb[nSouAmb]Control signal for ambient sources [1]
output RealOutputyValIsoAmbient loop isolation valve control signal [1]

Modelica definition

model SideCold "Control block for cold side" parameter Integer nSouAmb=1 "Number of ambient sources to control"; parameter Real TChiWatSupSetMin( final quantity="ThermodynamicTemperature", final unit="K", displayUnit="degC") "Minimum value of chilled water supply temperature set point"; parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI "Type of controller"; parameter Real k( min=0)=0.1 "Gain of controller"; parameter Real Ti( min=Buildings.Controls.OBC.CDL.Constants.small, final quantity="Time", final unit="s")=120 "Time constant of integrator block"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uHeaCoo "Enable signal for heating or cooling"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TSet( final unit="K", displayUnit="degC") "Supply temperature set point (heating or chilled water)"; Buildings.Controls.OBC.CDL.Interfaces.RealInput uCol "Cold rejection control signal"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TBot( final unit="K", displayUnit="degC") "Temperature at bottom of tank"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput TChiWatSupSet( final unit="K", displayUnit="degC") "Chilled water supply temperature set point"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yAmb[nSouAmb]( each final unit="1") "Control signal for ambient sources"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yValIso( final unit="1") "Ambient loop isolation valve control signal"; Buildings.Controls.OBC.CDL.Reals.Line mapFun[nSouAmb] "Mapping functions for ambient source control"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant x1[nSouAmb]( final k={(i-1) for i in 1:nSouAmb}) "x1"; Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator rep( final nout=nSouAmb) "Replicate control signal"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant f1[nSouAmb]( each final k=0) "f1"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant f2[nSouAmb]( each final k=1) "f2"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant x2[nSouAmb]( final k={(i) for i in 1:nSouAmb}) "x2"; Buildings.Controls.OBC.Utilities.PIDWithEnable conTChiWatSup( final k=k, final Ti=Ti, final controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, final yMin=0, final yMax=1, final reverseActing=false) "Controller for CHWST"; Buildings.Controls.OBC.CDL.Reals.Line mapFunTChiSupSet "Mapping function for CHWST reset"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant minTChiWatSup( y(final unit="K", displayUnit="degC"), final k=TChiWatSupSetMin) "Minimum value of chilled water supply temperature"; Buildings.Controls.OBC.CDL.Reals.AddParameter addPar( p=nSouAmb) "One minus control loop output"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai( k=-nSouAmb) "Gain factor"; Buildings.Controls.OBC.CDL.Reals.Max max1 "CHWST reset signal"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant zer( k=0) "Zero"; Buildings.Controls.OBC.CDL.Reals.AddParameter subNumSou( p=-nSouAmb) "Control signal minus nSouAmb"; Buildings.Controls.OBC.CDL.Reals.Min min1 "Ambient source control signal"; Buildings.Controls.OBC.CDL.Reals.LimitSlewRate ramLimHea( raisingSlewRate=0.1) "Limit the rate of change"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea "Convert DO to AO signal"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr( t = 0.01, h = 0.005) "Control signal is non zero (with 1% tolerance)"; Buildings.Controls.OBC.CDL.Logical.TrueFalseHold truFalHol( trueHoldDuration=300) "Hold logical signal to avoid short cycling"; Buildings.Controls.OBC.CDL.Logical.Pre pre "Block to avoid an algebraic loop during initialization"; equation connect(x1.y,mapFun.x1); connect(rep.y,mapFun.u); connect(f1.y,mapFun.f1); connect(f2.y,mapFun.f2); connect(x2.y,mapFun.x2); connect(TSet,conTChiWatSup.u_s); connect(TBot,conTChiWatSup.u_m); connect(f2[1].y,mapFunTChiSupSet.x2); connect(minTChiWatSup.y,mapFunTChiSupSet.f2); connect(TSet,mapFunTChiSupSet.f1); connect(uCol,subNumSou.u); connect(max1.y,mapFunTChiSupSet.u); connect(uCol,min1.u1); connect(addPar.y,min1.u2); connect(min1.y,rep.u); connect(mapFun.y,yAmb); connect(ramLimHea.y,TChiWatSupSet); connect(uHeaCoo,conTChiWatSup.uEna); connect(zer.y,mapFunTChiSupSet.x1); connect(uCol,greThr.u); connect(mapFunTChiSupSet.y,ramLimHea.u); connect(zer.y,max1.u2); connect(subNumSou.y,max1.u1); connect(conTChiWatSup.y, gai.u); connect(gai.y, addPar.u); connect(truFalHol.y, booToRea.u); connect(booToRea.y, yValIso); connect(greThr.y, pre.u); connect(pre.y, truFalHol.u); end SideCold;

Buildings.Obsolete.DHC.ETS.Combined.Controls.SideHot Buildings.Obsolete.DHC.ETS.Combined.Controls.SideHot

Control block for hot side

Buildings.Obsolete.DHC.ETS.Combined.Controls.SideHot

Information

This block serves as the controller for the hot side of the ETS in Buildings.Obsolete.DHC.ETS.Combined.Controls.Supervisory. It computes the following control signals.

Parameters

TypeNameDefaultDescription
IntegernSouAmb1Number of ambient sources to control
RealdTDea1Temperature difference band between set point tracking and heat rejection (absolute value) [K]
RealdTLocdTDea + 2Temperature difference between set point tracking and cold rejection lockout (absolute value) [K]
SimpleControllercontrollerTypeBuildings.Controls.OBC.CDL.T...Type of controller
Realk0.1Gain of controller
RealTi120Time constant of integrator block [s]

Connectors

TypeNameDescription
input BooleanInputuHeaEnable signal for heating
input BooleanInputuCooEnable signal for cooling
input RealInputTSetSupply temperature set point (heating or chilled water) [K]
input RealInputTTopTemperature at top of tank [K]
input RealInputyValIsoCon_actualReturn position of condenser to ambient loop isolation valve [1]
input RealInputyValIsoEva_actualReturn position of evaporator to ambient loop isolation valve [1]
output RealOutputyAmb[nSouAmb]Control signal for ambient sources [1]
output RealOutputyValIsoAmbient loop isolation valve control signal [1]
output RealOutputyColControl signal for cold side [1]

Modelica definition

block SideHot "Control block for hot side" parameter Integer nSouAmb=1 "Number of ambient sources to control"; parameter Real dTDea( final min=0, final quantity="TemperatureDifference", final unit="K") = 1 "Temperature difference band between set point tracking and heat rejection (absolute value)"; parameter Real dTLoc( final min=0, final quantity="TemperatureDifference", final unit="K") = dTDea + 2 "Temperature difference between set point tracking and cold rejection lockout (absolute value)"; parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI "Type of controller"; parameter Real k( min=0)=0.1 "Gain of controller"; parameter Real Ti( final min=Buildings.Controls.OBC.CDL.Constants.small, final quantity="Time", final unit="s")=120 "Time constant of integrator block"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uHea "Enable signal for heating"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uCoo "Enable signal for cooling"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TSet( final unit="K", displayUnit="degC") "Supply temperature set point (heating or chilled water)"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TTop( final unit="K", displayUnit="degC") "Temperature at top of tank"; Buildings.Controls.OBC.CDL.Interfaces.RealInput yValIsoCon_actual( final unit="1") "Return position of condenser to ambient loop isolation valve"; Buildings.Controls.OBC.CDL.Interfaces.RealInput yValIsoEva_actual( final unit="1") "Return position of evaporator to ambient loop isolation valve"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yAmb[nSouAmb]( each final unit="1") "Control signal for ambient sources"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yValIso( final unit="1") "Ambient loop isolation valve control signal"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yCol( final unit="1") "Control signal for cold side"; Buildings.Controls.OBC.Utilities.PIDWithEnable conColRej( final k=k, final Ti=Ti, final controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, final yMin=0, final yMax=nSouAmb+1, final reverseActing=true) "Controller for cold rejection"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr( final t = 0.01, final h = 0.005) "Control signal is non zero (with 1% tolerance)"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea "Convert DO to AO signal"; Buildings.Controls.OBC.Utilities.PIDWithEnable conHeaRej( final k=k, final Ti=Ti, final controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, final yMin=0, final yMax=nSouAmb, final reverseActing=false) "Controller for heat rejection"; Buildings.Controls.OBC.CDL.Reals.Line mapFun[nSouAmb] "Mapping functions for controlled systems"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant x1[nSouAmb]( final k={(i-1) for i in 1:nSouAmb}) "x1"; Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator rep( final nout=nSouAmb) "Replicate control signal"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant f1[nSouAmb]( each final k=0) "f1"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant f2[nSouAmb]( each final k=1) "f2"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant x2[nSouAmb]( final k={(i) for i in 1:nSouAmb}) "x2"; Buildings.Controls.OBC.CDL.Reals.LessThreshold isValIsoConClo( final t=0.01, h=0.005) "Check if isolation valve is closed"; Buildings.Controls.OBC.CDL.Reals.LessThreshold isValIsoEvaClo( final t=0.01, h=0.005) "At least one signal is non zero"; Buildings.Controls.OBC.CDL.Logical.MultiAnd mulAnd( nin=3); Buildings.Controls.OBC.CDL.Reals.AddParameter addDea( p=dTDea) "Add dead band"; Buildings.Controls.OBC.CDL.Reals.AddParameter addLoc( p=dTLoc) "Add temperature difference for lockout"; Buildings.Controls.OBC.CDL.Reals.Less isBelLoc( h=0.1) "Check if temperature is below cold rejection lockout"; Buildings.Controls.OBC.CDL.Logical.TrueFalseHold truFalHol( trueHoldDuration=300) "Hold logical signal to avoid short cycling"; Buildings.Controls.OBC.CDL.Logical.Pre pre "Block to avoid algebraic loop during initialization"; Buildings.Controls.OBC.CDL.Logical.And and2 "And block to enable downstream controller for heat rejection"; equation connect(mapFun.y,yAmb); connect(TSet,conColRej.u_s); connect(TTop,conColRej.u_m); connect(conHeaRej.y,greThr.u); connect(x1.y,mapFun.x1); connect(conHeaRej.y,rep.u); connect(rep.y,mapFun.u); connect(f1.y,mapFun.f1); connect(f2.y,mapFun.f2); connect(x2.y,mapFun.x2); connect(conColRej.y,yCol); connect(TTop,conHeaRej.u_m); connect(yValIsoCon_actual,isValIsoConClo.u); connect(yValIsoEva_actual,isValIsoEvaClo.u); connect(mulAnd.y,conColRej.uEna); connect(TSet,addDea.u); connect(addDea.y,conHeaRej.u_s); connect(TSet,addLoc.u); connect(TTop,isBelLoc.u1); connect(addLoc.y,isBelLoc.u2); connect(uHea, mulAnd.u[1]); connect(isValIsoConClo.y,mulAnd.u[2]); connect(isBelLoc.y,mulAnd.u[3]); connect(truFalHol.y, booToRea.u); connect(booToRea.y, yValIso); connect(greThr.y, pre.u); connect(pre.y, truFalHol.u); connect(isValIsoEvaClo.y, and2.u2); connect(and2.y, conHeaRej.uEna); connect(and2.u1, uCoo); end SideHot;

Buildings.Obsolete.DHC.ETS.Combined.Controls.Supervisory Buildings.Obsolete.DHC.ETS.Combined.Controls.Supervisory

Supervisory controller

Buildings.Obsolete.DHC.ETS.Combined.Controls.Supervisory

Information

This block implements the supervisory control functions of the ETS model Buildings.DHC.ETS.Combined.HeatRecoveryHeatPump.

Extends from Buildings.Obsolete.DHC.ETS.Combined.Controls.BaseClasses.PartialSupervisory (Partial model for supervisory controller).

Parameters

TypeNameDefaultDescription
IntegernSouAmb Number of ambient sources to control
SimpleControllercontrollerTypeBuildings.Controls.OBC.CDL.T...Type of controller
RealkHot0.05Gain of controller on hot side
RealkCol0.1Gain of controller on cold side
RealTiHot300Time constant of integrator block on hot side [s]
RealTiCol120Time constant of integrator block on cold side [s]
RealTHeaWatSupSetMin Minimum value of heating water supply temperature set point [K]
RealTChiWatSupSetMin Minimum value of chilled water supply temperature set point [K]
RealTChiWatSupSetMax Maximum value of chilled water supply temperature set point [K]

Connectors

TypeNameDescription
input BooleanInputuHeaHeating enable signal
input BooleanInputuCooCooling enable signal
input RealInputTChiWatSupPreSetChilled water supply temperature set point [K]
input RealInputTChiWatBotChilled water temperature at tank bottom [K]
input RealInputTHeaWatTopHeating water temperature at tank top [K]
input RealInputTHeaWatSupPreSetHeating water supply temperature set point [K]
output RealOutputTHeaWatSupSetHeating water supply temperature set point after reset [K]
output RealOutputTChiWatSupSetChilled water supply temperature set point after reset [K]
output RealOutputyValIsoEvaEvaporator to ambient loop isolation valve control signal [1]
output RealOutputyValIsoConCondenser to ambient loop isolation valve control signal [1]
output RealOutputyAmb[nSouAmb]Control output for ambient sources [1]
output BooleanOutputyHeaTank in heating demand
output BooleanOutputyCooTank in cooling demand
input RealInputyValIsoCon_actualReturn position of condenser to ambient loop isolation valve [1]
input RealInputyValIsoEva_actualReturn position of evaporator to ambient loop isolation valve [1]

Modelica definition

model Supervisory "Supervisory controller" extends Buildings.Obsolete.DHC.ETS.Combined.Controls.BaseClasses.PartialSupervisory; parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI "Type of controller"; parameter Real kHot( min=0)=0.05 "Gain of controller on hot side"; parameter Real kCol( min=0)=0.1 "Gain of controller on cold side"; parameter Real TiHot( final min=Buildings.Controls.OBC.CDL.Constants.small, final quantity="Time", final unit="s") = 300 "Time constant of integrator block on hot side"; parameter Real TiCol( final min=Buildings.Controls.OBC.CDL.Constants.small, final quantity="Time", final unit="s") = 120 "Time constant of integrator block on cold side"; parameter Real THeaWatSupSetMin( final quantity="ThermodynamicTemperature", final unit="K", displayUnit="degC") "Minimum value of heating water supply temperature set point"; parameter Real TChiWatSupSetMin( final quantity="ThermodynamicTemperature", final unit="K", displayUnit="degC") "Minimum value of chilled water supply temperature set point"; parameter Real TChiWatSupSetMax( final quantity="ThermodynamicTemperature", final unit="K", displayUnit="degC") "Maximum value of chilled water supply temperature set point"; Buildings.Controls.OBC.CDL.Interfaces.RealInput yValIsoCon_actual( final unit="1") "Return position of condenser to ambient loop isolation valve"; Buildings.Controls.OBC.CDL.Interfaces.RealInput yValIsoEva_actual( final unit="1") "Return position of evaporator to ambient loop isolation valve"; Buildings.Obsolete.DHC.ETS.Combined.Controls.SideHot conHot( final k=kHot, final Ti=TiHot, final nSouAmb=nSouAmb, final controllerType=controllerType) "Hot side controller"; Buildings.Obsolete.DHC.ETS.Combined.Controls.SideCold conCol( final k=kCol, final Ti=TiCol, final nSouAmb=nSouAmb, final controllerType=controllerType, final TChiWatSupSetMin=TChiWatSupSetMin) "Cold side controller"; Buildings.Controls.OBC.CDL.Reals.Max max1[nSouAmb] "Maximum of output control signals"; Buildings.DHC.ETS.Combined.Controls.Reset resTHeaSup( final TWatSupSetMinMax=THeaWatSupSetMin) "Heating water supply temperature reset"; Buildings.DHC.ETS.Combined.Controls.Reset resTCooSup( final TWatSupSetMinMax=TChiWatSupSetMax) "Chilled water supply temperature reset"; equation connect(conHot.yAmb,max1.u1); connect(conCol.yAmb,max1.u2); connect(conHot.yCol,conCol.uCol); connect(resTHeaSup.TWatSupSet, conHot.TSet); connect(THeaWatTop,conHot.TTop); connect(max1.y,yAmb); connect(TChiWatBot,conCol.TBot); connect(THeaWatSupPreSet, resTHeaSup.TWatSupPreSet); connect(conHot.yValIso,yValIsoCon); connect(conCol.yValIso,yValIsoEva); connect(resTHeaSup.TWatSupSet, THeaWatSupSet); connect(conCol.TChiWatSupSet,TChiWatSupSet); connect(uHeaHol.y, conHot.uHea); connect(uCooHol.y,conCol.uHeaCoo); connect(uHeaHol.y, resTHeaSup.u); connect(uHeaHol.y,yHea); connect(uCooHol.y,yCoo); connect(yValIsoCon_actual,conHot.yValIsoCon_actual); connect(yValIsoEva_actual,conHot.yValIsoEva_actual); connect(conHot.uCoo, uCooHol.y); connect(TChiWatSupPreSet, resTCooSup.TWatSupPreSet); connect(uCooHol.y, resTCooSup.u); connect(resTCooSup.TWatSupSet, conCol.TSet); end Supervisory;