MaxDuration model

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

Icon of MaxDuration

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

Extends Modelica.Icons.Example

Using check block MaxDuration 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 permitted durationMax = 1 s. The property output maxDuration.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 maximum duration
maxDurationRequirements.ChecksInFixedWindow.MaxDurationIn every condition phase, check may be true for at most 1 s