Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.Validation

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
Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.Validation.OperationMode OperationMode Validate block for selecting operation mode
Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.Validation.TrimAndRespond TrimAndRespond Model validates the trim and respond block
Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.Validation.ZoneStatus ZoneStatus Validate block for checking temperatures in the zone

Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.Validation.OperationMode Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.Validation.OperationMode

Validate block for selecting operation mode

Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.Validation.OperationMode

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 "Validate block for selecting operation mode" Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp1( final offset=0, final height=6.2831852, final duration=24*3600) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Continuous.Sin sin1 "Block that outputs the sine of the input"; Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar( final k=12.5, final p=273.15 + 22.5) "Zone temperarure"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TZonHeaSetUno( final k=273.15 + 12) "Unoccupied heating setpoint"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TZonCooSetUno( final k=273.15 + 30) "Unoccupied cooling setpoint"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TZonHeaSetOcc( final k=273.15 + 20) "Occupied heating setpoint"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TZonCooSetOcc( final k=273.15 + 24) "Occupied cooling setpoint"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant warUpTim( final k=1800) "Warm-up time"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant cooDowTim( final k=1800) "Cooling down time"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant uWinSta(final k=false) "Window on/off status"; Buildings.Controls.OBC.CDL.Continuous.Sources.TimeTable occTim( final table=[0,0; occSta,1; occEnd,0; 24*3600,0], final smoothness=Buildings.Controls.OBC.CDL.Types.Smoothness.ConstantSegments) "Occupancy schedule"; Buildings.Controls.OBC.CDL.Continuous.Sources.ModelTime modTim "Standard time"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con( final k=24*3600) "One day in second"; Buildings.Controls.OBC.CDL.Continuous.Division div "Output first input divided by second input"; Buildings.Controls.OBC.CDL.Continuous.Round rou(final n=0) "Round real number to 0 digit"; Buildings.Controls.OBC.CDL.Continuous.Gain gai(k=24*3600) "Begin time of each day"; Buildings.Controls.OBC.CDL.Continuous.LessEqual lesEqu "Check if it is beginning of next day"; Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar1( final p=-1, final k=1) "Add parameter"; Buildings.Controls.OBC.CDL.Continuous.Gain gai1(final k=24*3600) "Begin of day"; Buildings.Controls.OBC.CDL.Logical.Switch swi "Beginning of current day"; Buildings.Controls.OBC.CDL.Continuous.Add curTim(final k2=-1) "Current time "; Buildings.Controls.OBC.CDL.Continuous.Add add2(final k2=-1) "Left time to beginning of current day occupancy "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant occStaTim( final k=occSta) "Occupancy start"; Buildings.Controls.OBC.CDL.Continuous.Add add1(final k2=-1) "Left time to the end of current day"; Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar2( final p=occSta, final k=1) "Left time to next occupancy"; Buildings.Controls.OBC.CDL.Continuous.LessEqual lesEqu1 "Check if current time has already passed occupancy start time"; Buildings.Controls.OBC.CDL.Logical.Switch swi1 "Time to next occupancy"; Buildings.Controls.OBC.CDL.Continuous.GreaterEqualThreshold occ( final threshold=0.5) "Occupied status"; Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.OperationMode opeModSel(final have_winSen=true, final numZon=1) "Operation mode selection"; Buildings.Controls.OBC.CDL.Continuous.GreaterEqual greEqu "True when zone occupied heating setpoint temperature is larger than zone temperature"; Buildings.Controls.OBC.CDL.Continuous.GreaterEqual greEqu1 "True when zone occupied heating setpoint temperature is larger than zone temperature"; Buildings.Controls.OBC.CDL.Continuous.GreaterEqual greEqu2 "True when the zone temperature is lower than unoccupied heating setpoint"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt "Convert boolean to integer"; Buildings.Controls.OBC.CDL.Continuous.GreaterEqual greEqu3 "True when the zone temperature is lower than unoccupied heating setpoint"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt1 "Convert boolean to integer"; protected final parameter Real occSta( final unit="s", final quantity="Time") = 7*3600 "Occupancy start time"; final parameter Real occEnd( final unit="s", final quantity="Time") = 19*3600 "Occupancy end time"; equation connect(ramp1.y, sin1.u); connect(sin1.y, addPar.u); connect(modTim.y, div.u1); connect(con.y, div.u2); connect(div.y, rou.u); connect(rou.y, gai.u); connect(gai.y, lesEqu.u1); connect(modTim.y, lesEqu.u2); connect(rou.y, addPar1.u); connect(addPar1.y, gai1.u); connect(lesEqu.y, swi.u2); connect(gai.y, swi.u1); connect(gai1.y, swi.u3); connect(modTim.y, curTim.u1); connect(swi.y, curTim.u2); connect(occStaTim.y, add2.u1); connect(con.y, add1.u1); connect(add1.y, addPar2.u); connect(occStaTim.y, lesEqu1.u2); connect(curTim.y, lesEqu1.u1); connect(lesEqu1.y, swi1.u2); connect(add2.y, swi1.u1); connect(addPar2.y, swi1.u3); connect(occTim.y[1], occ.u); connect(curTim.y, add2.u2); connect(curTim.y, add1.u2); connect(occ.y, opeModSel.uOcc); connect(swi1.y, opeModSel.tNexOcc); connect(cooDowTim.y, opeModSel.maxCooDowTim); connect(warUpTim.y, opeModSel.maxWarUpTim); connect(TZonHeaSetOcc.y, greEqu.u1); connect(addPar.y, greEqu.u2); connect(greEqu.y, opeModSel.occHeaHigMin); connect(addPar.y, greEqu1.u1); connect(TZonCooSetOcc.y, greEqu1.u2); connect(greEqu1.y, opeModSel.maxHigOccCoo); connect(uWinSta.y, opeModSel.uWinSta); connect(TZonHeaSetUno.y, greEqu2.u1); connect(addPar.y, greEqu2.u2); connect(greEqu2.y, booToInt.u); connect(booToInt.y, opeModSel.totColZon); connect(greEqu2.y, opeModSel.unoHeaHigMin); connect(addPar.y, opeModSel.TZonMax); connect(addPar.y, opeModSel.TZonMin); connect(addPar.y, greEqu3.u1); connect(TZonCooSetUno.y, greEqu3.u2); connect(greEqu3.y, booToInt1.u); connect(greEqu3.y, opeModSel.maxHigUnoCoo); connect(booToInt1.y, opeModSel.totHotZon); end OperationMode;

Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.Validation.TrimAndRespond Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.Validation.TrimAndRespond

