Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.Reheat

Sequences for VAV reheat terminal unit

Information

This package contains sequences for VAV reheat terminal unit. They are created according to ASHRAE Guideline 36, Part 5.E.

Package Content

Name Description
Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.Reheat.DamperValves DamperValves Output signals for controlling VAV reheat box damper and valve position
Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.Reheat.SystemRequests SystemRequests Output system requests for VAV reheat terminal unit control
Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.Reheat.SetPoints SetPoints Output setpoints for terminal unit control
Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.Reheat.Validation Validation Collection of validation models

Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.Reheat.DamperValves Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.Reheat.DamperValves

Output signals for controlling VAV reheat box damper and valve position

Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.Reheat.DamperValves

Information

This sequence sets the damper and valve position for VAV reheat terminal unit. The implementation is according to ASHRAE Guideline 36 (G36), PART 5.E.6. The calculation is done following the steps below.

  1. When the zone state is cooling (uCoo>0), then the cooling loop output uCoo shall be mapped to the airflow setpoint from the cooling minimum VActCooMin_flow to the cooling maximum VActCooMax_flow airflow setpoints. The hot water valve is closed (yHeaVal=0) unless the discharge air temperature TDis is below the minimum setpoint (10 °C).

  2. If supply air temperature TSup from the AHU is greater than room temperature TZon, cooling supply airflow setpoint shall be no higher than the minimum.

  3. When the zone state is Deadband (uCoo=0 and uHea=0), then the active airflow setpoint shall be the minimum airflow setpoint VActMin_flow. Hot water valve is closed unless the discharge air temperature is below the minimum setpoint (10 °C).

  4. When the zone state is Heating (uHea>0), then the heating loop shall maintain space temperature at the heating setpoint as follows:

    • From 0-50%, the heating loop output uHea shall reset the discharge temperature setpoint from current AHU SAT setpoint TSup to a maximum of dTDisZonSetMax above space temperature setpoint. The airflow setpoint shall be the heating minimum VActHeaMin_flow.
    • From 50-100%, if the discharge air temperature TDis is greater than room temperature plus 2.8 Kelvin, the heating loop output uHea shall reset the airflow setpoint from the heating minimum airflow setpoint VActHeaMin_flow to the heating maximum airflow setpoint VActHeaMax_flow.
  5. The hot water valve (or modulating electric heating coil) shall be modulated to maintain the discharge temperature at setpoint.

  6. The VAV damper shall be modulated by a control loop to maintain the measured airflow at the active setpoint.

The sequences of controlling damper and valve position for VAV reheat terminal unit are described in the following figure below.

Image of damper and valve control for VAV reheat terminal unit

Parameters

TypeNameDefaultDescription
RealdTDisZonSetMax11Zone maximum discharge air temperature above heating setpoint [K]
RealTDisMin283.15Lowest discharge air temperature [K]
Valve
SimpleControllercontrollerTypeValBuildings.Controls.OBC.CDL.T...Type of controller
RealkVal0.5Gain of controller for valve control [1/K]
RealTiVal300Time constant of integrator block for valve control [s]
RealTdVal0.1Time constant of derivative block for valve control [s]
Damper
Booleanhave_pressureIndependentDampertrueTrue: the VAV damper is pressure independent (with built-in flow controller)
SimpleControllercontrollerTypeDamBuildings.Controls.OBC.CDL.T...Type of controller
RealkDam0.5Gain of controller for damper control [1]
RealTiDam300Time constant of integrator block for damper control [s]
RealTdDam0.1Time constant of derivative block for damper control [s]
RealV_flow_nominal Nominal volume flow rate, used to normalize control error [m3/s]

Connectors

TypeNameDescription
input RealInputuHeaHeating control signal [1]
input RealInputuCooCooling control signal [1]
input RealInputVActCooMax_flowActive cooling maximum airflow rate [m3/s]
input RealInputVActCooMin_flowActive cooling minimum airflow rate [m3/s]
input RealInputVActMin_flowActive minimum airflow rate [m3/s]
input RealInputVActHeaMin_flowActive heating minimum airflow rate [m3/s]
input RealInputVActHeaMax_flowActive heating maximum airflow rate [m3/s]
input RealInputVDis_flowMeasured discharge airflow rate airflow rate [m3/s]
input RealInputTSupSupply air temperature from central air handler [K]
input RealInputTHeaSetZone heating setpoint temperature [K]
input RealInputTZonMeasured zone temperature [K]
input RealInputTDisMeasured discharge air temperature [K]
input IntegerInputuOpeModZone operation mode
output RealOutputyDamSignal for VAV damper [1]
output RealOutputyHeaValReheater valve position [1]
output RealOutputVDisSet_flowDischarge airflow setpoint [m3/s]
output RealOutputTDisHeaSetDischarge airflow setpoint temperature for heating [K]

Modelica definition

