Discrete-time Fourier transform

In mathematics, the discrete-time Fourier transform (DTFT) is a form of Fourier analysis that is applicable to a sequence of discrete 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 (DFT) (see ), 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 (FFT) is an algorithm for computing one cycle of the DFT, and its inverse produces one cycle of the inverse DFT.

Relation to Fourier Transform
We begin with a common definition of the Fourier transform integral:


 * $$X(f) \triangleq \int_{-\infty}^\infty x(t)\cdot e^{-i 2\pi ft} dt.$$

This reduces to a summation (see ) when $$x(t)$$ is replaced by a discrete sequence of its samples, $$x(nT),$$ for integer values of $$n.$$ $$dt$$ is also replaced by $$T,$$ leaving:


 * $$X_{1/T}(f) \triangleq \sum_{n=-\infty}^{\infty} \underbrace{T\cdot x(nT)}_{x[n]}\ e^{-i 2\pi f T n},$$

which is a Fourier series in frequency, with periodicity $$1/T.$$ The subscript $$1/T$$ distinguishes it from $$X(f)$$ and from the angular frequency form of the DTFT. I.e., when the frequency variable, $$\omega,$$ has normalized units of radians/sample, the periodicity is $$2\pi,$$ and the Fourier series is:



The utility of the DTFT is rooted in the Poisson summation formula, which tells us that the periodic function represented by the Fourier series is a periodic summation of the Fourier transform:

The integer $$k$$ has units of cycles/sample, and $$1/T$$ is the sample-rate, $$f_s$$ (samples/sec). So $$X_{1/T}(f)$$ comprises exact copies of $$X(f)$$ that are shifted by multiples of $$f_s$$ hertz and combined by addition. For sufficiently large $$f_s$$ the $$k=0$$ term can be observed in the region $$[-f_s/2, f_s/2]$$ with little or no distortion (aliasing) from the other terms. Fig.1 depicts an example where $$1/T$$ is not large enough to prevent aliasing.

We also note that $$e^{-i2\pi fTn}$$ is the Fourier transform of $$\delta(t-nT).$$ Therefore, an alternative definition of DTFT is:

The modulated Dirac comb function is a mathematical abstraction sometimes referred to as impulse sampling.

Inverse transform
An operation that recovers the discrete data sequence from the DTFT function is called an inverse DTFT. For instance, the inverse continuous Fourier transform of both sides of $$ produces the sequence in the form of a modulated Dirac comb function:


 * $$\sum_{n=-\infty}^{\infty} x[n]\cdot \delta(t-n T) = \mathcal{F}^{-1}\left \{X_{1/T}(f)\right\} \ \triangleq \int_{-\infty}^\infty X_{1/T}(f)\cdot e^{i 2 \pi f t} df.$$

However, noting that $$X_{1/T}(f)$$ is periodic, all the necessary information is contained within any interval of length $$1/T.$$ In both $T$ and $f$, the summations over $$n$$ are a Fourier series, with coefficients $$x[n].$$  The standard formulas for the Fourier coefficients are also the inverse transforms:

Periodic data
When the input data sequence $$x[n]$$ is $$N$$-periodic, $$ can be computationally reduced to a discrete Fourier transform (DFT), because:
 * All the available information is contained within $$N$$ samples.
 * $$X_{1/T}(f)$$ converges to zero everywhere except at integer multiples of $$1/(NT),$$ known as harmonic frequencies. At those frequencies, the DTFT diverges at different frequency-dependent rates.  And those rates are given by the DFT of one cycle of the $$x[n]$$ sequence.
 * The DTFT is periodic, so the maximum number of unique harmonic amplitudes is $$(1/T)/(1/(NT)) = N.$$

The DFT of one cycle of the $$x[n]$$ sequence is:


 * $$X[k] \triangleq \underbrace{\sum_{N} x[n]\cdot e^{-i 2 \pi \frac{k}{N}n}}_{\text{any n-sequence of length N}}, \quad k \in \mathbf{Z}.$$

