How many complex multiplies and adds are required to
convolve two NN-pt
sequences?
yn=∑m=0N-1xmhn-m
y
n
m
0
N
1
x
m
h
n
m
There are
2N-1
2
N
1
non-zero output points and each will be computed
using NN complex mults and
N-1
N
1
complex adds. Therefore,
Total Cost=2N-1N+N-1≈ON2
Total Cost
2
N
1
N
N
1
O
N
2
-
Zero-pad these two sequences to length
2N-1
2
N
1
, take DFTs using the FFT algorithm
xn→Xk
x
n
X
k
hn→Hk
h
n
H
k
The cost is
O2N-1log2N-1=ONlogN
O
2
N
1
2
N
1
O
N
N
-
Multiply DFTs
XkHk
X
k
H
k
The cost is
O2N-1=ON
O
2
N
1
O
N
-
Inverse DFT using FFT
XkHk→yn
X
k
H
k
y
n
The cost is
O2N-1log2N-1=ONlogN
O
2
N
1
2
N
1
O
N
N
So the total cost for direct convolution of two
NN-point sequences is
ON2
O
N
2
. Total cost for convolution using FFT algorithm is
ONlogN
O
N
N
. That is a huge savings (Figure 1).
-
xn
x
n
is an NN-point signal
(Figure 2).
-
Xk=∑n=0N-1xnⅇ-ⅈ2πNkn=∑n=0N-1xnWNkn
X
k
n
0
N
1
x
n
2
N
k
n
n
0
N
1
x
n
WN
k
n
where
WN=ⅇ-ⅈ2πN
WN
2
N
is a "twiddle factor" and the first part is the basic DFT.
Xk=XF=kN=∑n=0N-1xnⅇ-ⅈ2πFn
X
k
X
F
k
N
n
0
N
1
x
n
2
F
n
where
XF=kN
X
F
k
N
is the DTFT of
xn
x
n
and
∑n=0N-1xnⅇ-ⅈ2πFn
n
0
N
1
x
n
2
F
n
is the DTFT of
xn
x
n
at digital frequency
FF. This is a sample of the
DTFT. We can do frequency domain analysis on a computer!
xn=1N∑n=0N-1Xkⅇⅈ2πNkn
x
n
1
N
n
0
N
1
X
k
2
N
k
n
-
Build
xn
x
n
using Simple complex
sinusoidal building block signals
-
Amplitude of each complex sinusoidal building block in
xn
x
n
is
1NXk
1
N
X
k
xn⊕hn↔XkHk
↔
x
n
h
n
X
k
H
k
(1)
-
Zero pad
xn
x
n
and
hn
h
n
to
length=lengthx+lengthh-1
length
length
x
length
h
1
-
Zero padding increases frequency resolution in DFT
domain (Figure 3)
-
Efficient computational algorithm for calculating the
DFT
-
"Divide and conquer"
-
Break signal into even and odd samples keep taking
shorter and shorter DFTs, then build
NN-pt DFT by cleverly
combining shorter DFTs
-
NN-pt DFT:
ON2↓ONlog2N
O
N
2
O
N
2
N
-
Use FFT's to compute circular convolution of zero-padded
signals
-
Much faster than regular convolution if signal lengths
are long
-
ON2↓ONlog2N
O
N
2
O
N
2
N
See Figure 4.