FFT spectrum normalization
See original GitHub issueHello, @corbanbrook I have some question regarding the normalization of FFT results. See the link:
https://github.com/corbanbrook/dsp.js/blob/master/dsp.js#L269
Why you choose bSi = 2 / this.bufferSize
? In general, to return a FFT amplitude equal to the amplitude signal which performs in FFT, need to normalize FFT data by the number of sample points. Like this:
bSi = 1 / this.bufferSize
I think it’s a bug.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
FFT Normalisation for Beginners (really it's just for me)
Hi are the (complex) FFT values. • Parseval's theorem should be true for any well behaved FFT algorithm. • It can be used...
Read more >FFT normalization - signal processing - Stack Overflow
Common trick: take FFT of known signal and normalize by the value of the peak. Say in the above example your peak is...
Read more >How to Normalize a fft to plot in frequency domain? - MathWorks
When I plot the frequency domain the power is not 3 and 5 as I expect. I read the documentation for fft() and...
Read more >fourier transform - FFT and Power Spectrum Normalization
On many websites, including MathWorks, it was suggested to normalize the fft spectrum (MATLAB or numpy) by dividing it by the total number ......
Read more >The Fundamentals of FFT-Based Signal Analysis and ...
The Fast Fourier Transform (FFT) and the power spectrum are powerful ... Bandwidth of PCI-4450 Family Input Versus Frequency, Normalized to Sampling Rate....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I also believe this is a bug. To test it empirically (hey why not), I calculated the RMS of the input signal and the RMS of the transformed signal. They should be ~equal. The default is simply wrong. If you change to 1 (or divide the magnitude of the output bins by 2) the results are correct within 5-6% for noise signals and look like a rounding error for a pure sine input.
see: https://github.com/CyclotronResearchCentre/FASST/blob/master/SPTfunctions/pwelch.m#L810