Personal tools
  •  
You are here: Home Electrical and Computer Engineering Signals and Systems Lecture 9: The DFT

Lecture 9: The DFT

Document Actions
  • Content View
  • Bookmarks
  • CourseFeed
Schedule :: The DFT :: Aliasing & Leakage :: Examples :: The FFT :: Convolution

We have seen that the Fourier transform can be used in a variety of applications. While an important theoretical tool, there is a problem with it in practice: we must have an analytical expression for the functions we are transforming, and have to be able to compute its transform. In practice, the transforms are often computed from discrete samples of a signal, and the transform is computed for only a discrete set of frequencies. This computational approach is known as the DFT. There are fast algorithms for computing the DFT which are called the Fast Fourier Transform (FFT). The FFT is nothing more than a way of organizing the computations in the DFT to compute exactly the same thing, but with less processing for the computer. It is safe to say that the revolution in signal processing has its genesis in the discovery of the FFT algorithm.

We will begin my making the connection between continuous-time signals with the spectrum and the DFT signals in their discrete time and frequency domains. Let $f(t)$ be timelimited to $\tau$ seconds, having spectrum $F(\omega)$ . Then since $f(t)$ is timelimited, it cannot be bandlimited (why?). Let $\fbar(t)$ denote the sampled signal with samples taken ever $T$ seconds, and let $\Fbar(\omega)$ denote the spectrum of the sampled signal, the periodic extension of $F(\omega)$ , repeating ever $\Fc_s =1/T$ Hz. Because $f$ is not bandlimited, there must be some amount of aliasing.

Now let us imagine sampling in the frequency domain of $\Fbar(\omega)$ ; this corresponds to creating a periodic repetition of the sampled signal in the time domain. We let $T_0$ be the period of repetition in the time domain, corresponding to samples every $1/T_0$ of the spectrum.
Let us determine how many samples are involved here. The number of samples in the time domain (of each period) is

\begin{displaymath}N_0 = \frac{T_0}{T}
\end{displaymath}

The number of samples in the frequency domain of each period is

\begin{displaymath}N_0' = \frac{F_s}{F_0} = \frac{1/T}{1/T_0} = N_0.
\end{displaymath}

