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(
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Continuous.Subtract qRelDen(
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Continuous.Subtract qRelNum(
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Continuous.Divide qRel ;
CDL.Continuous.Subtract dTFlu2_nom
;
CDL.Continuous.Average TFluAve_nominal(
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Continuous.Subtract dTFluAve_nominal(
y(
final quantity="TemperatureDifference",
final unit="K"))
;
CDL.Continuous.Divide mInv ;
CDL.Continuous.Add TAve(
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Continuous.Add TSupCur(
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Continuous.Subtract TRetCur(
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Continuous.Max qRel0
;
CDL.Continuous.Multiply pro ;
CDL.Continuous.Exp qRaiInvM
;
CDL.Continuous.Log log1
;
CDL.Continuous.Multiply dTQ(y(
final quantity="TemperatureDifference",
final unit="K")) ;
CDL.Continuous.Multiply dTFlu(y(
final quantity="TemperatureDifference",
final unit="K")) ;
CDL.Continuous.Add TOutOffSet_nominal(
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Continuous.MultiplyByParameter gai(
final k=0.5,
y(
final quantity="TemperatureDifference",
final unit="K")) ;
equation
connect(dTOutHeaBal_nominal.y,TOutOffSet.u1);
connect(TOut,TOutOffSet.u2);
connect(TZon_nom.y,qRelDen.u1);
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.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(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);
connect(TSetZon, qRelNum.u1);
connect(TOutOffSet.y, qRelNum.u2);
connect(dTFlu2_nom.y, gai.u);
connect(gai.y, dTFlu.u1);
connect(TFluAve_nominal.y, dTFluAve_nominal.u1);
end SupplyReturnTemperatureReset;