# Why does the Hamming window attenuate the FFT?

I am working on a very simple voice recognition system using the msp430. In my research I've read that for real life audio signals its necessary to apply a window to the FFT data because the audio signals won't be periodic. In my code, I've applied the hamming window and plotted it against the non-windowed FFT spectrum. It appears that the hamming attenuates the signal in the lower valued N data points.

I think this makes sense based upon the equation of the hamming window, but why would I want this attenuate for my signal? It seems that identifying the spectral characteristics would be more difficult after the window. Any thoughts?

• Welcome to DSP.SE! The attenuation in your graph looks much more pronounced than I would expect when applying any window. – Peter K. Nov 25 '15 at 1:21
• As it was mentioned many times on this forum. It is because in case of DFT you must divide results by sum of of window samples. In case of rectangular window it is obviously equal to $N$ but in case of Hamming window it is something like $0.5364 N$, where $0.5364$ is the so-called Coherent Gain. I suggest you to read at least this document. Also if you could post your code that would help. I have a feeling that there is bug somewhere. Plot is not exactly what I expect it to be... – jojek Nov 25 '15 at 8:44
• His DFT is length 256 and plot is to 100, if you look, the difference is almost nothing at 100. (I would assume no difference around 127-128) the window was applied after the transform, I'm sure. – johnnymopo Nov 25 '15 at 15:35
• Yes I did window after taking the fft, I thought that was the correct procedure? The graph only shows up to 100 simply because I didn't grab all 256 data points for the example. – Mtk59 Nov 25 '15 at 16:21
• No, as the others have pointed out the procedure is: X = FFT( WINDOW .* SIGNAL ). – Peter K. Nov 25 '15 at 16:25