The old Google Groups will be going away soon, but your browser is incompatible with the new version.
interpreting FFT results
 There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic. There was an error processing your request. Please try again. Standard view   View as tree
 6 messages

From:
To:
Cc:
Followup To:
Subject:
 Validation: For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon.

More options Feb 26 2007, 7:50 pm
Newsgroups: comp.dsp
Date: Mon, 26 Feb 2007 16:50:03 -0800
Local: Mon, Feb 26 2007 7:50 pm
Subject: interpreting FFT results
Hi,

It's been about 10 years since I worked w/ FFT's, so I need refreshing on a
couple of points.
I brushed up reading Numerical Recipes and info from the Mathematica site:
http://mathworld.wolfram.com/FastFourierTransform.html

Let's say I have N data points (where N is a power of 2), usually 128.  To
start, In Excel I'm plotting Cos(wn) where w (omega) =2 Pi / N k,  n's & k's
are integers 1 to 128.  k is just the number of the data point and n let's
me vary the frequency.

Let's say 128 data points happen in 1 second.

1)  in the FFT, what are the frequencies at each interval?  Point 1 is 0 hz,
but what about 2, 3, ...?  What freqs are those?
for n=128, I get a delta at k=1
for n=64    I get a delta at k=2
for n=32    I get a delta at k=4  (don't know what happend to freqs at  k=3)

2) for  n=51.2, I have exactly 2.5 cycles in 128 sample points in one
second.  I'm sure I don't have an FFT point at exactly 51.2, so I get
something that looks like an exponential series.  Question is why?  I still
only have 1 frequency, not a range.  Is this a byproduct of the FFT?  How do
you interpret something like that?

Let me know what points of clarification may be needed.

Thanks!
Jay

To post a message you must first join this group.
You do not have the permission required to post.
More options Feb 26 2007, 8:28 pm
Newsgroups: comp.dsp
From: cincy...@gmail.com
Date: 26 Feb 2007 17:28:34 -0800
Local: Mon, Feb 26 2007 8:28 pm
Subject: Re: interpreting FFT results
On Feb 26, 7:50 pm, "Jay Wolfe" <jayw...@adelphia.net> wrote:

The mapping of the FFT output bins to actual frequencies depends on
the sampling rate that you use. Looking at the formula for the DFT,
you can see that the k-th element of the output sequence corresponds
to the DTFT evaluated at omega = 2*pi*k/N.  The valid range for omega
is [-pi, pi], and this range (according to the sampling theorem)
corresponds to [-Fs/2, Fs/2]. So, if your sampling frequency is Fs,
then the k-th element of the FFT output corresponds to Fs*k/N. Note
that this relationship is only valid for the first half of the FFT
output, as the second half corresponds to the "negative" frequencies
in the signal; you can't get any information on spectral content above
the Nyquist rate of Fs/2.

> 2) for  n=51.2, I have exactly 2.5 cycles in 128 sample points in one
> second.  I'm sure I don't have an FFT point at exactly 51.2, so I get
> something that looks like an exponential series.  Question is why?  I still
> only have 1 frequency, not a range.  Is this a byproduct of the FFT?  How do
> you interpret something like that?

I'm not sure exactly what you're asking here. I understand where you
might expect to get a single peak in the FFT output if you input a
pure sinusoid. If your sampling frequency is an integer multiple of
the sinusoid's frequency, then you will see a single peak in the FFT
output. This is because the "whole signal" lands in one of the
frequency bins, as described above. If you have a sinusoid whose true
frequency would lie between two of the FFT bins, then you get a
spectral smearing effect where you see a sinc-like function in the
output instead. This is an effect of having finite frequency
resolution in the FFT's output. If you're doing spectral analysis on
the signal, you can mitigate these effects if needed by using an
appropriate window function.

Jason

