Discrete Fourier transform explained

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.[1]   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.

The DFT is the most important discrete transform, used to perform Fourier analysis in many practical applications. 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). 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; 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".

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)

Definition

The discrete Fourier transform transforms a sequence of N complex numbers

\left\{xn\right\}:=x0,x1,\ldots,xN-1

into another sequence of complex numbers,

\left\{Xk\right\}:=X0,X1,\ldots,XN-1,

which is defined by:

The transform is sometimes denoted by the symbol

l{F}

, as in

X=l{F}\left\{x\right\}

or

l{F}\left(x\right)

or

l{F}x

.

can be interpreted or derived in various ways, for example: can also be evaluated outside the domain

k\in[0,N-1]

, and that extended sequence is

N

-periodic. Accordingly, other sequences of

N

indices are sometimes used, such as \left[-\frac{N}{2}, \frac{N}{2} - 1\right] (if

N

is even) and \left[-\frac{N-1}{2}, \frac{N-1}{2}\right] (if

N

is odd), which amounts to swapping the left and right halves of the result of the transform.

The inverse transform is given by:

. is also

N

-periodic (in index n). In, each

Xk

is a complex number whose polar coordinates are the amplitude and phase of a complex sinusoidal component

\left(ei{N}n}\right)

of function

xn.

(see Discrete Fourier series) The sinusoid's frequency is

k

cycles per

N

samples.

The normalization factor multiplying the DFT and IDFT (here 1 and

\tfrac{1}{N}

) 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

\tfrac{1}{N}.

An uncommon normalization of

\sqrt{\tfrac{1}{N}}

for both the DFT and IDFT makes the transform-pair unitary.

Example

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

N=4

and the input vector

\mathbf =\beginx_0 \\ x_1 \\ x_2 \\ x_3\end=\begin1 \\ 2-i \\ -i \\ -1+2i\end.

Calculating the DFT of

x

using

\beginX_0 &= e^ \cdot 1 + e^ \cdot (2-i) + e^ \cdot (-i) + e^ \cdot (-1+2i) = 2 \\X_1 &= e^ \cdot 1 + e^ \cdot (2-i) + e^ \cdot (-i) + e^ \cdot (-1+2i) = -2-2i \\X_2 &= e^ \cdot 1 + e^ \cdot (2-i) + e^ \cdot (-i) + e^ \cdot (-1+2i) = -2i \\X_3 &= e^ \cdot 1 + e^ \cdot (2-i) + e^ \cdot (-i) + e^ \cdot (-1+2i) = 4+4i\end

results in\mathbf =\beginX_0 \\X_1 \\X_2 \\X_3\end=\begin2 \\-2-2i \\-2i \\4+4i\end.

Properties

Linearity

The DFT is a linear transform, i.e. if

l{F}(\{xn\})k=Xk

and

l{F}(\{yn\})k=Yk

, then for any complex numbers

a,b

:

l{F}(\{axn+byn\})k=aXk+bYk

Time and frequency reversal

Reversing the time (i.e. replacing

n

by

N-n

) in

xn

corresponds to reversing the frequency (i.e.

k

by

N-k

). Mathematically, if

\{xn\}

represents the vector x then

if

l{F}(\{xn\})k=Xk

then

l{F}(\{xN-n\})k=XN-k

Conjugation in time

If

l{F}(\{xn\})k=Xk

then
*
l{F}(\{x
n

\})k=

*
X
N-k
.

Real and imaginary part

This table shows some mathematical operations on

xn

in the time domain and the corresponding effects on its DFT

Xk

in the frequency domain.
PropertyTime domain

xn

Frequency domain

Xk

Real part in time

\operatorname{Re}{\left(xn\right)}

1
2

\left(Xk+

*
X
N-k

\right)

Imaginary part in time

\operatorname{Im}{\left(xn\right)}

1
2i

\left(Xk-

*
X
N-k

\right)

Real part in frequency
1
2

\left(xn+

*
x
N-n

\right)

\operatorname{Re}{\left(Xk\right)}

Imaginary part in frequency
1
2i

\left(xn-

*
x
N-n

\right)

