User Tools

Site Tools


blog:2019:0225_fft_scaling_factor

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
blog:2019:0225_fft_scaling_factor [2019/02/26 17:03] davekblog:2019:0225_fft_scaling_factor [2022/10/20 16:17] (current) davek
Line 1: Line 1:
 ====== FFT scaling factor ====== ====== FFT scaling factor ======
  
-What's often confusing about the [[https://en.wikipedia.org/wiki/Fast_Fourier_transform#Definition|FFT]] is that the transform seems to have numbers that are too big. Let's call this the "[[https://www.google.com/search?q=fft+scale+factor|FFT scale factor]]" problem (it's a reasonable google search). The frequency domain seems to have much more energy (much higher values) than one might expect from the time-domain waveform from which it originated.+What's often confusing about the [[https://en.wikipedia.org/wiki/Fast_Fourier_transform#Definition|FFT]] is that the transform seems to have numbers that are too big. Let's call this the "FFT scale factor" problem (it's a reasonable [[https://www.google.com/search?q=fft+scale+factor|google search]]). The frequency domain seems to have much more energy (much higher values) than one might expect from the time-domain waveform from which it originated. 
 + 
 +====== ======
  
 When trying to understand this, the uninitiated user will google something like "FFT scale factor" and get lots of really good explanations about **how** the math produces values that are N times larger than one might expect, N being the size of the FFT. When trying to understand this, the uninitiated user will google something like "FFT scale factor" and get lots of really good explanations about **how** the math produces values that are N times larger than one might expect, N being the size of the FFT.
  
 But really, these users are trying to figure out **why**, not how. I'm mean, isn't that wrong? **Why** is it N times larger? Shouldn't someone be dividing by N? But really, these users are trying to figure out **why**, not how. I'm mean, isn't that wrong? **Why** is it N times larger? Shouldn't someone be dividing by N?
- 
-====== ====== 
  
  
-The answer is yes, sort of. First off, remember what the first "F" in FFT standards for: Fast. Maybe users of standard FFT libraries don't care about the absolute scale, they care about the spectral shape or changes in the spectral shape. If the standard library divided by N, it would be less fast for everyone. The point being, if you want to take the hit caused by dividing N frequency bins by N, you do it.+The answer is yes, sort of. First off, remember what the first "F" in FFT stands for: Fast. Maybe users of standard FFT libraries don't care about the absolute scale, they care about the spectral shape or changes in the spectral shape. If the standard library divided by N, it would be less fast for everyone. The point being, if you want to take the hit caused by dividing N frequency bins by N, you do it.
  
 If you really do care about the absolute power in the frequency-domain bins, you might want to divide by N. Maybe you care about the total energy. Oh wait, you should sum the bins, then divide by N one time! Now it's faster for you, too. Maybe you only care about the energy of the strongest bin. Just divide that one bin by N and ignore the others! If you really do care about the absolute power in the frequency-domain bins, you might want to divide by N. Maybe you care about the total energy. Oh wait, you should sum the bins, then divide by N one time! Now it's faster for you, too. Maybe you only care about the energy of the strongest bin. Just divide that one bin by N and ignore the others!
Line 23: Line 23:
  
 ~~LINKBACK~~ ~~LINKBACK~~
-~~DISCUSSION~~ +//~~DISCUSSION~~
-~~ DRAFT ~~+
  
blog/2019/0225_fft_scaling_factor.1551200588.txt.gz · Last modified: 2021/09/08 17:02 (external edit)