SlideShare a Scribd company logo
1 of 15
Download to read offline
Overlap-Save and Overlap-Add
Dr. Deepa Kundur
University of Toronto
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 1 / 58
Overlap-Save and Overlap-Add Circular and Linear Convolution
The Discrete Fourier Transform Pair
DFT and inverse-DFT (IDFT):
X(k) =
N−1
n=0
x(n)e−j2πk n
N , k = 0, 1, . . . , N − 1
x(n) =
1
N
N−1
k=0
X(k)ej2πk n
N , n = 0, 1, . . . , N − 1
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 2 / 58
Overlap-Save and Overlap-Add Circular and Linear Convolution
Important DFT Properties
Property Time Domain Frequency Domain
Notation: x(n) X(k)
Periodicity: x(n) = x(n + N) X(k) = X(k + N)
Linearity: a1x1(n) + a2x2(n) a1X1(k) + a2X2(k)
Time reversal x(N − n) X(N − k)
Circular time shift: x((n − l))N X(k)e−j2πkl/N
Circular frequency shift: x(n)ej2πln/N X((k − l))N
Complex conjugate: x∗(n) X∗(N − k)
Circular convolution: x1(n) ⊗ x2(n) X1(k)X2(k)
Multiplication: x1(n)x2(n) 1
N
X1(k) ⊗ X2(k)
Parseval’s theorem: N−1
n=0 x(n)y∗(n) 1
N
N−1
k=0 X(k)Y ∗(k)
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 3 / 58
Overlap-Save and Overlap-Add Circular and Linear Convolution
Circular Convolution
x1(n) ⊗ x2(n)
F
←→ X1(k)X2(k)
Q: What is circular convolution?
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 4 / 58
Overlap-Save and Overlap-Add Circular and Linear Convolution
Circular Convolution
Assume: x1(n) and x2(n) have support n = 0, 1, . . . , N − 1.
Examples: N = 10 and support: n = 0, 1, . . . , 9
-1 0
n-2-3 1 2 3 6 8754 9 101 2 3 6 8754 9 10
1
11 12
54
-1 10
n-2-3 2 3
1
6 87 96 87 9 10 11 12 54-1 0
n-2-3
1
1 2 3 6 87 9 10 11 12
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 5 / 58
Overlap-Save and Overlap-Add Circular and Linear Convolution
Circular Convolution
Assume: x1(n) and x2(n) have support n = 0, 1, . . . , N − 1.
x1(n) ⊗ x2(n) =
N−1
k=0
x1(k)x2((n − k))N
=
N−1
k=0
x2(k)x1((n − k))N
where (n)N = n mod N = remainder of n/N.
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 6 / 58
Overlap-Save and Overlap-Add Circular and Linear Convolution
Modulo Indices and Periodic Repetition
(n)N = n mod N = remainder of n/N
Example: N = 4
n -4 -3 -2 -1 0 1 2 3 4 5 6 7 8
(n)4 0 1 2 3 0 1 2 3 0 1 2 3 0
n
N
= integer +
nonneg integer < N
N
5
4
= 1 +
1
4
−2
4
= −1 +
2
4
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 7 / 58
Overlap-Save and Overlap-Add Circular and Linear Convolution
Modulo Indices and Periodic Repetition
(n)N = n mod N = remainder of n/N
Example: N = 4
n -4 -3 -2 -1 0 1 2 3 4 5 6 7 8
(n)4 0 1 2 3 0 1 2 3 0 1 2 3 0
x((n))4 will be periodic with period 4. The repeated pattern will be
consist of: {x(0), x(1), x(2), x(3)}.
Thus, x((n))N is a periodic signal comprised of the following
repeating pattern: {x(0), x(1), · · · x(N − 2), x(N − 1)}.
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 8 / 58
Overlap-Save and Overlap-Add Circular and Linear Convolution
Overlap During Periodic Repetition
A periodic repetition makes an aperiodic signal x(n), periodic to
produce ˜x(n).
˜x(n) =
∞
l=−∞
x(n − lN)
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 9 / 58
Overlap-Save and Overlap-Add Circular and Linear Convolution
Overlap During Periodic Repetition
A periodic repetition makes an aperiodic signal x(n), periodic to
produce ˜x(n).
There are two important parameters:
1. smallest support length of the signal x(n)
2. period N used for repetition that determines the period of ˜x(n)
smallest support length > period of repetition
there will be overlap
smallest support length ≤ period of repetition
there will be no overlap
⇒ x(n) can be recovered from ˜x(n)
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 10 / 58
Overlap-Save and Overlap-Add Circular and Linear Convolution
Periodic Repetition: Example N = 4
-1 10
n
x (n)
= x (n)
-2-3-4-5-6-7 2 3 4 5 6 7
1
2
-1 10
n-2-3-4-5-6-7 2 3 4 5 6 7
1
2
x (n)support length = 4 = N
no overlap
-1 10
n-2-3-4-5-6-7 2 3 4 5 6 7
x (n)
+
l=0
x (n-N)
+
l=1
+
x (n+N)
l=-1
+
x (n+2N)
l=-2
x (n-2N)
l=2
......
~
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 11 / 58
Overlap-Save and Overlap-Add Circular and Linear Convolution
Period Repetition: Example N = 4
1
=x(n)
x (n)
-1 10
n-2-3-4-5-6-7 2 3 4 5 6 7
1
2
support length = 6 > N
overlap
n-1 10-2-3-4-5-6-7 2 3 4 5 6 7
2
1
x (n)
-1 10
n-2-3-4-5-6-7 2 3 4 5 6 7
l=0 l=1
+ +
l=-1
+ + +
l=-2 l=2
......
~
x (n)
x (n-N)x (n+N)
x (n+2N) x (n-2N)
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 12 / 58
Overlap-Save and Overlap-Add Circular and Linear Convolution
Modulo Indices and the Periodic Repetition
Assume: x(n) has support n = 0, 1, . . . , N − 1.
x((n))N = x(n mod N) = ˜x(n) =
∞
l=−∞
x(n − lN)
Note: Because the support size and period size are the same, there is
no overlap when taking the periodic repetition x((n))N.
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 13 / 58
Overlap-Save and Overlap-Add Circular and Linear Convolution
Modulo Indices and the Periodic Repetition
n
x(n)
1
2
-1 10-2-3-4-5-6-7 2 3 4 5 6 7
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 14 / 58
Overlap-Save and Overlap-Add Circular and Linear Convolution
Modulo Indices and the Periodic Repetition
1 1
2
0
n
x(n)
1
2
-1 10-2-3-4-5-6-7 2 3 4 5 6 7
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 15 / 58
Overlap-Save and Overlap-Add Circular and Linear Convolution
Modulo Indices and the Periodic Repetition
1 1
2
0
2
11
0
n
x(n)
1
2
-1 10-2-3-4-5-6-7 2 3 4 5 6 7
x((n))N
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 16 / 58
Overlap-Save and Overlap-Add Circular and Linear Convolution
Modulo Indices and the Periodic Repetition
1 1
2
0
2
11
0
12
8
4
0
-4
13
9
5
1
-3
14
10
6
2
-2
15
11
7
3
-1
n
x(n)
1
2
-1 10-2-3-4-5-6-7 2 3 4 5 6 7
x((n))N
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 17 / 58
Overlap-Save and Overlap-Add Circular and Linear Convolution
Modulo Indices and the Periodic Repetition
n
-1 10-2-3-4-5-6-7 2 3 4 5 6 7 ...
1
2
x (n)
~
1 1
2
0
2
11
0
12
8
4
0
-4
13
9
5
1
-3
14
10
6
2
-2
15
11
7
3
-1
n
x(n)
1
2
-1 10-2-3-4-5-6-7 2 3 4 5 6 7
x((n))N
Therefore x((n))N = ˜x(n).
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 18 / 58
Overlap-Save and Overlap-Add Circular and Linear Convolution
Circular Convolution: One Interpretation
Assume: x1(n) and x2(n) have support n = 0, 1, . . . , N − 1.
To compute
N−1
k=0 x1(k)x2((n − k))N (or
N−1
k=0 x2(k)x1((n − k))N ):
1. Take the periodic repetition of x2(n) with period N:
˜x2(n) =
∞
l=−∞
x2(n − lN)
2. Conduct a standard linear convolution of x1(n) and ˜x2(n) for
n = 0, 1, . . . , N − 1:
x1(n) ⊗ x2(n) = x1(n) ∗ ˜x2(n) =
∞
k=−∞
x1(k)˜x2(n − k) =
N−1
k=0
x1(k)˜x2(n − k)
Note: x1(n) ⊗ x2(n) = 0 for n < 0 and n ≥ N.
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 19 / 58
Overlap-Save and Overlap-Add Circular and Linear Convolution
Circular Convolution: One Interpretation
N−1
k=0
x1(k) x2((n − k))N =
N−1
k=0
x1(k) ˜x2(n − k)
. . . which makes sense, since x((n))N = ˜x(n).
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 20 / 58
Overlap-Save and Overlap-Add Circular and Linear Convolution
Circular Convolution: Another Interpretation
Assume: x1(n) and x2(n) have support n = 0, 1, . . . , N − 1.
To compute
N−1
k=0 x1(k)x2((n − k))N (or
N−1
k=0 x2(k)x1((n − k))N ):
1. Conduct a linear convolution of x1(n) and x2(n) for all n:
xL(n) = x1(n) ∗ x2(n) =
∞
k=−∞
x1(k)x2(n − k) =
N−1
k=0
x1(k)x2(n − k)
2. Compute the periodic repetition of xL(n) and window the result for
n = 0, 1, . . . , N − 1:
x1(n) ⊗ x2(n) =
∞
l=−∞
xL(n − lN), n = 0, 1, . . . , N − 1
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 21 / 58
Overlap-Save and Overlap-Add Circular and Linear Convolution
Using DFT for Linear Convolution
Therefore, circular convolution and linear convolution are related as
follows:
xC (n) = x1(n) ⊗ x2(n) =
∞
l=−∞
xL(n − lN)
for n = 0, 1, . . . , N − 1
Q: When can one recover xL(n) from xC (n)?
When can one use the DFT (or FFT) to compute linear convolution?
A: When there is no overlap in the periodic repetition of xL(n).
When support length of xL(n) ≤ N.
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 22 / 58
Overlap-Save and Overlap-Add Circular and Linear Convolution
Using DFT for Linear Convolution
Let x(n) have support n = 0, 1, . . . , L − 1.
Let h(n) have support n = 0, 1, . . . , M − 1.
We can set N ≥ L + M − 1 and zero pad x(n) and h(n) to have
support n = 0, 1, . . . , N − 1.
1. Take N-DFT of x(n) to give X(k), k = 0, 1, . . . , N − 1.
2. Take N-DFT of h(n) to give H(k), k = 0, 1, . . . , N − 1.
3. Multiply: Y (k) = X(k) · H(k), k = 0, 1, . . . , N − 1.
4. Take N-IDFT of Y (k) to give y(n), n = 0, 1, . . . , N − 1.
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 23 / 58
Overlap-Save and Overlap-Add Filtering of Long Data Sequences
Filtering of Long Data Sequences
The input signal x(n) is often very long especially in real-time
signal monitoring applications.
For linear filtering via the DFT, for example, the signal must be
limited size due to memory requirements.
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 24 / 58
Overlap-Save and Overlap-Add Filtering of Long Data Sequences
Filtering of Long Data Sequences
Recall, for N = 8 the 8-FFT is given by
X(0)
X(1)
X(2)
X(3)
X(4)
X(5)
X(6)
X(7)
x(1)
x(5)
x(3)
x(7)
x(0)
x(4)
x(2)
x(6)
Stage 1 Stage 2 Stage 3
-1
-1
-1
-1 -1
-1 -1
-1
-1
-1
-1
-1
0
W8
0
W8
0
W8
0
W8
0
W8
0
W8
1
W8
2
W8
2
W8
0
W8
2
W8
3
W8
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 25 / 58
Overlap-Save and Overlap-Add Filtering of Long Data Sequences
Filtering of Long Data Sequences
All N-input samples are required simultaneously by the FFT
operator.
Complexity of N-FFT is N log(N).
If N is too large as for long data sequences, then there is a
significant delay in processing that precludes real-time
processing.
signal
input
signal
output
Data Acquisition
Delay
Data Processing
Delay
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 26 / 58
Overlap-Save and Overlap-Add Filtering of Long Data Sequences
Filtering of Long Data Sequences
Strategy:
1. Segment the input signal into fixed-size blocks prior to
processing.
2. Compute DFT-based linear filtering of each block separately via
the FFT.
3. Fit the output blocks together in such a way that the overall
output is equivalent to the linear filtering of x(n) directly.
Main advantage: samples of the output y(n) = h(n) ∗ x(n) will
be available real-time on a block-by-block basis.
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 27 / 58
Overlap-Save and Overlap-Add Filtering of Long Data Sequences
Filtering of Long Data Sequences
Goal: FIR filtering: y(n) = x(n) ∗ h(n)
Two approaches to real-time linear filtering of long inputs:
Overlap-Add Method
Overlap-Save Method
Assumptions:
FIR filter h(n) length = M
Block length = L M
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 28 / 58
Overlap-Save and Overlap-Add Overlap-Add Method
Overlap-Add Method
Overlap-Add Method
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 29 / 58
Overlap-Save and Overlap-Add Overlap-Add Method
Overlap-Add Method
Deals with the following signal processing principles:
The linear convolution of a discrete-time signal of length L and a
discrete-time signal of length M produces a discrete-time
convolved result of length L + M − 1.
Addititvity:
(x1(n)+x2(n)) ∗ h(n) = x1(n) ∗ h(n)+x2(n) ∗ h(n)
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 30 / 58
Overlap-Save and Overlap-Add Overlap-Add Method
-1 10
n-2-3 2 3
1
x(n)
h(n)
6 87 96 87 9
*
h(n)*=
+
+ + . . .
h(n)*
h(n)*
10
-1 10
n-2-3 2 3 4 5
4 5
4 5
1
x (n)1
2
3
6 87 96 87 9
10
-1 10
n-2-3 2 3
1
x (n)
6 87 96 87 9
10
-1 10
n-2-3 2 3
1
x (n)
6 87 96 87 9
10
L=4
L=4
L=4
L=4
L=4
L=4
L=4 Input x(n) is divided
into non-overlapping
blocks xm(n) each of
length L.
Each input block
xm(n) is individually
filtered as it is received
to produce the output
block ym(n).
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 31 / 58
Overlap-Save and Overlap-Add Overlap-Add Method
Overlap-Add Filtering Stage
makes use of the N-DFT and N-IDFT where: N = L + M − 1
Thus, zero-padding of x(n) and h(n) that are of length
L, M < N is required.
The actual implementation of the DFT/IDFT will use the
FFT/IFFT for computational simplicity.
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 32 / 58
Overlap-Save and Overlap-Add Overlap-Add Method
Using DFT for Linear Convolution
Let xm(n) have support n = 0, 1, . . . , L − 1.
Let h(n) have support n = 0, 1, . . . , M − 1.
We set N ≥ L + M − 1 (the length of the linear convolution result)
and zero pad xm(n) and h(n) to have support n = 0, 1, . . . , N − 1.
1. Take N-DFT of xm(n) to give Xm(k), k = 0, 1, . . . , N − 1.
2. Take N-DFT of h(n) to give H(k), k = 0, 1, . . . , N − 1.
3. Multiply: Ym(k) = Xm(k) · H(k), k = 0, 1, . . . , N − 1.
4. Take N-IDFT of Ym(k) to give ym(n), n = 0, 1, . . . , N − 1.
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 33 / 58
Overlap-Save and Overlap-Add Overlap-Add Method
Linear Convolution via the DFT
Length of linear convolution result = Length of DFT
-1 10
n
x (n)
= x (n)
-2-3-4-5-6-7 2 3 4 5 6 7
1
2
-1 10
n-2-3-4-5-6-7 2 3 4 5 6 7
1
2
x (n)support length = 4 = N
no overlap
-1 10
n-2-3-4-5-6-7 2 3 4 5 6 7
x (n)
+
l=0
x (n-N)
+
l=1
+
x (n+N)
l=-1
+
x (n+2N)
l=-2
x (n-2N)
l=2
......
~
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 34 / 58
Overlap-Save and Overlap-Add Overlap-Add Method
-1 10
n-2-3 2 3
1
x(n)
h(n)
6 87 96 87 9
*
h(n)*=
+
+ + . . .
h(n)*
h(n)*
10
-1 10
n-2-3 2 3 4 5
4 5
4 5
1
x (n)1
2
3
6 87 96 87 9
10
-1 10
n-2-3 2 3
1
x (n)
6 87 96 87 9
10
-1 10
n-2-3 2 3
1
x (n)
6 87 96 87 9
10
L=4
L=4
L=4
L=4
L=4
L=4
L=4 Input x(n) is divided
into non-overlapping
blocks xm(n) each of
length L.
Each input block
xm(n) is individually
filtered as it is received
to produce the output
block ym(n).
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 35 / 58
Overlap-Save and Overlap-Add Overlap-Add Method
-1 10
n-2-3 2 3
1
x(n)
h(n)
6 87 96 87 9
*
=
+
+ + . . .
10
-1 10
n-2-3 2 3 4 5
4 5
4 5
1
y (n)1
2
3
6 87 96 87 9
10
-1 10
n-2-3 2 3
1
y (n)
6 7
6 8
7
9 10
-1 10
n-2-3 2 3
1
y (n)
6 87 96 87 9
10
L=4 L=4 L=4
L=4
L=4
L=4
M-1=2
L=4
These extra M-1 samples (i.e.,“tail”)
due to convolution expanding
the support must be added to the
begininning of the next output
block
M-1=2
M-1=2
ADD
to
next
block
ADD
to
next
block
Output blocks ym(n)
must be fitted together
appropriately to gener-
ate:
y(n) = x(n) ∗ h(n)
The support overlap
amongst the ym(n)
blocks must be ac-
counted for.
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 36 / 58
Overlap-Save and Overlap-Add Overlap-Add Method
Overlap-Add Addition Stage
From the Addititvity property, since:
x(n) = x1(n) + x2(n) + x3(n) + · · · =
∞
m=1
xm(n)
x(n) ∗ h(n) = (x1(n) + x2(n) + x3(n) + · · · ) ∗ h(n)
= x1(n) ∗ h(n) + x2(n) ∗ h(n) + x3(n) ∗ h(n) + · · ·
=
∞
m=1
xm(n) ∗ h(n) =
∞
m=1
ym(n)
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 37 / 58
Overlap-Save and Overlap-Add Overlap-Add Method
-1 10
n-2-3 2 3
1
x(n)
h(n)
6 87 96 87 9
*
=
+
+ + . . .
-1 0
n-2-3 1 2 3 6 8754 9 101 2 3 6 8754 9 10
1
=
10
-1 10
n-2-3 2 3 4 5
4 5
4 5
1
y (n)1
2
3
6 87 96 87 9
10
-1 10
n-2-3 2 3
1
y (n)
6 7
6 8
7
9 10
-1 10
n-2-3 2 3
1
y (n)
6 87 96 87 9
10
L=4 L=4 L=4
L=4
L=4
L=4
M-1=2
L=4
These extra M-1 samples (i.e.,“tail”)
due to convolution expanding
the support must be added to the
begininning of the next output
block
M-1=2
M-1=2
ADD
to
next
block
ADD
to
next
block
Output blocks ym(n)
must be fitted together
appropriately to gener-
ate:
y(n) = x(n) ∗ h(n)
The support overlap
amongst the ym(n)
blocks must be ac-
counted for.
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 38 / 58
Overlap-Save and Overlap-Add Overlap-Add Method
Input signal:
Output signal:
zeros
zeros
zeros
Add
points Add
points
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 39 / 58
Overlap-Save and Overlap-Add Overlap-Add Method
Overlap-Add Method
1. Break the input signal x(n) into non-overlapping blocks xm(n) of length L.
2. Zero pad h(n) to be of length N = L + M − 1.
3. Take N-DFT of h(n) to give H(k), k = 0, 1, . . . , N − 1.
4. For each block m:
4.1 Zero pad xm(n) to be of length N = L + M − 1.
4.2 Take N-DFT of xm(n) to give Xm(k), k = 0, 1, . . . , N − 1.
4.3 Multiply: Ym(k) = Xm(k) · H(k), k = 0, 1, . . . , N − 1.
4.4 Take N-IDFT of Ym(k) to give ym(n), n = 0, 1, . . . , N − 1.
5. Form y(n) by overlapping the last M − 1 samples of ym(n) with the first
M − 1 samples of ym+1(n) and adding the result.
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 40 / 58
Overlap-Save and Overlap-Add Overlap-Add Method
Overlap-Add Method: Cautionary Note
If you DO NOT overlap and add, but only append the output blocks
ym(n) for m = 1, 2, . . ., then you will not get the true y(n) sequence.
Q: What sequence will you obtain instead?
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 41 / 58
Overlap-Save and Overlap-Add Overlap-Add Method
Overlap-Add Method: Cautionary Note
Output signal:
Add
points Add
points
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 42 / 58
Overlap-Save and Overlap-Add Overlap-Add Method
Overlap-Add Method: Cautionary Note
zeros
zeros
zeros
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 43 / 58
Overlap-Save and Overlap-Add Overlap-Save Method
Overlap-Save Method
Overlap-Save Method
Overlap-[Discard] Method
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 44 / 58
Overlap-Save and Overlap-Add Overlap-Save Method
Overlap-Save Method
Deals with the following signal processing principles:
The N = (L + M − 1)-circular convolution of a discrete-time
signal of length N and a discrete-time signal of length M using
an N-DFT and N-IDFT.
Time-Domain Aliasing:
xC (n) =
∞
l=−∞
xL(n − lN)
support=M + N − 1
, n = 0, 1, . . . , N − 1
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 45 / 58
Overlap-Save and Overlap-Add Overlap-Save Method
1
-1 10
n-2-3-4-5-6-7 2 3 4 5 6 7
1
2
N < L+M-1
overlap since
n-1 10-2-3-4-5-6-7 2 3 4 5 6 7
2
1
-1 10
n-2-3-4-5-6-7 2 3 4 5 6 7
+ +
+ + +
......
...
y (n+2N)L y (n-2N)L
y (n)L
y (n)L
Add and keep points only
at n=0, 1, ..., N-1
corruption from
previous repetitions
linear
convolution
result
circular
convolution
result
at n=M-1, M, ..., N-1
y (n)C
y (n)L=
L
y (n+N) L
y (n-N)
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 46 / 58
Overlap-Save and Overlap-Add Overlap-Save Method
Overlap-Save Method
Convolution of xm(n) with support n = 0, 1, . . . , N − 1 and h(n)
with support n = 0, 1, . . . , M − 1 via the N-DFT will produce a
result yC,m(n) such that:
yC,m(n) =
aliasing corruption n = 0, 1, . . . , M − 2
yL,m(n) n = M − 1, M, . . . , N − 1
where yL,m(n) = xm(n) ∗ h(n) is the desired output.
The first M − 1 points of a the current filtered output block
ym(n) must be discarded.
The previous filtered block ym−1(n) must compensate by
providing these output samples.
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 47 / 58
Overlap-Save and Overlap-Add Overlap-Save Method
Overlap-Save Input Segmentation Stage
1. All input blocks xm(n) are of length N = (L + M − 1) and
contain sequential samples from x(n).
2. Input block xm(n) for m > 1 overlaps containing the first M − 1
points of the previous block xm−1(n) to deal with aliasing
corruption.
3. For m = 1, there is no previous block, so the first M − 1 points
are zeros.
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 48 / 58
Overlap-Save and Overlap-Add Overlap-Save Method
Overlap-Save Input Segmentation Stage
point
overlap
point
overlap
zeros
Input signal blocks:
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 49 / 58
Overlap-Save and Overlap-Add Overlap-Save Method
Overlap-Save Input Segmentation Stage
x1(n) = {0, 0, . . . 0
M − 1 zeros
, x(0), x(1), . . . , x(L − 1)}
x2(n) = {x(L − M + 1), . . . x(L − 1)
last M − 1 points from x1(n)
, x(L), . . . , x(2L − 1)}
x3(n) = {x(2L − M + 1), . . . x(2L − 1)
last M − 1 points from x2(n)
, x(2L), . . . , x(3L − 1)}
...
The last M − 1 points from the previous input block must be saved
for use in the current input block.
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 50 / 58
Overlap-Save and Overlap-Add Overlap-Save Method
Overlap-Save Filtering Stage
makes use of the N-DFT and N-IDFT where: N = L + M − 1
Only a one-time zero-padding of h(n) of length M L < N is
required to give it support n = 0, 1, . . . , N − 1.
The input blocks xm(n) are of length N to start, so no
zero-padding is necessary.
The actual implementation of the DFT/IDFT will use the
FFT/IFFT for computational simplicity.
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 51 / 58
Overlap-Save and Overlap-Add Overlap-Save Method
Using DFT for Circular Convolution
N = L + M − 1.
Let xm(n) have support n = 0, 1, . . . , N − 1.
Let h(n) have support n = 0, 1, . . . , M − 1.
We zero pad h(n) to have support n = 0, 1, . . . , N − 1.
1. Take N-DFT of xm(n) to give Xm(k), k = 0, 1, . . . , N − 1.
2. Take N-DFT of h(n) to give H(k), k = 0, 1, . . . , N − 1.
3. Multiply: Ym(k) = Xm(k) · H(k), k = 0, 1, . . . , N − 1.
4. Take N-IDFT of Ym(k) to give yC,m(n), n = 0, 1, . . . , N − 1.
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 52 / 58
Overlap-Save and Overlap-Add Overlap-Save Method
Circular Convolution via the DFT
Length of linear convolution result > Length of DFT
1
-1 10
n-2-3-4-5-6-7 2 3 4 5 6 7
1
2
N < L+M-1
overlap since
n-1 10-2-3-4-5-6-7 2 3 4 5 6 7
2
1
-1 10
n-2-3-4-5-6-7 2 3 4 5 6 7
+ +
+ + +
......
...
y (n+2N)L y (n-2N)L
y (n)L
y (n)L
Add and keep points only
at n=0, 1, ..., N-1
corruption from
previous repetitions
linear
convolution
result
circular
convolution
result
at n=M-1, M, ..., N-1
y (n)C
y (n)L=
L
y (n+N) L
y (n-N)
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 53 / 58
Overlap-Save and Overlap-Add Overlap-Save Method
Overlap-Save Output Blocks
yC,m(n) =
aliasing n = 0, 1, . . . , M − 2
yL,m(n) n = M − 1, M, . . . , N − 1
where yL,m(n) = xm(n) ∗ h(n) is the desired output.
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 54 / 58
Overlap-Save and Overlap-Add Overlap-Save Method
Overlap-Save [Discard] Output Blocks
y1(n) = {y1(0), y1(1), . . . y1(M − 2)
M − 1 points corrupted from aliasing
, y(0), . . . , y(L − 1)}
y2(n) = {y2(0), y2(1), . . . y2(M − 2)
M − 1 points corrupted from aliasing
, y(L), . . . , y(2L − 1)}
y3(n) = {y3(0), y3(1), . . . y3(M − 2)
M − 1 points corrupted from aliasing
, y(2L), . . . , y(3L − 1)}
where y(n) = x(n) ∗ h(n) is the desired output.
The first M − 1 points of each output block are discarded.
The remaining L points of each output block are appended to form
y(n).
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 55 / 58
Overlap-Save and Overlap-Add Overlap-Save Method
Overlap-Save Output Stage
Discard
points Discard
points Discard
points
Output signal blocks:
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 56 / 58
Overlap-Save and Overlap-Add Overlap-Save Method
Overlap-Save Method
1. Insert M − 1 zeros at the beginning of the input sequence x(n).
2. Break the padded input signal into overlapping blocks xm(n) of length
N = L + M − 1 where the overlap length is M − 1.
3. Zero pad h(n) to be of length N = L + M − 1.
4. Take N-DFT of h(n) to give H(k), k = 0, 1, . . . , N − 1.
5. For each block m:
5.1 Take N-DFT of xm(n) to give Xm(k), k = 0, 1, . . . , N − 1.
5.2 Multiply: Ym(k) = Xm(k) · H(k), k = 0, 1, . . . , N − 1.
5.3 Take N-IDFT of Ym(k) to give ym(n), n = 0, 1, . . . , N − 1.
5.4 Discard the first M − 1 points of each output block ym(n).
6. Form y(n) by appending the remaining (i.e., last) L samples of each block
ym(n).
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 57 / 58
Overlap-Save and Overlap-Add Overlap-Save Method
Overlap-Save Method
Discard
points Discard
points Discard
points
Output signal blocks:
point
overlap
point
overlap
zeros
Input signal blocks:
Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 58 / 58

