Building a signal out of impulses
Let x(t) be the number of HTTP requests a Web server receives in each 1-second interval. Over 10 seconds it is 1, 3, 5, 2, 5, 8, 7, 3, 9, 4 (Figure 5.3(a)). The same histogram is also the sum of ten smaller histograms, one per interval (Figure 5.3(b)). Each small histogram is the product of x(t) with a selector function sel(t, τ), which is 1 when t = τ and 0 otherwise. Adding them up gives back x:
A short digression on shifting. The series x(t − a) is x(t) shifted a steps to the right, taken to be 0 before time a. For a = 2, its value at time 2 is x(0) = 1 and at time 3 is x(1) = 3 (Figure 5.4).
Now define the impulse function δ(t), with δ(0) = 1 and δ(t) = 0 for every other t. Then sel(t, 0) = δ(t), and by the shifting rule sel(t, 1) = δ(t − 1). In general
so Equation 5.7 becomes
Each term is zero except when τ = t, so we may replace x(t) inside the sum by x(τ). Extending the sum over all integers gives x(t) = ∑ x(τ) δ(t − τ), which is Equation 5.10, the convolution of x with δ. The lab below generalises this from δ to any second function y.
These plots use the x(t) typed into the lab below, which starts as the series above.
Equation 5.11
Both functions are taken to be zero outside the range where they are given, as in Example 5.4.
What to notice
With Example 5.4 loaded, step t from 0 to 4 and compare the sum line with the text: 3, 10, 25, 36, 69. Only the stems where both functions are nonzero contribute.
Load δ(t): the output is x itself, which is Equation 5.10. Load δ(t − 2): the output is x shifted two steps to the right, as in Figure 5.4. Load 3, 2, 1 and press “Show the flip, then slide”. Because 3, 2, 1 is not symmetric, you can see it reverse to 1, 2, 3 before it slides.
The Dirac delta
To extend convolution to continuous time, we need a continuous version of the selector function: something that picks out the value of x(t) at a single time τ. In discrete time this was the impulse δ(t), which is 1 at t = 0 and 0 elsewhere. A continuous function that is zero everywhere except at one point is awkward: it is discontinuous there, and because a single point has no width, its integral is zero, so it cannot add anything up.
Instead, start from a rectangle of width T and height 1/T, centred on the origin. Its area is 1 whatever T is. Now let T → 0. The rectangle gets narrower and taller, but its area stays 1. In the limit it is an infinitely tall spike of zero width that still has unit area. Setting aside a rigorous treatment, we define the continuous-time impulse function by
Intuitively, it puts a unit mass entirely at t = 0. It is named after the physicist P. A. M. Dirac, and it is drawn as a vertical arrow at the origin. Its integral is the unit-step function u(t), which is 0 for t < 0 and 1 for t > 0, and undefined at 0 (Figure 5.5).
For any x(t) that is continuous near the origin, the delta acts as a selector. Multiplying by it gives a delta whose strength is the value of x at that point:
Integrating, and in analogy with Equation 5.10,
where the second form comes from swapping t and τ. Replacing δ by any function y gives the continuous-time convolution of Equation 5.16, which the lab below lets you explore.
Section 5.1.5 defines the Dirac delta as the limit of this unit-area pulse as T → 0. Shrink T and watch the output approach x(t) itself.
Equation 5.16
What to notice
In Example 5.5 the rectangle y is symmetric, so flipping it changes nothing, and the only visible step is the slide. The output has a different formula on each of the intervals [−2, −1], [−1, 0], [0, 1] and [1, 2], because the overlap between the two functions changes shape as y slides past x. The box on the left shows which piece applies at the current t.
Load the asymmetric pair and press “Show the flip, then slide”. Because the ramp is not symmetric, you can now see the flip reverse it before it slides. Finally, load the delta example and shrink the pulse width. The output becomes a copy of x, which is Equation 5.15.