Computing Convolution
When the interval changes, so does the formula
The upper figure shows the fixed input pulse (gold), the flipped and slid pulse (blue) and the green area where they overlap, and the two green dashed lines mark the two ends of the integration interval. The lower figure is the resulting triangle built from that area. Move the slide position t and the current piece and its formula change, and the formula switches at the breakpoints t = 0, 1, 2.
Breakpoints split the intervals
A breakpoint is an instant when one of the two edges of the slid pulse passes one of the two edges of the fixed pulse. In this example the overlap begins at t = 0, is complete at t = 1 and ends at t = 2. Between breakpoints the ends of the integration interval are max(0, t − 1) and min(1, t), and the two green dashed lines in the figure are exactly these two ends.
Integrate on each interval
Both pulses have height 1, so their product is 1 on the overlap, and the integral is simply the length of the overlap. For 0 ≤ t ≤ 1 that length is t, so the output rises as y = t; for 1 ≤ t ≤ 2 the length is 2 − t, so it falls as y = 2 − t. The two lines meet at t = 1 to form a peak of height 1.
Pieces join, durations add
The formulas of neighboring pieces take the same value at each breakpoint, so they join without a break. The convolution of signals of bounded size, like these two rectangular pulses, is always a continuous function in this way. The output's width is the sum of the two input widths, here 1 + 1 = 2. If the two pulses had different widths, a trapezoid with a flat top would appear instead of a triangle, but the procedure of splitting into pieces and integrating would be exactly the same.
Back to the first screen
Each of the triangle's three straight pieces came from the integral over one interval. The rising piece is y = t on 0 ≤ t ≤ 1, the falling piece is y = 2 − t on 1 ≤ t ≤ 2, and the 0 at both ends is the outer region with no overlap. The triangle's corners sat exactly at the breakpoints t = 0, 1, 2 because at each of those instants an edge of the sliding pulse passed an edge of the fixed pulse. Computing a convolution comes down to finding these breakpoints, splitting into pieces and integrating each piece.
You can now handle convolution both as a picture and as formulas. In the next unit, properties of LTI systems, you read a system's properties just from the shape of its impulse response h. If h is 0 for t < 0, the system is causal, and if the integral of |h| is finite, it is stable. Systems joined in series and in parallel merge into a single h through the associative and distributive laws of convolution, and the piecewise integration you just learned is the tool for finding that merged response.