blockTrueHold

Block that holds a true signal for at least a requested duration

Information

Block that holds a true input signal for at least a defined time period.

At initialization, the output y is equal to the input u. If the input u becomes true, or is true during intialization, a timer starts and the Boolean output y stays true for the time period provided by the parameter duration. When this time is elapsed, the input is checked again. If it is true, then the timer is restarted and the output remains true for another duration seconds. If the input u is false after holdTime seconds, then the ouput is switched to false, until the input becomes true again.

The figure below shows the state chart of the implementation. Note that the transition are done in zero time.

Input and output of the block

The figure below shows an example with a hold time of 3600 seconds and a pulse width period 9000 seconds that starts at t=200 seconds.

Input and output of the block

The figure below shows an example with a hold time of 60 seconds and a pulse width period 3600 seconds that starts at t=0 seconds.

Input and output of the block

The next two figures show the same experiment, except that the input u has been negated. The figure below has again a hold time of 3600 seconds and a pulse width period 9000 seconds that starts at t=200 seconds.

Input and output of the block

The figure below has again a hold time of 60 seconds and a pulse width period 3600 seconds that starts at t=0 seconds.

Input and output of the block

Parameters

TypeNameDefaultDescription
RealdurationTime duration of the true output signal hold

Connectors

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Interfaces.BooleanInputuBoolean input signal
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutputyBoolean output signal

Revisions

  • June 13, 2024, by Antoine Gautier:
    Moved this model to the Obsolete package.
    This is for issue 3787.
  • March 27, 2024, by Michael Wetter:
    Renamed block from TrueHoldWithReset to TrueHold.
    This is for issue 3689.
  • November 12, 2020, by Michael Wetter:
    Reformulated to remove dependency to Modelica.Units.SI.
    This is for issue 2243.
  • September 18, 2017, by Michael Wetter:
    Improved event handling.
  • June 13, 2017, by Michael Wetter:
    Reimplemented model using a state graph to avoid having to test for equality within tolerance. This implementation is also easier to understand.
    This is for issue 789.
  • May 24, 2017, by Milica Grahovac:
    First implementation.