Home / Articles / Engineering Mathematics
Engineering Mathematics · 4 min read

Convolution in Signals and Systems

Understand convolution for discrete and continuous LTI systems with flip-and-slide intuition, an RC filter example and the convolution theorem explained.

How does a speaker cabinet colour the sound of music, how does a camera blur a photo, and how does an RC filter smooth a noisy sensor voltage? The same mathematical operation answers all three: convolution. For any linear time-invariant (LTI) system, convolution lets you predict the output for any input, once you know how the system responds to a single sharp pulse.

Why the Impulse Response Is Enough

An LTI system has two properties:

  • Linearity: scaling and adding inputs scales and adds the outputs.
  • Time invariance: delaying the input simply delays the output.

Now suppose we know the system's impulse response \( h \): its output when the input is a single unit impulse. Any input signal can be built from a sum of scaled, shifted impulses. By linearity and time invariance, the output must be the same sum of scaled, shifted impulse responses. That sum is convolution.

Discrete-Time Convolution

For sequences \( x[n] \) and \( h[n] \), the output is

$$ y[n] = (x * h)[n] = \sum_{k=-\infty}^{\infty} x[k]\, h[n - k] $$

The recipe is often called flip, shift, multiply, add:

  1. Flip \( h[k] \) to get \( h[-k] \).
  2. Shift it by \( n \) to get \( h[n - k] \).
  3. Multiply point by point with \( x[k] \).
  4. Add up the products to get \( y[n] \). Repeat for each \( n \).

If \( x \) has \( N \) samples and \( h \) has \( M \) samples, \( y \) has \( N + M - 1 \) samples.

Worked Example 1: Convolving Two Short Sequences

A digital filter has impulse response \( h[n] = \{2, 1, 1\} \) for \( n = 0, 1, 2 \). The input is \( x[n] = \{1, 2, 3\} \) for \( n = 0, 1, 2 \). Find the output.

The output length is \( 3 + 3 - 1 = 5 \) samples, \( n = 0 \) to 4. Using \( y[n] = \sum_k x[k]h[n-k] \):

\( n = 0 \): only \( k = 0 \) overlaps.

$$ y[0] = x[0]h[0] = (1)(2) = 2 $$

\( n = 1 \):

$$ y[1] = x[0]h[1] + x[1]h[0] = (1)(1) + (2)(2) = 5 $$

\( n = 2 \):

$$ y[2] = x[0]h[2] + x[1]h[1] + x[2]h[0] = (1)(1) + (2)(1) + (3)(2) = 9 $$

\( n = 3 \):

$$ y[3] = x[1]h[2] + x[2]h[1] = (2)(1) + (3)(1) = 5 $$

\( n = 4 \):

$$ y[4] = x[2]h[2] = (3)(1) = 3 $$

So \( y[n] = \{2, 5, 9, 5, 3\} \).

Sanity check. A neat property of convolution is that the sum of the output equals the product of the input sums. Here \( \sum x = 6 \) and \( \sum h = 4 \), so \( \sum y \) should be 24. Indeed, \( 2 + 5 + 9 + 5 + 3 = 24 \). (This works because convolving sequences is exactly like multiplying polynomials: \( (1 + 2z + 3z^2)(2 + z + z^2) \), and substituting \( z = 1 \) gives the sums.)

Continuous-Time Convolution

For continuous signals, the sum becomes an integral:

$$ y(t) = (x * h)(t) = \int_{-\infty}^{\infty} x(\tau)\, h(t - \tau)\, d\tau $$

For causal systems and inputs that start at \( t = 0 \), the limits reduce to 0 and \( t \):

$$ y(t) = \int_0^{t} x(\tau)\, h(t - \tau)\, d\tau $$

Convolution is commutative, so \( x * h = h * x \); choose whichever function is easier to flip.

Worked Example 2: Step Response of an RC Low-Pass Filter

