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, . 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:
The IFFT Example opens.
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.
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.
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.
Click the Scope Properties tab.
Input domain = Time
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.
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.