More Related Content

What's hot

Decimation in time and frequency
Decimation in time and frequencyDecimation in time and frequency
Decimation in time and frequencySARITHA REDDY
 
Reinforcement Learning: Hidden Theory and New Super-Fast Algorithms
Reinforcement Learning: Hidden Theory and New Super-Fast AlgorithmsReinforcement Learning: Hidden Theory and New Super-Fast Algorithms
Reinforcement Learning: Hidden Theory and New Super-Fast AlgorithmsSean Meyn
 
Can we estimate a constant?
Can we estimate a constant?Can we estimate a constant?
Can we estimate a constant?Christian Robert
 
Intro to Classification: Logistic Regression & SVM
Intro to Classification: Logistic Regression & SVMIntro to Classification: Logistic Regression & SVM
Intro to Classification: Logistic Regression & SVMNYC Predictive Analytics
 
Lecture4 kenrels functions_rkhs
Lecture4 kenrels functions_rkhsLecture4 kenrels functions_rkhs
Lecture4 kenrels functions_rkhsStéphane Canu
 
Introducing Zap Q-Learning
Introducing Zap Q-Learning   Introducing Zap Q-Learning
Introducing Zap Q-Learning Sean Meyn
 
Coordinate sampler: A non-reversible Gibbs-like sampler
Coordinate sampler: A non-reversible Gibbs-like samplerCoordinate sampler: A non-reversible Gibbs-like sampler
Coordinate sampler: A non-reversible Gibbs-like samplerChristian Robert
 
