MinAccumulatedDuration model

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

Icon of MinAccumulatedDuration

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

Extends Modelica.Icons.Example

Using sliding time window check block MinAccumulatedDuration 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. minAccDuration uses a sliding time window of window = 2 s and requires that, within every window, check was true for at least lowerLimit = 1 s in total. In contrast to MinDuration, the short true phases are added up, so a window may fulfil the requirement without containing one long true phase.

Components and variables

NameTypeDescription
checkModelica.Blocks.Sources.BooleanTableSignal whose true phases are monitored
minAccDurationRequirements.ChecksInSlidingWindow.MinAccumulatedDurationIn every 2 s window, check must be true for at least 1 s in total