5

In a recent comment (as I understand it) our colleague OverLordGoldDragon’s stated that the only restrictions on DFT input sequences, to produce valid DFT spectral results, are that (1) the input sample values must be finite in amplitude and (2) finite in length. That sounds sensible to me.

Are there are other restrictions on DFT input sequences necessary to produce valid spectral results?

Richard Lyons
  • 5,777
  • 13
  • 25
  • 3
    What exactly is meant by valid? – Envidia Apr 27 '21 at 17:12
  • @Envida. Such a good question! By "valid spectral results" I mean a resulting spectral sequence upon which we can perform an inverse DFT that reproduces the original forward DFT input sequence. – Richard Lyons Apr 27 '21 at 17:36

2 Answers2

5

The only restriction imposed on the input of the discrete finite dimensional transform DFT (Discrete Fourier Transform) is that the input has finite energy ; i.e., $$\sum_{n=0}^{N-1} |x[n]|^2 < \infty$$

And a necessary & sufficient condition for an $N$-point sequence $x[n]$ to have finite energy is that all of its samples are bounded.

There's no more restriction on the discrete-time sequence $x[n]$ to be transformable into $X[k]$ by means of the linear mapping implied by DFT.

However, I guess, from your previous question, that you want to investigate whether periodicity is a restriction on the input or not? The (my) answer is of course not. DFT works on finite length input, and since it's impossible to tell (by anyone) whether a block of data belongs to one period of a periodic waveform, or it's just the whole data itself, hence it's not possible to restrict the input to be periodic (because it cannot be tested)...

But the DFT algorithm has been designed to operate on one period of periodic inputs. If you evaluate the inverse DFT of a given set of DFT coefficents for all $n$, you can see that data periodically extends outside of the base interval $0 \leq n < N$.

Fat32
  • 28,152
  • 3
  • 24
  • 50
  • 1
    Exactly. This encompasses both conditions of bounded inputs and/or finite length, depending on the signal. Once these conditions are met, the IDFT will always yield the original signal. – Envidia Apr 27 '21 at 17:58
  • 1
    Yes that's true. The inverse DFT will always produce the original input $x[n]$ as the DFT is an invertible transform; i.e, it has unique-input unique-output mapping property, which can only be violated if the input has infinite energy yielding multiple inputs single (infite valued) output; hence not invertible. – Fat32 Apr 27 '21 at 18:04
  • Is this any different from "finite in value and length"? Can't have funny cancellation business with infinities in a finite sum. – OverLordGoldDragon Apr 27 '21 at 19:50
  • Hi Fat32. Thanks for you thoughts. I'm preparing my own "Answer" to my question for your future consideration. – Richard Lyons Apr 28 '21 at 16:08
  • @RichardLyons Hello Mr. Lyons; alright then... – Fat32 Apr 28 '21 at 17:49
  • 1
    @Fat32. Please call me "Rick", as my friends do. (When someone calls me Mr. Lyons I'm always afraid that I owe them money.) – Richard Lyons Apr 28 '21 at 21:43
1

Playing devil's advocate, the "periodists" are right if "spectral" in "valid spectral results" refers to the continuous Fourier transform (but mainly DTFT). Namely:

  • Continuous FT: $\text{DFT}(x[n])$ is a uniform sampling of complete $\mathcal{F}(x(t))$ if $x(t)$ is periodic and infinite (and bandlimited + sampled above Nyquist). The resulting DFT is not periodic (since neither is $\mathcal{F}$).
  • DTFT: $\text{DFT}(x[n])$ is a uniform sampling of one period of $\text{DTFT}(x[n])$ if $x[n]$ is periodic and infinite. The resulting DFT is periodic.

So the "spectrum", or spectral coefficients, can denote vastly different things, all rooted in our choice of basis functions:

  • Continuous FT: continuous complex sinusoids via infinitesimal sum. $X(f_0)$ means integrate $e^{j2\pi f_0 t}$ over all time, $t=-\infty$ to $+\infty$. Then repeat for $X(f_0 + df)$, for all $f$ from $-\infty$ to $+\infty$.
  • DTFT: discrete complex sinusoids via infinitesimal sum. $X(f_0)$ means integrate $e^{j2\pi f_0 n}$ over all time intervals, $n=-\infty$ to $+\infty$. Then repeat for $X(f_0 + df)$, for all $f$ over one period of DTFT.
  • DFT: discrete complex sinusoids via finite sum. $X[k_0]$ means add $e^{j2\pi (n/N)k_0}$ over time intervals $n=0$ to $N-1$, where $N=\text{len(input)}$. Then repeat for $X[k_0 + 1]$, for all $k$ from $0$ to $N-1$.

Notice there's nothing in DFT that guarantees it'll behave like CFT or DTFT. But we can impose it to by extending the basis functions to span from $n=-\infty$ to $+\infty$.

This is an important distinction: infinite periodicty is what we assume, not what DFT assumes.

This grows obvious when working with other inherently finite algorithms like convolutional neural networks. Claiming a kernel does "X" outside of what it's exactly doing is either an inductive prior, or demands proof of equivalence. There is no proof that DFT describes anything outside of its $N$-long input; it's only an assumption we can make.


Put differently... DFT assumes input is periodic if its spectrum is to match CFT's spectrum (sampled) of an infinite periodic $x[n]$. Or simpler, "DFT assumes input is periodic if its spectrum is to be representative of CFT's".


Visual on CFT of $x(t)$ and its sampling $x[n]$ (equivalently DTFT): (from Wavelet Tour ch3)

enter image description here

Uniformly sampling an infinite $f(t)$ amounts to periodizing its Fourier transform. Note there's an alternate interpretation of DTFT basis functions where they're continuous but we integrate over all $f$ instead of just one period. I clarify "bandlimited + sampled above Nyquist" since otherwise periodization yields overlaps and DTFT is no longer simply translated copies of CFT (aka aliasing).

Further, there's an implicit "finite in value" for all mentioned conditions, so the CFT/DTFT-DFT sampling equivalence won't always hold (e.g. $\delta(\omega - \omega_0)$).

OverLordGoldDragon
  • 8,912
  • 5
  • 23
  • 74