Digital Signal Processing, IX, Zheng-Hua Tan, 2006 1
Digital Signal Processing, Fall 2006
Zheng-Hua Tan
Department of Electronic Systems Aalborg University, Denmark
Lecture 9: The Discrete Fourier Transform
Course at a glance
Discrete-time signals and systems
Fourier-domain representation
DFT/FFT
System analysis
Filter design z-transform
MM1
MM2
MM9, MM10 MM3
MM6 MM4
MM7, MM8 Sampling and
reconstruction MM5
System structure System
Digital Signal Processing, IX, Zheng-Hua Tan, 2006 3
The discrete-time Fourier transform (DTFT)
The DTFT is useful for the theoretical analysis of signals and systems.
But, according to its definition
computation of DTFT by computer has several problems:
The summation over nis infinite
The independent variable wis continuous
n j n
j x ne
e
X ω − ω
∞
−∞
∑
== [ ] )
(
The discrete Fourier transform (DFT)
In many cases, only finite duration is of concern
The signal itself is finite duration
Only a segment is of interest at a time
Signal is periodic and thus only finite unique values
For finite duration sequences, an alternative Fourier representation is DFT
The summation over nis finite
DFT itself is a sequence, rather than a function of a continuous variable
Therefore, DFT is computable and important for the implementation of DSP systems
DFT corresponds to samples of the Fourier transform
Digital Signal Processing, IX, Zheng-Hua Tan, 2006 5
Part I: The discrete Fourier series
The discrete Fourier series
The Fourier transform of periodic signals
Sampling the Fourier transform
The discrete Fourier transform
Properties of the DFT
Linear convolution using the DFT
The discrete Fourier series
A periodic sequence with period N
Periodic sequence can be represented by a Fourier series, i.e. a sum of complex exponential sequences with frequencies being integer multiples of the
fundamental frequency associated with the
Only Nunique harmonically related complex exponentials since
so
∑
=
k
kn N
ej
k N X
n
x 1 ~[ ] (2 / ) ]
~[ π
]
~[ ]
~x[n = x n+rN
]
~x[n )
/ 2 ( π N
kn N j mn j kn N j n mN k N
j e e e
e (2π/ )( + ) = (2π/ ) 2π = (2π/ )
∑
−= 1 1~[ ] (2 / ) ]
~[ N X k ej N kn
n N
x π
The frequency of the periodic sequence.
Digital Signal Processing, IX, Zheng-Hua Tan, 2006 7
The Fourier series coefficients
The coefficients
The sequence is periodic with period N
For convenience, define
]
~[ ]
~[ ]
~[ 1
0
) )(
/ 2
( X k
e n x N
k X
N
n
n N k N
j =
= +
∑
−=
+
− π
∑
∑
−
=
−
−
=
=
=
1
0
) / 2 ( 1
0
) / 2 (
]
~[ ]
~[
]
~[ ] 1
~[
N
n
kn N j N
k
kn N j
e n x k
X
e k N X
n x
π π
) / 2
( N
j
N e
W = − π
∑
∑
−
=
−
=
−
=
=
1
0 1
0
]
~[ ]
~[ equation Analysis
]
~[ ] 1
~[ equation Synthesis
N
n
kn N N
k
kn N
W n x k
X
W k N X
n x
Very similar equations Æduality
DFS of a periodic impulse train
Periodic impulse train
The discrete Fourier series coefficients
By using synthesis equation, an alternative representation of is
∑
∞−∞
=
−
=
r
rN n n
x[ ] [ ]
~ δ
∑
∑
∑
−=
−
=
− −
=
− = =
= 1
0 ) / 2 ( 1
0 1
0
1 ] 1
~[ ] 1
~[ N
k
kn N j N
k kn N N
k
kn
N e
W N W N
k N X
n
x π
]
~[n x
1 ]
[ ]
~[ 1
0
=
=
∑
−= N
n
kn
WN
n k
X δ
Digital Signal Processing, IX, Zheng-Hua Tan, 2006 9
Part II: The Fourier transform of periodic signals
The discrete Fourier series
The Fourier transform of periodic signals
Sampling the Fourier transform
The discrete Fourier transform
Properties of the DFT
Linear convolution using the DFT
The Fourier transform of periodic signals
Fourier transform of complex exponentials
Fourier transform of
has the required periodicity with period
∑
∑
∞
−∞
=
−
=
−
=
=
k j
N
k
kn N j
N k k
N X e
X
e k N X
n x
2 ) ( ]
~[ ) 2
~(
]
~[ ] 1
~[ 1
0
) / 2 (
ω π π δ
ω
π
]
~x[n
∑ ∑
∑
∞
−∞
=
+
−
=
∞
<
<
∞
−
=
r k
k k
j k
n j k
r a
e X
n e
a n
x k
) 2 (
2 )
(
, ]
[
π ω ω δ
ω π
ω
)
~( jω e
X 2π
Digital Signal Processing, IX, Zheng-Hua Tan, 2006 11
Fourier transform of a periodic impulse train
Periodic impulse train
The discrete Fourier series coefficients
Fourier transform
Finite duration signal ( )
Construct
Its Fourier transform
∑
∞−∞
=
−
=
r
rN n n
p[ ] [ ]
~ δ
∑
∞−∞
=
−
=
k j
N k e N
P 2 )
2 ( )
~( ω πδ ω π
] [n x
1 ] [ ]
~[ 1
0
=
=
∑
−= N
n
kn
WN
n k
P δ
∑
∞−∞
=
−
=
=
k
k N j j
j j
N e k
N X e
P e X e
X 2 )
( ) 2 (
)
~( ) ( )
~( ω ω ω π (2π/ ) δ ω π
] 1 , 0 [ of outside 0
]
[n = N−
x
∑
∑
∞−∞
=
∞
−∞
=
−
=
−
=
=
r r
rN n x rN
n n
x n p n x n
x[ ] [ ]*~[ ] [ ]* ( ) ( )
~ δ
]
~[n x
The Fourier transform of periodic signals
Compare
Conclude that
i.e. the DFS coefficients of are samples of the Fourier transform of the one period of
∑
∞−∞
=
−
=
=
k
k N j j
j j
N e k
N X e
P e X e
X 2 )
( ) 2 (
)
~( ) ( )
~( ω ω ω π (2π/ ) δ ω π
]
~[n x ]
~[n x
∑
∞−∞
=
−
=
k j
N k k
N X e
X 2 )
( ]
~[ ) 2
~( ω π δ ω π
k N j
k N
j X e
e X k
X~[ ] ( (2 / ) ) ( )| (2 / )
π ω ω
π = =
=
⎩⎨
⎧ ≤ ≤ −
= 0, otherwise 1 0
],
~[ ]
[ x n n N
n x
ÆFirst represent it as Fourier series and then calculate Fourier transform
ÅÆ
Digital Signal Processing, IX, Zheng-Hua Tan, 2006 13
Part III: Sampling the Fourier transform
The discrete Fourier series
The Fourier transform of periodic signals
Sampling the Fourier transform
The discrete Fourier transform
Properties of the DFT
Linear convolution using the DFT
Sampling the Fourier transform
An aperiodic sequence and its Fourier transform
Sampling the Fourier transform
generates a periodic sequence in kwith period Nsince the Fourier transform is periodic in with period
∑
∞ −∫
−−∞
=
=
↔
= π
π
ω ω ω
ω ω
π X e e d n
x e
n x e
X j n j j n
n
j ( )
2 ] 1 [ ]
[ )
(
) (
| ) ( ]
~[ (2 / )
) / 2 (
k N j k
N
j X e
e X k
X = ω ω= π = π
ω 2π
Digital Signal Processing, IX, Zheng-Hua Tan, 2006 15
Sampling the Fourier transform
Now we want to see if the sampling sequence is the sequence of DFS coefficients of a sequence this can be done by using the synthesis equation
]
~[ k X
]
~[
] [
]
~[ ] 1 [
] [
] ]
[ 1 [
]
~[ 1
1
0
) ( 1
0
) / 2 ( 1
0
n x
rN n x
m n p m x N W
m x
W e
m N x
W k N X
r
m m
N
k
m n k N N
k
kn N m
km N j N
k
kn N
=
−
=
−
⎥=
⎦
⎢ ⎤
⎣
= ⎡
=
∑
∑
∑ ∑
∑ ∑
∑
∞
−∞
=
∞
−∞
=
∞
−∞
=
−
=
−
−
−
=
∞ −
−∞
=
−
−
=
−
π
]
~[n x
A periodic sequence resulting from aperiodic convolution
Examples
Case 1 Fig 8.8
In this case, the Fourier series coefficients for a periodic sequence are samples of the Fourier transform of one period
Digital Signal Processing, IX, Zheng-Hua Tan, 2006 17
Examples
Case 2 Fig 8.9
In this case, still the Fourier series coefficients for are samples of the Fourier transform of . But, one period of is no longer identical to
This is just sampling in the frequency domain as compared in the time domain discussed before.
] [n x
]
~x[n
] [n x ]
~[n x
Sampling in the frequency domain
The relationship between and one period of in the undersampled case is considered a form of time domain aliasing.
Time domain aliasing can be avoided only if has finite length, just as frequency domain aliasing can be avoided only for signals being bandlimited.
If has finite length and we take a sufficient number of equally spaced samples of its Fourier transform (specifically, a number greater than or equal to the length of ), then the Fourier transform is recoverable from these samples, equivalently is recoverable from .
] [n
x ~x[n]
] [n x
] [n x
] [n x ]
[n
x ~x[n]
Digital Signal Processing, IX, Zheng-Hua Tan, 2006 19
Sampling in the frequency domain
Recovering
i.e. recovering does not require to know its Fourier transform at all frequencies
Application: represent finite length sequence by using Fourier series (coefficients) ÆDFT
] [n x
⎩⎨
⎧ ≤ ≤ −
= 0, otherwise 1 0
],
~[ ]
[ x n n N
n x
] [n x
] [ ]
~[ ]
~[ , ]
~[ ]
[n x n DFS X k x n xn
x → → → →
Sampling the Fourier transform
Fourier transform
Discrete-time Fourier transform
Discrete Fourier transform
∫
∑
−
∞ −
−∞
=
=
=
π π
ω ω
ω ω
π X e e dω n
x
e n x e
X
n j j
n j n
j
) 2 (
] 1 [
] [ )
(
∫
∫
∞
∞
−
Ω
∞
∞
−
Ω
−
Ω Ω
=
= Ω
d e j X t
x
dt e t x j
X
t j t j
) 2 (
) 1 (
) ( )
( π
kn N N j
kn N N j
n
e k N X
n x
e n x k
X
) / 2 1 (
) / 2 1 (
0
] 1 [
] [
] [ ]
[
π π
∑
∑
−
− −
=
=
=
Digital Signal Processing, IX, Zheng-Hua Tan, 2006 21
Part IV: The DFT
The discrete Fourier series
The Fourier transform of periodic signals
Sampling the Fourier transform
The discrete Fourier transform
Properties of the DFT
Linear convolution using the DFT
The discrete Fourier transform
Consider a finite length sequence of length N samples (if smaller than N, appending zeros)
Construct a periodic sequence
Assuming no overlap btw
Recover the finite length sequence
To maintain a duality btw the time and frequency domains, choose one period of as the DFT
] [n x
∑
∞−∞
=
−
=
r
rN n x n
x[ ] [ ]
~
] [n rN x −
⎩⎨
⎧ ≤ ≤ −
= 0, otherwise 1 0
],
~[ ]
[ x n n N
n x
] )) [((
)]
modulo [(
]
~[
n N
x N n
x n
x = =
]
~[ k X
⎪⎩
⎪⎨
⎧ ≤ ≤ −
= ~[ ], 0 1 ]
[ X k k N
k X
Digital Signal Processing, IX, Zheng-Hua Tan, 2006 23
The DFT
Periodic sequence and DFS coefficients
Since summations are calculated btw 0 and (N-1)
∑
∑
−
=
−
−
=
=
=
1
0 1
0
]
~[ ] 1
~[
]
~[ ]
~[
N
k
kn N N
n
kn N
W k N X
n x
W n x k
X
⎪⎩
⎪⎨
⎧ ≤ ≤ −
=
∑
−=
−
otherwise
, 0
1 0
, ] 1 [
] [
1
0
N n W
k N X
n x
N
k
kn N
⎪⎩
⎪⎨
⎧ ≤ ≤ −
=
∑
−=
otherwise
, 0
1 0
, ] ] [
[
1
0
N k W
n k x
X
N
n
kn N
∑
−=
= 1 − 0
] 1 [
] [
N
k
kn
WN
k N X
n x
∑
−=
= 1
0
] [ ] [
N
n
kn
WN
n x k
X
Generally
The DFT
A finite or periodic sequence has only Nunique values, x[n]for 0<=n<N
Spectrum is completely defined by N distinct frequency samples
DFT: uniform sampling of DTFT spectrum
Digital Signal Processing, IX, Zheng-Hua Tan, 2006 25
The DFT of a rectangular pulse
Example 8.7 pp.561
The DFT of a rectangular pulse
Digital Signal Processing, IX, Zheng-Hua Tan, 2006 27
Part V: Properties of the DFT
The discrete Fourier series
The Fourier transform of periodic signals
Sampling the Fourier transform
The discrete Fourier transform
Properties of the DFT
Linear convolution using the DFT
Properties of the DFT – linearity
Linearity
The lengths of sequences and their DFTs are all equal to the maximum of the lengths of and
] [ ] [ ]
[ ]
[ 2 1 2
1 n bx n aX k bX k
ax
DFT↔ +
+
]
1[n
x x2[n]
Digital Signal Processing, IX, Zheng-Hua Tan, 2006 29
Circular shift of a sequence
Given
Then
] [ ]
[ ] [
] [ ] [
) / 2 ( 1
1 n X k e X k
x
k X n x
m N k DFT j
DFT
π
= −
↔
↔
⎩⎨
⎧ = − = − ≤ ≤ −
= 0, otherwise 1 0
], )) [((
]
~[ ]
~[ ]
[ 1
1
N n m
n x m n x n n x
x N
Circular shift of a sequence – an example
Digital Signal Processing, IX, Zheng-Hua Tan, 2006 31
Duality
1 0
], )) [((
] [
] [ ] [
−
≤
≤
−
↔
↔
N k k
Nx n
X
k X n x
N DFT
DFT
Circular convolution
In linear convolution, one sequence is multiplied by a time –reversed and linearly shifted version of the other. For convolution here, the second sequence is circularly time reversed and circularly shifted. So it is called an N-point circular convolution
1 0
, ] )) [((
] [
1 0
, ] )) [((
] )) [((
1 0
, ]
~ [ ]
~[ ] [
1
0
2 1 1
0
2 1
1
0
2 1 3
−
≤
≤
−
=
−
≤
≤
−
=
−
≤
≤
−
=
∑
∑
∑
−
=
−
=
−
=
N n m
n x m x
N n m
n x m x
N n m
n x m x n
x
N
m
N N
m
N N
N
m
] [ N ] [ ]
[ 1 2
3 n x n x n
x =
Digital Signal Processing, IX, Zheng-Hua Tan, 2006 33
Circular convolution with a delayed impulse
The delayed impulse sequence x1[n]=δ[n−n0]
] [ ]
[ ] [
2 3
1
0 0
k X W k X
W k X
kn N kn N
=
=
Summary of properties of the DFT
Digital Signal Processing, IX, Zheng-Hua Tan, 2006 35
Part VI: Linear convolution of the DFT
The discrete Fourier series
The Fourier transform of periodic signals
Sampling the Fourier transform
The discrete Fourier transform
Properties of the DFT
Linear convolution using the DFT
Linear convolution using the DFT
Procedure
Compute the N-point DFTs and of two sequences and , respectively
Compute the product of
Compute the sequence as the inverse DFT of
As we know, the multiplication of DFTs corresponds to a circular convolution of the sequences. To obtain a linear convolution, we must ensure that circular convolution has the effect of linear convolution.
]
1[k
X X2[k] ]
1[n x
1 0
for ] [ ] [ ]
[ 1 2
3 k = X k X k ≤k ≤N−
X ]
3[k X
]
2[n x
] [ N ] [ ]
[ 1 2
3 n x n x n
x =
Digital Signal Processing, IX, Zheng-Hua Tan, 2006 37
Linear convolution of two finite-length sequences
∑
∞−∞
=
−
=
m
m n x m x n
x3[ ] 1[ ] 2[ ]
The circular convolution corresponding to is identical to the linear convolution corresponding to if the length of DFTs satisfies
Circular convolution as linear convolution with alaising
⎪⎩
⎪⎨
⎧ − ≤ ≤ −
=
=
−
≤
≤
=
−
≤
≤
=
=
∑
∞−∞
=
otherwise
, 0
1 0
, ] ] [
[
: ] [ of DFT inverse the
] [ ] [ ] [ So,
1 0
), (
) (
] [ Also
1 0
), (
] [ : DFT a Define
) ( ) ( ) ( : ] [ of ansform Fourier tr
3 3
3 2 1 3
) / 2 ( 2 ) / 2 ( 1 3
) / 2 ( 3 3
2 1
3 3
N n rN
n n x
x
k X
k X k X k X
N k e
X e
X k X
N k e
X k X
e X e X e
X n x
p r
N k j N
k j
N k j
j j
j
π π
π
ω ω
ω
] [ ]
[ 2
1k X k X
] [ N ] [ ]
[ 1 2
3 n x n x n
x p =
) ( )
( 2
1
ω
ω j
j X e
e X
−1 +
≥L P N
Digital Signal Processing, IX, Zheng-Hua Tan, 2006 39
Circular convolution as linear convolution with alaising
Summary
The discrete Fourier series
The Fourier transform of periodic signals
Sampling the Fourier transform
The discrete Fourier transform
Properties of the DFT
Linear convolution using the DFT
Digital Signal Processing, IX, Zheng-Hua Tan, 2006 41
Course at a glance
Discrete-time signals and systems
Fourier-domain representation
DFT/FFT
System analysis
Filter design z-transform
MM1
MM2
MM9, MM10 MM3
MM6 MM4
MM7, MM8 Sampling and
reconstruction MM5
System structure System