MaxRising model

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

Icon of MaxRising

Example for MaxRising (in every sliding time window, the number of check rising edges is bounded)

Extends Modelica.Icons.Example

Using sliding time window check block MaxRising as

results in

simulation result

The signal check is true on [1, 3.3), [5.2, 5.4), [5.6, 5.8), [6, 6.2), [6.4, 8), [9.1, 9.3), [9.5, 9.7), [10, 10.5) and [11.5, 12) s, so it has rising edges at 1, 5.2, 5.6, 6, 6.4, 9.1, 9.5, 10 and 11.5 s. maxRising permits at most nRisingMax = 2 rising edges in every sliding window of window = 2 s. The bursts of edges between 5.2 s and 6.4 s and between 9.1 s and 10 s put more than two edges into one window.

Components and variables

NameTypeDescription
checkModelica.Blocks.Sources.BooleanTableSignal whose rising edges are counted
maxRisingRequirements.ChecksInSlidingWindow.MaxRisingAt most 2 rising edges of check in every 2 s window