IPB

Welcome Guest ( Log In | Register )

FFT Analysis for Dummies
Ethan Winer
post Mar 27 2010, 21:41
Post #1





Group: Members
Posts: 248
Joined: 12-May 09
From: New Milford, CT
Member No.: 69730



Folks,

I'd like to learn more about FFTs. I'm not a math guy, so I imagine I'll never fully understand all the nuances. But I'd like to try anyway. I understand the general concept, that an FFT shows how much energy is present at different frequencies. What I'd like to know is how to set the various parameters such as FFT Size and Overlap, when to use the different types of window smoothing and why, and so forth. Below is a list of settings in the Rightmark FFT analyzer with my associated questions, and hopefully this is a good place to start.

FFT Size: I understand that the higher the number, the better the frequency resolution. So why is this
even adjustable? Why not just use the highest resolution possible automatically?

Zero Padding: This ranges from None through 8x. What does this do?

FFT Overlap: What is this for, and when would you use higher or lower values?

FFT Window: I recognize some of the names, but have no idea when or why one would select these choices.

Kaiser Window beta: I have no idea what this does either.

I noticed that Sound Forge lets you pick the number of slices to show. What are slices and why is more than
one needed to analyze a Wave file?

I realize this is a lot to ask! If anyone knows of a good newbie-level tutorial that explains this in plain English with minimal math, I'd love to see it. Everything I've found through Google starts right in with math that's way over my head.

--Ethan


--------------------
I believe in Truth, Justice, and the Scientific Method
Go to the top of the page
+Quote Post
 
Start new topic
Replies
Notat
post Mar 28 2010, 01:55
Post #2





Group: Members
Posts: 581
Joined: 17-August 09
Member No.: 72373



I'm not a super math dude but I have been reading math texts lately and I'm going to give this a try. If you don't know it, you can't teach it and all. Please be kind.

First off FFT refers to an optimized implementation of the discrete Fourier transform (DFT). The FFT produces the same results as a DFT.
The discrete Fouier transform is for sampled data (i.e. digital audio).

