Can you help me understand the inverse Fourier transform work?

685 views Asked by At

I am trying to learn about Fourier transforms and using MATLABs FFT function I can transform a recording of me saying '1 2 3' into the frequency domain. As I understand it the resulting file contains a set of complex numbers which hold the magnitude and phase of the frequencies in my original signal.

I can then perform an inverse Fourier transform (using MATLABs iFFT function) on these complex numbers and I see (and hear) that my original signal is almost perfectly rebuilt. This is the bit I don't get. If I said '3' in a high pitched voice the FFT should (and does) show that energy was present at this frequency, but how can it reconstruct it in time? I.e. since all that's returned from the FFT is a set of magnitudes and phases where is the information to say when these frequencies occurred in the time domain signal? Is MATLAB doing some windowing that I don't know about?

Any help would be much appreciated.

Cheers, Colin

2

There are 2 answers

0
Paul R On

If you just take a single FFT of your entire sound sample (which is not what you would normally do, BTW - typically you would use a sequence of overlapping STFTs to capture time-varying spectral content), then the entire sample is treated as if it were a periodic waveform. Any apparent time-varying content is merely the result of the way that the amplitudes and phases of the many components combine to reconstruct the original signal.

1
Luis Mendo On

No windowing is involved. The FFT chooses appropriate amplitudes and phases for the sinusoids, so that that the sum of all sinusoids gives the time variation of your signal.

See for example here. In the upper part you have a square pulse, which is clearly very localized in time. By including more and more sinusoids it is seen that the pulse shape is approximated with increasing accuracy (except at discontinuities, but that's another story).