MaxRisingFrequency block

Requirements.ChecksInFixedWindow.MaxRisingFrequency  ยท source

Icon of MaxRisingFrequency

In every true condition phase, the frequency of the check rising edges is limited

Extends Requirements.Interfaces.PartialCheck

Syntax

property = MaxRisingFrequency(condition=..., check=..., freqHzMax=...).y;

Description

In every duration where the Boolean input condition is true, the frequency of the rising edges of Boolean input check is limited by freqHzMax. Therefore, in every true condition phase the constraint shall hold:

1/T ≤ freqHzMax

where T is the time duration between two rising edges of check. The frequency 1/T is also provided as additional output signal freqHz. Once the frequency cannot be computed (outside of the true condition phase, or before the second rising edge of check in a true condition phase), it is set to freqHz = 0. If the frequency is not larger as freqHzMax, property output y is set to Satisfied. If the limit is violated, y = Violated. While condition is false, y = Undefined (not applicable).

Violated, Undecided, and Satisfied are elements of enumeration Property.

Example

This block is demonstrated with the following example where the check signal has first a frequency of 2 Hz, then of 4 Hz, and then again of 2 Hz and the maximum allowed frequency is 3 Hz:

results in

simulation result

Margin

Output margin (present if computeMargin = true, the default) is the signed distance of the check to its limit, freqHzMax - freqHz, 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
freqHzMax parameterSI.FrequencyMaximum frequency of rising edges in true condition phase

Components and variables

NameTypeDescription
freqHzModelica.Blocks.Interfaces.RealOutputCheck rising edge frequency in true condition phase, otherwise zero