MaxRisingFrequency model
Requirements.Examples.Elementary.ChecksInSlidingWindow.MaxRisingFrequency
ยท source
Example for MaxRisingFrequency (in every sliding time window, the frequency of the check rising edges is limited)
Extends Modelica.Icons.Example
Using check block MaxRisingFrequency as
results in
![]() | |
| simulation result |
The signal expr1 is a sine whose frequency is 2 Hz before 5 s, 4 Hz between 5 s and 10 s, 2 Hz between
10 s and 15 s and zero afterwards. CrossingMonitoring
turns it into a Boolean signal with one rising edge per period. maxRisingFrequency requires that the mean
frequency of the rising edges in every sliding window of window = 2 s is at most
freqHzMeanMax = 3 Hz, so the 4 Hz section between 5 s and 10 s violates the requirement.
Parameters
| Name | Type | Description |
|---|---|---|
pi constant | Real | Circle constant |
Components and variables
| Name | Type | Description |
|---|---|---|
crossing | Requirements.SignalAnalysis.CrossingMonitoring | True while expr1 is above the zero threshold |
maxRisingFrequency | Requirements.ChecksInSlidingWindow.MaxRisingFrequency | In every 2 s window, the mean frequency of the rising edges of crossing.y may be at most 3 Hz |
expr1 | Requirements.Sources.RealExpression | Sine whose frequency switches between 2 Hz and 4 Hz and is zero after 15 s |

