Sie sind auf Seite 1von 41

Overlap and Add

Convolution of Finite Duration Signals


Convolution with Indefinite Length Signals
Augusto Sarti

Linear Convolution

Linear Convolution

FFT Convolution

FFT Convolution

FFT Convolution

FFT Convolution

FFT Convolution

FFT Convolution vs. Direct Convolution

FFT Convolution vs. Direct Convolution

Audio FIR Filters


z

z
z

The nominal integration time of the ear, defined


here as the reciprocal of a critical bandwidth of
hearing, is around 10ms below 500 Hz
(Some would say it is even longer)
At a 50 kHz sampling rate, this is 500 samples.
Therefore, FIR filters shorter than the ears
integration time can easily be hundreds of taps long
FIR filters shorter than the ears integration time can
generally be characterized by their magnitude
frequency response (no perceivable delay effects)
FFT convolution is consequently an important
implementation tool for FIR filters in digital audio

Infinite-Length signals
z

We saw that we can perform efficient linear


convolution of 2 finite length sequences using the
Fourier based techniques
There are some situations where it will not be
practical to perform the convolution of 2 signals using
one FFT
z
z

Nx is extremely large
Real time operation (we cant wait around until the signal
ends)

Theoretically, there is no problem doing this with


direct convolution. Since h is finite in length we only
need to store the past Nh 1 samples of the input
signal x to calculate the next output.

Infinite-Length signals
z

Idea: We might be able to perform convolution


on a block at time. Basically, we chop up the
input signal, x by windowing, and perform
frequency domain convolution on each block
separately.
Pitfall: We need to make sure we put it all
back together correctly.
Consider breaking the input signal x, into
frames using a finite, zero phase length length
M(odd) window

Infinite-Length signals

Infinite-Length signals

Constant Overlap-Add (COLA)

COLA
z

Examples:
-

Rectangular window at 0% overlap


(Hop size R = Window size M)

Rectangular window at 50% overlap (R=M/2)

Bartlett window at 50% overlap (R=M/2) (figure)

Hamming window at 50% overlap (R=M/2)

Hamming window at 75% overlap (R=M/4)

Any window with R=1 (sliding FFT)

COLA

COLA

Example: Overlap-Add Convolution


z
z
z

Impulse-train signal
Length 32 filter
Overlap-add window:
z
z

Hanning
M = 32

Hop Size = R = M/2

Summary

Summary
1. Extract the mth frame of data
2. Shift it to the base time interval [0,M 1]
(or (M 1)/2, (M 1)/2])
3. Apply the analysis window w (causal or zero phase)
4. Zero-pad the windowed data out to the FFT size (a
power of 2)
5. Take the N-point FFT
6. Apply the filter H as a windowing operation in the
frequency domain
7. Take the N-point inverse FFT
8. Shift the origin of the N-point result out to sample mR
where it belongs
9. Sum into the output buffer containing the results from
prior frames (OLA step)

Das könnte Ihnen auch gefallen