This package contains components models to compute set points for control systems.
This block computes the set point temperatures for the
supply and return water temperature.
The set point for the zone air temperature can be an input to the model.
It allows to use this model with systems that have night set back.
The figure below shows a typical usage for a hot water temperature reset
for a heating system.
The parameters of the block heaCur
are for a heating system with
60°C supply water temperature and
40°C return water temperature at
an outside temperature of
-10°C and a room temperature of
20°C. The offset for the temperature reset is
8 Kelvin, i.e., above
12°C outside temperature, there is no heating load.
The figure shows the computed supply and return water temperatures.
block SupplyReturnTemperatureReset
parameter Real m=1.3
;
parameter Real TSup_nominal(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC")
;
parameter Real TRet_nominal(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC")
;
parameter Real TZon_nominal(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC")=293.15
;
parameter Real TOut_nominal(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC")
;
parameter Real dTOutHeaBal(
final quantity="TemperatureDifference",
final unit="K",
displayUnit="K")=8
;
CDL.Interfaces.RealInput TSetZon(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC",
min=200)
;
CDL.Interfaces.RealInput TOut(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC",
min=200)
;
CDL.Interfaces.RealOutput TSup(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC",
min=200)
;
CDL.Interfaces.RealOutput TRet(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC",
min=200)
;
protected
CDL.Continuous.Sources.Constant dTOutHeaBal_nominal(
final k=dTOutHeaBal,
y(
final quantity="TemperatureDifference",
final unit="K"))
;
CDL.Continuous.Sources.Constant TSup_nom(
final k=TSup_nominal,
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Continuous.Sources.Constant TZon_nom(
final k=TZon_nominal,
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Continuous.Sources.Constant zer(
final k=1E-100)
;
CDL.Continuous.Sources.Constant TRet_nom(
final k=TRet_nominal,
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Continuous.Sources.Constant TOut_nom(
final k=TOut_nominal,
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Continuous.Sources.Constant expM(
final k=m)
;
CDL.Continuous.Sources.Constant one(
final k=1)
;
CDL.Continuous.Add TOutOffSet(
final k1=1,
final k2=1,
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Continuous.Add qRelDen(
final k1=1,
final k2=-1,
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Continuous.Add qRelNum(
final k1=-1,
final k2=1,
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Continuous.Division qRel
;
CDL.Continuous.Add dTFlu2_nom(
final k1=0.5,
final k2=-0.5,
y(
final quantity="TemperatureDifference",
final unit="K"))
;
CDL.Continuous.Add TFluAve_nominal(
final k1=0.5,
final k2=0.5,
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Continuous.Add dTFluAve_nominal(
final k1=1,
final k2=-1,
y(
final quantity="TemperatureDifference",
final unit="K"))
;
CDL.Continuous.Division mInv
;
CDL.Continuous.Add TAve(
final k1=1,
final k2=1,
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Continuous.Add TSupCur(
final k1=1,
final k2=1,
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Continuous.Add TRetCur(
final k1=1,
final k2=-1,
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Continuous.Max qRel0
;
CDL.Continuous.Product pro
;
CDL.Continuous.Exp qRaiInvM
;
CDL.Continuous.Log log1
;
CDL.Continuous.Product dTQ(
y(
final quantity="TemperatureDifference",
final unit="K"))
;
CDL.Continuous.Product dTFlu(
y(
final quantity="TemperatureDifference",
final unit="K"))
;
CDL.Continuous.Add TOutOffSet_nominal(
final k1=1,
final k2=1,
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
equation
connect(dTOutHeaBal_nominal.y,TOutOffSet.u1);
connect(TOut,TOutOffSet.u2);
connect(TZon_nom.y,qRelDen.u1);
connect(TOutOffSet.y,qRelNum.u1);
connect(TSetZon,qRelNum.u2);
connect(qRel.y,qRel0.u2);
connect(zer.y,qRel0.u1);
connect(dTFlu2_nom.u1,TSup_nom.y);
connect(dTFlu2_nom.u2,TRet_nom.y);
connect(TFluAve_nominal.u1,TSup_nom.y);
connect(TRet_nom.y,TFluAve_nominal.u2);
connect(dTFluAve_nominal.u1,TFluAve_nominal.y);
connect(dTFluAve_nominal.u2,TZon_nom.y);
connect(qRel0.y,log1.u);
connect(one.y,mInv.u1);
connect(expM.y,mInv.u2);
connect(log1.y,pro.u1);
connect(pro.u2,mInv.y);
connect(qRaiInvM.u,pro.y);
connect(dTQ.u1,dTFluAve_nominal.y);
connect(qRaiInvM.y,dTQ.u2);
connect(TSetZon,TAve.u1);
connect(TAve.u2,dTQ.y);
connect(dTFlu2_nom.y,dTFlu.u1);
connect(qRel0.y,dTFlu.u2);
connect(TSupCur.u1,TAve.y);
connect(dTFlu.y,TSupCur.u2);
connect(TSupCur.y,TSup);
connect(TRetCur.u1,TAve.y);
connect(TRetCur.u2,dTFlu.y);
connect(TRetCur.y,TRet);
connect(qRel.u1,qRelNum.y);
connect(qRel.u2,qRelDen.y);
connect(TOutOffSet_nominal.u1,TOut_nom.y);
connect(dTOutHeaBal_nominal.y,TOutOffSet_nominal.u2);
connect(TOutOffSet_nominal.y,qRelDen.u2);
end SupplyReturnTemperatureReset;