\operatorname{Im}{\left(Xk\right)}

Orthogonality

The vectors

uk=\left[\left.

i2\pi
N
kn
e

\right|n=0,1,\ldots,N-1\right]T

form an orthogonal basis over the set of N-dimensional complex vectors:
T
u
k
*
u
k'

=

N-1
\sum
n=0
i2\pi
N
kn
\left(e

\right)

i2\pi(-k')n
N
\left(e

\right) =

N-1
\sum
n=0
i2\pi
N
(k-k')n
e

=N~\deltakk'

where

\deltakk'

is the Kronecker delta. (In the last step, the summation is trivial if

k=k'

, where it is 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

Xk

and

Yk

are the DFTs of

xn

and

yn

respectively then Parseval's theorem states:
N-1
\sum
n=0

xn

*
y
n

=

1
N
N-1
\sum
k=0

Xk

*
Y
k

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

N-1
\sum
n=0
2
|x
n|

=

1
N
N-1
\sum
k=0
2.
|X
k|

These theorems are also equivalent to the unitary condition below.

Periodicity

The periodicity can be shown directly from the definition:

Xk+N\triangleq

N-1
\sum
n=0

xn

-i2\pi(k+N)n
N
e
N-1
= \sum
n=0

xn

-i2\pikn
N
e

\underbrace{e-i

}_ = \sum_^ x_n e^ = X_k.

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

Shift theorem

Multiplying

xn

by a linear phase
i2\pinm
N
e
for some integer m corresponds to a circular shift of the output

Xk

:

Xk

is replaced by

Xk-m

, where the subscript is interpreted modulo N (i.e., periodically). Similarly, a circular shift of the input

xn

corresponds to multiplying the output

Xk

by a linear phase. Mathematically, if

\{xn\}

represents the vector x then

if

l{F}(\{xn\})k=Xk

then

l{F}\left(\left\{xn

i2\pinm
N
e

\right\}\right)k=Xk-m

and

l{F}\left(\left\{xn-m\right\}\right)k=Xk

-i2\pikm
N
e

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

y
N

,

because

\scriptstyleDTFT\displaystyle

\{y
N

\}

is non-zero at only discrete frequencies (see), and therefore so is its product with the continuous function

\scriptstyleDTFT\displaystyle\{x\}.

  That leads to a considerable simplification of the inverse transform.

x*

y
N

 = \scriptstyle{\rmDTFT}-1\displaystyle\left[\scriptstyle{\rmDTFT}\displaystyle\{x\}\scriptstyle{\rmDTFT}\displaystyle

\{y
N

\}\right] = \scriptstyle{\rmDFT}-1\displaystyle\left[\scriptstyle{\rmDFT}\displaystyle

\{x
N

\}\scriptstyle{\rmDFT}\displaystyle

\{y
N

\}\right],

where

x
N
is a periodic summation of the

x

sequence:
(x
N

)n\triangleq

infty
\sum
m=-infty

x(n-mN).

Customarily, the DFT and inverse DFT summations are taken over the domain

[0,N-1]

. Defining those DFTs as

X

and

Y

, the result is:

(x*

y
N

)n\triangleq

infty
\sum
\ell=-infty

x\ell

(y
N

)n-\ell=\underbrace{l{F}-1

}_ \left \_n.

In practice, the

x

sequence is usually length N or less, and
y
N
is a periodic extension of an N-length

y

-sequence, which can also be expressed as a circular function:
(y
N

)n=

infty
\sum
p=-infty

y(n-pN)=y(n\operatorname{modN)},n\inZ.

Then the convolution can be written as:

which gives rise to the interpretation as a circular convolution of

x

and

y.

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

and
y
N
is given by:

(x\star

y
N

)n\triangleq

infty
\sum
\ell=-infty
*
x
\ell

(y
N

)n+\ell=l{F}-1\left\{X*Y\right\}n.

Uniqueness of the Discrete Fourier Transform

As seen above, the discrete Fourier transform has the fundamental property of carrying convolution into componentwise product. A natural question is whether it is the only one with this ability. It has been shown [2] that any linear transform that turns convolution into pointwise product is the DFT up to a permutation of coefficients. Since the number of permutations of n elements equals n!, there exists exactly n! linear and invertible maps with the same fundamental property as the DFT with respect to convolution.

Convolution theorem duality

It can also be shown that:

l{F}\left\{x ⋅ y\right\}k

N-1
\triangleq \sum
n=0

xnyn

-i
2\pi
N
kn
e
=1
N
(X*YN)
k,
which is the circular convolution of

X

and

Y

.

Trigonometric interpolation polynomial

The trigonometric interpolation polynomial

p(t)=\begin{cases}

1
N

\left[X0+X1ei++XN/2-1ei+XN/2\cos(N\pit)+XN/2+1e-i++XN-1e-i\right] &Neven\\

1
N

\left[X0+X1ei++X(N-1)/2ei+X(N+1)/2e-i++XN-1e-i\right] &Nodd \end{cases}

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

p(n/N)=xn

for

n=0,\ldots,N-1

.

For even N, notice that the Nyquist component \frac \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-it

to

ei(N-1)t

) without changing the interpolation property, but giving different values in between the

xn

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

xn

are real numbers, then

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

(instead of roughly

-N/2

to

+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

xn

; 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,

F= \begin{bmatrix}

0 ⋅ 0
\omega
N

&

0 ⋅ 1
\omega
N

&&

0 ⋅ (N-1)
\omega
N

\\

1 ⋅ 0
\omega
N

&

1 ⋅ 1
\omega
N

&&

1 ⋅ (N-1)
\omega
N

\\ \vdots&\vdots&\ddots&\vdots\\

(N-1) ⋅ 0
\omega
N

&

(N-1) ⋅ 1
\omega
N

&&

(N-1)(N-1)
\omega
N

\\ \end{bmatrix}

where

\omegaN=e-i

is a primitive Nth root of unity.

For example, in the case when

N=2

,

\omegaN=e-i=-1

, and

F= \begin{bmatrix} 1&1\\ 1&-1\\ \end{bmatrix},

(which is a Hadamard matrix) or when

N=4

as in the above,

\omegaN=e-i=-i

, and

F= \begin{bmatrix} 1&1&1&1\\ 1&-i&-1&i\\ 1&-1&1&-1\\ 1&i&-1&-i\\ \end{bmatrix}.

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

F-1=

1
N

F*

With unitary normalization constants 1/\sqrt, the DFT becomes a unitary transformation, defined by a unitary matrix:

\begin{align} U&=

1
\sqrt{N
}\mathbf \\ \mathbf^ &= \mathbf^* \\\left|\det(\mathbf)\right| &= 1\end

where

\det

is the determinant function. The determinant is the product of the eigenvalues, which are always

\pm1

or

\pmi

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

N-1
\sum
m=0

Ukm

*
U
mn

=\deltakn

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

Xk=

N-1
\sum
n=0

Uknxn

and the Parseval's theorem is expressed as

N-1
\sum
n=0

xn

*
y
n

=

N-1
\sum
k=0

Xk

*
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

, this implies that the length of a vector is preserved as well — this is just Plancherel theorem,
N-1
\sum
n=0
2
|x
n|

=

N-1
\sum
k=0
2
|X
k|

A consequence of the circular convolution theorem is that the DFT matrix 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):

l{F}-1(\{xn\})=

1
N

l{F}(\{xN\})

(As usual, the subscripts are interpreted modulo N; thus, for

n=0

, we have

xN-0=x0

.)

Second, one can also conjugate the inputs and outputs:

l{F}-1(x)=

1
N

l{F}\left(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 \operatorname(x_n) as

xn

with its real and imaginary parts swapped—that is, if

xn=a+bi

then \operatorname(x_n) is

b+ai

. Equivalently, \operatorname(x_n) equals

i

*
x
n
. Then

l{F}-1(x)=

1
N

\operatorname{swap}(l{F}(\operatorname{swap}(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)=l{F}\left(x*\right)/\sqrt{N}

is clearly its own inverse:

T(T(x))=x

. A closely related involutory transformation (by a factor of \frac) is

H(x)=l{F}\left((1+i)x*\right)/\sqrt{2N}

, since the

(1+i)

factors in

H(H(x))

cancel the 2. For real inputs

x

, the real part of

H(x)

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. Explicit formulas are given with a significant amount of number theory.[3]

Consider the unitary form

U

defined above for the DFT of length N, where

Um,n=

1{\sqrt{N}}\omega
N

(m-1)(n-1)=

1{\sqrt{N}}e
-i2\pi(m-1)(n-1)
N

.

This matrix satisfies the matrix polynomial equation:

U4=I.

This can be seen from the inverse properties above: operating

U

twice gives the original data in reverse order, so operating

U

four times gives back the original data and is thus the identity matrix. This means that the eigenvalues

λ

satisfy the equation:

λ4=1.

Therefore, the eigenvalues of

U

are the fourth roots of unity:

λ

is +1, −1, +i, or −i.

Since there are only four distinct eigenvalues for this

N x 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 λ 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

U

is:

\det(λI-U)= (λ-1)\left\lfloor{4}\right\rfloor} (λ+1)\left\lfloor{4}\right\rfloor} (λ+i)\left\lfloor{4}\right\rfloor} (λ-i)\left\lfloor{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; Grünbaum, 1982; Atakishiyev and Wolf, 1997; Candan et al., 2000; Hanna et al., 2004; Gurevich and Hadani, 2008).

One method to construct DFT eigenvectors to an eigenvalue

λ

is based on the linear combination of operators:[4] [5] [6]
l{P}
λ=1
4

\left(I-1U-2U2+λ-3U3\right)

For an arbitrary vector

v

, vector

u(λ)=l{P}λv

satisfies:

bf{U}u(λ)=λu(λ)

hence, vector

u(λ)

is, indeed, the eigenvector of DFT matrix

U

. Operators

l{P}λ

project vectors onto subspaces which are orthogonal for each value of

λ

.[5] That is, for two eigenvectors,

u(λ)=l{P}λv

and

u'(λ')=l{P}λ'v'

we have:

u\dagger(λ)u'(λ')=\deltaλλ'u\dagger(λ)v'

