MaxRisingFrequency model

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

Icon of MaxRisingFrequency

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

NameTypeDescription
pi constantRealCircle constant

Components and variables

NameTypeDescription
conditionModelica.Blocks.Sources.BooleanTableCondition phases [1,3), [5,7), [9,9.5), [11,13) s and from 17 s on
crossingRequirements.SignalAnalysis.CrossingMonitoringTrue while expr1 is above the zero threshold: a rising edge per sine period
maxFrequency1Requirements.ChecksInFixedWindow.MaxRisingFrequencyIn every condition phase, the rising edges of crossing.y may occur with at most 3 Hz
expr1Requirements.Sources.RealExpressionSine whose frequency switches between 2 Hz and 4 Hz and is zero after 15 s