fbpx
Wikipedia

Discrete Fourier transform

In mathematics, the discrete Fourier transform (DFT) converts 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 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.

Fig 1: Relationship between the (continuous) Fourier transform and the discrete Fourier transform. Left column: A continuous function (top) and its Fourier transform (bottom). Center-left column: Periodic summation of the original function (top). Fourier transform (bottom) is zero except at discrete points. The inverse transform is a sum of sinusoids called Fourier series. Center-right column: Original function is discretized (multiplied by a Dirac comb) (top). Its Fourier transform (bottom) is a periodic summation (DTFT) of the original transform. Right column: The DFT (bottom) computes discrete samples of the continuous DTFT. The inverse DFT (top) is a periodic summation of the original samples. The FFT algorithm computes one cycle of the DFT and its inverse is one cycle of the DFT inverse.
Fig 2: Depiction of a Fourier transform (upper left) and its periodic summation (DTFT) in the lower left corner. The spectral sequences at (a) upper right and (b) lower right are respectively computed from (a) one cycle of the periodic summation of s(t) and (b) one cycle of the periodic summation of the s(nT) sequence. The respective formulas are (a) the Fourier series integral and (b) the DFT summation. Its similarities to the original transform, S(f), and its relative computational ease are often the motivation for computing a DFT sequence.

The DFT is the most important discrete transform, used to perform Fourier analysis in many practical applications.[1] In digital signal processing, the function is any 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[2]). 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 it 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;[3] 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   into another sequence of complex numbers,   which is defined by

 

 

 

 

 

(Eq.1)

The transform is sometimes denoted by the symbol  , as in   or   or  .[A]

The DFT has many applications, including purely mathematical ones with no physical interpretation. But physically it can be related to signal processing as a discrete version (i.e. samples) of the discrete-time Fourier transform (DTFT), which is a continuous and periodic function. The DFT computes N equally-spaced samples of one cycle of the DTFT. (see Fig.2 and § Sampling the DTFT)

Motivation

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

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

  • It completely describes the discrete-time Fourier transform (DTFT) of an  -periodic sequence, which comprises only discrete frequency components.[B] (Using the DTFT with periodic data)
  • It can also provide uniformly spaced samples of the continuous DTFT of a finite length sequence. (§ Sampling the DTFT)
  • It is the cross correlation of the input sequence,  , and a complex sinusoid at frequency  . Thus it acts like a matched filter for that frequency.
  • It is the discrete analog of the formula for the coefficients of a Fourier series:
     

     

     

     

     

    (Eq.2)

    which is also  -periodic. In the domain n ∈ [0, N − 1], this is the inverse transform of Eq.1. In this interpretation, each   is a complex number that encodes both amplitude and phase of a complex sinusoidal component   of function  . (see Discrete Fourier series) The sinusoid's frequency is k cycles per N samples. Its amplitude and phase are:

     
     
    where atan2 is the two-argument form of the arctan function. In polar form   where cis is the mnemonic for cos + i sin.

The normalization factor multiplying the DFT and IDFT (here 1 and  ) and the signs of the exponents are merely conventions, and differ in some treatments. The only requirements of these conventions are that the DFT and IDFT have opposite-sign exponents and that the product of their normalization factors be  . A normalization of   for both the DFT and IDFT, for instance, makes the transforms unitary. A discrete impulse,   at n = 0 and 0 otherwise; might transform to   for all k (use normalization factors 1 for DFT and   for IDFT). A DC signal,   at k = 0 and 0 otherwise; might inversely transform to   for all   (use   for DFT and 1 for IDFT) which is consistent with viewing DC as the mean average of the signal.

Example

This example demonstrates how to apply the DFT to a sequence of length   and the input vector

 

Calculating the DFT of   using Eq.1

       

results in  

Inverse transform

The discrete Fourier transform is an invertible, linear transformation

 

with   denoting the set of complex numbers. Its inverse is known as Inverse Discrete Fourier Transform (IDFT). In other words, for any  , an N-dimensional complex vector has a DFT and an IDFT which are in turn  -dimensional complex vectors.

The inverse transform is given by:

 

 

 

 

 

(Eq.3)

Properties

Linearity

The DFT is a linear transform, i.e. if   and  , then for any complex numbers  :

 

Time and frequency reversal

Reversing the time (i.e. replacing   by  )[C] in   corresponds to reversing the frequency (i.e.   by  ).[5]: p.421  Mathematically, if   represents the vector x then

if  
then  

Conjugation in time

If   then  .[5]: p.423 

Real and imaginary part

This table shows some mathematical operations on   in the time domain and the corresponding effects on its DFT   in the frequency domain.

Property Time domain
 
Frequency domain
 
Real part in time    
Imaginary part in time    
Real part in frequency    
Imaginary part in frequency    

Orthogonality

The vectors   form an orthogonal basis over the set of N-dimensional complex vectors:

 

where   is the Kronecker delta. (In the last step, the summation is trivial if  , where it is 1 + 1 + ⋯ = N, and otherwise is a geometric series that can be explicitly summed to obtain zero.) This orthogonality condition can be used to derive the formula for the IDFT from the definition of the DFT, and is equivalent to the unitarity property below.

The Plancherel theorem and Parseval's theorem

If   and   are the DFTs of   and   respectively then the Parseval's theorem states:

 

where the star denotes complex conjugation. Plancherel theorem is a special case of the Parseval's theorem and states:

 

These theorems are also equivalent to the unitary condition below.

Periodicity

The periodicity can be shown directly from the definition:

 

Similarly, it can be shown that the IDFT formula leads to a periodic extension.

Shift theorem

Multiplying   by a linear phase   for some integer m corresponds to a circular shift of the output  :   is replaced by  , where the subscript is interpreted modulo N (i.e., periodically). Similarly, a circular shift of the input   corresponds to multiplying the output   by a linear phase. Mathematically, if   represents the vector x then

if  
then  
and  

Circular convolution theorem and cross-correlation theorem

The convolution theorem for the discrete-time Fourier transform (DTFT) indicates that a convolution of two sequences can be obtained as the inverse transform of the product of the individual transforms. An important simplification occurs when one of sequences is N-periodic, denoted here by   because   is non-zero at only discrete frequencies (see DTFT § Periodic data), and therefore so is its product with the continuous function    That leads to a considerable simplification of the inverse transform.

 

where   is a periodic summation of the   sequence:  

Customarily, the DFT and inverse DFT summations are taken over the domain  . Defining those DFTs as   and  , the result is:

 

In practice, the   sequence is usually length N or less, and   is a periodic extension of an N-length  -sequence, which can also be expressed as a circular function:

 

Then the convolution can be written as:

 

which gives rise to the interpretation as a circular convolution of   and  [6][7] It is often used to efficiently compute their linear convolution. (see Circular convolution, Fast convolution algorithms, and Overlap-save)

Similarly, the cross-correlation of   and   is given by:

 


It has been shown [8] that any linear transform that turns convolution into pointwise product is the DFT (up to a permutation of coefficients).

Convolution theorem duality

It can also be shown that:

 
  which is the circular convolution of   and  .

Trigonometric interpolation polynomial

The trigonometric interpolation polynomial

 

where the coefficients Xk are given by the DFT of xn above, satisfies the interpolation property   for  .

For even N, notice that the Nyquist component   is handled specially.

This interpolation is not unique: aliasing implies that one could add N to any of the complex-sinusoid frequencies (e.g. changing   to  ) without changing the interpolation property, but giving different values in between the   points. The choice above, however, is typical because it has two useful properties. First, it consists of sinusoids whose frequencies have the smallest possible magnitudes: the interpolation is bandlimited. Second, if the   are real numbers, then   is real as well.

In contrast, the most obvious trigonometric interpolation polynomial is the one in which the frequencies range from 0 to   (instead of roughly   to   as above), similar to the inverse DFT formula. This interpolation does not minimize the slope, and is not generally real-valued for real  ; its use is a common mistake.

The unitary DFT

Another way of looking at the DFT is to note that in the above discussion, the DFT can be expressed as the DFT matrix, a Vandermonde matrix, introduced by Sylvester in 1867,

 

where   is a primitive Nth root of unity.

For example, in the case when  ,  , and

 

(which is a Hadamard matrix) or when   as in the Discrete Fourier transform § Example above,  , and

 

The inverse transform is then given by the inverse of the above matrix,

 

With unitary normalization constants  , the DFT becomes a unitary transformation, defined by a unitary matrix:

 

