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 filter :
where for m outside the region.
The concept is to divide the problem into multiple convolutions of h with short segments of :
where L is an arbitrary segment length. Then:
and y can be written as a sum of short convolutions:
where the linear convolution is zero outside the region. And for any parameter it is equivalent to the N-point circular convolution of with in the. The advantage is that the circular convolution can be computed more efficiently than linear convolution, according to the circular convolution theorem:
where:
The following is a pseudocode of the algorithm:

h = FIR_impulse_response
M = length
Nx = length
N = 8 × M
step_size = N -
H = DFT
position = 0
y = 0
while position + step_size ≤ Nx do
y = y + IDFT
position = position + step_size
end

Efficiency considerations

When the DFT and IDFT are implemented by the FFT algorithm, the pseudocode above requires about complex multiplications for the FFT, product of arrays, and IFFT. Each iteration produces output samples, so the number of complex multiplications per output sample is about:
For example, when M=201 and N=1024, equals 13.67, whereas direct evaluation of would require up to 201 complex multiplications per output sample, the worst case being when both x and h are complex-valued. Also note that for any given M, has a minimum with respect to N. Figure 2 is a graph of the values of N that minimize for a range of filter lengths.
Instead of, we can also consider applying to a long sequence of length samples. 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 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.