Engee documentation

IFFT

Inverse Fast Fourier Transform (IFT) of the input signal.

ifft

Description

Block IFFT calculates the inverse fast Fourier transform (FFT) on the first dimension of a multidimensional input array, -D.

The block uses one of two possible implementations of the FFT. You can choose the implementation based on the FFTW library or the implementation based on the Radix-2 algorithm.

When the length of the input signal, , is greater than the length of the OPF, , you can observe an increase in the amplitude of the output signal. This is because the block IFFT uses length modulo data reset , to preserve all available input samples.

To avoid this increase in amplitude, you can truncate the input sample length to the OPF length . To do this, place a block Pad before the block in the model IFFT.

Ports

Input

# Port_1 — input signal
vector | matrix| multidimensional array

Details

Input signal for OPF calculation as a vector, matrix or multidimensional array.

The unit calculates the OPF by the first measurement of the multidimensional input signal.

Data types

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

Complex numbers support

Yes

Output

# Port_1 — OPF of the input signal
vector | matrix| multidimensional array

Details

An output signal returned as a vector, matrix or multidimensional array.

OPF calculated from the first dimension of the multidimensional input array.

The -th entry of the -th output channel, , is equal to the -point -point inverse discrete Fourier transform (ODPF) of the -th input channel:

π
Data types

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

Complex numbers support

Yes

Parameters

Parameters

# FFT implementation — FFT realisation
Radix-2 | FFTW

Details

FFT Implementation:

  • FFTW - support input signal of arbitrary length.

  • Radix-2 - implementation of bitwise processing of floating point data. The dimensionality of the input matrix with the size to must be equal to the power of two. To work with other input data dimensions, use the block Pad, to flatten or truncate these dimensions to powers of two, or if possible, choose the FFTW implementation.

Values

Radix-2 | FFTW

Default value

Radix-2

Program usage name

FFTImplementation

Tunable

No

Evaluatable

Yes

# Input is in bit-reversed order — bit-reverse input

Details

Specifies the order of the input channel elements relative to the order of the output channel elements. When this check box is selected, the input channel items are displayed in bit-reverse order relative to the output sequence order. When unchecked, the input channel items are displayed in linear order relative to the output sequence order.

The IFFT block computes its input in bit-reverse order. The linear ordering of the IFFT block’s input data requires an additional bit-reverse operation. In many situations it is possible to increase the speed of the IFFT block by checking the Input in bit-reversed order checkbox.

Dependencies

To use this parameter, set the FFT implementation parameters to Radix-2.

Default value

false (switched off)

Program usage name

BitRevOrder

Tunable

No

Evaluatable

Yes

# Divide output by FFT length — divide the output by the FFT length

Details

When this parameter is selected, the unit divides the OPF output by the FFT length. This option is useful when you want the OPF output to remain in the same amplitude range as the input.

Default value

true (switched on)

Program usage name

Normalize

Tunable

No

Evaluatable

Yes

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

Details

Select this check box to inherit FFT length from input dimensions.

Dependencies

If this checkbox is not selected, the FFT length parameters become available for specifying the length.

Default value

true (switched on)

Program usage name

InheritFFTLength

Tunable

No

Evaluatable

Yes

# FFT length — FFT length

Details

Specify the FFT length as an integer, .

If the FFT implementation parameters are set to Radix-2 or the Intput in bit-reversed order checkbox is selected, this value must be two.

Dependencies

To use this parameter, uncheck Inherit FFT length from input dimensions.

Default value

64

Program usage name

FFTLength

Tunable

No

Evaluatable

Yes

# Wrap input data when FFT length is shorter than input length — convolution or truncation input data

Details

Selects whether to convolve or truncate the input data depending on the FFT length. If this parameter is selected, modulo convolution is performed before the FFT operation when the FFT length is less than the input length. If unchecked, the input data is truncated to the FFT length before the FFT operation.

Dependencies

To use this parameter, clear the Inherit FFT length from input dimensions checkbox.

Default value

true (switched on)

Program usage name

WrapInput

Tunable

No

Evaluatable

Yes

Algorithms

FFTW implementation

The FFTW implementation provides an optimised FFT calculation, including support for transform lengths equal to and not equal to powers of two, as in simulation. The input data type must be floating point.

Radix-2 implementation

The Radix-2 implementation supports bit-reverse processing and allows the block to perform C code generation. The dimensionality of the input matrix of size to must be equal to a power of two. To work with other input dimensions, use the Pad block to augment or truncate those dimensions to a power of two.

When Radix-2 is selected, the block implements one or more of the following algorithms:

  • Butterfly operation

  • Double signal algorithm

  • Half length algorithm

  • Radix-2’s time-invariant thinning (DIT) algorithm

  • Radix-2 Frequency (DIF) Thinning Algorithm

Radix-2 algorithms for real and complex signals

Complexity of input data Order of output data Algorithms used for FFT calculation

Complex

Linear

Bit-reversal operation and Radix-2 DIT algorithm

Complex

Bit-reversal

Radix-2 DIF

Real

Linear

Bit-reversal operation and Radix-2 DIT combined with half-length and double-signal algorithms

Real

Bit-reverse

Radix-2 DIF combined with half-length and double-signal algorithms

The efficiency of the FFT algorithm can be improved for real input signals by forming complex sequences from the real sequences before computing the DIF. If there are real input channels, the FFT unit generates these complex sequences by applying the double signal algorithm to the first input channels and the half length algorithm to the last odd channel.

Optimising Radix-2 for a table of trigonometric values

In some situations, the Radix-2 block algorithm calculates all possible trigonometric values of the twiddle factor (twiddle factor)

π ,

where

  • - is the larger of the two values: or ,

  • .

The block stores these values in a table and retrieves them during the simulation. The number of entries in the table for floating point is shown in the following table:

Number of entries in the table for N-point FFT

floating point

Literature

  1. Orfanidis, S. J. "Introduction to Signal Processing." Upper Saddle River, NJ: Prentice Hall, 1996, p. 497.

  2. Proakis, John G. and Dimitris G. Manolakis. "Digital Signal Processing, 3rd ed." Upper Saddle River, NJ: Prentice Hall, 1996.

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

  4. 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.

See also

  1. FFT

Additional options

C code generation: Yes