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

Package with sequences that output control setpoints

Information

This package contains generic setpoint sequences for either AHU or terminal units control.

Package Content

Name Description
Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.OperationMode OperationMode Block that outputs the operation mode
Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.TrimAndRespond TrimAndRespond Block to inplement trim and respond logic
Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.Validation Validation Collection of validation models

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

Block that outputs the operation mode

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

Information

This block outputs VAV system operation mode. It is implemented according to ASHRAE guideline G36, PART5.C.6 (zone group operating modes). The block has the modes listed below.

Occupied Mode

A Zone Group is in the occupied mode when occupancy input uOcc is true. This input shall be retrieved from other sequences that specifies occupancy variation and time remaining to the next occupied period tNexOcc.

Warmup Mode

Warmup mode shall start based on the zone with the longest calculated warm up time warUpTim requirement, but no earlier than 3 hours before the start of the scheduled occupied period, and shall end at the scheduled occupied start time. Zones where the window switch indicates that a window is open shall be ignored. Note that for each zone, the optimal warm-up time warUpTim shall be obtained from an Optimal Start sequences, computed in a separate block. The figure below shows the sequence.

Image of warm-up mode definition

Cool-Down Mode

Cool-down mode shall start based on the zone with the longest calculated cool-down time cooDowTim requirement, but no earlier than 3 hours before the start of the scheduled occupied period, and shall end at the scheduled occupied start time. Zones where the window switch indicates that a window is open shall be ignored. Note that the each zone cooDowTim shall be obtained from an Optimal Start sequences, computed in a separate block.

Image of cool-down mode definition

Setback Mode

During unoccupied mode, if any 5 zones (or all zones, if fewer than 5) in the zone group fall below their unoccupied heating setpoints TZonHeaSetUno, the zone group shall enter setback mode until all spaces in the zone group are 1.1 °C (2 °F) above their unoccupied setpoints.

Image of setback mode definition

Freeze Protection Setback Mode

During unoccupied Mode, if any single zone falls below 4.4 °C (40 °F), the zone group shall enter setback mode until all zones are above 7.2 °C (45 °F), and a Level 3 alarm yFreProSta shall be set.

Setup Mode

During unoccupied mode, if any 5 zones (or all zones, if fewer than 5) in the zone group rise above their unoccupied cooling setpoints TZonCooSetUno, the zone group shall enter setup mode until all spaces in the zone group are 1.1 °C (2 °F) below their unoccupied setpoints. Zones where the window switch indicates that a window is open shall be ignored.

Image of setup mode definition

Unoccupied Mode

Unoccupied mode shall be active if the zone group is not in any other mode.

Parameters

