MinDuration model

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

Icon of MinDuration

Example for MinDuration (in every true condition phase, check must be true for at least the defined duration)

Extends Modelica.Icons.Example

Using check block MinDuration as

results in

simulation result

The condition phases of the Boolean table condition are [1, 3), [5, 7), [9, 9.5) and [11, 13) s. The signal check is true on [0.5, 2.5), [5.2, 5.4), [5.6, 5.8), [6, 8), [9.1, 10.5) and [11.5, 12) s, so the true phases of check inside the condition phases have different lengths, some shorter and some longer than the required durationMin = 1 s. The property output minDuration.y shows the verdict in every condition phase; outside the condition phases it is Undefined.

Components and variables

NameTypeDescription
conditionModelica.Blocks.Sources.BooleanTableCondition phases [1,3), [5,7), [9,9.5) and [11,13) s
checkModelica.Blocks.Sources.BooleanTableSignal whose true phases are checked against the minimum duration
minDurationRequirements.ChecksInFixedWindow.MinDurationIn every condition phase, check must be true for at least 1 s