The aliasing can be reduced by increasing the sampling frequency, but can never be entirely eliminated for a timelimited signal. (If we had started out with a bandlimited signal, then it would not have been timelimited, and we would have had overlapping in the time domain.

If, in addition, the signal $f(t)$ that we are dealing with is not, in fact timelimited, but we must for reasons of practicality deal with a time-limited version, we must perform some truncation. This truncation leads to spectral leakage . This also causes aliasing (creating higher spectral components than might have been in the original signal.) The spectral leakage can be reduced by increasing the window width (longer data set). This increases $T_0$ , which in turn reduces $\Fc_0$ . (Note that $\Fc_0$ determines the frequency resolution.)

Also observe that by this sampling property, we are getting only a partial view of the spectrum. A true spectral peak might not lie right on one of the sample values. This can be mitigated by sampling more finely (decrease $\Fc_0$ , meaning increase $T_0$ , meaning increase $N_0$ .)

Let $f[k]$ be a discrete-time sequence, possibly obtained from a continuous-time signal by sampling, say $f[k] = f(kT)$ . Note that we are using $k$ as the discrete time index. Suppose that we have $N_0$ samples of the signal, where $N_0$ is some number that we choose. (As a point for future reference, the number $N_0$ is commonly chosen to be a power of 2, since this works most efficiently for most FFT routines.) Following the book's notation, let

\begin{displaymath}f_k = Tf[k] = T f(kT) = \frac{T_0}{N_0}f(kT). \end{displaymath}

That is, it is simply a scaled version of the time sample. Often this scaling is overlooked (or it is assumed that the sampling interval is normalized to one). Also, let
\begin{displaymath}F_r = F(r \omega_0).
\end{displaymath}

That is, it is a sample of the spectrum.

The DFT of the set of points $\{f_0,f_1,\ldots,f_{N_0-1}\}$ is given by

\begin{displaymath}
\boxed{F_r = \sum_{k=0}^{N_0-1} f_k e^{-jr\Omega_0 k} = \sum_{k=0}^{N_0-1}
f_k e^{-j2\pi r k/N_0}}
\end{displaymath} (1)

where
\begin{displaymath}\Omega_0 = 2\pi/N_0 = \omega_0 T.
\end{displaymath}

In the transform formula, the number $r$ must be an integer. It is an index to a frequency (as we will see later). The inverse DFT is
\begin{displaymath}
\boxed{f_k = \frac{1}{N_0}\sum_{r=0}^{N_0-1} F_r e^{jr \Omega_0 k} =
\frac{1}{N_0}\sum_{r=0}^{N_0-1} F_r e^{j2\pi rk/N_0}.}
\end{displaymath} (2)
The transform pair is sometimes represented as

\begin{displaymath}f_k \Leftrightarrow F_r
\end{displaymath}

or
\begin{displaymath}F_r = \Fc[f_k]
\end{displaymath}

Note the interesting parallels between these transforms and the F.T.s we have already seen:

  1. In going from the time domain ( $k$ ) to the frequency domain ( $r$ ), the exponential term in the summation has a negative sign.
  2. In going from the frequency domain to the time domain, the exponential term has a positive sign, and the summation is multiplied by a normalizing factor, $1/N_0$ in this case.
It should be pointed out that while the sampling processing introduces possible aliasing and spectral leakage problems, the actual transform pair given above is exact .

Let us connect the definition given above with the conventional Fourier transform (noting where approximations are made). The sampled signal can be written as

\begin{displaymath}\fbar(t) = \sum_{k=0}^{N_0-1} f(kT) \delta(t-kT)
\end{displaymath}

(time limited). The Fourier transform of this signal is
\begin{displaymath}\Fbar(\omega) = \sum_{k=0}^{N_0-1} f(kT) e^{-j k \omega T}
\end{displaymath}

If we neglect the aliasing , over the interval $\vert\omega\vert <
\omega_s/2$ by the sampling theorem we have
\begin{displaymath}\Fbar(\omega) = \frac{1}{T} F(\omega).
\end{displaymath}

Hence
\begin{displaymath}F(\omega) = T \Fbar(\omega) = T \sum_{k=0}^{N_0-1} f(kT) e^{-j
k \omega T} \qquad \vert\omega\vert < \vert\omega_s\vert/2
\end{displaymath}

Sampling this now we obtain
\begin{displaymath}F_r = F(r\omega_0) = T \sum_{k=0}^{N_0-1} f(kT) e^{-j k r \omega_0
T}
\end{displaymath}

Let $\omega_0 T = \Omega_0$ ; then
\begin{displaymath}\Omega_0 = \omega_0 T = 2 \pi F_0 T = 2 \pi/N_0
\end{displaymath}

By our definition, $T f(kT) = f_k$ . Putting these definitions together we find

\begin{displaymath}F_r = \sum_{k=0}^{N_0-1} f_k e^{-jr \Omega_0 k}
\end{displaymath}

We conclude that, except for aliasing, the DFT represents a sampled version of the FT.

Taking the last expression for $F_r$ , multiply by $e^{jm\Omega_0 r}$ and sum:

\begin{displaymath}\sum_{r=0}^{N_0-1} F_r e^{j m \Omega_0 r} = \sum_{r=0}^{N_0-1}
\sum_{k=0}^{N_0-1} f_k e^{-jk \Omega_0 k} e^{j m \Omega_0 r}
\end{displaymath}

We find (how?) that
\begin{displaymath}\sum_{r=0}^{N_0-1} e^{j(m-k)\Omega_0 r} =
\begin{cases}
N_0 & k = m \mod N_0 \\
0 & \text{otherwise}
\end{cases}\end{displaymath}

Hence the sum collapses, and we get the desired result.

The value $F_r$ is said to provide information about the $r$ th frequency ``bin''. It corresponds to a Hertz frequency of

\begin{displaymath}\boxed{f = r\Omega_0/2\pi = r f_0 = r/T_0 = r\frac{F_s}{N_0}} \end{displaymath}

Take some examples:

\begin{displaymath}r=0 \rightarrow f = 0 \end{displaymath}

\begin{displaymath}r=1 \rightarrow f= F_s/N_0 = \frac{1}{T_0}. \end{displaymath}

(This is the frequency resolution .)

\begin{displaymath}r=N_0/2 \rightarrow f=F_s/2. \end{displaymath}

(This is the maximum representable frequency.) The number of points in the DFT can be written as

\begin{displaymath}N_0 = \frac{T_0}{T}, \end{displaymath}

where $T_0$ relates to the sampling rate in the frequency domain, and $T$ relates to the sampling rate in the time domain. Observe that to increase the frequency resolution, the number of points of data $N_0$ must be increased. We can increase $N_0$ and improve the frequency resolution by increasing $T_0$ (taking more data), which amounts to taking samples closer together in frequency, $f_0 = 1/T_0$ , or by taking samples faster in time (increasing the sampling rate).

Note: The book defined the transform in terms of $f_k
= Tf(kT)$ . In practice, the FFT routines simply deal with the data $f_k$ ; they don't worry about whether it is scaled or not. Since the effect of the scaling by $T$ is to simply scale the transform, in applications it is not common to worry about the scaling either.
\begin{example}A signal $f(t)$ has a duration of 2 ms and an essential
bandwidt...
...liasing, or increasing $T_0$, which would increase
the resolution.
\end{example}
Note that zero padding cannot replace any information that is not already present in the signal. It simply refines the sampling of the spectrum that is already present.

Copyright 2008, by the Contributing Authors. Cite/attribute Resource . admin. (2006, June 07). Lecture 9: The DFT. Retrieved January 07, 2011, from Free Online Course Materials — USU OpenCourseWare Web site: http://ocw.usu.edu/Electrical_and_Computer_Engineering/Signals_and_Systems/9_1node1.html. This work is licensed under a Creative Commons License Creative Commons License