| DSP Blockset | ![]() |
Library
Description
The IFFT block computes the inverse fast Fourier transform (IFFT) of each channel of an M-by-N or length-M input, u, where M must be a power of two. To work with other input sizes, use the Zero Pad block to pad or truncate the length-M dimension to a power-of-two length.
The output of the IFFT block is equivalent to the MATLAB ifft function:
The kth entry of the lth output channel, y(k, l), is equal to the kth point of the M-point inverse discrete Fourier transform (IDFT) of the lth input channel:

This block supports real and complex floating-point and fixed-point inputs.
Sections of This Reference Page
For information on block output characteristics and how to configure the block computation methods, see other sections of this reference page:
Input and Output Characteristics
The following table describes valid inputs to the IFFT block, their corresponding outputs, and the dimension along which the block computes the IDFT.
The following diagram shows the effects of the input size, dimension, and frame status on the output of the IFFT block (see also ifft_ins_outs.mdl).

Selecting the Twiddle Factor Computation Method
The Twiddle factor computation parameter determines how the block computes the necessary sine and cosine terms to calculate the term
, shown in the first equation of this block reference page. This parameter has two settings, each with its advantages and disadvantages, as described in the following table. Note that only Table lookup mode is supported for fixed-point signals.
| Twiddle Factor Computation Parameter Setting |
Sine and Cosine Computation Method |
Effect on Block Performance |
Table lookup |
The block computes and stores the trigonometric values before the simulation starts, and retrieves them during the simulation. When you generate code from the block, the processor running the generated code stores the trigonometric values computed by the block, and retrieves the values during code execution. |
The block usually runs much more quickly, but requires extra memory for storing the precomputed trigonometric values. You can optimize the table for memory consumption or speed, as described in Optimizing the Table of Trigonometric Values below. |
Trigonometric fcn |
The block computes sine and cosine values during the simulation. When you generate code from the block, the processor running the generated code computes the sine and cosine values while the code runs. |
The block usually runs more slowly, but does not need extra data memory. For code generation, the block requires a support library to emulate the trigonometric functions, increasing the size of the generated code. |
Optimizing the Table of Trigonometric Values
When you set the Twiddle factor computation parameter to Table lookup, you need to also set the Optimize table for parameter. This parameter optimizes the table of trigonometric values for speed or memory by varying the number of table entries as summarized in the following table.
Input Order
You must select the Input is in bit-reversed order check box to designate whether the ordering of the column elements of the input is linear or bit-reversed.
Two numbers are bit-reversed values of each other when the binary representation of one is the mirror image of the binary representation of the other. For example, in a three-bit system, one and four are bit-reversed values of each other, since the three-bit binary representation of one, 001, is the mirror image of the three-bit binary representation of four, 100.
In the diagram below, the sequence 0, 1, 2, 3, 4, 5, 6, 7 is in linear order. To put the sequence in bit-reversed order, replace each element in the linearly ordered sequence with its bit-reversed counterpart. You can do this by translating the sequence into its binary representation with the minimum number of bits, then finding the mirror image of each binary entry, and finally translating the sequence back to its decimal representation. The resulting sequence is the original linearly ordered sequence in bit-reversed order.

Set the Input is in bit-reversed order parameter as follows to indicate the ordering of the input's column elements.
| Parameter Setting |
Ordering of Input Channel Elements |
| Linear order |
|
| Bit-reversed order |
Conjugate Symmetric Input
When the block input is both floating point and conjugate symmetric and you want real-valued outputs, select the Input is conjugate symmetric check box. This optimizes the block's computation method. A common source of conjugate symmetric data is the FFT block, which yields conjugate symmetric output when its input is real valued.
If the IFFT block input is conjugate symmetric but you do not select the Input is conjugate symmetric check box, you do not get a real-valued output. Instead, you get a complex-valued output with small imaginary parts. The block output is invalid if you set this parameter when the input is not conjugate symmetric.
Note that the Input is conjugate symmetric parameter cannot be used for fixed-point signals.
Scaled Output
You can choose to output a scaled version of the input's IDFT,
, by setting the Skip normalization by transform length, N parameter.

Algorithms Used for IFFT Computation
Depending on whether the block input is floating point or fixed point, real or complex valued, and conjugate symmetric, the block uses one or more of the following algorithms as summarized in the following tables:
| Input Complexity |
Other Parameter Settings |
Algorithms Used for FFT Computation |
| Real or complex |
Not applicable |
Radix-2 DIT |
Fixed-Point Data Types
The diagrams below show the data types used within the IFFT block for fixed-point signals. You can set the sine table, accumulator, product output, and output data types displayed in the diagrams in the IFFT block mask as discussed in Dialog Box.
Inputs to the IFFT block are first cast to the output data type and stored in the output buffer. Each butterfly stage then processes signals in the accumulator data type, with the final output of the butterfly being cast back into the output data type. A twiddle factor is multiplied in before each butterfly stage in a decimation-in-time IFFT, and after each butterfly stage in a decimation-in-frequency IFFT.
The output of the multiplier is in the accumulator data type since both of the inputs to the multiplier are complex. For details on the complex multiplication performed, refer to Multiplication Data Types.
Examples
For an example of how to optimize computations when using both the IFFT block and FFT block in the same model, see the FFT block reference page example, The Use of Bit-Reversed Outputs
Dialog Box
, shown in the first equation of this block reference page. In Table lookup mode, the block computes and stores the sine and cosine values before the simulation starts. In Trigonometric fcn mode, the block computes the sine and cosine values during the simulation. See Selecting the Twiddle Factor Computation Method.
Table lookup for fixed-point signals.
Speed or Memory. This parameter is only available when the Twiddle factor computation parameter is set to Table lookup. See Optimizing the Table of Trigonometric Values.
Speed for fixed-point signals.
Same as input, the word and fraction lengths of the sine table values are the same as those of the input of the block. If you select Same as output, they are the same as those of the output of the block. If you select User-defined, the Fixed-point sine table word length and Fixed-point sine table fraction length parameters become visible.
Nearest.
User-defined is specified for the Fixed-point sine table attributes parameter.
User-defined is specified for the Fixed-point sine table attributes parameter.
Same as input, these characteristics will match those of the input to the block. If you select User-defined, the Output word length and Output fraction length parameters become visible.
User-defined is specified for the Fixed-point output attributes parameter.
User-defined is specified for the Fixed-point output attributes parameter.
Same as input, the accumulator word and fraction lengths are the same as those of the input to the block. If you select Same as output, they are the same as those of the output of the block. If you select User-defined, the Accumulator word length and Accumulator fraction length parameters become visible.
User-defined is specified for the Fixed-point accumulator attributes parameter.
User-defined is specified for the Fixed-point accumulator attributes parameter.
Same as input, Same as output, or Same as accumulator, the product output word and fraction lengths are the same as those of the input, output, or accumulator of the block, respectively. If you select User-defined, the Product output word length and Product output fraction length parameters become visible.
User-defined is specified for the Fixed-point product output attributes parameter.
User-defined is specified for the Fixed-point product output attributes parameter.
Nearest.
Supported Data Types
To learn how to convert your data types to the above data types in MATLAB and Simulink, see Supported Data Types and How to Convert to Them.
See Also
| FFT |
DSP Blockset |
| IDCT |
DSP Blockset |
| Pad |
DSP Blockset |
| Zero Pad |
DSP Blockset |
bitrevorder |
Signal Processing Toolbox |
fft |
Signal Processing Toolbox |
ifft |
Signal Processing Toolbox |
| IDWT | Inherit Complexity | ![]() |
Learn more about the latest releases of MathWorks products: |
| © 1994-2009 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |