Skip to main content

Topic: FFT Analysis for Dummies (Read 55406 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • C.R.Helmrich
  • [*][*][*][*][*]
  • Developer
FFT Analysis for Dummies
Reply #25
Back in the days I learned the discrete Fourier transform with this online book. I still recommend it to anyone new to the subject. It uses very simple math and a lot of pictures.

Chris
If I don't reply to your reply, it means I agree with you.

FFT Analysis for Dummies
Reply #26
Back in the days I learned the discrete Fourier transform with this online book. I still recommend it to anyone new to the subject. It uses very simple math and a lot of pictures.


Looks like an interesting book.

In it I find the following:

"If the input to a linear system is a sinusoidal wave, the output will also be a sinusoidal wave, and at exactly the same frequency as the input."

This supports a claim I made recently here that a linear system creates no new frequencies from any signal that is fed into it.

  • SebastianG
  • [*][*][*][*][*]
  • Developer
FFT Analysis for Dummies
Reply #27
This supports a claim I made recently here that a linear system creates no new frequencies from any signal that is fed into it.

Linearity alone isn't sufficient. Your system also needs to be "time invariant" (or "shift invariant", different term, same thing). Unfortunately, people often say just "linear" meaning "linear and time-invariant".

Cheers,
SG

FFT Analysis for Dummies
Reply #28
Hello guys,

I'm working on my undergraduate thesis, and our topic revolves around the FFT.

Quick question: How do you pick the appropriate N for the transform? Is there any specific rule in selecting N?

  • pdq
  • [*][*][*][*][*]
FFT Analysis for Dummies
Reply #29
That would depend on the sampling rate of your data and the desired frequency resolution of the transform.

FFT Analysis for Dummies
Reply #30
Hello guys,

I'm working on my undergraduate thesis, and our topic revolves around the FFT.

Quick question: How do you pick the appropriate N for the transform? Is there any specific rule in selecting N?



First off, select N large enough to obtain the desired low frequency bandpass. ;-)

The other number to worry about is the number of individual analyses that you nned to average together for your "final answer".

Many of the things that you analyze aren't really all that time-invariant. That is especially true of acoustics, particularly the acoustics of large spaces. One scary thing is the fact that the acoustics of a space can wander around by several dB while you are measuring it.  So, you need to average a bunch of measurements to get your results to converge to their mean.

  • Natalia
  • [*]
FFT Analysis for Dummies
Reply #31
Hi guys!

I am trying to sort out samples according to their peak frequency, but one sample which I expected to show a certain frequency showed the tallest peak at a frequency twice as high as the one I expected (there is a second but shorter peak at the expected frequency as well). Does it mean something, or it's just a coincidence? Can the fundamental frequency appearing on the spectrogram be doubled due to some logical reasons?

Thank you! 

  • xnor
  • [*][*][*][*][*]
  • Developer
FFT Analysis for Dummies
Reply #32
I am trying to sort out samples according to their peak frequency

If I understand you right you're trying to find out which time-domain samples contribute most to certain peaks in the frequency response??
Either that or you're confusing samples with frequency bins.

Quote
but one sample which I expected to show a certain frequency showed the tallest peak at a frequency twice as high as the one I expected

One sample doesn't show a certain frequency. An impulse results in a flat line in the frequency domain.

Quote
Can the fundamental frequency appearing on the spectrogram be doubled due to some logical reasons?

I'm not sure I understand but it looks like there's a bug in your code that changes the fft size or sampling rate or ...
  • Last Edit: 12 January, 2012, 12:11:53 PM by xnor
"I hear it when I see it."

  • Natalia
  • [*]
FFT Analysis for Dummies
Reply #33
Well, I guess I should've made it clear from the beginning.

It's not audio samples I'm studying; I am doing functional MRI, studying activation of the brain to a certain auditory stimuli (presented every 68 seconds) and I ran independent component analysis on scanned images - it decomposes brain networks into statistically independent spatial maps (components) based upon similarity of their time courses.

So I am running FFT on time courses of each separated component (brain network), and I expect certain components (such as auditory cortex and auditory centers) to have fundamental frequency matching with that of auditory stimulus presentation (i.e., 68 seconds=0.147 Hz), meaning that these networks activate in response to the stimulus.

Almost all of them showed it correctly but one which is very much auditory-looking have only a second tall peak at the desired frequency (0.0147 Hz), and the first tall (the tallest) peak is at 0.296 Hz, which is basically the double of stimulus frequency.

I am sorry if this is not the place I should be asking such questions, but I am very new to FFT and I have now idea if this double frequency peak is just a coincidence or it can happen due to some logical reasons.

I use Matlab to run FFT, and I am sure the script works fine as it showed no problems for the other analyses and components.

Sorry if this explanation took too long  I will be grateful for any insight on the matter.

Thank you!

  • Woodinville
  • [*][*][*][*][*]
FFT Analysis for Dummies
Reply #34
The irony of this thread being ressurrected is:

http://www.aes.org/sections/pnw/

-----
J. D. (jj) Johnston

  • Natalia
  • [*]
FFT Analysis for Dummies
Reply #35
Wish I could attend

  • xnor
  • [*][*][*][*][*]
  • Developer
