blockSwitchBox

Controller for flow switch box

Information

This block implements a control logic preventing flow reversal in the service line, for instance with the hydronic configuration of Buildings.DHC.ETS.Combined.HeatPumpHeatExchanger. The block requires two input signals representing the mass flow rate contributing to a positive flow direction mPos_flow and the mass flow contributing to a reverse flow direction mRev_flow. The output signal y switches to maintain mPos_flow ≥ mRev_flow with a temporization avoiding short cycling. Due to the temporization, the mass flow rate may transiently change direction as illustrated in Buildings.DHC.ETS.Combined.Subsystems.Validation.SwitchBox.

Parameters

TypeNameDefaultDescription
RealtrueHoldDurationtrue hold duration
RealfalseHoldDurationtrueHoldDurationfalse hold duration
Nominal condition
Realm_flow_nominalNominal mass flow rate, used for scaling to avoid chattering

Connectors

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Interfaces.RealInputmPos_flowService water mass flow rate in positive direction
Buildings.Controls.OBC.CDL.Interfaces.RealInputmRev_flowService water mass flow rate in reverse direction
Buildings.Controls.OBC.CDL.Interfaces.RealOutputyControl output signal

Components

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Reals.GreaterThresholdposDomOutput true in case of dominating positive flow
Buildings.Controls.OBC.CDL.Reals.SwitchswiSwitch to select the mode
Buildings.Controls.OBC.CDL.Reals.Sources.ConstantposModOnOutput signal in case of dominating positive flow
Buildings.Controls.OBC.CDL.Logical.TrueFalseHoldtruFalHolTrue-false hold to remove the risk of chattering
Buildings.Controls.OBC.CDL.Reals.Sources.ConstantrevModOnOutput signal in case of dominating reverse flow
Buildings.Controls.OBC.CDL.Reals.SubtractsubFlow difference
Buildings.Controls.OBC.CDL.Reals.MovingAveragemovAveRolling average of flow difference

Revisions

  • June 21, 2024, by Antoine Gautier:
    Added moving average to break the algebraic loop when using components configured in steady state.
    This is for #3906.
  • February 28, 2024, by Michael Wetter:
    Added hysteresis to avoid chattering if signals are near zero and have numerical noise.
  • February 23, 2021, by Antoine Gautier:
    Refactored with CDL connectors.
  • January 23, 2020, by Michael Wetter:
    Added Buildings.Controls.OBC.CDL.Logical.TrueFalseHold to avoid the risk of chattering.
  • January 12, 2020, by Michael Wetter:
    Added documentation.