Overlap–add method

In signal processing, the overlap–add method is an efficient way to evaluate the discrete convolution of a very long signal

with a finite impulse response (FIR) filter

outside the region

This article uses common abstract notations, such as

in which it is understood that the functions should be thought of in their totality, rather than at specific instants

(see Convolution#Notation).

The concept is to divide the problem into multiple convolutions of

with short segments of

is an arbitrary segment length.

can be written as a sum of short convolutions:[1] where the linear convolution

is zero outside the region

-point circular convolution of

in the region

The advantage is that the circular convolution can be computed more efficiently than linear convolution, according to the circular convolution theorem:

{\displaystyle y_{k}[n]\ =\ \scriptstyle {\text{IDFT}}_{N}\displaystyle (\ \scriptstyle {\text{DFT}}_{N}\displaystyle (x_{k}[n])\cdot \ \scriptstyle {\text{DFT}}_{N}\displaystyle (h[n])\ ),}

where: The following is a pseudocode of the algorithm: When the DFT and IDFT are implemented by the FFT algorithm, the pseudocode above requires about N (log2(N) + 1) complex multiplications for the FFT, product of arrays, and IFFT.

[B] Each iteration produces N-M+1 output samples, so the number of complex multiplications per output sample is about:

log

whereas direct evaluation of Eq.1 would require up to

complex multiplications per output sample, the worst case being when both

Eq.3 has a minimum with respect to

Figure 2 is a graph of the values of

that minimize Eq.3 for a range of filter lengths (

Instead of Eq.1, we can also consider applying Eq.2 to a long sequence of length

The total number of complex multiplications would be: Comparatively, the number of complex multiplications required by the pseudocode algorithm is: Hence the cost of the overlap–add method scales almost as

log

while the cost of a single, large circular convolution is almost

The two methods are also compared in Figure 3, created by Matlab simulation.

The contours are lines of constant ratio of the times it takes to perform both methods.

When the overlap-add method is faster, the ratio exceeds 1, and ratios as high as 3 are seen.

Fig 1: A sequence of five plots depicts one cycle of the overlap-add convolution algorithm. The first plot is a long sequence of data to be processed with a lowpass FIR filter. The 2nd plot is one segment of the data to be processed in piecewise fashion. The 3rd plot is the filtered segment, including the filter rise and fall transients. The 4th plot indicates where the new data will be added with the result of previous segments. The 5th plot is the updated output stream. The FIR filter is a boxcar lowpass with samples, the length of the segments is samples and the overlap is 15 samples.
Fig 2: A graph of the values of N (an integer power of 2) that minimize the cost function
Fig 3: Gain of the overlap-add method compared to a single, large circular convolution. The axes show values of signal length N x and filter length N h .