where   is the determinant function. The determinant is the product of the eigenvalues, which are always   or   as described below. In a real vector space, a unitary transformation can be thought of as simply a rigid rotation of the coordinate system, and all of the properties of a rigid rotation can be found in the unitary DFT.

The orthogonality of the DFT is now expressed as an orthonormality condition (which arises in many areas of mathematics as described in root of unity):

 

If X is defined as the unitary DFT of the vector x, then

 

and the Parseval's theorem is expressed as

 

If we view the DFT as just a coordinate transformation which simply specifies the components of a vector in a new coordinate system, then the above is just the statement that the dot product of two vectors is preserved under a unitary DFT transformation. For the special case  , this implies that the length of a vector is preserved as well — this is just Plancherel theorem,

 

A consequence of the circular convolution theorem is that the DFT matrix F diagonalizes any circulant matrix.

Expressing the inverse DFT in terms of the DFT

A useful property of the DFT is that the inverse DFT can be easily expressed in terms of the (forward) DFT, via several well-known "tricks". (For example, in computations, it is often convenient to only implement a fast Fourier transform corresponding to one transform direction and then to get the other transform direction from the first.)

First, we can compute the inverse DFT by reversing all but one of the inputs (Duhamel et al., 1988):

 

(As usual, the subscripts are interpreted modulo N; thus, for  , we have  .)

Second, one can also conjugate the inputs and outputs:

 

Third, a variant of this conjugation trick, which is sometimes preferable because it requires no modification of the data values, involves swapping real and imaginary parts (which can be done on a computer simply by modifying pointers). Define   as   with its real and imaginary parts swapped—that is, if   then   is  . Equivalently,   equals  . Then

 

That is, the inverse transform is the same as the forward transform with the real and imaginary parts swapped for both input and output, up to a normalization (Duhamel et al., 1988).

The conjugation trick can also be used to define a new transform, closely related to the DFT, that is involutory—that is, which is its own inverse. In particular,   is clearly its own inverse:  . A closely related involutory transformation (by a factor of  ) is  , since the   factors in   cancel the 2. For real inputs  , the real part of   is none other than the discrete Hartley transform, which is also involutory.

Eigenvalues and eigenvectors

The eigenvalues of the DFT matrix are simple and well-known, whereas the eigenvectors are complicated, not unique, and are the subject of ongoing research.

Consider the unitary form   defined above for the DFT of length N, where

 

This matrix satisfies the matrix polynomial equation:

 

This can be seen from the inverse properties above: operating   twice gives the original data in reverse order, so operating   four times gives back the original data and is thus the identity matrix. This means that the eigenvalues   satisfy the equation:

 

Therefore, the eigenvalues of   are the fourth roots of unity:   is +1, −1, +i, or −i.

Since there are only four distinct eigenvalues for this   matrix, they have some multiplicity. The multiplicity gives the number of linearly independent eigenvectors corresponding to each eigenvalue. (There are N independent eigenvectors; a unitary matrix is never defective.)

The problem of their multiplicity was solved by McClellan and Parks (1972), although it was later shown to have been equivalent to a problem solved by Gauss (Dickinson and Steiglitz, 1982). The multiplicity depends on the value of N modulo 4, and is given by the following table:

Multiplicities of the eigenvalues λ of the unitary DFT matrix U as a function of the transform size N (in terms of an integer m).
size N λ = +1 λ = −1 λ = −i λ = +i
4m m + 1 m m m − 1
4m + 1 m + 1 m m m
4m + 2 m + 1 m + 1 m m
4m + 3 m + 1 m + 1 m + 1 m

Otherwise stated, the characteristic polynomial of   is:

 

No simple analytical formula for general eigenvectors is known. Moreover, the eigenvectors are not unique because any linear combination of eigenvectors for the same eigenvalue is also an eigenvector for that eigenvalue. Various researchers have proposed different choices of eigenvectors, selected to satisfy useful properties like orthogonality and to have "simple" forms (e.g., McClellan and Parks, 1972; Dickinson and Steiglitz, 1982; Grünbaum, 1982; Atakishiyev and Wolf, 1997; Candan et al., 2000; Hanna et al., 2004; Gurevich and Hadani, 2008).

A straightforward approach is to discretize an eigenfunction of the continuous Fourier transform, of which the most famous is the Gaussian function. Since periodic summation of the function means discretizing its frequency spectrum and discretization means periodic summation of the spectrum, the discretized and periodically summed Gaussian function yields an eigenvector of the discrete transform:

  •  

The closed form expression for the series can be expressed by Jacobi theta functions as

  •  

Two other simple closed-form analytical eigenvectors for special DFT period N were found (Kong, 2008):

For DFT period N = 2L + 1 = 4K + 1, where K is an integer, the following is an eigenvector of DFT:

  •  

For DFT period N = 2L = 4K, where K is an integer, the following is an eigenvector of DFT:

  •  

The choice of eigenvectors of the DFT matrix has become important in recent years in order to define a discrete analogue of the fractional Fourier transform—the DFT matrix can be taken to fractional powers by exponentiating the eigenvalues (e.g., Rubio and Santhanam, 2005). For the continuous Fourier transform, the natural orthogonal eigenfunctions are the Hermite functions, so various discrete analogues of these have been employed as the eigenvectors of the DFT, such as the Kravchuk polynomials (Atakishiyev and Wolf, 1997). The "best" choice of eigenvectors to define a fractional discrete Fourier transform remains an open question, however.

Uncertainty principles

Probabilistic uncertainty principle

If the random variable Xk is constrained by

 

then

 

may be considered to represent a discrete probability mass function of n, with an associated probability mass function constructed from the transformed variable,

 

For the case of continuous functions   and  , the Heisenberg uncertainty principle states that

 

where   and   are the variances of   and   respectively, with the equality attained in the case of a suitably normalized Gaussian distribution. Although the variances may be analogously defined for the DFT, an analogous uncertainty principle is not useful, because the uncertainty will not be shift-invariant. Still, a meaningful uncertainty principle has been introduced by Massar and Spindel.[9]

However, the Hirschman entropic uncertainty will have a useful analog for the case of the DFT.[10] The Hirschman uncertainty principle is expressed in terms of the Shannon entropy of the two probability functions.

In the discrete case, the Shannon entropies are defined as

 

and

 

and the entropic uncertainty principle becomes[10]

 

The equality is obtained for   equal to translations and modulations of a suitably normalized Kronecker comb of period   where   is any exact integer divisor of  . The probability mass function   will then be proportional to a suitably translated Kronecker comb of period  .[10]

Deterministic uncertainty principle

There is also a well-known deterministic uncertainty principle that uses signal sparsity (or the number of non-zero coefficients).[11] Let   and   be the number of non-zero elements of the time and frequency sequences   and  , respectively. Then,

 

As an immediate consequence of the inequality of arithmetic and geometric means, one also has  . Both uncertainty principles were shown to be tight for specifically-chosen "picket-fence" sequences (discrete impulse trains), and find practical use for signal recovery applications.[11]

DFT of real and purely imaginary signals

  • If   are real numbers, as they often are in practical applications, then the DFT   is even symmetric:
 , where   denotes complex conjugation.

It follows that for even     and   are real-valued, and the remainder of the DFT is completely specified by just   complex numbers.

  • If   are purely imaginary numbers, then the DFT   is odd symmetric:
 , where   denotes complex conjugation.

Generalized DFT (shifted and non-linear phase)

It is possible to shift the transform sampling in time and/or frequency domain by some real shifts a and b, respectively. This is sometimes known as a generalized DFT (or GDFT), also called the shifted DFT or offset DFT, and has analogous properties to the ordinary DFT:

 

Most often, shifts of   (half a sample) are used. While the ordinary DFT corresponds to a periodic signal in both time and frequency domains,   produces a signal that is anti-periodic in frequency domain ( ) and vice versa for  . Thus, the specific case of   is known as an odd-time odd-frequency discrete Fourier transform (or O2 DFT). Such shifted transforms are most often used for symmetric data, to represent different boundary symmetries, and for real-symmetric data they correspond to different forms of the discrete cosine and sine transforms.

Another interesting choice is  , which is called the centered DFT (or CDFT). The centered DFT has the useful property that, when N is a multiple of four, all four of its eigenvalues (see above) have equal multiplicities (Rubio and Santhanam, 2005)[12]

The term GDFT is also used for the non-linear phase extensions of DFT. Hence, GDFT method provides a generalization for constant amplitude orthogonal block transforms including linear and non-linear phase types. GDFT is a framework to improve time and frequency domain properties of the traditional DFT, e.g. auto/cross-correlations, by the addition of the properly designed phase shaping function (non-linear, in general) to the original linear phase functions (Akansu and Agirman-Tosun, 2010).[13]

