The input is three sine waves with different amplitudes and frequencies. After FFT the spectrum shows the correct characteristic of each wave without leakage error. Why does the other spectrum leakage when the input is multiplied by a Hamming window function? Thanks![enter image description here]1

  • 1
    $\begingroup$ come on – you know this! What does multiplication with a window function in time domain do in frequency domain? $\endgroup$ Commented Oct 5, 2019 at 10:11
  • 2
    $\begingroup$ Try this for fun,increase your FFT size, without changing the frequency, but sure the number of samples is not equal to a whole number of periods... $\endgroup$
    – Ben
    Commented Oct 5, 2019 at 13:08
  • 1
    $\begingroup$ This answer explains it pretty well. $\endgroup$
    – bluenote10
    Commented Oct 5, 2019 at 21:33

1 Answer 1


Yes, we use windows to reduce spectral leakage and you show an example where using a window increases it.

There is more than one way to explain it.

If you express a DFT as a matrix vector product

$$ \mathbf{y}=\mathbf{Wx} $$ where $$ \mathbf{WW^H}=c\mathbf{I} $$ where $c$ is a constant that depends on how you define your DFT. The point is that $\mathbf{W}$ is an orthogonal matrix. Your 3 original sine waves correspond to 3 rows of $\mathbf{W}$. Your 3 sines are perpendicular to all the other $N-3$ rows, so there is no leakage.

When you uses a window like a Hamming Window, it’s equivalent to multiplying each row element by element by the window. This modified matrix $\mathbf{\tilde{W}}$ isn’t orthogonal any more. $$ \mathbf{\tilde{W}\tilde{W}^H}\ne c \mathbf{I} $$ The resulting matrix is nearly equal to a constant times $\mathbf{I}$ but the off diagonals are nonzero. Your 3 original sines now project on all the rows of $\mathbf{\tilde{W}}$. These nonzero projections are another way to say leakage.

The nonorthogonality of the widowed matrix is easy to verify in matlab using the dftmtx command.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.