MaxRisingFrequency model
Requirements.Examples.Elementary.ChecksInFixedWindow.MaxRisingFrequency
ยท source
Example for MaxRisingFrequency (in every true condition phase, 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. maxFrequency1 permits a frequency of the
rising edges of at most freqHzMax = 3 Hz in the condition phases [1, 3), [5, 7), [9, 9.5), [11, 13) s and
from 17 s on. The output interval of 1e-4 s resolves the fast edges in the plot.
Parameters
| Name | Type | Description |
|---|---|---|
pi constant | Real | Circle constant |
Components and variables
| Name | Type | Description |
|---|---|---|
condition | Modelica.Blocks.Sources.BooleanTable | Condition phases [1,3), [5,7), [9,9.5), [11,13) s and from 17 s on |
crossing | Requirements.SignalAnalysis.CrossingMonitoring | True while expr1 is above the zero threshold: a rising edge per sine period |
maxFrequency1 | Requirements.ChecksInFixedWindow.MaxRisingFrequency | In every condition phase, the rising edges of crossing.y may occur with at most 3 Hz |
expr1 | Requirements.Sources.RealExpression | Sine whose frequency switches between 2 Hz and 4 Hz and is zero after 15 s |

