MaxRisingFrequency model

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

Icon of MaxRisingFrequency

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

NameTypeDescription
pi constantRealCircle constant

Components and variables

NameTypeDescription
crossingRequirements.SignalAnalysis.CrossingMonitoringTrue while expr1 is above the zero threshold
maxRisingFrequencyRequirements.ChecksInSlidingWindow.MaxRisingFrequencyIn every 2 s window, the mean frequency of the rising edges 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