Engee documentation

Magnitude FFT

Nonparametric estimation of the spectrum by the periodogram method.

blockType: SubSystem

Path in the library:

/Signal Operations/Transforms/Magnitude FFT

Description

Block Magnitude FFT performs the Fourier transform (FFT) of the input signal and calculates the magnitude (modulus) of each component of the spectrum.

Ports

Input

# IN_1 — The input signal
vector | the matrix

Details

Specify the input signal for a block in the form of a vector or matrix of size on .

The block considers the input signal in the form of a matrix on how consecutive time counts from independent channels.

Block Magnitude FFT supports real and complex floating-point input signals.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64

Complex numbers support

Yes

Output

# OUT_1 — the output value of the fast Fourier transform (FFT)
vector | the matrix

Details

The output value of the FFT, returned as a vector or matrix.

The block calculates a separate score for each of the independent channels and generates a matrix on at the exit. Each column of the output matrix contains an estimate of the power spectral density of the corresponding input column in equidistant frequency points in the range , where represents the sampling frequency of the signal.

If for the parameter Output the value is set Magnitude squared, then the block output for the input signal in the form of a matrix on entrance equivalent to:

y = abs(fft(u,nfft)).^2 % M ≤ nfft

If for the parameter Output the value is set Magnitude, then the block output for the input signal equivalent to:

y = abs(fft(u,nfft))      % M ≤ nfft

If , then the block performs a convolution of the input to before calculating the FFT using one of the above equations:

y(:,k) = datawrap(u(:,k),nfft)  % 1 ≤ k ≤ N

If , then the block can also perform input data truncation:

y(:,k) = abs(fft(u,nfft))   % 1 ≤ k ≤ N
Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64

Complex numbers support

No

Parameters

Parameters

# Output — output type
Magnitude squared | Magnitude

Details

Specify whether this block calculates the FFT of the magnitude or the FFT of the square of the magnitude of the input signal. For more information on how this block calculates the output signal depending on the value of this parameter, see the description of the OUT_1 port.

Values

Magnitude squared | Magnitude

Default value

Magnitude squared

Program usage name

Output

Tunable

No

Evaluatable

Yes

# FFT implementation — implementation of the FFT
Radix-2 | FFTW

Details

Implementation of the FFT:

  • FFTW — Support for an arbitrary length input signal.

  • Radix-2 — implementation of bitwise processing of fixed or floating point data. Dimension input matrix size on it must be equal to a power of two. To work with other input data sizes, use the block Pad to align or truncate these dimensions to a power of two, or, if possible, choose an implementation FFTW.

Values

Radix-2 | FFTW

Default value

Radix-2

Program usage name

FFTImplementation

Tunable

No

Evaluatable

Yes

# Inherit FFT length from input dimensions — inherit the length of the FFT from the input dimensions

Details

Check this box to inherit the length of the FFT from the input dimensions. When this option is selected, the length of the input data must be a power of two.

If this option is not selected, the parameter becomes available for setting the length. FFT length to specify the length of the FFT.

Default value

false (switched off)

Program usage name

InheritFFTLength

Tunable

No

Evaluatable

Yes

# FFT length — FFT length

Details

Enter the number of data points , on which the FFT will be executed. If larger than the size of the input frame, the block fills each frame with zeros as needed. If If it is smaller than the size of the input frame, then the block performs convolution for each frame as needed.

If for the parameter FFT implementation the value is set Radix-2, the value of FFT length it must be equal to a power of 2.

Dependencies

To use this option, uncheck the box. Inherit FFT length from input dimensions.

Default value

256

Program usage name

FFTLength

Tunable

No

Evaluatable

Yes

# Wrap input data when FFT length is shorter than input length — choosing to convolve or truncate the input signal

Details

Select convolution or truncation of the input signal depending on the parameter value. FFT length.

If this check box is selected and FFT length If the length of the input data is shorter, then before the FFT operation, the data is convoluted modulo the length. If this option is unchecked, the block truncates the input signal to FFT length before performing the FFT.

Default value

true (switched on)

Program usage name

WrapInput

Tunable

No

Evaluatable

Yes

Literature

  1. FFTW (https://www.fftw.org)

  2. Frigo, M. and S. G. Johnson, FFTW: An Adaptive Software Architecture for the FFT_, Proceedings of the International Conference on Acoustics, Speech, and Signal Processing_, Vol. 3, 1998, pp. 1381-1384.

  3. Oppenheim, A. V. and R. W. Schafer. Discrete-Time Signal Processing. Englewood Cliffs, NJ: Prentice-Hall, 1989.

  4. Orfanidis, S. J. Introduction to Signal Processing. Englewood Cliffs, NJ: Prentice-Hall, 1995.

  5. Proakis, J. and D. Manolakis. Digital Signal Processing. 3rd ed. Englewood Cliffs, NJ: Prentice-Hall, 1996.