Skip to content

Continuous-time convolution

Turn the last page's convolution sum into a sliding overlap area, then use it on a real RC circuit.

Before this3.1 · 5.2
Chapter 5 · Lesson 3 of 4

First, the picture

Drag Position t slowly from left to right and watch the shaded overlap between the two pulses.

From a sum to an integral

Flip h, slide it across x, and at each position the overlap area (shaded) is y(t).

0.60
Overlap area, y(t)
0.600
Describe this picture

Two plots. The upper one shows a fixed pulse x(τ)x(\tau) and a sliding pulse h(t−τ)h(t - \tau), with their overlap shaded. The lower one builds up y(t)y(t) as the position tt increases. The “Position t” slider moves the sliding pulse, and the readout “Overlap area, y(t)” gives the shaded area to three decimals.

From a sum to an integral

On the last page you built a system’s output by flipping one sequence, sliding it past the other, and at every slide position multiplying the overlapping samples and adding them up: y[n]=∑kx[k] h[n−k]y[n]=\sum_k x[k]\,h[n-k]. Most of the signals I actually care about, a voltage, a sound pressure, aren’t lists of samples at all: they’re defined at every instant. I want the exact same flip-and-slide picture to work for them too.

It does, with one change. Where the discrete version added up finitely many overlapping products, the continuous version has infinitely many instants to add over, so “add them up” becomes an integral, a running area under a curve (you met this reading on the impulse and step page). Flip hh, slide it across xx as before, and at each slide position the overlap area, not an added-up sum, is the output at that instant:

y(t)=∫−∞∞x(τ) h(t−τ) dτy(t) = \int_{-\infty}^{\infty} x(\tau)\,h(t-\tau)\,d\tau

Here x(t)x(t) and h(t)h(t) are the two signals being combined, tt is the instant you’re reading the output at, and τ\tau is a sliding time variable: a dummy variable the integral runs over, not a fixed instant, standing in for the sample index kk from the discrete sum. At each value of tt, h(t−τ)h(t-\tau) is hh flipped (the minus sign in front of τ\tau) and shifted to sit at tt; multiply it by x(τ)x(\tau) at every τ\tau and total up the area under that product, and you have y(t)y(t).

Go back to the two pulses at the top of the page. The shaded area grows as the sliding pulse starts to cover the fixed one, peaks once they line up exactly, then shrinks back to nothing, and the Overlap area, y(t) readout traces out exactly that rise and fall as the lower plot builds up.

Two pulses, one trapezoid

Two rectangular pulses are the simplest pair of signals to convolve by eye, and the shape you get tells you almost everything about how the general picture behaves. As the sliding pulse starts to overlap the fixed one, the overlap area climbs; if the two pulses are the same width, the overlap climbs all the way to full overlap and then falls straight back down, a plain triangle. If the sliding pulse is wider, once the narrower pulse is completely inside it the overlap area stops growing and holds flat for a while, a plateau, before falling as the pulses separate.

Set Second pulse width equal to the fixed pulse’s width and look at the output, then drag it wider.

Two pulses, one trapezoid

The overlap area rises, plateaus where one pulse is wider, then falls as the pulses separate.

1.60
Plateau width
0.60
Peak height
1.00
Describe this picture

Two plots: a fixed pulse and a second pulse whose width the “Second pulse width” slider sets, and the resulting output y(t)y(t). Two readouts show “Plateau width” and “Peak height”.

At equal widths the output is a plain triangle, peak in the middle. As the second pulse widens, watch a flat Plateau width open up on top of the triangle while the Peak height stops growing, capped at the width of the narrower pulse.

Charging and discharging a capacitor

A capacitor stores electric charge the way a bucket stores water: pour current in, and the charge (and the voltage across it) rises. A resistor placed in series with it limits how fast current can flow in, the way a narrow tap limits how fast the bucket fills. Together, an RC circuit’s voltage doesn’t jump instantly to match its input; it eases toward it, and how quickly it gets there is set by the time constant RCRC, the resistance times the capacitance: roughly how long the circuit takes to get most of the way to a new value.

An RC circuit’s impulse response, its reply to a single instantaneous spike of current, is a decaying exponential, h(t)=1RCe−t/RCu(t)h(t)=\tfrac{1}{RC}e^{-t/RC}u(t) for t≥0t\ge0: charge dumped in all at once leaks away smoothly afterward. Convolve that with a brief rectangular pulse of current and you get exactly the curve you’d expect from a real capacitor: the voltage climbs while the pulse is on (charging), then eases back down once it’s off (discharging), each leg governed by the same RCRC.

Drag Time constant down small, then large, and watch the output follow the input pulse.

Charging and discharging a capacitor

A small time constant tracks the pulse almost exactly; a large one smooths it into a slow rise.

1.00 s
Voltage when the pulse ends
0.632
Describe this picture

One plot of a rectangular input pulse and the RC circuit’s output. The “Time constant” slider sets RCRC in seconds, and the readout “Voltage when the pulse ends” gives the output at the pulse’s end to three decimals.