The discrete Fourier transform can be viewed as a special case of the z-transform, evaluated on the unit circle in the complex plane; more general z-transforms correspond to complex shifts a and b above.

Multidimensional DFT

The ordinary DFT transforms a one-dimensional sequence or array   that is a function of exactly one discrete variable n. The multidimensional DFT of a multidimensional array   that is a function of d discrete variables   for   in   is defined by:

 

where   as above and the d output indices run from  . This is more compactly expressed in vector notation, where we define   and   as d-dimensional vectors of indices from 0 to  , which we define as  :

 

where the division   is defined as   to be performed element-wise, and the sum denotes the set of nested summations above.

The inverse of the multi-dimensional DFT is, analogous to the one-dimensional case, given by:

 

As the one-dimensional DFT expresses the input   as a superposition of sinusoids, the multidimensional DFT expresses the input as a superposition of plane waves, or multidimensional sinusoids. The direction of oscillation in space is  . The amplitudes are  . This decomposition is of great importance for everything from digital image processing (two-dimensional) to solving partial differential equations. The solution is broken up into plane waves.

The multidimensional DFT can be computed by the composition of a sequence of one-dimensional DFTs along each dimension. In the two-dimensional case   the   independent DFTs of the rows (i.e., along  ) are computed first to form a new array  . Then the   independent DFTs of y along the columns (along  ) are computed to form the final result  . Alternatively the columns can be computed first and then the rows. The order is immaterial because the nested summations above commute.

An algorithm to compute a one-dimensional DFT is thus sufficient to efficiently compute a multidimensional DFT. This approach is known as the row-column algorithm. There are also intrinsically multidimensional FFT algorithms.

The real-input multidimensional DFT

For input data   consisting of real numbers, the DFT outputs have a conjugate symmetry similar to the one-dimensional case above:

 

where the star again denotes complex conjugation and the  -th subscript is again interpreted modulo   (for  ).

Applications

The DFT has seen wide usage across a large number of fields; we only sketch a few examples below (see also the references at the end). All applications of the DFT depend crucially on the availability of a fast algorithm to compute discrete Fourier transforms and their inverses, a fast Fourier transform.

Spectral analysis

 
Discrete transforms embedded in time & space.

When the DFT is used for signal spectral analysis, the   sequence usually represents a finite set of uniformly spaced time-samples of some signal  , where   represents time. The conversion from continuous time to samples (discrete-time) changes the underlying Fourier transform of   into a discrete-time Fourier transform (DTFT), which generally entails a type of distortion called aliasing. Choice of an appropriate sample-rate (see Nyquist rate) is the key to minimizing that distortion. Similarly, the conversion from a very long (or infinite) sequence to a manageable size entails a type of distortion called leakage, which is manifested as a loss of detail (a.k.a. resolution) in the DTFT. Choice of an appropriate sub-sequence length is the primary key to minimizing that effect. When the available data (and time to process it) is more than the amount needed to attain the desired frequency resolution, a standard technique is to perform multiple DFTs, for example to create a spectrogram. If the desired result is a power spectrum and noise or randomness is present in the data, averaging the magnitude components of the multiple DFTs is a useful procedure to reduce the variance of the spectrum (also called a periodogram in this context); two examples of such techniques are the Welch method and the Bartlett method; the general subject of estimating the power spectrum of a noisy signal is called spectral estimation.

A final source of distortion (or perhaps illusion) is the DFT itself, because it is just a discrete sampling of the DTFT, which is a function of a continuous frequency domain. That can be mitigated by increasing the resolution of the DFT. That procedure is illustrated at § Sampling the DTFT.

  • The procedure is sometimes referred to as zero-padding, which is a particular implementation used in conjunction with the fast Fourier transform (FFT) algorithm. The inefficiency of performing multiplications and additions with zero-valued "samples" is more than offset by the inherent efficiency of the FFT.
  • As already stated, leakage imposes a limit on the inherent resolution of the DTFT, so there is a practical limit to the benefit that can be obtained from a fine-grained DFT.

Optics, diffraction, and tomography

The discrete Fourier transform is widely used with spatial frequencies in modeling the way that light, electrons, and other probes travel through optical systems and scatter from objects in two and three dimensions. The dual (direct/reciprocal) vector space of three dimensional objects further makes available a three dimensional reciprocal lattice, whose construction from translucent object shadows (via the Fourier slice theorem) allows tomographic reconstruction of three dimensional objects with a wide range of applications e.g. in modern medicine.

Filter bank

See § FFT filter banks and § Sampling the DTFT.

Data compression

The field of digital signal processing relies heavily on operations in the frequency domain (i.e. on the Fourier transform). For example, several lossy image and sound compression methods employ the discrete Fourier transform: the signal is cut into short segments, each is transformed, and then the Fourier coefficients of high frequencies, which are assumed to be unnoticeable, are discarded. The decompressor computes the inverse transform based on this reduced number of Fourier coefficients. (Compression applications often use a specialized form of the DFT, the discrete cosine transform or sometimes the modified discrete cosine transform.) Some relatively recent compression algorithms, however, use wavelet transforms, which give a more uniform compromise between time and frequency domain than obtained by chopping data into segments and transforming each segment. In the case of JPEG2000, this avoids the spurious image features that appear when images are highly compressed with the original JPEG.

Partial differential equations

Discrete Fourier transforms are often used to solve partial differential equations, where again the DFT is used as an approximation for the Fourier series (which is recovered in the limit of infinite N). The advantage of this approach is that it expands the signal in complex exponentials  , which are eigenfunctions of differentiation:  . Thus, in the Fourier representation, differentiation is simple—we just multiply by  . (However, the choice of   is not unique due to aliasing; for the method to be convergent, a choice similar to that in the trigonometric interpolation section above should be used.) A linear differential equation with constant coefficients is transformed into an easily solvable algebraic equation. One then uses the inverse DFT to transform the result back into the ordinary spatial representation. Such an approach is called a spectral method.

Polynomial multiplication

Suppose we wish to compute the polynomial product c(x) = a(x) · b(x). The ordinary product expression for the coefficients of c involves a linear (acyclic) convolution, where indices do not "wrap around." This can be rewritten as a cyclic convolution by taking the coefficient vectors for a(x) and b(x) with constant term first, then appending zeros so that the resultant coefficient vectors a and b have dimension d > deg(a(x)) + deg(b(x)). Then,

 

Where c is the vector of coefficients for c(x), and the convolution operator   is defined so

 

But convolution becomes multiplication under the DFT:

