# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

## Transform Frequency-Domain Data into Time Domain

When you want to transform frequency-domain data into the time domain, use the IFFT block.

In this example, you use the Sine Wave block to generate two sinusoids, one at 15 Hz and the other at 40 Hz. You sum the sinusoids point-by-point to generate the compound sinusoid, $u=\mathrm{sin}\left(30\pi t\right)+\mathrm{sin}\left(80\pi t\right)$. You transform this sinusoid into the frequency domain using an FFT block, and then immediately transform the frequency-domain signal back to the time domain using the IFFT block. Lastly, you plot the difference between the original time-domain signal and transformed time-domain signal using a scope:

1. At the MATLAB® command prompt, type `ex_ifft_tut`.

The IFFT Example opens.

2. Double-click the Sine Wave block. The Block Parameters: Sine Wave dialog box opens.

3. Set the block parameters as follows:

• Amplitude = `1`

• Frequency = `[15 40]`

• Phase offset = `0`

• Sample time = `0.001`

• Samples per frame = `128`

Based on these parameters, the Sine Wave block outputs two sinusoidal signals with identical amplitudes, phases, and sample times. One sinusoid oscillates at 15 Hz and the other at 40 Hz.

4. Save these parameters and close the dialog box by clicking OK.

5. Double-click the Matrix Sum block. The Block Parameters: Matrix Sum dialog box opens.

6. Set the Sum over parameter to `Specified dimension` and the Dimension parameter to `2`. Click OK to save your changes.

Because each column represents a different signal, you need to sum along the individual rows in order to add the values of the sinusoids at each time step.

7. Double-click the FFT block. The Block Parameters: FFT dialog box opens.

8. Select the Output in bit-reversed order check box., and then click OK.

9. Double-click the IFFT block. The Block Parameters: IFFT dialog box opens.

10. Set the block parameters as follows, and then click OK:

• Select the Input is in bit-reversed order check box.

• Select the Input is conjugate symmetric check box.

Because the original sinusoidal signal is real valued, the output of the FFT block is conjugate symmetric. By conveying this information to the IFFT block, you optimize its operation.

Note that the Sum block subtracts the original signal from the output of the IFFT block, which is the estimation of the original signal.

11. Double-click the Vector Scope block.

12. Set the block parameters as follows, and then click OK:

• Click the Scope Properties tab.

• Input domain = `Time`

13. Run the model.

The flat line on the scope suggests that there is no difference between the original signal and the estimate of the original signal. Therefore, the IFFT block has accurately reconstructed the original time-domain signal from the frequency-domain input.

14. Right-click in the Vector Scope window, and select Autoscale.

In actuality, the two signals are identical to within round-off error. The previous figure shows the enlarged trace. The differences between the two signals is on the order of 10-15.