EEO 401 Note Set 21 - Rev2
EEO 401 Note Set 21 - Rev2
EEO 401 Note Set 21 - Rev2
N-pt
DFT
3/18
h(0) h(1) … h(N-1)
DFT Theory and Cyclic Convolution
A: Not Necessarily!!!!
DFT Theory (Sect. 7.2.2 in Proakis & Manolakis) tells us:
IDFT{H f [k ] X f [k ]} = h[n ] ⊕
* x[ n ]
Circular (Cyclic) Convolution
Thus… this block diagram gives something called cyclic
convolution, not the “ordinary” convolution we want!!!
Original Signals:
x[n] Length N1 = 9
h[n] Length N2 = 5
m
h[-m]
(flip, no shift – since n=0, multiply and add up)
m
5/18
Linear Convolution for the Example (cont.)
Last Non-Zero Output is at n = N1 + N2 – 2 = 12:
x[m]
m
(flip, shift by N1 + N2 – 2 = 12, multiply and add up)
h[12 - m]
6/18
Cyclic Convolution for the Example
Now… What does cyclic convolution give for these 2 signals:
“Original” Signals: 1. Zero-Pad Shorter Signal to Length of Longer One
2. Then Periodize Each
Note: If I try to compute the output for n = 9 Exactly the same case as for n = 0!!
Thus, the output is cyclic (i.e., periodic) with unique values for n = 0, 1, …. 8
In General: Length of Output of Cyclic Convolution = max{N1 , N2}
8/18
Making Cyclic = Linear Convolution
So…. Some of the output values of cyclic conv are different from linear conv!!!
Some of the output values of cyclic conv are same as linear conv
And….
The length of cyclic conv differs from the length of linear conv!!!
9/18
Simple Frequency-Domain Implementation
of FIR Filtering X(0)H(0)
X(1)H(1) If K is Strictly > N1+N2−1
: Then there will be extra zeros
X(K-1)H(K-1) here that can be ignored
x(0)
x(1) y(0)
: y(1)
K-pt K-pt
x(N1-1) :
FFT IFFT
0 :
: y(K-1)
0 K-pt The DFT of
FFT h(n) is usually
Pre-Computed
Zero-Pad Both to
Length K ≥ N1+N2−1
h(0) h(1) … h(N2-1) 0 … 0
Why Do This?
The FFT’s Efficiency Makes This Faster
Than Time-Domain Implementation
(In Many Cases) 10/18
Problems with the Simple FD Implementation
Q: What if N1 >> N2?
A: Then, need Really Big FFT Not Good!!!
(Input signal much longer than filter length)
Also… can’t get any output samples until after whole signal is
available and FFT processing is done. Long Delay.
z[n ] = ( x * h )[n ] Use the Simple
= ∑ (x h )[n ]
i *
FD-Based
Method to
i = zi [ n ] Compute Each
= ∑ zi [ n ] Output Block
i
x[n ], iN B ≤ n < (i + 1) N B NB is a
xi [ n ] = Design Choice
0, otherwise
13/18
Q: Now what happens when
each of these length-NB
blocks gets convolved with
the length-N2 filter?
A: The output block has
length N2+ NB – 1 > NB
• Output Blocks are
Bigger than Input
Blocks
• But are separated by
NB points
• Thus… Output Blocks
Overlap
• Total Output = “Sum
of Overlapped Blocks”
15/18
OLA Method Complexity
• The FFT of filter h[n] can be pre-computed Don’t Count it!
• We’ll measure complexity using # Multiplies/Input Sample
• Use 2NFFTlog2NFFT Real Multiplies as measure for FFT
• Assume input samples are Real Valued
Can do 2 real-signal FFT’s for price of ≈ 1 Complex FFT (Classic FFT Result!)
N −1
21 + 2 [1 + log 2 (N 2 + N B − 1)] < N 2 ()
NB
17/18
FD Complexity vs TD Complexity
Plot of: [Left-Hand Side]/[Right-Hand Side] of ()
5
Contours = (OLA Multiplies)/(TD Multiplies)
10
Curve of
4
10 2.5 0.2 Optimal
0.4 Block
0.6
Sizes
Block Size NB
1
3 0.3
10 0.8
1.5
2
10
1
10
20 40 60 80 100 120 140 160 180 200
Filter Length N2