[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strange behaviour of FFT
From: |
Quentin Spencer |
Subject: |
Re: Strange behaviour of FFT |
Date: |
Mon, 19 Jul 2004 14:03:47 -0500 |
User-agent: |
Mozilla Thunderbird 0.6 (X11/20040519) |
I don't have time to write a full explanation right now, but the short
answer is that this behavior is completely expected, and is due to the
fundamental assumptions in the mathematical definition of the FFT that
the signal is infinite and periodic with a period equal to the length of
the FFT. For this reason the FFT by itself is usually not the best tool
for spectrum analysis. Most advanced DSP textbooks discuss this issue
and the various approaches to spectrum estimation that have been
proposed over the years. These usually involve some form of averaging
FFTs together. I would suggest looking at the "pwelch" function that is
included in the octave-forge package as a starting point.
regards,
Quentin
Jörg Kampmann wrote:
I am using the attached little program in order to test the limits
etc. of "fft(a,n)"
I generate a superposition of sinewaves of 0.1 s duration and apply
fft on it in order to get the power spectrum of the sinewaves.
Strange things seem to happen, perhaps somebody is able to help me or
clarify matters:
when you run the Simulation02 you discover (with 10 Superpositions as
indicated in variable "SuperPos") that a 200, 400, 600 etc. Hz you get
nice power spectra peaks as expected. However at values in between I
get strange effects at the footing area of the power spectra peaks,
which you can easily observe.
I assume that stems from the way I construct the variable "ySinewave"
and "tone".
I would like to get some practical hints on how to best use fft. The
tutorial/documentation does not say much about it ...
Thanks in advance
Joerg
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------