Skip to content
Tutorials Center
My learning

Topics

Lesson 12 of 36 ยท LTI Systems and Convolution

The Convolution Integral

Compute continuous-time convolution y(t) = integral x(tau) h(t - tau) d tau for pulses and exponentials, understand the overlap regions, and check results numerically.

For continuous-time LTI systems the sum becomes an integral:

y(t) = (x * h)(t) = integral from -inf to +inf of x(tau) h(t - tau) d tau.

The recipe is the same as in discrete time: flip h, slide it by t, multiply and (now) integrate the overlap. The work is mostly in tracking where the two signals overlap. This lesson walks through the two canonical examples and shows how to approximate the integral on a computer.

The procedure

  1. Replace t by tau in both signals: x(tau) and h(tau).
  2. Flip h: form h(-tau), then shift by t to get h(t - tau).
  3. For each value of t, decide the range of tau where both x(tau) and h(t - tau) are nonzero.
  4. Integrate the product over that range. Different ranges of t give different formulas.
flowchart TB
    A["t very negative<br/>no overlap: y = 0"] --> B["t increasing<br/>partial overlap: y rises"]
    B --> C["full overlap<br/>y at its largest or flat"]
    C --> D["t increasing<br/>partial overlap: y falls"]
    D --> E["t very large<br/>no overlap: y = 0"]

Sliding a flipped signal across another goes through these stages; each stage has its own integration limits.

Example 1: a rectangle with itself

Let x(t) = h(t) = 1 for 0 <= t <= 1, otherwise 0.

  • For t < 0: no overlap, y = 0.
  • For 0 <= t <= 1: the overlap is tau from 0 to t, so y(t) = t.
  • For 1 <= t <= 2: the overlap is tau from t - 1 to 1, so y(t) = 2 - t.
  • For t > 2: no overlap, y = 0.

The result is a triangle of height 1 and base 2: the convolution of two pulses is smoother than either.

Python Numerical convolution of two pulses

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The factor dt is essential: np.convolve computes a sum, and the integral is the sum multiplied by the spacing. Forgetting it is the most common numerical error with continuous convolution.

Example 2: exponential and step (an RC circuit)

An RC low-pass filter has h(t) = (1/tau0) e^(-t/tau0) u(t). Feed it a unit step x(t) = u(t):

y(t) = integral from 0 to t of (1/tau0) e^(-s / tau0) ds = 1 - e^(-t / tau0) for t >= 0.

This is the familiar charging curve: starting at 0 and approaching 1, reaching 63 percent after one time constant tau0.

Python RC step response by numerical convolution

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Example 3: two exponentials

For x(t) = e^(-a t) u(t) and h(t) = e^(-b t) u(t) with a != b:

y(t) = ( e^(-b t) - e^(-a t) ) / (a - b) for t >= 0.

If a = b the formula becomes y(t) = t e^(-a t) u(t), a signature of repeated roots that you will meet again in the Laplace chapter.

Python Check the closed form

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Convolution with an impulse

Because of the sifting property, x(t) * delta(t - t0) = x(t - t0). A delta in the impulse response means the system just delays and scales the input. Systems with echoes, h(t) = delta(t) + 0.5 delta(t - T), output the input plus a half-strength delayed copy.

Practical tips

  • Draw x(tau) and h(t - tau) on the same axis for a few values of t.
  • Count the regions of t: the breakpoints are sums of the endpoints of the two signals.
  • For a unit-area pulse of width w the output is a smoothed version of the input, a "blur".
  • On a computer use the sample spacing dt and check against a closed form when possible.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Convolving a unit rectangle on [0, 1] with itself gives:

    The overlap area grows linearly then shrinks linearly, forming a triangle from t = 0 to t = 2 with peak 1 at t = 1.
  2. 2. When approximating the convolution integral with np.convolve, what must you multiply by?

    np.convolve gives a sum; the integral is that sum times dt.
  3. 3. The step response of an RC circuit with time constant tau0 reaches about what fraction of its final value at t = tau0?

    1 - e^(-1) = 0.632.
  4. 4. x(t) * delta(t - 2) is equal to:

    Convolving with a shifted impulse delays the signal by 2.

Summary

  • y(t) = integral of x(tau) h(t - tau) d tau: flip, shift, multiply, integrate over the overlap.
  • Break the time axis into regions where the overlap formula is constant in form.
  • Two unit pulses give a triangle; exponential with a step gives the RC charging curve.
  • Numerically: np.convolve(x, h) * dt.
  • Convolving with delta(t - t0) delays by t0.

Next: Convolution Properties and Difference Equations