Professional Documents
Culture Documents
l7 PDF
l7 PDF
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
"!$#%'&
(*)
+/102,3
,
.
+ )
We could regard each sample
as an impulse having area 45
. Then, since the
integrand exists only at the sample points:
6!$#%7&
&
(98;: =+ <>;?
+/A02B3
@
8;:
C
D- +/EGF
D- +/10H?IF F
D- +/10J?IF
H- +/A0 +=<>;?
ie.
"!$#%K&
: L +=<
JNMOE
D- +/10J?
We could in principle evaluate this for any # , but with only data points to start
with, only final outputs will be significant.
You may remember that the continuous Fourier transform could be evaluated
QP
over a finite interval (usually the fundamental period @ ) rather than from
to
82
F P
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
S
H is the same as R to
H .)
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
&TU
20
25
30
Since the operation treats the data as if it were periodic, we evaluate the
<
DFT
VXW equation for the fundamental frequency (one cycle per sequence, : ? Hz,
: ? rad/sec.) and its harmonics (not forgetting the d.c. component (or average) at
#Y&Z ).
i.e. set #Y&Z[
H\
\
S]
^
\
]`_
\
S]
or, in general
: L +=<
ec f J
&
D- + /$bdg
_
JaMOE
83
Z
& ih
_
S
H
U
jkk
C
kk
kl
..
.
S
where p
mnn
jkk
& lk
nn
kk
kk
p V
pvq
p u
p
..
.
V
p q
r
p u
r
p w
r
pts
Tp
Tp
Tp
V
p : +=< p : + p : + q
V
&Zxy[z{ !\}| and p &Zp : etc. ~
& .
m nn
+=< nn
: + V nn
: + q n
o
p
:
jkk
mnn
C
kk
kl
..
.
nn
n
DFT example
Let the continuous signal be
@
K& F $UH\
F O \
dc
2Hz
1Hz
10
8
6
4
2
0
2
4
10
W @ F
&t F $5 V
$\{
84
J
s
. The
i.e.
&t ,
& ,
&t ,
&Z
Therefore
jkkl
mn
kjlk
C
n
&
o
&
_
!
!
&ZR
L q
L q
d- + /c b f J &
A ! f J
E
JNMOE
mnn kjlk
m n
kjlk
m n
C
n
$ n
&
R!
! o
o
H
o
!
!R
|F[n]|
15
10
f (Hz)
: L +=<
&
d- +/bdegc f J
_
JaMOE
85
is
: =+ <
L
f MOE
4
&
:
<
D
-U / bdec f J
_
Note that the
coefficients are complex. We can assume that the
4
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).
f
&
e c f JF
D
- / bdg
_
8:
- + /bde c + f > J &
But
i.e.
S
_
&
_
S
&
VXW
- + / J
1 for all
: L +=<
JaMOE
and
8;:
D- / bde c + f >"J
8 :
D- +/bde c + f >J
ec f J
- $/ bdec J &Z- $/ bdg
86
_
(7.2)
f 4 &
f
above gives,
J F .- +/ bdegc f JH
d
- / db egc f
_
_
f &
ie.
\
_
_
VXW f
: ?
Hz, of magnitude
2.
3.
V
{& R!
V &
:
& s ] &r
i.e.
\
6
_
_
&H
component
V &
\
<
C &
VE
&r
s
(as expected)
:
& V
_
V
: _
& ,
&S
4
(i.e. sum of all samples) and the
_
4
is E
& : <
& average of
& d.c. compo-
Interpretation of example
C &r$
VXW
- / J &T
\
f
& T
F$
d
_
_
_
or
1.
since
\ Y
o
&tKU
no other
e c V J &
D- / bd
S
_
o
W
4H
d- / J & \{
(as expected)
(as expected)
6
5
|F[n]|
4
3/sqrt(2)
3
sqrt(2)
2
1
0
1
f (Hz)
ponents and
frequency
<
<BE V s
&
<V
V
:V
.
s{
sG
fb
sity) which gives the correct shape for the spectrum, except for the values at
:
&Z and V .
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
P
F P or over an integer number
integration to be performed over the interval - to
of cycles of the waveform. If we attempt to complete the DFT over a non-integer
number of cycles of the input signal, then we might expect the transform to be
corrupted in some way. This is indeed the case, as will now be shown.
Consider the case of an input signal which is a sinusoid with a fractional num:
ber of cycles in the data samples. The DFT for this case (for & to & V )
_
_
is shown below in 7.5.
8
|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
Re-writing
: L +=<
&
_
JaMOE
D- +/ bde c f J
J
as
: L +=<
&
dp : f J
_
JNMOE
it is easy to realise that the same values of p : f are calculated many times as the
computation proceeds. Firstly, the integer product repeats for different comJ
_
binations of and ; secondly, p : f is a periodic function with only distinct
_
values.
For example, consider
of 2)
&9
is an integral power
!
<
+
/
+
/
b
d
c
p &t& - s X &
t
& = say
Z
V
Then &
!
Rq& !5i&
s &
&
u &!
5%&!5&9
From the above, it can be seen that:
91
~
&
pt s
p
p u
pv
Also, if
& p E
& p V<
& p
& pv q
falls outside the range 0-7, we still get one of the above values:
eg. if
&t
and i&r^
e =+ <
Lb
V
8 V < >
4
dp : f F
F
dp : f
&
_
OM E
MOE
e =+ <
Lb
Note that
+ / bde c f
V f
8V f >
+
/
d
b
c
e
& - b
9
p : t
& &rp e f
b
e =+ <
Lb
Therefore
e =+ <
Lb
&
4
dp e f F p :
F
dp e f
_
b
b
OM E
MOE
&t
F p :i
_
_
_
ie.
Thus the -point DFT
can be obtained from two V -point transforms,
_
one on even input data,
, and one on odd input data,
. Although the fre:
_
_
quency index ranges over values, only V values of
and
need to be
:
_
_
_
computed since
and
are periodic in with period V .
&9
:
92
&t
&t
4H
&t 4
&t
C
&t
4H
&t
&t 4
4H
&t
F p E
F p <
F p V
F pr q
F pt s
F p
F p u
F pv
C
C
&t C
&t
&t
&t
E
p <
p V
p
prq
C
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]
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]
p*:
R
F p :
R
p
:
p :
*
Figure 7.10: Butterfly operation in FFT.
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
E
because multiplications by factors such as p : , p : b
|e BU V (approximately
e
p : and p: are really just complex additions and subtractions).
V
32
256
1,024
(DFT)
1,024
65,536
1,048,576
:V
,U V
(FFT) saving
80
92
1,024
98
5,120
99.5
-point
95
2. pack the data with zeroes; e.g. include 16 zeroes with the 48 data points
(for &vR ) and compute a $ -point FFT. (However, you should again be
wary of abrupt transitions between the trailing (or leading) edge of the data
and the following (or preceding) zeroes; a better approach might be to pack
the data with more realistic dummy values).
96