LimitedControlFrequency model

Requirements.Examples.AircraftRequirements.LimitedControlFrequency  ยท source

Icon of LimitedControlFrequency

Requirement: The frequency of the control signal is limited

Extends Modelica.Icons.Example

This example demonstrates the modeling and verification of the following aircraft requirement:

Requirement:
The frequency of the control signal of the valve must not exceed 1.5 Hz during more than 2 seconds.

This is an informal requirement. It is interpreted in the following formal way:

Formalized requirement:
The mean frequency of the control signal of the valve must not exceed 1.5 Hz during any 2 seconds time window. The mean frequency freqHzMean in this window is defined as

T        : Length of sliding window (= 2 seconds)
nCrossing: Number of threshold crossing edges of check in the last T seconds

if nCrossing > 1 then
  freqHzMean = 1/(T/( (nCrossing-1)/2 ));
else
  freqHzMean = 0
end if;

This requirement can be modelled with the ChecksInSlidingWindow.MaxFrequency block.

Setup of this example:

results in

simulation result

Parameters

NameTypeDescription
pi constantRealRatio of circumference to diameter of a circle

Components and variables

NameTypeDescription
crossingRequirements.SignalAnalysis.CrossingMonitoringDetects the crossings of the control signal through the threshold 0.4
meanFreqRequirements.ChecksInSlidingWindow.MaxFrequencyChecks that the mean crossing frequency in a 2 s sliding window does not exceed 1.5 Hz
expr1Requirements.Sources.RealExpressionControl signal of the valve (damped chirp with increasing frequency)
requirementRequirements.Verify.BooleanRequirementRequirement: the control signal frequency does not exceed 1.5 Hz during more than 2 s
printViolations innerRequirements.Verify.PrintViolationsPrints the requirement verdicts and writes the log files at the end of the simulation