Screencast video [⯈]
In many practical situations a measured signal , which is assumed to be zero for , must first be cleaned up before further processing. This is done by filtering the measured samples of with a filter with impulse response . In such situations the number of samples of the measured signal can be extremely long, while the length of the impulse response is much smaller. Thus the problem at hand is to calculate the following extreme, or ‘’, long convolution sum in an efficient way: In a followup module we will show that the convolution sum of a signal with a length impulse response can be computed very efficiently with the use of Fast Fourier Transforms (FFT's). Typically FFT's process each iteration one block of samples and for this approach it is necessary that all data is processed in blocks of samples. The block length can be long but certainly not as long as the ‘’ length of sequence . This efficient block processing approach implies that all sequences, the signal to be filtered, the impulse response and the output of our problem at hand, as described in equation (), must be split in blocks of the same length of samples. In case a sequence does not have a length of samples it can easily be extended by padding it with zeros.
In the following subsections we will discuss two different of such block processing approaches to tackle the ‘’ long convolution problem (). For both approaches we assume a block length of samples and a length impulse response , with . This impulse response is zero padded up to a length impulse response as follows: Note that with this zero padded description of the impulse response, the original convolution sum () can be written as:
Overlap-add method
The first, so called overlap-add, approach is based on the of two blocks.
The convolution sum of a sequence of samples with an impulse response of samples results in an output sequence which consists of samples. As indicated in the figure, the first and last samples are ‘fade-in’ (fi) and ‘fade-out’ (fo) samples respectively. In order not to have an overlap between fade-in and fade-out regions we assume .
In the overlap-add method, as depicted in Fig. 2, the ‘’ long sequence is partitioned into subsequences (‘blocks’) of length , thus: With this non overlapped splitting we can rewrite the convolution sum () as follows: Each of the intermediate convolution sum results consist of maximal non zero samples in which the first and last samples of each subsequence are due to fade-in and fade-out.
- :
- Zero pad length impulse response up to length ,
- Zero pad length input sequence up to length ,
- Calculate length convolution sum ,
- The first samples are valid convolution sum results:
- :
- Zero pad length input sequence up to length ,
- Calculate length convolution sum ,
- Add last 'fade-out' samples of block and first 'fade-in' samples of block :
Overlap-save method
The second approach, which is called overlap-save, is based on the of two blocks.
In the overlap-save method, as depicted in Fig. 3, the ‘’ long sequence is partitioned into blocks of length with an overlap of samples:
- :
- Zero pad length impulse response up to length ,
- Calculate the first samples of the convolution sum :
- The first samples are valid convolution sum results:
- :
- Calculate the first samples of the convolution sum :
- Discard the first 'fade in' samples and the last samples are valid convolution sum results:
Final notes
The overlap-add procedure is based on of blocks while the overlap-save procedure is based on of blocks.
For applications in which the filter coefficients do not change during processing of the ‘’ long sequence , it is valid to add the ‘fade out’ samples of iteration and ‘fade in’ samples of iteration since both use the same fixed impulse response. However, in adaptive filter applications the filter coefficients will change during the processing of the ‘’ long sequence and it is not valid to add the ‘fade out’ samples of iteration and ‘fade in’ samples of iteration . For this reason the overlap-add procedure is mainly used when the filter coefficients of the impulse response do not change while overlap-save is mainly used for adaptive applications.
In a follow up module we will show how both block processing approaches can be implemented efficiently with the use of FFT's.