Convolution
Convolution is a mathematical operation performed on two functions. It has numerous applications in digital signal processing (e.g. impulse response) and DSP for music (e.g. convolution reverb).
Continuous Convolution¶
For two continuous functions $x(t)$ and $h(t)$, the convolution is defined with the shift operator $\tau$ as:
$$ y(t) = a(t) * b(t) = \int_{-\infty}^{\infty} a(t-\tau) b(\tau) d \tau$$
The follwing animation shows what is happening - one signal is shifted alongside the other signal, while their overlap is multiplied and summed up to create the output:
Discret Time Convolution¶
For the discrete time convolution, the integral is replaced by a sum. Besides that, it works in the same way, using the shift index $k$:
$$ a[n] * b[n] = y[n] = \sum_{k=-\inf}^\inf a[k] b[n−k] $$
The length of a convolution signal is given by the length of the two input signals. For vectors with the lengths
$$||a[n]|| = N$$
$$||b[n]|| = M$$
the length of the resulting signal is:
$$ ||y[n]|| = N+M - 1$$
Properties of Convolution
- Convolution is commutative:
$$ a[n] * b[n] = b[n] * a[n] $$
- Convolution is associative:
$$ a[n] * (b[n] * c[n]) = (a[n] * b[n]) * c[n] $$
- Convolution is distributive:
$$ a[n] * (b[n] + c[n]) = (a[n] * b[n]) + (a[n] * c[n]) $$
Multiplicative Identity¶
A convolution with an impulse results in the same signal:
$$ a[n] * \delta[n] = a[n]$$
Shift Property¶
Time-shifting an input signal of a convolution is equal to time-shifting the output by the same factor $M$:
$$ a[n]∗b[n−M] = y[n−M] $$