---
title: Problem set 3
heading: "Problem set 3: convolution, recursion and correlation"
eyebrow: C9 · Problem set 3
type: problems
---

::: hook
These problems use lessons 6 to 12: convolution in discrete and continuous time, impulse responses and stability, difference equations, correlation and matched filtering, and the correlation and convolution lab.
:::

::: pool
pick: 12

::: check
kind: parts
given: a = 2 | -1 | 3; b = 1 | 4; c = 0.5 | -2

## Convolve [1, {a}, {b}] with [1, {c}].

::: part
answer: a + c
tolerance: 0.5%

### What is y[1]?

::: misses
- [any] The overlap at n = 1: $1 \cdot c + a \cdot 1$.
:::
:::

::: part
answer: b + a*c
tolerance: 0.5%

### What is y[2]?

::: misses
- [any] $b \cdot 1 + a \cdot c$.
:::
:::
:::

::: check
kind: parts
given: a = 0.5 | 0.8; b = 0.2 | -0.5; n = 3 | 5

## $x[n] = \given{a}^n u[n]$ goes into $h[n] = (\given{b})^n u[n]$.

::: part
answer: a^2 + a*b + b^2
tolerance: 0.5%

### What is y[2]?

::: misses
- [any] $\sum_{k=0}^{2} a^k b^{2-k}$.
:::
:::

::: part
answer: (a^(n + 1) - b^(n + 1))/(a - b)
tolerance: 0.5%

### What is y[{n}]?

::: misses
- [any] $(a^{n+1} - b^{n+1})/(a - b)$.
:::
:::
:::

::: check
kind: parts
given: W = 1 | 2; tau = 0.5 | 2 | 3

## A pulse of height 1 and width {W} s drives a system with $h(t) = e^{-t/\given{tau}}u(t)$.

::: part
answer: tau*(1 - exp(-W/tau))
tolerance: 0.5%

### What is the output at the end of the pulse, t = {W}?

::: misses
- [1 - exp(-W/tau)] Without the factor τ: the area of h is τ, not 1.
- [any] $\tau(1 - e^{-W/\tau})$.
:::
:::

::: part
answer: tau*(1 - exp(-W/tau))*exp(-1)
tolerance: 0.5%

### And one time constant later?

::: misses
- [any] After the pulse it decays as $e^{-(t - W)/\tau}$.
:::
:::
:::

::: check
kind: parts
given: A = 2 | 5; r = 0.5 | 0.8

## A system's step response is $s[n] = \given{A}(1 - \given{r}^{n+1})$ for n ≥ 0.

::: part
answer: A*(1 - r)
tolerance: 0.5%

### What is h[0]?

::: misses
- [any] $s[0] - s[-1] = s[0]$.
:::
:::

::: part
answer: A*(1 - r)*r^3
tolerance: 0.5%

### What is h[3]?

::: misses
- [any] $s[3] - s[2]$.
:::
:::
:::

::: check
kind: parts
given: a = 0.6 | 0.7 | 0.85

## $h[n] = n\,\given{a}^n u[n]$.

::: part
answer: a/(1 - a)^2
tolerance: 0.5%

### What is $\sum\lvert h[n]\rvert$?

::: misses
- [any] $\sum n a^n = a/(1 - a)^2$.
:::
:::

::: part
answer: floor(a/(1 - a)) + 1
tolerance: 0

### At which n is h largest?

::: misses
- [any] h rises from n to n + 1 while $(n + 1)a > n$, that is while $n < a/(1 - a)$.
:::
:::
:::

::: check
kind: parts
given: a = 0.5 | 0.9 | -0.7; k = 3 | 6

## The FIR system $y[n] = x[n] - \given{a}\,x[n-1]$ is to be undone.

::: part
answer: a^k
tolerance: 0.5%

### What is sample {k} of the inverse system's impulse response?

::: misses
- [any] The inverse is $a^n u[n]$.
:::
:::

::: part
answer: 1/(1 - abs(a))
tolerance: 0.5%

### What is the sum of its magnitudes?

::: misses
- [any] $1/(1 - \lvert a\rvert)$.
:::
:::
:::

::: check
kind: parts
given: a = 0.5 | 0.75 | 0.95; b = 1 | 0.2

## $y[n] = \given{a}\,y[n-1] + \given{b}\,x[n]$ is driven by a step from n = 0.

::: part
answer: b/(1 - a)
tolerance: 0.5%

### Where does it settle?

::: misses
- [any] Set y[n] = y[n − 1].
:::
:::

::: part
answer: b*(1 - a^4)/(1 - a)
tolerance: 0.5%

### What is y[3]?

::: misses
- [any] $b(1 + a + a^2 + a^3)$.
:::
:::
:::

