Internal package
Requirements.ChecksInFixedWindow_withFFT.Internal
· source
Library of internal components used by FFT blocks (should not be directly used)
Extends Modelica.Icons.InternalPackage
Internal components of the FFT check blocks of package ChecksInFixedWindow_withFFT; they should not be used directly. The package contains:
- the partial model PartialFFT with the sampling of the input signal, the FFT computation and the interfaces common to all FFT blocks;
- the functions checkDomain, checkRelativeDomain and checkTHD that evaluate the checks after an FFT has been computed;
- numerical helpers (get_ns, fftScaled, findBaseFrequency, calculateTHD, interpolate, ...);
- functions that compute the curves animated in the icons and that store or remove the FFT result files.
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. |
| Sept. 14, 2026 | Functions checkRelativeDomain and checkTHD added (H. Tummescheit, Model Based Innovation LLC) |
| Sept. 14, 2026 | Runs in Modelon Impact; see the release notes of version 0.7.1 for the four changes and the comparison with Dymola and OpenModelica (H. Tummescheit, Model Based Innovation LLC) |
Contents
| Name | Kind | Description | |
|---|---|---|---|
| PartialFFT | partial model | Partial model containing the common part of the FFT blocks | |
| amplitudeFrequencyCurveForIcon | function | Return amplitude = f(frequency) for icon animation | |
| checkRelativeDomain | function | WithinRelativeDomain's whole evaluation in one call: base frequency, scaled limit curve, check, icon curves | |
| checkTHD | function | MaxTotalHarmonicDistortion's whole evaluation in one call: base frequency, THD, check, icon curves | |
| checkDomain | function | Check whether FFT is in required domain | |
| get_ns | function | Return number of sample points | |
| interpolate | function | Interpolate polygon (abscissa values must be within polygon values) | |
| maxAmplitudeCurveForIcon | function | Return maxAmplitude = f(frequency) for icon animation in defined icon area | |
| saveFFTonFile | impure function | Save FFT computation on file | |
| fftScaled | impure function | Compute scaled FFT | |
| removeFFTresultFiles | impure function | Remove FFT results files of previous simulation runs of the current model (if they exist) | |
| findBaseFrequency | function | Find real base frequency (search around an interval of f_base for the largest amplitude | |
| calculateTHD | function | Compute Total Harmonic Distortion from amplitude of FFT | |
| baseAmplitudeForIcon | function | Determine amplitude line of base frequency for icon |