MaxRising block
Requirements.ChecksInFixedWindow.MaxRising
ยท source
In every true condition phase, the number of check rising edges must be bounded
Extends Requirements.Interfaces.PartialCheck
Syntax
property = MaxRising(condition=..., check=..., nRisingMax=1).y;
Description
In every duration where the Boolean input condition is true, the number of rising edges of the Boolean input check is not allowed to exceed parameter nRisingMax. The default for nRisingMax=1 (so at most one rising edge). Property output y is initialized to Undefined (not applicable) if condition=false, and is initialized to Satisfied if condition=true. When condition becomes true (so entering a duration), property output y = Satisfied, as long as the number of rising edges ≤ nRisingMax. If condition is true and the number of rising edges > nRisingMax, output y = Violated. If condition is false, output y = Undefined.
Violated, Undecided, and Satisfied are elements of enumeration Property.
Example
This block is demonstrated with the following example:
results in
![]() | |
| simulation result |
Margin
Output margin (present if computeMargin = true, the default) is the signed distance of the check
to its limit, nRisingMax - countRising with output countRising the number of rising edges of the phase so far, divided by parameter scale: margin ≥ 0 exactly when the check holds,
margin = 1 is one scale of headroom, margin < 0 a violation by that many. Set scale to the
requirement's tolerance so that margins of different requirements compare; with the default scale = 1 the margin
is the raw robustness in the quantity's unit. The block computes the instantaneous value only; the worst value
over a run and the instant it occurs are taken from the stored trajectory.
Parameters
| Name | Type | Description |
|---|---|---|
nRisingMax parameter | Integer | Maximum number of check rising edges |
Components and variables
| Name | Type | Description |
|---|---|---|
countRising | Modelica.Blocks.Interfaces.IntegerOutput | Number of check rising edges in the current (or last) true condition phase |

