Convolution & LTI systems: practice problems with step-by-step solutions

Free Convolution & LTI systems practice problems with diagrams, hints and full worked solutions. New values every time, at three levels: discrete convolution, continuous convolution, impulse response and Fourier series.

Free practice problemEasy
x[n]n−10−31224334h[n]n−101112134

The sequences x[n] = {−3, 2, 4, 3} and h[n] = {1, 1, 1} both start at n = 0. Find the sample y[1] of the convolution y[n] = x[n] ∗ h[n].

x[n] = {−3, 2, 4, 3}, n = 0…3h[n] = {1, 1, 1}, n = 0…2
Next problem →

What you practise

  1. Easydiscrete convolution
  2. Mediumcontinuous convolution
  3. Hardimpulse response and Fourier series

How to solve Convolution & LTI systems problems

  1. Sketch both signals and note where each one is nonzero.
  2. Flip h and slide it: for each output time, find the range where both signals overlap.
  3. Multiply and add (discrete) or multiply and integrate (continuous) over that overlap only.
  4. Check the result: the output starts at the sum of the start times, ends at the sum of the end times, and its area or sum is the product of the input areas or sums.

Common mistakes

  • Multiplying the two signals sample by sample instead of convolving them.
  • Shifting h without flipping it, which gives the correlation.
  • Using a step response formula where the impulse response is asked, or the other way round.
  • Counting the harmonic number wrongly: the component at k/T is harmonic k.

Key formulas

Discrete convolution
y[n] = Σ x[k]·h[n − k]
Continuous convolution
y(t) = ∫ x(τ)·h(t − τ) dτ
Length and sum
Ly = Lx + Lh − 1, Σy = Σx·Σh
Start, end and area
t1 + t3 … t2 + t4, ∫y = ∫x·∫h
Step into e^(−at)u(t)
y(t) = (A/a)(1 − e−at)
First-order system
y′ + a·y = b·x → h(t) = b·e−atu(t)
First-order recursion
y[n] = a·y[n − 1] + b·x[n] → h[n] = b·aⁿ
Sinusoid through h(t)
|H(jω)|, ∠H(jω); H(jω) = b/(a + jω)
Fourier series amplitudes
square ±A: 4A/(kπ), odd k; triangle ±A: 8A/(π²k²), odd k; pulse train: A·D and (2A/(kπ))|sin kπD|

Learn Convolution & LTI systems from scratch

Before this: Integrals

1What convolution does

A linear time-invariant (LTI) system is described completely by its impulse response h: the output it gives when the input is a single short kick.

Any input can be seen as a row of scaled, shifted kicks. Each kick produces a scaled, shifted copy of h, and the output is the sum of all copies. That sum is the convolution y = x ∗ h.

x[n]n−102112−134h[n]n−10113234

Convolution appears wherever a system has memory: filters, sensors, structures, circuits, and the spread of a signal over time.

Self-check A system has h[n] = {1, 3} (n = 0, 1). The input is a single sample x[0] = 2. What is the output?
  1. y[n] = {2, 3}
  2. y[n] = {2, 6}
  3. y[n] = {3, 1}
  4. y[n] = {8}

Answer: y[n] = {2, 6}. One kick of height 2 gives one copy of h scaled by 2: {2·1, 2·3} = {2, 6}. Convolution keeps the shape of h; it does not add the samples together.

2Discrete convolution step by step

For sequences the convolution is a sum:

y[n] = Σk x[k]·h[n − k]
  1. Flip h: h[−k] is h mirrored about k = 0.
  2. Shift the flipped h by n.
  3. Multiply it sample by sample with x and add the products. That gives y[n].
  4. Repeat for every n. If x has Lx samples and h has Lh, y has Lx + Lh − 1 samples, starting at the sum of the two start indices.

A quick check: the sum of all samples of y equals (Σx)·(Σh).

Self-check For x[n] = {1, 2} and h[n] = {3, 1}, both starting at n = 0, what is y[1]?
  1. 2
  2. 5
  3. 6
  4. 7

Answer: 7. y[1] = x[0]·h[1] + x[1]·h[0] = 1·1 + 2·3 = 7. Multiplying only x[1]·h[1] gives 2, and 6 keeps only one of the two products.

3A worked example

Follow every step. Try to predict the next one before you open it.

Worked example

Convolve x[n] = {2, 1, −1} with h[n] = {1, 3}, both starting at n = 0.

1

Look at the sequences

x[n]n−102112−134h[n]n−10113234

x has 3 samples and h has 2, so y has 3 + 2 − 1 = 4 samples, from n = 0 to n = 3.

2

y[0]

Only x[0] and h[0] overlap.

y[0] = 2·1 = 2
3

y[1]

y[1] = x[0]·h[1] + x[1]·h[0] = 2·3 + 1·1 = 7
4

y[2] and y[3]