And $$x[n]$$ can be expressed in terms of the inverse transform:


 * $$x[n] = \frac{1}{N} \underbrace{\sum_{N} X[k]\cdot e^{i 2 \pi \frac{k}{N}n}}_{\text{any k-sequence of length N}}, \quad n \in \mathbf{Z}.$$

The inverse DFT is sometimes referred to as a Discrete Fourier series (DFS).



\begin{align} X_{1/T}(f) &\triangleq \sum_{n=-\infty}^{\infty} x[n]\cdot e^{-i 2\pi f nT}\\ &= \sum_{n=-\infty}^{\infty} \left[\frac{1}{N} \sum_{k=0}^{N-1} X[k]\cdot e^{i 2 \pi \frac{k}{N}n}\right] \cdot e^{-i 2\pi f n T}\\ &= \frac{1}{N} \sum_{k=0}^{N-1} X[k] \underbrace{\left[\sum_{n=-\infty}^{\infty} e^{i 2 \pi \frac{k}{N}n} \cdot e^{-i 2\pi f n T}\right]}_{\operatorname{DTFT}\left(e^{i 2 \pi \frac{k}{N}n}\right)}\\ &= \frac{1}{N} \sum_{k=0}^{N-1} X[k] \cdot \frac{1}{T}\sum_{M=-\infty}^\infty \delta \left(f - \tfrac{k}{NT} - \tfrac{M}{T} \right) \end{align} $$

Due to the $$N$$-periodicity of both functions of $$k,$$ this can be simplified to:


 * $$X_{1/T}(f) = \frac{1}{NT} \sum_{k=-\infty}^{\infty} X[k] \cdot \delta\left(f-\frac{k}{NT}\right),$$

which satisfies the inverse transform requirement:


 * $$\begin{align}

x[n] &= T \int_{0}^{\frac{1}{T}} X_{1/T}(f)\cdot e^{i 2 \pi f nT} df\\ &=\frac{1}{N} \sum_{k=-\infty}^\infty X[k] \underbrace{\int_{0}^{\frac{1}{T}} \delta \left(f-\tfrac{k}{NT}\right) e^{i 2 \pi f nT} df}_{\text{zero for } k\ \notin\ [0,N-1]}\\ &=\frac{1}{N} \sum_{k=0}^{N-1} X[k] \int_{0}^{\frac{1}{T}} \delta \left(f-\tfrac{k}{NT}\right) e^{i 2 \pi f nT} df\\ &=\frac{1}{N} \sum_{k=0}^{N-1} X[k]\cdot e^{i 2 \pi \tfrac{k}{NT} nT}\\ &=\frac{1}{N} \sum_{k=0}^{N-1} X[k]\cdot e^{i 2 \pi \tfrac{k}{N} n} \end{align} $$

Sampling the DTFT
When the DTFT is continuous, a common practice is to compute an arbitrary number of samples $$(N)$$ of one cycle of the periodic function $$X_{1/T}$$:



\begin{align} \underbrace{X_{1/T}\left(\frac{k}{NT}\right)}_{X_k} &= \sum_{n=-\infty}^\infty x[n]\cdot e^{-i 2\pi \frac{k}{N}n} \quad \quad k = 0, \dots, N-1 \\ &= \underbrace{\sum_{N} x_{_N}[n]\cdot e^{-i 2\pi \frac{k}{N}n},}_{\text{DFT}}\quad \scriptstyle{\text{(sum over any }n\text{-sequence of length }N)} \end{align} $$

where $$x_{_N}$$ is a periodic summation:


 * $$x_{_N}[n]\ \triangleq\ \sum_{m=-\infty}^{\infty} x[n-mN].$$    (see Discrete Fourier series)

The $$x_{_N}$$ sequence is the inverse DFT. Thus, our sampling of the DTFT causes the inverse transform to become periodic. The array of $$|X_k|^2$$ 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 $$x_{_N}$$ 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\cdot I,$$ for some integer $$I$$ (typically 6 or 8)

