Proof: We have
When , , by inspection of the definition of .
The complex sinusoids corresponding to the frequencies are
Nth Roots of Unity
The th roots of unity are plotted in the complex plane in Fig.6.1 for . It is easy to find them graphically by dividing the unit circle into equal parts using points, with one point anchored at , as indicated in Fig.6.1. When is even, there will be a point at (corresponding to a sinusoid with frequency at exactly half the sampling rate), while if is odd, there is no point at .
The sampled sinusoids generated by integer powers of the roots of unity are plotted in Fig.6.2. These are the sampled sinusoids used by the DFT. Note that taking successively higher integer powers of the point on the unit circle generates samples of the th DFT sinusoid, giving , . The th sinusoid generator is in turn the th th root of unity (th power of the primitive th root of unity ).
Note that in Fig.6.2 the range of is taken to be instead of . This is the most ``physical'' choice since it corresponds with our notion of ``negative frequencies.'' However, we may add any integer multiple of to without changing the sinusoid indexed by . In other words, refers to the same sinusoid for all integers .
Orthogonality of the DFT Sinusoids
For , we follow the previous derivation to the next-to-last step to get
An Orthonormal Sinusoidal Set
In summary, the DFT is proportional to the set of coefficients of projection onto the sinusoidal basis set, and the inverse DFT is the reconstruction of the original signal as a superposition of its sinusoidal projections. This basic ``architecture'' extends to all linear orthogonal transforms, including wavelets, Fourier transforms, Fourier series, the discrete-time Fourier transform (DTFT), and certain short-time Fourier transforms (STFT). See Appendix B for some of these.
We have defined the DFT from a geometric signal theory point of view, building on the preceding chapter. See §7.1.1 for notation and terminology associated with the DFT.
The DFT is defined only for frequencies . If we are analyzing one or more periods of an exactly periodic signal, where the period is exactly samples (or some integer divisor of ), then these really are the only frequencies present in the signal, and the spectrum is actually zero everywhere but at , . However, we use the DFT to analyze arbitrary signals from nature. What happens when a frequency is present in a signal that is not one of the DFT-sinusoid frequencies ?
The coefficient of projection is proportional to
Since we are only looking at samples, any sinusoidal segment can be projected onto the DFT sinusoids and be reconstructed exactly by a linear combination of them. Another way to say this is that the DFT sinusoids form a basis for , so that any length signal whatsoever can be expressed as a linear combination of them. Therefore, when analyzing segments of recorded signals, we must interpret what we see accordingly.
The typical way to think about this in practice is to consider the DFT operation as a digital filter for each , whose input is and whose output is at time .6.4 The frequency response of this filter is what we just computed,6.5 and its magnitude is
We see that is sensitive to all frequencies between dc and the sampling rate except the other DFT-sinusoid frequencies for . This is sometimes called spectral leakage or cross-talk in the spectrum analysis. Again, there is no leakage when the signal being analyzed is truly periodic and we can choose to be exactly a period, or some multiple of a period. Normally, however, this cannot be easily arranged, and spectral leakage can be a problem.
Note that peak spectral leakage is not reduced by increasing .6.7 It can be thought of as being caused by abruptly truncating a sinusoid at the beginning and/or end of the -sample time window. Only the DFT sinusoids are not cut off at the window boundaries. All other frequencies will suffer some truncation distortion, and the spectral content of the abrupt cut-off or turn-on transient can be viewed as the source of the sidelobes. Remember that, as far as the DFT is concerned, the input signal is the same as its periodic extension (more about this in §7.1.2). If we repeat samples of a sinusoid at frequency (for any ), there will be a ``glitch'' every samples since the signal is not periodic in samples. This glitch can be considered a source of new energy over the entire spectrum. See Fig.8.3 for an example waveform.
To reduce spectral leakage (cross-talk from far-away frequencies), we typically use a window function, such as a ``raised cosine'' window, to taper the data record gracefully to zero at both endpoints of the window. As a result of the smooth tapering, the main lobe widens and the sidelobes decrease in the DFT response. Using no window is better viewed as using a rectangular window of length , unless the signal is exactly periodic in samples. These topics are considered further in Chapter 8.
Since the th spectral sample is properly regarded as a measure of spectral amplitude over a range of frequencies, nominally to , this range is sometimes called a frequency bin (as in a ``storage bin'' for spectral energy). The frequency index is called the bin number, and can be regarded as the total energy in the th bin (see §7.4.9). Similar remarks apply to samples of any bandlimited function; however, the term ``bin'' is only used in the frequency domain, even though it could be assigned exactly the same meaning mathematically in the time domain.
Fourier Series Special Case
In the very special case of truly periodic signals , for all , the DFT may be regarded as computing the Fourier series coefficients of from one period of its sampled representation , . The period of must be exactly seconds for this to work. For the details, see §B.3.
It can be said that only the NDFT provides a proper change of coordinates from the time-domain (shifted impulse basis signals) to the frequency-domain (DFT sinusoid basis signals). That is, only the NDFT is a pure rotation in , preserving both orthogonality and the unit-norm property of the basis functions. The DFT, in contrast, preserves orthogonality, but the norms of the basis functions grow to . Therefore, in the present context, the DFT coefficients can be considered ``denormalized'' frequency-domain coordinates.
Figure 6.4 illustrates the graphical relationships for the length DFT of the signal .
Analytically, we compute the DFT to be
and the corresponding projections onto the DFT sinusoids are
Note the lines of orthogonal projection illustrated in the figure. The ``time domain'' basis consists of the vectors , and the orthogonal projections onto them are simply the coordinate axis projections and . The ``frequency domain'' basis vectors are , and they provide an orthogonal basis set that is rotated degrees relative to the time-domain basis vectors. Projecting orthogonally onto them gives and , respectively. The original signal can be expressed either as the vector sum of its coordinate projections (0,...,x(i),...,0), (a time-domain representation), or as the vector sum of its projections onto the DFT sinusoids (a frequency-domain representation of the time-domain signal ). Computing the coefficients of projection is essentially ``taking the DFT,'' and constructing as the vector sum of its projections onto the DFT sinusoids amounts to ``taking the inverse DFT.''
In summary, the oblique coordinates in Fig.6.4 are interpreted as follows:
The DFT can be formulated as a complex matrix multiply, as we show in this section. (This section can be omitted without affecting what follows.) For basic definitions regarding matrices, see Appendix H.
Note that the th column of is the th DFT sinusoid, so that the th row of the DFT matrix is the complex-conjugate of the th DFT sinusoid. Therefore, multiplying the DFT matrix times a signal vector produces a column-vector in which the th element is the inner product of the th DFT sinusoid with , or , as expected.
Since the forward DFT is , substituting from Eq.(6.2) into the forward DFT leads quickly to the conclusion that
This equation succinctly states that the columns of are orthogonal, which, of course, we already knew. I.e., for , and :
The normalized DFT matrix is given by
Fourier Theorems for the DFT
Geometric Signal Theory