Products & Services Solutions Academia Support User Community Company

Learn more about Video and Image Processing Blockset   

2-D IFFT - Compute 2-D IFFT of input

Library

Transforms

Description

The 2-D IFFT block computes the inverse fast Fourier transform (IFFT) of an M-by-N input matrix in two steps. First, it computes the one-dimensional IFFT along one dimension (row or column). Next, it computes the IFFT of the output of the first step along the other dimension (column or row). The dimensions of the input matrix, M and N, must be powers of two. To work with other input sizes, use the Pad block to pad or truncate these dimensions to powers of two.

The output of the IFFT block is equivalent to the MATLAB ifft2 function:

y = ifft(A)					% Equivalent MATLAB code

Computing the IFFT of each dimension of the input matrix is equivalent to calculating the two-dimensional inverse discrete Fourier transform (IDFT), which is defined by the following equation:

where and .

The output of this block has the same dimensions as the input.

PortDescriptionSupported Data TypesComplex Values Supported

Input

Vector or matrix of intensity values

  • Double-precision floating point

  • Single-precision floating point

  • Fixed point

  • 8-, 16-, 32-bit signed integer

  • 8-, 16-, 32-bit unsigned integer

Yes

Output

2-D IFFT of the input

Same as Input port

Yes

If the input signal has a floating-point data type,, the data type of the output signal uses the same floating-point data type. Otherwise, the output can be any fixed-point data type.

Optimizing the Table of Trigonometric Values

The block computes all the possible trigonometric values of the twiddle factor

where K is the greater value of either M or N and . The block stores these values in a table and retrieves them during simulation. You can optimize the table of trigonometric values for memory consumption or speed using the Optimize table for parameter. This parameter varies the number of table entries as summarized in the following table.

Optimize Table for Parameter Setting

Number of Table Entries for N-Point IFFT

Speed

3N/4 —floating point

N — fixed point

Memory

N/4 — floating point

Not supported for fixed point

Input Order

You must select the Input is in bit-reversed order check box to designate whether the input column elements should appear in linear or bit-reversed order. If you select the Input is in bit-reversed order check box, the block assumes the input is in bit-reversed order. If you clear the Input is in bit-reversed order check box, block assumes the input is in linear order.

For more information ordering of the output, see Bit-Reversed Order. The 2-D FFT block bit-reverses the order of both the columns and the rows..

Conjugate Symmetric Input

The FFT block yields conjugate symmetric output when its input is real valued. Taking the IFFT of a conjugate symmetric input matrix produces real-valued output. Therefore, if the input to the block is both floating point and conjugate symmetric and you select the Input is conjugate symmetric check box, the block produces real-valued outputs. Selecting this check box optimizes the block's computation method.

If the IFFT block input is conjugate symmetric and you do not select the Input is conjugate symmetric check box, the IFFT block outputs a complex-valued signal with small imaginary parts. The block output is invalid if you select this check box and the input is not conjugate symmetric.

Scaled Output

The Divide output by product of FFT length in each input dimension check box defaults to selected. The block computes scaled and unscaled versions of the IFFT. If you select this option, the block computes the scaled version of the IFFT.

The unscaled IFFT is defined by the following equation:

where and .

The scaled version of the IFFT multiplies the above unscaled version by .

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:

Algorithms for Floating-Point Signals

Input Complexity

Other Parameter Settings

Algorithms Used for IFFT Computation

Real or complex

Butterfly operation and radix-2 DIT

Real or complex

Radix-2 DIF

Real or complex

Butterfly operation and radix-2 DIT in conjunction with the half-length and double-signal algorithms

Real or complex

Radix-2 DIF in conjunction with the half-length and double-signal algorithms

Algorithms for Fixed-Point Signals

Input Complexity

Other Parameter Settings

Algorithms Used for IFFT Computation

Real or complex

Butterfly operation and radix-2 DIT

Real or complex

Radix-2 DIF

Fixed-Point Data Types

The following diagrams show the data types used in 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 dialog box 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. The block multiplies in a twiddle factor before each butterfly stage in a decimation-in-time IFFT and after each butterfly stage in a decimation-in-frequency IFFT.

The multiplier output appears in the accumulator data type because both of the inputs to the multiplier are complex. For details on the complex multiplication performed, refer to Multiplication Data Types in the Signal Processing Blockset documentation.

