Está en la página 1de 6

Overlap and Add and Overlap and Save Methods

Convolution Properties:
CTFT:

CTFT
x a t y a t
X j Y j

DTFT:

DTFT
x n yn
Xe jw Ye jw

xm y n m Xk Yk
N 1

DTDFFT:

DTDFFT

m 0

For discrete time signal processing, we can use this Fourier Transform relationship, but the
implementation must be performed in terms of a continuous sequence, not a periodic circular
one!

Approach one; make a bigger circle of periodicity by zero padding data blocks.
Approach two; use the periodic circle, but compute the outputs at a rate that is less than the
period, throwing away the circular overlap segments.

Note that both techniques use two different rates or input-to-output block sizes.

Page 1 of 6

Example 5.15: Methods of convolving two signals.

For the sequences:


hn 2 2 1 1,
xn 1 2 0 1,

N 4
M 4

h 0 x 0 2 1
2
h 0 x 1 h 1 x 0 2 2 2 1
6


h 0 x 2 h 1 x 1 h 2 x 0 2 0 2 2 1 1
5


y L n h 0 x 3 h 1 x 2 h 2 x 1 h 3 x 0 2 1 2 0 1 2 1 1 5
h 1 x 3 h 2 x 2 h 3 x 1 2 1 1 0 1 2
4


h 2 x 3 h 3 x 2 1 1 1 0
1
h 3 x 3 1 1
1

y2 = conv(x,h) =

2 2 1 1, 0 n 3
h zpad n
4n6
0,

1 2 0 1, 0 n 3
x zpad n
4n6
0,

form the fft sequences


XE=fft([1 2 0 1 0 0 0])

HE=fft([2 2 1 1 0 0 0])

XE = 4.0000

1.3460 - 1.9975i 1.1784 - 1.1680i -1.0245 - 1.8427i -1.0245 + 1.8427i 1.1784 + 1.1680i 1.3460 + 1.9975i

HE = 6.0000

2.1235 - 2.9725i 1.2775 - 0.7341i 0.5990 - 1.0609i

XE*HE= 24.0000

0.5990 + 1.0609i 1.2775 + 0.7341i 2.1235 + 2.9725i

-3.0794 - 8.2428i 0.6479 - 2.3573i -2.5685 - 0.0170i -2.5685 + 0.0170i 0.6479 + 2.3573i -3.0794 + 8.2428i

and
y1 = ifft(XE.*HE) =

2.0000

6.0000

5.0000

5.0000

4.0000

1.0000

Therefore, the convolution and DFT approaches are equal.

Page 2 of 6

1.0000

For a circular convolution:


2 2 1 1, 0 n 3
h zpad n
4n6
0,
1 2 0 1, 0 n 3
x zpad n
4n6
0,
h 0 x 0 h 1 x 6 h 2 x 5 h 3 x 4 2 1 2 0 1 0 1 0 2
h 0 x 1 h 1 x 0 h 2 x 6 h 3 x 5 2 2 2 1 1 0 1 0 6


h 0 x 2 h 1 x 1 h 2 x 0 h 3 x 6 2 0 2 2 1 1 1 0 5


y C n h 0 x 3 h 1 x 2 h 2 x 1 h 3 x 0 2 1 2 0 1 2 1 1 5
h 0 x 4 h 1 x 3 h 2 x 2 h 3 x 1 2 0 2 1 1 0 1 2 4


h 0 x 5 h 1 x 4 h 2 x 3 h 3 x 2 2 0 2 0 1 1 1 0 1
h 0 x 6 h 1 x 5 h 2 x 4 h 3 x 3 2 0 2 0 1 0 1 1
1

Page 3 of 6

Using the DFT approach to filter continuous input data conceptual framework.

Now consider an x(n) that is continuous instead of discrete.


What if we divided x(n) into M-length segments

x n x m n m M
m 0

we could then perform convolution on smaller elements at a time


N 1

y n hl xn l ,

for 0 n

l 0

N 1

l 0

m 0

y n hl x m n l m M
doing the usual swap of the order of summation
N 1

y n hl x m n l m M
m 0 l 0

defining smaller convolutions


N 1

y m n m M hl x m n l m M
l 0

results in

y n y m n m M
m 0

Can you see why this doesnt really work right? Has the filter been correctly applied for the
samples in x? If M>>N its ok for most of the points ....

Page 4 of 6

Overlap Add Method

Note that from the smaller convolutions, we require the computation of M points from each
convolution. If we use M points from X, two factors must be considered (1) the linear
convolution output creates a length N+M-1 output and (2) for M values of x there are only M-N
linear convolution outputs that are full engaged with the filter.
Looking at the graphical representation of the linear convolution
Engaging

Fully Engaged

Disengaging

M-N

N-1

M-1

N+M-1

Engaging

Fully Engaged

Disengaging

M-N

N-1

Engaging

M-1

Fully Engaged

N-1

N+M-1

Sum

M-1

2M-1

N+2M-1

2M-1

N+2M-1

Fully Engaged

N+M-1

Notice that the disengagement region of one convolution can be made to correspond to the
engagement process of one that is performed M points later. If the components are observed, the
values from both convolutions result in the desired fully engaged filter during this region in
time. Therefore, overlapping smaller length convolutions and then summing the appropriate
overlapping segments will form the continuous output. This approach is called the OverlapAdd Method for continuous signal processing. Using the overlap-add method, we can perform
the individual convolutions using the DFT techniques defined previously.
See Program_5_5bjb for each of the stages!

Page 5 of 6

Overlap Save Method

If a circular convolution is performed, there is a section of the result that wraps around the
circle and contains non-linear convolution data. If these results are ignored, but the valid ones
are kept, you could move forward by the number of valid samples in the data set and form a new
convolution.
The graphical operations would appear as:
Overlap
Throw Away

Fully Engaged
Save This Part
M-N+1

N-2

M-1

Overlap
Throw Away

N+M-1

Fully Engaged
Save This Part
M-N+1

M-N+1

M-1

2M-1

2M-N

Overlap
Throw Away

N+2M-1

Fully Engaged
Save This Part
M-N+1

M-N+1

Throw Away

M-1

2M-2N+2

Saved Part 1

N-1

Saved Part 2

M-1

3M-2N+1

2M-N

N+M-1

See MATLAB Program OAandOSMethods.m

Page 6 of 6

Saved Part 3

2M-1

N+2M-1

También podría gustarte