y[2] = x[1]·h[1] + x[2]·h[0] = 1·3 + (−1)·1 = 2
y[3] = x[2]·h[1] = (−1)·3 = −3
5

Check the answer

Σx = 2 and Σh = 4, so Σy must be 8. Indeed 2 + 7 + 2 − 3 = 8.

Answer

y[n] = {2, 7, 2, −3} for n = 0 … 3.

4Continuous convolution

For signals in continuous time the sum becomes an integral:

y(t) = ∫ x(τ)·h(t − τ) dτ

The method is the same: flip h, slide it to position t, and integrate the product over the part where both signals are nonzero.

x(t)t12h(t)t1

With x(t) = 2 for 0 ≤ t < 1 s and h(t) = e−tu(t), the output while the pulse is on is y(t) = ∫₀ᵗ 2e−(t − τ) dτ = 2(1 − e−t). At t = 1 s it reaches 2(1 − e−1) = 1.26, and after that it decays as 1.26·e−(t − 1).

  • y starts at the sum of the two start times and ends at the sum of the two end times.
  • The area under y is the area under x times the area under h.
  • Two rectangular pulses give a trapezoid; two equal ones give a triangle.
Self-check x(t) is nonzero from 0 to 2 s and h(t) from 1 s to 4 s. When does y(t) = x(t) ∗ h(t) end?
  1. 3 s
  2. 4 s
  3. 5 s
  4. 6 s

Answer: 6 s. y ends at the sum of the end times: 2 + 4 = 6 s. It starts at 0 + 1 = 1 s, so it lasts 5 s; 5 s is the duration, not the end.

5Impulse responses and Fourier series

A first-order system y′ + a·y = b·x has the impulse response h(t) = b·e−atu(t). Its discrete cousin y[n] = a·y[n − 1] + b·x[n] has h[n] = b·aⁿ for n ≥ 0.

A sinusoid passes through an LTI system with its frequency unchanged. It is scaled by |H(jω)| and shifted by ∠H(jω), where H is the Fourier transform of h. For h(t) = b·e−atu(t), H(jω) = b/(a + jω).

A periodic signal with period T is a sum of harmonics at the frequencies k/T. Some standard amplitudes:

  • Square wave between −A and +A: only odd k, amplitude 4A/(kπ).
  • Triangle wave between −A and +A: only odd k, amplitude 8A/(π²k²).
  • Pulse train of height A and duty cycle D: mean A·D, harmonics (2A/(kπ))·|sin(kπD)|.
Self-check A square wave switches between −2 and +2. What is the amplitude of its third harmonic?
  1. 0.283
  2. 0.424
  3. 0.849
  4. 2.546

Answer: 0.849. 4A/(kπ) = 8/(3π) = 0.849. 2.546 is the fundamental, 0.283 divides by k² as for a triangle, and 0.424 uses 2A/(kπ), the formula for a wave from 0 to A.

6Common mistakes

  • Multiplying the two signals sample by sample instead of convolving them.
  • Sliding h without flipping it; that gives the correlation, not the convolution.
  • Mixing up the impulse response and the step response: the step response is the running sum or integral of h.
  • Counting harmonics wrongly: the component at k/T is harmonic k.
Self-check x[n] = {1, 2} and h[n] = {1, 1}, both from n = 0. What is y[1]?
  1. 1
  2. 2
  3. 3
  4. 4

Answer: 3. y[1] = x[0]·h[1] + x[1]·h[0] = 1 + 2 = 3. The sample-by-sample product x[1]·h[1] gives only 2.

7How exam questions look

  • Easy: discrete convolution. You find one output sample, the largest sample, the sum of all samples, the first or last index of y, the output of an FIR filter, or the response to a step.
  • Medium: continuous convolution. You find y(t) at a given time for two pulses, an exponential with a step or a pulse, or two exponentials, and the area, start, end or duration of y.
  • Hard: impulse responses and Fourier series. You find h(t) of a first-order ODE, h[n] or the step response of a recursion, the gain or phase for a sinusoid, or a harmonic of a square, triangle or pulse wave.

Learn it step by step in the appLearn it step by step in the app

Worked examples

Example 1Easy
x[n]n−1041−32−234h[n]n−10311234

The sequences x[n] = {4, −3, −2} and h[n] = {3, 1} both start at n = 0. Find the sample y[1] of the convolution y[n] = x[n] ∗ h[n].

x[n] = {4, −3, −2}, n = 0…2h[n] = {3, 1}, n = 0…1

Find y[1]

Show hints
  1. y[n] = Σ x[k]·h[n − k].
  2. For n = 1 the terms are k = 0, 1.
  3. x[0]·h[1] + x[1]·h[0].
Show the answer and the step-by-step solution

