LimitedControlFrequency model
Requirements.Examples.AircraftRequirements.LimitedControlFrequency
ยท source
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 asT : 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
| Name | Type | Description |
|---|---|---|
pi constant | Real | Ratio of circumference to diameter of a circle |
Components and variables
| Name | Type | Description |
|---|---|---|
crossing | Requirements.SignalAnalysis.CrossingMonitoring | Detects the crossings of the control signal through the threshold 0.4 |
meanFreq | Requirements.ChecksInSlidingWindow.MaxFrequency | Checks that the mean crossing frequency in a 2 s sliding window does not exceed 1.5 Hz |
expr1 | Requirements.Sources.RealExpression | Control signal of the valve (damped chirp with increasing frequency) |
requirement | Requirements.Verify.BooleanRequirement | Requirement: the control signal frequency does not exceed 1.5 Hz during more than 2 s |
printViolations inner | Requirements.Verify.PrintViolations | Prints the requirement verdicts and writes the log files at the end of the simulation |

