realFFTinfo

Print information about real FFT for given f_max and f_resolution

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

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

Syntax

realFFTinfo(f_max, f_resolution, f_max_factor)

Inputs (3)

f_max

Type: Frequency (Hz)

Description: Maximum frequency

f_resolution

Type: Frequency (Hz)

Description: Frequency resolution

f_max_factor

Default Value: 5

Type: Integer

Description: Maximum FFT frequency >= f_max*f_max_factor (sample frequency = 2*Maximum FFT Frequency)