Difference between discrete time fourier transform and discrete fourier transform

  • I have read many articles about DTFT and DFT but am not able to discern the difference between the two except for a few visible things like DTFT goes till infinity while DFT is only till N-1. Can anyone please explain the difference and when to use what? Wiki says

    The DFT differs from the discrete-time Fourier transform (DTFT) in that its input and output sequences are both finite; it is therefore said to be the Fourier analysis of finite-domain (or periodic) discrete-time functions.

    Is it the only difference?

    Edit: This article nicely explains the difference

    The DTFT is a continuous function of frequency, but the DFT is a discrete function of frequency.

    The key point is , `DFT is sampled version of DFT and the rate is the length of DFT`

    @nmxprime You mean DFT is sampled version of DTFT?

    @endolith Yes.it is

    The article you linked (page 2) says that "CTFT gave us a discrete frequency spectrum". Isn't that wrong? I thought frequency was continuous in that case of continuous time aperiodic signal undergoing the Fourier Transform.

  • Deve

    Deve Correct answer

    6 years ago

    The discrete-time Fourier transform (DTFT) is the (conventional) Fourier transform of a discrete-time signal. Its output is continous in frequency and periodic. Example: to find the spectrum of the sampled version $x(kT)$ of a continous-time signal $x(t)$ the DTFT can be used.

    The discrete Fourier transform (DFT) can be seen as the sampled version (in frequency-domain) of the DTFT output. It's used to calculate the frequency spectrum of a discrete-time signal with a computer, because computers can only handle a finite number of values. I would argue against the DFT output being finite. It is periodic as well and can therefore be continued infinitely.

    To sum it up:

                    DTFT                | DFT
           input    discrete, infinite  | discrete, finite *)
           output   contin., periodic   | discrete, finite *)

    *) A mathematical property of the DFT is that both its input and output are periodic with the DFT length $N$. That is, although the input vector to the DFT is finite in practice, it's only correct to say that the DFT is the sampled spectrum if the DFT input is thought to be periodic.

    did you not mean that the DTFT input is *in*finite?

    @LutzL It can be infinite in general, yes. I'll change that. What about the DFT output: would you rather call it *finite* or *periodic*?

    i think output of DFT is N-periodic, finite sequence

    In the DFT, much depends on interpretation. From the technical point of view, it transforms finite to finite. From the point of view that it computes the coefficients of a trigonometric polynomial, one might say that it transforms infinite discrete periodic to finite. But one can shift the window of frequencies used to represent the input, and the amplitudes over all possible frequencies form again a periodic sequence.

    To be more consistent I would put "periodic" instead of "finite" for the input of the DFT. This is a direct consequence of the DFT (output) being discrete.

    If the input to the DFT is assumed to be a finite length window, then to preserve energy (Parseval), the output is also a finite length vector. The window is usually upon a very non periodic signal.

    Thanks for all your comments. I tried to reflect them in my edited post.

    The controversy on DFT , John Baptiste Fourier made all members of the royal society convinced saying the input to DFT is imagined-infinitive. It was the time when Laplace doubted Fourier of his theory

    Mathematical, a fourier transform of a finite signal (in time), will be always infinite. This accures because of the high (up to infinite...) frequencies in the edges of the time signal. In fact, we usually use discrete signals in time, so (again, by mathematical definition) the fourier transform is periodic. Therefore, it's useless to handle with all the infinite periodic transform, so we use only one period. [This is not conflicted with Parseval's theorem because the values in high frequencies are very very low]. As mentioned, DFT can be referred as samples of the continuous DTFT.

  • alright, i'm gonna answer this with an argument that "opponents" to my rigid nazi-like position regarding the DFT have.

    first of all, my rigid, nazi-like position: the DFT and Discrete Fourier Series is one-and-the-same. the DFT maps one infinite and periodic sequence, $x[n]$ with period $N$ in the "time" domain to another infinite and periodic sequence, $X[k]$, again with period $N$, in the "frequency" domain. and the iDFT maps it back. and they're "injective" or "invertible" or "one-to-one".

    DFT: $$ X[k] = \sum\limits_{n=0}^{N-1} x[n] e^{-j 2 \pi nk/N} $$

    iDFT: $$ x[n] = \frac{1}{N} \sum\limits_{k=0}^{N-1} X[k] e^{j 2 \pi nk/N} $$

    that is most fundamentally what the DFT is. it is inherently a periodic or circular thing.

    but the periodicity deniers like to say this about the DFT. it is true, it just doesn't change any of the above.

    so, suppose you had a finite-length sequence $x[n]$ of length $N$ and, instead of periodically extending it (which is what the DFT inherently does), you append this finite-length sequence with zeros infinitely on both left and right. so

    $$ \hat{x}[n] \triangleq \begin{cases} x[n] \qquad & \text{for } 0 \le n \le N-1 \\ \\ 0 & \text{otherwise} \end{cases} $$

    now, this non-repeating infinite sequence does have a DTFT:

    DTFT: $$ \hat{X}\left(e^{j\omega}\right) = \sum\limits_{n=-\infty}^{+\infty} \hat{x}[n] e^{-j \omega n} $$

    $\hat{X}\left(e^{j\omega}\right)$ is the Z-transform of $\hat{x}[n]$ evaluated on the unit circle $z=e^{j\omega}$ for infinitely many real values of $\omega$. now, if you were to sample that DTFT $\hat{X}\left(e^{j\omega}\right)$ at $N$ equally spaced points on the unit circle, with one point at $z=e^{j\omega}=1$, you would get

    $$ \begin{align} \hat{X}\left(e^{j\omega}\right)\Bigg|_{\omega = 2 \pi\frac{k}{N}} & = \sum\limits_{n=-\infty}^{+\infty} \hat{x}[n] e^{-j \omega n} \Bigg|_{\omega = 2 \pi\frac{k}{N}} \\ & = \sum\limits_{n=-\infty}^{+\infty} \hat{x}[n] e^{-j 2 \pi k n/N} \\ & = \sum\limits_{n=0}^{N-1} \hat{x}[n] e^{-j 2 \pi k n/N} \\ & = \sum\limits_{n=0}^{N-1} x[n] e^{-j 2 \pi k n/N} \\ & = X[k] \\ \end{align} $$

    that is precisely how the DFT and DTFT are related. sampling the DTFT at uniform intervals in the "frequency" domain causes, in the "time" domain, the original sequence $\hat{x}[n]$ to be repeated and shifted by all multiples of $N$ and overlap-added. that's what uniform sampling in one domain causes in the other domain. but, since $\hat{x}[n]$ is hypothesized to be $0$ outside of the interval $0 \le n \le N-1$, that overlap-adding does nothing. it just periodically extends the non-zero part of $\hat{x}[n]$, our original finite-length sequence, $x[n]$.

    The accepted answer was good, but I found your answer to be more insightful. Thank you for providing the actual mathematical connection between the DTFT and DFT... especially the sampling of the spectra causing periodicity in the time-domain. That is a point I always forget.

    Your second paragraph seems to imply that DFTs accept input sequences that are infinite in length. Has anyone ever performed an infinite-length DFT?

    hey Rick, it's good to see you here from *comp.dsp*. i remember being greeted by @PeterK when i first sorta migrated over (but i will never leave *comp.dsp*). anyway, to the same degree that the DFS accepts an input sequence of infinite length is the degree that the DFT accepts an input that is of infinite length. all's i'm saying is that the DFT and the DFS are one-and-the-same.

    @robert bristow-johnson. this was a beautiful explanation. my question may be bad but, by discrete fourier series, you are referring to the case where the input is a continuous periodic function that goes on infinitely in both directions, correct ? From what I remember say, from reading george silov's dover book, if you make the number of fourier coefficients large enough by using a fine enough grid of frequencies, then the fourier series can reproduce a period continuous function arbitrarily closely. this is the fs you're referring to, when you say they it is the same as DFT, correct ? thx.

    by Discrete Fourier Series, i mean the same thing as the DFT and iDFT definitions shown in the answer: $$ X[k] = \sum\limits_{n=0}^{N-1} x[n] e^{-j 2 \pi nk/N} $$ $$ x[n] = \frac{1}{N} \sum\limits_{k=0}^{N-1} X[k] e^{j 2 \pi nk/N} $$ and, for both $x[n]$ and $X[k]$, they are periodic with a period $N$: $$ x[n+N] = x[n] \qquad \forall n \in \mathbb{Z} $$ $$ X[k+N] = X[k] \qquad \forall k \in \mathbb{Z} $$ and $N$ is a positive integer. that's all i mean by the DFS.

    o.k. gotcha. the FS that I see is in math books ( atleast the one I have looked at ) uses f(x) because the input is a periodic continuous function rather than sample data but that's probably just semantics when applied to DSP. thanks..

  • Since DTFT output is continuous, it can not be processed with computers. So we have to convert this continuous signal into discrete form. It is nothing but DFT as a further advancement on FFT to reduce calculations.

  • If I am correct, even if DFT input is periodic, although the number of samples is finite, the mathematics behind it treats it as an infinite sequence which periodically commences the N samples after its termination. Please correct me if I am wrong.

    some at *comp.dsp* that i've had arguments with might "correct" you, but they're wrong. there is no difference between the DFT and the Discrete Fourier Series. none whatsoever.

    To help me understand what's being said here, I have a question regarding the output of the operation you call a "Discrete Fourier series". Is that output a sequence of numbers or a continuous function (an equation)?

  • DFT: $$ X[k]=\sum_{n=0}^{N−1} x[n] e^{−j2\pi nk/N} $$ ITS INVERSE WILL BE : $$ x[n]=\frac{1}{N} \sum_{k=0}^{N−1} X[k] e^{j2\pi nk/N} $$

    Please use Latex markup so that your math is readable, and explain a bit more of the process you followed, so that your answer can actually help the OP.

License under CC-BY-SA with attribution

Content dated before 6/26/2020 9:53 AM