TypeNameDefaultDescription
IntegernumZonnumZon( ...Number of zones
TimepreWarCooTim10800Maximum cool-down or warm-up time [s]
TemperatureDifferencebouLim1.1Value limit to indicate the end of setback or setup mode [K]
TemperatureTZonFreProOn277.55Threshold zone temperature value to activate freeze protection mode [K]
TemperatureTZonFreProOff280.35Threshold zone temperature value to finish the freeze protection mode [K]

Connectors

TypeNameDescription
input RealInputTZonHeaSetOccOccupied heating setpoint temperature [K]
input RealInputTZonCooSetOccOccupied cooling setpoint temperature [K]
input RealInputTZon[numZon]Temperature of each zone [K]
input RealInputTZonCooSetUnoUnoccupied cooling setpoint [K]
input RealInputTZonHeaSetUnoUnoccupied heating setpoint temperature [K]
input RealInputwarUpTim[numZon]Warm-up time retrieved from optimal warm-up block [s]
input RealInputcooDowTim[numZon]Cool-down time retrieved from optimal cool-down block [s]
input RealInputtNexOccTime to next occupied period [s]
input BooleanInputuOccZone occupancy status: true=occupied, false=unoccupied
input BooleanInputuWinSta[numZon]Window status: true=open, false=close
output IntegerOutputyOpeModOperation mode

Modelica definition

block OperationMode "Block that outputs the operation mode" parameter Integer numZon(min=1) "Number of zones"; parameter Modelica.SIunits.Time preWarCooTim = 10800 "Maximum cool-down or warm-up time"; parameter Modelica.SIunits.TemperatureDifference bouLim(min=0.5) = 1.1 "Value limit to indicate the end of setback or setup mode"; parameter Modelica.SIunits.Temperature TZonFreProOn = 277.55 "Threshold zone temperature value to activate freeze protection mode"; parameter Modelica.SIunits.Temperature TZonFreProOff = 280.35 "Threshold zone temperature value to finish the freeze protection mode"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TZonHeaSetOcc( final unit="K", quantity="ThermodynamicTemperature") "Occupied heating setpoint temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TZonCooSetOcc( final unit="K", quantity="ThermodynamicTemperature") "Occupied cooling setpoint temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TZon[numZon]( each final unit="K", each quantity="ThermodynamicTemperature") "Temperature of each zone"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TZonCooSetUno( final unit="K", quantity="ThermodynamicTemperature") "Unoccupied cooling setpoint"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TZonHeaSetUno( final unit="K", quantity="ThermodynamicTemperature") "Unoccupied heating setpoint temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealInput warUpTim[numZon]( each final unit="s", each quantity="Time") "Warm-up time retrieved from optimal warm-up block"; Buildings.Controls.OBC.CDL.Interfaces.RealInput cooDowTim[numZon]( each final unit="s", each quantity="Time") "Cool-down time retrieved from optimal cool-down block"; Buildings.Controls.OBC.CDL.Interfaces.RealInput tNexOcc( final unit="s", quantity="Time") "Time to next occupied period"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uOcc "Zone occupancy status: true=occupied, false=unoccupied"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uWinSta[numZon] "Window status: true=open, false=close"; Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yOpeMod "Operation mode"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant occModInd( k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.occupied) "Occupied mode "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant unoPerInd(final k=0) "Index to indicate unoccupied period"; Buildings.Controls.OBC.CDL.Continuous.MultiMax maxCooTim(final nin=numZon) "Find the maximum cool down time"; Buildings.Controls.OBC.CDL.Continuous.MultiMax maxWarTim(final nin=numZon) "Find the maximum warm-up time"; Buildings.Controls.OBC.CDL.Logical.Switch corCooDowTim "Corrected cool down period"; Buildings.Controls.OBC.CDL.Logical.Switch corWarUpTim "Corrected warm-up period"; Buildings.Controls.OBC.CDL.Continuous.MultiSum sum1(final nin=numZon) "Sum up number of zones that have temperature being lower than setpoint"; Buildings.Controls.OBC.CDL.Continuous.GreaterEqualThreshold greEquThr( final threshold=4.5) "Check if the number of cold zones is more than 5"; Buildings.Controls.OBC.CDL.Continuous.GreaterEqualThreshold greEquThr1( final threshold=numZon-0.5) "Check if all zones are cold zone"; Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys( uLow=-0.5*bouLim, uHigh=0.5*bouLim, pre_y_start=false) "Hysteresis that outputs if the unoccupied heating setpoint is higher than minimum zone temperature by a given limit"; Buildings.Controls.OBC.CDL.Logical.FallingEdge falEdg "Check if the unoccupied heating setpoint becomes lower than minimum zone temperature: true to false"; Buildings.Controls.OBC.CDL.Logical.Latch lat "If all zone temperature are higher than unoccupied heating setpoint by a given limit, then the setback mode should be off"; Buildings.Controls.OBC.CDL.Logical.Latch lat1 "If all zone temperature are higher than threshold temperature of ending freeze protection, then freeze protection setback mode should be off"; Buildings.Controls.OBC.CDL.Continuous.MultiSum sum2(final nin=numZon) "Sum up number of zones that have temperature being higher than setpoint"; Buildings.Controls.OBC.CDL.Continuous.GreaterEqualThreshold greEquThr2(threshold=4.5) "Check if the number of hot zone is more than 5"; Buildings.Controls.OBC.CDL.Continuous.GreaterEqualThreshold greEquThr3( final threshold=numZon-0.5) "Check if all zones are hot zone"; Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys1( pre_y_start=false, uLow=-0.5*bouLim, uHigh=0.5*bouLim) "Hysteresis that outputs if the maximum zone temperature is higher than unoccupied cooling setpoint by a given limit"; Buildings.Controls.OBC.CDL.Logical.Latch lat2 "If all zone temperature are lower than unoccupied cooling setpoint by a given limit, then the setup mode should be off"; Buildings.Controls.OBC.CDL.Logical.FallingEdge falEdg1 "Check if the unoccupied cooling setpoint becomes higher than maximum zone temperature: true to false"; Buildings.Controls.OBC.CDL.Integers.MultiSum sumInt(final nin=7) "Sum of inputs"; Buildings.Controls.OBC.CDL.Continuous.Product pro[numZon] "Decide if the cool down time of one zone should be ignored: if window open, then output zero, otherwise, output cool-down time from optimal cool-down block"; Buildings.Controls.OBC.CDL.Continuous.Product pro1[numZon] "Decide if the warm-up time of one zone should be ignored: if window open, then output zero, otherwise, output warm-up time from optimal warm-up block"; Buildings.Controls.OBC.CDL.Continuous.Add add2( final k1=+1, final k2=-1) "Calculate the difference between minimum zone temperature and unoccupied heating setpoint"; Buildings.Controls.OBC.CDL.Continuous.Add add1( final k1=+1, final k2=-1) "Calculate the difference between maximum zone temperature and unoccupied cooling setpoint"; Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys2( pre_y_start=true, uHigh=0, uLow=-60) "Hysteresis that outputs if the maximum cool-down time is more than the allowed cool-down time"; Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys3( pre_y_start=true, uHigh=0, uLow=-60) "Hysteresis that outputs if the maximum warm-up time is more than allowed warm-up time"; Buildings.Controls.OBC.CDL.Continuous.Add add5( final k1=-1, final k2=+1) "Calculate differential between time-to-next-occupancy and the cool-down time"; Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys4( pre_y_start=false, uHigh=0, uLow=-60) "Hysteresis to activate the cool-down model"; Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys5( pre_y_start=false, uHigh=0, uLow=-60) "Hysteresis to activate the warm-up model"; Buildings.Controls.OBC.CDL.Continuous.Add add6( final k1=-1, final k2=+1) "Calculate differential between time-to-next-occupancy and the warm-up time"; Buildings.Controls.OBC.CDL.Continuous.Add add7( final k1=+1, final k2=-1) "Calculate differential between minimum zone temperature and the heating setpoint"; Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys6( pre_y_start=false, uLow=-0.1, uHigh=0.1) "Hysteresis that outputs if the system should run in warm-up mode"; Buildings.Controls.OBC.CDL.Continuous.Add add8( final k1=-1, final k2=+1) "Calculate differential between maximum zone temperature and the cooling setpoint"; Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys7( pre_y_start=false, uLow=-0.1, uHigh=0.1) "Hysteresis that outputs if the system should run in cool-down mode"; Buildings.Controls.OBC.CDL.Continuous.Add add9[numZon]( each k1=-1, each k2=+1) "Calculate zone temperature difference to setpoint"; Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys8[numZon]( each pre_y_start=false, each uLow=-0.1, each uHigh=0.1) "Hysteresis that outputs if the zone temperature is lower then setpoint"; Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys9( pre_y_start=false, uLow=-0.1, uHigh=0.1) "Hysteresis that outputs if any zone temperature is lower than freeze protection threshold temperature"; Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar( p=TZonFreProOn, final k=-1) "Calculate differential between minimum zone temperature and freeze protection threshold temperature"; Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys10( pre_y_start=false, uLow=-0.1, uHigh=0.1) "Hysteresis that outputs if all zone temperature are higher than threshold temperature of ending freeze protection"; Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar1( final k=1, p=(-1)*TZonFreProOff) "Calculate differential between maximum zone temperature and threshold temperature of ending freeze protection"; Buildings.Controls.OBC.CDL.Continuous.Add add10[numZon]( each k1=+1, each k2=-1) "Calculate zone temperature difference to setpoint"; Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys11[numZon]( each pre_y_start=false, each uLow=-0.1, each uHigh=0.1) "Hysteresis that outputs if the zone temperature is higher than setpoint"; Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar2( p=preWarCooTim, final k=-1) "Calculate the differential between maximum cool down time and the allowed maximum cool down time"; Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar3( p=preWarCooTim, final k=-1) "Calculate the differential between maximum warm-up time and the allowed maximum warm-up time"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant maxWarCooTime( k=preWarCooTim) "Allowed maximum warm-up or cool-down time"; Buildings.Controls.OBC.CDL.Logical.Latch lat3 "Hold true when it should be in warm-up mode"; Buildings.Controls.OBC.CDL.Logical.Latch lat4 "Hold true when it should be in cool-down mode"; protected Buildings.Controls.OBC.CDL.Conversions.RealToInteger occMod "Convert Real number to Integer number"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger setBacMod "Convert Real number to Integer number"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger freProSetBacMod "Convert Real number to Integer number"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger setUpMod "Convert Real number to Integer number"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt1( integerTrue=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.warmUp) "Convert Boolean to Integer number"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt( integerTrue=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.coolDown) "Convert Boolean to Integer number"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt3( integerTrue=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.unoccupied) "Convert Boolean to Integer "; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea6( realTrue=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.setUp) "Convert Boolean to Real "; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea5[numZon] "Convert Boolean to Real number"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea4( realTrue=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.freezeProtection) "Convert Boolean to Real "; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea3( realTrue=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.setBack) "Convert Boolean to Real "; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea2[numZon] "Convert Boolean to Real number"; Buildings.Controls.OBC.CDL.Utilities.Assert assMes( message="Level 3 alarm: freeze protection setback") "Generate alarm message"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea9[numZon] "Convert Boolean to Real number"; Buildings.Controls.OBC.CDL.Logical.Not not1[numZon] "Logical not"; Buildings.Controls.OBC.CDL.Logical.Not not2 "Logical not"; Buildings.Controls.OBC.CDL.Logical.And and1 "Check if the warm-up time should be activated"; Buildings.Controls.OBC.CDL.Logical.And and2 "Check if the cool-down time should be activated"; Buildings.Controls.OBC.CDL.Logical.Or or1 "Check if the number of cold zone is more than 5 or all zones are cold"; Buildings.Controls.OBC.CDL.Logical.Or3 or3 "Check if it is in Occupied, Cool-down, or Warm-up mode"; Buildings.Controls.OBC.CDL.Logical.Or or4 "Check if the number of hot zone is more than 5 or all zones are cold"; Buildings.Controls.OBC.CDL.Logical.Or3 or5 "Check if it is in Setback, Setback_freezeProtection, or Setup mode"; Buildings.Controls.OBC.CDL.Logical.Or or6 "Check if it is in any of the 6 modes except unoccupied mode"; Buildings.Controls.OBC.CDL.Logical.Switch swi "Switch between occupied mode index and unoccupied period index"; Buildings.Controls.OBC.CDL.Logical.Switch swi1[numZon] "Decide if the temperature difference to setpoint should be ignored: if the zone window is open, then output setpoint temperature, otherwise, output zone temperature"; Buildings.Controls.OBC.CDL.Logical.Switch swi2[numZon] "Decide if the temperature difference to setpoint should be ignored: if the zone window is open, then output setpoint temperature, otherwise, output zone temperature"; Buildings.Controls.OBC.CDL.Logical.Switch swi3 "If the Cool-down, warm-up, or Occupied mode is on, then setback mode should not be activated."; Buildings.Controls.OBC.CDL.Logical.Switch swi4 "If the Cool-down, warm-up, or Occupied mode is on, then freeze protection setback mode should not be activated."; Buildings.Controls.OBC.CDL.Logical.Switch swi5 "If the Cool-down, warm-up, or Occupied mode is on, then setup mode should not be activated."; Buildings.Controls.OBC.CDL.Routing.RealReplicator reaRep(nout=numZon) "Replicate Real input"; Buildings.Controls.OBC.CDL.Routing.RealReplicator reaRep1(nout=numZon) "Replicate Real input"; Buildings.Controls.OBC.CDL.Continuous.MultiMin minZonTem(nin=numZon) "Find the minimum zone temperature"; Buildings.Controls.OBC.CDL.Continuous.MultiMax maxZonTem(nin=numZon) "Find the maximum zone temperature"; Buildings.Controls.OBC.CDL.Logical.Not not3 "Logical not"; Buildings.Controls.OBC.CDL.Logical.Not not4 "Logical not"; Buildings.Controls.OBC.CDL.Logical.Not not5 "Logical not"; equation connect(swi.y, occMod.u); connect(occModInd.y, swi.u1); connect(unoPerInd.y, swi.u3); connect(maxCooTim.y, corCooDowTim.u1); connect(booToRea2.y, sum1.u); connect(booToRea5.y, sum2.u); connect(uWinSta, swi1.u2); connect(TZon, swi1.u3); connect(uWinSta, swi2.u2); connect(TZon, swi2.u3); connect(cooDowTim, pro.u1); connect(warUpTim, pro1.u1); connect(booToRea9.y, pro.u2); connect(booToRea9.y, pro1.u2); connect(swi1.y, add9.u1); connect(add9.y, hys8.u); connect(hys8.y, booToRea2.u); connect(swi2.y, add10.u1); connect(add10.y, hys11.u); connect(hys11.y, booToRea5.u); connect(uWinSta, not1.u); connect(not1.y, booToRea9.u); connect(sum1.y, greEquThr.u); connect(sum1.y, greEquThr1.u); connect(greEquThr.y, or1.u1); connect(greEquThr1.y, or1.u2); connect(or1.y, lat.u); connect(falEdg.y, lat.clr); connect(lat.y, booToRea3.u); connect(unoPerInd.y, swi3.u1); connect(or3.y, swi3.u2); connect(lat1.y, booToRea4.u); connect(or3.y, swi4.u2); connect(unoPerInd.y, swi4.u1); connect(sum2.y, greEquThr2.u); connect(sum2.y, greEquThr3.u); connect(greEquThr2.y, or4.u1); connect(greEquThr3.y, or4.u2); connect(hys1.y, falEdg1.u); connect(or4.y, lat2.u); connect(falEdg1.y, lat2.clr); connect(lat2.y, booToRea6.u); connect(or3.y, swi5.u2); connect(unoPerInd.y, swi5.u1); connect(swi3.y, setBacMod.u); connect(swi4.y, freProSetBacMod.u); connect(swi5.y, setUpMod.u); connect(lat.y, or5.u1); connect(lat1.y, or5.u2); connect(lat2.y, or5.u3); connect(or5.y, or6.u1); connect(or3.y, or6.u2); connect(or6.y, not2.u); connect(not2.y,booToInt3. u); connect(sumInt.y, yOpeMod); connect(and2.y, booToInt.u); connect(and1.y, booToInt1.u); connect(and2.y, or3.u2); connect(and1.y, or3.u1); connect(uOcc, swi.u2); connect(uOcc, or3.u3); connect(add2.y, hys.u); connect(TZonHeaSetUno, add2.u1); connect(TZonCooSetUno, add1.u2); connect(add1.y, hys1.u); connect(hys.y, falEdg.u); connect(hys2.y, corCooDowTim.u2); connect(hys3.y, corWarUpTim.u2); connect(add5.y, hys4.u); connect(hys4.y, and2.u1); connect(tNexOcc, add5.u1); connect(corCooDowTim.y, add5.u2); connect(tNexOcc, add6.u1); connect(corWarUpTim.y, add6.u2); connect(add6.y, hys5.u); connect(hys5.y, and1.u1); connect(add7.y, hys6.u); connect(TZonHeaSetOcc, add7.u1); connect(add8.y, hys7.u); connect(TZonCooSetOcc, add8.u1); connect(addPar.y, hys9.u); connect(hys9.y, lat1.u); connect(addPar1.y, hys10.u); connect(hys10.y, lat1.clr); connect(maxWarTim.y, addPar3.u); connect(addPar2.y, hys2.u); connect(addPar3.y, hys3.u); connect(maxCooTim.y, addPar2.u); connect(maxWarCooTime.y, corCooDowTim.u3); connect(maxWarTim.y, corWarUpTim.u1); connect(maxWarCooTime.y, corWarUpTim.u3); connect(TZonHeaSetUno, reaRep.u); connect(reaRep.y, swi1.u1); connect(reaRep.y, add9.u2); connect(TZonCooSetUno, reaRep1.u); connect(reaRep1.y, add10.u2); connect(reaRep1.y, swi2.u1); connect(booToRea3.y, swi3.u3); connect(booToRea4.y, swi4.u3); connect(booToRea6.y, swi5.u3); connect(occMod.y, sumInt.u[1]); connect(booToInt.y, sumInt.u[2]); connect(booToInt1.y, sumInt.u[3]); connect(setBacMod.y, sumInt.u[4]); connect(freProSetBacMod.y, sumInt.u[5]); connect(setUpMod.y, sumInt.u[6]); connect(booToInt3.y, sumInt.u[7]); connect(maxZonTem.y, add8.u2); connect(maxZonTem.y, addPar.u); connect(maxZonTem.y, add1.u1); connect(TZon, maxZonTem.u); connect(TZon,minZonTem.u); connect(minZonTem.y, add7.u2); connect(minZonTem.y, add2.u2); connect(minZonTem.y, addPar1.u); connect(pro.y, maxCooTim.u); connect(pro1.y, maxWarTim.u); connect(hys6.y, lat3.u); connect(lat3.y, and1.u2); connect(hys7.y, lat4.u); connect(lat4.y, and2.u2); connect(hys4.y, not3.u); connect(hys5.y, not4.u); connect(not4.y, lat3.clr); connect(not3.y, lat4.clr); connect(lat1.y, not5.u); connect(not5.y, assMes.u); end OperationMode;

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

Block to inplement trim and respond logic

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

Information

This block implements the trim and respond logic according to ASHRAE guideline G36, PART5.A.15 (trim and respond setpoint reset logic).

The trim and respond logic shall reset setpoint within the range minSet to maxSet. When the associated device is off (uDevSta=false), the setpoint shall be iniSet. The reset logic shall be active while the associated device is proven on (uDevSta=true), starting delTim after initial device start command. When active, every time step samplePeriod, trim the setpoint by triAmo. If there are more than numIgnReq requests, respond by changing the setpoint by resAmo*(numOfReq-numIgnReq), i.e., the number of requests minus the number of ignored requests, but no more than maxRes.

In other words, every time step samplePeriod:

Image of set point reset

Parameters

TypeNameDefaultDescription
RealiniSet Initial setpoint
RealminSet Minimum setpoint
RealmaxSet Maximum setpoint
TimedelTimdelTim( ...Delay time [s]
TimesamplePeriodsamplePeriod( ...Sample period of component [s]
IntegernumIgnReq Number of ignored requests
RealtriAmo Trim amount
RealresAmo Respond amount (must have opposite sign of triAmo)
RealmaxRes Maximum response per time interval (must have same sign as resAmo)

Connectors

TypeNameDescription
input IntegerInputnumOfReqNumber of requests from zones/systems
input BooleanInputuDevStaOn/Off status of the associated device
output RealOutputySetpoint that have been reset

Modelica definition

block TrimAndRespond "Block to inplement trim and respond logic" parameter Real iniSet "Initial setpoint"; parameter Real minSet "Minimum setpoint"; parameter Real maxSet "Maximum setpoint"; parameter Modelica.SIunits.Time delTim(min=100*1E-15) "Delay time"; parameter Modelica.SIunits.Time samplePeriod(min=1E-3) "Sample period of component"; parameter Integer numIgnReq "Number of ignored requests"; parameter Real triAmo "Trim amount"; parameter Real resAmo "Respond amount (must have opposite sign of triAmo)"; parameter Real maxRes "Maximum response per time interval (must have same sign as resAmo)"; Buildings.Controls.OBC.CDL.Interfaces.IntegerInput numOfReq "Number of requests from zones/systems"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uDevSta "On/Off status of the associated device"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput y "Setpoint that have been reset"; Buildings.Controls.OBC.CDL.Logical.TrueDelay tim( final delayTime=delTim + samplePeriod) "Send an on signal after some delay time"; Buildings.Controls.OBC.CDL.Continuous.GreaterEqualThreshold greThr "Check if the real requests is more than ignored requests setting"; Buildings.Controls.OBC.CDL.Logical.Switch netRes "Net setpoint reset value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant resAmoCon(k=resAmo) "Respond amount constant"; Buildings.Controls.OBC.CDL.Continuous.Product pro "Products of net requests and respond amount value"; Buildings.Controls.OBC.CDL.Discrete.UnitDelay uniDel( final samplePeriod=samplePeriod, final y_start=iniSet) "Output the input signal with a unit delay"; Buildings.Controls.OBC.CDL.Logical.Switch swi "Switch between initial setpoint and reseted setpoint"; Buildings.Controls.OBC.CDL.Logical.Switch swi1 "Before instant (device ON + delTim + samplePeriod), the setpoint should not be trimmed"; Buildings.Controls.OBC.CDL.Logical.Switch swi2 "Reinitialize setpoint to initial setting when device become OFF"; Buildings.Controls.OBC.CDL.Discrete.Sampler sampler(samplePeriod=samplePeriod) "Sample number of requests"; protected Buildings.Controls.OBC.CDL.Continuous.Sources.Constant iniSetCon(k=iniSet) "Initial setpoint"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant numIgnReqCon(k=numIgnReq) "Number of ignored requests"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant triAmoCon(k=triAmo) "Trim amount constant"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant maxResCon(k=maxRes) "Maximum response per time interval"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant maxSetCon(k=maxSet) "Maximum setpoint constant"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant zerTri(k=0) "Zero reset amount during time range from (device ON) to (device ON + delTim + timSet)"; Buildings.Controls.OBC.CDL.Conversions.IntegerToReal intToRea "Convert integer input to real output"; Buildings.Controls.OBC.CDL.Continuous.Add difReqIgnReq(k1=-1) "Difference between ignored request number and the real request number"; Buildings.Controls.OBC.CDL.Continuous.Add add1 "Increase setpoint by amount of value defined from reset logic"; Buildings.Controls.OBC.CDL.Continuous.Add add2 "Net reset value"; Buildings.Controls.OBC.CDL.Continuous.Min minInp "Total response should not be more than maximum response"; Buildings.Controls.OBC.CDL.Continuous.Min min1 "Reset setpoint should not be higher than the maximum setpoint"; Buildings.Controls.OBC.CDL.Logical.And and2 "After (device ON + delTim + timSta), when request number becomes more than ignored requests number"; Buildings.Controls.OBC.CDL.Logical.Not not1 "Logical Not"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant minSetCon(k=minSet) "Minimum setpoint constant"; Buildings.Controls.OBC.CDL.Continuous.Max maxInp "Reset setpoint should not be lower than the minimum setpoint"; equation connect(numIgnReqCon.y, difReqIgnReq.u1); connect(difReqIgnReq.y, greThr.u); connect(pro.y, minInp.u1); connect(maxResCon.y, minInp.u2); connect(minInp.y, add2.u2); connect(triAmoCon.y, add2.u1); connect(add2.y, netRes.u1); connect(iniSetCon.y, swi.u3); connect(swi.y, y); connect(maxSetCon.y, min1.u2); connect(add1.y, min1.u1); connect(uniDel.y, add1.u1); connect(netRes.y, add1.u2); connect(sampler.y, difReqIgnReq.u2); connect(triAmoCon.y, swi1.u1); connect(zerTri.y, swi1.u3); connect(swi1.y, netRes.u3); connect(greThr.y, and2.u2); connect(and2.y, netRes.u2); connect(iniSetCon.y, swi2.u1); connect(swi2.y, swi.u1); connect(swi2.y, uniDel.u); connect(uDevSta, not1.u); connect(not1.y, swi2.u2); connect(min1.y, maxInp.u1); connect(minSetCon.y, maxInp.u2); connect(numOfReq, intToRea.u); connect(intToRea.y, sampler.u); connect(resAmoCon.y, pro.u2); connect(difReqIgnReq.y, pro.u1); connect(uDevSta, tim.u); connect(tim.y, swi.u2); connect(tim.y, swi1.u2); connect(and2.u1, tim.y); connect(maxInp.y, swi2.u3); end TrimAndRespond;