::: check
kind: parts
given: c1 = 1.3 | 1.5; c2 = -0.3 | -0.4

## $y[n] = \given{c1}\,y[n-1] + (\given{c2})\,y[n-2] + x[n]$.

::: part
answer: (c1 + sqrt(c1^2 + 4*c2))/2
tolerance: 0.5%

### What is the larger characteristic root?

::: misses
- [any] Solve $z^2 - c_1z - c_2 = 0$.
:::
:::

::: part
answer: (c1 - sqrt(c1^2 + 4*c2))/2
tolerance: 0.5%

### And the smaller?

::: misses
- [any] The other root.
:::
:::
:::

::: check
kind: parts
given: r = 0.8 | 0.9 | 0.97; N = 8 | 16 | 20

## A resonator should ring with a period of {N} samples, its poles at radius {r}.

::: part
answer: 2*r*cos(2*pi/N)
tolerance: 0.5%

### What is $a_1$ in $y[n] = a_1y[n-1] + a_2y[n-2] + x[n]$?

::: misses
- [any] $2r\cos(2\pi/N)$.
:::
:::

::: part
answer: ln(0.5)/ln(r)
tolerance: 0.5%

### In how many samples does its ringing halve?

::: misses
- [any] Solve $r^n = 1/2$.
:::
:::
:::

::: check
kind: parts
given: a = 1 | 2; b = -1 | 3; c = 2 | 4; d = 1 | -2

## x = [{a}, {b}, {c}, {d}].

::: part
answer: a*b + b*c + c*d
tolerance: 0

### What is its autocorrelation at lag 1?

::: misses
- [any] Three overlapping products.
:::
:::

::: part
answer: a*c + b*d
tolerance: 0

### And at lag 2?

::: misses
- [any] Two overlapping products.
:::
:::
:::

::: check
kind: parts
given: k = 12 | 200 | 1500; fs = 1 | 10 | 100

## A radar's echo correlates best with the transmitted pulse at a lag of {k} samples, sampling at {fs} MHz.

::: part
answer: k/fs
unit: µs
tolerance: 0.5%

### What is the round-trip delay?

::: misses
- [any] $k/f_s$.
:::
:::

::: part
answer: 3e8*k/(fs*1e6)/2
unit: m
tolerance: 0.5%

### How far away is the target?

::: misses
- [3e8*k/(fs*1e6)] The delay covers the trip there and back.
- [any] $c\tau/2$.
:::
:::
:::

::: check
kind: parts
given: N = 13 | 64 | 511; s = -15 | -5 | 3

## A coded pulse of {N} samples arrives with a per-sample SNR of {s} dB in white noise.

::: part
answer: 10*log(N)
unit: dB
tolerance: 0.5%

### What gain does the matched filter give?

::: misses
- [any] $10\log_{10}N$.
:::
:::

::: part
answer: s + 10*log(N)
unit: dB
tolerance: 0.5%

### What is the SNR at its output peak?

::: misses
- [any] Input SNR plus the gain.
:::
:::
:::

::: check
kind: parts
given: h0 = 1 | 2; h1 = 0.5 | -1; y0 = 2 | 4; y1 = 3 | -1

## y = x * h with h = [{h0}, {h1}], and y begins [{y0}, {y1}, …].

::: part
answer: y0/h0
tolerance: 0.5%

### What is x[0]?

::: misses
- [any] $y[0]/h[0]$.
:::
:::

::: part
answer: (y1 - h1*y0/h0)/h0
tolerance: 0.5%

### What is x[1]?

::: misses
- [any] $(y[1] - h[1]x[0])/h[0]$.
:::
:::
:::

::: check
kind: parts
given: a = 0.4 | 0.7 | 0.85; D = 2 | 5

## An echo of {a}, {D} samples late, is removed by its inverse, $(-a)^{n/D}$ at multiples of D.

::: part
answer: ceil(ln(0.01)/ln(a) - 0.000001)
tolerance: 0

### How many terms until they've fallen to 1% or below?

::: misses
- [any] The first k with $a^k \le 0.01$.
:::
:::

::: part
answer: D*ceil(ln(0.01)/ln(a) - 0.000001)
tolerance: 0

### At what sample is that term?

::: misses
- [any] k terms, D samples apart.
:::
:::
:::

::: check
kind: parts
given: k = 20 | 37 | 109; fs = 8000 | 44100

## A signal's autocorrelation, skipping the main peak, is highest at a lag of {k} samples, at {fs} Hz.

::: part
answer: k/fs*1000
unit: ms
tolerance: 0.5%

### What is its period?

::: misses
- [any] $k/f_s$.
:::
:::

::: part
answer: fs/k
unit: Hz
tolerance: 0.5%

### What is its fundamental frequency?

::: misses
- [any] $f_s/k$.
:::
:::
:::
:::
