BandRising block
Requirements.ChecksInSlidingWindow.BandRising
ยท source
In every sliding time window, a minimum number of check rising edges must occur and the number of check rising edges is bounded
Extends Interfaces.PartialCheckInSlidingWindowWithPropertyOutput
Syntax
property = BandRising(check=..., window=..., nRisingMin=1, nRisingMax=2).y;
Description
In any (sliding) time window of length window, the number or rising edges of the Boolean input check (= nRising) must be ≥ parameter nRisingMin and ≤ parameter nRisingMax. Whenever this property is fulfilled, Property output y = Satisfied. If this property is not fulfilled at the end of a sliding time window, Property output y = Violated (exception: before the end of the first time window, y = Undecided provided nRising ≤ nRisingMax):
y = if nRising ≥ nRisingMin and nRising ≤ nRisingMax then Satisfied else
(if first and nRising ≤ nRisingMax then Undecided else Violated);
Violated, Undecided, and Satisfied are elements of enumeration Property.
Example
The property is demonstrated with the following example calling the block as:
results in
![]() | |
| simulation result |
Margin
Output margin (present if computeMargin = true, the default) is the signed distance of the check
to its limit, min(nRising - nRisingMin, nRisingMax - nRising), 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.
Before the end of the first window the margin is provisional; a consumer takes the worst value over the decided points only. The sliding buffer holds 20 elements, so a margin over a busier window is approximate, as the property is.
Parameters
| Name | Type | Description |
|---|---|---|
nRisingMin parameter | Integer | Minimum number of check rising edges in a sliding time window |
nRisingMax parameter | Integer | Maximum number of check rising edges in a sliding time window |
Components and variables
| Name | Type | Description |
|---|---|---|
nRising | Modelica.Blocks.Interfaces.IntegerOutput | Number of check rising edges in the sliding time window |

