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 |
Borefield
|
Borefield controller |
Chiller
|
Chiller controller |
HeatExchanger
|
District heat exchanger controller |
SideCold
|
Control block for cold side |
SideHot
|
Control block for hot side |
Supervisory
|
Supervisory controller |
BaseClasses
|
Package with base classes for Buildings.Obsolete.DHC.ETS.Combined.Controls |
Borefield controller
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
-
the main control signal is greater than zero,
-
the return position of at least one isolation valve is greater than 90%.
When the system is enabled,
-
the input signal is mapped to modulate in sequence the mixing valve
(from full bypass to closed bypass for a control signal varying between
0% and 30%) and the pump speed (from the minimum to the maximum value
for a control signal varying between 30% and 100%),
-
a PI loop tracks the maximum inlet temperature, the minimum between this
loop output and the previously mapped signal being used to modulate the
valve.
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
| Type | Name | Default | Description |
| Real | TBorWatEntMax | | Maximum value of borefield water entering temperature [K] |
| Real | spePumBorMin | 0.1 | Borefield pump minimum speed [1] |
Connectors
| Type | Name | Description |
| input RealInput | yValIso_actual[2] | Isolation valves return position (fractional) |
| input RealInput | u | Control signal from supervisory |
| output RealOutput | yPum | Control signal for borefield pump [kg/s] |
| output RealOutput | yValMix | Control signal for borefield mixing valve [1] |
| input RealInput | TBorWatEnt | Borefield water entering temperature [K] |
Modelica definition
model Borefield
parameter Real TBorWatEntMax(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC")
;
parameter Real spePumBorMin(
final unit="1")=0.1
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput yValIso_actual[2]
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput u
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yPum(
final unit="kg/s")
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yValMix(
final unit="1")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TBorWatEnt(
final unit="K",
displayUnit="degC")
;
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)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant maxTBorWatEnt(
y(
final unit="K",
displayUnit="degC"),
final k=TBorWatEntMax)
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold opeVal(
final t=0.9,
final h=0.1)
;
Buildings.Controls.OBC.CDL.Reals.MultiMax multiMax1(
final nin=2)
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold enaSup(
final t=0.05,
final h=0.025)
;
Buildings.Controls.OBC.CDL.Reals.Switch runBor
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant limVal(
final k=0.3)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant speMin(
final k=spePumBorMin)
;
Buildings.Controls.OBC.CDL.Logical.And enaBor
;
Buildings.Controls.OBC.CDL.Reals.Line mapSpe
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant one(
final k=1)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant zer(
final k=0)
;
Buildings.Controls.OBC.CDL.Reals.Line mapVal
;
Buildings.Controls.OBC.CDL.Reals.Min min1
;
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;
Chiller controller
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,
-
the condenser and evaporator pumps are operated at constant speed, and
-
the condenser (resp. evaporator) mixing valve is modulated with a PI
loop controlling the minimum (resp. maximum) inlet temperature.
Parameters
| Type | Name | Default | Description |
| Real | TConWatEntMin | | Minimum value of condenser water entering temperature [K] |
| Real | TEvaWatEntMax | | Maximum value of evaporator water entering temperature [K] |
Connectors
| Type | Name | Description |
| input BooleanInput | uCoo | Cooling enable signal |
| input BooleanInput | uHea | Heating enable signal |
| input RealInput | TConWatEnt | Condenser water entering temperature [K] |
| input RealInput | TEvaWatEnt | Evaporator water entering temperature [K] |
| output RealOutput | yValCon | Condenser mixing valve control signal |
| output RealOutput | yValEva | Evaporator mixing valve control signal |
| output BooleanOutput | yChi | Chiller enable signal |
Modelica definition
model Chiller
parameter Real TConWatEntMin(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC")
;
parameter Real TEvaWatEntMax(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC")
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uCoo
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uHea
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TConWatEnt(
final unit="K",
displayUnit="degC")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TEvaWatEnt(
final unit="K",
displayUnit="degC")
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yValCon
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yValEva
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yChi
;
Buildings.Controls.OBC.CDL.Logical.Or heaOrCoo
;
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)
;
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)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant maxTEvaWatEnt(
y(
final unit="K",
displayUnit="degC"),
final k=TEvaWatEntMax)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant minTConWatEnt(
y(
final unit="K",
displayUnit="degC"),
final k=TConWatEntMin)
;
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;
District heat exchanger controller
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,
-
the secondary circuit is controlled based on the input signal
u,
which is mapped to modulate in sequence the mixing valve
(from full bypass to closed bypass for a control signal varying between
0% and 30%) and the pump speed (from the minimum to the maximum value
for a control signal varying between 30% and 100%), and
-
the primary pump speed (or valve opening) is directly modulated with
the input signal
u.
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
| Type | Name | Default | Description |
| ConnectionConfiguration | conCon | | District connection configuration |
| Real | spePum1Min | 0.1 | Heat exchanger primary pump minimum speed (fractional) [1] |
| Real | spePum2Min | 0.1 | Heat exchanger secondary pump minimum speed (fractional) [1] |
Connectors
| Type | Name | Description |
| input RealInput | yValIso[2] | Isolation valves return position (index 1 for condenser) |
| output RealOutput | y1 | District heat exchanger primary control signal [1] |
| output RealOutput | yPum2 | District heat exchanger secondary pump control signal [1] |
| output RealOutput | yVal2 | District heat exchanger secondary valve control signal [1] |
| input RealInput | u | Control signal for secondary side (from supervisory) |
Modelica definition
model HeatExchanger
parameter Buildings.DHC.ETS.Types.ConnectionConfiguration conCon
;
parameter Real spePum1Min(
final unit="1",
min=0)=0.1
;
parameter Real spePum2Min(
final unit="1",
min=0.01)=0.1
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput yValIso[2]
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput y1(
final unit="1")
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yPum2(
final unit="1")
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yVal2(
final unit="1")
;
Buildings.Controls.OBC.CDL.Reals.Max max1
;
Buildings.Controls.OBC.CDL.Reals.Switch swiOff1
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant min1(
final k=
if have_val1
then 0
else spePum1Min)
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput u
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr(
final t=0.01,
final h=0.005)
;
Buildings.Controls.OBC.CDL.Logical.And and2
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold heaRej(
final t=0.9,
final h=0.1)
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold cooRej(
final t=0.9,
final h=0.1)
;
Buildings.Controls.OBC.CDL.Logical.Or or1
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant speMin(
final k=spePum2Min)
;
Buildings.Controls.OBC.CDL.Reals.Switch swiOff2
;
Buildings.Controls.OBC.CDL.Reals.Line mapSpe
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant one(
final k=1)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant zer(
final k=0)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant hal(
final k=0.3)
;
Buildings.Controls.OBC.CDL.Reals.Line mapVal
;
protected
parameter Boolean have_val1=conCon ==
Buildings.DHC.ETS.Types.ConnectionConfiguration.TwoWayValve
;
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;
Control block for cold side
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.
-
Control signals for ambient sources
yAmb (array)
The cold rejection control signal yielded by the hot side controller
is processed as follows.
-
A controller is used to track the chilled water
supply temperature (CHWST) set point.
This controller is enabled when cooling is enabled.
It yields a control signal value between
0 and nSouAmb.
-
The systems serving as ambient sources are then controlled in sequence
by mapping the minimum between the CHWST control loop output and the
part of the cold rejection signal between
0
and nSouAmb to a nSouAmb-array
of signals between 0 and 1.
-
Chilled water supply temperature set point
TChiWatSupSet
The remaining part of the cold rejection signal between
nSouAmb and nSouAmb+1 is used
to reset the CHWST set point between a maximum value provided
as an input variable, and a minimum value provided as a
parameter.
-
Control signal for the evaporator loop isolation valve
yIsoAmb
The valve is commanded to be fully open whenever the cold rejection control signal
is greater than zero.
The command signal is held for 5 min to avoid short cycling.
Parameters
| Type | Name | Default | Description |
| Integer | nSouAmb | 1 | Number of ambient sources to control |
| Real | TChiWatSupSetMin | | Minimum value of chilled water supply temperature set point [K] |
| SimpleController | controllerType | Buildings.Controls.OBC.CDL.T... | Type of controller |
| Real | k | 0.1 | Gain of controller |
| Real | Ti | 120 | Time constant of integrator block [s] |
Connectors
| Type | Name | Description |
| input BooleanInput | uHeaCoo | Enable signal for heating or cooling |
| input RealInput | TSet | Supply temperature set point (heating or chilled water) [K] |
| input RealInput | uCol | Cold rejection control signal |
| input RealInput | TBot | Temperature at bottom of tank [K] |
| output RealOutput | TChiWatSupSet | Chilled water supply temperature set point [K] |
| output RealOutput | yAmb[nSouAmb] | Control signal for ambient sources [1] |
| output RealOutput | yValIso | Ambient loop isolation valve control signal [1] |
Modelica definition
model SideCold
parameter Integer nSouAmb=1
;
parameter Real TChiWatSupSetMin(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC")
;
parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI
;
parameter Real k(
min=0)=0.1
;
parameter Real Ti(
min=Buildings.Controls.OBC.CDL.Constants.small,
final quantity="Time",
final unit="s")=120
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uHeaCoo
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TSet(
final unit="K",
displayUnit="degC")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput uCol
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TBot(
final unit="K",
displayUnit="degC")
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput TChiWatSupSet(
final unit="K",
displayUnit="degC")
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yAmb[nSouAmb](
each final unit="1")
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yValIso(
final unit="1")
;
Buildings.Controls.OBC.CDL.Reals.Line mapFun[nSouAmb]
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant x1[nSouAmb](
final k={(i-1)
for i
in 1:nSouAmb})
;
Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator rep(
final nout=nSouAmb)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant f1[nSouAmb](
each final k=0)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant f2[nSouAmb](
each final k=1)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant x2[nSouAmb](
final k={(i)
for i
in 1:nSouAmb})
;
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)
;
Buildings.Controls.OBC.CDL.Reals.Line mapFunTChiSupSet
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant minTChiWatSup(
y(
final unit="K",
displayUnit="degC"),
final k=TChiWatSupSetMin)
;
Buildings.Controls.OBC.CDL.Reals.AddParameter addPar(
p=nSouAmb)
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai(
k=-nSouAmb)
;
Buildings.Controls.OBC.CDL.Reals.Max max1
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant zer(
k=0)
;
Buildings.Controls.OBC.CDL.Reals.AddParameter subNumSou(
p=-nSouAmb)
;
Buildings.Controls.OBC.CDL.Reals.Min min1
;
Buildings.Controls.OBC.CDL.Reals.LimitSlewRate ramLimHea(
raisingSlewRate=0.1) ;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr(
t = 0.01,
h = 0.005)
;
Buildings.Controls.OBC.CDL.Logical.TrueFalseHold truFalHol(
trueHoldDuration=300) ;
Buildings.Controls.OBC.CDL.Logical.Pre pre
;
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;
Control block for hot side
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.
-
Control signals for ambient sources
yAmb (array)
The controller for heat rejection is enabled when the return position
of the evaporator loop isolation valve is close to zero.
When enabled, it maintains the temperature at the top of the heating water
tank at the heating water supply temperature set point plus a
dead band dTDea.
The controller yields a control signal value between
0 and nSouAmb.
The systems serving as ambient sources are then controlled in sequence
by mapping the controller output to a nSouAmb-array of
signals between 0 and 1.
-
Control signal for cold rejection
yCol
The controller for cold rejection is enabled if
-
the return position of the condenser loop isolation valve is close to zero,
and
-
heating is enabled, and
-
the temperature at the top of the heating water tank is below a safety
limit equal to the heating water supply temperature set point plus the
parameter
dTLoc. This last condition limits the temperature
overshoot after the warmup periods, without having to finely tune the heat and
cold rejection controller parameters to guard against the disturbing effect
of a varying district water temperature.
When enabled, the controller maintains the temperature at the top of the
heating water tank at the heating water supply temperature set point.
The controller yields a signal between 0 and nSouAmb+1
which is connected to
Buildings.Obsolete.DHC.ETS.Combined.Controls.SideCold
where it is used to control in sequence the systems serving as ambient sources
and ultimately to reset down the chilled water supply temperature.
-
Control signal for the condenser loop isolation valve
yIsoAmb
The valve is commanded to be fully open whenever the controller
for heat rejection yields an output signal greater than zero.
The command signal is held for 5 min to avoid short cycling.
Parameters
| Type | Name | Default | Description |
| Integer | nSouAmb | 1 | Number of ambient sources to control |
| Real | dTDea | 1 | Temperature difference band between set point tracking and heat rejection (absolute value) [K] |
| Real | dTLoc | dTDea + 2 | Temperature difference between set point tracking and cold rejection lockout (absolute value) [K] |
| SimpleController | controllerType | Buildings.Controls.OBC.CDL.T... | Type of controller |
| Real | k | 0.1 | Gain of controller |
| Real | Ti | 120 | Time constant of integrator block [s] |
Connectors
| Type | Name | Description |
| input BooleanInput | uHea | Enable signal for heating |
| input BooleanInput | uCoo | Enable signal for cooling |
| input RealInput | TSet | Supply temperature set point (heating or chilled water) [K] |
| input RealInput | TTop | Temperature at top of tank [K] |
| input RealInput | yValIsoCon_actual | Return position of condenser to ambient loop isolation valve [1] |
| input RealInput | yValIsoEva_actual | Return position of evaporator to ambient loop isolation valve [1] |
| output RealOutput | yAmb[nSouAmb] | Control signal for ambient sources [1] |
| output RealOutput | yValIso | Ambient loop isolation valve control signal [1] |
| output RealOutput | yCol | Control signal for cold side [1] |
Modelica definition
block SideHot
parameter Integer nSouAmb=1
;
parameter Real dTDea(
final min=0,
final quantity="TemperatureDifference",
final unit="K") = 1
;
parameter Real dTLoc(
final min=0,
final quantity="TemperatureDifference",
final unit="K") = dTDea + 2
;
parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI
;
parameter Real k(
min=0)=0.1
;
parameter Real Ti(
final min=Buildings.Controls.OBC.CDL.Constants.small,
final quantity="Time",
final unit="s")=120
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uHea
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uCoo
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TSet(
final unit="K",
displayUnit="degC")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TTop(
final unit="K",
displayUnit="degC")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput yValIsoCon_actual(
final unit="1")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput yValIsoEva_actual(
final unit="1")
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yAmb[nSouAmb](
each final unit="1")
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yValIso(
final unit="1")
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yCol(
final unit="1")
;
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)
;
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr(
final t = 0.01,
final h = 0.005)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea
;
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)
;
Buildings.Controls.OBC.CDL.Reals.Line mapFun[nSouAmb]
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant x1[nSouAmb](
final k={(i-1)
for i
in 1:nSouAmb})
;
Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator rep(
final nout=nSouAmb)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant f1[nSouAmb](
each final k=0)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant f2[nSouAmb](
each final k=1)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant x2[nSouAmb](
final k={(i)
for i
in 1:nSouAmb})
;
Buildings.Controls.OBC.CDL.Reals.LessThreshold isValIsoConClo(
final t=0.01,
h=0.005)
;
Buildings.Controls.OBC.CDL.Reals.LessThreshold isValIsoEvaClo(
final t=0.01,
h=0.005)
;
Buildings.Controls.OBC.CDL.Logical.MultiAnd mulAnd(
nin=3);
Buildings.Controls.OBC.CDL.Reals.AddParameter addDea(
p=dTDea)
;
Buildings.Controls.OBC.CDL.Reals.AddParameter addLoc(
p=dTLoc)
;
Buildings.Controls.OBC.CDL.Reals.Less isBelLoc(
h=0.1)
;
Buildings.Controls.OBC.CDL.Logical.TrueFalseHold truFalHol(
trueHoldDuration=300) ;
Buildings.Controls.OBC.CDL.Logical.Pre pre
;
Buildings.Controls.OBC.CDL.Logical.And and2
;
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;
Supervisory controller
Information
This block implements the supervisory control functions of the ETS model
Buildings.DHC.ETS.Combined.HeatRecoveryHeatPump.
-
Heating (resp. cooling) is enabled based on the input signal
uHea
(resp. uCoo) which is held for 15', meaning that,
when enabled, the mode remains active for at least 15 minutes and,
when disabled, the mode cannot be enabled again for at least 15 minutes.
The heating and cooling enable signals should be computed externally based on a schedule
(to lock out the system during off-hours), ideally in conjunction with the number
of requests yielded by the terminal unit controllers, or any
other signal representative of the load.
Indeed, the heating water supply set point is allowed to be reset down
only when heating is disabled, in which
case the system performance is improved due to a lower chiller lift.
-
The controller resets the heating water supply temperature based on the logic described in
Buildings.DHC.ETS.Combined.Controls.Reset.
Note that this resetting logic is meant to operate the chiller at low lift.
The chilled water supply temperature may be also reset down by
Buildings.Obsolete.DHC.ETS.Combined.Controls.SideCold
to maintain the heating water supply temperature set point.
This second resetting logic is required for the heating function of the unit,
but it has a negative impact on the lift.
-
Eventually the systems serving as ambient sources are controlled based on the
maximum of the control signals
yAmb yielded by
Buildings.Obsolete.DHC.ETS.Combined.Controls.SideHot
and
Buildings.Obsolete.DHC.ETS.Combined.Controls.SideCold.
Extends from Buildings.Obsolete.DHC.ETS.Combined.Controls.BaseClasses.PartialSupervisory (Partial model for supervisory controller).
Parameters
| Type | Name | Default | Description |
| Integer | nSouAmb | | Number of ambient sources to control |
| SimpleController | controllerType | Buildings.Controls.OBC.CDL.T... | Type of controller |
| Real | kHot | 0.05 | Gain of controller on hot side |
| Real | kCol | 0.1 | Gain of controller on cold side |
| Real | TiHot | 300 | Time constant of integrator block on hot side [s] |
| Real | TiCol | 120 | Time constant of integrator block on cold side [s] |
| Real | THeaWatSupSetMin | | Minimum value of heating water supply temperature set point [K] |
| Real | TChiWatSupSetMin | | Minimum value of chilled water supply temperature set point [K] |
| Real | TChiWatSupSetMax | | Maximum value of chilled water supply temperature set point [K] |
Connectors
| Type | Name | Description |
| input BooleanInput | uHea | Heating enable signal |
| input BooleanInput | uCoo | Cooling enable signal |
| input RealInput | TChiWatSupPreSet | Chilled water supply temperature set point [K] |
| input RealInput | TChiWatBot | Chilled water temperature at tank bottom [K] |
| input RealInput | THeaWatTop | Heating water temperature at tank top [K] |
| input RealInput | THeaWatSupPreSet | Heating water supply temperature set point [K] |
| output RealOutput | THeaWatSupSet | Heating water supply temperature set point after reset [K] |
| output RealOutput | TChiWatSupSet | Chilled water supply temperature set point after reset [K] |
| output RealOutput | yValIsoEva | Evaporator to ambient loop isolation valve control signal [1] |
| output RealOutput | yValIsoCon | Condenser to ambient loop isolation valve control signal [1] |
| output RealOutput | yAmb[nSouAmb] | Control output for ambient sources [1] |
| output BooleanOutput | yHea | Tank in heating demand |
| output BooleanOutput | yCoo | Tank in cooling demand |
| input RealInput | yValIsoCon_actual | Return position of condenser to ambient loop isolation valve [1] |
| input RealInput | yValIsoEva_actual | Return position of evaporator to ambient loop isolation valve [1] |
Modelica definition
model Supervisory
extends Buildings.Obsolete.DHC.ETS.Combined.Controls.BaseClasses.PartialSupervisory;
parameter Buildings.Controls.OBC.CDL.Types.SimpleController
controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI
;
parameter Real kHot(
min=0)=0.05
;
parameter Real kCol(
min=0)=0.1
;
parameter Real TiHot(
final min=Buildings.Controls.OBC.CDL.Constants.small,
final quantity="Time",
final unit="s") = 300
;
parameter Real TiCol(
final min=Buildings.Controls.OBC.CDL.Constants.small,
final quantity="Time",
final unit="s") = 120
;
parameter Real THeaWatSupSetMin(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC")
;
parameter Real TChiWatSupSetMin(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC")
;
parameter Real TChiWatSupSetMax(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput yValIsoCon_actual(
final unit="1")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput yValIsoEva_actual(
final unit="1")
;
Buildings.Obsolete.DHC.ETS.Combined.Controls.SideHot conHot(
final k=kHot,
final Ti=TiHot,
final nSouAmb=nSouAmb,
final controllerType=controllerType)
;
Buildings.Obsolete.DHC.ETS.Combined.Controls.SideCold conCol(
final k=kCol,
final Ti=TiCol,
final nSouAmb=nSouAmb,
final controllerType=controllerType,
final TChiWatSupSetMin=TChiWatSupSetMin)
;
Buildings.Controls.OBC.CDL.Reals.Max max1[nSouAmb]
;
Buildings.DHC.ETS.Combined.Controls.Reset resTHeaSup(
final TWatSupSetMinMax=THeaWatSupSetMin)
;
Buildings.DHC.ETS.Combined.Controls.Reset resTCooSup(
final TWatSupSetMinMax=TChiWatSupSetMax)
;
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;