0
$\begingroup$

In the previous question,

Smoothing in frequency domain and impulse reponse of the filter in time-domain

I guess I have made a mistake in-terms for applying windowing to FFT.

After reading "Understanding Digital Signal Processing - Richard G. Lyons" few things are rather very clear now. Nevertheless to be certain I would like to ask whether my understanding is correct or not.

Frequency Domain Windowing is simply given by,

$$X_{\mathrm{three-term}}(m)=\alpha X(m) - \frac{\beta}{2}X(m-1)-\frac{\beta}{2}X(m+1)$$ where, $\alpha$ and $\beta$ are the co-efficients of Hamming window or Hann window.

Further $$X_{\mathrm{three-term}}(0)=\alpha X(0)-\frac{\beta}{2}X(N-1)-\frac{\beta}{2}X(1)$$ and $$X_{\mathrm{three-term}}(N-1)=\alpha X(N-1)-\frac{\beta}{2}X(N-2)-\frac{\beta}{2}X(0)$$

So after taking fft(X(m)), the windowed N-point FFT is simply the above three equations?

All these formulas are from Understanding Digital Signal Processing - Richard G. Lyons and all the credits goes to the author of the book.


Some questions

  • Is Windowed FFT called smoothing?

  • Do I need to do anything else apart from ifft(X_3term(m)) to perform inverse of $X_{\mathrm{three-term}}(m)$?

$\endgroup$
2
$\begingroup$

"Is Windowed FFT called smoothing?" No.

"Do I need to do anything else apart from ifft(X_3term(m)) to perform inverse of Xthree−term(m)" No.

Here is what is going on:

Suppose

$$ X[k] = \sum_{n=0}^{N-1} x[n] e^{-i \frac{2\pi}{N} nk } $$

This is the conventional definition of the DFT which is unnormalized.

Now do the following with it:

$$ \begin{aligned} Y[k] &= \alpha X[k] - \frac{\beta}{2}X[k-1]-\frac{\beta}{2}X[k+1] \\ &= \alpha \sum_{n=0}^{N-1} x[n] e^{-i \frac{2\pi}{N} nk } - \frac{\beta}{2} \sum_{n=0}^{N-1} x[n] e^{-i \frac{2\pi}{N} n(k-1) } - \frac{\beta}{2} \sum_{n=0}^{N-1} x[n] e^{-i \frac{2\pi}{N} n(k+1) } \\ &= \alpha \sum_{n=0}^{N-1} x[n] e^{-i \frac{2\pi}{N} nk } - \frac{\beta}{2} \sum_{n=0}^{N-1} e^{ i \frac{2\pi}{N}n} x[n] e^{-i \frac{2\pi}{N} nk } - \frac{\beta}{2} \sum_{n=0}^{N-1} e^{-i \frac{2\pi}{N}n} x[n] e^{-i \frac{2\pi}{N} nk } \\ &= \sum_{n=0}^{N-1} \left[ \alpha - \frac{\beta}{2} e^{ i \frac{2\pi}{N}n} - \frac{\beta}{2} e^{-i \frac{2\pi}{N}n} \right] x[n] e^{-i \frac{2\pi}{N} nk } \\ &= \sum_{n=0}^{N-1} w[n] x[n] e^{-i \frac{2\pi}{N} nk } \\ \end{aligned} $$

Where

$$ \begin{aligned} w[n] &=\alpha - \frac{\beta}{2} e^{ i \frac{2\pi}{N}n} - \frac{\beta}{2} e^{-i \frac{2\pi}{N}n} \\ &= \alpha - \beta \cos \left( \frac{2\pi}{N}n \right) \\ \end{aligned} $$

So

$$ y[n] = \text{DFT}^{-1} ( Y[k] ) = w[n] \cdot x[n] $$

You might also enjoy:

| improve this answer | |
$\endgroup$
  • $\begingroup$ could be either a Hann window or a Hamming window. depends on the relative values of $\alpha$ and $\beta$. $\endgroup$ – robert bristow-johnson Sep 9 at 4:49
1
$\begingroup$

So after taking fft(X(m)), the windowed N-point FFT is simply the above three equations? X(m) is already in frequency domain. It is the mth value of fft(x(n)) where x(n) is a discrete time signal.

Is windowed FFT called smoothing?

In the context of windowing, smoothing of a signal is done to reduce the spectral leakage caused by the truncation of a signal which is done by multiplying the signal with a rectangular function.

This has explained it in detail: http://www.bores.com/courses/intro/freq/3_stft.htm

Multiplying a signal in time domain is convolution in frequency domain which is what your equation is doing.

| improve this answer | |
$\endgroup$
1
$\begingroup$

Is Windowed FFT called smoothing?

When you say 'Windowed FFT' the first that comes to mind is the window being applied in time domain and then taken FFT so that spectral ringing or leakage, if any, are mitigated. In your case, you are applying the process to FFT samples. The effect is the same - it will smooth out FFT output. $$ X_{3-term}[m] = \alpha X[m] -\frac{\beta}{2}X[m-1] - \frac{\beta}{2}X[m+1] $$ This is kind of adding the effect of window you applied in time domain before computing $X[m]$. It is explained here https://www.embedded.com/dsp-tricks-frequency-domain-windowing/. Because the FFT of generic cosine window (Hann, Hamming) is $$ W[m] = \sum_0^{N-1}(\alpha - \beta\cos(2\pi n/N))e^{-j2\pi nm/N}\\ = \sum_0^{N-1}\alpha e^{-j2\pi nm/N} - \frac{\beta}{2}e^{-j2\pi(m-1)n/N} -\frac{\beta}{2}e^{-j2\pi(m+1)n/N} $$ So you can add the effect of windowing after FFT also for these kind of windows. This is also smoothing but with post-processing (after FFT of un-windowed $x[n]$)

Do I need to do anything else apart from ifft(X_3term(m)) to perform inverse of $X_{three−term(m)}$?

After IFFT, you may nearly get the windowed $x[n]$ but it is valid only for the class of windows of the form $w[n] = \alpha - \beta\cos(2\pi n/N)$ (Hann, Hamming).

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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