WithinAbsoluteDomain1 model
Requirements.Examples.Elementary.ChecksInFixedWindow_withFFT.WithinAbsoluteDomain1
· source
Example for WithinAbsoluteDomain block with one FFT computation (a rising condition input triggers an FFT calculation. The amplitudes of the FFTs must be below a frequency dependent limit)
Extends Modelica.Icons.Example
Using check block WithinAbsoluteDomain as
The amplitutes of the FFT are dynamically displayed in the icon of the block (in black), as well as the maximume amplitudes maxAmplitude (in red).
Simulating this examples results in
![]() | |
| simulation result |
As can be seen, the simulation is terminate (via instance terminate1 of block FallingEdgeTerminate) once the FFT has been computed (signaled via the falling edge of FFT_computation). Since all FFT amplitudes between 0 ≤ f ≤ min(f_max, maxAmplitude[end,1]) are below the maximally allowed limit, the block returns Property.Satisfied.
A plot of the FFT result file is shown in the next figure:
Revisions
| Date | Description |
|---|---|
| Nov. 29, 2015 | Initial version implemented by
Martin R. Kuhn and Martin Otter
(DLR Institute of System Dynamics and Control) The research leading to these results has received funding from the European Union’s Seventh Framework Programme (FP7/2007-2016) for the Clean Sky Joint Technology Initiative under grant agreement no. CSJU-GAM-SGO-2008-001. |
Components and variables
| Name | Type | Description |
|---|---|---|
fft_absoluteDomain1 | Requirements.ChecksInFixedWindow_withFFT.WithinAbsoluteDomain | FFT of u up to 4 Hz, resolution 0.2 Hz; the amplitudes must stay below the maxAmplitude curve |
sine2 | Modelica.Blocks.Sources.Sine | Sine of amplitude 3 at 2 Hz |
sine3 | Modelica.Blocks.Sources.Sine | Sine of amplitude 1.5 at 3 Hz |
const | Modelica.Blocks.Sources.Constant | Constant offset 5 |
multiSum | Modelica.Blocks.Math.MultiSum | Sum of offset and sines: the analysed signal |
const1 | Requirements.Sources.BooleanConstant | Condition, always true: one FFT at the start |
terminate1 | Requirements.LogicalBlocks.FallingEdgeTerminate | Terminates the simulation when the FFT computation has finished |


