Frequency Domain Discrete: C À C DFT Finite ! " # $ $ % & " " "
Frequency Domain Discrete: C À C DFT Finite ! " # $ $ % & " " "
Frequency Domain Discrete: C À C DFT Finite ! " # $ $ % & " " "
It transforms one function into another, which is called the frequency domain representation, or simply the DFT, of the original function (which is often a function in the time domain). But the DFT requires an input function that is discrete and whose non-zero values have a limited (finite) duration. Such inputs are often created by sampling a continuous function, like a person's voice. Unlike the discrete-time Fourier transform (DTFT), it only evaluates enough frequency components to reconstruct the finite segment that was analyzed. Using the DFT implies that the finite segment that is analyzed is one period of an infinitely extended periodic signal; if this is not actually true, a window function has to be used to reduce the artifacts in the spectrum. For the same reason, the inverse DFT cannot reproduce the entire time domain, unless the input happens to be periodic (forever). Therefore it is often said that the DFT is a transform for Fourier analysis of finite-domain discrete-time functions. The sinusoidal basis functions of the decomposition have the same properties. The input to the DFT is a finite sequence of real or complex numbers (with more abstract generalizations discussed below), making the DFT ideal for processing information stored in computers. In particular, the DFT is widely employed in signal processing and related fields to analyze the frequencies contained in a sampled signal, to solve partial differential equations, and to perform other operations such as convolutions or multiplying large integers. A key enabling factor for these applications is the fact that the DFT can be computed efficiently in practice using a fast Fourier transform (FFT) algorithm. FFT algorithms are so commonly employed to compute DFTs that the term "FFT" is often used to mean "DFT" in colloquial settings. Formally, there is a clear distinction: "DFT" refers to a mathematical transformation or function, regardless of how it is computed, whereas "FFT" refers to a specific family of algorithms for computing DFTs. The terminology is further blurred by the (now rare) synonym finite Fourier transform for the DFT, which apparently predates the term "fast Fourier transform" (Cooley et al., 1969) but has the same initialism.
[edit] Definition
The sequence of N complex numbers x0, ..., xN1 is transformed into the sequence of N complex numbers X0, ..., XN1 by the DFT according to the formula:
where i is the imaginary unit and is a primitive N'th root of unity. (This expression can also be written in terms of a DFT matrix; when scaled appropriately it becomes a unitary matrix and the Xk can thus be viewed as coefficients of x in an orthonormal basis.)
, as in
or
or
A simple description of these equations is that the complex numbers Xk represent the amplitude and phase of the different sinusoidal components of the input "signal" xn. The DFT computes the Xk from the xn, while the IDFT shows how to compute the xn as a sum of sinusoidal components with frequency k / N cycles per sample. By writing the equations in this form, we are making extensive use of Euler's formula to express sinusoids in terms of complex exponentials, which are much easier to manipulate. In the same way, by writing Xk in polar form, we obtain the sinusoid amplitude Ak / N and phase k from the complex modulus and argument of Xk, respectively:
where atan2 is the two-argument form of the arctan function. Note that the normalization factor multiplying the DFT and IDFT (here 1 and 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. A normalization of for both the DFT and IDFT makes the transforms unitary, which has some theoretical advantages, but it is often more practical in numerical computation to perform the scaling all at once as above (and a unit scaling can be convenient in other ways). (The convention of a negative sign in the exponent is often convenient because it means that Xk is the amplitude of a "positive frequency" 2 k / N. Equivalently, the DFT is often thought of as a matched filter: when looking for a frequency of +1, one correlates the incoming signal with a frequency of 1.) In the following discussion the terms "sequence" and "vector" will be considered interchangeable.
[edit] Properties
[edit] Completeness
The discrete Fourier transform is an invertible, linear transformation
with C denoting the set of complex numbers. In other words, for any N > 0, an N-dimensional complex vector has a DFT and an IDFT which are in turn N-dimensional complex vectors.
[edit] Orthogonality
The vectors form an orthogonal basis over the set of N-dimensional complex vectors:
where is the Kronecker delta. 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.
where the star denotes complex conjugation. Parseval's theorem is a special case of the Plancherel theorem and states:
[edit] Periodicity
If the expression that defines the DFT is evaluated for all integers k instead of just for , then the resulting infinite sequence is a periodic extension of the DFT, periodic with period N. The periodicity can be shown directly from the definition:
Similarly, it can be shown that the IDFT formula leads to a periodic extension.
Multiplying xn by a linear phase 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 then and
The quantity in parentheses is 0 for all values of m except those of the form n l pN, where p is any integer. At those values, it is 1. It can therefore be replaced by an infinite sum of Kronecker delta functions, and we continue accordingly. Note that we can also extend the limits of m to infinity, with the understanding that the x and y sequences are defined as 0 outside [0,N1]:
and
A direct evaluation of the convolution or correlation summation (above) requires O(N2) operations for an output sequence of length N. An indirect method, using transforms, can take advantage of the O(NlogN) efficiency of the fast Fourier transform (FFT) to achieve much better performance. Furthermore, convolutions can be used to efficiently compute DFTs via Rader's FFT algorithm and Bluestein's FFT algorithm. Methods have also been developed to use circular convolution as part of an efficient process that achieves normal (non-circular) convolution with an or sequence potentially much longer than the practical transform size (N). Two such methods are called overlap-save and overlapadd.[1]
and
for N even ,
for N odd, where the coefficients Xk are given by the DFT of xn above, satisfies the interpolation property p(2 n / N) = xn for .
is handled specially.
This interpolation is not unique: aliasing implies that one could add N to any of the complexsinusoid 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 realvalued for real xn; its use is a common mistake.
where
is a primitive Nth root of unity. The inverse transform is then given by the inverse of the above matrix:
where det() 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
then
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 wellthis is just Parseval's theorem:
(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:
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(xn) as xn with its real and imaginary parts swappedthat is, if xn = a + bi then swap(xn) is b + ai. Equivalently, swap(xn) 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 involutarythat is, which is its own inverse. In particular, its own inverse: (1+i) /2) is the 2. For real inputs , the real part of which is also involutary. , since the (1 + i) factors in is clearly cancel . A closely related involutary transformation (by a factor of is none other than the discrete Hartley transform,
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:
4
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. (Note that 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: size N = +1 = 1 = -i = +i
4m m+1 m m m1 4m + 1 m+1 m m m 4m + 2 m+1 m+1 m m 4m + 3 m+1 m+1 m+1 m Multiplicities of the eigenvalues of the unitary DFT matrix U as a function of the transform size N (in terms of an integer 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; Grnbaum, 1982; Atakishiyev and Wolf, 1997; Candan et al., 2000; Hanna et al., 2004; Gurevich and Hadani, 2008). A straightforward approach is to discretize the eigenfunction of the continuous Fourier transform, namely 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:
. A closed form expression for the series is not known, but it converges rapidly.
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 transformthe 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.
The star denotes complex conjugation. The subscripts are interpreted modulo N. Therefore, the DFT output for real inputs is half redundant, and one obtains the complete information by only looking at roughly half of the outputs . In this case, the "DC" element X0 is purely real, and for even N the "Nyquist" element XN / 2 is also real, so there are exactly N non-redundant real numbers in the first half + Nyquist element of the complex output X. Using Euler's formula, the interpolating trigonometric polynomial can then be interpreted as a sum of sine and cosine functions.
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 antiperiodic 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)[2] 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.
as above and the d output indices run from . This is more compactly expressed in vector notation, where we and , which we define as as d-dimensional vectors of indices :
where the division is defined as element-wise, and the sum denotes the set of nested summations above.
to be performed
The inverse of the multi-dimensional DFT is, analogous to the one-dimensional case, given by:
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 . 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 onedimensional DFTs along each dimension. In the two-dimensional case the N1 independent DFTs of the rows (i.e., along n2) are computed first to form a new array . Then the N2 independent DFTs of y along the columns (along n1) 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.
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 ).
[edit] 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.
uniformly-spaced time-samples of some signal , 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 frequency) 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 (aka 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 in the discretetime Fourier transform article.
y
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 noted, 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.
Where c is the vector of coefficients for c(x), and the convolution operator is defined so
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
With a fast Fourier transform, the resulting algorithm takes O (N log N) arithmetic operations. Due to its simplicity and speed, the CooleyTukey 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). [edit] 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. After polynomial multiplication, a relatively low-complexity carrypropagation step completes the multiplication.
[edit] Generalizations
[edit] Representation theory
For more details on this topic, see Representation theory of finite groups#Discrete Fourier transform. The DFT can be interpreted as the complex-valued representation theory of the finite cyclic group. In other words, a sequence of n complex numbers can be thought of as an element of ndimensional complex space or equivalently a function from the finite cyclic group of order n to the complex numbers, This latter may be suggestively written to emphasize that this is a complex vector space whose coordinates are indexed by the n-element set 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.
sometimes denoted N or WN (so that ). 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).
This suggests the generalization to Fourier transforms on arbitrary finite groups, which act on functions G C 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.
[edit] Alternatives
Main article: Discrete wavelet transform For more details on this topic, see Discrete wavelet transform#Comparison with Fourier transform. As with other Fourier transforms, 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 timefrequency 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.