C9 · Lesson 6 · The convolution sum
How an LTI system turns its impulse response into any output
Tap a discrete-time LTI system with a single impulse and record what comes out: that sequence, h[n], is its impulse response. Remarkably, it tells you everything. Every input is a stack of scaled, shifted impulses, and an LTI system answers each one with a scaled, shifted copy of h[n], all added together. That sum is convolution, the single most important operation in signal processing: it's how filters, echoes, blurs and moving averages all work.
- The input x[k] is a block of five 1s. The other stems are : the impulse response flipped around and slid to position n.
- The output y[n] is the sum of x[k] h[n − k] over k: wherever the two overlap, multiply and add. Slide n from −2 upward and watch the overlap grow, then shrink as the flipped response passes the block.
- The dashed curve is the whole output, and the dot is y[n] at the current n. It rises while the block feeds in and decays by 0.8 a step after.
Predict
x = [1, 2, 3] (starting at n = 0) is convolved with h = [1, 1]. What is y[1]?
- . The whole output is [1, 3, 5, 3]: each sample is the sum of two neighboring inputs, which is what h = [1, 1] does.
Name it
From impulses to convolution
Any sequence is a sum of shifted impulses, . An LTI system answers with (time invariance) and scales and adds the answers (linearity), so
Recipe for one output sample: flip h to get h[−k], slide it to h[n − k], multiply by x[k] point by point, and add.
Properties
- Commutative: , so either one can be flipped.
- Associative: : two systems in cascade act like one with impulse response .
- Distributive: : systems in parallel add.
- Impulses: , and , a delay.
- Sums multiply: .
- Lengths add: sequences of L and M samples give .
Convolving finite sequences is the same arithmetic as multiplying polynomials: gives [1, 3, 5, 3].
The step response is the running sum of the impulse response, .
Worked example
Convolve [1, 2, 3] with [1, 1].
Show the solution
- Slide and multiply.
- Check the length. y = [1, 3, 5, 3] has 3 + 2 − 1 = 4 samples.
- Check the sum. Its sum, 12, is 6 × 2, the product of the input sums.
Answer y = [1, 3, 5, 3].
Worked example
A block of five 1s goes into the system . Find y[2] and y[7].
Show the solution
- y[2]. At n = 2 the flipped response covers k = 0 to 2:
- y[7]. At n = 7 it covers the whole block:
Answer y[2] = 2.44 and y[7] = 1.721.
Worked example
Convolve [1, −1] with [1, 2, 3, 4].
Show the solution
- Slide and multiply.
- Read the result. y = [1, 1, 1, 1, −4] is a first difference: it turns the ramp into a constant and then falls back at the end.
- Check. Its length is 2 + 4 − 1 = 5, and its sum, 0, is the product of the sums, 0 × 10.
Answer y = [1, 1, 1, 1, −4].
Check
A 32-sample sequence is convolved with a 3-sample impulse response. How many samples long is the output?
Check
x = [1, 3, 2] and h = [1, 5], both starting at n = 0.
(a)
What is y[0]?
(b)
What is y[1]?
(c)
What is y[3]?
Check
A block of five 1s (n = 0 to 4) goes into . What is y[1]?
Check
x[n] has its peak at n = 2. Where is the peak of ?
Check
What is the step response s[2] of the system ?
Check
An M-point moving average, for n = 0 to 5 − 1, is fed a step of height 2.
(a)
What is the output at n = 1?
(b)
What is the output once n ≥ 5 − 1?
Check
A sequence whose samples add up to 10 is convolved with an impulse response whose samples add up to 0.5. What do the output's samples add up to?
Check
A sequence of 5 samples summing to 5 is convolved with one of 4 samples summing to 3.
(a)
How long is the result?
(b)
What do its samples sum to?
Check
A step goes into with a = 0.8.
(a)
What is y[2]?
(b)
Where does it settle?
Explain why
Why is the output of an LTI system the convolution of its input with its impulse response?
Any input sequence can be written as a sum of impulses: one at each time k, scaled by x[k]. Time invariance says the impulse at time k produces the impulse response shifted to start at k, h[n − k]. Linearity says scaling that impulse by x[k] scales its response by x[k], and that the response to the whole sum is the sum of the individual responses. Adding up over every k is exactly the convolution sum, so knowing h, the response to one impulse, determines the response to everything.
Practice
Keep practicing
12 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.