Maximum likelihood estimation of regularisation parameters in inverse problem...
Maximum likelihood estimation of regularisation parameters in inverse problem...Maximum likelihood estimation of regularisation parameters in inverse problem...
Maximum likelihood estimation of regularisation parameters in inverse problem...Valentin De Bortoli
 
ABC with Wasserstein distances
ABC with Wasserstein distancesABC with Wasserstein distances
ABC with Wasserstein distancesChristian Robert
 
Coordinate sampler : A non-reversible Gibbs-like sampler
Coordinate sampler : A non-reversible Gibbs-like samplerCoordinate sampler : A non-reversible Gibbs-like sampler
Coordinate sampler : A non-reversible Gibbs-like samplerChristian Robert
 
Simplified Runtime Analysis of Estimation of Distribution Algorithms
Simplified Runtime Analysis of Estimation of Distribution AlgorithmsSimplified Runtime Analysis of Estimation of Distribution Algorithms
Simplified Runtime Analysis of Estimation of Distribution AlgorithmsPK Lehre
 
Bayesian hybrid variable selection under generalized linear models
Bayesian hybrid variable selection under generalized linear modelsBayesian hybrid variable selection under generalized linear models
Bayesian hybrid variable selection under generalized linear modelsCaleb (Shiqiang) Jin
 

What's hot (20)

Nested sampling
Nested samplingNested sampling
Nested sampling
 
Decimation in time and frequency
Decimation in time and frequencyDecimation in time and frequency
Decimation in time and frequency
 
Quantum Search and Quantum Learning
Quantum Search and Quantum Learning Quantum Search and Quantum Learning
Quantum Search and Quantum Learning
 
Reinforcement Learning: Hidden Theory and New Super-Fast Algorithms
Reinforcement Learning: Hidden Theory and New Super-Fast AlgorithmsReinforcement Learning: Hidden Theory and New Super-Fast Algorithms
Reinforcement Learning: Hidden Theory and New Super-Fast Algorithms
 
Can we estimate a constant?
Can we estimate a constant?Can we estimate a constant?
Can we estimate a constant?
 
Intro to Classification: Logistic Regression & SVM
Intro to Classification: Logistic Regression & SVMIntro to Classification: Logistic Regression & SVM
Intro to Classification: Logistic Regression & SVM
 
Richard Everitt's slides
Richard Everitt's slidesRichard Everitt's slides
Richard Everitt's slides
 
Lecture4 kenrels functions_rkhs
Lecture4 kenrels functions_rkhsLecture4 kenrels functions_rkhs
Lecture4 kenrels functions_rkhs
 
Introducing Zap Q-Learning
Introducing Zap Q-Learning   Introducing Zap Q-Learning
Introducing Zap Q-Learning
 
Coordinate sampler: A non-reversible Gibbs-like sampler
Coordinate sampler: A non-reversible Gibbs-like samplerCoordinate sampler: A non-reversible Gibbs-like sampler
Coordinate sampler: A non-reversible Gibbs-like sampler
 
Maximum likelihood estimation of regularisation parameters in inverse problem...
Maximum likelihood estimation of regularisation parameters in inverse problem...Maximum likelihood estimation of regularisation parameters in inverse problem...
Maximum likelihood estimation of regularisation parameters in inverse problem...
 
QMC Program: Trends and Advances in Monte Carlo Sampling Algorithms Workshop,...
QMC Program: Trends and Advances in Monte Carlo Sampling Algorithms Workshop,...QMC Program: Trends and Advances in Monte Carlo Sampling Algorithms Workshop,...
QMC Program: Trends and Advances in Monte Carlo Sampling Algorithms Workshop,...
 
QMC Program: Trends and Advances in Monte Carlo Sampling Algorithms Workshop,...
QMC Program: Trends and Advances in Monte Carlo Sampling Algorithms Workshop,...QMC Program: Trends and Advances in Monte Carlo Sampling Algorithms Workshop,...
QMC Program: Trends and Advances in Monte Carlo Sampling Algorithms Workshop,...
 
QMC Program: Trends and Advances in Monte Carlo Sampling Algorithms Workshop,...
QMC Program: Trends and Advances in Monte Carlo Sampling Algorithms Workshop,...QMC Program: Trends and Advances in Monte Carlo Sampling Algorithms Workshop,...
QMC Program: Trends and Advances in Monte Carlo Sampling Algorithms Workshop,...
 
ABC with Wasserstein distances
ABC with Wasserstein distancesABC with Wasserstein distances
ABC with Wasserstein distances
 
Coordinate sampler : A non-reversible Gibbs-like sampler
Coordinate sampler : A non-reversible Gibbs-like samplerCoordinate sampler : A non-reversible Gibbs-like sampler
Coordinate sampler : A non-reversible Gibbs-like sampler
 
2018 MUMS Fall Course - Statistical and Mathematical Techniques for Sensitivi...
2018 MUMS Fall Course - Statistical and Mathematical Techniques for Sensitivi...2018 MUMS Fall Course - Statistical and Mathematical Techniques for Sensitivi...
2018 MUMS Fall Course - Statistical and Mathematical Techniques for Sensitivi...
 
ABC in Venezia
ABC in VeneziaABC in Venezia
ABC in Venezia
 
