ce 40763 digital signal processing fall 1992 discrete fourier transform (dft)
DESCRIPTION
CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT). Hossein Sameti Department of Computer Engineering Sharif University of Technology. Motivation. The DTFT is defined using an infinite sum over a discrete time signal and yields a continuous function X(ω) - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/1.jpg)
CE 40763Digital Signal Processing
Fall 1992
Discrete Fourier Transform (DFT)Hossein Sameti
Department of Computer Engineering Sharif University of Technology
![Page 2: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/2.jpg)
2
Motivation The DTFT is defined using an infinite sum over a
discrete time signal and yields a continuous function X(ω)◦ not very useful because the outcome cannot be stored on
a PC. Now introduce the Discrete Fourier Transform
(DFT), which is discrete and can be stored on a PC.
We will show that the DFT yields a sampled version of the DTFT.
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 3: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/3.jpg)
Review of Transforms
3
dtetxtxCTFTX tj)()}({)(
n
njenxnxDTFTX )()}({)(
)(txC.
)(nxD.
C.
C.
n
nznxnxzzX )()}({)()(nxD. Complex
Inf. orFinite
1
0
2~~~)()}({)(
N
n
Nknj
enxnxDFSkX
)(~
nxD. Int.
periodicperiodic
1
0
2
)()}({)(N
n
Nknj
enxnxDFTkX
)(nxD.
Int.finite finite
![Page 4: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/4.jpg)
Review of Transforms
4
dtetxtxCTFTX tj)()}({)(
n
njenxnxDTFTX )()}({)(
)(tx
)(nx
n
nznxnxzzX )()}({)()(nx
1
0
2~~~)()}({)(
N
n
Nknj
enxnxDFSkX
)(~
nx
1
0
2
)()}({)(N
n
Nknj
enxnxDFTkX
)(nx
![Page 5: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/5.jpg)
Discrete Fourier Series (DFS)
5
periodNkNnxnx :)()(~~
• Decompose in terms of complex exponentials that are periodic with period N.
)(~
nx
• How many exponentials? N
1,...,1,0)(2
Nkene Nknj
k
1
0
2~)(1)(
N
k
Nknj
ekXN
nx
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 6: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/6.jpg)
Discrete Fourier Series (DFS)
6
1,...,1,0)(2
Nkene Nknj
k
Exponentials that are periodic with period N.
)()( nene rNkk arbitrary integer
* Proof:
NnrNkj
rNk ene)(2
)(
NrnNj
Nknj
rNk eene 22
.)(
)()(2
neene kN
knj
rNk
1
....)()()( 20 nenene NN....)()()( 1211 nenene NN
![Page 7: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/7.jpg)
7
Discrete Fourier Series (DFS)
1
0
2~)(1)(
N
k
Nknj
ekXN
nx
How to find X(k)?
Answer:
1
0
2~)()(
N
n
Nknj
enxkX
Proof : substitute X(k) in the first equation.
• It can also easily be shown that X(k) is periodic with period N:
)()( rNkXkX arbitrary integer
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 8: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/8.jpg)
DFS Pairs
8
Analysis:
1
0
2~~)()(
N
n
Nknj
enxkX
Synthesis:
1
0
2~~)(1)(
N
k
Nknj
ekXN
nx
Periodic N pt.seq. in time domain
Periodic N pt.seq. in freq. domain
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 9: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/9.jpg)
Example
9
n0
1
rrNnnx )()(
~
1 1
N
1
0
2~~)()(
N
nN
knj
enxkX
1
0
2
)(N
nN
knj
en
Nkj
e)0(2
1
n0
1 1
N
…1
…
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 10: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/10.jpg)
Example (cont.)
10
rrNnnx )()(
~
1
0
2~~)()(
N
nN
knj
enxkX
1
0
2
)(N
nN
knj
en
Nkj
e)0(2
1
1
0
2~~)(1)(
N
k
Nknj
ekXN
nx
1
0
21 N
kN
knj
eN
(eq.1)
(eq.2)
(eq.1) & (eq.2)
rrNn )(
1
0
21 N
kN
knj
eN
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 11: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/11.jpg)
Shift property:
Periodic convolution:
Properties of DFS
11
)(~
kX)(~
nx
)(~2 0
kXe Nkn
j
)( 0
~nnx
3
~
2
~
1
~xxx
Period N
1
02
~
1
~)()(
N
mmnxmx
)()()( 3~
2~
1~
kXkXkX Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 12: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/12.jpg)
Periodic convolution - Example
12Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 13: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/13.jpg)
13
In the list of properties:
Properties of DFS
1,...,1,0)(2
Nkene Nknj
k
=
=
Where:
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 14: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/14.jpg)
Properties of DFS
14Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 15: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/15.jpg)
Properties of DFS
15Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 16: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/16.jpg)
Discrete Fourier Transform
16
)(kX)(nx
N pt. N pt.
DFTN pt. N pt.
DFT
DTFT
DFSHossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 17: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/17.jpg)
1) Start with a finite-length seq. x(n) with N points (n=0,1,…, N-1).
2) Make x(n) periodic with period N to get
Deriving DFT from DFS
17
)(~
nx
)()()(~
nRnxnx N Extracts one period of )(~
nx
otherwise
NnnRN 0
1,...,1,01)(
rrNnxnx )()(
~
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 18: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/18.jpg)
3) Take DFS of 4) Take one period of to get DFT of x(n):
18
Deriving DFT from DFS (cont.))(
~nx )(
~kX
)(~
kX )(kX
)()()(~
kRkXkX N
)(nx )(~
nx )(~
kX )(kX
N pt. N pt.N pt.periodic
N pt.periodic
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 19: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/19.jpg)
Example
19
n0 1 2 3
12
3
1
)(nx
n0 1 2 3
12
3
1
)(~
nx
k0 1 2 3
k0 1 2 3
)(~
kX
)(kX
12
3
1 12
3
1
![Page 20: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/20.jpg)
Definition of DFT:
Discrete Fourier Transform
20
otherwise
NkenxkXN
n
Nknj
0
0)()(1
0
2
N pt. DFT of x(n)
otherwise
NnekXNnx
N
k
Nknj
0
0)(1)(
1
0
2
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 21: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/21.jpg)
Example
21
otherwise
nnx
0
501)( ?)( kX
otherwise
kenxkX n
knj
0
50)()(4
0
52
otherwise
ke
ekX kj
kj
0
501
1)( 5
2
2
otherwise
kkX
005
)(
![Page 22: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/22.jpg)
Example, cont’d
Mehrdad Fatourechi, Electrical and Computer Engineering, University of
British Columbia, Summer 201122
![Page 23: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/23.jpg)
Relationship between DFT and DTFT
23
otherwise
NkenxkXN
n
Nknj
0
0)()(1
0
2
n
njenxX )()(
otherwise
NkXkX N
k
0
0)()(
2
DFT thus consists of equally-spaced samples of DTFT.
1
0)(
N
n
njenx
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 24: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/24.jpg)
24
Relationship between DFT and DTFT
)(X
3
8 pt. sequence 8 pt. DFT
7,...,1,08
2 kk
3 2
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 25: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/25.jpg)
M pt. DFT of N pt. Signal
25
otherwise
NkXkX N
k
0
0)()(
2
So far we calculated the N pt. DFT of a seq. x(n) with N non-zero values:
Suppose we pad this N pt. seq. with (M-N) zeros to get a sequence with length M.
n0 1 2 3
12
3
1
)(nx We can now take an M-pt. DFT of the signal x(n)
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 26: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/26.jpg)
26
M pt. DFT of N pt. Signal
otherwise
MkenxkXM
n
Mknj
0
0)()(1
0
2
DFTN pt. M pt.
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 27: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/27.jpg)
Example
27
4 pt. DFT:
otherwise
kenxkX n
knj
0
40)()(3
0
42
6 pt. DFT:
otherwise
kenxkX n
knj
0
60)()(5
0
62
n0 1 2 3
12
3
1
)(nx
8 pt. DFT:
otherwise
kenxkX n
knj
0
80)()(7
0
82
100 pt. DFT:
otherwise
kenxkX n
knj
0
1000)()(99
0
1002
How are these related to each other?
![Page 28: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/28.jpg)
28
M pt. DFT of N pt. Signal
)(X
20
Going from N pt. to 2N pt. DFT
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 29: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/29.jpg)
29
M pt. DFT of N pt. Signal
N pt.DFT
N pt. seq. N pt.
2N pt.DFTN pt. seq.
padded with N zeros
2N pt.
What is the minimum number of N needed to recover x(n)?
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 30: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/30.jpg)
Assume y(n) is a signal of finite or infinite extent.
Problem Statement
30
)}({)( nyDTFTY • Sample at N equally-spaced points.)(Y
)()( 2 kXYN
k
N pt. sequence.
)()}({ nxkXIDFT N pt. sequence.
What is the relationship between x(n) and y(n)?
What happens if N is larger , equal or less than the length of y(n)?
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 31: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/31.jpg)
We start with x(n) and find its relationship with y(n):
Solution to the Problem Statement
31
otherwise
NnekXNnx
N
k
Nknj
0
0)(1)(
1
0
2
otherwise
NneemyNnx
N
k
Nknj
m
Nkmj
0
0))((1)(
1
0
22
)()( 2 kXYN
k
Change the order of summation:
otherwise
NneN
mynxN
k
Nnmkj
m0
01)()(1
0
)(2
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 32: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/32.jpg)
32
Solution to the Problem Statement
However, we have shown that:
otherwise
NneN
mynxN
k
Nnmkj
m0
01)()(1
0
)(2
1
0
2~)(.11)(
N
k r
Nknj
rNneN
nx
rrNnnf )()(
rrNmnmnf )()(
otherwise
Nnmnfmynx m0
0)()()(Convolution with train of delta functions
101)(~
NkkX
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 33: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/33.jpg)
33
Solution to the Problem Statement
otherwise
NnrNnynx r0
0)()(
One period of the replicated version of y(n)
• Examples
If we sample at a sampling rate that is higher than the number of points in y(n), we should be able to recover y(n).
)(Y
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 34: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/34.jpg)
Shift property:
Properties of DFT
34
)()( kXnx DFT N pt. seq.
Nkn
jDFT ekXnnx02
0 )()(
Nk 0
Nk 0
The above relationship is not correct, because of the definition of DFT.
The signal should only be non-zero for the first N points.
Nkn
jDFTN ekXnRnnx
02
0
~)()()(
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 35: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/35.jpg)
35
In the list of properties:
Properties of DFT
1,...,1,0)(2
Nkene Nknj
k
= , =
where:
)()(]))[(( 0
~
0 nRnnxnnx NN
otherwise
NnnRN 0
1,...,1,01)(
and
where:
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 36: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/36.jpg)
36
Summery of Properties of DFT
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 37: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/37.jpg)
37
Summery of Properties of DFT
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 38: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/38.jpg)
Using DFT to calculate linear convolution
38Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 39: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/39.jpg)
We are familiar with, “linear convolution”. Question: Can DFT be used for calculating the linear
convolution? The answer is: NO! (at least not in its current format) We now examine how DFT can be applied in order to
calculate linear convolution.
Convolution
39Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 40: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/40.jpg)
Definitions of convolution
40
3
~
2
~
1
~xxx
1
02
~
1
~)()(
N
mmnxmx
• Linear convolution:
)()()( 321 nxnxnx k
knxkxnx )()()( 213
Application in the analysis of LTI systems
• Periodic convolution:
A seq. with period N
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 41: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/41.jpg)
Definitions of convolution(cont.)
41
321 xxx • Circular convolution:
N pt. seq.
• Circular convolution is closely related to periodic convolution.
)()].()([)()()( 2
~
1
~
213 nRnxnxnxnxnx N
)().()( 213 kXkXkX
N pt. DFT of x1N pt. DFT of x2N pt. DFT of x3
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 42: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/42.jpg)
Example: Circular Convolution
42
)1()(1 nnx
seq.pt.:)(2 NnxCircular convolution?
Make an N pt. seq.)(1 nx
Nn
nn
nx10
11100
)(1
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 43: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/43.jpg)
43
Example: Circular Convolution
![Page 44: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/44.jpg)
Circular Convolution & DFT
44
)()].()([)()()( 2
~
1
~
213 nRnxnxnxnxnx N
We know from DFS properties:
3
~
2
~
1
~xxx )()()( 3
~2
~1
~kXkXkX
)}({)( 1
~
1
~nxDFSkX )}({)( 2
~
2
~nxDFSkX )}({)( 3
~
3
~nxDFSkX
)()()()()( 3~
2~
1~
kRkXkRkXkX NN
)()().( 321 kXkXkX Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 45: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/45.jpg)
45
Circular Convolution & DFT
)()].()([)()()( 2
~
1
~
213 nRnxnxnxnxnx N
)()().( 321 kXkXkX
If we multiply the DFTs of two N pt. sequences, we get the DFT of their circular convolution and not the DFT of their linear convolution.
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 46: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/46.jpg)
Example : Circular Convolution
46
otherwise
Lnnxnx
0
01)()( 21
Calculate N pt. circular convolution of x1 and x2 for the following two cases of N:1) N=L2) N=2L
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 47: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/47.jpg)
47
Case 1: N=L
otherwise
Lnnx
0
101)(1
N pt. DFT of x1
otherwise
LkenxkXL
n
Lknj
0
10)()(1
0
2
otherwise
kLkXkX
00
)()( 21
)().()( 213 kXkXkX
otherwise
kL0
02
otherwise
LnLnx
010
)(3
IDFT
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 48: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/48.jpg)
48
Case 1: N=L
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 49: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/49.jpg)
49
Case 2: N=2L• Pad each signal with L extra zeros to get an 2L pt. seq.:
N=2L pt. DFT of x1
otherwise
LkenxkXL
n
Lknj
0
120)()(12
0
22
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 50: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/50.jpg)
50
Case 2: N=2L
Same as linear convolution!!
![Page 51: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/51.jpg)
Our hypothesis is that if we pad two DT signals with enough zeros so that its length becomes N, we can use DFT to calculate linear convolution.
Using DFT to Calculate linear Convolution
51
)(1 nx L pt. seq. LN
)(2 nx P pt. seq. PN
)(*)()( 213 nxnxnx Using DFTGoal: calculate
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 52: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/52.jpg)
52
n
njenxnxDTFTX )()}({)(
Using DFT to Calculate linear Convolution
)(*)()( 213 nxnxnx )()()( 213 XXX
To get DFT, we have to sample the above DTFT at N equally-spaced points:
otherwise
NnrNnxr0
0)(3
NkXkY
23 )()(
)}({ kYIDFTSolution to the problem statement
(Eq.1)
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 53: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/53.jpg)
53
Using DFT to Calculate linear Convolution
Nk
Nk
Nk XXXkY
222123 )()()()(
N pt. DFT of x1 N pt. DFT of x2
otherwise
NnrNnxr0
0)(3
(Eq.2))()()}({ 21 nxnxkYIDFT
Circular convolution
(Eq.1)
(Eq.2))()( 21 nxnx
Replicated version of the linear convolution
On the other hand, we know that:
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 54: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/54.jpg)
In other words, the N pt. circular convolution of two DT signals is the same as their linear convolution, if we make the result of linear convolution periodic with period N and extract one period.
54
Using DFT to Calculate linear Convolution
1)(3 PLnx
1 PLNTo avoid aliasing:
We can thus use DFT in order to calculate the linear convolution of two sequences!
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 55: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/55.jpg)
1) Start with
Algorithm for calculating linear convolution using DFT
55
)(1 nx L pt. seq.
)(2 nx P pt. seq.
3) Pad with N-L zeros to get N points.4) Pad with N-P zeros to get N points.
)(1 nx)(2 nx
5) Calculate the N pt. DFTs of the above two sequences and multiply them together.6) Calculate IDFT of the resulting N pt. sequence.
2) Choose 1 PLN
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 56: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/56.jpg)
Using DFT for linear filtering when one sequence is very long
56
h(n))(nx )(ny
A very long sequence
An FIR filter with a limited number of taps (P)
• Examples of this situation?
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 57: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/57.jpg)
57
Using DFT for linear filtering when one sequence is very long
Solution to the problem
Overlap - add
Main idea: using the following property:)(*)()(*)()(*)]()([ 2121 nhnxnhnxnhnxnx
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 58: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/58.jpg)
Segment the long sequence into non-overlapping chunks of data with the length of L.
Convolve each chunk with h(n) to get (L+P-1) new points.
Add the results of the convolution of all chunks to get the final answer.
Overlap- add method
58Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 59: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/59.jpg)
59
Overlap- add method- Example
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 60: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/60.jpg)
60
Overlap- add method- Example
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 61: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/61.jpg)
61
Overlap- add method- Example
Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
![Page 62: CE 40763 Digital Signal Processing Fall 1992 Discrete Fourier Transform (DFT)](https://reader036.vdocuments.site/reader036/viewer/2022081507/56816371550346895dd44e59/html5/thumbnails/62.jpg)
Discussed DFS and DFT and examined the relationship between DFT and DTFT
Showed how DFT can be used for calculating convolution sum.
Next: Fast Fourier Transform
Summary
62Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology