Collection of validation models
Information
This package contains validation models for the classes in
Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.
Note that most validation models contain simple input data
which may not be realistic, but for which the correct
output can be obtained through an analytic solution.
The examples plot various outputs, which have been verified against these
solutions. These model outputs are stored as reference data and
used for continuous validation whenever models in the library change.
Package Content
Name |
Description |
GroupStatus
|
Validate block for checking temperatures in the group |
OperationMode
|
Validate block for selecting operation mode |
TrimAndRespond
|
Model validates the trim and respond block |
ZoneStatus
|
Validate block for checking temperatures in the zone |
Validate block for checking temperatures in the group
Information
This example validates
Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.GroupStatus
for checking group temperature status.
Modelica definition
model GroupStatus
Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.GroupStatus zonGroSta(
final numZon=2) ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant warUpTim[2](
final k={1800,1900}) ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant cooDowTim[2](
final k={1600,1800}) ;
Buildings.Controls.OBC.CDL.Logical.Sources.Pulse winSta[2](
final width={0.3,0.1},
final period=
fill(3600, 2),
final shift={150,120}) ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp2(
final offset=0,
final height=6.2831852,
final duration=24*3600) ;
Buildings.Controls.OBC.CDL.Continuous.Sin sin2
;
Buildings.Controls.OBC.CDL.Continuous.AddParameter zonTem(
final k=6,
final p=273.15 + 22.5)
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant uOccOve[2](
final k=
fill(false, 2))
;
Buildings.Controls.OBC.CDL.Logical.Sources.Pulse zonOcc1(
final width=0.8,
final period=7200,
shift=1800) ;
Buildings.Controls.OBC.CDL.Logical.Sources.Pulse zonOcc2(
final width=0.8,
final period=7200,
shift=2100) ;
Buildings.Controls.OBC.CDL.Logical.Not not1 ;
Buildings.Controls.OBC.CDL.Logical.Not not2 ;
Buildings.Controls.OBC.CDL.Logical.Timer tim ;
Buildings.Controls.OBC.CDL.Logical.Timer tim1 ;
Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar(
final p=1800,
final k=-1) ;
Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar1(
final p=2100,
final k=-1) ;
Buildings.Controls.OBC.CDL.Logical.Sources.Pulse lowOccHea[2](
final width=
fill(0.5, 2),
final period=
fill(3600, 2),
final shift=
fill(1000, 2)) ;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant higOccCoo[2](
final k=
fill(false, 2))
;
Buildings.Controls.OBC.CDL.Logical.And and2[2]
;
Buildings.Controls.OBC.CDL.Logical.Sources.Pulse lowUnoHea1[2](
final width=
fill(0.1, 2),
final period=
fill(3600, 2)) ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant heaSetOff[2](
final k={285.15,283.15})
;
Buildings.Controls.OBC.CDL.Logical.Sources.Pulse endSetBac[2](
final width=
fill(0.8, 2),
final period=
fill(3600, 2),
final shift=
fill(900, 2)) ;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant higUnoCoo[2](
final k=
fill(false, 2))
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant cooSetOff[2](
final k={303.15,305.15})
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant endSetUp[2](
final k=
fill(false, 2))
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Pulse zonTem2(
final amplitude=7,
final period=600,
final offset=273.15 + 19) ;
equation
connect(ramp2.y,sin2. u);
connect(sin2.y, zonTem.u);
connect(not1.y, tim.u);
connect(not2.y, tim1.u);
connect(tim.y, addPar.u);
connect(tim1.y, addPar1.u);
connect(uOccOve.y, zonGroSta.zonOcc);
connect(zonOcc1.y, not1.u);
connect(zonOcc2.y, not2.u);
connect(zonOcc1.y, zonGroSta.uOcc[1]);
connect(zonOcc2.y, zonGroSta.uOcc[2]);
connect(addPar.y, zonGroSta.tNexOcc[1]);
connect(addPar1.y, zonGroSta.tNexOcc[2]);
connect(cooDowTim.y, zonGroSta.uCooTim);
connect(warUpTim.y, zonGroSta.uWarTim);
connect(not1.y, and2[1].u2);
connect(not2.y, and2[2].u2);
connect(lowOccHea.y, and2.u1);
connect(and2.y, zonGroSta.uOccHeaHig);
connect(higOccCoo.y, zonGroSta.uHigOccCoo);
connect(lowUnoHea1.y, zonGroSta.uUnoHeaHig);
connect(heaSetOff.y, zonGroSta.THeaSetOff);
connect(endSetBac.y, zonGroSta.uEndSetBac);
connect(higUnoCoo.y, zonGroSta.uHigUnoCoo);
connect(cooSetOff.y, zonGroSta.TCooSetOff);
connect(endSetUp.y, zonGroSta.uEndSetUp);
connect(zonTem.y, zonGroSta.TZon[1]);
connect(zonTem2.y, zonGroSta.TZon[2]);
connect(winSta.y, zonGroSta.uWin);
end GroupStatus;
Validate block for selecting operation mode
Information
This example validates
Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.OperationMode
for a change of zone temperature and occupancy schedule.
Modelica definition
model OperationMode
Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.OperationMode
opeModSel(
final numZon=1)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp1(
final height=6.2831852,
final duration=172800)
;
Buildings.Controls.OBC.CDL.Continuous.Sin sin1
;
Buildings.Controls.OBC.CDL.Continuous.AddParameter zonTem(
final k=14.5,
final p=295.65) ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TZonHeaSetUno(
final k=285.15) ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TZonCooSetUno(
final k=303.15) ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TZonHeaSetOcc(
final k=293.15) ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TZonCooSetOcc(
final k=297.15) ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant warUpTim(
final k=1800) ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant cooDowTim(
final k=1800) ;
Buildings.Controls.OBC.CDL.Integers.Sources.Constant cloWin(
final k=0) ;
Buildings.Controls.OBC.CDL.Continuous.Greater lowThaHeaSet
;
Buildings.Controls.OBC.CDL.Continuous.Greater higThaCooSet
;
Buildings.Controls.OBC.CDL.Continuous.Greater greEqu2
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt ;
Buildings.Controls.OBC.CDL.Continuous.Greater greEqu3
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt1 ;
Buildings.Controls.SetPoints.OccupancySchedule occSch ;
Buildings.Controls.OBC.CDL.Continuous.Add add3(
final k2=-1)
;
Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys3(
final uLow=-0.5,
final uHigh=0.5)
;
Buildings.Controls.OBC.CDL.Continuous.Add add1(
final k1=-1)
;
Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys1(
final uLow=-0.5,
final uHigh=0.5)
;
equation
connect(ramp1.y, sin1.u);
connect(sin1.y,zonTem. u);
connect(cooDowTim.y, opeModSel.maxCooDowTim);
connect(warUpTim.y, opeModSel.maxWarUpTim);
connect(TZonHeaSetOcc.y, lowThaHeaSet.u1);
connect(zonTem.y, lowThaHeaSet.u2);
connect(zonTem.y, higThaCooSet.u1);
connect(TZonCooSetOcc.y, higThaCooSet.u2);
connect(TZonHeaSetUno.y, greEqu2.u1);
connect(zonTem.y, greEqu2.u2);
connect(greEqu2.y, booToInt.u);
connect(booToInt.y, opeModSel.totColZon);
connect(zonTem.y, opeModSel.TZonMax);
connect(zonTem.y, opeModSel.TZonMin);
connect(zonTem.y, greEqu3.u1);
connect(TZonCooSetUno.y, greEqu3.u2);
connect(greEqu3.y, booToInt1.u);
connect(booToInt1.y, opeModSel.totHotZon);
connect(occSch.occupied, opeModSel.uOcc);
connect(occSch.tNexOcc, opeModSel.tNexOcc);
connect(higThaCooSet.y, opeModSel.uHigOccCoo);
connect(lowThaHeaSet.y, opeModSel.uOccHeaHig);
connect(cloWin.y, opeModSel.uOpeWin);
connect(greEqu2.y, opeModSel.uSetBac);
connect(greEqu3.y, opeModSel.uSetUp);
connect(zonTem.y, add3.u1);
connect(TZonHeaSetUno.y, add3.u2);
connect(add3.y, hys3.u);
connect(hys3.y, opeModSel.uEndSetBac);
connect(zonTem.y, add1.u1);
connect(TZonCooSetUno.y, add1.u2);
connect(add1.y, hys1.u);
connect(hys1.y, opeModSel.uEndSetUp);
end OperationMode;
Model validates the trim and respond block
Information
This example validates
Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.TrimAndRespond.
Modelica definition
model TrimAndRespond
Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.TrimAndRespond trimRespondLogic(
final iniSet=120,
final minSet=37,
final maxSet=370,
final delTim=300,
final samplePeriod=120,
final numIgnReq=2,
final triAmo=-10,
final resAmo=15,
final maxRes=37) ;
Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.TrimAndRespond trimRespondLogic1(
final iniSet=120,
final minSet=37,
final maxSet=370,
final delTim=300,
final samplePeriod=120,
final numIgnReq=2,
final triAmo=10,
final resAmo=-15,
final maxRes=-37) ;
Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.TrimAndRespond trimRespondLogic2(
final iniSet=120,
final minSet=37,
final maxSet=370,
final delTim=300,
final samplePeriod=120,
final numIgnReq=2,
final triAmo=-10,
final resAmo=15,
final maxRes=37) ;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant con(
final k=true) ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sine(
final amplitude=6,
final freqHz=1/5400) ;
Buildings.Controls.OBC.CDL.Continuous.Abs abs
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sine1(
final amplitude=6,
freqHz=1/5400) ;
Buildings.Controls.OBC.CDL.Continuous.Abs abs1
;
Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul(
final period=3600,
final width=0.18333333) ;
Buildings.Controls.OBC.CDL.Logical.Not not1 ;
Buildings.Controls.OBC.CDL.Logical.Switch swi ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con1(
final k=0)
;
Buildings.Controls.OBC.CDL.Continuous.Round round2(
final n=0)
;
Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt1
;
Buildings.Controls.OBC.CDL.Continuous.Round round1(
final n=0)
;
Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt2
;
equation
connect(con.y, trimRespondLogic.uDevSta);
connect(sine.y, abs.u);
connect(not1.y,trimRespondLogic2. uDevSta);
connect(con1.y, swi.u1);
connect(sine1.y, swi.u3);
connect(swi.y, abs1.u);
connect(booPul.y, swi.u2);
connect(booPul.y, not1.u);
connect(abs.y, round2.u);
connect(round2.y, reaToInt1.u);
connect(reaToInt1.y, trimRespondLogic.numOfReq);
connect(abs1.y, round1.u);
connect(round1.y, reaToInt2.u);
connect(reaToInt2.y,trimRespondLogic2. numOfReq);
connect(con.y,trimRespondLogic1. uDevSta);
connect(reaToInt1.y,trimRespondLogic1. numOfReq);
end TrimAndRespond;
Validate block for checking temperatures in the zone
Information
This example validates
Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.ZoneStatus
for checking zone temperature status.
Modelica definition
model ZoneStatus
Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.ZoneStatus noWinZonSta(
final have_winSen=false)
;
Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.ZoneStatus witWinZonSta(
final have_winSen=true)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant warUpTim(
final k=1800) ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant cooDowTim(
final k=1800) ;
Buildings.Controls.OBC.CDL.Logical.Sources.Pulse uWinSta(
final width=0.3,
final period=43200,
final shift=1800)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp2(
final offset=0,
final height=6.2831852,
final duration=24*3600) ;
Buildings.Controls.OBC.CDL.Continuous.Sin sin2
;
Buildings.Controls.OBC.CDL.Continuous.AddParameter zonTem(
final k=12.5,
final p=273.15 + 22.5)
;
equation
connect(cooDowTim.y, noWinZonSta.cooDowTim);
connect(warUpTim.y, noWinZonSta.warUpTim);
connect(ramp2.y,sin2. u);
connect(sin2.y, zonTem.u);
connect(zonTem.y, noWinZonSta.TZon);
connect(cooDowTim.y, witWinZonSta.cooDowTim);
connect(warUpTim.y, witWinZonSta.warUpTim);
connect(zonTem.y, witWinZonSta.TZon);
connect(uWinSta.y, witWinZonSta.uWin);
end ZoneStatus;