A cycle of $$x_{_N}$$ 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 DFT
 * 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 $$x_{_N}$$ 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 ($$x$$) is truncated by 1 coefficient it is called periodic or DFT-even. That is a common practice, but the truncation affects the DTFT (spectral leakage) by a small amount. It is at least of academic interest to characterize that effect. An $$N$$-length DFT of the truncated window produces frequency samples at intervals of $$1/N,$$ instead of $$1/L.$$ The samples are real-valued,   but their values do not exactly match the DTFT of the symmetric window. The periodic summation, $$x_{_N},$$ along with an $$N$$-length DFT, can also be used to sample the DTFT at intervals of $$1/N.$$ Those samples are also real-valued and do exactly match the DTFT (example: File:Sampling the Discrete-time Fourier transform.svg). To use the full symmetric window for spectral analysis at the $$1/N$$ spacing, one would combine the $$n=0$$ and $$n=N$$ data samples (by addition, because the symmetrical window weights them equally) and then apply the truncated symmetric window and the $$N$$-length DFT.



Case: Frequency interpolation. $$L \le N$$

In this case, the DFT simplifies to a more familiar form:


 * $$X_k = \sum_{n=0}^{N-1} x[n]\cdot e^{-i 2\pi \frac{k}{N}n}.$$

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:


 * $$x[n] = e^{i 2\pi \frac{1}{8} n},\quad $$ and $$L=64.$$

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 ).

Convolution
The convolution theorem for sequences is:

An important special case is the circular convolution of sequences $$ and $$ defined by $$x_{_N}*y,$$ where $$x_{_N}$$ is a periodic summation. The discrete-frequency nature of $$\scriptstyle{\rm DTFT} \displaystyle \{x_{_N}\}$$ means that the product with the continuous function $$\scriptstyle{\rm DTFT} \displaystyle \{y\}$$ is also discrete, which results in considerable simplification of the inverse transform:
 * $$x * y\ =\ \scriptstyle{\rm DTFT}^{-1} \displaystyle \left[\scriptstyle{\rm DTFT} \displaystyle \{x\}\cdot \scriptstyle{\rm DTFT} \displaystyle \{y\}\right].$$


 * $$x_{_N} * y\ =\ \scriptstyle{\rm DTFT}^{-1} \displaystyle \left[\scriptstyle{\rm DTFT} \displaystyle \{x_{_N}\}\cdot \scriptstyle{\rm DTFT} \displaystyle \{y\}\right]\ =\ \scriptstyle{\rm DFT}^{-1} \displaystyle \left[\scriptstyle{\rm DFT} \displaystyle \{x_{_N}\}\cdot \scriptstyle{\rm DFT} \displaystyle \{y_{_N}\}\right].$$

For $$ and $$ sequences whose non-zero duration is less than or equal to $$, a final simplification is:


 * $$x_{_N} * y\ =\ \scriptstyle{\rm DFT}^{-1} \displaystyle \left[\scriptstyle{\rm DFT} \displaystyle \{x\}\cdot \scriptstyle{\rm DFT} \displaystyle \{y\}\right].$$

The significance of this result is explained at Circular convolution and Fast convolution algorithms.

Symmetry properties
When the real and imaginary parts of a complex function are decomposed into their even and odd parts, there are four components, denoted below by the subscripts RE, RO, IE, and IO. And there is a one-to-one mapping between the four components of a complex time function and the four components of its complex frequency transform:

$$ \begin{align} \mathsf{Time\ domain} \quad &\ x \quad &= \quad & x_{_{RE}} \quad &+ \quad & x_{_{RO}} \quad &+ \quad i\ & x_{_{IE}} \quad &+ \quad &\underbrace{i\ x_{_{IO}}} \\ &\Bigg\Updownarrow\mathcal{F} & &\Bigg\Updownarrow\mathcal{F} & &\ \ \Bigg\Updownarrow\mathcal{F} & &\ \ \Bigg\Updownarrow\mathcal{F} & &\ \ \Bigg\Updownarrow\mathcal{F}\\ \mathsf{Frequency\ domain} \quad &X \quad &= \quad & X_{RE} \quad &+ \quad &\overbrace{i\ X_{IO}} \quad &+ \quad i\ & X_{IE} \quad &+ \quad & X_{RO} \end{align} $$

