1
$\begingroup$

I think I've now read through all of the questions on DFT scaling on this site, and I've still got one more. (I'm sure the knowledge is here somewhere, but I couldn't put together the pieces!) I'm trying to understand the standard DFT scaling through the lens of taking a true DTFT of an infinite length signal, then convolving that result with the DTFT of a window function.

Here's the amplitude-preserving scaling I want to derive: $$\frac{2|X|}{S_1} \quad \texttt{with} \quad S_1 = \sum_{i = 0}^{N - 1} w_i$$

Let's start with a sinusoid with amplitude $A$ in the time domain $A\cos(2\pi f) = \frac{A}{2}e^{i2\pi f} + \frac{A}{2}e^{-i2\pi f}$. The DTFT of this is (using this wonderful answer): $$ \mathcal{F} \{ A \cdot \cos(2\pi f n) \} = \frac{A}{2}(2\pi \delta(\omega - 2\pi f) + 2\pi \delta(\omega + 2\pi f)) $$

  1. Where these are good, old fashioned, infinite height, area 1, sifting-property-having Dirac deltas. Except that I thought there would be an infinite number of copies here in an infinite impulse train. I know this is discussed in the answer I linked, but I couldn't figure it out. This is my first question.

  2. Now let's multiply our signal with a window function, with sum of window coefficients $S_1$. This corresponds to convolving in the frequency domain our pair of deltas with the DTFT of the window. Some easy Python code tells me that $S_1$ is simply the maximum height of the main lobe of the window magnitudes in the frequency domain, but I'm not sure why - there's question 2!

  3. This is good though, because convolving the window with those deltas is going to give me two (mirrored) copies of the window function's lobes centered around $\pm f$. The new maximum heights (in magnitude) of the main lobes will be the product of the coefficients in front of the deltas and the maximum height of the the original main lobe: $S_1 * \frac{A}{2} * 2\pi$. Let's throw away the negative frequencies, as we often do with real signals. Now we want to make sure the height of this is $A$, so we multiply by $2 / S_1$, as in the scaling we were trying to derive. But wait, what about the $2\pi$? That's my question 3.

$\endgroup$

2 Answers 2

1
$\begingroup$
  1. The copies are there, but standard DTFT discussions often only display impulses in one fundamental period $\omega \in [-\pi, \pi]$ or $\omega \in [0, 2\pi]$. Because the DTFT is $2\pi$-periodic, those impulses indeed repeat every $2\pi$

  2. The peak of the window is $\sum w_i$ simply because that's the value of its DTFT at $\omega = 0$. For most common windows, $\omega = 0$ is also where the magnitude is maximal.

  3. It is an artifact of how the continuous-$\omega$ DTFT (and its inverse) is normalized. In the DFT world (finite‐$N$ and discrete in frequency), you typically do not see the explicit factor $2\pi$. It effectively gets “canceled” in the inverse transform or is replaced by a simple $1/N$ in the DFT definitions.

$\endgroup$
7
  • $\begingroup$ 1 and 2 make sense now, thanks! For 3, I figured it was something like that but could you explain in more detail? More specifically: isn't it true that the forward DFT of a signal is equivalent to convolving the forward DTFT of the periodic extension of that signal with the forward DTFT of the window function? I know there's multiple conventions for the DTFT/DFT transforms, but I can't figure out which one would make this make sense. $\endgroup$ Commented Jan 6 at 0:12
  • $\begingroup$ Actually, could you also elaborate on the “wrapping around” you describe in 2.? What’s it wrapping around - the adjacent 2pi periods? $\endgroup$ Commented Jan 6 at 5:29
  • 1
    $\begingroup$ "isn't it true that the forward DFT of a signal..." --> yes, but in the DTFT case it's a linear convolution on continuous frequency, whereas in the DFT world it's a circular convolution on discrete frequency bins. For the $2\pi$ factor disappearing, I'm not 100% confortable with it, but I'll give you my insight: in the DFT, the factor $2\pi$ from the DTFT’s delta impulses “goes away” because we only care about $\omega$ at multiples of $\frac{2\pi}{N}$. The constant $2\pi$ is effectively absorbed into the discrete bin spacing plus the $\frac{1}{N}$ in the inverse DFT definition. $\endgroup$ Commented Jan 6 at 9:09
  • $\begingroup$ For 2, this is the consequence of circular convolution: in the DFT case, multiplication in time domain corresponds to circular convolution in the frequency domain. When you perform a discrete‐frequency convolution of length $N$, any index that goes beyond $k = N-1$ is taken modulo $N$: terms that would naturally "spill over" into $k = N, N+1, \cdots$ get wrapped back into $k = 0, 1, \cdots$ $\endgroup$ Commented Jan 6 at 9:14
  • 1
    $\begingroup$ That’s a lot of questions that can’t be answered in a comment I’m afraid. I’m going to remove these considerations from my answer because they are just mathematical possibilities, corner cases if you will, that would arise from carefully designed windows that showcase that exact behavior. I don’t see any practical use cases off the top of my head. If you’re really interested I’ll try and find the time to answer you in a chat room :) $\endgroup$ Commented Jan 7 at 8:07