However, in general, projection operator method does not produce orthogonal eigenvectors within one subspace.[6] The operator

l{P}λ

can be seen as a matrix, whose columns are eigenvectors of

U

, but they are not orthogonal. When a set of vectors

\{vn\}

n=1,...,Nλ
, spanning

Nλ

-dimensional space (where

Nλ

is the multiplicity of eigenvalue

λ

) is chosen to generate the set of eigenvectors

\{un(λ)=l{P}λvn\}

n=1,...,Nλ
to eigenvalue

λ

, the mutual orthogonality of

un(λ)

is not guaranteed. However, the orthogonal set can be obtained by further applying orthogonalization algorithm to the set

\{un(λ)\}

n=1,...,Nλ
, e.g. Gram-Schmidt process.[7]

A straightforward approach to obtain DFT eigenvectors 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 spectrumand discretization means periodic summation of the spectrum,the discretized and periodically summed Gaussian function yields an eigenvector of the discrete transform:

F(m)=\sumk\inZ\exp\left(-

\pi(m+Nk)2
N

\right).

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

F(m)=

1{\sqrt{N}}\vartheta\exp\left(-
3\left(\pim
N,
\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)=

L
\prod\left[\cos\left(
s=K+1
2\pi
N

m\right)-\cos\left(

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\left(

2\pi
N

m\right)

L-1
\prod\left[\cos\left(
s=K+1
2\pi
N

m\right)-\cos\left(

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

Probabilistic uncertainty principle

If the random variable is constrained by

N-1
\sum
n=0
2
|X
n|

=1,

then

Pn=|X

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

Qm=N

2
|x
m|

.

For the case of continuous functions

P(x)

and

Q(k)

, the Heisenberg uncertainty principle states that

D0(X)D

0(x)\ge1
16\pi2
where

D0(X)

and

D0(x)

are the variances of

|X|2

and

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

However, the Hirschman entropic uncertainty will have a useful analog for the case of the DFT. 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

N-1
H(X)=-\sum
n=0

PnlnPn

and
N-1
H(x)=-\sum
m=0

QmlnQm,

and the entropic uncertainty principle becomes

H(X)+H(x)\geln(N).

The equality is obtained for

Pn

equal to translations and modulations of a suitably normalized Kronecker comb of period

A

where

A

is any exact integer divisor of

N

. The probability mass function

Qm

will then be proportional to a suitably translated Kronecker comb of period

B=N/A

.

Deterministic uncertainty principle

There is also a well-known deterministic uncertainty principle that uses signal sparsity (or the number of non-zero coefficients). Let

\left\|x\right\|0

and

\left\|X\right\|0

be the number of non-zero elements of the time and frequency sequences

x0,x1,\ldots,xN-1

and

X0,X1,\ldots,XN-1

, respectively. Then,

N\leq\left\|x\right\|0\left\|X\right\|0.

As an immediate consequence of the inequality of arithmetic and geometric means, one also has

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.

DFT of real and purely imaginary signals

x0,\ldots,xN-1

are real numbers, as they often are in practical applications, then the DFT

X0,\ldots,XN-1

is even symmetric:

xn\inR\foralln\in\{0,\ldots,N-1\}\impliesXk=

*
X
-k\modN

\forallk\in\{0,\ldots,N-1\}

, where

X*

denotes complex conjugation.

It follows that for even

N

X0

and

XN/2

are real-valued, and the remainder of the DFT is completely specified by just

N/2-1

complex numbers.

x0,\ldots,xN-1

are purely imaginary numbers, then the DFT

X0,\ldots,XN-1

is odd symmetric:

xn\iniR\foralln\in\{0,\ldots,N-1\}\impliesXk=

*
-X
-k\modN

\forallk\in\{0,\ldots,N-1\}

, where

X*

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:

Xk=

N-1
\sum
n=0

xn

-i2\pi(k+b)(n+a)
N
e

k=0,...,N-1.

Most often, shifts of

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

produces a signal that is anti-periodic in frequency domain (

Xk+N=-Xk

) and vice versa for

b=1/2

.Thus, the specific case of

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

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

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

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

xn

that is a function of exactly one discrete variable n. The multidimensional DFT of a multidimensional array
x
n1,n2,...,nd
that is a function of d discrete variables

n\ell=0,1,...,N\ell-1

for

\ell

in

1,2,...,d

is defined by:
X
k1,k2,...,kd

=

N1-1
\sum
n1=0
~k1n1
\left(\omega
N1
N2-1
\sum
n2=0

\left(

~k2n2
\omega
N2

Nd-1
\sum
nd=0
~kdnd
\omega
Nd

x
n1,n2,...,nd

\right)\right),

where

\omega
N\ell

=\exp(-i2\pi/N\ell)

as above and the d output indices run from

k\ell=0,1,...,N\ell-1

. This is more compactly expressed in vector notation, where we define

n=(n1,n2,...,nd)

and

k=(k1,k2,...,kd)

as d-dimensional vectors of indices from 0 to

N-1

, which we define as

N-1=(N1-1,N2-1,...,Nd-1)

:

Xk=

N-1
\sum
n=0

e-ixn,

where the division

n/N

is defined as

n/N=(n1/N1,...,nd/Nd)

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:

xn=

1
d
\prodN\ell
\ell=1
N-1
\sum
k=0

eiXk.

As the one-dimensional DFT expresses the input

xn

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

. The amplitudes are

Xk

. 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
n1,n2
the

N1

independent DFTs of the rows (i.e., along

n2

) are computed first to form a new array
y
n1,k2
. Then the

N2

independent DFTs of y along the columns (along

n1

) are computed to form the final result
X
k1,k2
. 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

x
n1,n2,...,nd
consisting of real numbers, the DFT outputs have a conjugate symmetry similar to the one-dimensional case above:
X
k1,k2,...,kd

=

*
X
N1-k1,N2-k2,...,Nd-kd

,

where the star again denotes complex conjugation and the

\ell

-th subscript is again interpreted modulo

N\ell

(for

\ell=1,2,\ldots,d

).

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

When the DFT is used for signal spectral analysis, the

\{xn\}

sequence usually represents a finite set of uniformly spaced time-samples of some signal

x(t)

, where

t

represents time. The conversion from continuous time to samples (discrete-time) changes the underlying Fourier transform of

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 .

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

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

einx

, which are eigenfunctions of differentiation:

{d(einx)}/dx=ineinx

. Thus, in the Fourier representation, differentiation is simple—we just multiply by

in

. (However, the choice of

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

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 . Then,

c=a*b

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

*

is defined so

cn=

d-1
\sum
m=0

ambn-mmodd          n=0,1...,d-1

But convolution becomes multiplication under the DFT:

l{F}(c)=l{F}(a)l{F}(b)

Here the vector product is taken elementwise. Thus the coefficients of the product polynomial c(x) are just the terms 0, ..., deg(a(x)) + deg(b(x)) of the coefficient vector

c=l{F}-1(l{F}(a)l{F}(b)).

With a fast Fourier transform, the resulting algorithm takes O(N log N) arithmetic operations. Due to its simplicity and speed, the Cooley–Tukey FFT algorithm, which is limited to composite sizes, is often chosen for the transform operation. In this case, d should be chosen as the smallest integer greater than the sum of the input polynomial degrees that is factorizable into small prime factors (e.g. 2, 3, and 5, depending upon the FFT implementation).

Multiplication of large integers

The fastest known algorithms for the multiplication of very large integers use the polynomial multiplication method outlined above. Integers can be treated as the value of a polynomial evaluated specifically at the number base, with the coefficients of the polynomial corresponding to the digits in that base (ex.

123=1102+2101+3100

). After polynomial multiplication, a relatively low-complexity carry-propagation step completes the multiplication.

Convolution

When data is convolved with a function with wide support, such as for downsampling by a large sampling ratio, because of the Convolution theorem and the FFT algorithm, it may be faster to transform it, multiply pointwise by the transform of the filter and then reverse transform it. Alternatively, a good filter is obtained by simply truncating the transformed data and re-transforming the shortened data set.

Some discrete Fourier transform pairs

Some DFT pairs

xn=

1
N
N-1
\sum
k=0

Xkei

Xk=

N-1
\sum
n=0

xne-i

Note

xnei

Xk-\ell

Frequency shift theorem

xn-\ell

Xke-i

Time shift theorem

xn\inR

Xk=X

*
N-k
Real DFT

an

\left\{\begin{matrix} N&ifa=ei\\

1-aN
1-ae-i

&otherwise \end{matrix}\right.

| from the geometric progression formula|-|

{N-1\choosen}

|

\left(1+e-i\right)N-1

| from the binomial theorem|-|

\left\{\begin{matrix}

1
W

&if2n<Wor2(N-n)<W\\ 0&otherwise \end{matrix}\right.

|

\left\{\begin{matrix} 1&ifk=0\\

\sin\left(\piWk\right)
N
W
\sin\left(\pik
N
\right)

&otherwise \end{matrix}\right.

|

xn

is a rectangular window function of W points centered on n=0, where W is an odd integer, and

Xk

is a sinc-like function (specifically,

Xk

is a Dirichlet kernel)|-|

\sumj\inZ\exp\left(-

\pi
cN

(n+Nj)2\right)

|

\sqrt{cN}\sumj\inZ\exp\left(-

\pic
N

(k+Nj)2\right)

| Discretization and periodic summation of the scaled Gaussian functions for

c>0

. Since either

c

or
1
c
is larger than one and thus warrants fast convergence of one of the two series, for large

c

you may choose to compute the frequency spectrum and convert to the time domain using the discrete Fourier transform.|}

Generalizations

Representation theory

The DFT can be interpreted as a complex-valued representation of the finite cyclic group. In other words, a sequence of

n

complex numbers can be thought of as an element of

n

-dimensional complex space

Cn

or equivalently a function

f

from the finite cyclic group of order

n

to the complex numbers,

Zn\mapstoC

. So

f

is a class function on the finite cyclic group, and thus can be expressed as a linear combination of the irreducible characters of this group, which are the roots of unity.

From this point of view, one may generalize the DFT to representation theory generally, or more narrowly to the representation theory of finite groups.

More narrowly still, one may generalize the DFT by either changing the target (taking values in a field other than the complex numbers), or the domain (a group other than a finite cyclic group), as detailed in the sequel.

Other fields

See main article: Discrete Fourier transform (general). Many of the properties of the DFT only depend on the fact that

-i2\pi
N
e
is a primitive root of unity, sometimes denoted

\omegaN

or

WN

(so that
N
\omega
N

=1

). Such properties include the completeness, orthogonality, Plancherel/Parseval, periodicity, shift, convolution, and unitarity properties above, as well as many FFT algorithms. For this reason, the discrete Fourier transform can be defined by using roots of unity in fields other than the complex numbers, and such generalizations are commonly called number-theoretic transforms (NTTs) in the case of finite fields. For more information, see number-theoretic transform and discrete Fourier transform (general).

Other finite groups

See main article: Fourier transform on finite groups. The standard DFT acts on a sequence x0, x1, ..., xN-1 of complex numbers, which can be viewed as a function → C. The multidimensional DFT acts on multidimensional sequences, which can be viewed as functions

\{0,1,\ldots,N1-1\} x x \{0,1,\ldots,Nd-1\}\toC.

This suggests the generalization to Fourier transforms on arbitrary finite groups, which act on functions GC where G is a finite group. In this framework, the standard DFT is seen as the Fourier transform on a cyclic group, while the multidimensional DFT is a Fourier transform on a direct sum of cyclic groups.

Further, Fourier transform can be on cosets of a group.

Alternatives

See main article: Discrete wavelet transform. There are various alternatives to the DFT for various applications, prominent among which are wavelets. The analog of the DFT is the discrete wavelet transform (DWT). From the point of view of time–frequency analysis, a key limitation of the Fourier transform is that it does not include location information, only frequency information, and thus has difficulty in representing transients. As wavelets have location as well as frequency, they are better able to represent location, at the expense of greater difficulty representing frequency. For details, see comparison of the discrete wavelet transform with the discrete Fourier transform.

See also

Further reading

  • Book: Brigham, E. Oran . The fast Fourier transform and its applications . Englewood Cliffs, N.J. . Prentice Hall . 1988 . 978-0-13-307505-2 .
  • Book: Smith, Steven W. . http://www.dspguide.com/ch8/1.htm . The Scientist and Engineer's Guide to Digital Signal Processing . Second . San Diego, Calif. . California Technical Publishing . 1999 . 978-0-9660176-3-2 . Chapter 8: The Discrete Fourier Transform.
  • Book: Cormen, Thomas H. . Thomas H. Cormen . Charles E. Leiserson . Ronald L. Rivest . Ronald L. Rivest . Clifford Stein . Clifford Stein . 2001 . Introduction to Algorithms . Second . MIT Press and McGraw-Hill . 978-0-262-03293-3 . Chapter 30: Polynomials and the FFT . 822–848 . Introduction to Algorithms . Charles E. Leiserson . esp. section 30.2: The DFT and FFT, pp. 830–838.
  • P. Duhamel . B. Piron . J. M. Etcheto . On computing the inverse DFT . IEEE Transactions on Acoustics, Speech, and Signal Processing . 36 . 2 . 285–286 . 1988 . 10.1109/29.1519 .
  • J. H. McClellan . T. W. Parks . Eigenvalues and eigenvectors of the discrete Fourier transformation . IEEE Transactions on Audio and Electroacoustics . 20 . 1 . 66–74 . 1972 . 10.1109/TAU.1972.1162342 .
  • Bradley W. Dickinson . Kenneth Steiglitz . Eigenvectors and functions of the discrete Fourier transform . IEEE Transactions on Acoustics, Speech, and Signal Processing . 30 . 1 . 25–31 . 1982 . 10.1109/TASSP.1982.1163843 . 10.1.1.434.5279 . (Note that this paper has an apparent typo in its table of the eigenvalue multiplicities: the +i/-i columns are interchanged. The correct table can be found in McClellan and Parks, 1972, and is easily confirmed numerically.)
  • F. A. Grünbaum . The eigenvectors of the discrete Fourier transform . Journal of Mathematical Analysis and Applications . 88 . 2 . 355–363 . 1982 . 10.1016/0022-247X(82)90199-8 . free .
  • Natig M. Atakishiyev . Kurt Bernardo Wolf . Fractional Fourier-Kravchuk transform . Journal of the Optical Society of America A . 14 . 7 . 1467–1477 . 1997 . 10.1364/JOSAA.14.001467 . 1997JOSAA..14.1467A .
  • C. Candan . M. A. Kutay . H. M.Ozaktas . The discrete fractional Fourier transform . IEEE Transactions on Signal Processing . 48 . 5 . 1329–1337 . 2000 . 10.1109/78.839980 . 2000ITSP...48.1329C . https://web.archive.org/web/20170921231500/http://www.ee.bilkent.edu.tr/~haldun/publications/ozaktas166.pdf . 2017-09-21 . live. 11693/11130 . free .
  • Magdy Tawfik Hanna, Nabila Philip Attalla Seif, and Waleed Abd El Maguid Ahmed . Hermite-Gaussian-like eigenvectors of the discrete Fourier transform matrix based on the singular-value decomposition of its orthogonal projection matrices . IEEE Transactions on Circuits and Systems I: Regular Papers . 51 . 11 . 2245–2254 . 2004 . 10.1109/TCSI.2004.836850 . 14468134 .
  • Shamgar Gurevich . Ronny Hadani . On the diagonalization of the discrete Fourier transform . preprint at . Applied and Computational Harmonic Analysis . 27 . 1 . 2009 . 87–99 . 10.1016/j.acha.2008.11.003 . 0808.3281. 14833478 .
  • Shamgar Gurevich . Ronny Hadani . Nir Sochen . The finite harmonic oscillator and its applications to sequences, communication and radar . preprint at . IEEE Transactions on Information Theory . 54 . 9 . 4239–4253 . 2008 . 10.1109/TIT.2008.926440 . 0808.1495. 2008arXiv0808.1495G . 6037080 .
  • Juan G. Vargas-Rubio . Balu Santhanam . On the multiangle centered discrete fractional Fourier transform . IEEE Signal Processing Letters . 12 . 4 . 273–276 . 2005 . 10.1109/LSP.2005.843762 . 2005ISPL...12..273V . 1499353 .
  • F.N. Kong . Analytic Expressions of Two Discrete Hermite-Gaussian Signals . IEEE Transactions on Circuits and Systems II: Express Briefs . 55 . 1 . 56–60 . 2008 . 10.1109/TCSII.2007.909865. 5154718 .

External links

Notes and References

  1. Taboga, Marco (2021). "Discrete Fourier Transform - Frequencies", Lectures on matrix algebra. https://www.statlect.com/matrix-algebra/discrete-Fourier-transform-frequencies.
  2. Book: Amiot . Emmanuel . Music through Fourier Space . Computational Music Science . 2016 . Springer . Zürich . 978-3-319-45581-5 . 8 . 10.1007/978-3-319-45581-5 . 6224021 . Theorem 1.11.
  3. Morton . Patrick . On the eigenvectors of Schur's matrix . Journal of Number Theory . 1980 . 12 . 1 . 122-127 . 10.1016/0022-314X(80)90083-9 . 2027.42/23371 . free .
  4. Bose, N. K. "Eigenvectors and eigenvalues of 1-D and nD DFT matrices." AEU-International Journal of Electronics and Communications 55.2 (2001): 131-133.
  5. Candan, Ç. (2011). On the eigenstructure of DFT matrices [DSP education]. IEEE Signal Processing Magazine, 28(2), 105-108.
  6. Pei, S. C., Ding, J. J., Hsue, W. L., & Chang, K. W. (2008). Generalized commuting matrices and their eigenvectors for DFTs, offset DFTs, and other periodic operations. IEEE Transactions on Signal Processing, 56(8), 3891-3904.
  7. Erseghe, T., & Cariolaro, G. (2003). An orthonormal class of exact and simple DFT eigenvectors with a high degree of symmetry. IEEE transactions on signal processing, 51(10), 2527-2539.