FFT Analysis for Dummies |
![]() ![]() |
FFT Analysis for Dummies |
Apr 4 2010, 18:21
Post
#26
|
|
|
Group: Developer Posts: 618 Joined: 6-December 08 From: Erlangen Germany Member No.: 64012 |
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.
|
|
|
|
Apr 5 2010, 12:21
Post
#27
|
|
![]() Group: Members Posts: 3212 Joined: 29-October 08 From: USA, 48236 Member No.: 61311 |
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. |
|
|
|
Apr 5 2010, 16:39
Post
#28
|
|
![]() Group: Developer Posts: 1317 Joined: 20-March 04 From: Göttingen (DE) Member No.: 12875 |
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 |
|
|
|
Apr 26 2011, 14:43
Post
#29
|
|
|
Group: Members Posts: 1 Joined: 26-April 11 Member No.: 90105 |
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? |
|
|
|
Apr 26 2011, 16:16
Post
#30
|
|
|
Group: Members Posts: 3080 Joined: 1-September 05 From: SE Pennsylvania Member No.: 24233 |
That would depend on the sampling rate of your data and the desired frequency resolution of the transform.
|
|
|
|
May 2 2011, 13:42
Post
#31
|
|
![]() Group: Members Posts: 3212 Joined: 29-October 08 From: USA, 48236 Member No.: 61311 |
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. |
|
|
|
Jan 12 2012, 08:49
Post
#32
|
|
|
Group: Members Posts: 6 Joined: 12-January 12 Member No.: 96382 |
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! |
|
|
|
Jan 12 2012, 18:10
Post
#33
|
|
![]() Group: Developer Posts: 304 Joined: 29-April 11 From: Austria Member No.: 90198 |
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 ... This post has been edited by xnor: Jan 12 2012, 18:11 |
|
|
|
Jan 13 2012, 01:49
Post
#34
|
|
|
Group: Members Posts: 6 Joined: 12-January 12 Member No.: 96382 |
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 Thank you! |
|
|
|
Jan 13 2012, 02:08
Post
#35
|
|
![]() Group: Members Posts: 1354 Joined: 9-January 05 From: JJ's office. Member No.: 18957 |
-------------------- -----
J. D. (jj) Johnston |
|
|
|
Jan 13 2012, 02:55
Post
#36
|
|
|
Group: Members Posts: 6 Joined: 12-January 12 Member No.: 96382 |
Wish I could attend
|
|
|
|
Jan 13 2012, 11:41
Post
#37
|
|
![]() Group: Developer Posts: 304 Joined: 29-April 11 From: Austria Member No.: 90198 |
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). |
|
|
|
Jan 13 2012, 17:48
Post
#38
|
|
![]() Group: Members Posts: 226 Joined: 12-May 09 From: New Milford, CT Member No.: 69730 |
Oh geez, I really wish I could attend. --Ethan -------------------- I believe in Truth, Justice, and the Scientific Method
|
|
|
|
Jan 13 2012, 19:03
Post
#39
|
|
![]() Group: Members Posts: 552 Joined: 22-May 05 From: France Member No.: 22220 |
|
|
|
|
Jan 14 2012, 23:14
Post
#40
|
|
![]() Group: Members Posts: 1354 Joined: 9-January 05 From: JJ's office. Member No.: 18957 |
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 |
|
|
|
Jan 14 2012, 23:48
Post
#41
|
|
|
Group: Developer Posts: 618 Joined: 6-December 08 From: Erlangen Germany Member No.: 64012 |
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 This post has been edited by C.R.Helmrich: Jan 14 2012, 23:50 -------------------- If I don't reply to your reply, it means I agree with you.
|
|
|
|
Jan 15 2012, 00:25
Post
#42
|
|
![]() Group: Members Posts: 51 Joined: 11-December 11 From: United Kingdom Member No.: 95728 |
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. |
|
|
|
Jan 15 2012, 00:40
Post
#43
|
|
![]() Group: Developer Posts: 304 Joined: 29-April 11 From: Austria Member No.: 90198 |
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. This post has been edited by xnor: Jan 15 2012, 00:44 |
|
|
|
Jan 15 2012, 01:05
Post
#44
|
|
![]() Group: Super Moderator Posts: 3267 Joined: 26-July 02 From: princegeorge.ca Member No.: 2796 |
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. -------------------- (atrix|(fb2k->e-mu 0404 usb|audio 8 dj))->hd280|jvc ha-fx35-b
|
|
|
|
Jan 15 2012, 01:26
Post
#45
|
|
![]() Group: Members Posts: 1354 Joined: 9-January 05 From: JJ's office. Member No.: 18957 |
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 |
|
|
|
Jan 27 2012, 02:50
Post
#46
|
|
![]() Group: Members Posts: 1354 Joined: 9-January 05 From: JJ's office. Member No.: 18957 |
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. This post has been edited by Woodinville: Jan 27 2012, 02:51 -------------------- -----
J. D. (jj) Johnston |
|
|
|
Jan 27 2012, 11:49
Post
#47
|
|
|
Group: Members Posts: 10 Joined: 17-July 08 Member No.: 55904 |
|
|
|
|
Jan 28 2012, 00:13
Post
#48
|
|
![]() Group: Members Posts: 1354 Joined: 9-January 05 From: JJ's office. Member No.: 18957 |
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 |
|
|
|
Jan 28 2012, 05:19
Post
#49
|
|
![]() Group: Members Posts: 1354 Joined: 9-January 05 From: JJ's office. Member No.: 18957 |
.zip files still fubar. Webmaster pinged.
-------------------- -----
J. D. (jj) Johnston |
|
|
|
Jan 28 2012, 11:56
Post
#50
|
|
![]() Group: Members Posts: 1354 Joined: 9-January 05 From: JJ's office. Member No.: 18957 |
.zip fixed.
-------------------- -----
J. D. (jj) Johnston |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 22nd May 2013 - 09:33 |