Dialog Box

The Main pane of the 2-D IFFT dialog box appears as shown in the following figure.

Optimize table for

Optimize the table of trigonometric values for Speed or Memory. This parameter must be set to Speed for fixed-point signals.

Input is in bit-reversed order

Designate the order of the input channel elements. Select this check box when the input should appear in reversed order, and clear it when the input should appear in linear order. in linear order. The block yields invalid outputs when you do not set this parameter correctly. See Input Order.

Input is conjugate symmetric

Select when the input to the block is both floating point and conjugate symmetric, and you want real-valued outputs. The block output is invalid when you set this parameter when the input is not conjugate symmetric. You cannot use this parameter for fixed-point signals.

Divide output by product of FFT length in each input dimension

Select this check box to compute the scaled IFFT.

The Fixed-point pane of the 2-D IFFT dialog box appears as shown in the following figure.

Rounding mode

Select the rounding mode for fixed-point operations. The sine table values do not obey this parameter; they always round to Nearest.

Overflow mode

Select the overflow mode for fixed-point operations. The sine table values do not obey this parameter; they are always saturated.

Sine table

Choose how to specify the word length of the values of the sine table. The fraction length of the sine table values is always equal to the word length minus 1:

  • When you select Same word length as input, the word length of the sine table values match that of the input to the block.

  • When you select Binary point scaling, you can enter the word length of the sine table values, in bits.

  • When you select Slope and bias scaling, you can enter the word length of the sine table values, in bits.

The sine table values do not obey the Rounding mode and Overflow mode parameters; they are always saturated and rounded to Nearest.

Product output

Use this parameter to specify how to designate the product output word and fraction lengths. Refer to Fixed-Point Data Types and Multiplication Data Types in the Signal Processing Blockset documentation for illustrations depicting the use of the product output data type in this block:

  • When you select Inherit via internal rule, the product output word length and fraction length are automatically set according to the following equations:

    ideal product output word length = output word length + sine table values word length

    ideal product output fraction length = output fraction length + sine table values fraction length

  • When you select Same as input, these characteristics match those of the input to the block.

  • When you select Binary point scaling, you can enter the word length and the fraction length of the product output, in bits.

  • When you select Slope and bias scaling, you can enter the word length, in bits, and the slope of the product output. All signals in the Video and Image Processing Blockset have a bias of 0.

Accumulator

Use this parameter to specify how to designate the accumulator word and fraction lengths. Refer to Fixed-Point Data Types and Multiplication Data Types in the Signal Processing Blockset documentation for illustrations depicting the use of the accumulator data type in this block:

  • When you select Inherit via internal rule, the block automatically sets the accumulator word length and fraction length set according to the following equations:

    ideal accumulator word length = product output word length + 1

    ideal accumulator fraction length = product output fraction length

  • When you select Same as product output, these characteristics match those of the product output.

  • When you select Same as input, these characteristics match those of the input to the block.

  • When you select Binary point scaling, you can enter the word length and the fraction length of the accumulator, in bits.

  • When you select Slope and bias scaling, you can enter the word length, in bits, and the slope of the accumulator. All signals in the Video and Image Processing Blockset have a bias of 0.

Output

Choose how to specify the output word length and fraction length:

  • When you select Inherit via internal rule, the block automatically sets the word length and fraction length according to the following equations, where the input matrix is M-by-N:

    If M>1 and N>1, output word length = input word length + floor(log 2((M-1)(N-1)))+1

    If M>1 and N=1, output word length = input word length + floor(log 2(M-1))+1

    If M=1 and N>1, output word length = input word length + floor(log 2(N-1))+1

    output fraction length = input fraction length

  • When you select Same as input, these characteristics match those of the input to the block.

  • When you select Binary point scaling, you can enter the word length and the fraction length of the output, in bits.

  • When you select Slope and bias scaling, you can enter the word length, in bits, and the slope of the output. All signals in the Video and Image Processing Blockset have a bias of 0.

See Also

2-D DCT

Video and Image Processing Blockset software

2-D FFT

Video and Image Processing Blockset software

2-D IDCT

Video and Image Processing Blockset software

FFT

Signal Processing Blockset software

IFFT

Signal Processing Blockset software

Pad

Signal Processing Blockset software

bitrevorder

Signal Processing Toolbox software

fft

MATLAB

ifft

MATLAB

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS