The Fourier transform can be computed in discrete-time despite the
complications caused by a finite signal and continuous frequency.
The discrete-time Fourier transform (and the
continuous-time transform as well) can be evaluated when we have
an analytic expression for the signal. Suppose we just have a
signal, such as the speech signal used in the previous chapter,
for which there is no formula. How then would you compute the
spectrum? For example, how did we compute a spectrogram such as
the one shown in the speech signal example? The Discrete Fourier
Transform (DFT) allows the computation of spectra from
discrete-time data. While in discrete-time we can
exactly calculate spectra, for analog
signals no similar exact spectrum computation exists. For
analog-signal spectra, use must build special devices, which
turn out in most cases to consist of A/D converters and
discrete-time computations. Certainly discrete-time spectral
analysis is more flexible than continuous-time spectral
analysis.
The formula for the
DTFT
is a sum, which conceptually can be easily computed save for two
issues.
Signal duration.
The sum extends over the signal's duration, which must be
finite to compute the signal's spectrum. It is exceedingly
difficult to store an infinite-length signal in any case, so
we'll assume that the signal extends over
.
Continuous frequency. Subtler than
the signal duration issue is the fact that the frequency
variable is continuous: It may only need to span one period,
like
or
,
but the DTFT formula as it stands requires evaluating the
spectra at all frequencies within a
period. Let's compute the spectrum at a few frequencies; the
most obvious ones are the equally spaced ones
,
.
We thus define the discrete Fourier transform (DFT)
to be
Here,
is shorthand for
.
We can compute the spectrum at as many equally spaced
frequencies as we like. Note that you can think about this
computationally motivated choice as sampling the
spectrum; more about this interpretation later. The issue now
is how many frequencies are enough to capture how the spectrum
changes with frequency. One way of answering this question is
determining an inverse discrete Fourier transform formula: given
,
how do we find
,
?
Presumably, the formula will be of the form
.
Substituting the DFT formula in this prototype inverse transform
yields
Note that the orthogonality relation we use so often has a
different character now.
We obtain nonzero value whenever the two indices differ by multiples
of . We can express this result as
.
Thus, our formula becomes
The integers and
both range over
.
To have an inverse transform, we need the sum to be a
single unit sample for
,
in this range. If it did not, then
would equal a sum of values, and we would not have a valid
transform: Once going into the frequency domain, we could not
get back unambiguously! Clearly, the term
always provides a unit sample (we'll take care of the factor of
soon). If we evaluate the spectrum at
fewer frequencies than the signal's
duration, the term corresponding to
will also appear for some values of
, .
This situation means that our prototype transform equals
for some values of
.
The only way to eliminate this problem is to require
:
We must have at least as many frequency samples as
the signal's duration. In this way, we can return from the
frequency domain we entered via the DFT.
When we have fewer frequency samples than the signal's
duration, some discrete-time signal values equal the sum of
the original signal values. Given the sampling
interpretation of the spectrum, characterize this effect a
different way.
This situation amounts to aliasing in the time-domain.
Another way to understand this requirement is to use the theory
of linear equations. If we write out the expression for the DFT
as a set of linear equations,
we have
equations in
unknowns if we want to find the signal from its sampled
spectrum. This requirement is impossible to fulfill if
;
we must have
.
Our orthogonality relation essentially says that if we have a
sufficient number of equations (frequency samples), the
resulting set of equations can indeed be solved.
By convention, the number of DFT frequency values
is chosen to equal the signal's duration
.
The discrete Fourier transform pair consists of
Discrete Fourier Transform Pair
Use this demonstration to perform DFT analysis of a signal.
Use this demonstration to synthesize a signal from a DFT sequence.