With a small time constant the output nearly traces the input pulse’s rectangle, fast charge, fast discharge. With a large one, notice the output turns into a slow, rounded rise that’s barely started falling by the time the pulse has long since ended, with Voltage when the pulse ends dropping further below the pulse’s full height the larger the time constant gets.

Convolving with a shifted spike

Back on the impulse and step page, the sifting property told you that multiplying a signal by δ(t−t0)\delta(t-t_0) and totalling the running area picks out exactly one value, x(t0)x(t_0). Convolution does that same sifting at every instant tt at once: x(t)∗δ(t−t0)=x(t−t0)x(t)*\delta(t-t_0)=x(t-t_0). Convolving any signal with a perfectly narrow, unit-area spike sitting at t0t_0 just delays that signal by t0t_0, with no other change at all, because the spike is too narrow to blur together any two nearby values the way a wider pulse (like the RC circuit’s decaying exponential) does.

Drag Delay across its whole range and watch the bright curve.

Convolving with a shifted spike

A perfectly narrow, unit-area spike at t0 sifts out a shifted copy of the signal: no blur, no distortion.

2.00 s
Shifted peak value
1.00 = x(0)
Describe this picture

One plot of a signal x(t)x(t), drawn faint, and its convolution with a spike at t0t_0, drawn bright. The “Delay” slider sets t0t_0 in seconds, and the readout “Shifted peak value” gives the shifted copy’s peak as ”= x(0)”.

The bright curve is the faint original curve, picked up and set back down, never stretched, flattened or blurred. Notice the Shifted peak value readout always reads out the original signal’s own peak value, however far you’ve slid it.

Worked example

Take two equal rectangular pulses, x(t)=h(t)=1x(t)=h(t)=1 for 0≤t≤10\le t\le1 (else 00). Their convolution is a triangle: y(t)=ty(t)=t for 0≤t≤10\le t\le1, then y(t)=2−ty(t)=2-t for 1≤t≤21\le t\le2, peaking at y(1)=1y(1)=1. As a check, the total area under a convolution always equals the product of the two signals’ areas: a triangle of base 22 and height 11 has area 12(2)(1)=1\tfrac12(2)(1)=1, matching (area of xx) ×\times (area of hh) =1×1=1=1\times1=1.

Now an RC circuit with RC=1RC=1 s, driven by a 1 s rectangular pulse starting at t=0t=0 (dropping the 1/RC1/RC prefactor since RC=1RC=1). While the pulse is on, y(t)=1−e−ty(t)=1-e^{-t}; at t=1t=1 s, the pulse’s end, y(1)=1−e−1=0.63212y(1)=1-e^{-1}=0.63212. After the pulse ends, y(t)=e−(t−1)−e−ty(t)=e^{-(t-1)}-e^{-t}; at t=2t=2 s, one further time constant later, y(2)=e−2(e−1)=0.23254y(2)=e^{-2}(e-1)=0.23254.

Finally, take x(t)=e−tu(t)x(t)=e^{-t}u(t) convolved with δ(t−3)\delta(t-3): the delay property says this is just x(t−3)=e−(t−3)u(t−3)x(t-3)=e^{-(t-3)}u(t-3). At t=5t=5, that’s e−2=0.13534e^{-2}=0.13534.

Where you’ll meet this

That RC charge-and-discharge curve comes back in Chapter 6, where you’ll get the same answer a second way, straight from how the circuit is built. The delay property you just confirmed is what later chapters use to treat a time delay as a simple multiplication instead of redoing an integral every time. And the same sliding, integrating picture shows up outside signal processing too: it’s how you work out the chances for the total of two dice-like random quantities.

The maths behind it · sums of random variables

Roll two dice and ask how likely each total is: you slide one die’s chances across the other’s and add up the overlaps. For smooth, continuous chances that adding-up becomes exactly this page’s convolution integral.

Reference card

QuantityFormulaNotes
Convolution integraly(t)=∫−∞∞x(τ)h(t−τ) dτy(t)=\displaystyle\int_{-\infty}^{\infty} x(\tau)h(t-\tau)\,d\taucontinuous twin of the discrete sum y[n]=∑kx[k]h[n−k]y[n]=\sum_k x[k]h[n-k]; commutative
Two equal rectangular pulses, width WWa triangle, peak WW at t=Wt=W, base 2W2W
RC pulse response (width WW)y(t)=1−e−t/RCy(t)=1-e^{-t/RC} for 0≤t≤W0\le t\le W; y(t)=e−(t−W)/RC−e−t/RCy(t)=e^{-(t-W)/RC}-e^{-t/RC} for t>Wt>Wcharge, then discharge
Convolution with a shifted deltax(t)∗δ(t−t0)=x(t−t0)x(t)*\delta(t-t_0)=x(t-t_0)a pure delay, no distortion

End of lesson 5.3

Where to go next.

Phasorium
LibraryEvery lesson, in order

Parts

About Phasorium
Look