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

Collection of validation models

Information

This package contains validation models for the classes in Buildings.Obsolete.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.Obsolete.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.Validation.GroupStatus GroupStatus Validate block for checking temperatures in the group
Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.Validation.OperationMode OperationMode Validate block for selecting operation mode
Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.Validation.TrimAndRespond TrimAndRespond Model validates the trim and respond block
Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.Validation.ZoneStatus ZoneStatus Validate block for checking temperatures in the zone
Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.Validation.ZoneStatusDuplicator ZoneStatusDuplicator Validate block for duplicating zone status

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

Validate block for checking temperatures in the group

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

Information

This example validates Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.GroupStatus for checking group temperature status.

The block takes 3 zones as input, but filters them down to only processing zone 1 and 3 (reindexed in output to 1 and 2 respectively).

Modelica definition

model GroupStatus "Validate block for checking temperatures in the group" Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.GroupStatus zonGroSta( final numZon=3, numZonGro=2, zonGroMsk={true,false,true}) "Calculate zone group status"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant warUpTim[3]( final k={1800,1700,1900}) "Warm-up time"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant cooDowTim[3]( final k={1600,1700,1800}) "Cooling down time"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse winSta[3]( final width={0.3,0.2,0.1}, final period=fill(3600, 3), final shift={150,130,120}) "Window status"; Buildings.Controls.OBC.CDL.Reals.Sources.Ramp ramp2( final offset=0, final height=6.2831852, final duration=24*3600) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Reals.Sin sin2 "Block that outputs the sine of the input"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai( final k=6) "Current zone temperature"; Buildings.Controls.OBC.CDL.Reals.AddParameter zonTem( final p=273.15 + 22.5) "Current zone temperature"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant uOccOve[3]( final k=fill(false,3)) "Occupancy local override"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse zonOcc1( final width=0.8, final period=7200, shift=1800) "Zone 1 occupied status"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse zonOcc3( final width=0.8, final period=7200, shift=2100) "Zone 3 occupied status"; Buildings.Controls.OBC.CDL.Logical.Not not1 "Logical not"; Buildings.Controls.OBC.CDL.Logical.Not not3 "Logical not"; Buildings.Controls.OBC.CDL.Logical.Timer tim1 "Time after input becomes true"; Buildings.Controls.OBC.CDL.Logical.Timer tim3 "Time after input becomes true"; Buildings.Controls.OBC.CDL.Reals.Subtract addPar1 "Time to occupied period"; Buildings.Controls.OBC.CDL.Reals.Subtract addPar3 "Time to occupied period"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse lowOccHea[3]( final width=fill(0.5, 3), final period=fill(3600, 3), final shift=fill(1000, 3)) "Lower than occupied heating setpoint"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant higOccCoo[3]( final k=fill(false, 3)) "Higher than occupied cooling setpoint"; Buildings.Controls.OBC.CDL.Logical.And and2[3] "Lower than occupied heating setpoint when it is not occupied"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse lowUnoHea1[3]( final width=fill(0.1, 3), final period=fill(3600, 3)) "Lower than unoccupied heating setpoint"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant heaSetOff[3]( final k={285.15,282.15,283.15}) "Unoccupied heating setpoint"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse endSetBac[3]( final width=fill(0.8, 3), final period=fill(3600, 3), final shift=fill(900, 3)) "End setback"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant higUnoCoo[3]( final k=fill(false, 3)) "HIgher than unoccupied cooling setpoint"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant cooSetOff[3]( final k={303.15,304.15,305.15}) "Unoccupied cooling setpoint"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant endSetUp[3]( final k=fill(false,3)) "End setup mode"; Buildings.Controls.OBC.CDL.Reals.Sources.Pulse zonTem3( final amplitude=7, final period=600, final offset=273.15 + 19) "Zone 3 temperature"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant zonTem2( final k=273.15 + 20) "Zone 2 temperature"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant zonOcc2( final k=true) "Zone 2 occupied status"; Buildings.Controls.OBC.CDL.Logical.Not not2 "Logical not"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant tNexOcc2( final k=0) "Zone 2 next occupancy time"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant con( final k=1800) "Constant"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant con1( final k=2100) "Constant"; equation connect(ramp2.y,sin2. u); connect(not1.y, tim1.u); connect(not3.y,tim3. u); connect(uOccOve.y, zonGroSta.zonOcc); connect(zonOcc1.y, not1.u); connect(zonOcc3.y,not3. u); connect(zonOcc1.y, zonGroSta.uOcc[1]); connect(zonOcc3.y, zonGroSta.uOcc[3]); connect(addPar1.y, zonGroSta.tNexOcc[1]); connect(addPar3.y, zonGroSta.tNexOcc[3]); connect(cooDowTim.y, zonGroSta.uCooTim); connect(warUpTim.y, zonGroSta.uWarTim); connect(not1.y, and2[1].u2); connect(not3.y, and2[3].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(zonTem3.y, zonGroSta.TZon[3]); connect(winSta.y, zonGroSta.uWin); connect(zonTem2.y, zonGroSta.TZon[2]); connect(zonOcc2.y, not2.u); connect(not2.y, and2[2].u2); connect(zonOcc2.y, zonGroSta.uOcc[2]); connect(tNexOcc2.y, zonGroSta.tNexOcc[2]); connect(con.y, addPar1.u1); connect(tim1.y, addPar1.u2); connect(con1.y, addPar3.u1); connect(tim3.y, addPar3.u2); connect(sin2.y, gai.u); connect(gai.y, zonTem.u); end GroupStatus;

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

Validate block for selecting operation mode

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

Information

This example validates Buildings.Obsolete.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.Obsolete.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.OperationMode opeModSel(final numZon=1) "Operation mode selection"; Buildings.Controls.OBC.CDL.Reals.Sources.Ramp ramp1( final height=6.2831852, final duration=172800) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Reals.Sin sin1 "Block that outputs the sine of the input"; Buildings.Controls.OBC.CDL.Reals.AddParameter zonTem( final p=295.65) "Zone temperarure"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai( final k=14.5) "Gain factor"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TZonHeaSetUno( final k=285.15) "Unoccupied heating setpoint"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TZonCooSetUno( final k=303.15) "Unoccupied cooling setpoint"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TZonHeaSetOcc( final k=293.15) "Occupied heating setpoint"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TZonCooSetOcc( final k=297.15) "Occupied cooling setpoint"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant warUpTim( final k=1800) "Warm-up time"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant cooDowTim( final k=1800) "Cooling down time"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant cloWin( final k=0) "No window is open"; Buildings.Controls.OBC.CDL.Reals.Greater lowThaHeaSet "True when the zone temperature is lower than the occupied heating setpoint"; Buildings.Controls.OBC.CDL.Reals.Greater higThaCooSet "True when the zone temperature is higher than the occupied cooling setpoint"; Buildings.Controls.OBC.CDL.Reals.Greater 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.Reals.Greater greEqu3 "True when the zone temperature is lower than unoccupied heating setpoint"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt1 "Convert boolean to integer"; Buildings.Controls.SetPoints.OccupancySchedule occSch "Occupancy schedule"; Buildings.Controls.OBC.CDL.Reals.Subtract sub3 "Calculate zone temperature difference to unoccupied heating setpoint"; Buildings.Controls.OBC.CDL.Reals.Hysteresis hys3( final uLow=-0.5, final uHigh=0.5) "Hysteresis that outputs if the zone temperature is higher than its unoccupied heating setpoint by a given limit"; Buildings.Controls.OBC.CDL.Reals.Subtract sub1 "Calculate zone temperature difference to unoccupied cooling setpoint"; Buildings.Controls.OBC.CDL.Reals.Hysteresis hys1( final uLow=-0.5, final uHigh=0.5) "Hysteresis that outputs if the zone temperature is lower than its unoccupied cooling setpoint by a given limit"; equation connect(ramp1.y, sin1.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.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, sub3.u1); connect(TZonHeaSetUno.y, sub3.u2); connect(sub3.y, hys3.u); connect(hys3.y, opeModSel.uEndSetBac); connect(sub1.y, hys1.u); connect(hys1.y, opeModSel.uEndSetUp); connect(zonTem.y, sub1.u2); connect(TZonCooSetUno.y, sub1.u1); connect(sin1.y, gai.u); connect(gai.y, zonTem.u); connect(zonTem.y, sub1.u2); connect(TZonCooSetUno.y, sub1.u1); end OperationMode;

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

Model validates the trim and respond block

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

Information

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

Modelica definition

model TrimAndRespond "Model validates the trim and respond block" Buildings.Obsolete.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.Obsolete.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.Obsolete.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.Reals.Sources.Sin sine( final amplitude=6, final freqHz=1/5400) "Block generates sine signal"; Buildings.Controls.OBC.CDL.Reals.Abs abs "Block generates absolute value of input"; Buildings.Controls.OBC.CDL.Reals.Sources.Sin sine1( final amplitude=6, freqHz=1/5400) "Block generates sine signal"; Buildings.Controls.OBC.CDL.Reals.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.Reals.Switch swi "Switch between two Real signals"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant con1(final k=0) "Zero request when device is OFF"; Buildings.Controls.OBC.CDL.Reals.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.Reals.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.Obsolete.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.Validation.ZoneStatus Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.Validation.ZoneStatus

Validate block for checking temperatures in the zone

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

Information

This example validates Buildings.Obsolete.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.Obsolete.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.ZoneStatus noWinZonSta(final have_winSen=false) "Status of zone when there is no window operation sensor"; Buildings.Obsolete.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.Reals.Sources.Constant warUpTim( final k=1800) "Warm-up time"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant cooDowTim( final k=1800) "Cooling down time"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse uWinSta( final width=0.3, final period=43200, final shift=1800) "Window on/off status"; Buildings.Controls.OBC.CDL.Reals.Sources.Ramp ramp2( final offset=0, final height=6.2831852, final duration=24*3600) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Reals.Sin sin2 "Block that outputs the sine of the input"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai( final k=12.5) "Gain factor"; Buildings.Controls.OBC.CDL.Reals.AddParameter zonTem( final p=273.15 + 22.5) "Current zone temperature"; equation connect(cooDowTim.y, noWinZonSta.cooDowTim); connect(warUpTim.y, noWinZonSta.warUpTim); connect(ramp2.y,sin2. 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); connect(sin2.y, gai.u); connect(gai.y, zonTem.u); end ZoneStatus;

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

Validate block for duplicating zone status

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

Information

This example validates Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.ZoneStatusDuplicator for duplicating zone status.

Modelica definition

model ZoneStatusDuplicator "Validate block for duplicating zone status" Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.ZoneStatusDuplicator zonStaDup(final nZon=5, final nGro=2) "Zone status duplicator"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant reaInp[6,5]( final k=fill({1,2,3,4,5}, 6)) "Real inputs"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant booInp[9,5]( final k=fill({true,true,false,true,false},9)) "Boolean inputs"; equation connect(reaInp[1, :].y, zonStaDup.tNexOcc); connect(reaInp[2, :].y, zonStaDup.uCooTim); connect(reaInp[3, :].y, zonStaDup.uWarTim); connect(reaInp[4, :].y, zonStaDup.THeaSetOff); connect(reaInp[5, :].y, zonStaDup.TCooSetOff); connect(reaInp[6, :].y, zonStaDup.TZon); connect(booInp[1, :].y, zonStaDup.zonOcc); connect(booInp[2, :].y, zonStaDup.uOcc); connect(booInp[3, :].y, zonStaDup.uOccHeaHig); connect(booInp[4, :].y, zonStaDup.uHigOccCoo); connect(booInp[5, :].y, zonStaDup.uUnoHeaHig); connect(booInp[6, :].y, zonStaDup.uEndSetBac); connect(booInp[7, :].y, zonStaDup.uHigUnoCoo); connect(booInp[8, :].y, zonStaDup.uEndSetUp); connect(booInp[9, :].y, zonStaDup.uWin); end ZoneStatusDuplicator;