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.
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.
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.
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.
The figure below has again a hold time of 60 seconds and a pulse width period 3600 seconds that starts at t=0 seconds.
Obsolete package.TrueHoldWithReset to TrueHold.Modelica.Units.SI.