MinRising block
Requirements.ChecksInFixedWindow.MinRising
ยท source
In every true condition phase, a minimum number of check rising edges must occur
Extends Requirements.Interfaces.PartialCheck
Syntax
property = MinRising(condition=..., check=..., nRisingMin=1).y;
Description
In every duration where the Boolean input condition is true, a minimum number of nRisingMin edges of the Boolean input check must occur. The default for nRisingMin=1 (so at least one rising edge). Property output y is initialized to Undefined (not applicable) if condition=false, and to Undecided if condition=true. When condition becomes true (so entering a duration), property output y = Undecided, as long as the number of rising edges < nRisingMin. If condition is true and the number of rising edges ≥ nRisingMin, output y = Satisfied. If at the end of a true condition phase the number of rising edges in this phase < nRisingMin, y = Violated.
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, countRising - nRisingMin 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 |
|---|---|---|
nRisingMin parameter | Integer | Minimum 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 |