To post a message you must first join this group.
You do not have the permission required to post.
More options Feb 26 2007, 9:13 pm
Newsgroups: comp.dsp
From: "Jeff Caunter" <jeffcaun...@sparkysworld.co.uk>
Date: Mon, 26 Feb 2007 20:13:23 -0600
Local: Mon, Feb 26 2007 9:13 pm
Subject: Re: interpreting FFT results
To supplement what Jason wrote-

If your data frame is 1 second long, then the resolution of your FFT will
be 1Hz (1/frame-period). Bin0 will be the DC term, Bin1 will be 1Hz
(+/-0.5Hz), Bin2 will be 2Hz (+/-0.5Hz)...etc.

Since you are probably dealing with real-only input values, you can only
use half the output spectrum at most. For 128-point FFT you cannot use
Bin64, as it is shared with the negative spectrum, so bin63 (your highest
bin) will contain 63Hz(+/-0.5Hz)

A point worth remembering is that, regardless of the FFT point-size, or
sampling frequency, when a signal is dead-centre with a bin, there will be
exactly the bin-index number of cycles in the input frame (less one
sample). So, for example, if you had a frequency dead in the middle of
Bin37, there would be exactly 37cycles (-1 sample) in the input frame.
So, from this you can see that the index number of the bin-scale is
Frequency, whose dimension is Cycles/Frame. To convert to Cycles/Sec, just
multiply by Frames/Sec or SampleRate/FFTsize.

Jeff

To post a message you must first join this group.
You do not have the permission required to post.
More options Feb 26 2007, 9:55 pm
Newsgroups: comp.dsp
From: "Ron N." <rhnlo...@yahoo.com>
Date: 26 Feb 2007 18:55:09 -0800
Local: Mon, Feb 26 2007 9:55 pm
Subject: Re: interpreting FFT results
On Feb 26, 4:50 pm, "Jay Wolfe" <jayw...@adelphia.net> wrote:

The "freqs" for k=3 require n= (128 / 3), so what happened to
them is that you skipped a divisor.

> 2) for  n=51.2, I have exactly 2.5 cycles in 128 sample points in one
> second.  I'm sure I don't have an FFT point at exactly 51.2, so I get
> something that looks like an exponential series.  Question is why?  I still
> only have 1 frequency, not a range.

Nope.  You have 1 frequency only if you FFT it for a whole
number of cycles of your sinusoid.  But you chopped it up
using the FFT's inherent window of n = 128 that is not a whole
number of cycles of your sinusoid, so you ended up with the
sinusoidal fragment, which is a sinc function in the complex
FFT domain, convolved with your desired delta.

(If the window chops your sinusoid into an integer number
of cycles, then the sinc function is centered on a bin, which
just happens to be invisible to all other integer bins).

> Is this a byproduct of the FFT?  How do
> you interpret something like that?

Some say it is a byproduct of the FFT being circular,
I prefer to think of it as a byproduct of your chopping
vector.

IMHO. YMMV.
--
rhn A.T nicholson d.0.t C-o-M

To post a message you must first join this group.
You do not have the permission required to post.
More options Feb 26 2007, 11:41 pm
Newsgroups: comp.dsp
From: Jerry Avins <j...@ieee.org>
Date: Mon, 26 Feb 2007 23:41:49 -0500
Local: Mon, Feb 26 2007 11:41 pm
Subject: Re: interpreting FFT results

By the way: people use tapered windows to reduce the offending effect.
As always in life, every solution id=s the cause of another problem.

Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

To post a message you must first join this group.
You do not have the permission required to post.
More options Feb 27 2007, 9:17 pm
Newsgroups: comp.dsp
Date: Tue, 27 Feb 2007 18:17:24 -0800
Local: Tues, Feb 27 2007 9:17 pm
Subject: Re: interpreting FFT results
Okay, thank you all for the input, that clarifies things a lot!
Jay

"Jerry Avins" <j...@ieee.org> wrote in message

news:WPWdnYhFQ-QQK37YnZ2dnUVZWhednZ2d@rcn.net...