Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
MEH329DIGITAL SIGNAL PROCESSING
-8-Discrete Fourier Transform
Discrete Fourier TransformIntroduction
MEH329 Digital Signal Processing 2
• Frequency analysis should be performed inreal applications.
• X(ejΩ) is not computationally convenientrepresentation (continuous function of freq.)!
Discrete Fourier TransformDTFT of Finite Length Signal
MEH329 Digital Signal Processing 3
2
1
nj j n
n n
X e x n e
11 211 1 21 ...j nj n j njX e x n e x n e x n e
Discrete Fourier TransformFrequency-Domain Sampling
MEH329 Digital Signal Processing 4
2
2
21
0
, 0,1,..., 1
j kj N
kN
N j knN
n
X k X e X e
x n e k N
for example:
2 4 6 8 10 12 140, , , , , , , for 8
8 8 8 8 8 8 8N
Discrete Fourier Transform (DFT)
Discrete Fourier TransformFrequency-Domain Sampling
MEH329 Digital Signal Processing 5
2 4 6 8 10 12 140, , , , , , , for 8
8 8 8 8 8 8 8
3 30, , , , , , ,
4 2 4 4 2 4
N
jX e
......
4
2
3
4
3
4
2
4
0
2
8
j
kX e
Discrete Fourier Transform
MEH329 Digital Signal Processing 6
• DTFT: 2
0
1
2j j nx n X e e d
2 2k d dk
N N
21
0
1 , 0,1,..., 1
N j knN
k
x n X k e n NN
Inverse Discrete Fourier Transform (IDFT)
Discrete Fourier Transform
MEH329 Digital Signal Processing 7
• Alternative representation of DFT and IDFT:
1
0
, 0,1,..., 1N
knN
n
X k x n W k N
1
0
1 , 0,1,..., 1
Nkn
Nk
x n X k W n NN
MEH329 Digital Signal Processing 8
Discrete Fourier Transform
MEH329 Digital Signal Processing 9
• If we write n→n+N or k→k+N in DFT and IDFT,are the results change?
2 21 12
0 0
(periodic with !)
N Nj k n N j kn j kN N
n n
x n e x n e e
X k N
2 21 1
0 0
1 1
(periodic with !)
N Nj k n N j knN N
k k
X k e X k eN N
x n N
Discrete Fourier Transform
MEH329 Digital Signal Processing 10
• Example: Find the DFT of [2 3 1]x n
223
0
, 0,1, 2j kn
n
X k x n e k
2
0
0
0 0 1 2 6j
n
X x n e x x x
2 2 423 3 3
0
1 0 1 2 1.732j n j j
n
X x n e x x e x e j
4 4 823 3 3
0
2 0 1 2 1.732j n j j
n
X x n e x x e x e j
Discrete Fourier TransformPeriodic Sequences
MEH329 Digital Signal Processing 11
• Given a periodic sequence with period N
• The Fourier series representation:
• The Fourier series representation of continuous-time periodic signals require infinite manycomplex exponentials.
[ ] [ ]x n x n rN
2 /1[ ] j N kn
k
x n X k eN
[ ]x n
Discrete Fourier TransformPeriodic Sequences
MEH329 Digital Signal Processing 12
• Not that for discrete-time periodic signals
• Due to the periodicity of the complexexponential we only need N exponentials fordiscrete time Fourier series
1
2 /
0
1[ ]
Nj N kn
k
x n X k eN
2 / 2 / 2 2 /j N k mN n j N kn j mn j N kne e e e
Discrete Fourier TransformDiscrete Fourier Series
MEH329 Digital Signal Processing 13
• A periodic sequence in terms of Fourier seriescoefficients
• The Fourier series coefficients can be obtainedvia
1
2 /
0
[ ]N
j N kn
n
X k x n e
1
2 /
0
1[ ]
Nj N kn
k
x n X k eN
Discrete Fourier TransformDiscrete Fourier Series
MEH329 Digital Signal Processing 14
• Analysis eq.:
• Synthesis eq.:
2 /j NNW e
1
0
1[ ]
Nkn
Nk
x n X k WN
1
0
[ ]N
knN
n
X k x n W
Discrete Fourier TransformDiscrete Fourier Series
MEH329 Digital Signal Processing 15
• Example: DFS of periodic impulse train
1[ ]
0r
n rNx n n rN
else
1 1
2 / 2 / 2 / 0
0 0
[ ] [ ] 1N N
j N kn j N kn j N k
n n
X k x n e n e e
1
2 /
0
1[ ]
Nj N kn
r k
x n n rN eN
Discrete Fourier TransformDiscrete Fourier Series
MEH329 Digital Signal Processing 16
• For N=4:
32 /4
0
30
0
32 /4 2 /4 4 /4 6 /4
0
32 /4 2 4 /4 8 /4 12 /4
0
32 /4 3 6 /4 12 /4 18 /4
0
2 /4 4
1[ ]
4
1[0] 1
4
1 1[1] 1 0
4 4
1 1[2] 1 0
4 4
1 1[3] 1 0
4 4
1[4]
4
j kn
k
j
k
j k j j j
k
j k j j j
k
j k j j j
k
j
x n e
x e
x e e e e
x e e e e
x e e e e
x e
3
8 /4 16 /4 24 /4
0
11 1
4k j j j
k
e e e
MEH329 Digital Signal Processing 17
Discrete Fourier TransformDiscrete Fourier Series
MEH329 Digital Signal Processing 18
Discrete Fourier TransformDiscrete Fourier Series
Discrete Fourier TransformDiscrete Fourier Series
MEH329 Digital Signal Processing 19
• Example: DFS of periodic rectangular pulse train
• The DFS coefficients
2 /10 54
2 /10 4 /10
2 /100
sin / 21
sin /101
j kj kn j k
j kn
keX k e e
ke
Discrete Fourier TransformDiscrete Fourier Series
MEH329 Digital Signal Processing 20
Discrete Fourier TransformProperties of Discrete Fourier Series
MEH329 Digital Signal Processing 21
• Linearity:
• Shift:
• Duality:
1 1
2 2
1 2 1 2
DFS
DFS
DFS
x n X k
x n X k
ax n bx n aX k bX k
2 /
2 /
DFS
DFS j km N
DFSj nm N
x n X k
x n m e X k
e x n X k m
DFS
DFS
x n X k
X n Nx k
Discrete Fourier TransformProperties of Discrete Fourier Series
MEH329 Digital Signal Processing 22
• Proof (Duality):
n↔k:
1
2 /
0
[ ]N
j N kn
n
X k x n e
1
2 /
0
1[ ]
Nj N kn
k
x n X k eN
12 /
0
12 /
0
[ ]
[ ]
Nj N kn
k
Nj N kn
n
Nx n X k e
Nx k X n e
Discrete Fourier TransformProperties of Discrete Fourier Series
MEH329 Digital Signal Processing 23
Discrete Fourier TransformProperties of Discrete Fourier Series
MEH329 Digital Signal Processing 24
Discrete Fourier TransformProperties of Discrete Fourier Series
MEH329 Digital Signal Processing 25
• Periodic Convolution:
1 1
2 2
DFS
DFS
x n X k
x n X k
3 1 2X k X k X k
1
3 1 20
1
2 10
N
m
N
m
x n x m x n m
x m x n m
MEH329 Digital Signal Processing 26
MEH329 Digital Signal Processing 27
Discrete Fourier TransformDFS – DFT Relation
Discrete Fourier TransformDFS – DFT Relation
MEH329 Digital Signal Processing 28
1Nn0 of outside 0nx
r
x n x n rN
• The DFS coefficients of the periodic sequence aresamples of the DTFT of x[n].
• Since x[n] is of length N there is no overlap betweenterms of x[n-rN] and we can write the periodicsequence as
mod NN
x n x n x n
Discrete Fourier TransformDFS – DFT Relation
MEH329 Digital Signal Processing 29
• We choose one period of as the Fouriertransform of x[n]
kX~
mod NN
X k X k X k
0 1
0
X k k NX k
else
Discrete Fourier TransformDFS – DFT Relation
MEH329 Digital Signal Processing 30
1
2 /
0
[ ]N
j N kn
n
X k x n e
1
2 /
0
1[ ]
Nj N kn
k
x n X k eN
,0 1[ ]
0 ,otherwise
x n n Nx n
,0 1[ ]
0 ,otherwise
X k k NX k
1
2 /
0
[ ]N
j N kn
n
X k x n e
1
2 /
0
1[ ]
Nj N kn
k
x n X k eN
DFT Pair
Discrete Fourier TransformDiscrete Fourier Transform
MEH329 Digital Signal Processing 31
• To evaluate the relation between size of asignal (L) and the number of frequency sample(N).
• N must be equal or greater than L toreconstruct the signal without a loss.
• If L is bigger than N, aliasing occurs in the timedomain!
MEH329 Digital Signal Processing 32
MEH329 Digital Signal Processing 33
Discrete Fourier TransformProperties of DFT
MEH329 Digital Signal Processing 34
• Linearity:
1 1
2 2
1 2 1 2
DFT
DFT
DFT
x n X k
x n X k
ax n bx n aX k bX k
MEH329 Digital Signal Processing 35
Discrete Fourier TransformProperties of DFT
MEH329 Digital Signal Processing 36
• Circular Shift:
2 / 0 n N-1
DFT
j k N mDFT
N
x n X k
x n m X k e
The n Modulo N Operation
MEH329 Digital Signal Processing 37
Circular Shift of a Sequence
MEH329 Digital Signal Processing 38
Circular Shift of a Sequence
MEH329 Digital Signal Processing 39
Circular Shift of a Sequence
MEH329 Digital Signal Processing 40
Circular Shift of a Sequence
MEH329 Digital Signal Processing 41
Circular folding (or reversal)
MEH329 Digital Signal Processing 42
Circular folding (or reversal)
MEH329 Digital Signal Processing 43
Circular Convolution:
MEH329 Digital Signal Processing 44
Discrete Fourier TransformProperties of DFT
MEH329 Digital Signal Processing 45
• Circular Convolution:
1
3 1 20
N
Nm
x n x m x n m
1
3 2 10
N
Nm
x n x m x n m
Discrete Fourier TransformProperties of DFT
MEH329 Digital Signal Processing 46
• Example: Circular convolution
• DFT of each sequence
• Multiplication of DFTs
• the inverse DFT
1 2
1 0 1
0
n Lx n x n
else
21
1 20
0
0
N j knN
n
N kX k X k e
else
2
3 1 2
0
0
N kX k X k X k
else
3
0 1
0
N n Nx n
else
Circular Convolution-Graphical Interpretation
MEH329 Digital Signal Processing 47
Linear Convolution (Review)
MEH329 Digital Signal Processing 48
Linear Convolution Using DFT
MEH329 Digital Signal Processing 49
Linear Convolution Using DFT
MEH329 Digital Signal Processing 50
Linear Convolution Using DFT
MEH329 Digital Signal Processing 51
Discrete Fourier TransformProperties of DFT
MEH329 Digital Signal Processing 52
• Example: if N=2L=12• DFT of each sequence
• Multiplication of DFTs
2
1 2 2
1
1
Lkj
N
kjN
eX k X k
e
22
3 2
1
1
Lkj
N
kjN
eX k
e
Result of the linearconvolution!
Duality Property
MEH329 Digital Signal Processing 53
Discrete Fourier TransformWindowing
54
• Periodicity causes unwanted spectral effects infrequency domain
• This issue is called as spectral leakage.
0 2 4 6 8 10 12 14 16-1
0
1x[n]
0 2 4 6 8 10 12 14 160
5
10DFT Coefficients
0 5 10 15 20 25 30 35 40 45-1
0
1x~[n]
0 5 10 15 20-1
0
1x[n]
0 5 10 15 200
5
10DFT Coefficients
0 10 20 30 40 50 60 70-1
0
1x~[n]
Spectral leakage
Windowing Property
MEH329 Digital Signal Processing 55
Discrete Fourier TransformWindowing
56
• Windowing is utilized to overcome this effect.• Well known window functions:
• Triangular• Trapezoid• Hamming• Hanning• Blackman• Parzen• Welch• Nuttall• Kaiser
0 5 10 15 20 250
0.2
0.4
0.6
0.8
1
Window Function (Hamming)
Discrete Fourier TransformWindowing
57
• The effect of windowing:
0 5 10 15 20-1
0
1x[n]
0 5 10 15 200
5
10DFT Coefficients
0 10 20 30 40 50 60 70-1
0
1x~[n]
0 5 10 15 20-1
0
1Windowed Signal
0 5 10 15 200
5
10DFT Coefficients
0 10 20 30 40 50 60 70-1
0
1Periodic form of windowed function
Discrete Fourier TransformLinear Transform Perspective
MEH329 Digital Signal Processing 58
• Computation of each point of the DFT can beaccomplished by N complex multiplications and(N-1) complex additions.
• The N point DFT coefficients can be computed in atotal of N^2 complex multiplications and (N-1)Ncomplex additions.
1
0
[ ] , 0,1,..., 1N
knN
n
X k x n W k N
1
0
1[ ] , n 0,1,..., 1
Nkn
Nk
x n X k W NN
Discrete Fourier TransformLinear Transform Perspective
MEH329 Digital Signal Processing 59
N=4 point DFT calculation:
10 0 0 0 0
0
10 1 2 3
0
10 2 4 6
0
10 3 6 9
0
0 [ ] 0 1 2 3
1 [ ] 0 1 2 3
2 [ ] 0 1 2 3
3 [ ] 0 1 2 3
Nn
N N N N Nn
NnN N N N N
n
NnN N N N N
n
NnN N N N N
n
X x n W x W x W x W x W
X x n W x W x W x W x W
X x n W x W x W x W x W
X x n W x W x W x W x W
Discrete Fourier TransformLinear Transform Perspective
MEH329 Digital Signal Processing 60
Alternative representation:
0
1
1
N
x
x
x N
x
0
1
1
N
X
X
X N
X
1 2 1
2 12 4
1 2 1 1 1
1 1 1 1
1
1
1
NN N N
NN N N N
N N N NN N N
W W W
W W W
W W W
W
1 1N N N N NN
x W X W X
N N NX W x
Discrete Fourier TransformLinear Transform Perspective
MEH329 Digital Signal Processing 61
Example:0
1
2
3
N
x1 2 3 1 2 3 1 2 1
4 4 4 4 4 4 4 4 42 4 6 2 0 2 2 0 2
4 4 4 4 4 4 4 4 43 6 9 3 2 1 1 2 1
4 4 4 4 4 4 4 4 4
1 1 1 1 1 1 1 1 1 1 1 1
1 1 1
1 1 1
1 1 1
N
W W W W W W W W W
W W W W W W W W W
W W W W W W W W W
W
1 1 1 1 0 6
1 1 1 2 2
1 1 1 1 2 2
1 1 3 2 2
N N N
j j j
j j j
X W x