Jon
Jon

Reputation: 141

Strange artefact in my Fourier transform

I have performed an fft (fast fourier transform) on a time series waveform in Matlab, but I seem to have a weird wave actually in the fourier transform plot, although there are spikes this wave looks like something I'd expect to see only in the time domain. Is there any programming reason why this could happen?

Upvotes: 1

Views: 2351

Answers (4)

Loren
Loren

Reputation: 1743

The fft assumes the signal is periodic so you can get some artefacts if the first and last values differ by enough to make that transition look like a step function. You are frequently better off windowing the data to avoid that phenomenon.

Upvotes: 7

Steve Eddins
Steve Eddins

Reputation: 1311

Note that the continuous-time Fourier transform of a finite-length signal can have things that look like "spikes" in the frequency domain. See the plots in this post of the continuous-time Fourier transform of a single period of a cosine signal and of ten periods of a cosine signal.

For example, an infinite extent cosine signal has a simple Fourier transform that's a pair of impulses at +/- the cosine frequency. But if you've only got ten periods of the cosine signal, the Fourier transform looks like this:

alt text

Upvotes: 6

MPG
MPG

Reputation: 835

Steve's currently doing a nice series on Fourier transforms on his blog. He's specifically talking about 2D transforms, but you might find his discussion of windowing helpful.

Upvotes: 2

MSalters
MSalters

Reputation: 179819

The Fourier transform is quite similar to the Inverse Fourier Transform. A spike in one is a wave in the other. Hence, if you have one outlier datapoint in your series, you'll have a wave component in the frequency domain.

A possible programming-related issue could be an uninitialized data point, e.g. providing 1023 datapoints to a 1024-point FFT.

Upvotes: 7

Related Questions