MinDuration model

Requirements.Examples.Elementary.ChecksInSlidingWindow.MinDuration  ยท source

Icon of MinDuration

Example for MinDuration (in every sliding time window, the longest time duration where check was permanently true must be above a lower limit)

Extends Modelica.Icons.Example

Using sliding time window check block MinDuration as

results in

simulation result

The signal check is true on [1, 3.3), [5.2, 5.4), [5.6, 5.8), [6, 8), [9.1, 10.5) and [11.5, 12) s. minDuration uses a sliding time window of window = 2 s and requires that, within every window, check was permanently true for at least lowerLimit = 1 s. Windows that cover only the short true phases around 5.5 s or the gaps between the phases do not contain such a phase, and the property output shows where this is the case.

Components and variables

NameTypeDescription
checkModelica.Blocks.Sources.BooleanTableSignal whose true phases are monitored
minDurationRequirements.ChecksInSlidingWindow.MinDurationIn every 2 s window, check must be true without interruption for at least 1 s