Lably
Skip to content

Discrete Fourier transform

Function in discrete mathematics

  • 25 min read
  • 9 chapters

Related on Lably

Through Mathematics, Frequency and Signal

For data sampled at equally spaced points, the DFT can be understood more precisely as converting between sample values and the coefficients of a trigonometric polynomial that interpolates those values. It is therefore a basic tool for numerical work with smooth periodic functions, which can often be approximated well by trigonometric polynomials. In practice, the DFT is usually computed by efficient fast Fourier transform (FFT) algorithms.

The DFT is used in many practical applications of Fourier analysis. In digital signal processing, the input is often a sampled quantity or signal that varies over time, such as the pressure of a sound wave, a radio signal, or daily temperature readings, sampled over a finite time interval (often defined by a window function). In image processing, the samples can be the values of pixels along a row or column of a raster image. The DFT is also used to efficiently solve partial differential equations, and to perform other operations such as convolutions or multiplying large integers.

Since the DFT deals with a finite amount of data, it can be implemented in computers by numerical algorithms or even dedicated hardware. These implementations usually employ efficient fast Fourier transform (FFT) algorithms; so much so that the terms "FFT" and "DFT" are often used interchangeably. Prior to its current usage, the "FFT" initialism may have also been used for the ambiguous term "finite Fourier transform".

Definition

The discrete Fourier transform transforms a sequence of N complex numbers {xn}:=x0,x1,…,xN−1 into another sequence of complex numbers, {Xk}:=X0,X1,…,XN−1, which is defined by:

Discrete Fourier transform

The transform is sometimes denoted by the symbol F, as in X=F{x} or F(x) or Fx.

As a linear transformation on a finite-dimensional vector space, the DFT expression can also be written in terms of a DFT matrix. When scaled appropriately, it becomes a unitary matrix, and the DFT can thus be viewed as a transformation from one orthonormal basis to another.

The inverse transform is given by:

Inverse transform

Eq.2 is also N-periodic (in index n). In Eq.2, each Xk is a complex number whose polar coordinates are the amplitude and phase of a complex sinusoidal component (ei2πkNn) of the function xn. (See Discrete Fourier series.) The sinusoid's frequency is k cycles per N samples.

The normalization factor multiplying the DFT and inverse DFT (IDFT), here 1 and 1N, and the signs of the exponents are the most common conventions. The only actual requirements of these conventions are that the DFT and IDFT have opposite-sign exponents and that the product of their normalization factors be 1N. An uncommon normalization of 1N for both the DFT and IDFT makes the transform-pair unitary.

Eq.1 can also be evaluated outside the domain k∈[0,N−1], and that extended sequence is N-periodic. Accordingly, other sequences of N indices are sometimes used, such as [−N2,N2−1] (if N is even) and [−N−12,N−12] (if N is odd), which amounts to swapping the left and right halves of the result of the transform.

DFT including sampling interval

Using the standard definition of the DFT omits the sampling interval (or sampling distance) Δt in cases where the index corresponds to time via nΔt=t.

To relate the DFT coefficients to the continuous Fourier transform of sampled data, the sampling interval can be included explicitly as

X~k=Δt∑n=0N−1xn⋅e−i2πkNn

Most software libraries compute the unscaled DFT coefficients Xk, including their corresponding FFT implementations. The scaled coefficients can therefore be obtained as X~k=Δt⋅Xk.

The corresponding inverse transform then becomes:

xn=Δf∑k=0N−1X~k⋅ei2πkNn

Where Δf=1ΔtN.

Using the inverse discrete Fourier transform as implemented in most software libraries, this can equivalently be written as:

xn=1ΔtIDFT⁡(X~)

When applying the DFT to physical data, the sampling interval Δt (or equivalently Δf) is an essential part of the signal definition. Including the sampling interval ensures correct amplitude, energy, and frequency interpretation, particularly when combining or comparing data from different sources.

Interpretations

The DFT can be regarded as transforming a finite sequence of equally-spaced samples of a function into a same-length sequence of equally-spaced samples of the discrete-time Fourier transform (DTFT), which is a complex-valued function of frequency. The interval at which the DTFT is sampled is the reciprocal of the duration of the input sequence. An inverse DFT (IDFT) is a Fourier series, using the DTFT samples as coefficients of complex sinusoids at the corresponding DTFT frequencies. It has the same sample-values as the original input sequence. The DFT is therefore said to be a frequency domain representation of the original input sequence. If the original sequence spans all the non-zero values of a function, its DTFT is continuous (and periodic), and the DFT provides discrete samples of one cycle. If the original sequence is one cycle of a periodic function, the DFT provides all the non-zero values of one DTFT cycle.

Eq.1 can be interpreted or derived in various ways, for example:

Sign in to keep reading

8 more chapters are free with a Lably account.

More in Topics in mathematics