From this, various relationships are apparent, for example:
 * The transform of a real-valued function $$(x_{_{RE}}+x_{_{RO}})$$ is the even symmetric function $$X_{RE}+i\ X_{IO}.$$ Conversely, an even-symmetric transform implies a real-valued time-domain.
 * The transform of an imaginary-valued function $$(i\ x_{_{IE}}+i\ x_{_{IO}})$$ is the odd symmetric function $$X_{RO}+i\ X_{IE},$$ and the converse is true.
 * The transform of an even-symmetric function $$(x_{_{RE}}+i\ x_{_{IO}})$$ is the real-valued function $$X_{RE}+X_{RO},$$ and the converse is true.
 * The transform of an odd-symmetric function $$(x_{_{RO}}+i\ x_{_{IE}})$$ is the imaginary-valued function $$i\ X_{IE}+i\ X_{IO},$$ and the converse is true.

Relationship to the Z-transform
$$X_{2\pi}(\omega)$$ is a Fourier series that can also be expressed in terms of the bilateral Z-transform. I.e.:


 * $$X_{2\pi}(\omega) = \left. X_z(z) \, \right|_{z = e^{i \omega}} = X_z(e^{i \omega}),$$

where the $$X_z$$ notation distinguishes the Z-transform from the Fourier transform. Therefore, we can also express a portion of the Z-transform in terms of the Fourier transform:



\begin{align} X_z(e^{i \omega}) &= \ X_{1/T}\left(\tfrac{\omega}{2\pi T}\right) \ = \ \sum_{k=-\infty}^{\infty} X\left(\tfrac{\omega}{2\pi T} - k/T\right)\\ &= \sum_{k=-\infty}^{\infty} X\left(\tfrac{\omega - 2\pi k}{2\pi T} \right). \end{align} $$

Note that when parameter $$ changes, the terms of $$X_{2\pi}(\omega)$$ remain a constant separation $$2 \pi$$ apart, and their width scales up or down. The terms of $e^{i2πn/8}$ remain a constant width and their separation $L = 64$ scales up or down.

Table of discrete-time Fourier transforms
Some common transform pairs are shown in the table below. The following notation applies:

1 & |n|\leq L/2 \\ 0 & |n| > L/2 \end{cases}$$
 * $$\omega=2 \pi f T$$ is a real number representing continuous angular frequency (in radians per sample). ($$f$$ is in cycles/sec, and $$T$$ is in sec/sample.) In all cases in the table, the DTFT is 2π-periodic (in $$\omega$$).
 * $$X_{2\pi}(\omega)$$ designates a function defined on $$-\infty < \omega < \infty $$.
 * $$X_o(\omega)$$ designates a function defined on $$-\pi < \omega \le \pi$$, and zero elsewhere. Then: $$X_{2\pi}(\omega)\ \triangleq \sum_{k=-\infty}^{\infty} X_o(\omega - 2\pi k).$$
 * $$\delta ( \omega )$$ is the Dirac delta function
 * $$\operatorname{sinc} (t)$$ is the normalized sinc function
 * $$\operatorname{rect}\left[{n \over L}\right] \triangleq \begin{cases}
 * $$\operatorname{tri} (t)$$ is the triangle function
 * $$ is an integer representing the discrete-time domain (in samples)
 * $$u[n]$$ is the discrete-time unit step function
 * $$\delta[n]$$ is the Kronecker delta $$\delta_{n,0}$$

Properties
This table shows some mathematical operations in the time domain and the corresponding effects in the frequency domain.
 * $$*\!$$ is the discrete convolution of two sequences
 * $$x[n]^{*}$$ is the complex conjugate of $N = 256$.