C96 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

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 h[n−k]: the impulse response h[k]=0.8k 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]?

Name it

From impulses to convolution

Any sequence is a sum of shifted impulses, x[n]=∑kx[k]δ[n−k]. An LTI system answers δ[n−k] with h[n−k] (time invariance) and scales and adds the answers (linearity), so

y[n]=∑k=−∞∞x[k]h[n−k]=(x*h)[n]

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: x*h=h*x, so either one can be flipped.
  • Associative: (x*h1)*h2=x*(h1*h2): two systems in cascade act like one with impulse response h1*h2.
  • Distributive: x*(h1+h2)=x*h1+x*h2: systems in parallel add.
  • Impulses: x*δ=x, and x*δ[n−n0]=x[n−n0], a delay.
  • Sums multiply: ∑y=(∑x)(∑h).
  • Lengths add: sequences of L and M samples give L+M−1.

Convolving finite sequences is the same arithmetic as multiplying polynomials: (1+2z+3z2)(1+z)=1+3z+5z2+3z3 gives [1, 3, 5, 3].

The step response is the running sum of the impulse response, s[n]=∑k≤nh[k].

Worked example

Convolve [1, 2, 3] with [1, 1].

Show the solution
  1. Slide and multiply. y[0]=1⋅1=1y[1]=1⋅1+2⋅1=3y[2]=2+3=5y[3]=3
  2. Check the length. y = [1, 3, 5, 3] has 3 + 2 − 1 = 4 samples.
  3. 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 h[n]=0.8nu[n]. Find y[2] and y[7].

Show the solution
  1. y[2]. At n = 2 the flipped response covers k = 0 to 2: y[2]=0.82+0.8+1=2.44
  2. y[7]. At n = 7 it covers the whole block: y[7]=0.83+0.84+⋯+0.87=0.83(1−0.85)1−0.8=1.721

Answer y[2] = 2.44 and y[7] = 1.721.

Worked example

Convolve [1, −1] with [1, 2, 3, 4].

Show the solution
  1. Slide and multiply. y[0]=1y[1]=2−1=1y[2]=3−2=1y[3]=4−3=1y[4]=−4
  2. 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.
  3. 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 h[n]=(0.8)nu[n]. What is y[1]?

Check

x[n] has its peak at n = 2. Where is the peak of x[n]*δ[n−7]?

Check

What is the step response s[2] of the system h[n]=(0.75)nu[n]?

Check

An M-point moving average, h[n]=1/5 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 h[n]=anu[n] 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?

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.