.Modelica.Math.FastFourierTransform.realFFTinfo

Information

Syntax

realFFTinfo(f_max, f_resolution, f_max_factor=5);

Description

From the maximum interested frequency f_max (in [Hz]) and the frequency resolution f_resolution (in [Hz]) the function computes the key FFT data as used by the FFT blocks and prints them to the output window.

Example

realFFTinfo(f_max=170, f_resolution=0.3)

results in the following output:

... Real FFT properties
 Desired:
    f_max         = 170 Hz
    f_resolution  = 0.3 Hz
    f_max_factor  = 5
 Calculated:
    Number of sample points    = 5760 (= 2^7*3^2*5^1)
    Sampling frequency         = 1728 Hz (= 0.3*5760)
    Sampling period            = 0.000578704 s (= 1/1728)
    Maximum FFT frequency      = 864 Hz (= 0.3*5760/2; f={0,0.3,0.6,...,864} Hz)
    Number of frequency points = 2881 (= 5760/2+1)
    Simulation time            = 3.33275 s

See also

realFFTsamplePoints, realFFT, realFFTwriteToFile

Interface

function realFFTinfo
  extends Modelica.Icons.Function;
  import Modelica.Utilities.Streams.print;
  input SI.Frequency f_max "Maximum frequency";
  input SI.Frequency f_resolution "Frequency resolution";
  input Integer f_max_factor(min = 1) = 5 "Maximum FFT frequency >= f_max*f_max_factor (sample frequency = 2*Maximum FFT Frequency)";
end realFFTinfo;

Revisions

Date Description
Nov. 29, 2015 Initial version implemented by Martin R. Kuhn and Martin Otter (DLR Institute of System Dynamics and Control.

Generated at 2020-06-05T21:39:08Z by OpenModelica 1.16.0~dev-442-g2e5bc9f