It is well known that the output of a filter can be obtained by convolving the filters input with its impulse response. (Here we are assuming that the filter is a linear time invariant system.) It is also well known that the the Fourier Transform (discrete of otherwise) of the output is obtained by multiplying the Fourier Transform of the input by the Fourier Transform of the filters impulse response (the filters 'frequency response'.) There may also be a scaling factor to consider, depending on how the Fourier Transform was defined.

In this Annex we show how use the DFT (FFT) as an efficient convolution algorithm.

Given two discrete signals *f* and *h *which are defined for all integral *n*, the convolution of these signals is defined as:

In effect, this expression is simply the sum of shifted copies of *h* (centred on *n'*), which are weighted by the value *f* at *n'*. So we can think of *h* as the impulse response and *f* as the signal. However, this distinction is artificial and unnecessary. A simple substitution shows that convolution commutes:

If we substitute:

and note that the summation covers all *n'*, and therefore all *n'' *(independent of *n*):

If both *f* and *h* are periodic, with period *N*, then their convolution (as defined above) will yield an infinite result (assuming the signals are non-zero). However, we can usefully re-define the convolution of such signals:

It is easy to see that *g* is also periodic, with period *N*. (Strictly, this only requires that *h* is periodic, but we also require that *f* is periodic to ensure circular convolution commutes.)

If we take the DFT of *g*:

The last step above is the first trick. See what we've done?

A little re-arrangement reveals:

The second trick is to notice that the inner summation is *independent* of *n'*, despite the fact that *n'* appears in both factors. Both factors are periodic, and the sum includes every possible product, so it doesn't matter what order we use to sum the products:

So, the final result is:

It is worth noting that had we not used normal DFT scaling, but instead used the 'raw' (un-scaled) FFT, we would have obtained the result:

So time domain convolution is accomplished by a simple multiplication in the frequency domain. This property is one of the most useful features of the FFT. An *N* point circular convolution has algorithmic complexity *O*(*N*^{2}), but using FFT's we can reduce this to *O*(*N.logN*). So large convolutions are often performed with FFT's. It is also simple to show (and not in the least surprising) that the converse is also true. Time domain multiplication is accomplished by frequency domain convolution:

If we return to the original (aperiodic) definition of convolution, we can observe that if both *f* and *h* are of finite length then so is their convolution *g*. Here, we assume that the sequences are zero other than in some defined range. Specifically, if *f* has length *N** _{f }* and

Assume that:

The minimum and maximum values of *n'* which yield non-zero *f*(*n'*) are 0 and *N** _{f }*-1 respectively.

For *n'*=0, the minimum and maximum values of *n* which yield non-zero *h*(*n*-*n'*) are 0 and *N** _{h }*-1 respectively. Similarly, for

Suppose that instead of being finite, the sequences *f *and *h* were both periodic, with period *N*. (This could be accomplished by padding the sequences with the required number of zeros between periods.) Circular convolution would result in a summed periodic repetition of *g*. Provided *N*>=*N _{g}* there would be no overlap between periods, so an

For convienience, we would probably want to use a Radix 2 FFT, so a good choice for performing convolutions by FFT (in a Finite Impule Response (FIR) filter for example) is to design a filter of *N** _{h}*=2

©1999 - Engineering Productivity Tools Ltd.