Simplified Runtime Analysis of Estimation of Distribution Algorithms
Simplified Runtime Analysis of Estimation of Distribution AlgorithmsSimplified Runtime Analysis of Estimation of Distribution Algorithms
Simplified Runtime Analysis of Estimation of Distribution Algorithms
 
Bayesian hybrid variable selection under generalized linear models
Bayesian hybrid variable selection under generalized linear modelsBayesian hybrid variable selection under generalized linear models
Bayesian hybrid variable selection under generalized linear models
 

Similar to DFT Convolution: Overlap-Save and Overlap-Add Methods

Low rank tensor approximation of probability density and characteristic funct...
Low rank tensor approximation of probability density and characteristic funct...Low rank tensor approximation of probability density and characteristic funct...
Low rank tensor approximation of probability density and characteristic funct...Alexander Litvinenko
 
EC8553 Discrete time signal processing
EC8553 Discrete time signal processing EC8553 Discrete time signal processing
EC8553 Discrete time signal processing ssuser2797e4
 
LINEAR SYSTEMS
LINEAR SYSTEMSLINEAR SYSTEMS
LINEAR SYSTEMSJazzieJao1
 
Naville's Interpolation
Naville's InterpolationNaville's Interpolation
Naville's InterpolationVARUN KUMAR
 
Computing f-Divergences and Distances of\\ High-Dimensional Probability Densi...
Computing f-Divergences and Distances of\\ High-Dimensional Probability Densi...Computing f-Divergences and Distances of\\ High-Dimensional Probability Densi...
Computing f-Divergences and Distances of\\ High-Dimensional Probability Densi...Alexander Litvinenko
 
A novel approach for high speed convolution of finite
A novel approach for high speed convolution of finiteA novel approach for high speed convolution of finite
A novel approach for high speed convolution of finiteeSAT Publishing House
 
A numerical method to solve fractional Fredholm-Volterra integro-differential...
A numerical method to solve fractional Fredholm-Volterra integro-differential...A numerical method to solve fractional Fredholm-Volterra integro-differential...
A numerical method to solve fractional Fredholm-Volterra integro-differential...OctavianPostavaru
 
Convolution discrete and continuous time-difference equaion and system proper...
Convolution discrete and continuous time-difference equaion and system proper...Convolution discrete and continuous time-difference equaion and system proper...
Convolution discrete and continuous time-difference equaion and system proper...Vinod Sharma
 
Litvinenko_RWTH_UQ_Seminar_talk.pdf
Litvinenko_RWTH_UQ_Seminar_talk.pdfLitvinenko_RWTH_UQ_Seminar_talk.pdf
Litvinenko_RWTH_UQ_Seminar_talk.pdfAlexander Litvinenko
 
Discrete Fourier Transform
Discrete Fourier TransformDiscrete Fourier Transform
Discrete Fourier TransformAbhishek Choksi
 
A novel approach for high speed convolution of finite and infinite length seq...
A novel approach for high speed convolution of finite and infinite length seq...A novel approach for high speed convolution of finite and infinite length seq...
A novel approach for high speed convolution of finite and infinite length seq...eSAT Journals
 
Hierarchical matrices for approximating large covariance matries and computin...
Hierarchical matrices for approximating large covariance matries and computin...Hierarchical matrices for approximating large covariance matries and computin...
Hierarchical matrices for approximating large covariance matries and computin...Alexander Litvinenko
 
Subgradient Methods for Huge-Scale Optimization Problems - Юрий Нестеров, Cat...
Subgradient Methods for Huge-Scale Optimization Problems - Юрий Нестеров, Cat...Subgradient Methods for Huge-Scale Optimization Problems - Юрий Нестеров, Cat...
Subgradient Methods for Huge-Scale Optimization Problems - Юрий Нестеров, Cat...Yandex
 
Digital Signal Processing[ECEG-3171]-Ch1_L02
Digital Signal Processing[ECEG-3171]-Ch1_L02Digital Signal Processing[ECEG-3171]-Ch1_L02
Digital Signal Processing[ECEG-3171]-Ch1_L02Rediet Moges
 

Similar to DFT Convolution: Overlap-Save and Overlap-Add Methods (20)

Dft
DftDft
Dft
 
Low rank tensor approximation of probability density and characteristic funct...
Low rank tensor approximation of probability density and characteristic funct...Low rank tensor approximation of probability density and characteristic funct...
Low rank tensor approximation of probability density and characteristic funct...
 
EC8553 Discrete time signal processing
EC8553 Discrete time signal processing EC8553 Discrete time signal processing
EC8553 Discrete time signal processing
 
LINEAR SYSTEMS
LINEAR SYSTEMSLINEAR SYSTEMS
LINEAR SYSTEMS
 
Naville's Interpolation
Naville's InterpolationNaville's Interpolation
Naville's Interpolation
 
Computing f-Divergences and Distances of\\ High-Dimensional Probability Densi...
Computing f-Divergences and Distances of\\ High-Dimensional Probability Densi...Computing f-Divergences and Distances of\\ High-Dimensional Probability Densi...
Computing f-Divergences and Distances of\\ High-Dimensional Probability Densi...
 
A novel approach for high speed convolution of finite
A novel approach for high speed convolution of finiteA novel approach for high speed convolution of finite
A novel approach for high speed convolution of finite
 
A numerical method to solve fractional Fredholm-Volterra integro-differential...
A numerical method to solve fractional Fredholm-Volterra integro-differential...A numerical method to solve fractional Fredholm-Volterra integro-differential...
A numerical method to solve fractional Fredholm-Volterra integro-differential...
 
Convolution discrete and continuous time-difference equaion and system proper...
Convolution discrete and continuous time-difference equaion and system proper...Convolution discrete and continuous time-difference equaion and system proper...
Convolution discrete and continuous time-difference equaion and system proper...
 
lec07_DFT.pdf
lec07_DFT.pdflec07_DFT.pdf
lec07_DFT.pdf
 
Properties of dft
Properties of dftProperties of dft
Properties of dft
 
Litvinenko_RWTH_UQ_Seminar_talk.pdf
Litvinenko_RWTH_UQ_Seminar_talk.pdfLitvinenko_RWTH_UQ_Seminar_talk.pdf
Litvinenko_RWTH_UQ_Seminar_talk.pdf
 
Discrete Fourier Transform
Discrete Fourier TransformDiscrete Fourier Transform
Discrete Fourier Transform
 
c5.pdf
c5.pdfc5.pdf
c5.pdf
 
A novel approach for high speed convolution of finite and infinite length seq...
A novel approach for high speed convolution of finite and infinite length seq...A novel approach for high speed convolution of finite and infinite length seq...
A novel approach for high speed convolution of finite and infinite length seq...
 
Hierarchical matrices for approximating large covariance matries and computin...
Hierarchical matrices for approximating large covariance matries and computin...Hierarchical matrices for approximating large covariance matries and computin...
Hierarchical matrices for approximating large covariance matries and computin...
 
Subgradient Methods for Huge-Scale Optimization Problems - Юрий Нестеров, Cat...
Subgradient Methods for Huge-Scale Optimization Problems - Юрий Нестеров, Cat...Subgradient Methods for Huge-Scale Optimization Problems - Юрий Нестеров, Cat...
Subgradient Methods for Huge-Scale Optimization Problems - Юрий Нестеров, Cat...
 
c5.pdf
c5.pdfc5.pdf
c5.pdf
 
UIT1504-DSP-II-U9_LMS.pdf
UIT1504-DSP-II-U9_LMS.pdfUIT1504-DSP-II-U9_LMS.pdf
UIT1504-DSP-II-U9_LMS.pdf
 
Digital Signal Processing[ECEG-3171]-Ch1_L02
Digital Signal Processing[ECEG-3171]-Ch1_L02Digital Signal Processing[ECEG-3171]-Ch1_L02
Digital Signal Processing[ECEG-3171]-Ch1_L02
 

Recently uploaded

Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 

Recently uploaded (20)

Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 

