Discrete Fourier Transform of generalised Hamming Window

169 Views Asked by At

The generalised Hamming Window is defined as:

$$ w(n) = \begin{cases} \alpha - (1 - \alpha)\cos(2 \pi n /N), & \text{if $ 0 \leq n \leq N$} \\ 0, & \text{otherwise} \end{cases} $$ with $ 0 \leq \alpha \leq 1$.

By using the formula for DFT: $X[k] = \sum_{k = 0}^{N-1} x[n] e^{-2 \pi i n k / N}$ I tried to obtain the DFT of $w(n)$. The problem is that if I plug $w(n)$ into the DFT, rearrange and sum the geometric series, I get the result:

$$ X[k] = \begin{cases} \alpha N, & \text{if $ k = 0 $} \\ 0, & \text{otherwise} \end{cases} + \frac{\alpha-1}{2} \left[ \frac{1 - e^{-2 \pi i (k-1)}}{1 - e^{-2 \pi i (k-1) / N}} + \frac{1 - e^{-2 \pi i (k+1)}}{1 - e^{-2 \pi i (k+1) / N}} \right] $$

However, I keep getting the result $$ X[k] = \begin{cases} \alpha N , & \text{if $ k = 0 $} \\ 0, & \text{otherwise} \end{cases} $$ as the bracket on the right has both numerators equal to zero for all $k$s.

Question: This is definitely not the right result. What is the correct result? Optional: Where did I make a mistake? Thanks!

2

There are 2 best solutions below

2
On BEST ANSWER

Taking the DFT of the generalised Hamming window, leads to $$\begin{align}X[k]&=\sum_{n=0}^{N-1}\left(\alpha-(1-\alpha)\cos\left(\frac{2\pi n }{N}\right)\right)e^{-2\pi ink/N} \\&=\alpha\sum_{n=0}^{N-1} e^{-2\pi ink/N}+\frac{\alpha-1}{2}\sum_{n=0}^{N-1}\left( e^{-2\pi in(k-1)/N}+e^{-2\pi in(k+1)/N}\right)\end{align}$$ Now, similar to what you have done using the sum of $N$ terms of a geometric progression, for non-zero $m$ we have $$\sum_{n=0}^{N-1} e^{-2\pi in m/N}=0$$ However if $m=0$, the sum becomes $$\sum_{n=0}^{N-1} e^{-2\pi in (0)/N}=N$$ so that for integer $m\geq 0$ we can use the Dirac Delta function $\delta(m)$, where $\delta(m)=1$ for $m=0$, but $\delta(m)=0$ for $m>0$. $$\sum_{n=0}^{N-1} e^{-2\pi inm/N}=N\delta(m)$$ Thus the DFT of the Hamming window is $$X[k]=\alpha N\delta(k)+\frac{(\alpha-1)N}{2}(\delta(k-1)+\delta(k+1))$$ where there will be only three values of $k$ for which $X[k]$ will be non-zero:- $$\begin{align}X[0]&=\alpha N \\ X[1]&=\frac{(\alpha-1)N}{2}\\ X[-1]&=X(N-1)=\frac{(\alpha-1)N}{2}\end{align}$$ Note that the modulo $2\pi$ nature of the DFT leads to the value of $k=-1$ being equivalent to $k = N-1$, as we restrict the range of integer $k$ to be from $0$ to $N-1$.

In terms of the mistake, your first sum of the geometric series is not defined for when $(k-1)=0$, as the denominator will be $0$ in addition to the numerator being $0$. In a similar fashion, for the second sum of the geometric series, the denominator will be $0$ when $(k+1)=0$, as well as the numerator. For all other values of $k$, only the numerator will be $0$.

0
On

These geometric series are known as Dirichlet sincs or digital sincs:

$$ \begin{align} \sum_{n=0}^{N-1} e^{-j2\pi n(k-1)/N} = & \,\,\frac {1 - e^{-j2\pi (k-1)}} {1 - e^{-j2\pi(k-1)/N}} \\ = & \,\,\frac { e^{-j\pi(k-1)} \left( e^{j\pi(k-1)} - e^{-j\pi(k-1)} \right) } {e^{-j\pi(k-1)/N} \left( e^{j\pi(k-1)/N} - e^{-j\pi(k-1)/N} \right)} \\ = & \,\,e^{-j\pi (k-1)(N-1)/N} \frac { \sin( \pi(k-1) ) } { \sin (\pi(k-1)/N ) } \end{align} $$