block DamperValves "Output signals for controlling VAV reheat box damper and valve position" parameter Real dTDisZonSetMax( final unit="K", final displayUnit="K", final quantity="TemperatureDifference")=11 "Zone maximum discharge air temperature above heating setpoint"; parameter Real TDisMin( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature")=283.15 "Lowest discharge air temperature"; parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerTypeVal= Buildings.Controls.OBC.CDL.Types.SimpleController.PI "Type of controller"; parameter Real kVal(final unit="1/K")=0.5 "Gain of controller for valve control"; parameter Real TiVal( final unit="s", final quantity="Time")=300 "Time constant of integrator block for valve control"; parameter Real TdVal( final unit="s", final quantity="Time")=0.1 "Time constant of derivative block for valve control"; parameter Boolean have_pressureIndependentDamper = true "True: the VAV damper is pressure independent (with built-in flow controller)"; parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerTypeDam= Buildings.Controls.OBC.CDL.Types.SimpleController.PI "Type of controller"; parameter Real kDam(final unit="1")=0.5 "Gain of controller for damper control"; parameter Real TiDam( final unit="s", final quantity="Time")=300 "Time constant of integrator block for damper control"; parameter Real TdDam( final unit="s", final quantity="Time")=0.1 "Time constant of derivative block for damper control"; parameter Real V_flow_nominal( final unit="m3/s", final quantity="VolumeFlowRate", final min=1E-10) "Nominal volume flow rate, used to normalize control error"; Buildings.Controls.OBC.CDL.Interfaces.RealInput uHea( final min=0, final max=1, final unit="1") "Heating control signal"; Buildings.Controls.OBC.CDL.Interfaces.RealInput uCoo( final min=0, final max=1, final unit="1") "Cooling control signal"; Buildings.Controls.OBC.CDL.Interfaces.RealInput VActCooMax_flow( final min=0, final unit="m3/s", final quantity="VolumeFlowRate") "Active cooling maximum airflow rate"; Buildings.Controls.OBC.CDL.Interfaces.RealInput VActCooMin_flow( final min=0, final unit="m3/s", final quantity="VolumeFlowRate") "Active cooling minimum airflow rate"; Buildings.Controls.OBC.CDL.Interfaces.RealInput VActMin_flow( final min=0, final unit="m3/s", final quantity="VolumeFlowRate") "Active minimum airflow rate"; Buildings.Controls.OBC.CDL.Interfaces.RealInput VActHeaMin_flow( final min=0, final unit="m3/s", final quantity="VolumeFlowRate") "Active heating minimum airflow rate"; Buildings.Controls.OBC.CDL.Interfaces.RealInput VActHeaMax_flow( final min=0, final unit="m3/s", final quantity="VolumeFlowRate") "Active heating maximum airflow rate"; Buildings.Controls.OBC.CDL.Interfaces.RealInput VDis_flow( final min=0, final unit="m3/s", final quantity="VolumeFlowRate") if not have_pressureIndependentDamper "Measured discharge airflow rate airflow rate"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TSup( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") "Supply air temperature from central air handler"; Buildings.Controls.OBC.CDL.Interfaces.RealInput THeaSet( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") "Zone heating setpoint temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TZon( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") "Measured zone temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TDis( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") "Measured discharge air temperature"; Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uOpeMod "Zone operation mode"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yDam( final min=0, final max=1, final unit="1") "Signal for VAV damper"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yHeaVal( final min=0, final max=1, final unit="1") "Reheater valve position"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput VDisSet_flow( final min=0, final unit="m3/s", final quantity="VolumeFlowRate") "Discharge airflow setpoint"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput TDisHeaSet( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") "Discharge airflow setpoint temperature for heating"; Buildings.Controls.OBC.CDL.Logical.Not not1 "Logical not"; Buildings.Controls.OBC.CDL.Logical.Not not2 "Logical not"; Buildings.Controls.OBC.CDL.Logical.Not not4 "Logical not"; Buildings.Controls.OBC.CDL.Logical.And and2 "Check if current zone state is deadband"; Buildings.Controls.OBC.CDL.Logical.And and4 "Logical and"; Buildings.Controls.OBC.CDL.Reals.Line lin "Active airflow setpoint for cooling"; Buildings.Controls.OBC.CDL.Reals.Line conTDisHeaSet "Discharge air temperature for heating"; Buildings.Controls.OBC.CDL.Reals.Line lin3 "Active airflow setpoint for heating"; Buildings.Controls.OBC.CDL.Reals.PIDWithReset conVal( final controllerType=controllerTypeVal, final k=kVal, final Ti=TiVal, final Td=TdVal, final yMax=1, final yMin=0, u_s(final unit="K", displayUnit="degC"), u_m(final unit="K", displayUnit="degC")) "Hot water valve controller"; Buildings.Controls.OBC.CDL.Reals.PIDWithReset conDam( final controllerType=controllerTypeDam, final k=kDam, final Ti=TiDam, final Td=TdDam, final yMax=1, final yMin=0, final y_reset=0) if not have_pressureIndependentDamper "Damper position controller"; Buildings.Controls.OBC.CDL.Reals.Switch swi "Output active cooling airflow according to cooling control signal"; Buildings.Controls.OBC.CDL.Reals.Switch swi1 "Output active airflow when it is in deadband state"; Buildings.Controls.OBC.CDL.Reals.Switch swi2 "Acitive heating airflow rate"; Buildings.Controls.OBC.CDL.Reals.Switch swi4 "Output active heating airflow according to heating control signal"; Buildings.Controls.OBC.CDL.Reals.Switch swi5 "Output active cooling airflow "; protected Buildings.Controls.OBC.CDL.Reals.Sources.Constant conZer( final k=0) "Constant zero"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant conZer1( final k=0) "Constant zero"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant conZer2( final k=0) "Constant zero"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant conZer3( final k=0) "Constant zero"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant conZer6( final k=0) "Constant zero"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant conOne( final k=1) "Constant one"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant conOne2( final k=1) "Constant real value"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant conHal( final k=0.5) "Constant real value"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant conHal1( final k=0.5) "Constant real value"; Buildings.Controls.OBC.CDL.Reals.AddParameter addPar( final p=dTDisZonSetMax) "Maximum heating discharge temperature"; Buildings.Controls.OBC.CDL.Reals.AddParameter addPar1( final p=2.8) "Zone temperature pluTZonSets 2.8 degC"; Buildings.Controls.OBC.CDL.Reals.Hysteresis hys2( final uHigh=0.05, final uLow=0.01) "Check if cooling control signal is greater than zero"; Buildings.Controls.OBC.CDL.Reals.Hysteresis hys3( final uHigh=0.05, final uLow=0.01) "Check if heating control signal is greater than 0"; Buildings.Controls.OBC.CDL.Reals.Hysteresis hys4( final uLow=TDisMin - 0.1, final uHigh=TDisMin + 0.1) "Check if discharge air temperature is greater than lowest discharge air temperature"; Buildings.Controls.OBC.CDL.Reals.Hysteresis hys6( final uLow=-0.1, final uHigh=0.1) "Check if supply air temperature is greater than room temperature"; Buildings.Controls.OBC.CDL.Reals.Hysteresis hys7( final uLow=-0.1, final uHigh=0.1) "Check if discharge air temperature is greater than room temperature plus 2.8 degC"; Buildings.Controls.OBC.CDL.Reals.Subtract sub1 "Calculate temperature difference between discharge air and room plus 2.8 degC"; Buildings.Controls.OBC.CDL.Reals.Subtract sub2 "Calculate temperature difference between AHU supply air and room "; Buildings.Controls.OBC.CDL.Logical.TrueHoldWithReset truHol2(duration=600) "Check if the true input holds for certain time"; Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel3(delayTime=600) "Check if the true input holds for certain time"; Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel4(delayTime=600) "Check if the true input holds for certain time"; Buildings.Controls.OBC.CDL.Integers.Equal isUno "Output true if the operation mode is unoccupied"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant unOcc( final k=Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.unoccupied) "Constant signal for unoccupied mode"; Buildings.Controls.OBC.CDL.Reals.Switch watValPosUno "Output hot water valve position"; Buildings.Controls.OBC.CDL.Reals.Switch damPosUno "Output damper position"; Buildings.Controls.OBC.CDL.Logical.Not not5 "Negation of input signal"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant lowDisAirTem( final k=TDisMin) "Lowest allowed discharge air temperature"; Buildings.Controls.OBC.CDL.Reals.Switch swi6 "Output hot water valve position in case of low discharge air temperature"; Buildings.Controls.OBC.CDL.Logical.Or or2 "Logical not"; Buildings.Controls.OBC.CDL.Logical.Not not3 "Logical not"; Buildings.Controls.OBC.CDL.Reals.Switch swi3 "Output hot water valve position in case of low discharge air temperature"; Buildings.Controls.OBC.CDL.Logical.Not not6 "Negation of input signal"; Buildings.Controls.OBC.CDL.Logical.And and1 "Check if it is not in heating mode and the discharge temperature is not too low"; Buildings.Controls.OBC.CDL.Reals.Add add3 "Active airflow setpoint"; Buildings.Controls.OBC.CDL.Reals.Add add4 "Active airflow set point"; Buildings.Controls.OBC.CDL.Reals.Divide VDis_flowNor if not have_pressureIndependentDamper "Normalized discharge volume flow rate"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant nomFlow( final k=V_flow_nominal) "Nominal volume flow rate"; Buildings.Controls.OBC.CDL.Reals.Divide VDisSet_flowNor "Normalized setpoint for discharge volume flow rate"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai(final k=1) if have_pressureIndependentDamper "Block that can be disabled so remove the connection"; equation connect(uCoo, lin.u); connect(conZer.y, lin.x1); connect(VActCooMin_flow, lin.f1); connect(conOne.y, lin.x2); connect(VActCooMax_flow, lin.f2); connect(uCoo, hys2.u); connect(conZer1.y, swi.u3); connect(VActMin_flow, swi1.u1); connect(and2.y, swi1.u2); connect(conZer2.y, swi1.u3); connect(uHea, hys3.u); connect(conZer3.y, conTDisHeaSet.x1); connect(TSup, conTDisHeaSet.f1); connect(uHea, conTDisHeaSet.u); connect(conHal.y, conTDisHeaSet.x2); connect(addPar.y, conTDisHeaSet.f2); connect(THeaSet, addPar.u); connect(uHea, lin3.u); connect(conHal1.y, lin3.x1); connect(conOne2.y, lin3.x2); connect(VActHeaMax_flow, lin3.f2); connect(VActHeaMin_flow, lin3.f1); connect(TZon, addPar1.u); connect(lin3.y, swi2.u1); connect(VActHeaMin_flow, swi2.u3); connect(TDis, hys4.u); connect(swi2.y, swi4.u1); connect(conZer6.y, swi4.u3); connect(VActMin_flow, swi5.u1); connect(and4.y, swi5.u2); connect(lin.y, swi5.u3); connect(swi5.y, swi.u1); connect(hys4.y, not4.u); connect(TSup, sub2.u1); connect(TZon, sub2.u2); connect(sub2.y, hys6.u); connect(hys6.y, and4.u2); connect(conTDisHeaSet.y, sub1.u1); connect(addPar1.y, sub1.u2); connect(sub1.y, hys7.u); connect(conTDisHeaSet.y, TDisHeaSet); connect(hys3.y, truHol2.u); connect(truHol2.y, swi4.u2); connect(hys2.y, truDel4.u); connect(truDel4.y, and4.u1); connect(truDel4.y, swi.u2); connect(truHol2.y, not2.u); connect(truDel4.y, not1.u); connect(not1.y, and2.u1); connect(not2.y, and2.u2); connect(conVal.u_m, TDis); connect(hys7.y, swi2.u2); connect(unOcc.y, isUno.u1); connect(isUno.u2, uOpeMod); connect(isUno.y, watValPosUno.u2); connect(conZer2.y, watValPosUno.u1); connect(watValPosUno.y, yHeaVal); connect(conZer2.y, damPosUno.u1); connect(conDam.y, damPosUno.u3); connect(damPosUno.y, yDam); connect(isUno.y, damPosUno.u2); connect(isUno.y, not5.u); connect(not5.y, conDam.trigger); connect(truHol2.y, or2.u2); connect(truDel3.y, not3.u); connect(not3.y, or2.u1); connect(or2.y, swi6.u2); connect(conTDisHeaSet.y, swi6.u1); connect(swi6.u3, lowDisAirTem.y); connect(swi3.y, watValPosUno.u3); connect(truHol2.y, not6.u); connect(not6.y, and1.u2); connect(and1.y, swi3.u2); connect(conVal.y, swi3.u3); connect(swi3.u1, conZer2.y); connect(not3.y, and1.u1); connect(not4.y, truDel3.u); connect(not5.y, conVal.trigger); connect(swi6.y, conVal.u_s); connect(swi1.y, add4.u1); connect(swi4.y, add4.u2); connect(swi.y, add3.u1); connect(add4.y, add3.u2); connect(add3.y, VDisSet_flow); connect(VDis_flow, VDis_flowNor.u1); connect(nomFlow.y, VDis_flowNor.u2); connect(VDis_flowNor.y, conDam.u_m); connect(nomFlow.y, VDisSet_flowNor.u2); connect(add3.y, VDisSet_flowNor.u1); connect(VDisSet_flowNor.y, conDam.u_s); connect(VDisSet_flowNor.y, gai.u); connect(gai.y, damPosUno.u3); end DamperValves;

Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.Reheat.SystemRequests Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.Reheat.SystemRequests

Output system requests for VAV reheat terminal unit control

Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.Reheat.SystemRequests

Information

This sequence outputs the system reset requests, i.e.,

The calculations are according to ASHRAE Guideline 36 (G36), PART 5.E.9, in the steps shown below.

a. Cooling SAT reset requests yZonTemResReq

  1. If the zone temperature TZon exceeds the zone cooling setpoint TZonCooSet by 2.8 °C (5 °F)) for 2 minutes and after suppression period due to setpoint change per G36 Part 5.A.20, send 3 requests (yZonTemResReq=3).
  2. Else if the zone temperature TZon exceeds the zone cooling setpoint TZonCooSet by 1.7 °C (3 °F) for 2 minutes and after suppression period due to setpoint change per G36 Part 5.A.20, send 2 requests (yZonTemResReq=3).
  3. Else if the cooling loop uCoo is greater than 95%, send 1 request (yZonTemResReq=1) until uCoo is less than 85%.
  4. Else if uCoo is less than 95%, send 0 request (yZonTemResReq=0).

b. Static pressure reset requests yZonPreResReq

  1. If the measured airflow VDis_flow is less than 50% of setpoint VDisSet_flow while it is greater than zero for 1 minute, send 3 requests (yZonPreResReq=3).
  2. Else if the measured airflow VDis_flow is less than 70% of setpoint VDisSet_flow while it is greater than zero for 1 minute, send 2 requests (yZonPreResReq=2).
  3. Else if the damper position uDam is greater than 95%, send 1 request (yZonPreResReq=1) until uDam is less than 85%.
  4. Else if uDam is less than 95%, send 0 request (yZonPreResReq=0).

c. If there is a hot water coil (have_heaWatCoi=true), hot water reset requests yHeaValResReq

  1. If the discharge air temperature TDis is 17 °C (30 °F) less than the setpoint TDisHeaSet for 5 minutes, send 3 requests (yHeaValResReq=3).
  2. Else if the discharge air temperature TDis is 8.3 °C (15 °F) less than the setpoint TDisHeaSet for 5 minutes, send 2 requests (yHeaValResReq=2).
  3. Else if the hot water valve position uHeaVal is greater than 95%, send 1 request (yHeaValResReq=1) until uHeaVal is less than 85%.
  4. Else if uHeaVal is less than 95%, send 0 request (yHeaValResReq=0).

d. If there is hot water coil (have_heaWatCoi=true) and a boiler plant (have_boiPla=true), send the boiler plant that serves the zone a boiler plant requests yHeaPlaReq as follows:

  1. If the hot water valve position uHeaVal is greater than 95%, send 1 request (yHeaPlaReq=1) until uHeaVal is less than 10%.
  2. Else if uHeaVal is less than 95%, send 0 request (yHeaPlaReq=0).

Implementation

Some input signals are time sampled, because the output that is generated from these inputs are used in the trim and respond logic, which is also time sampled. However, signals that use a delay are not sampled, as sampling were to change the dynamic response.

Parameters

TypeNameDefaultDescription
RealsamplePeriod120Sample period of component, set to the same value as the trim and respond that process yPreSetReq [s]
Booleanhave_heaWatCoi Flag, true if there is a hot water coil
Booleanhave_heaPla Flag, true if there is a boiler plant
RealerrTZonCoo_12.8Limit value of difference between zone temperature and cooling setpoint for generating 3 cooling SAT reset requests [K]
RealerrTZonCoo_21.7Limit value of difference between zone temperature and cooling setpoint for generating 2 cooling SAT reset requests [K]
RealerrTDis_117Limit value of difference between discharge air temperature and its setpoint for generating 3 hot water reset requests [K]
RealerrTDis_28.3Limit value of difference between discharge air temperature and its setpoint for generating 2 hot water reset requests [K]
Duration times
RealdurTimTem120Duration time of zone temperature exceeds setpoint [s]
RealdurTimFlo60Duration time of airflow rate less than setpoint [s]
RealdurTimDisAir300Duration time of discharge air temperature is less than setpoint [s]

Connectors

TypeNameDescription
input RealInputTZonZone temperature [K]
input RealInputTZonCooSetZone cooling setpoint temperature [K]
input RealInputuCooCooling loop signal [1]
input RealInputVDis_flowMeasured discharge airflow rate [m3/s]
input RealInputVDisSet_flowDischarge airflow rate setpoint [m3/s]
input RealInputyDam_actualActual damper position [1]
input RealInputTDisHeaSetDischarge airflow setpoint temperature for heating [K]
input RealInputTDisMeasured discharge airflow temperature [K]
input RealInputuHeaValHeating valve position [1]
output IntegerOutputyZonPreResReqZone static pressure reset requests
output IntegerOutputyZonTemResReqZone cooling supply air temperature reset request
output IntegerOutputyHeaValResReqHot water reset requests
output IntegerOutputyHeaPlaReqHeating plant request

Modelica definition

block SystemRequests "Output system requests for VAV reheat terminal unit control" parameter Real samplePeriod( final unit="s", final quantity="Time")=120 "Sample period of component, set to the same value as the trim and respond that process yPreSetReq"; parameter Boolean have_heaWatCoi "Flag, true if there is a hot water coil"; parameter Boolean have_heaPla "Flag, true if there is a boiler plant"; parameter Real errTZonCoo_1( final unit="K", final displayUnit="K", final quantity="TemperatureDifference")=2.8 "Limit value of difference between zone temperature and cooling setpoint for generating 3 cooling SAT reset requests"; parameter Real errTZonCoo_2( final unit="K", final displayUnit="K", final quantity="TemperatureDifference")=1.7 "Limit value of difference between zone temperature and cooling setpoint for generating 2 cooling SAT reset requests"; parameter Real errTDis_1( final unit="K", final displayUnit="K", final quantity="TemperatureDifference")=17 "Limit value of difference between discharge air temperature and its setpoint for generating 3 hot water reset requests"; parameter Real errTDis_2( final unit="K", final displayUnit="K", final quantity="TemperatureDifference")=8.3 "Limit value of difference between discharge air temperature and its setpoint for generating 2 hot water reset requests"; parameter Real durTimTem( final unit="s", final quantity="Time")=120 "Duration time of zone temperature exceeds setpoint"; parameter Real durTimFlo( final unit="s", final quantity="Time")=60 "Duration time of airflow rate less than setpoint"; parameter Real durTimDisAir( final unit="s", final quantity="Time")=300 "Duration time of discharge air temperature is less than setpoint"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TZon( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") "Zone temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TZonCooSet( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") "Zone cooling setpoint temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealInput uCoo( final min=0, final max=1, final unit="1") "Cooling loop signal"; Buildings.Controls.OBC.CDL.Interfaces.RealInput VDis_flow( final min=0, final unit="m3/s", final quantity="VolumeFlowRate") "Measured discharge airflow rate"; Buildings.Controls.OBC.CDL.Interfaces.RealInput VDisSet_flow( final min=0, final unit="m3/s", quantity="VolumeFlowRate") "Discharge airflow rate setpoint"; Buildings.Controls.OBC.CDL.Interfaces.RealInput yDam_actual( final min=0, final max=1, final unit="1") "Actual damper position"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TDisHeaSet( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") if have_heaWatCoi "Discharge airflow setpoint temperature for heating"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TDis( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") if have_heaWatCoi "Measured discharge airflow temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealInput uHeaVal( final min=0, final max=1, final unit="1") if have_heaWatCoi "Heating valve position"; Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yZonPreResReq "Zone static pressure reset requests"; Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yZonTemResReq "Zone cooling supply air temperature reset request"; Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yHeaValResReq if have_heaWatCoi "Hot water reset requests"; Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yHeaPlaReq if (have_heaWatCoi and have_heaPla) "Heating plant request"; Buildings.Controls.OBC.CDL.Reals.Hysteresis hys( final uLow=errTZonCoo_1 - 0.1, final uHigh=errTZonCoo_1 + 0.1) "Check if zone temperature is greater than cooling setpoint by errTZonCoo_1"; Buildings.Controls.OBC.CDL.Reals.Hysteresis hys3( final uLow=errTZonCoo_2 - 0.1, final uHigh=errTZonCoo_2 + 0.1) "Check if zone temperature is greater than cooling setpoint by errTZonCoo_2"; Buildings.Controls.OBC.CDL.Reals.Hysteresis hys4( final uLow=0.85, final uHigh=0.95) "Check if damper position is greater than 0.95"; Buildings.Controls.OBC.CDL.Reals.Hysteresis hys5( final uLow=0.85, final uHigh=0.95) "Check if cooling loop signal is greater than 0.95"; Buildings.Controls.OBC.CDL.Reals.Hysteresis hys7( final uHigh=0.01, final uLow=0.005) "Check if discharge airflow setpoint is greater than 0"; Buildings.Controls.OBC.CDL.Reals.Hysteresis hys8( final uLow=-0.1, final uHigh=0.1) if have_heaWatCoi "Check if discharge air temperature is errTDis_1 less than setpoint"; Buildings.Controls.OBC.CDL.Reals.Hysteresis hys9( final uLow=-0.1, final uHigh=0.1) if have_heaWatCoi "Check if discharge air temperature is errTDis_2 less than setpoint"; Buildings.Controls.OBC.CDL.Reals.Hysteresis hys10( final uLow=0.85, final uHigh=0.95) if have_heaWatCoi "Check if valve position is greater than 0.95"; Buildings.Controls.OBC.CDL.Reals.Hysteresis hys11( final uHigh=0.95, final uLow=0.1) if (have_heaWatCoi and have_heaPla) "Check if valve position is greater than 0.95"; protected Buildings.Controls.OBC.CDL.Discrete.Sampler samTZonCooSet( final samplePeriod=samplePeriod) "Sample current cooling setpoint"; Buildings.Controls.OBC.CDL.Discrete.UnitDelay uniDel( final samplePeriod=samplePeriod) "Delay value to record input value"; Buildings.Controls.OBC.CDL.Reals.Abs abs "Absolute change of the setpoint temperature"; Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler triSam "Sample the setpoint changed value when there is change"; Buildings.Controls.OBC.CDL.Logical.Edge edg "Instants when input becomes true"; Buildings.Controls.OBC.CDL.Logical.Latch lat "Maintains an on signal until conditions changes"; Buildings.Controls.OBC.CDL.Logical.Latch lat1 "Maintains an on signal until conditions changes"; Buildings.Controls.OBC.CDL.Logical.Timer tim "Calculate time"; Buildings.Controls.OBC.CDL.Reals.Greater gre1 "Check if current model time is greater than the sample period"; Buildings.Controls.OBC.CDL.Reals.Hysteresis hys2( final uLow=0.05, final uHigh=0.15) "Check if there is setpoint change"; Buildings.Controls.OBC.CDL.Reals.Min supTim "Suppression time"; Buildings.Controls.OBC.CDL.Reals.Sources.ModelTime modTim "Time of the model"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai(final k=540) "Convert change of degC to change of degF and find out suppression time (5 min/degF))"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai1(final k=0.5) "50% of setpoint"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai2(final k=0.7) "70% of setpoint"; Buildings.Controls.OBC.CDL.Reals.Subtract sub1 "Calculate difference of previous and current setpoints"; Buildings.Controls.OBC.CDL.Reals.Subtract sub2 "Calculate difference between zone temperature and cooling setpoint"; Buildings.Controls.OBC.CDL.Reals.Subtract sub3 "Calculate difference between zone temperature and cooling setpoint"; Buildings.Controls.OBC.CDL.Reals.Subtract sub6 if have_heaWatCoi "Calculate difference of discharge temperature (plus errTDis_1) and its setpoint"; Buildings.Controls.OBC.CDL.Reals.Subtract sub7 if have_heaWatCoi "Calculate difference of discharge temperature (plus errTDis_2) and its setpoint"; Buildings.Controls.OBC.CDL.Reals.AddParameter addPar( final p=errTDis_1) if have_heaWatCoi "Discharge temperature plus errTDis_1"; Buildings.Controls.OBC.CDL.Reals.AddParameter addPar1( final p=errTDis_2) if have_heaWatCoi "Discharge temperature plus errTDis_2"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt "Convert real to integer value"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt1 "Convert real to integer value"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt2 if have_heaWatCoi "Convert real to integer value"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt3 if (have_heaWatCoi and have_heaPla) "Convert real to integer value"; Buildings.Controls.OBC.CDL.Logical.And and1 "Logical and"; Buildings.Controls.OBC.CDL.Logical.And and2 "Logical and"; Buildings.Controls.OBC.CDL.Logical.And and3 "Logical and"; Buildings.Controls.OBC.CDL.Logical.And and4 "Logical and"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant con( final k=samplePeriod) "Sample period time"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant conZer(final k=0.0) "Constant zero"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant thrCooResReq(final k= 3.0) "Constant 3"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant twoCooResReq(final k= 2.0) "Constant 2"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant oneCooResReq(final k=1.0) "Constant 1"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant zerCooReq(final k=0.0) "Constant 0"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant thrPreResReq(final k= 3.0) "Constant 3"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant twoPreResReq(final k= 2.0) "Constant 2"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant zerPreResReq(final k= 0.0) "Constant 0"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant onePreResReq(final k= 1.0) "Constant 1"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant thrHeaResReq( final k=3) if have_heaWatCoi "Constant 3"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant twoHeaResReq( final k=2) if have_heaWatCoi "Constant 2"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant oneHeaResReq(final k= 1.0) if have_heaWatCoi "Constant 1"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant zerHeaResReq(final k= 0.0) if have_heaWatCoi "Constant 0"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant zerBoiPlaReq(final k= 0.0) if (have_heaWatCoi and have_heaPla) "Constant 0"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant oneBoiPlaReq(final k= 1.0) if (have_heaWatCoi and have_heaPla) "Constant 1"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant maxSupTim(k=1800) "Maximum suppression time 30 minutes"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant con5(k=true) "Constant true"; Buildings.Controls.OBC.CDL.Reals.Switch swi "Use setpoint different value when half sample period time has passed"; Buildings.Controls.OBC.CDL.Reals.Switch swi1 "Output 3 or other request "; Buildings.Controls.OBC.CDL.Reals.Switch swi2 "Output 2 or other request "; Buildings.Controls.OBC.CDL.Reals.Switch swi3 "Output 0 or 1 request "; Buildings.Controls.OBC.CDL.Reals.Switch swi4 "Output 3 or other request "; Buildings.Controls.OBC.CDL.Reals.Switch swi5 "Output 2 or other request "; Buildings.Controls.OBC.CDL.Reals.Switch swi6 "Output 0 or 1 request "; Buildings.Controls.OBC.CDL.Reals.Switch swi7 if have_heaWatCoi "Output 3 or other request "; Buildings.Controls.OBC.CDL.Reals.Switch swi8 if have_heaWatCoi "Output 2 or other request "; Buildings.Controls.OBC.CDL.Reals.Switch swi9 if have_heaWatCoi "Output 0 or 1 request "; Buildings.Controls.OBC.CDL.Reals.Switch swi10 if (have_heaWatCoi and have_heaPla) "Output 0 or 1 request "; Buildings.Controls.OBC.CDL.Logical.TrueHoldWithReset truHol(duration=samplePeriod) "Hold true signal for sample period of time"; Buildings.Controls.OBC.CDL.Logical.Switch logSwi "Logical switch"; Buildings.Controls.OBC.CDL.Logical.TrueDelay tim1(delayTime=durTimTem) "Check if it is more than durTimTem"; Buildings.Controls.OBC.CDL.Logical.TrueDelay tim2(delayTime=durTimTem) "Check if it is more than durTimTem"; Buildings.Controls.OBC.CDL.Logical.TrueDelay tim3(delayTime=durTimFlo) "Check if it is more than durTimFlo"; Buildings.Controls.OBC.CDL.Logical.TrueDelay tim4(delayTime=durTimDisAir) if have_heaWatCoi "Check if it is more than durTimDisAir"; Buildings.Controls.OBC.CDL.Logical.TrueDelay tim5(delayTime=durTimDisAir) if have_heaWatCoi "Check if it is more than durTimDisAir"; Buildings.Controls.OBC.CDL.Discrete.Sampler sampler( final samplePeriod=samplePeriod) "Sample input signal, as the output signal will go to the trim and respond which also samples at samplePeriod"; Buildings.Controls.OBC.CDL.Discrete.Sampler sampler1( final samplePeriod=samplePeriod) "Sample input signal, as the output signal will go to the trim and respond which also samples at samplePeriod"; Buildings.Controls.OBC.CDL.Discrete.Sampler sampler2( final samplePeriod=samplePeriod) "Sample input signal, as the output signal will go to the trim and respond which also samples at samplePeriod"; Buildings.Controls.OBC.CDL.Discrete.Sampler sampler4( final samplePeriod=samplePeriod) "Sample input signal, as the output signal will go to the trim and respond which also samples at samplePeriod"; Buildings.Controls.OBC.CDL.Reals.Greater greVDis50 "Check if discharge airflow is less than 50% of setpoint"; Buildings.Controls.OBC.CDL.Reals.Greater greVDis70 "Check if discharge airflow is less than 70% of setpoint"; Buildings.Controls.OBC.CDL.Reals.Less les "Check if the suppression time has not yet passed"; Buildings.Controls.OBC.CDL.Logical.Not notLes "Inversion of output signal"; equation connect(sub2.y, hys.u); connect(TZonCooSet, samTZonCooSet.u); connect(samTZonCooSet.y, uniDel.u); connect(triSam.y, gai.u); connect(hys2.y, lat.u); connect(lat.y, tim.u); connect(edg.y, triSam.trigger); connect(lat.y, edg.u); connect(edg.y, lat1.clr); connect(modTim.y, gre1.u1); connect(con.y, gre1.u2); connect(gre1.y, swi.u2); connect(sub1.y, swi.u1); connect(conZer.y, swi.u3); connect(swi.y, abs.u); connect(abs.y, triSam.u); connect(abs.y, hys2.u); connect(and2.y, swi1.u2); connect(thrCooResReq.y, swi1.u1); connect(sub3.y, hys3.u); connect(twoCooResReq.y, swi2.u1); connect(swi2.y, swi1.u3); connect(and1.y, swi2.u2); connect(hys5.y, swi3.u2); connect(oneCooResReq.y, swi3.u1); connect(swi3.y, swi2.u3); connect(zerCooReq.y, swi3.u3); connect(swi1.y, reaToInt.u); connect(reaToInt.y, yZonTemResReq); connect(and3.y, swi4.u2); connect(thrPreResReq.y, swi4.u1); connect(and4.y, swi5.u2); connect(twoPreResReq.y, swi5.u1); connect(swi5.y, swi4.u3); connect(hys4.y, swi6.u2); connect(onePreResReq.y, swi6.u1); connect(zerPreResReq.y, swi6.u3); connect(swi6.y, swi5.u3); connect(swi4.y, reaToInt1.u); connect(reaToInt1.y, yZonPreResReq); connect(TDis, addPar.u); connect(addPar.y, sub6.u2); connect(TDisHeaSet, sub6.u1); connect(sub6.y, hys8.u); connect(addPar1.y, sub7.u2); connect(sub7.y, hys9.u); connect(hys9.y, tim5.u); connect(thrHeaResReq.y, swi7.u1); connect(twoHeaResReq.y, swi8.u1); connect(swi8.y, swi7.u3); connect(TDis, addPar1.u); connect(TDisHeaSet, sub7.u1); connect(uHeaVal, hys10.u); connect(hys10.y, swi9.u2); connect(oneHeaResReq.y, swi9.u1); connect(zerHeaResReq.y, swi9.u3); connect(swi9.y, swi8.u3); connect(swi7.y, reaToInt2.u); connect(reaToInt2.y, yHeaValResReq); connect(uHeaVal, hys11.u); connect(hys11.y, swi10.u2); connect(oneBoiPlaReq.y, swi10.u1); connect(zerBoiPlaReq.y, swi10.u3); connect(swi10.y, reaToInt3.u); connect(reaToInt3.y,yHeaPlaReq); connect(truHol.y, lat.clr); connect(lat.y, logSwi.u2); connect(con5.y, logSwi.u3); connect(lat1.y, logSwi.u1); connect(logSwi.y, and2.u1); connect(logSwi.y, and1.u1); connect(gai.y, supTim.u1); connect(maxSupTim.y, supTim.u2); connect(tim5.y, swi8.u2); connect(hys8.y, tim4.u); connect(tim4.y, swi7.u2); connect(hys7.y, tim3.u); connect(tim3.y, and3.u1); connect(tim3.y, and4.u1); connect(hys3.y, tim2.u); connect(tim2.y, and1.u2); connect(hys.y, tim1.u); connect(tim1.y, and2.u2); connect(sampler.u, VDisSet_flow); connect(sampler.y, gai1.u); connect(sampler.y, gai2.u); connect(sampler1.u, VDis_flow); connect(yDam_actual, sampler2.u); connect(sampler2.y, hys4.u); connect(uCoo, sampler4.u); connect(sampler4.y, hys5.u); connect(hys7.u, VDisSet_flow); connect(greVDis50.u1, gai1.y); connect(greVDis50.u2, sampler1.y); connect(greVDis50.y, and3.u2); connect(gai2.y, greVDis70.u1); connect(sampler1.y, greVDis70.u2); connect(greVDis70.y, and4.u2); connect(tim.y, les.u1); connect(supTim.y, les.u2); connect(notLes.y, truHol.u); connect(lat1.u, notLes.y); connect(les.y, notLes.u); connect(samTZonCooSet.y, sub2.u2); connect(TZon, sub2.u1); connect(TZon, sub3.u1); connect(samTZonCooSet.y, sub3.u2); connect(samTZonCooSet.y, sub1.u1); connect(uniDel.y, sub1.u2); end SystemRequests;