discrete, fourier, transform, confused, with, discrete, time, fourier, transform, mathematics, discrete, fourier, transform, converts, finite, sequence, equally, spaced, samples, function, into, same, length, sequence, equally, spaced, samples, discrete, time,. Not to be confused with the discrete time Fourier transform In mathematics the discrete Fourier transform DFT converts 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 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 Fig 1 Relationship between the continuous Fourier transform and the discrete Fourier transform Left column A continuous function top and its Fourier transform bottom Center left column Periodic summation of the original function top Fourier transform bottom is zero except at discrete points The inverse transform is a sum of sinusoids called Fourier series Center right column Original function is discretized multiplied by a Dirac comb top Its Fourier transform bottom is a periodic summation DTFT of the original transform Right column The DFT bottom computes discrete samples of the continuous DTFT The inverse DFT top is a periodic summation of the original samples The FFT algorithm computes one cycle of the DFT and its inverse is one cycle of the DFT inverse Fig 2 Depiction of a Fourier transform upper left and its periodic summation DTFT in the lower left corner The spectral sequences at a upper right and b lower right are respectively computed from a one cycle of the periodic summation of s t and b one cycle of the periodic summation of the s nT sequence The respective formulas are a the Fourier series integral and b the DFT summation Its similarities to the original transform S f and its relative computational ease are often the motivation for computing a DFT sequence The DFT is the most important discrete transform used to perform Fourier analysis in many practical applications 1 In digital signal processing the function is any 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 2 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 it 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 3 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 Contents 1 Definition 2 Motivation 3 Example 4 Inverse transform 5 Properties 5 1 Linearity 5 2 Time and frequency reversal 5 3 Conjugation in time 5 4 Real and imaginary part 5 5 Orthogonality 5 6 The Plancherel theorem and Parseval s theorem 5 7 Periodicity 5 8 Shift theorem 5 9 Circular convolution theorem and cross correlation theorem 5 10 Convolution theorem duality 5 11 Trigonometric interpolation polynomial 5 12 The unitary DFT 5 13 Expressing the inverse DFT in terms of the DFT 5 14 Eigenvalues and eigenvectors 5 15 Uncertainty principles 5 15 1 Probabilistic uncertainty principle 5 15 2 Deterministic uncertainty principle 5 16 DFT of real and purely imaginary signals 6 Generalized DFT shifted and non linear phase 7 Multidimensional DFT 7 1 The real input multidimensional DFT 8 Applications 8 1 Spectral analysis 8 2 Optics diffraction and tomography 8 3 Filter bank 8 4 Data compression 8 5 Partial differential equations 8 6 Polynomial multiplication 8 6 1 Multiplication of large integers 8 6 2 Convolution 9 Some discrete Fourier transform pairs 10 Generalizations 10 1 Representation theory 10 2 Other fields 10 3 Other finite groups 11 Alternatives 12 See also 13 Notes 14 References 15 Further reading 16 External linksDefinition EditThe discrete Fourier transform transforms a sequence of N complex numbers x n x 0 x 1 x N 1 displaystyle left mathbf x n right x 0 x 1 ldots x N 1 into another sequence of complex numbers X k X 0 X 1 X N 1 displaystyle left mathbf X k right X 0 X 1 ldots X N 1 which is defined by X k n 0 N 1 x n e i 2 p N k n displaystyle X k sum n 0 N 1 x n cdot e frac i2 pi N kn Eq 1 The transform is sometimes denoted by the symbol F displaystyle mathcal F as in X F x displaystyle mathbf X mathcal F left mathbf x right or F x displaystyle mathcal F left mathbf x right or F x displaystyle mathcal F mathbf x A The DFT has many applications including purely mathematical ones with no physical interpretation But physically it can be related to signal processing as a discrete version i e samples of the discrete time Fourier transform DTFT which is a continuous and periodic function The DFT computes N equally spaced samples of one cycle of the DTFT see Fig 2 and Sampling the DTFT Motivation EditEq 1 can also be evaluated outside the domain k 0 N 1 displaystyle k in 0 N 1 and that extended sequence is N displaystyle N periodic Accordingly other sequences of N displaystyle N indices are sometimes used such as N 2 N 2 1 textstyle left frac N 2 frac N 2 1 right if N displaystyle N is even and N 1 2 N 1 2 textstyle left frac N 1 2 frac N 1 2 right if N displaystyle N is odd which amounts to swapping the left and right halves of the result of the transform 4 Eq 1 can be interpreted or derived in various ways for example It completely describes the discrete time Fourier transform DTFT of an N displaystyle N periodic sequence which comprises only discrete frequency components B Using the DTFT with periodic data It can also provide uniformly spaced samples of the continuous DTFT of a finite length sequence Sampling the DTFT It is the cross correlation of the input sequence x n displaystyle x n and a complex sinusoid at frequency k N textstyle frac k N Thus it acts like a matched filter for that frequency It is the discrete analog of the formula for the coefficients of a Fourier series x n 1 N k 0 N 1 X k e i 2 p k n N n Z displaystyle x n frac 1 N sum k 0 N 1 X k cdot e i2 pi kn N quad n in mathbb Z Eq 2 which is also N displaystyle N periodic In the domain n 0 N 1 this is the inverse transform of Eq 1 In this interpretation each X k displaystyle X k is a complex number that encodes both amplitude and phase of a complex sinusoidal component e i 2 p k n N displaystyle left e i2 pi kn N right of function x n displaystyle x n see Discrete Fourier series The sinusoid s frequency is k cycles per N samples Its amplitude and phase are 1 N X k 1 N Re X k 2 Im X k 2 displaystyle frac 1 N X k frac 1 N sqrt operatorname Re X k 2 operatorname Im X k 2 arg X k atan2 Im X k Re X k i ln X k X k displaystyle arg X k operatorname atan2 big operatorname Im X k operatorname Re X k big i cdot ln left frac X k X k right where atan2 is the two argument form of the arctan function In polar form X k X k e i arg X k X k cis arg X k displaystyle X k X k e i arg X k X k operatorname cis arg X k where cis is the mnemonic for cos i sin The normalization factor multiplying the DFT and IDFT here 1 and 1 N textstyle frac 1 N and the signs of the exponents are merely conventions and differ in some treatments The only requirements of these conventions are that the DFT and IDFT have opposite sign exponents and that the product of their normalization factors be 1 N textstyle frac 1 N A normalization of 1 N textstyle sqrt frac 1 N for both the DFT and IDFT for instance makes the transforms unitary A discrete impulse x n 1 displaystyle x n 1 at n 0 and 0 otherwise might transform to X k 1 displaystyle X k 1 for all k use normalization factors 1 for DFT and 1 N textstyle frac 1 N for IDFT A DC signal X k 1 displaystyle X k 1 at k 0 and 0 otherwise might inversely transform to x n 1 displaystyle x n 1 for all n displaystyle n use 1 N textstyle frac 1 N for DFT and 1 for IDFT which is consistent with viewing DC as the mean average of the signal Example EditThis example demonstrates how to apply the DFT to a sequence of length N 4 displaystyle N 4 and the input vectorx x 0 x 1 x 2 x 3 1 2 i i 1 2 i displaystyle mathbf x begin pmatrix x 0 x 1 x 2 x 3 end pmatrix begin pmatrix 1 2 i i 1 2i end pmatrix Calculating the DFT of x displaystyle mathbf x using Eq 1X 0 e i 2 p 0 0 4 1 e i 2 p 0 1 4 2 i e i 2 p 0 2 4 i e i 2 p 0 3 4 1 2 i 2 displaystyle X 0 e i2 pi 0 cdot 0 4 cdot 1 e i2 pi 0 cdot 1 4 cdot 2 i e i2 pi 0 cdot 2 4 cdot i e i2 pi 0 cdot 3 4 cdot 1 2i 2 X 1 e i 2 p 1 0 4 1 e i 2 p 1 1 4 2 i e i 2 p 1 2 4 i e i 2 p 1 3 4 1 2 i 2 2 i displaystyle X 1 e i2 pi 1 cdot 0 4 cdot 1 e i2 pi 1 cdot 1 4 cdot 2 i e i2 pi 1 cdot 2 4 cdot i e i2 pi 1 cdot 3 4 cdot 1 2i 2 2i X 2 e i 2 p 2 0 4 1 e i 2 p 2 1 4 2 i e i 2 p 2 2 4 i e i 2 p 2 3 4 1 2 i 2 i displaystyle X 2 e i2 pi 2 cdot 0 4 cdot 1 e i2 pi 2 cdot 1 4 cdot 2 i e i2 pi 2 cdot 2 4 cdot i e i2 pi 2 cdot 3 4 cdot 1 2i 2i X 3 e i 2 p 3 0 4 1 e i 2 p 3 1 4 2 i e i 2 p 3 2 4 i e i 2 p 3 3 4 1 2 i 4 4 i displaystyle X 3 e i2 pi 3 cdot 0 4 cdot 1 e i2 pi 3 cdot 1 4 cdot 2 i e i2 pi 3 cdot 2 4 cdot i e i2 pi 3 cdot 3 4 cdot 1 2i 4 4i results in X X 0 X 1 X 2 X 3 2 2 2 i 2 i 4 4 i displaystyle mathbf X begin pmatrix X 0 X 1 X 2 X 3 end pmatrix begin pmatrix 2 2 2i 2i 4 4i end pmatrix Inverse transform EditThe discrete Fourier transform is an invertible linear transformation F C N C N displaystyle mathcal F colon mathbb C N to mathbb C N with C displaystyle mathbb C denoting the set of complex numbers Its inverse is known as Inverse Discrete Fourier Transform IDFT In other words for any N gt 0 displaystyle N gt 0 an N dimensional complex vector has a DFT and an IDFT which are in turn N displaystyle N dimensional complex vectors The inverse transform is given by x n 1 N k 0 N 1 X k e i 2 p N k n displaystyle x n frac 1 N sum k 0 N 1 X k cdot e i frac 2 pi N kn Eq 3 Properties EditLinearity Edit The DFT is a linear transform i e if F x n k X k displaystyle mathcal F x n k X k and F y n k Y k displaystyle mathcal F y n k Y k then for any complex numbers a b displaystyle a b F a x n b y n k a X k b Y k displaystyle mathcal F ax n by n k aX k bY k Time and frequency reversal Edit Reversing the time i e replacing n displaystyle n by N n displaystyle N n C in x n displaystyle x n corresponds to reversing the frequency i e k displaystyle k by N k displaystyle N k 5 p 421 Mathematically if x n displaystyle x n represents the vector x then if F x n k X k displaystyle mathcal F x n k X k then F x N n k X N k displaystyle mathcal F x N n k X N k Conjugation in time Edit If F x n k X k displaystyle mathcal F x n k X k then F x n k X N k displaystyle mathcal F x n k X N k 5 p 423 Real and imaginary part Edit This table shows some mathematical operations on x n displaystyle x n in the time domain and the corresponding effects on its DFT X k displaystyle X k in the frequency domain Property Time domainx n displaystyle x n Frequency domainX k displaystyle X k Real part in time ℜ x n displaystyle Re left x n right 1 2 X k X N k displaystyle frac 1 2 left X k X N k right Imaginary part in time ℑ x n displaystyle Im left x n right 1 2 i X k X N k displaystyle frac 1 2i left X k X N k right Real part in frequency 1 2 x n x N n displaystyle frac 1 2 left x n x N n right ℜ X k displaystyle Re left X k right Imaginary part in frequency 1 2 i x n x N n displaystyle frac 1 2i left x n x N n right ℑ X k displaystyle Im left X k right Orthogonality Edit The vectors u k e i 2 p N k n n 0 1 N 1 T displaystyle u k left left e frac i2 pi N kn right n 0 1 ldots N 1 right mathsf T form an orthogonal basis over the set of N dimensional complex vectors u k T u k n 0 N 1 e i 2 p N k n e i 2 p N k n n 0 N 1 e i 2 p N k k n N d k k displaystyle u k mathsf T u k sum n 0 N 1 left e frac i2 pi N kn right left e frac i2 pi N k n right sum n 0 N 1 e frac i2 pi N k k n N delta kk where d k k displaystyle delta kk is the Kronecker delta In the last step the summation is trivial if k k displaystyle k k where it is 1 1 N and otherwise is a geometric series that can be explicitly summed to obtain zero This orthogonality condition can be used to derive the formula for the IDFT from the definition of the DFT and is equivalent to the unitarity property below The Plancherel theorem and Parseval s theorem Edit If X k displaystyle X k and Y k displaystyle Y k are the DFTs of x n displaystyle x n and y n displaystyle y n respectively then the Parseval s theorem states n 0 N 1 x n y n 1 N k 0 N 1 X k Y k displaystyle sum n 0 N 1 x n y n frac 1 N sum k 0 N 1 X k Y k where the star denotes complex conjugation Plancherel theorem is a special case of the Parseval s theorem and states n 0 N 1 x n 2 1 N k 0 N 1 X k 2 displaystyle sum n 0 N 1 x n 2 frac 1 N sum k 0 N 1 X k 2 These theorems are also equivalent to the unitary condition below Periodicity Edit The periodicity can be shown directly from the definition X k N n 0 N 1 x n e i 2 p N k N n n 0 N 1 x n e i 2 p N k n e i 2 p n 1 n 0 N 1 x n e i 2 p N k n X k displaystyle X k N triangleq sum n 0 N 1 x n e frac i2 pi N k N n sum n 0 N 1 x n e frac i2 pi N kn underbrace e i2 pi n 1 sum n 0 N 1 x n e frac i2 pi N kn X k Similarly it can be shown that the IDFT formula leads to a periodic extension Shift theorem Edit Multiplying x n displaystyle x n by a linear phase e i 2 p N n m displaystyle e frac i2 pi N nm for some integer m corresponds to a circular shift of the output X k displaystyle X k X k displaystyle X k is replaced by X k m displaystyle X k m where the subscript is interpreted modulo N i e periodically Similarly a circular shift of the input x n displaystyle x n corresponds to multiplying the output X k displaystyle X k by a linear phase Mathematically if x n displaystyle x n represents the vector x then if F x n k X k displaystyle mathcal F x n k X k then F x n e i 2 p N n m k X k m displaystyle mathcal F left left x n cdot e frac i2 pi N nm right right k X k m and F x n m k X k e i 2 p N k m displaystyle mathcal F left left x n m right right k X k cdot e frac i2 pi N km Circular convolution theorem and cross correlation theorem Edit Main article Convolution theorem Functions of a discrete variable sequences The convolution theorem for the discrete time Fourier transform DTFT indicates that a convolution of two sequences can be obtained as the inverse transform of the product of the individual transforms An important simplification occurs when one of sequences is N periodic denoted here by y N displaystyle y N because DTFT y N displaystyle scriptstyle text DTFT displaystyle y N is non zero at only discrete frequencies see DTFT Periodic data and therefore so is its product with the continuous function DTFT x displaystyle scriptstyle text DTFT displaystyle x That leads to a considerable simplification of the inverse transform x y N D T F T 1 D T F T x D T F T y N D F T 1 D F T x N D F T y N displaystyle x y N scriptstyle rm DTFT 1 displaystyle left scriptstyle rm DTFT displaystyle x cdot scriptstyle rm DTFT displaystyle y N right scriptstyle rm DFT 1 displaystyle left scriptstyle rm DFT displaystyle x N cdot scriptstyle rm DFT displaystyle y N right where x N displaystyle x N is a periodic summation of the x displaystyle x sequence x N n m x n m N displaystyle x N n triangleq sum m infty infty x n mN Customarily the DFT and inverse DFT summations are taken over the domain 0 N 1 displaystyle 0 N 1 Defining those DFTs as X displaystyle X and Y displaystyle Y the result is x y N n ℓ x ℓ y N n ℓ F 1 D F T 1 X Y n displaystyle x y N n triangleq sum ell infty infty x ell cdot y N n ell underbrace mathcal F 1 rm DFT 1 left X cdot Y right n In practice the x displaystyle x sequence is usually length N or less and y N displaystyle y N is a periodic extension of an N length y displaystyle y sequence which can also be expressed as a circular function y N n p y n p N y n mod N n Z displaystyle y N n sum p infty infty y n pN y n operatorname mod N quad n in mathbb Z Then the convolution can be written as F 1 X Y n ℓ 0 N 1 x ℓ y n ℓ mod N displaystyle mathcal F 1 left X cdot Y right n sum ell 0 N 1 x ell cdot y n ell operatorname mod N which gives rise to the interpretation as a circular convolution of x displaystyle x and y displaystyle y 6 7 It is often used to efficiently compute their linear convolution see Circular convolution Fast convolution algorithms and Overlap save Similarly the cross correlation of x displaystyle x and y N displaystyle y N is given by x y N n ℓ x ℓ y N n ℓ F 1 X Y n displaystyle x star y N n triangleq sum ell infty infty x ell cdot y N n ell mathcal F 1 left X cdot Y right n It has been shown 8 that any linear transform that turns convolution into pointwise product is the DFT up to a permutation of coefficients Convolution theorem duality Edit It can also be shown that F x y k n 0 N 1 x n y n e i 2 p N k n displaystyle mathcal F left mathbf x cdot y right k triangleq sum n 0 N 1 x n cdot y n cdot e i frac 2 pi N kn 1 N X Y N k displaystyle frac 1 N mathbf X Y N k which is the circular convolution of X displaystyle mathbf X and Y displaystyle mathbf Y dd Trigonometric interpolation polynomial Edit The trigonometric interpolation polynomial p t 1 N X 0 X 1 e i 2 p t X N 2 1 e i 2 p N 2 1 t X N 2 cos N p t X N 2 1 e i 2 p N 2 1 t X N 1 e i 2 p t N even 1 N X 0 X 1 e i 2 p t X N 1 2 e i 2 p N 1 t X N 1 2 e i 2 p N 1 t X N 1 e i 2 p t N odd displaystyle p t begin cases frac 1 N left X 0 X 1 e i2 pi t cdots X N 2 1 e i2 pi N 2 1 t X N 2 cos N pi t X N 2 1 e i2 pi N 2 1 t cdots X N 1 e i2 pi t right amp N text even frac 1 N left X 0 X 1 e i2 pi t cdots X N 1 2 e i2 pi N 1 t X N 1 2 e i2 pi N 1 t cdots X N 1 e i2 pi t right amp N text odd end cases where the coefficients Xk are given by the DFT of xn above satisfies the interpolation property p n N x n displaystyle p n N x n for n 0 N 1 displaystyle n 0 ldots N 1 For even N notice that the Nyquist component X N 2 N cos N p t textstyle frac X N 2 N cos N pi t is handled specially This interpolation is not unique aliasing implies that one could add N to any of the complex sinusoid frequencies e g changing e i t displaystyle e it to e i N 1 t displaystyle e i N 1 t without changing the interpolation property but giving different values in between the x n displaystyle x n points The choice above however is typical because it has two useful properties First it consists of sinusoids whose frequencies have the smallest possible magnitudes the interpolation is bandlimited Second if the x n displaystyle x n are real numbers then p t displaystyle p t is real as well In contrast the most obvious trigonometric interpolation polynomial is the one in which the frequencies range from 0 to N 1 displaystyle N 1 instead of roughly N 2 displaystyle N 2 to N 2 displaystyle N 2 as above similar to the inverse DFT formula This interpolation does not minimize the slope and is not generally real valued for real x n displaystyle x n its use is a common mistake The unitary DFT Edit Another way of looking at the DFT is to note that in the above discussion the DFT can be expressed as the DFT matrix a Vandermonde matrix introduced by Sylvester in 1867 F w N 0 0 w N 0 1 w N 0 N 1 w N 1 0 w N 1 1 w N 1 N 1 w N N 1 0 w N N 1 1 w N N 1 N 1 displaystyle mathbf F begin bmatrix omega N 0 cdot 0 amp omega N 0 cdot 1 amp cdots amp omega N 0 cdot N 1 omega N 1 cdot 0 amp omega N 1 cdot 1 amp cdots amp omega N 1 cdot N 1 vdots amp vdots amp ddots amp vdots omega N N 1 cdot 0 amp omega N N 1 cdot 1 amp cdots amp omega N N 1 cdot N 1 end bmatrix where w N e i 2 p N displaystyle omega N e i2 pi N is a primitive Nth root of unity For example in the case when N 2 displaystyle N 2 w N e i p 1 displaystyle omega N e i pi 1 and F 1 1 1 1 displaystyle mathbf F begin bmatrix 1 amp 1 1 amp 1 end bmatrix which is a Hadamard matrix or when N 4 displaystyle N 4 as in the Discrete Fourier transform Example above w N e i p 2 i displaystyle omega N e i pi 2 i and F 1 1 1 1 1 i 1 i 1 1 1 1 1 i 1 I displaystyle mathbf F begin bmatrix 1 amp 1 amp 1 amp 1 1 amp i amp 1 amp i 1 amp 1 amp 1 amp 1 1 amp i amp 1 amp I end bmatrix The inverse transform is then given by the inverse of the above matrix F 1 1 N F displaystyle mathbf F 1 frac 1 N mathbf F With unitary normalization constants 1 N textstyle 1 sqrt N the DFT becomes a unitary transformation defined by a unitary matrix U 1 N F U 1 U det U 1 displaystyle begin aligned mathbf U amp frac 1 sqrt N mathbf F mathbf U 1 amp mathbf U left det mathbf U right amp 1 end aligned where det displaystyle det is the determinant function The determinant is the product of the eigenvalues which are always 1 displaystyle pm 1 or i displaystyle pm i as described below In a real vector space a unitary transformation can be thought of as simply a rigid rotation of the coordinate system and all of the properties of a rigid rotation can be found in the unitary DFT The orthogonality of the DFT is now expressed as an orthonormality condition which arises in many areas of mathematics as described in root of unity m 0 N 1 U k m U m n d k n displaystyle sum m 0 N 1 U km U mn delta kn If X is defined as the unitary DFT of the vector x then X k n 0 N 1 U k n x n displaystyle X k sum n 0 N 1 U kn x n and the Parseval s theorem is expressed as n 0 N 1 x n y n k 0 N 1 X k Y k displaystyle sum n 0 N 1 x n y n sum k 0 N 1 X k Y k If we view the DFT as just a coordinate transformation which simply specifies the components of a vector in a new coordinate system then the above is just the statement that the dot product of two vectors is preserved under a unitary DFT transformation For the special case x y displaystyle mathbf x mathbf y this implies that the length of a vector is preserved as well this is just Plancherel theorem n 0 N 1 x n 2 k 0 N 1 X k 2 displaystyle sum n 0 N 1 x n 2 sum k 0 N 1 X k 2 A consequence of the circular convolution theorem is that the DFT matrix F diagonalizes any circulant matrix Expressing the inverse DFT in terms of the DFT Edit A useful property of the DFT is that the inverse DFT can be easily expressed in terms of the forward DFT via several well known tricks For example in computations it is often convenient to only implement a fast Fourier transform corresponding to one transform direction and then to get the other transform direction from the first First we can compute the inverse DFT by reversing all but one of the inputs Duhamel et al 1988 F 1 x n 1 N F x N n displaystyle mathcal F 1 x n frac 1 N mathcal F x N n As usual the subscripts are interpreted modulo N thus for n 0 displaystyle n 0 we have x N 0 x 0 displaystyle x N 0 x 0 Second one can also conjugate the inputs and outputs F 1 x 1 N F x displaystyle mathcal F 1 mathbf x frac 1 N mathcal F left mathbf x right Third a variant of this conjugation trick which is sometimes preferable because it requires no modification of the data values involves swapping real and imaginary parts which can be done on a computer simply by modifying pointers Define swap x n textstyle operatorname swap x n as x n displaystyle x n with its real and imaginary parts swapped that is if x n a b i displaystyle x n a bi then swap x n textstyle operatorname swap x n is b a i displaystyle b ai Equivalently swap x n textstyle operatorname swap x n equals i x n displaystyle ix n Then F 1 x 1 N swap F swap x displaystyle mathcal F 1 mathbf x frac 1 N operatorname swap mathcal F operatorname swap mathbf x That is the inverse transform is the same as the forward transform with the real and imaginary parts swapped for both input and output up to a normalization Duhamel et al 1988 The conjugation trick can also be used to define a new transform closely related to the DFT that is involutory that is which is its own inverse In particular T x F x N displaystyle T mathbf x mathcal F left mathbf x right sqrt N is clearly its own inverse T T x x displaystyle T T mathbf x mathbf x A closely related involutory transformation by a factor of 1 i 2 textstyle frac 1 i sqrt 2 is H x F 1 i x 2 N displaystyle H mathbf x mathcal F left 1 i mathbf x right sqrt 2N since the 1 i displaystyle 1 i factors in H H x displaystyle H H mathbf x cancel the 2 For real inputs x displaystyle mathbf x the real part of H x displaystyle H mathbf x is none other than the discrete Hartley transform which is also involutory Eigenvalues and eigenvectors Edit The eigenvalues of the DFT matrix are simple and well known whereas the eigenvectors are complicated not unique and are the subject of ongoing research Consider the unitary form U displaystyle mathbf U defined above for the DFT of length N where U m n 1 N w N m 1 n 1 1 N e i 2 p N m 1 n 1 displaystyle mathbf U m n frac 1 sqrt N omega N m 1 n 1 frac 1 sqrt N e frac i2 pi N m 1 n 1 This matrix satisfies the matrix polynomial equation U 4 I displaystyle mathbf U 4 mathbf I This can be seen from the inverse properties above operating U displaystyle mathbf U twice gives the original data in reverse order so operating U displaystyle mathbf U four times gives back the original data and is thus the identity matrix This means that the eigenvalues l displaystyle lambda satisfy the equation l 4 1 displaystyle lambda 4 1 Therefore the eigenvalues of U displaystyle mathbf U are the fourth roots of unity l displaystyle lambda is 1 1 i or i Since there are only four distinct eigenvalues for this N N displaystyle N times N matrix they have some multiplicity The multiplicity gives the number of linearly independent eigenvectors corresponding to each eigenvalue There are N independent eigenvectors a unitary matrix is never defective The problem of their multiplicity was solved by McClellan and Parks 1972 although it was later shown to have been equivalent to a problem solved by Gauss Dickinson and Steiglitz 1982 The multiplicity depends on the value of N modulo 4 and is given by the following table Multiplicities of the eigenvalues l of the unitary DFT matrix U as a function of the transform size N in terms of an integer m size N l 1 l 1 l i l i4m m 1 m m m 14m 1 m 1 m m m4m 2 m 1 m 1 m m4m 3 m 1 m 1 m 1 mOtherwise stated the characteristic polynomial of U displaystyle mathbf U is det l I U l 1 N 4 4 l 1 N 2 4 l i N 1 4 l i N 1 4 displaystyle det lambda I mathbf U lambda 1 left lfloor tfrac N 4 4 right rfloor lambda 1 left lfloor tfrac N 2 4 right rfloor lambda i left lfloor tfrac N 1 4 right rfloor lambda i left lfloor tfrac N 1 4 right rfloor No simple analytical formula for general eigenvectors is known Moreover the eigenvectors are not unique because any linear combination of eigenvectors for the same eigenvalue is also an eigenvector for that eigenvalue Various researchers have proposed different choices of eigenvectors selected to satisfy useful properties like orthogonality and to have simple forms e g McClellan and Parks 1972 Dickinson and Steiglitz 1982 Grunbaum 1982 Atakishiyev and Wolf 1997 Candan et al 2000 Hanna et al 2004 Gurevich and Hadani 2008 A straightforward approach is to discretize an eigenfunction of the continuous Fourier transform of which the most famous is the Gaussian function Since periodic summation of the function means discretizing its frequency spectrum and discretization means periodic summation of the spectrum the discretized and periodically summed Gaussian function yields an eigenvector of the discrete transform F m k Z exp p m N k 2 N displaystyle F m sum k in mathbb Z exp left frac pi cdot m N cdot k 2 N right The closed form expression for the series can be expressed by Jacobi theta functions as F m 1 N ϑ 3 p m N exp p N displaystyle F m frac 1 sqrt N vartheta 3 left frac pi m N exp left frac pi N right right Two other simple closed form analytical eigenvectors for special DFT period N were found Kong 2008 For DFT period N 2L 1 4K 1 where K is an integer the following is an eigenvector of DFT F m s K 1 L cos 2 p N m cos 2 p N s displaystyle F m prod s K 1 L left cos left frac 2 pi N m right cos left frac 2 pi N s right right For DFT period N 2L 4K where K is an integer the following is an eigenvector of DFT F m sin 2 p N m s K 1 L 1 cos 2 p N m cos 2 p N s displaystyle F m sin left frac 2 pi N m right prod s K 1 L 1 left cos left frac 2 pi N m right cos left frac 2 pi N s right right The choice of eigenvectors of the DFT matrix has become important in recent years in order to define a discrete analogue of the fractional Fourier transform the DFT matrix can be taken to fractional powers by exponentiating the eigenvalues e g Rubio and Santhanam 2005 For the continuous Fourier transform the natural orthogonal eigenfunctions are the Hermite functions so various discrete analogues of these have been employed as the eigenvectors of the DFT such as the Kravchuk polynomials Atakishiyev and Wolf 1997 The best choice of eigenvectors to define a fractional discrete Fourier transform remains an open question however Uncertainty principles Edit Probabilistic uncertainty principle Edit If the random variable Xk is constrained by n 0 N 1 X n 2 1 displaystyle sum n 0 N 1 X n 2 1 then P n X n 2 displaystyle P n X n 2 may be considered to represent a discrete probability mass function of n with an associated probability mass function constructed from the transformed variable Q m N x m 2 displaystyle Q m N x m 2 For the case of continuous functions P x displaystyle P x and Q k displaystyle Q k the Heisenberg uncertainty principle states that D 0 X D 0 x 1 16 p 2 displaystyle D 0 X D 0 x geq frac 1 16 pi 2 where D 0 X displaystyle D 0 X and D 0 x displaystyle D 0 x are the variances of X 2 displaystyle X 2 and x 2 displaystyle x 2 respectively with the equality attained in the case of a suitably normalized Gaussian distribution Although the variances may be analogously defined for the DFT an analogous uncertainty principle is not useful because the uncertainty will not be shift invariant Still a meaningful uncertainty principle has been introduced by Massar and Spindel 9 However the Hirschman entropic uncertainty will have a useful analog for the case of the DFT 10 The Hirschman uncertainty principle is expressed in terms of the Shannon entropy of the two probability functions In the discrete case the Shannon entropies are defined as H X n 0 N 1 P n ln P n displaystyle H X sum n 0 N 1 P n ln P n and H x m 0 N 1 Q m ln Q m displaystyle H x sum m 0 N 1 Q m ln Q m and the entropic uncertainty principle becomes 10 H X H x ln N displaystyle H X H x geq ln N The equality is obtained for P n displaystyle P n equal to translations and modulations of a suitably normalized Kronecker comb of period A displaystyle A where A displaystyle A is any exact integer divisor of N displaystyle N The probability mass function Q m displaystyle Q m will then be proportional to a suitably translated Kronecker comb of period B N A displaystyle B N A 10 Deterministic uncertainty principle Edit There is also a well known deterministic uncertainty principle that uses signal sparsity or the number of non zero coefficients 11 Let x 0 displaystyle left x right 0 and X 0 displaystyle left X right 0 be the number of non zero elements of the time and frequency sequences x 0 x 1 x N 1 displaystyle x 0 x 1 ldots x N 1 and X 0 X 1 X N 1 displaystyle X 0 X 1 ldots X N 1 respectively Then N x 0 X 0 displaystyle N leq left x right 0 cdot left X right 0 As an immediate consequence of the inequality of arithmetic and geometric means one also has 2 N x 0 X 0 displaystyle 2 sqrt N leq left x right 0 left X right 0 Both uncertainty principles were shown to be tight for specifically chosen picket fence sequences discrete impulse trains and find practical use for signal recovery applications 11 DFT of real and purely imaginary signals Edit If x 0 x N 1 displaystyle x 0 ldots x N 1 are real numbers as they often are in practical applications then the DFT X 0 X N 1 displaystyle X 0 ldots X N 1 is even symmetric x n R n 0 N 1 X k X k mod N k 0 N 1 displaystyle x n in mathbb R quad forall n in 0 ldots N 1 implies X k X k mod N quad forall k in 0 ldots N 1 where X displaystyle X denotes complex conjugation It follows that for even N displaystyle N X 0 displaystyle X 0 and X N 2 displaystyle X N 2 are real valued and the remainder of the DFT is completely specified by just N 2 1 displaystyle N 2 1 complex numbers If x 0 x N 1 displaystyle x 0 ldots x N 1 are purely imaginary numbers then the DFT X 0 X N 1 displaystyle X 0 ldots X N 1 is odd symmetric x n i R n 0 N 1 X k X k mod N k 0 N 1 displaystyle x n in i mathbb R quad forall n in 0 ldots N 1 implies X k X k mod N quad forall k in 0 ldots N 1 where X displaystyle X denotes complex conjugation Generalized DFT shifted and non linear phase EditIt is possible to shift the transform sampling in time and or frequency domain by some real shifts a and b respectively This is sometimes known as a generalized DFT or GDFT also called the shifted DFT or offset DFT and has analogous properties to the ordinary DFT X k n 0 N 1 x n e i 2 p N k b n a k 0 N 1 displaystyle X k sum n 0 N 1 x n e frac i2 pi N k b n a quad quad k 0 dots N 1 Most often shifts of 1 2 displaystyle 1 2 half a sample are used While the ordinary DFT corresponds to a periodic signal in both time and frequency domains a 1 2 displaystyle a 1 2 produces a signal that is anti periodic in frequency domain X k N X k displaystyle X k N X k and vice versa for b 1 2 displaystyle b 1 2 Thus the specific case of a b 1 2 displaystyle a b 1 2 is known as an odd time odd frequency discrete Fourier transform or O2 DFT Such shifted transforms are most often used for symmetric data to represent different boundary symmetries and for real symmetric data they correspond to different forms of the discrete cosine and sine transforms Another interesting choice is a b N 1 2 displaystyle a b N 1 2 which is called the centered DFT or CDFT The centered DFT has the useful property that when N is a multiple of four all four of its eigenvalues see above have equal multiplicities Rubio and Santhanam 2005 12 The term GDFT is also used for the non linear phase extensions of DFT Hence GDFT method provides a generalization for constant amplitude orthogonal block transforms including linear and non linear phase types GDFT is a framework to improve time and frequency domain properties of the traditional DFT e g auto cross correlations by the addition of the properly designed phase shaping function non linear in general to the original linear phase functions Akansu and Agirman Tosun 2010 13 The discrete Fourier transform can be viewed as a special case of the z transform evaluated on the unit circle in the complex plane more general z transforms correspond to complex shifts a and b above Multidimensional DFT EditThe ordinary DFT transforms a one dimensional sequence or array x n displaystyle x n that is a function of exactly one discrete variable n The multidimensional DFT of a multidimensional array x n 1 n 2 n d displaystyle x n 1 n 2 dots n d that is a function of d discrete variables n ℓ 0 1 N ℓ 1 displaystyle n ell 0 1 dots N ell 1 for ℓ displaystyle ell in 1 2 d displaystyle 1 2 dots d is defined by X k 1 k 2 k d n 1 0 N 1 1 w N 1 k 1 n 1 n 2 0 N 2 1 w N 2 k 2 n 2 n d 0 N d 1 w N d k d n d x n 1 n 2 n d displaystyle X k 1 k 2 dots k d sum n 1 0 N 1 1 left omega N 1 k 1 n 1 sum n 2 0 N 2 1 left omega N 2 k 2 n 2 cdots sum n d 0 N d 1 omega N d k d n d cdot x n 1 n 2 dots n d right right where w N ℓ exp i 2 p N ℓ displaystyle omega N ell exp i2 pi N ell as above and the d output indices run from k ℓ 0 1 N ℓ 1 displaystyle k ell 0 1 dots N ell 1 This is more compactly expressed in vector notation where we define n n 1 n 2 n d displaystyle mathbf n n 1 n 2 dots n d and k k 1 k 2 k d displaystyle mathbf k k 1 k 2 dots k d as d dimensional vectors of indices from 0 to N 1 displaystyle mathbf N 1 which we define as N 1 N 1 1 N 2 1 N d 1 displaystyle mathbf N 1 N 1 1 N 2 1 dots N d 1 X k n 0 N 1 e i 2 p k n N x n displaystyle X mathbf k sum mathbf n mathbf 0 mathbf N 1 e i2 pi mathbf k cdot mathbf n mathbf N x mathbf n where the division n N displaystyle mathbf n mathbf N is defined as n N n 1 N 1 n d N d displaystyle mathbf n mathbf N n 1 N 1 dots n d N d to be performed element wise and the sum denotes the set of nested summations above The inverse of the multi dimensional DFT is analogous to the one dimensional case given by x n 1 ℓ 1 d N ℓ k 0 N 1 e i 2 p n k N X k displaystyle x mathbf n frac 1 prod ell 1 d N ell sum mathbf k mathbf 0 mathbf N 1 e i2 pi mathbf n cdot mathbf k mathbf N X mathbf k As the one dimensional DFT expresses the input x n displaystyle x n as a superposition of sinusoids the multidimensional DFT expresses the input as a superposition of plane waves or multidimensional sinusoids The direction of oscillation in space is k N displaystyle mathbf k mathbf N The amplitudes are X k displaystyle X mathbf k This decomposition is of great importance for everything from digital image processing two dimensional to solving partial differential equations The solution is broken up into plane waves The multidimensional DFT can be computed by the composition of a sequence of one dimensional DFTs along each dimension In the two dimensional case x n 1 n 2 displaystyle x n 1 n 2 the N 1 displaystyle N 1 independent DFTs of the rows i e along n 2 displaystyle n 2 are computed first to form a new array y n 1 k 2 displaystyle y n 1 k 2 Then the N 2 displaystyle N 2 independent DFTs of y along the columns along n 1 displaystyle n 1 are computed to form the final result X k 1 k 2 displaystyle X k 1 k 2 Alternatively the columns can be computed first and then the rows The order is immaterial because the nested summations above commute An algorithm to compute a one dimensional DFT is thus sufficient to efficiently compute a multidimensional DFT This approach is known as the row column algorithm There are also intrinsically multidimensional FFT algorithms The real input multidimensional DFT Edit For input data x n 1 n 2 n d displaystyle x n 1 n 2 dots n d consisting of real numbers the DFT outputs have a conjugate symmetry similar to the one dimensional case above X k 1 k 2 k d X N 1 k 1 N 2 k 2 N d k d displaystyle X k 1 k 2 dots k d X N 1 k 1 N 2 k 2 dots N d k d where the star again denotes complex conjugation and the ℓ displaystyle ell th subscript is again interpreted modulo N ℓ displaystyle N ell for ℓ 1 2 d displaystyle ell 1 2 ldots d Applications EditThe DFT has seen wide usage across a large number of fields we only sketch a few examples below see also the references at the end All applications of the DFT depend crucially on the availability of a fast algorithm to compute discrete Fourier transforms and their inverses a fast Fourier transform Spectral analysis Edit Discrete transforms embedded in time amp space When the DFT is used for signal spectral analysis the x n displaystyle x n sequence usually represents a finite set of uniformly spaced time samples of some signal x t displaystyle x t where t displaystyle t represents time The conversion from continuous time to samples discrete time changes the underlying Fourier transform of x t displaystyle x t into a discrete time Fourier transform DTFT which generally entails a type of distortion called aliasing Choice of an appropriate sample rate see Nyquist rate is the key to minimizing that distortion Similarly the conversion from a very long or infinite sequence to a manageable size entails a type of distortion called leakage which is manifested as a loss of detail a k a resolution in the DTFT Choice of an appropriate sub sequence length is the primary key to minimizing that effect When the available data and time to process it is more than the amount needed to attain the desired frequency resolution a standard technique is to perform multiple DFTs for example to create a spectrogram If the desired result is a power spectrum and noise or randomness is present in the data averaging the magnitude components of the multiple DFTs is a useful procedure to reduce the variance of the spectrum also called a periodogram in this context two examples of such techniques are the Welch method and the Bartlett method the general subject of estimating the power spectrum of a noisy signal is called spectral estimation A final source of distortion or perhaps illusion is the DFT itself because it is just a discrete sampling of the DTFT which is a function of a continuous frequency domain That can be mitigated by increasing the resolution of the DFT That procedure is illustrated at Sampling the DTFT The procedure is sometimes referred to as zero padding which is a particular implementation used in conjunction with the fast Fourier transform FFT algorithm The inefficiency of performing multiplications and additions with zero valued samples is more than offset by the inherent efficiency of the FFT As already stated leakage imposes a limit on the inherent resolution of the DTFT so there is a practical limit to the benefit that can be obtained from a fine grained DFT Optics diffraction and tomography Edit The discrete Fourier transform is widely used with spatial frequencies in modeling the way that light electrons and other probes travel through optical systems and scatter from objects in two and three dimensions The dual direct reciprocal vector space of three dimensional objects further makes available a three dimensional reciprocal lattice whose construction from translucent object shadows via the Fourier slice theorem allows tomographic reconstruction of three dimensional objects with a wide range of applications e g in modern medicine Filter bank Edit See FFT filter banks and Sampling the DTFT Data compression Edit The field of digital signal processing relies heavily on operations in the frequency domain i e on the Fourier transform For example several lossy image and sound compression methods employ the discrete Fourier transform the signal is cut into short segments each is transformed and then the Fourier coefficients of high frequencies which are assumed to be unnoticeable are discarded The decompressor computes the inverse transform based on this reduced number of Fourier coefficients Compression applications often use a specialized form of the DFT the discrete cosine transform or sometimes the modified discrete cosine transform Some relatively recent compression algorithms however use wavelet transforms which give a more uniform compromise between time and frequency domain than obtained by chopping data into segments and transforming each segment In the case of JPEG2000 this avoids the spurious image features that appear when images are highly compressed with the original JPEG Partial differential equations Edit Discrete Fourier transforms are often used to solve partial differential equations where again the DFT is used as an approximation for the Fourier series which is recovered in the limit of infinite N The advantage of this approach is that it expands the signal in complex exponentials e i n x displaystyle e inx which are eigenfunctions of differentiation d e i n x d x i n e i n x displaystyle text d big e inx big text d x ine inx Thus in the Fourier representation differentiation is simple we just multiply by i n displaystyle in However the choice of n displaystyle n is not unique due to aliasing for the method to be convergent a choice similar to that in the trigonometric interpolation section above should be used A linear differential equation with constant coefficients is transformed into an easily solvable algebraic equation One then uses the inverse DFT to transform the result back into the ordinary spatial representation Such an approach is called a spectral method Polynomial multiplication Edit Suppose we wish to compute the polynomial product c x a x b x The ordinary product expression for the coefficients of c involves a linear acyclic convolution where indices do not wrap around This can be rewritten as a cyclic convolution by taking the coefficient vectors for a x and b x with constant term first then appending zeros so that the resultant coefficient vectors a and b have dimension d gt deg a x deg b x Then c a b displaystyle mathbf c mathbf a mathbf b Where c is the vector of coefficients for c x and the convolution operator displaystyle is defined so c n m 0 d 1 a m b n m m o d d n 0 1 d 1 displaystyle c n sum m 0 d 1 a m b n m mathrm mod d qquad qquad qquad n 0 1 dots d 1 But convolution becomes multiplication under the DFT F c F a F b displaystyle mathcal F mathbf c mathcal F mathbf a mathcal F mathbf b span, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.