DFT Convolution: Overlap-Save and Overlap-Add Methods

  • 1. Overlap-Save and Overlap-Add Dr. Deepa Kundur University of Toronto Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 1 / 58 Overlap-Save and Overlap-Add Circular and Linear Convolution The Discrete Fourier Transform Pair DFT and inverse-DFT (IDFT): X(k) = N−1 n=0 x(n)e−j2πk n N , k = 0, 1, . . . , N − 1 x(n) = 1 N N−1 k=0 X(k)ej2πk n N , n = 0, 1, . . . , N − 1 Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 2 / 58 Overlap-Save and Overlap-Add Circular and Linear Convolution Important DFT Properties Property Time Domain Frequency Domain Notation: x(n) X(k) Periodicity: x(n) = x(n + N) X(k) = X(k + N) Linearity: a1x1(n) + a2x2(n) a1X1(k) + a2X2(k) Time reversal x(N − n) X(N − k) Circular time shift: x((n − l))N X(k)e−j2πkl/N Circular frequency shift: x(n)ej2πln/N X((k − l))N Complex conjugate: x∗(n) X∗(N − k) Circular convolution: x1(n) ⊗ x2(n) X1(k)X2(k) Multiplication: x1(n)x2(n) 1 N X1(k) ⊗ X2(k) Parseval’s theorem: N−1 n=0 x(n)y∗(n) 1 N N−1 k=0 X(k)Y ∗(k) Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 3 / 58 Overlap-Save and Overlap-Add Circular and Linear Convolution Circular Convolution x1(n) ⊗ x2(n) F ←→ X1(k)X2(k) Q: What is circular convolution? Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 4 / 58
  • 2. Overlap-Save and Overlap-Add Circular and Linear Convolution Circular Convolution Assume: x1(n) and x2(n) have support n = 0, 1, . . . , N − 1. Examples: N = 10 and support: n = 0, 1, . . . , 9 -1 0 n-2-3 1 2 3 6 8754 9 101 2 3 6 8754 9 10 1 11 12 54 -1 10 n-2-3 2 3 1 6 87 96 87 9 10 11 12 54-1 0 n-2-3 1 1 2 3 6 87 9 10 11 12 Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 5 / 58 Overlap-Save and Overlap-Add Circular and Linear Convolution Circular Convolution Assume: x1(n) and x2(n) have support n = 0, 1, . . . , N − 1. x1(n) ⊗ x2(n) = N−1 k=0 x1(k)x2((n − k))N = N−1 k=0 x2(k)x1((n − k))N where (n)N = n mod N = remainder of n/N. Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 6 / 58 Overlap-Save and Overlap-Add Circular and Linear Convolution Modulo Indices and Periodic Repetition (n)N = n mod N = remainder of n/N Example: N = 4 n -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 (n)4 0 1 2 3 0 1 2 3 0 1 2 3 0 n N = integer + nonneg integer < N N 5 4 = 1 + 1 4 −2 4 = −1 + 2 4 Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 7 / 58 Overlap-Save and Overlap-Add Circular and Linear Convolution Modulo Indices and Periodic Repetition (n)N = n mod N = remainder of n/N Example: N = 4 n -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 (n)4 0 1 2 3 0 1 2 3 0 1 2 3 0 x((n))4 will be periodic with period 4. The repeated pattern will be consist of: {x(0), x(1), x(2), x(3)}. Thus, x((n))N is a periodic signal comprised of the following repeating pattern: {x(0), x(1), · · · x(N − 2), x(N − 1)}. Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 8 / 58
  • 3. Overlap-Save and Overlap-Add Circular and Linear Convolution Overlap During Periodic Repetition A periodic repetition makes an aperiodic signal x(n), periodic to produce ˜x(n). ˜x(n) = ∞ l=−∞ x(n − lN) Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 9 / 58 Overlap-Save and Overlap-Add Circular and Linear Convolution Overlap During Periodic Repetition A periodic repetition makes an aperiodic signal x(n), periodic to produce ˜x(n). There are two important parameters: 1. smallest support length of the signal x(n) 2. period N used for repetition that determines the period of ˜x(n) smallest support length > period of repetition there will be overlap smallest support length ≤ period of repetition there will be no overlap ⇒ x(n) can be recovered from ˜x(n) Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 10 / 58 Overlap-Save and Overlap-Add Circular and Linear Convolution Periodic Repetition: Example N = 4 -1 10 n x (n) = x (n) -2-3-4-5-6-7 2 3 4 5 6 7 1 2 -1 10 n-2-3-4-5-6-7 2 3 4 5 6 7 1 2 x (n)support length = 4 = N no overlap -1 10 n-2-3-4-5-6-7 2 3 4 5 6 7 x (n) + l=0 x (n-N) + l=1 + x (n+N) l=-1 + x (n+2N) l=-2 x (n-2N) l=2 ...... ~ Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 11 / 58 Overlap-Save and Overlap-Add Circular and Linear Convolution Period Repetition: Example N = 4 1 =x(n) x (n) -1 10 n-2-3-4-5-6-7 2 3 4 5 6 7 1 2 support length = 6 > N overlap n-1 10-2-3-4-5-6-7 2 3 4 5 6 7 2 1 x (n) -1 10 n-2-3-4-5-6-7 2 3 4 5 6 7 l=0 l=1 + + l=-1 + + + l=-2 l=2 ...... ~ x (n) x (n-N)x (n+N) x (n+2N) x (n-2N) Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 12 / 58
  • 4. Overlap-Save and Overlap-Add Circular and Linear Convolution Modulo Indices and the Periodic Repetition Assume: x(n) has support n = 0, 1, . . . , N − 1. x((n))N = x(n mod N) = ˜x(n) = ∞ l=−∞ x(n − lN) Note: Because the support size and period size are the same, there is no overlap when taking the periodic repetition x((n))N. Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 13 / 58 Overlap-Save and Overlap-Add Circular and Linear Convolution Modulo Indices and the Periodic Repetition n x(n) 1 2 -1 10-2-3-4-5-6-7 2 3 4 5 6 7 Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 14 / 58 Overlap-Save and Overlap-Add Circular and Linear Convolution Modulo Indices and the Periodic Repetition 1 1 2 0 n x(n) 1 2 -1 10-2-3-4-5-6-7 2 3 4 5 6 7 Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 15 / 58 Overlap-Save and Overlap-Add Circular and Linear Convolution Modulo Indices and the Periodic Repetition 1 1 2 0 2 11 0 n x(n) 1 2 -1 10-2-3-4-5-6-7 2 3 4 5 6 7 x((n))N Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 16 / 58
  • 5. Overlap-Save and Overlap-Add Circular and Linear Convolution Modulo Indices and the Periodic Repetition 1 1 2 0 2 11 0 12 8 4 0 -4 13 9 5 1 -3 14 10 6 2 -2 15 11 7 3 -1 n x(n) 1 2 -1 10-2-3-4-5-6-7 2 3 4 5 6 7 x((n))N Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 17 / 58 Overlap-Save and Overlap-Add Circular and Linear Convolution Modulo Indices and the Periodic Repetition n -1 10-2-3-4-5-6-7 2 3 4 5 6 7 ... 1 2 x (n) ~ 1 1 2 0 2 11 0 12 8 4 0 -4 13 9 5 1 -3 14 10 6 2 -2 15 11 7 3 -1 n x(n) 1 2 -1 10-2-3-4-5-6-7 2 3 4 5 6 7 x((n))N Therefore x((n))N = ˜x(n). Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 18 / 58 Overlap-Save and Overlap-Add Circular and Linear Convolution Circular Convolution: One Interpretation Assume: x1(n) and x2(n) have support n = 0, 1, . . . , N − 1. To compute N−1 k=0 x1(k)x2((n − k))N (or N−1 k=0 x2(k)x1((n − k))N ): 1. Take the periodic repetition of x2(n) with period N: ˜x2(n) = ∞ l=−∞ x2(n − lN) 2. Conduct a standard linear convolution of x1(n) and ˜x2(n) for n = 0, 1, . . . , N − 1: x1(n) ⊗ x2(n) = x1(n) ∗ ˜x2(n) = ∞ k=−∞ x1(k)˜x2(n − k) = N−1 k=0 x1(k)˜x2(n − k) Note: x1(n) ⊗ x2(n) = 0 for n < 0 and n ≥ N. Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 19 / 58 Overlap-Save and Overlap-Add Circular and Linear Convolution Circular Convolution: One Interpretation N−1 k=0 x1(k) x2((n − k))N = N−1 k=0 x1(k) ˜x2(n − k) . . . which makes sense, since x((n))N = ˜x(n). Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 20 / 58
  • 6. Overlap-Save and Overlap-Add Circular and Linear Convolution Circular Convolution: Another Interpretation Assume: x1(n) and x2(n) have support n = 0, 1, . . . , N − 1. To compute N−1 k=0 x1(k)x2((n − k))N (or N−1 k=0 x2(k)x1((n − k))N ): 1. Conduct a linear convolution of x1(n) and x2(n) for all n: xL(n) = x1(n) ∗ x2(n) = ∞ k=−∞ x1(k)x2(n − k) = N−1 k=0 x1(k)x2(n − k) 2. Compute the periodic repetition of xL(n) and window the result for n = 0, 1, . . . , N − 1: x1(n) ⊗ x2(n) = ∞ l=−∞ xL(n − lN), n = 0, 1, . . . , N − 1 Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 21 / 58 Overlap-Save and Overlap-Add Circular and Linear Convolution Using DFT for Linear Convolution Therefore, circular convolution and linear convolution are related as follows: xC (n) = x1(n) ⊗ x2(n) = ∞ l=−∞ xL(n − lN) for n = 0, 1, . . . , N − 1 Q: When can one recover xL(n) from xC (n)? When can one use the DFT (or FFT) to compute linear convolution? A: When there is no overlap in the periodic repetition of xL(n). When support length of xL(n) ≤ N. Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 22 / 58 Overlap-Save and Overlap-Add Circular and Linear Convolution Using DFT for Linear Convolution Let x(n) have support n = 0, 1, . . . , L − 1. Let h(n) have support n = 0, 1, . . . , M − 1. We can set N ≥ L + M − 1 and zero pad x(n) and h(n) to have support n = 0, 1, . . . , N − 1. 1. Take N-DFT of x(n) to give X(k), k = 0, 1, . . . , N − 1. 2. Take N-DFT of h(n) to give H(k), k = 0, 1, . . . , N − 1. 3. Multiply: Y (k) = X(k) · H(k), k = 0, 1, . . . , N − 1. 4. Take N-IDFT of Y (k) to give y(n), n = 0, 1, . . . , N − 1. Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 23 / 58 Overlap-Save and Overlap-Add Filtering of Long Data Sequences Filtering of Long Data Sequences The input signal x(n) is often very long especially in real-time signal monitoring applications. For linear filtering via the DFT, for example, the signal must be limited size due to memory requirements. Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 24 / 58
  • 7. Overlap-Save and Overlap-Add Filtering of Long Data Sequences Filtering of Long Data Sequences Recall, for N = 8 the 8-FFT is given by X(0) X(1) X(2) X(3) X(4) X(5) X(6) X(7) x(1) x(5) x(3) x(7) x(0) x(4) x(2) x(6) Stage 1 Stage 2 Stage 3 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 W8 0 W8 0 W8 0 W8 0 W8 0 W8 1 W8 2 W8 2 W8 0 W8 2 W8 3 W8 Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 25 / 58 Overlap-Save and Overlap-Add Filtering of Long Data Sequences Filtering of Long Data Sequences All N-input samples are required simultaneously by the FFT operator. Complexity of N-FFT is N log(N). If N is too large as for long data sequences, then there is a significant delay in processing that precludes real-time processing. signal input signal output Data Acquisition Delay Data Processing Delay Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 26 / 58 Overlap-Save and Overlap-Add Filtering of Long Data Sequences Filtering of Long Data Sequences Strategy: 1. Segment the input signal into fixed-size blocks prior to processing. 2. Compute DFT-based linear filtering of each block separately via the FFT. 3. Fit the output blocks together in such a way that the overall output is equivalent to the linear filtering of x(n) directly. Main advantage: samples of the output y(n) = h(n) ∗ x(n) will be available real-time on a block-by-block basis. Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 27 / 58 Overlap-Save and Overlap-Add Filtering of Long Data Sequences Filtering of Long Data Sequences Goal: FIR filtering: y(n) = x(n) ∗ h(n) Two approaches to real-time linear filtering of long inputs: Overlap-Add Method Overlap-Save Method Assumptions: FIR filter h(n) length = M Block length = L M Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 28 / 58
  • 8. Overlap-Save and Overlap-Add Overlap-Add Method Overlap-Add Method Overlap-Add Method Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 29 / 58 Overlap-Save and Overlap-Add Overlap-Add Method Overlap-Add Method Deals with the following signal processing principles: The linear convolution of a discrete-time signal of length L and a discrete-time signal of length M produces a discrete-time convolved result of length L + M − 1. Addititvity: (x1(n)+x2(n)) ∗ h(n) = x1(n) ∗ h(n)+x2(n) ∗ h(n) Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 30 / 58 Overlap-Save and Overlap-Add Overlap-Add Method -1 10 n-2-3 2 3 1 x(n) h(n) 6 87 96 87 9 * h(n)*= + + + . . . h(n)* h(n)* 10 -1 10 n-2-3 2 3 4 5 4 5 4 5 1 x (n)1 2 3 6 87 96 87 9 10 -1 10 n-2-3 2 3 1 x (n) 6 87 96 87 9 10 -1 10 n-2-3 2 3 1 x (n) 6 87 96 87 9 10 L=4 L=4 L=4 L=4 L=4 L=4 L=4 Input x(n) is divided into non-overlapping blocks xm(n) each of length L. Each input block xm(n) is individually filtered as it is received to produce the output block ym(n). Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 31 / 58 Overlap-Save and Overlap-Add Overlap-Add Method Overlap-Add Filtering Stage makes use of the N-DFT and N-IDFT where: N = L + M − 1 Thus, zero-padding of x(n) and h(n) that are of length L, M < N is required. The actual implementation of the DFT/IDFT will use the FFT/IFFT for computational simplicity. Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 32 / 58
  • 9. Overlap-Save and Overlap-Add Overlap-Add Method Using DFT for Linear Convolution Let xm(n) have support n = 0, 1, . . . , L − 1. Let h(n) have support n = 0, 1, . . . , M − 1. We set N ≥ L + M − 1 (the length of the linear convolution result) and zero pad xm(n) and h(n) to have support n = 0, 1, . . . , N − 1. 1. Take N-DFT of xm(n) to give Xm(k), k = 0, 1, . . . , N − 1. 2. Take N-DFT of h(n) to give H(k), k = 0, 1, . . . , N − 1. 3. Multiply: Ym(k) = Xm(k) · H(k), k = 0, 1, . . . , N − 1. 4. Take N-IDFT of Ym(k) to give ym(n), n = 0, 1, . . . , N − 1. Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 33 / 58 Overlap-Save and Overlap-Add Overlap-Add Method Linear Convolution via the DFT Length of linear convolution result = Length of DFT -1 10 n x (n) = x (n) -2-3-4-5-6-7 2 3 4 5 6 7 1 2 -1 10 n-2-3-4-5-6-7 2 3 4 5 6 7 1 2 x (n)support length = 4 = N no overlap -1 10 n-2-3-4-5-6-7 2 3 4 5 6 7 x (n) + l=0 x (n-N) + l=1 + x (n+N) l=-1 + x (n+2N) l=-2 x (n-2N) l=2 ...... ~ Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 34 / 58 Overlap-Save and Overlap-Add Overlap-Add Method -1 10 n-2-3 2 3 1 x(n) h(n) 6 87 96 87 9 * h(n)*= + + + . . . h(n)* h(n)* 10 -1 10 n-2-3 2 3 4 5 4 5 4 5 1 x (n)1 2 3 6 87 96 87 9 10 -1 10 n-2-3 2 3 1 x (n) 6 87 96 87 9 10 -1 10 n-2-3 2 3 1 x (n) 6 87 96 87 9 10 L=4 L=4 L=4 L=4 L=4 L=4 L=4 Input x(n) is divided into non-overlapping blocks xm(n) each of length L. Each input block xm(n) is individually filtered as it is received to produce the output block ym(n). Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 35 / 58 Overlap-Save and Overlap-Add Overlap-Add Method -1 10 n-2-3 2 3 1 x(n) h(n) 6 87 96 87 9 * = + + + . . . 10 -1 10 n-2-3 2 3 4 5 4 5 4 5 1 y (n)1 2 3 6 87 96 87 9 10 -1 10 n-2-3 2 3 1 y (n) 6 7 6 8 7 9 10 -1 10 n-2-3 2 3 1 y (n) 6 87 96 87 9 10 L=4 L=4 L=4 L=4 L=4 L=4 M-1=2 L=4 These extra M-1 samples (i.e.,“tail”) due to convolution expanding the support must be added to the begininning of the next output block M-1=2 M-1=2 ADD to next block ADD to next block Output blocks ym(n) must be fitted together appropriately to gener- ate: y(n) = x(n) ∗ h(n) The support overlap amongst the ym(n) blocks must be ac- counted for. Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 36 / 58
  • 10. Overlap-Save and Overlap-Add Overlap-Add Method Overlap-Add Addition Stage From the Addititvity property, since: x(n) = x1(n) + x2(n) + x3(n) + · · · = ∞ m=1 xm(n) x(n) ∗ h(n) = (x1(n) + x2(n) + x3(n) + · · · ) ∗ h(n) = x1(n) ∗ h(n) + x2(n) ∗ h(n) + x3(n) ∗ h(n) + · · · = ∞ m=1 xm(n) ∗ h(n) = ∞ m=1 ym(n) Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 37 / 58 Overlap-Save and Overlap-Add Overlap-Add Method -1 10 n-2-3 2 3 1 x(n) h(n) 6 87 96 87 9 * = + + + . . . -1 0 n-2-3 1 2 3 6 8754 9 101 2 3 6 8754 9 10 1 = 10 -1 10 n-2-3 2 3 4 5 4 5 4 5 1 y (n)1 2 3 6 87 96 87 9 10 -1 10 n-2-3 2 3 1 y (n) 6 7 6 8 7 9 10 -1 10 n-2-3 2 3 1 y (n) 6 87 96 87 9 10 L=4 L=4 L=4 L=4 L=4 L=4 M-1=2 L=4 These extra M-1 samples (i.e.,“tail”) due to convolution expanding the support must be added to the begininning of the next output block M-1=2 M-1=2 ADD to next block ADD to next block Output blocks ym(n) must be fitted together appropriately to gener- ate: y(n) = x(n) ∗ h(n) The support overlap amongst the ym(n) blocks must be ac- counted for. Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 38 / 58 Overlap-Save and Overlap-Add Overlap-Add Method Input signal: Output signal: zeros zeros zeros Add points Add points Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 39 / 58 Overlap-Save and Overlap-Add Overlap-Add Method Overlap-Add Method 1. Break the input signal x(n) into non-overlapping blocks xm(n) of length L. 2. Zero pad h(n) to be of length N = L + M − 1. 3. Take N-DFT of h(n) to give H(k), k = 0, 1, . . . , N − 1. 4. For each block m: 4.1 Zero pad xm(n) to be of length N = L + M − 1. 4.2 Take N-DFT of xm(n) to give Xm(k), k = 0, 1, . . . , N − 1. 4.3 Multiply: Ym(k) = Xm(k) · H(k), k = 0, 1, . . . , N − 1. 4.4 Take N-IDFT of Ym(k) to give ym(n), n = 0, 1, . . . , N − 1. 5. Form y(n) by overlapping the last M − 1 samples of ym(n) with the first M − 1 samples of ym+1(n) and adding the result. Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 40 / 58
  • 11. Overlap-Save and Overlap-Add Overlap-Add Method Overlap-Add Method: Cautionary Note If you DO NOT overlap and add, but only append the output blocks ym(n) for m = 1, 2, . . ., then you will not get the true y(n) sequence. Q: What sequence will you obtain instead? Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 41 / 58 Overlap-Save and Overlap-Add Overlap-Add Method Overlap-Add Method: Cautionary Note Output signal: Add points Add points Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 42 / 58 Overlap-Save and Overlap-Add Overlap-Add Method Overlap-Add Method: Cautionary Note zeros zeros zeros Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 43 / 58 Overlap-Save and Overlap-Add Overlap-Save Method Overlap-Save Method Overlap-Save Method Overlap-[Discard] Method Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 44 / 58
  • 12. Overlap-Save and Overlap-Add Overlap-Save Method Overlap-Save Method Deals with the following signal processing principles: The N = (L + M − 1)-circular convolution of a discrete-time signal of length N and a discrete-time signal of length M using an N-DFT and N-IDFT. Time-Domain Aliasing: xC (n) = ∞ l=−∞ xL(n − lN) support=M + N − 1 , n = 0, 1, . . . , N − 1 Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 45 / 58 Overlap-Save and Overlap-Add Overlap-Save Method 1 -1 10 n-2-3-4-5-6-7 2 3 4 5 6 7 1 2 N < L+M-1 overlap since n-1 10-2-3-4-5-6-7 2 3 4 5 6 7 2 1 -1 10 n-2-3-4-5-6-7 2 3 4 5 6 7 + + + + + ...... ... y (n+2N)L y (n-2N)L y (n)L y (n)L Add and keep points only at n=0, 1, ..., N-1 corruption from previous repetitions linear convolution result circular convolution result at n=M-1, M, ..., N-1 y (n)C y (n)L= L y (n+N) L y (n-N) Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 46 / 58 Overlap-Save and Overlap-Add Overlap-Save Method Overlap-Save Method Convolution of xm(n) with support n = 0, 1, . . . , N − 1 and h(n) with support n = 0, 1, . . . , M − 1 via the N-DFT will produce a result yC,m(n) such that: yC,m(n) = aliasing corruption n = 0, 1, . . . , M − 2 yL,m(n) n = M − 1, M, . . . , N − 1 where yL,m(n) = xm(n) ∗ h(n) is the desired output. The first M − 1 points of a the current filtered output block ym(n) must be discarded. The previous filtered block ym−1(n) must compensate by providing these output samples. Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 47 / 58 Overlap-Save and Overlap-Add Overlap-Save Method Overlap-Save Input Segmentation Stage 1. All input blocks xm(n) are of length N = (L + M − 1) and contain sequential samples from x(n). 2. Input block xm(n) for m > 1 overlaps containing the first M − 1 points of the previous block xm−1(n) to deal with aliasing corruption. 3. For m = 1, there is no previous block, so the first M − 1 points are zeros. Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 48 / 58
  • 13. Overlap-Save and Overlap-Add Overlap-Save Method Overlap-Save Input Segmentation Stage point overlap point overlap zeros Input signal blocks: Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 49 / 58 Overlap-Save and Overlap-Add Overlap-Save Method Overlap-Save Input Segmentation Stage x1(n) = {0, 0, . . . 0 M − 1 zeros , x(0), x(1), . . . , x(L − 1)} x2(n) = {x(L − M + 1), . . . x(L − 1) last M − 1 points from x1(n) , x(L), . . . , x(2L − 1)} x3(n) = {x(2L − M + 1), . . . x(2L − 1) last M − 1 points from x2(n) , x(2L), . . . , x(3L − 1)} ... The last M − 1 points from the previous input block must be saved for use in the current input block. Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 50 / 58 Overlap-Save and Overlap-Add Overlap-Save Method Overlap-Save Filtering Stage makes use of the N-DFT and N-IDFT where: N = L + M − 1 Only a one-time zero-padding of h(n) of length M L < N is required to give it support n = 0, 1, . . . , N − 1. The input blocks xm(n) are of length N to start, so no zero-padding is necessary. The actual implementation of the DFT/IDFT will use the FFT/IFFT for computational simplicity. Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 51 / 58 Overlap-Save and Overlap-Add Overlap-Save Method Using DFT for Circular Convolution N = L + M − 1. Let xm(n) have support n = 0, 1, . . . , N − 1. Let h(n) have support n = 0, 1, . . . , M − 1. We zero pad h(n) to have support n = 0, 1, . . . , N − 1. 1. Take N-DFT of xm(n) to give Xm(k), k = 0, 1, . . . , N − 1. 2. Take N-DFT of h(n) to give H(k), k = 0, 1, . . . , N − 1. 3. Multiply: Ym(k) = Xm(k) · H(k), k = 0, 1, . . . , N − 1. 4. Take N-IDFT of Ym(k) to give yC,m(n), n = 0, 1, . . . , N − 1. Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 52 / 58
  • 14. Overlap-Save and Overlap-Add Overlap-Save Method Circular Convolution via the DFT Length of linear convolution result > Length of DFT 1 -1 10 n-2-3-4-5-6-7 2 3 4 5 6 7 1 2 N < L+M-1 overlap since n-1 10-2-3-4-5-6-7 2 3 4 5 6 7 2 1 -1 10 n-2-3-4-5-6-7 2 3 4 5 6 7 + + + + + ...... ... y (n+2N)L y (n-2N)L y (n)L y (n)L Add and keep points only at n=0, 1, ..., N-1 corruption from previous repetitions linear convolution result circular convolution result at n=M-1, M, ..., N-1 y (n)C y (n)L= L y (n+N) L y (n-N) Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 53 / 58 Overlap-Save and Overlap-Add Overlap-Save Method Overlap-Save Output Blocks yC,m(n) = aliasing n = 0, 1, . . . , M − 2 yL,m(n) n = M − 1, M, . . . , N − 1 where yL,m(n) = xm(n) ∗ h(n) is the desired output. Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 54 / 58 Overlap-Save and Overlap-Add Overlap-Save Method Overlap-Save [Discard] Output Blocks y1(n) = {y1(0), y1(1), . . . y1(M − 2) M − 1 points corrupted from aliasing , y(0), . . . , y(L − 1)} y2(n) = {y2(0), y2(1), . . . y2(M − 2) M − 1 points corrupted from aliasing , y(L), . . . , y(2L − 1)} y3(n) = {y3(0), y3(1), . . . y3(M − 2) M − 1 points corrupted from aliasing , y(2L), . . . , y(3L − 1)} where y(n) = x(n) ∗ h(n) is the desired output. The first M − 1 points of each output block are discarded. The remaining L points of each output block are appended to form y(n). Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 55 / 58 Overlap-Save and Overlap-Add Overlap-Save Method Overlap-Save Output Stage Discard points Discard points Discard points Output signal blocks: Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 56 / 58
  • 15. Overlap-Save and Overlap-Add Overlap-Save Method Overlap-Save Method 1. Insert M − 1 zeros at the beginning of the input sequence x(n). 2. Break the padded input signal into overlapping blocks xm(n) of length N = L + M − 1 where the overlap length is M − 1. 3. Zero pad h(n) to be of length N = L + M − 1. 4. Take N-DFT of h(n) to give H(k), k = 0, 1, . . . , N − 1. 5. For each block m: 5.1 Take N-DFT of xm(n) to give Xm(k), k = 0, 1, . . . , N − 1. 5.2 Multiply: Ym(k) = Xm(k) · H(k), k = 0, 1, . . . , N − 1. 5.3 Take N-IDFT of Ym(k) to give ym(n), n = 0, 1, . . . , N − 1. 5.4 Discard the first M − 1 points of each output block ym(n). 6. Form y(n) by appending the remaining (i.e., last) L samples of each block ym(n). Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 57 / 58 Overlap-Save and Overlap-Add Overlap-Save Method Overlap-Save Method Discard points Discard points Discard points Output signal blocks: point overlap point overlap zeros Input signal blocks: Dr. Deepa Kundur (University of Toronto) Overlap-Save and Overlap-Add 58 / 58