The basic idea is you transform a block of samples representing signal intensity from time 0 to time N to a block of samples representing frequency intensity from frequency 0 to frequency N. N is the window or block size. If you choose N large (e.g. as long as a whole track) you'll get detailed frequency information for the whole track but you won't have a clue where in the track those components exist. Using numerous shorter blocks, you can pinpoint where in time the various frequencies are occurring (e.g. when which notes are being played) but in using the shorter block you only get a coarse idea about what frequencies are present (e.g. can't distinguish C from C#).

To overcome this, frequency analysis applications will often use the longer blocks and instead of placing them one after another, the blocks will be overlapped. This sort of gives you the best of both worlds. I does require more processing to do the transform - if your overlap is 50%, you are computing FFTs for twice as many samples.

When you edit audio on a workstation you create clicks or other artifacts at the edit points. We have this same problem when we edit audio to do FFTs. In editing, we address this by cross fading at the edit points. And that's exactly what we do with FFTs. We apply an envelope to the audio data in each block (fade it up at the beginning, fade it back down at the end) before performing the FFT. Mathemiticians call these envelopes "windows". There are many shapes of windows because there are many compromises to be made when you're slicing and dicing like this.
Go to the top of the page
+Quote Post
Woodinville
post Mar 28 2010, 05:23
Post #3





Group: Members
Posts: 1402
Joined: 9-January 05
From: JJ's office.
Member No.: 18957



QUOTE (Notat @ Mar 27 2010, 17:55) *
The basic idea is you transform a block of samples representing signal intensity from time 0 to time N to a block of samples representing frequency intensity from frequency 0 to frequency N. N is the window or block size.


If you have 'n' real-valued samples (i.e. no complex numbers on input, as most PCM supplies) you have n/2 +1 complex frequency values, where (starting at n=0 for DC and ending at n=N/2 for Nyquist) you have two real values (DC and Nyquist) and N/2-2 complex values. The complex values are echoed (by conjugation, i.e. changing the sign of the imaginary part) at the negative frequencies (for a real signal, you have both positive and negative frequencies, one is the complex conjugate value of the other).

There are other transforms (DCT, DST, etc) that are real to real, and that provide N frequency components instead of N/2 complex components, effectively, but then phase is encoded in interesting ways inside of twice as many real values.

While it may seem odd that you have N/2 components, they are complex, so you actually have N results, half real, half imaginary.


--------------------
-----
J. D. (jj) Johnston
Go to the top of the page
+Quote Post
Notat
post Mar 28 2010, 14:45
Post #4





Group: Members
Posts: 581
Joined: 17-August 09
Member No.: 72373



QUOTE (Woodinville @ Mar 27 2010, 22:23) *
While it may seem odd that you have N/2 components, they are complex, so you actually have N results, half real, half imaginary.

Thanks JJ. Dumbing it down a little bit: You start with N samples. The DCT produces N/2 frequency amplitude results and N/2 corresponding phase results. The phase information is typically discarded in spectral analysis applications.
Go to the top of the page
+Quote Post
Woodinville
post Mar 30 2010, 00:10
Post #5





Group: Members
Posts: 1402
Joined: 9-January 05
From: JJ's office.
Member No.: 18957



QUOTE (Notat @ Mar 28 2010, 06:45) *
QUOTE (Woodinville @ Mar 27 2010, 22:23) *
While it may seem odd that you have N/2 components, they are complex, so you actually have N results, half real, half imaginary.

Thanks JJ. Dumbing it down a little bit: You start with N samples. The DCT produces N/2 frequency amplitude results and N/2 corresponding phase results. The phase information is typically discarded in spectral analysis applications.



You meant DFT ...

DCT is real to real.


--------------------
-----
J. D. (jj) Johnston
Go to the top of the page
+Quote Post

Posts in this topic
- Ethan Winer   FFT Analysis for Dummies   Mar 27 2010, 21:41
- - lvqcl   QUOTE (Ethan Winer @ Mar 27 2010, 23:41) ...   Mar 27 2010, 22:23
|- - Paulhoff   QUOTE (lvqcl @ Mar 27 2010, 17:23) ...   Mar 27 2010, 22:46
- - AndyH-ha   In most music the frequency changes over time. Ver...   Mar 27 2010, 23:36
- - Woodinville   Ok. An FFT is a discrete-time, finite length line...   Mar 28 2010, 01:00
|- - Gumboot   QUOTE (Woodinville @ Mar 28 2010, 00:00) ...   Jan 15 2012, 00:25
|- - Woodinville   QUOTE (Gumboot @ Jan 14 2012, 15:25) QUOT...   Jan 15 2012, 01:26
- - Notat   I'm not a super math dude but I have been read...   Mar 28 2010, 01:55
|- - Woodinville   QUOTE (Notat @ Mar 27 2010, 17:55) The ba...   Mar 28 2010, 05:23
|- - Notat   QUOTE (Woodinville @ Mar 27 2010, 22:23) ...   Mar 28 2010, 14:45
|- - Ethan Winer   Thanks for the advice and links. I thought to Goog...   Mar 28 2010, 16:59
|- - Canar   QUOTE (Notat @ Mar 28 2010, 09:45) Thanks...   Mar 29 2010, 18:35
|- - Woodinville   QUOTE (Notat @ Mar 28 2010, 06:45) QUOTE ...   Mar 30 2010, 00:10
|- - Notat   QUOTE (Woodinville @ Mar 29 2010, 17:10) ...   Mar 30 2010, 03:15
|- - Woodinville   QUOTE (Notat @ Mar 29 2010, 19:15) QUOTE ...   Mar 30 2010, 21:20
- - hellokeith   I had a very informative conversation about transf...   Mar 28 2010, 04:02
|- - Arnold B. Krueger   QUOTE (hellokeith @ Mar 27 2010, 23:02) A...   Mar 28 2010, 04:26
- - honestguv   Ethan, perhaps the best single resource to answer ...   Mar 28 2010, 10:46
- - benski   Answering a bit more than your question asks, for ...   Mar 28 2010, 16:53
|- - Ethan Winer   Okay, I have a few quick questions: In Sound Forg...   Mar 29 2010, 18:16
|- - Arnold B. Krueger   QUOTE (Ethan Winer @ Mar 29 2010, 13:16) ...   Mar 30 2010, 02:14
||- - Ethan Winer   QUOTE (Arnold B. Krueger @ Mar 29 2010, 21...   Mar 30 2010, 21:02
|- - Alexey Lukin   QUOTE (Ethan Winer @ Mar 29 2010, 13:16) ...   Apr 3 2010, 18:52
|- - Ethan Winer   Thanks very much Alexey! Lots for me to digest...   Apr 4 2010, 17:47
- - Woodinville   Note: I generally point at "Fourier Analysis...   Mar 30 2010, 00:13
- - Canar   I say we start with the Z-transform and express ev...   Mar 30 2010, 21:32
|- - Woodinville   QUOTE (Canar @ Mar 30 2010, 13:32) I say ...   Mar 30 2010, 21:50
- - C.R.Helmrich   Back in the days I learned the discrete Fourier tr...   Apr 4 2010, 18:21
|- - Arnold B. Krueger   QUOTE (C.R.Helmrich @ Apr 4 2010, 13:21) ...   Apr 5 2010, 12:21
|- - SebastianG   QUOTE (Arnold B. Krueger @ Apr 5 2010, 12...   Apr 5 2010, 16:39
- - hypervelocity   Hello guys, I'm working on my undergraduate t...   Apr 26 2011, 14:43
|- - Arnold B. Krueger   QUOTE (hypervelocity @ Apr 26 2011, 09:43...   May 2 2011, 13:42
- - pdq   That would depend on the sampling rate of your dat...   Apr 26 2011, 16:16
- - Natalia   Hi guys! I am trying to sort out samples acco...   Jan 12 2012, 08:49
- - xnor   QUOTE (Natalia @ Jan 12 2012, 09:49) I am...   Jan 12 2012, 18:10
- - Natalia   Well, I guess I should've made it clear from t...   Jan 13 2012, 01:49
|- - Woodinville   The irony of this thread being ressurrected is: h...   Jan 13 2012, 02:08
||- - Ethan Winer   QUOTE (Woodinville @ Jan 12 2012, 20:08) ...   Jan 13 2012, 17:48
|||- - Kees de Visser   QUOTE (Ethan Winer @ Jan 13 2012, 18:48) ...   Jan 13 2012, 19:03
||||- - Woodinville   QUOTE (Kees de Visser @ Jan 13 2012, 10:0...   Jan 14 2012, 23:14
|||- - Canar   QUOTE (Ethan Winer @ Jan 13 2012, 08:48) ...   Jan 15 2012, 01:05
||- - Roseval   QUOTE (Woodinville @ Jan 13 2012, 02:08) ...   Feb 1 2012, 23:56
||- - Woodinville   QUOTE (Roseval @ Feb 1 2012, 14:56) QUOTE...   Feb 2 2012, 11:02
|- - C.R.Helmrich   QUOTE (Natalia @ Jan 13 2012, 02:49) I am...   Jan 14 2012, 23:48
- - Natalia   Wish I could attend   Jan 13 2012, 02:55
- - xnor   Natalie, do these stimuli cause spikes every 68 se...   Jan 13 2012, 11:41
- - xnor   QUOTE (Gumboot @ Jan 15 2012, 01:25) I ta...   Jan 15 2012, 00:40
- - Woodinville   Slide deck and octave scripts are up at www.aes.or...   Jan 27 2012, 02:50
|- - neelX   QUOTE (Woodinville @ Jan 27 2012, 03:50) ...   Jan 27 2012, 11:49
|- - Woodinville   QUOTE (neelX @ Jan 27 2012, 02:49) QUOTE ...   Jan 28 2012, 00:13
- - Woodinville   .zip files still fubar. Webmaster pinged.   Jan 28 2012, 05:19
- - Woodinville   .zip fixed.   Jan 28 2012, 11:56
|- - Ethan Winer   QUOTE (Woodinville @ Jan 28 2012, 05:56) ...   Jan 28 2012, 18:50
|- - xnor   The .m files are scripts for GNU Octave, but you c...   Jan 28 2012, 20:01
|- - Ethan Winer   QUOTE (xnor @ Jan 28 2012, 14:01) The .m ...   Jan 29 2012, 19:09
- - Woodinville   So, Ethan, did you run some of the scripts yet? N...   Jan 30 2012, 02:59
|- - Ethan Winer   QUOTE (Woodinville @ Jan 29 2012, 20:59) ...   Jan 30 2012, 18:45
|- - Woodinville   QUOTE (Ethan Winer @ Jan 30 2012, 09:45) ...   Jan 30 2012, 23:59
|- - Ethan Winer   Hey, I watched an FFT tutorial "webinar...   Feb 1 2012, 23:14
|- - xnor   QUOTE (Ethan Winer @ Feb 2 2012, 00:14) I...   Feb 2 2012, 19:37
||- - C.R.Helmrich   Me too. To many people, such a resource will be mo...   Feb 2 2012, 23:14
||- - Roseval   QUOTE (C.R.Helmrich @ Feb 2 2012, 23:14) ...   Feb 2 2012, 23:36
||- - Woodinville   QUOTE (C.R.Helmrich @ Feb 2 2012, 14:14) ...   Feb 6 2012, 06:17
||- - romor   QUOTE (Woodinville @ Feb 6 2012, 07:17) S...   Feb 8 2012, 09:53
||- - Woodinville   QUOTE (romor @ Feb 8 2012, 00:53) QUOTE (...   Feb 9 2012, 03:52
|- - Ethan Winer   QUOTE (Ethan Winer @ Feb 1 2012, 17:14) H...   Feb 28 2012, 18:38
|- - Woodinville   QUOTE (Ethan Winer @ Feb 28 2012, 09:38) ...   Mar 1 2012, 01:01
||- - romor   QUOTE (Woodinville @ Mar 1 2012, 02:01) N...   Mar 1 2012, 15:25
||- - Ethan Winer   QUOTE (Woodinville @ Feb 29 2012, 19:01) ...   Mar 1 2012, 20:03
|- - Arnold B. Krueger   QUOTE (Ethan Winer @ Feb 28 2012, 12:38) ...   Mar 1 2012, 14:00
- - romor   http://www.aes.org/sections/pnw/scripts/   Feb 2 2012, 02:37
|- - Roseval   Thanks   Feb 2 2012, 10:14
- - Speedskater   Were you able to find anyone to make an audio reco...   Feb 2 2012, 15:31
|- - Woodinville   QUOTE (Speedskater @ Feb 2 2012, 06:31) W...   Feb 4 2012, 02:48
|- - Woodinville   QUOTE (Woodinville @ Feb 3 2012, 17:48) Q...   Feb 4 2012, 07:20
- - Woodinville   http://www.aes.org/sections/pnw/pnwrecaps/2012/jj_...   Feb 6 2012, 05:52
- - icstm   thanks for hosting.   Mar 1 2012, 18:43


Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 19th September 2014 - 04:36