Professional Documents
Culture Documents
Lecture 7 - The Discrete Fourier Transform
Lecture 7 - The Discrete Fourier Transform
Transform
7.1 The DFT
The Discrete Fourier Transform (DFT) is the equivalent of the continuous Fourier
Transform for signals known only at instants separated by sample times (i.e.
a finite sequence of data).
Let be the continuous signal which is the source of the data. Let samples
.
be denoted
The Fourier Transform of the original signal, , would be
We could regard each sample as an impulse having area . Then, since the
integrand exists only at the sample points:
ie.
We could in principle evaluate this for any , but with only data points to start
over a finite interval (usually the fundamental period ) rather than from
to
82
if the waveform was periodic. Similarly, since there are only a finite number
of input data points, the DFT treats the data as if it were periodic (i.e. to
is the same as to
.)
Hence the sequence shown below in Fig. 7.1(a) is considered to be one period of
the periodic sequence in plot (b).
(a)
1
0.8
0.6
0.4
0.2
0
10
11
(b)
1
0.8
0.6
0.4
0.2
0
10
15
20
25
30
Since the operation treats the data as if it were periodic, we evaluate the
DFT
equation for the fundamental frequency (one cycle per sequence, Hz,
rad/sec.) and its harmonics (not forgetting the d.c. component (or average) at
).
i.e. set
or, in general
83
..
.
where
..
.
q
r
r
r
ts
and etc.
.
..
.
DFT example
Let the continuous signal be
dc
2Hz
1Hz
10
8
6
4
2
0
2
4
10
84
= 4Hz) from r to
by putting r
. The
i.e.
t , , t ,
Therefore
|F[n]|
15
10
f (Hz)
85
is
times the complex conjugate of the original (symmet-
Note that the coefficients are complex. We can assume that the values
are real (this is the simplest case; there are situations (e.g. radar) in which two
inputs, at each , are treated as a complex pair, since they are the outputs from o
and o demodulators).
member that the spectrum is symmetrical about ) combine to produce frequency components, only one of which
is considered to be valid (the one at the
; the higher frequency
Hz where
lower of the two frequencies,
component is at an aliasing frequency (
)).
and
But
i.e.
1 for all
86
(7.2)
above gives,
or
contribution of to
nent.
Hz, of magnitude
2.
3.
s r
i.e.
component
Interpretation of example
ie.
1.
since
r
s
(as expected)
o
t
no other
(as expected)
(as expected)
6
5
|F[n]|
4
3/sqrt(2)
3
sqrt(2)
2
1
0
1
f (Hz)
In typical applications,
is much greater than ; for example, for
,
ponents and
frequency
sity) which gives the correct shape for the spectrum, except for the values at
and .
88
7.2.1 Aliasing
This is another manifestation of the phenomenon which we have now encountered
several times. If the initial samples are not sufficiently closely spaced to represent
high-frequency components present in the underlying function, then the DFT values will be corrupted by aliasing. As before, the solution is either to increase the
sampling rate (if possible) or to pre-filter the signal in order to minimise its highfrequency spectral content.
7.2.2 Leakage
Recall that the continuous Fourier transform of a periodic waveform requires the
ber of cycles in the data samples. The DFT for this case (for to )
|F[n]|
4
freq
cies either side of the true frequency. This certainly does happen but we also find
non-zero outputs at all other frequencies. This smearing effect, which is known
as leakage, arises because we are effectively calculating the Fourier series for the
waveform in Fig. 7.6, which has major discontinuities, hence other frequency
components.
1
0.5
0.5
10
15
20
25
30
35
40
45
50
(b)
5
4
2
1
1
0
90
where
is the length of the transform. For most problems,
is chosen to be
at least 256 in order to get a reasonable approximation for the spectrum of the
sequence under consideration hence computational speed becomes a major consideration.
Highly efficient computer algorithms for estimating Discrete Fourier Transforms have been developed since the mid-60s. These are known as Fast Fourier
Transform (FFT) algorithms and they rely on the fact that the standard DFT involves a lot of redundant calculations:
Re-writing
as
it is easy to realise that the same values of are calculated many times as the
computation proceeds. Firstly, the integer product repeats for different com
values.
For example, consider
of 2)
is an integral power
t
s
t
say
Then
q
s
91
t s
Also, if
falls outside the range 0-7, we still get one of the above values:
eg. if
and r
q t q s q t q
Let us begin by splitting the single summation over samples into 2 summations,
each with samples, one for even and the other for odd.
Note that
t
r
Therefore
ie.
Thus the -point DFT can be obtained from two -point transforms,
one on even input data, , and one on odd input data, . Although the fre
:
92
t
t
t
t
t
t
t
t
r q
t s
t
t
t
t
rq
f[0]
f[2]
f[4]
f[6]
N/2
point
DFT
f[1]
f[3]
f[5]
f[7]
N/2
point
DFT
F[0]
G[3]
H[0]
F[7]
H[3]
Assuming than
is a power of , we can repeat the above process on the two
f[0]
f[4]
f[2]
f[6]
f[1]
f[5]
f[3]
f[7]
F[0]
N/4 point
DFT
N/4 point
DFT
N/4 point
DFT
N/4 point
DFT
F[7]
where and are complex numbers. Thus a butterfly computation requires one
complex multiplication and 2 complex additions.
Note also, that the input samples are bit-reversed (see table below) because at
each stage of decimation the sequence input samples is separated into even- and
odd- indexed samples.
(NB: the bit-reversal algorithm only applies if
94
is an integral power of ).
Index
0
1
2
3
4
5
6
7
Binary
Bit-reversed Bit-reversed
representation
Binary
index
000
000
0
001
100
4
010
010
2
011
110
6
100
001
1
101
101
5
110
011
3
111
111
7
the previous stage. Since there are stages, the number of complex mul
tiplications required to evaluate an -point DFT with the FFT is approximately
32
256
1,024
(DFT)
1,024
65,536
1,048,576
(FFT) saving
80
92
1,024
98
5,120
99.5
-point
ble by (e.g.
), the final decimation stage would include a -point
transform.
95
2. pack the data with zeroes; e.g. include 16 zeroes with the 48 data points
96