FFT Analysis for Dummies
Reply #36
Natalie, do these stimuli cause spikes every 68 seconds or are they really sinusoidal waves with very low frequency such as 0.147 Hz? (btw, 1/68 = 0.0147 Hz)
Anyway, I'm not sure I can be of any help since you said almost all of them looked correctly. I was guessing that your fft size might not be large enough -> too low resolution in the freq. domain, but on the other hand I don't think that your sampling rate (number of measured samples per second) is very high so that seems to be fine too (resolution = Fs/N).
"I hear it when I see it."

FFT Analysis for Dummies
Reply #37
I believe in Truth, Justice, and the Scientific Method

FFT Analysis for Dummies
Reply #38
Oh geez, I really wish I could attend.
You're probably not the only one. Will it be recorded ?
BTW, judging by the "Nearby Eateries" it's in Fast Food Town.

  • Woodinville
  • [*][*][*][*][*]
FFT Analysis for Dummies
Reply #39
Oh geez, I really wish I could attend.
You're probably not the only one. Will it be recorded ?
BTW, judging by the "Nearby Eateries" it's in Fast Food Town.


It's on Microsoft campus, so kinda ...

We have real restaurants, too.
-----
J. D. (jj) Johnston

  • C.R.Helmrich
  • [*][*][*][*][*]
  • Developer
FFT Analysis for Dummies
Reply #40
I am sorry if this is not the place I should be asking such questions, but I am very new to FFT and I have now idea if this double frequency peak is just a coincidence or it can happen due to some logical reasons.

In audio analysis, it's quite possible to find a frequency which is twice or half as high as the "true" frequency. Since you seem to be new to the subject: have you heard of - or done - windowing and DC removal prior to computing the FFT? And how long (in seconds) is your time course of which you compute the FFT?

Chris
  • Last Edit: 14 January, 2012, 05:50:20 PM by C.R.Helmrich
If I don't reply to your reply, it means I agree with you.

  • Gumboot
  • [*][*]
FFT Analysis for Dummies
Reply #41
Some points, an FFT is not an approximation, nor is it a model. It is a precise transform with a precise inverse, one that obeys power and amplitude conservation both in the time and short-term frequency domain.


I take exception to this.  An FFT, like anything else, is a model and/or an approximation if it is used as such.  Sometimes 3 is an approximation of pi.  There's no fantastic mathematical property that can stop something from being used as a very blunt instrument.

  • xnor
  • [*][*][*][*][*]
  • Developer
FFT Analysis for Dummies
Reply #42
I take exception to this.  An FFT, like anything else, is a model and/or an approximation if it is used as such.  Sometimes 3 is an approximation of pi.  There's no fantastic mathematical property that can stop something from being used as a very blunt instrument.

Because 3 is an approximation of pi, pi itself is an approximation? Because 0.3425 + 0.4354 cannot be represented exactly with 32 bit floating numbers, addition is just an approximation? I hope you see where this is heading...

It's an invertible, discrete, linear transformation.
  • Last Edit: 14 January, 2012, 06:44:56 PM by xnor
"I hear it when I see it."

  • ExUser
  • [*][*][*][*][*]
  • Read-only
FFT Analysis for Dummies
Reply #43
Oh geez, I really wish I could attend.
I know exactly how you feel. The sad part is, the way things are going, in a couple months it would be possible for me. Oh well, there will be future PNW meetings. I will come down from Vancouver to attend one sooner or later.

  • Woodinville
  • [*][*][*][*][*]
FFT Analysis for Dummies
Reply #44
Some points, an FFT is not an approximation, nor is it a model. It is a precise transform with a precise inverse, one that obeys power and amplitude conservation both in the time and short-term frequency domain.


I take exception to this.  An FFT, like anything else, is a model and/or an approximation if it is used as such.  Sometimes 3 is an approximation of pi.  There's no fantastic mathematical property that can stop something from being used as a very blunt instrument.



No, an FFT is an orthonormal projection, no matter how it's used. It's not the FFT's fault (it has no violition, so how can it be) if somebody uses it in a particular way.
-----
J. D. (jj) Johnston

  • Woodinville
  • [*][*][*][*][*]
FFT Analysis for Dummies
Reply #45
Slide deck and octave scripts are up at www.aes.org/sections/pnw

Will try to get recording somehow.

Still making no sense of the "approximation" thing.  An orthonormal transform is what it is.
  • Last Edit: 26 January, 2012, 08:51:15 PM by Woodinville
-----
J. D. (jj) Johnston

  • neelX
  • [*]
FFT Analysis for Dummies
Reply #46
Slide deck and octave scripts are up at www.aes.org/sections/pnw


404 on the two .zip files :/

  • Woodinville
  • [*][*][*][*][*]
FFT Analysis for Dummies
Reply #47
Slide deck and octave scripts are up at www.aes.org/sections/pnw


404 on the two .zip files :/


Should be fixed.  If you still have trouble let me know and I'll pass it along.
-----
J. D. (jj) Johnston

  • Woodinville
  • [*][*][*][*][*]
FFT Analysis for Dummies
Reply #48
.zip files still fubar. Webmaster pinged.
-----
J. D. (jj) Johnston

  • Woodinville
  • [*][*][*][*][*]
FFT Analysis for Dummies
Reply #49
.zip fixed.
-----
J. D. (jj) Johnston