Loading [MathJax]/jax/output/HTML-CSS/jax.js

SignalProcessing.Compute.Filter.Convolve

This node computes the convolution \mathrm{c}[n] of two signals \mathrm{a}[n] and \mathrm{b}[n]:

\mathrm{c}[n] = \sum\limits_{k = -\infty}^{\infty} \mathrm{a}[k] \, \,\mathrm{b}[n-k]

For all k for which the signals \mathrm{a}[k] and \mathrm{b}[n-k] are not defined, the signal values are set to zero.

The length of the resulting signal is: \text{length}(\mathrm{c}) = \text{length}(\mathrm{a})+ \text{length}(\mathrm{b})-1.

Example

plot_convolve
\mathrm{a}[k]
\mathrm{b}[k]
\mathrm{c}[n]

In order to get a better understanding of the convolution, the diagrams below visualize the construction of c[n] for four selected n, namely c[0], c[1], c[5], and c[7]. The signal \mathrm{b}[n-k] can be constructed from \mathrm{b}[k] by a flip around the vertical axis and a shift to the right by n. Therefore, for increasing n the signal \mathrm{b}[n-k] slides from left to right over \mathrm{a}[k]. The yellow squares below mark those signal values that are involved in the computation of c[n] for a selected n:

plot_convolve_dev1
\mathrm{a}[k]
\mathrm{b}[0-k]
\mathrm{a}[k]
\mathrm{b}[1-k]
\mathrm{c}[0]
\mathrm{c}[n]
\mathrm{c}[1]
\mathrm{c}[n]
plot_convolve_dev2
\mathrm{b}[5-k]
\mathrm{b}[7-k]
\mathrm{c}[5]
\mathrm{c}[7]