blockMaxRisingFrequency
Extends from Interfaces.PartialCheckInSlidingWindowWithBooleanOutput (Interfaces and icon for check block that evaluates a property in a sliding time window and returns the result as Boolean).
Information
Syntax
freqLimited = MaxRisingFrequency(check=..., window=..., freqHzMeanMax=...).y;
Description
In any (sliding) time window of length window, the mean frequency of the rising edges of Boolean input check is limited by freqHzMeanMax. Therefore, in any sliding window the following constraint shall hold:
if nRising > 1 then freqHzMean = 1/(window/(nRising-1)); else freqHzMean = 0 end if; freqHzMean ≤ freqHzMax
where nRising is the number of rising edges of check in the last time window of length window. The mean frequency over the sliding time window is also provided as additional output signal freqHzMean. If the mean frequency is not larger as freqHzMeanMax, output y is set to true, otherwise to y = false.
Example
The property is demonstrated with the following example calling the block as:
results in
![]() |
|
| simulation result |
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Time | window (from PartialCheckInSlidingWindowWithBooleanOutput) | Length of sliding time window (> 0) | |
| Modelica.Units.SI.Frequency | freqHzMeanMax | Maximum allowed mean frequency of rising edges in sliding time window |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.BooleanOutput | y (from PartialCheckInSlidingWindowWithBooleanOutput) | = true if property satisfied, otherwise false | |
| Modelica.Blocks.Interfaces.RealOutput | freqHzMean | Mean frequency of the rising edges in sliding time window |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | check (from PartialCheckInSlidingWindowWithBooleanOutput) | Boolean to check |
Contents
| Name | Description |
|---|---|
| meanFrequencyprotected | Return mean frequency |
