page_title: Discrete-time Fourier transform
section_title: Sampling the DTFT
hierarchical_section_title: Discrete-time Fourier transform / Sampling the DTFT
context_page_description: In mathematics, the discrete-time Fourier transform is a form of Fourier analysis that is applicable to a sequence of values.
  The DTFT is often used to analyze samples of a continuous function. The term discrete-time refers to the fact that the transform operates on discrete data, often samples whose interval has units of time. From uniformly spaced samples it produces a function of frequency that is a periodic summation of the continuous Fourier transform of the original continuous function. Under certain theoretical conditions, described by the sampling theorem, the original continuous function can be recovered perfectly from the DTFT and thus from the original discrete samples. The DTFT itself is a continuous function of frequency, but discrete samples of it can be readily calculated via the discrete Fourier transform, which is by far the most common method of modern Fourier analysis.
  Both transforms are invertible. The inverse DTFT is the original sampled data sequence. The inverse DFT is a periodic summation of the original sequence. The fast Fourier transform is an algorithm for computing one cycle of the DFT, and its inverse produces one cycle of the inverse DFT.
context_section_description: When the DTFT is continuous, a common practice is to compute an arbitrary number of samples (N) of one cycle of the periodic function X1/T:
  where  is a periodic summation:
  The  sequence is the inverse DFT.  Thus, our sampling of the DTFT causes the inverse transform to become periodic.  The array of |Xₖ|² values is known as a periodogram, and the parameter N is called NFFT in the Matlab function of the same name.
  In order to evaluate one cycle of  numerically, we require a finite-length x[n] sequence.  For instance, a long sequence might be truncated by a window function of length L resulting in three cases worthy of special mention.  For notational simplicity, consider the x[n] values below to represent the values modified by the window function.
  Case: Frequency decimation.  L = N ⋅ I, for some integer I (typically 6 or 8)
  A cycle of  reduces to a summation of I segments of length N.  The DFT then goes by various names, such as:
  window-presum FFT
  Weight, overlap, add (WOLA)
  polyphase FFT
  polyphase filter bank
  multiple block windowing and time-aliasing.
  Recall that decimation of sampled data in one domain (time or frequency) produces overlap (sometimes known as aliasing) in the other, and vice versa.  Compared to an L-length DFT, the  summation/overlap causes decimation in frequency, leaving only DTFT samples least affected by spectral leakage.  That is usually a priority when implementing an FFT filter-bank (channelizer).  With a conventional window function of length L, scalloping loss would be unacceptable.  So multi-block windows are created using FIR filter design tools.   Their frequency profile is flat at the highest point and falls off quickly at the midpoint between the remaining DTFT samples.  The larger the value of parameter I, the better the potential performance.
  Case: L = N+1.
  When a symmetric, L-length window function () is truncated by 1 coefficient it is called periodic or DFT-even.  The truncation affects the DTFT.  A DFT of the truncated sequence samples the DTFT at frequency intervals of 1/N.  To sample  at the same frequencies, for comparison, the DFT is computed for one cycle of the periodic summation, 
  Case: Frequency interpolation.  L ≤ N
  In this case, the DFT simplifies to a more familiar form:
  In order to take advantage of a fast Fourier transform algorithm for computing the DFT, the summation is usually performed over all N terms, even though N − L of them are zeros.  Therefore, the case L < N is often referred to as zero-padding.
  Spectral leakage, which increases as L decreases, is detrimental to certain important performance metrics, such as resolution of multiple frequency components and the amount of noise measured by each DTFT sample.  But those things don't always matter, for instance when the x[n] sequence is a noiseless sinusoid (or a constant), shaped by a window function.  Then it is a common practice to use zero-padding to graphically display and compare the detailed leakage patterns of window functions.  To illustrate that for a rectangular window, consider the sequence:
   and 
  Figures 2 and 3 are plots of the magnitude of two different sized DFTs, as indicated in their labels.  In both cases, the dominant component is at the signal frequency: f = 1/8 = 0.125.  Also visible in Fig 2 is the spectral leakage pattern of the L = 64 rectangular window.  The illusion in Fig 3 is a result of sampling the DTFT at just its zero-crossings.  Rather than the DTFT of a finite-length sequence, it gives the impression of an infinitely long sinusoidal sequence.  Contributing factors to the illusion are the use of a rectangular window, and the choice of a frequency (1/8 = 8/64) with exactly 8 (an integer) cycles per 64 samples.  A Hann window would produce a similar result, except the peak would be widened to 3 samples (see DFT-even Hann window).
caption: Fig 2. DFT of ei2πn/8 for L = 64 and N = 256
exif: {}