MaxFrequency model

Requirements.Examples.Elementary.ChecksInSlidingWindow.MaxFrequency  ยท source

Icon of MaxFrequency

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

NameTypeDescription
pi constantRealCircle constant

Components and variables

NameTypeDescription
crossingRequirements.SignalAnalysis.CrossingMonitoringTrue while expr1 is above the zero threshold
maxFrequencyRequirements.ChecksInSlidingWindow.MaxFrequencyIn every 2 s window, the mean frequency of crossing.y may be at most 3 Hz
expr1Requirements.Sources.RealExpressionSine whose frequency switches between 2 Hz and 4 Hz and is zero after 15 s