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
]1
- 5
- 1
-
1come on – you know this! What does multiplication with a window function in time domain do in frequency domain? – Marcus Müller Oct 05 '19 at 10:11
-
2Try 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... – Ben Oct 05 '19 at 13:08
-
1This answer explains it pretty well. – bluenote10 Oct 05 '19 at 21:33
1 Answers
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.