An RC low-pass filter with \( R = 1 \ \text{k}\Omega \) and \( C = 100 \ \mu\text{F} \) has impulse response

$$ h(t) = \frac{1}{RC} e^{-t/RC}\, u(t) $$

A 5 V step is applied at \( t = 0 \): \( x(t) = 5u(t) \). Find the capacitor voltage \( y(t) \) and its value at \( t = 0.2 \) s.

Step 1: Time constant.

$$ \tau = RC = (1000 \ \Omega)(100 \times 10^{-6} \ \text{F}) = 0.1 \ \text{s} $$

Step 2: Set up the integral using \( h * x \), so that the simple step is the flipped function:

$$ y(t) = \int_0^{t} h(\lambda)\, x(t - \lambda)\, d\lambda = \int_0^{t} \frac{1}{0.1} e^{-\lambda/0.1} (5)\, d\lambda $$

Step 3: Integrate.

$$ y(t) = \frac{5}{0.1}\left[-0.1\, e^{-\lambda/0.1}\right]_0^{t} = 5\left(1 - e^{-t/0.1}\right) \ \text{V} $$

Step 4: Evaluate at \( t = 0.2 \) s (two time constants):

$$ y(0.2) = 5\left(1 - e^{-2}\right) = 5(1 - 0.1353) = 4.32 \ \text{V} $$

Sanity check. This is the familiar capacitor charging curve from circuit theory: about 63% charged after one time constant and 86.5% after two (\( 4.32/5 = 86.5\% \)). As \( t \to \infty \), \( y \to 5 \) V, the supply voltage, as it must. The area under \( h(t) \) is exactly 1, which is why the filter passes a steady DC level unchanged.

The Convolution Theorem

Direct convolution can be laborious. Transforms make it easy:

$$ \mathcal{L}\{x * h\} = X(s)H(s), \qquad \mathcal{F}\{x * h\} = X(\omega)H(\omega) $$

Convolution in time becomes multiplication in the frequency or s-domain. Check Example 2: \( X(s) = 5/s \) and \( H(s) = \dfrac{10}{s + 10} \), so

$$ Y(s) = \frac{50}{s(s + 10)} = \frac{5}{s} - \frac{5}{s + 10} \ \Rightarrow \ y(t) = 5\left(1 - e^{-10t}\right) $$

which matches. Computers exploit this with the Fast Fourier Transform, convolving long audio or image signals far faster than direct summation.

Where Convolution Appears

  • Audio: reverb plugins convolve a dry recording with the measured impulse response of a real concert hall.
  • Image processing: blurring, sharpening and edge detection are 2D convolutions with small kernels.
  • Communications: a channel smears transmitted pulses, and receivers must undo this effect.
  • Deep learning: convolutional neural networks slide learned kernels across images (technically, most use cross-correlation, which skips the flip).
  • Probability: the distribution of the sum of two independent random variables is the convolution of their distributions.

Did You Know?

  • Convolving a rectangular pulse with itself produces a triangular pulse, and repeating this many times gives a shape that approaches the bell curve.
  • Engineers measure the acoustic impulse response of famous halls by popping balloons or firing starter pistols and recording the echoes.
  • The Duhamel integral, used by structural engineers for earthquake response, is convolution under another name.

Key Takeaways

  • For LTI systems, output equals input convolved with the impulse response.
  • Discrete convolution: flip, shift, multiply and add; the output has \( N + M - 1 \) samples.
  • Continuous convolution replaces the sum with an integral, often from 0 to \( t \) for causal signals.
  • The convolution theorem turns convolution into multiplication in the Laplace or Fourier domain.
  • Check answers using sum properties, known circuit results or a transform method.

For step-by-step help with convolution, signals and systems, or DSP assignments, contact Amathify's experts and PhD scholars on WhatsApp or through the Ask a Question form.

Stuck on a problem or assignment?

Our experts and PhD scholars solve maths, physics and chemistry — step by step.

WhatsApp usAsk a question

Related articles