BandRising block

Requirements.ChecksInFixedWindow.BandRising  ยท source

Icon of BandRising

In every true condition phase, a minimum number of check rising edges must occur and the number of check rising edges is bounded

Extends Requirements.Interfaces.PartialCheck

Syntax

property = BandRising(condition=..., check=..., nRisingMin=1, nRisingMax=2).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 and a maximum number of nRisingMax edges is allowed. The default for nRisingMin=1 (so at least one rising edge), whereas the default for nRisingMax=2 (so at most two rising edges). If condition = true and nRisingMin = 0, then Property output y is initialized to Satisfied, to Undecided if condition = true and nRisingMin > 0, and to Undefined (not applicable) if condition = false.

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, min(countRising - nRisingMin, 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

NameTypeDescription
nRisingMin parameterIntegerMinimum number of check rising edges
nRisingMax parameterIntegerMaximum number of check rising edges

Components and variables

NameTypeDescription
countRisingModelica.Blocks.Interfaces.IntegerOutputNumber of check rising edges in the current (or last) true condition phase