MaxRising model

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

Icon of MaxRising

Example for MaxRising (in every true condition phase, the number of check rising edges is bounded)

Extends Modelica.Icons.Example

Using check block MaxRising as

results in

simulation result

The condition phases are [1, 2), [3, 3.5) and from 4 s to the stop time of 5 s. The signal check has two rising edges in the first phase (1.1 and 1.3 s), four in the second (3.1, 3.2, 3.3 and 3.4 s) and none in the third. maxRising permits at most nRisingMax = 3 rising edges per phase, so the second phase violates the requirement at its fourth edge, while the first and third phases fulfil it.

Components and variables

NameTypeDescription
conditionModelica.Blocks.Sources.BooleanTableCondition phases [1,2), [3,3.5) and from 4 s on
checkModelica.Blocks.Sources.BooleanTableSignal whose rising edges are counted
maxRisingRequirements.ChecksInFixedWindow.MaxRisingAt most 3 rising edges of check per condition phase