Model validates the trim and respond block

Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.Validation.TrimAndRespond

Information

This example validates Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.TrimAndRespond.

Modelica definition

model TrimAndRespond "Model validates the trim and respond block" 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) "Block implementing trim and respond logic"; 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) "Block implementing trim and respond logic"; 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) "Block implementing trim and respond logic"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant con( final k=true) "Logic true indicating device ON"; Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sine( final amplitude=6, final freqHz=1/5400) "Block generates sine signal"; Buildings.Controls.OBC.CDL.Continuous.Abs abs "Block generates absolute value of input"; Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sine1( final amplitude=6, freqHz=1/5400) "Block generates sine signal"; Buildings.Controls.OBC.CDL.Continuous.Abs abs1 "Block generates absolute value of input"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul( final period=3600, final width=0.18333333) "Generate pulse signal of type Boolean"; Buildings.Controls.OBC.CDL.Logical.Not not1 "Logical not"; Buildings.Controls.OBC.CDL.Logical.Switch swi "Switch between two Real signals"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con1(final k=0) "Zero request when device is OFF"; Buildings.Controls.OBC.CDL.Continuous.Round round2(final n=0) "Round real number to given digits"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt1 "Convert real to integer"; Buildings.Controls.OBC.CDL.Continuous.Round round1(final n=0) "Round real number to given digits"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt2 "Convert real to integer"; 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;

Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.Validation.ZoneStatus Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.Validation.ZoneStatus