1
$\begingroup$

See @Jdip's answer for 1 and 2, but I figured out the explicit answer for 3. and figured I'd write out the details.

First, the short answer:

We have two DTFTs (using radial frequency for simplicity, and with $2\pi$ periodicity implicit as in 1):

$$ X(\omega) = \mathcal{F} \{x[n]\} = \mathcal{F} \{A \cdot \cos(\omega_0 n)\} = \frac{A}{2} \big( 2\pi \delta(\omega_0 - \omega) + 2\pi \delta(\omega_0 + \omega) \big) $$

and the DTFT of the window function $W(\omega) = \mathcal{F} \{w[n]\}$. By the "modulation/windowing theorem" (Oppenheim & Wilsky DTSP equation (2.167)), multiplication in the time domain corresponds to circular convolution in the frequency domain -- normalized by $2\pi$. That is, if $y[n] = x[n]w[n]$ then

$$ Y(\omega) = \frac{1}{2\pi}\int_{-\pi}^{\pi} X(\theta) W(\omega - \theta) \, d\theta $$

Of course, the true details here lie in a proof of the "modulation/windowing theorem."

First, note that by the definition of the DTFT: $$ X(\omega) = \sum_{n=-\infty}^{\infty} x[n] \cdot e^{-j\omega n} $$

The DTFT of $y[n]$ is: $$ Y(\omega) = \sum_{n=-\infty}^{\infty} y[n] \cdot e^{-j\omega n} = \sum_{n=-\infty}^{\infty} x[n] \cdot w[n] \cdot e^{-j\omega n} $$

We can express $w[n]$ as the inverse DTFT of $W(\omega)$: $$ w[n] = \frac{1}{2\pi} \int_{-\pi}^{\pi} W(\theta) \cdot e^{j\theta n} \, d\theta $$

Thus:

$$ Y(\omega) = \sum_{n=-\infty}^{\infty} x[n] \cdot \left( \frac{1}{2\pi} \int_{-\pi}^{\pi} W(\theta) \cdot e^{j\theta n} \, d\theta \right) \cdot e^{-j\omega n} $$

Assuming absolute convergence to interchange the summation and integration:

$$ Y(\omega) = \frac{1}{2\pi} \int_{-\pi}^{\pi} W(\theta) \cdot \left( \sum_{n=-\infty}^{\infty} x[n] \cdot e^{j(\theta - \omega)n} \right) d\theta $$

The term in parentheses is the DTFT of $x[n]$ evaluated at $\omega - \theta$: $$ \sum_{n=-\infty}^{\infty} x[n] \cdot e^{j(\theta - \omega)n} = X(\omega - \theta) $$

Finally, we obtain

$$ Y(\omega) = \frac{1}{2\pi} \int_{-\pi}^{\pi} W(\theta) \cdot X(\omega - \theta) \, d\theta $$

as desired. In conclusion (like @Jdip said), the $2\pi$ factor comes from the definition of the inverse DTFT.

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.