Collection of validation models
Information
This package contains validation models for blocks in
Buildings.Controls.OBC.Utilities.
Package Content
Name |
Description |
OptimalStartCoolingNegativeStartTime
|
Validation model for the block OptimalStart for cooling system with a negative start time |
OptimalStartCoolingPositiveStartTime
|
Validation model for the block OptimalStart for cooling system with a positive start time |
OptimalStartHeating
|
Validation model for the block OptimalStart for heating system |
OptimalStartHeatingCooling
|
Validation model for the block OptimalStart for both heating and cooling system |
OptimalStartNoHeatingNoCooling
|
Validation model for the block OptimalStart for the case with no preheating nor precooling |
Validation model for the block OptimalStart for cooling system with a negative start time
Information
This model is to validate the block
Buildings.Controls.OBC.Utilities.OptimalStart for space cooling system with
a negative simulation start time.
The room is modelled as a simple differential equation with a time constant of
around 5.6 hours. The cooling power is relatively large compared to the heat gain from
the outdoor temperature. The outdoor temperature is repetitive each day;
the optimal start time converges to a small amount of time tOpt
after a few days.
Modelica definition
model OptimalStartCoolingNegativeStartTime
Buildings.Controls.OBC.Utilities.OptimalStart optStaCoo(
computeHeating=false,computeCooling=true)
;
Modelica.Blocks.Continuous.Integrator TRoo(k = 0.0000005, y_start = 24 + 273.15)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TSetCooOcc(k=24 + 273.15)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Sine TOut(
amplitude=5,
freqHz=1/86400,
offset=28 + 273.15,
startTime(displayUnit="s") = -691200)
;
Buildings.Controls.OBC.CDL.Continuous.Gain UA(k=100)
;
Buildings.Controls.OBC.CDL.Continuous.Add dT(k1=-1)
;
Buildings.Controls.OBC.CDL.Continuous.Add dTdt ;
Buildings.Controls.OBC.CDL.Continuous.Gain QCoo(k=-2000)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea(realTrue=-6)
;
Buildings.Controls.OBC.CDL.Continuous.Add add
;
Buildings.Controls.OBC.CDL.Continuous.LimPID conPID(
controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI,
Ti=1,
reverseAction=true) ;
Buildings.Controls.SetPoints.OccupancySchedule occSch(
occupancy=3600*{7,19},period=24*3600)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal TSetCoo(
realTrue=273.15 + 24,
realFalse=273.15 + 30,
y(
final unit="K", displayUnit="degC"))
;
equation
connect(dT.y, UA.u);
connect(TOut.y, dT.u2);
connect(dTdt.y, TRoo.u);
connect(QCoo.y, dTdt.u2);
connect(TRoo.y, optStaCoo.TZon);
connect(TRoo.y, dT.u1);
connect(TSetCooOcc.y, optStaCoo.TSetZonCoo);
connect(UA.y, dTdt.u1);
connect(optStaCoo.optOn, booToRea.u);
connect(add.y, conPID.u_s);
connect(TRoo.y, conPID.u_m);
connect(occSch.tNexOcc, optStaCoo.tNexOcc);
connect(conPID.y, QCoo.u);
connect(occSch.occupied, TSetCoo.u);
connect(TSetCoo.y, add.u2);
connect(booToRea.y, add.u1);
end OptimalStartCoolingNegativeStartTime;
Validation model for the block OptimalStart for cooling system with a positive start time
Information
This model is to validate the block
Buildings.Controls.OBC.Utilities.OptimalStart for space cooling system
with a positive simulation start time.
The room is modelled as a simple differential equation with a time constant of
around 5.6 hours. The cooling power is relatively large compared to the heat gain from
the outdoor temperature. The outdoor temperature is repetitive each day;
the optimal start time converges to a small amount of time tOpt
after a few days.
Modelica definition
model OptimalStartCoolingPositiveStartTime
Buildings.Controls.OBC.Utilities.OptimalStart optStaCoo(
computeHeating=false,computeCooling=true)
;
Modelica.Blocks.Continuous.Integrator TRoo(k = 0.0000005, y_start = 24 + 273.15)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TSetCooOcc(k=24 + 273.15)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Sine TOut(
amplitude=5,
freqHz=1/86400,
offset=28 + 273.15,
startTime(displayUnit="s") = 0)
;
Buildings.Controls.OBC.CDL.Continuous.Gain UA(k=100)
;
Buildings.Controls.OBC.CDL.Continuous.Add dT(k1=-1)
;
Buildings.Controls.OBC.CDL.Continuous.Add dTdt ;
Buildings.Controls.OBC.CDL.Continuous.Gain QCoo(k=-2000)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea(realTrue=-6)
;
Buildings.Controls.OBC.CDL.Continuous.Add add
;
Buildings.Controls.OBC.CDL.Continuous.LimPID conPID(
controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI,
Ti=1,
reverseAction=true) ;
Buildings.Controls.SetPoints.OccupancySchedule occSch(occupancy=3600*{7,19},period=24*3600)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal TSetCoo(
realTrue=273.15 + 24,
realFalse=273.15 + 30,
y(
final unit="K", displayUnit="degC"))
;
equation
connect(dT.y, UA.u);
connect(TOut.y, dT.u2);
connect(dTdt.y, TRoo.u);
connect(QCoo.y, dTdt.u2);
connect(TRoo.y, optStaCoo.TZon);
connect(TRoo.y, dT.u1);
connect(TSetCooOcc.y, optStaCoo.TSetZonCoo);
connect(UA.y, dTdt.u1);
connect(optStaCoo.optOn, booToRea.u);
connect(add.y, conPID.u_s);
connect(TRoo.y, conPID.u_m);
connect(occSch.tNexOcc, optStaCoo.tNexOcc);
connect(conPID.y, QCoo.u);
connect(occSch.occupied, TSetCoo.u);
connect(TSetCoo.y, add.u2);
connect(booToRea.y, add.u1);
end OptimalStartCoolingPositiveStartTime;
Validation model for the block OptimalStart for heating system
Information
This model is to validate the block
Buildings.Controls.OBC.Utilities.OptimalStart for space heating system.
The room is modelled as a simple differential equation with a time constant of
around 5.6 hours.
The outdoor temperature is also repetitive each day;
the optimal start time converges to a small amount of time tOpt
after a few days.
Modelica definition
model OptimalStartHeating
Buildings.Controls.OBC.Utilities.OptimalStart optStaHea(
computeHeating=true, computeCooling=false)
;
Modelica.Blocks.Continuous.Integrator TRoo(k = 0.000005, y_start = 21 + 273.15)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TSetHeaOcc(k=21+273.15)
;
Buildings.Controls.SetPoints.OccupancySchedule occSch(
occupancy=3600*{7,19},period=24*3600)
;
Buildings.Controls.OBC.CDL.Continuous.Gain UA(k=10)
;
Buildings.Controls.OBC.CDL.Continuous.Add dT(k1=-1)
;
Buildings.Controls.OBC.CDL.Continuous.Add dTdt ;
Buildings.Controls.OBC.CDL.Continuous.Gain QHea(k=500)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea(realTrue=6)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Sine TOut(
amplitude=10,
freqHz=1/86400,
phase=3.1415926535898,
offset=10 + 273.15,
startTime(displayUnit="d") = -172800)
;
Buildings.Controls.OBC.CDL.Continuous.LimPID conPID(
controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI,
Ti=1.5) ;
Buildings.Controls.OBC.CDL.Continuous.Add add
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal TSetHea(
realTrue=273.15 + 21,
realFalse=273.15 + 15,
y(
final unit="K", displayUnit="degC"))
;
equation
connect(dT.y, UA.u);
connect(dTdt.y, TRoo.u);
connect(QHea.y, dTdt.u2);
connect(TRoo.y, optStaHea.TZon);
connect(occSch.tNexOcc, optStaHea.tNexOcc);
connect(TSetHeaOcc.y, optStaHea.TSetZonHea);
connect(TRoo.y, dT.u1);
connect(UA.y, dTdt.u1);
connect(add.y, conPID.u_s);
connect(conPID.y, QHea.u);
connect(TRoo.y, conPID.u_m);
connect(optStaHea.optOn, booToRea.u);
connect(TOut.y, dT.u2);
connect(TSetHea.u, occSch.occupied);
connect(TSetHea.y, add.u2);
connect(booToRea.y, add.u1);
end OptimalStartHeating;
Validation model for the block OptimalStart for both heating and cooling system
Information
This models validates both space heating and cooling for the block
Buildings.Controls.OBC.Utilities.OptimalStart.
The first ten days is to test the heating case with a lower outdoor temperature.
The next ten days has a higher outdoor temprature, which is to test the cooling case.
The zone model has a time constant of 27.8 hours. The optimal start block converges separately
to an optimal start time for heating and cooling. Note that during the three transition
days, the zone temperature is in the deadband, so there is no need to optimally start
the heating or cooling system in advance.
Modelica definition
model OptimalStartHeatingCooling
Buildings.Controls.OBC.Utilities.OptimalStart optSta(computeHeating=true,
computeCooling=true) ;
Modelica.Blocks.Continuous.Integrator TRoo(k = 0.0000004, y_start = 19 + 273.15)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TSetCooOcc(k=24 + 273.15)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Sine TOutBase(
amplitude=5,
freqHz=1/86400,
offset=15 + 273.15,
startTime(displayUnit="h") = 0)
;
Buildings.Controls.OBC.CDL.Continuous.Gain UA(k=25)
;
Buildings.Controls.OBC.CDL.Continuous.Add dT(k1=-1)
;
Buildings.Controls.OBC.CDL.Continuous.Gain QCoo(k=-4000)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea1(realTrue=-6)
;
Buildings.Controls.OBC.CDL.Continuous.Add add1
;
Buildings.Controls.OBC.CDL.Continuous.LimPID conPID1(
controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI,
Ti=3,
reverseAction=true) ;
Buildings.Controls.SetPoints.OccupancySchedule occSch(
occupancy=3600*{7,19},period=24*3600)
;
Buildings.Controls.OBC.CDL.Continuous.MultiSum mulSum(nin=3) ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TSetHeaOcc(k=21+273.15)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea2(realTrue=6)
;
Buildings.Controls.OBC.CDL.Continuous.Add add2
;
Buildings.Controls.OBC.CDL.Continuous.LimPID conPID(
controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI,
Ti=3) ;
Buildings.Controls.OBC.CDL.Continuous.Gain QHea(k=2000)
;
Buildings.Controls.OBC.CDL.Continuous.Add TOut ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Pulse pul(
amplitude=15,
period(displayUnit="d") = 1209600,
startTime(displayUnit="d") = 604800)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal TSetHea(
realTrue=273.15 + 21,
realFalse=273.15 + 15,
y(
final unit="K", displayUnit="degC"))
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal TSetCoo(
realTrue=273.15 + 24,
realFalse=273.15 + 30,
y(
final unit="K", displayUnit="degC"))
;
equation
connect(dT.y, UA.u);
connect(TRoo.y, optSta.TZon);
connect(TRoo.y, dT.u1);
connect(TSetCooOcc.y, optSta.TSetZonCoo);
connect(optSta.optOn, booToRea1.u);
connect(add1.y, conPID1.u_s);
connect(TRoo.y, conPID1.u_m);
connect(occSch.tNexOcc, optSta.tNexOcc);
connect(UA.y, mulSum.u[1]);
connect(TRoo.u, mulSum.y);
connect(TSetHeaOcc.y, optSta.TSetZonHea);
connect(optSta.optOn, booToRea2.u);
connect(add2.y, conPID.u_s);
connect(conPID.u_m, dT.u1);
connect(conPID1.y, QCoo.u);
connect(conPID.y, QHea.u);
connect(QCoo.y, mulSum.u[2]);
connect(QHea.y, mulSum.u[3]);
connect(TOutBase.y, TOut.u1);
connect(TOut.y, dT.u2);
connect(pul.y, TOut.u2);
connect(TSetCoo.y, add1.u2);
connect(occSch.occupied, TSetCoo.u);
connect(TSetHea.u, occSch.occupied);
connect(booToRea1.y, add1.u1);
connect(booToRea2.y, add2.u1);
connect(TSetHea.y, add2.u2);
end OptimalStartHeatingCooling;
Validation model for the block OptimalStart for the case with no preheating nor precooling
Information
This models validates the block
Buildings.Controls.OBC.Utilities.OptimalStart for the case when the optimal start
is not turned on for preheating or precooling before the scheduled occupancy.
The results shows that the optimal start time tOpt
remains zero and
the optimal start on signal optOn
remains false during the simulation.
Modelica definition
model OptimalStartNoHeatingNoCooling
Buildings.Controls.OBC.Utilities.OptimalStart optSta(computeHeating=false,
computeCooling=false) ;
Modelica.Blocks.Continuous.Integrator TRoo(k = 0.0000004, y_start = 19 + 273.15)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Sine TOutBase(
amplitude=5,
freqHz=1/86400,
offset=15 + 273.15,
startTime(displayUnit="h") = 0)
;
Buildings.Controls.OBC.CDL.Continuous.Gain UA(k=25)
;
Buildings.Controls.OBC.CDL.Continuous.Add dT(k1=-1)
;
Buildings.Controls.OBC.CDL.Continuous.Gain QCoo(k=-4000)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea1(realTrue=-6)
;
Buildings.Controls.OBC.CDL.Continuous.Add add1
;
Buildings.Controls.OBC.CDL.Continuous.LimPID conPID1(
controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI,
Ti=3,
reverseAction=true) ;
Buildings.Controls.SetPoints.OccupancySchedule occSch(occupancy=3600*{7,19},period=24*3600)
;
Buildings.Controls.OBC.CDL.Continuous.MultiSum mulSum(nin=3) ;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea2(realTrue=6)
;
Buildings.Controls.OBC.CDL.Continuous.Add add2
;
Buildings.Controls.OBC.CDL.Continuous.LimPID conPID(
controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI,
Ti=3) ;
Buildings.Controls.OBC.CDL.Continuous.Gain QHea(k=2000)
;
Buildings.Controls.OBC.CDL.Continuous.Add TOut ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Pulse pul(
amplitude=15,
period(displayUnit="d") = 1209600,
startTime(displayUnit="d") = 604800)
;
CDL.Conversions.BooleanToReal TSetHea(
realTrue=273.15 + 21,
realFalse=273.15 + 15,
y(
final unit="K", displayUnit="degC"))
;
CDL.Conversions.BooleanToReal TSetCoo(
realTrue=273.15 + 24,
realFalse=273.15 + 30,
y(
final unit="K", displayUnit="degC"))
;
equation
connect(dT.y, UA.u);
connect(TRoo.y, optSta.TZon);
connect(TRoo.y, dT.u1);
connect(optSta.optOn, booToRea1.u);
connect(add1.y, conPID1.u_s);
connect(TRoo.y, conPID1.u_m);
connect(occSch.tNexOcc, optSta.tNexOcc);
connect(UA.y, mulSum.u[1]);
connect(TRoo.u, mulSum.y);
connect(optSta.optOn, booToRea2.u);
connect(add2.y, conPID.u_s);
connect(conPID.u_m, dT.u1);
connect(conPID1.y, QCoo.u);
connect(conPID.y, QHea.u);
connect(QCoo.y, mulSum.u[2]);
connect(QHea.y, mulSum.u[3]);
connect(TOutBase.y, TOut.u1);
connect(TOut.y, dT.u2);
connect(pul.y, TOut.u2);
connect(TSetCoo.y, add1.u2);
connect(occSch.occupied, TSetCoo.u);
connect(TSetHea.u, occSch.occupied);
connect(TSetHea.y, add2.u2);
connect(booToRea2.y, add2.u1);
connect(booToRea1.y, add1.u1);
end OptimalStartNoHeatingNoCooling;