Validate block for checking temperatures in the zone

Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.Validation.ZoneStatus

Information

This example validates Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.ZoneStatus for checking zone temperature status.

Modelica definition

model ZoneStatus "Validate block for checking temperatures in the zone" Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.ZoneStatus noWinZonSta "Status of zone when there is no window operation sensor"; Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.ZoneStatus witWinZonSta(final have_winSen=true) "Status of zone when there is window operation sensor"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp1( final offset=0, final height=6.2831852, final duration=24*3600) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Continuous.Sin sin1 "Block that outputs the sine of the input"; Buildings.Controls.OBC.CDL.Continuous.AddParameter maxZonTem(final k=13.5, final p=273.15 + 22.5) "Maximum zone temperature in the group"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TZonHeaSetUno( final k=273.15 + 12) "Unoccupied heating setpoint"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TZonCooSetUno( final k=273.15 + 30) "Unoccupied cooling setpoint"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TZonHeaSetOcc( final k=273.15 + 20) "Occupied heating setpoint"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TZonCooSetOcc( final k=273.15 + 24) "Occupied cooling setpoint"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant warUpTim( final k=1800) "Warm-up time"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant cooDowTim( final k=1800) "Cooling down time"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse uWinSta( width=0.3, period=43200, startTime=1800) "Window on/off status"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp2( final offset=0, final height=6.2831852, final duration=24*3600) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Continuous.Sin sin2 "Block that outputs the sine of the input"; Buildings.Controls.OBC.CDL.Continuous.AddParameter zonTem( final k=12.5, final p=273.15 + 22.5) "Current zone temperature"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp3( final offset=0, final height=6.2831852, final duration=24*3600) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Continuous.Sin sin3 "Block that outputs the sine of the input"; Buildings.Controls.OBC.CDL.Continuous.AddParameter minZonTem( final k=12, final p=273.15 + 22.5) "Minimum zone temperature in the group"; equation connect(ramp1.y, sin1.u); connect(sin1.y, maxZonTem.u); connect(cooDowTim.y, noWinZonSta.cooDowTim); connect(warUpTim.y, noWinZonSta.warUpTim); connect(TZonHeaSetOcc.y, noWinZonSta.TZonHeaSetOcc); connect(TZonCooSetOcc.y, noWinZonSta.TZonCooSetOcc); connect(ramp2.y,sin2. u); connect(sin2.y, zonTem.u); connect(maxZonTem.y, noWinZonSta.TZonMax); connect(zonTem.y, noWinZonSta.TZon); connect(ramp3.y,sin3. u); connect(sin3.y, minZonTem.u); connect(minZonTem.y, noWinZonSta.TZonMin); connect(TZonHeaSetUno.y, noWinZonSta.TZonHeaSetUno); connect(TZonCooSetUno.y, noWinZonSta.TZonCooSetUno); connect(cooDowTim.y, witWinZonSta.cooDowTim); connect(warUpTim.y, witWinZonSta.warUpTim); connect(uWinSta.y, witWinZonSta.uWinSta); connect(TZonHeaSetOcc.y, witWinZonSta.TZonHeaSetOcc); connect(TZonCooSetOcc.y, witWinZonSta.TZonCooSetOcc); connect(maxZonTem.y, witWinZonSta.TZonMax); connect(zonTem.y, witWinZonSta.TZon); connect(minZonTem.y, witWinZonSta.TZonMin); connect(TZonHeaSetUno.y, witWinZonSta.TZonHeaSetUno); connect(TZonCooSetUno.y, witWinZonSta.TZonCooSetUno); end ZoneStatus;