Discrete convolution: the output of a linear time-invariant system is y[n] = Σk x[k]·h[n − k]: flip h, shift it by n, multiply sample by sample with x and add. If x has Lx samples starting at nx and h has Lh samples starting at nh, then y has Lx + Lh − 1 samples starting at nx + nh. The sum of all samples of y equals (Σx)·(Σh). An FIR filter y[n] = b₀x[n] + b₁x[n − 1] + … is a convolution with h[n] = bn.

Terms of the sum

Only the k for which both x[k] and h[n − k] exist contribute.

x[0]·h[1] = 4·1 = 4
x[1]·h[0] = −3·3 = −9

Add them

y[1] = −5

Answer

y[1] = −5
Example 2Medium
x(t)t11h(t)t1

The pulse x(t) = 1 for 0 ≤ t < 1 s (zero elsewhere) is applied to a system with h(t) = e−2tu(t). Find the output y(2.5) at t = 2.5 s, after the pulse has ended.

x(t) = 1, 0 ≤ t < 1 sh(t) = e−2tu(t)t = 2.5 s

Find y(2.5)

Show hints
  1. Write the pulse as a step at t = 0 minus a step at t = 1 s.
  2. The step response is (A/a)(1 − e−at).
  3. After the pulse: y(t) = y(1)·e−a(t − 1).
Show the answer and the step-by-step solution

Continuous convolution: y(t) = ∫ x(τ)·h(t − τ) dτ. Flip h, slide it to position t and integrate the product of the overlapping parts. For causal signals the integral runs from 0 to t. Useful results: the area of y is the area of x times the area of h; if x lasts from t₁ to t₂ and h from t₃ to t₄, y lasts from t₁ + t₃ to t₂ + t₄. For h(t) = e−atu(t) and a step of height A, y(t) = (A/a)(1 − e−at).

Output at the end of the pulse

y(1) = (1/2)(1 − e−2) = 0.4323

Decay after the pulse

y(2.5) = 0.4323·e−2·1.5 = 0.02152

Answer

y(2.5) = 0.02152
Example 3Hard
δ(t)y′ + 5y = 3xh(t)

A system obeys y′(t) + 5·y(t) = 3·x(t). Find its impulse response at t = 0.05 s, h(0.05).

y′ + 5y = 3xt = 0.05 s

Find h(0.05)

Show hints
  1. Take Laplace transforms with zero initial conditions: (s + 5)Y(s) = 3X(s).
  2. H(s) = 3/(s + 5).
  3. h(t) = 3·e−5tu(t).
Show the answer and the step-by-step solution

Impulse response and Fourier series: the impulse response h(t) describes an LTI system completely: for y′ + a·y = b·x it is h(t) = b·e−atu(t), and for y[n] = a·y[n − 1] + b·x[n] it is h[n] = b·aⁿu[n]. A sinusoid cos ωt passes through with gain |H(jω)| and phase ∠H(jω), where H is the Fourier transform of h. A periodic signal is a sum of harmonics at k/T: a square wave of ±A has only odd harmonics with amplitudes 4A/(kπ), a triangle wave of peak A has 8A/(π²k²), and a pulse train of height A and duty cycle D has the mean A·D and the harmonics (2A/(kπ))·|sin(kπD)|.

Transfer function

H(s) = Y(s)/X(s) = 3/(s + 5)

Impulse response

h(t) = 3·e−5tu(t)
h(0.05) = 3·e−0.25 = 2.336

Answer

h(0.05) = 2.336

Questions and answers

What is Convolution & LTI systems?

A linear time-invariant (LTI) system is described completely by its impulse response h: the output it gives when the input is a single short kick.

Any input can be seen as a row of scaled, shifted kicks. Each kick produces a scaled, shifted copy of h, and the output is the sum of all copies. That sum is the convolution y = x ∗ h.

How do I solve Convolution & LTI systems problems step by step?
  1. Sketch both signals and note where each one is nonzero.
  2. Flip h and slide it: for each output time, find the range where both signals overlap.
  3. Multiply and add (discrete) or multiply and integrate (continuous) over that overlap only.
  4. Check the result: the output starts at the sum of the start times, ends at the sum of the end times, and its area or sum is the product of the input areas or sums.
What are common mistakes in Convolution & LTI systems?
  • Multiplying the two signals sample by sample instead of convolving them.
  • Shifting h without flipping it, which gives the correlation.
  • Using a step response formula where the impulse response is asked, or the other way round.
  • Counting the harmonic number wrongly: the component at k/T is harmonic k.
What do the Convolution & LTI systems exercises cover?
  • Easy: discrete convolution
  • Medium: continuous convolution
  • Hard: impulse response and Fourier series

Every problem has new values, so you learn the method instead of an answer. Stuck? Open a small hint first, and the full explanation only when you need it.

How practising works

  • Every problem has new values, so you learn the method instead of an answer.
  • Stuck? Open a small hint first, and the full explanation only when you need it.
  • Your progress, mistakes and saved problems are kept, so you can review before the exam.

Topics before and after this one

Learn first

Courses with this topic

More topics in Electrical

Printable worksheet