LECTURE 17: DISCRETE FOURIER TRANSFORM
-
Upload
moana-rosario -
Category
Documents
-
view
498 -
download
33
description
Transcript of LECTURE 17: DISCRETE FOURIER TRANSFORM
ECE 8443 – Pattern RecognitionEE 3512 – Signals: Continuous and Discrete
• Objectives:Derivation of the DFTRelationship to DTFTDFT of Truncated SignalsTime Domain Windowing
• Resources:Wiki: Discrete Fourier TransformWolfram: Discrete Fourier TransformDSPG: The Discrete Fourier TransformWiki: Time Domain WindowsISIP: Java Applet
LECTURE 17: DISCRETE FOURIER TRANSFORM
URL:
EE 3512: Lecture 17, Slide 2
• The Discrete-Time Fourier Transform:
• Not practical for (real-time) computation on a digital computer.
• Solution: limit the extent of the summation to N points and evaluate the continuous function of frequency at N equispaced points:
• MATLAB code for the DFT:
• The exponentials can be precomputedso that the DFT can be computedas a vector-matrix multiplication.
• Later we will exploit the symmetryproperties of the exponential tospeed up the computation (e.g., fft()).
The Discrete-Time Fourier Transform
(analysis)][
)(synthesis2
1][
2
n
njj
njj
enxeX
deeXnx
1
0
/22 ][)(
N
n
Nknjkk
N
j enxXkXeX
EE 3512: Lecture 17, Slide 3
Computation of the DFT
• Given the signal:
31
20
11
06
)2
3sin()sin(2)
2sin(2
)2
3cos()cos(2)
2cos(21
3,2,1,0,1221
]3[]2[]1[]0[
3,2,1,0,][
]1,2,2,1[otherwise0][,1]3[,2]2[,2]1[,1]0[
2/32/
4/)3(24/)2(24/)1(24/)0(2
3
0
4/2
kj
k
kj
k
X
kk
kj
kk
k
keee
exexexex
kenxX
nxxxxx
k
kjkjkj
kjkjkjkj
n
knjk
x
EE 3512: Lecture 17, Slide 4
Symmetry
• The magnitude and phase functions are even and odd respectively.
• The DFT also has “circular” symmetry:
• When N is even, |Xk| is symmetric about N/2.
• The phase, Xk, has odd symmetry about N/2.
)ofconjugatecomplex(][
Therefore,
...,2,1,01
But,
][][
:Let
][
1
0
/2
2
1
0
2/21
0
/)(2
1
0
/2
kk
N
n
NknjkN
nj
N
n
njNknjN
n
NnkNjkN
N
n
Nknjk
XXenxX
nfore
eenxenxX
kNk
enxX
EE 3512: Lecture 17, Slide 5
Inverse DFT
• The inverse transform follows from the DT Fourier Series:
1...,,1,0,1
][1
0
/2
NneXN
nxN
k
Nknjk
EE 3512: Lecture 17, Slide 6
Computation of the Inverse DFT
14/41164
1
))(1()0())(1(64
1
4
1]3[
24/81164
1
)1)(1()0()1)(1(64
1
4
1]2[
24/81164
1
))(1()1)(0()1(64
1
4
1]1[
14
4116
4
1
4
1]0[
4
1][
31
20
11
06
4/183
32
2/310
33
2210
2/332
2/10
3210
4/)3(23
4/)2(22
4/)1(210
jj
jjjjeXeXeXXx
jj
jjeXeXeXXx
jj
jjjjeXeXeXXx
jjXXXXx
eXeXeXXnx
kj
k
kj
k
X
jjj
jjj
jjj
njnjnj
k
EE 3512: Lecture 17, Slide 7
Relationship to the DTFT
• The DFT and the DFT are related by:
• If we define a pulse as:
• The DFT is simply a sampling of theDTFT at equispaced points along thefrequency axis.
• As N increases, the sampling becomesfiner. Note that this is true even whenq is constant increasing N is a way ofinterpolating the spectrum.
1
0
/22 ][)(
N
n
Nknjkk
N
j enxXkXeX
otherwise
qnnx
,0
2...,,2,1,0,1][
)2/sin(
))2/1(sin(
)2/sin(
))2/1(sin(
qeX
eq
eX
j
jqj• q=5, N = 22
• q = 5, N = 88
• q = 5
EE 3512: Lecture 17, Slide 8
DFT of Truncated Signals• What if the signal is not time-limited?
We can think of limiting the sum toN points as a truncation of the signal:
• What are the implications of this in the frequency domain?(Hint: convolution)
• Popular Windows: Rectangular:
Generalized Hanning:
Triangular:
otherwise
Nnnw
nxnwnxw
,0
...,,2,1,0,1][
][][][
otherwise
Nnnw
,0
...,,2,1,0,1][
)1
2cos()1(][
N
nnw
)2
1
2(
2][
N
nN
Nnw
• Rectangular
• Generalized Hanning
• Triangular
EE 3512: Lecture 17, Slide 9
Impact on Spectral Estimation• The spectrum of a windowed
sinewave is the convolution of two impulse functions with the frequency response of the window.
• For two closely spaced sinewaves, there is “leakage” between each sinewave’s spectrum.
• The impact of this leakage can be mitigated by using a window function with a narrower main lobe.
• For example, consider the spectrum of three sinewaves computed using a rectangular and a Hamming window.
• We see that for the same number of points, the spectrum produced by te Hamming window separates the sinewaves.
• What is the computational cost?
EE 3512: Lecture 17, Slide 10
Summary• Introduced the Discrete Fourier Transform as a truncated version of the
Discrete-Time Fourier Transform.
• Demonstrated both the forward and inverse transforms.
• Explored the relationship to the DTFT.
• Compared the spectrum of a pulse.
• Discussed the effects of truncation on the spectrum.
• Introduced the concept of time domain windowing and discussed the impact of windows in the frequency domain.