MaxFrequency model
Requirements.Examples.Elementary.ChecksInSlidingWindow.MaxFrequency
ยท source
Example for MaxFrequency (in every sliding time window, the mean frequency of check is limited)
Extends Modelica.Icons.Example
Using check block MaxFrequency as
results in
![]() | |
| simulation result |
Note, the check signal has first a frequency of 2 Hz, then of 4 Hz, then of 2 Hz and finally of 0 Hz. The MaxFrequency block can reproduce these frequencies approximately. It is not exact, because the frequency is only determined based on the rising and falling edges of check. However, it is slightly more precise as using the MaxRisingFrequency block that takes only the rising edges of check into account.
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 |
maxFrequency | Requirements.ChecksInSlidingWindow.MaxFrequency | In every 2 s window, the mean frequency 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 |

