modelLimitedControlFrequency
Requirement: The frequency of the control signal is limited
Extends from Modelica.Icons.Example (Icon for runnable examples).
Information
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.MeanFrequency block.
Setup of this example:
results in
![]() |
|
| simulation result |
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Real | pi | Modelica.Constants.pi |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica_Requirements.SignalAnalysis.CrossingMonitoring | crossing | ||
| Modelica_Requirements.ChecksInSlidingWindow.MaxFrequency | meanFreq | ||
| Modelica_Requirements.Sources.RealExpression | expr1 | ||
| Modelica_Requirements.Verify.BooleanRequirement | requirement | ||
| Modelica_Requirements.Verify.PrintViolations | printViolations |
