The Art of DSP - Kindle eBook Company logo

Introduction to DSP - time domain processing: convolution I

Convolution is a weighted moving average with one signal flipped back to front:

The equation is the same as for correlation except that the second signal (y[k - n]) is flipped back to front.

calculation of a single point in the convolution function

The diagram shows how the unknown signal can be identified.

The diagram shows how a single point of the convolution function is calculated:

  • first, one signal is flipped back to front
  • then, one signal is shifted with respect to the other
  • the amount of the shift is the position of the convolution function point to be calculated
  • each element of one signal is multiplied by the corresponding element of the other
  • the area under the resulting curve is integrated

Convolution requires a lot of calculations. If one signal is of length M and the other is of length N, then we need (N * M) multiplications, to calculate the whole convolution function.

Note that really, we want to multiply and then accumulate the result - this is typical of DSP operations and is called a 'multiply/accumulate' operation. It is the reason that DSP processors can do multiplications and additions in parallel.

Convolution is used for digital filtering.

The reason convolution is preferred to correlation for filtering has to do with how the frequency spectra of the two signals interact. Convolving two signals is equivalent to multiplying the frequency spectra of the two signals together - which is easily understood, and is what we mean by filtering. Correlation is equivalent to multiplying the complex conjugate of the frequency spectrum of one signal by the frequency spectrum of the other. Complex conjugation is not so easily understood and so convolution is used for digital filtering. Convolving by multiplying frequency spectra is called fast convolution.

Copyrite:Bores Signal Processing backward/forward go back to start of module go back to previous page go to next page go to next module