---
title: "Problem set 11: designing analysis and adaptive systems"
heading: "Problem set 11: from requirements to spectrum analyzers, estimators, adaptive filters, filter banks and image filters"
eyebrow: S7 · Problem set 11
type: problems
---

::: hook
These problems run the analysis and adaptive lessons (27 to 47) backward: from a resolution, a detection margin, an accuracy or a convergence time to the record length, averaging, filter length, step size or number of levels that achieves it.
:::

::: pool
pick: 12

::: check
kind: parts
given: d = 1 | 5 | 20; s = 8 | 48 | 1000

## A spectrum analyzer at {s} kHz must resolve tones {d} Hz apart with a Hann window.

::: part
answer: 2^ceil(log(2*s*1000/d)/log(2) - 1e-9)
unit: samples
tolerance: 0

### What power-of-two FFT length does it need?

::: misses
- [any] At least $2f_s/\Delta f$, rounded up to a power of two.
:::
:::

::: part
answer: 2^ceil(log(2*s*1000/d)/log(2) - 1e-9)/(s*1000)
unit: s
tolerance: 0.5%

### How long a record is that?

::: misses
- [any] N over the sample rate.
:::
:::
:::

::: check
kind: parts
given: S = -30 | -20 | -10; T = 10 | 15; E = 1.5 | 1.73

## A tone {S} dB below white noise must show at least {T} dB above the noise in its bin, with a window of ENBW {E} bins.

::: part
answer: E*10^((T - S)/10)
unit: samples
tolerance: 0.5%

### How many points must the FFT have, at least?

::: misses
- [any] Solve $S + 10\log_{10}(N/\text{ENBW}) = T$.
:::
:::
:::

::: check
kind: parts
given: p = 5 | 10 | 20; L = 512 | 4096; s = 8 | 48

## A Welch PSD estimate with {L}-point segments at {s} kHz must have a standard deviation of {p}% of its value (treat segments as independent).

::: part
answer: (100/p)^2
unit: segments
tolerance: 0.5%

### How many segments does it need?

::: misses
- [any] $K = (1/p)^2$.
:::
:::

::: part
answer: ((100/p)^2 + 1)*L/2/(s*1000)
unit: s
tolerance: 0.5%

### How long a record, with 50% overlap?

::: misses
- [any] (K + 1)L/2 samples.
:::
:::
:::

::: check
kind: parts
given: R = 100 | 1000 | 50000; s = 8 | 96

## A spectrogram must show a {R} Hz/s chirp as sharply as possible at {s} kHz.

::: part
answer: sqrt(2/R)*1000
unit: ms
tolerance: 0.5%

### What Hann window length?

::: misses
- [any] $T = \sqrt{2/R}$.
:::
:::

::: part
answer: sqrt(2/R)*s*1000
unit: samples
tolerance: 0.5%

### How many samples is that?

::: misses
- [any] T times the sample rate.
:::
:::
:::

::: check
kind: parts
given: t = 16 | 64 | 128; s = 8 | 16; M = 5 | 10

## An echo canceller must cover a {t} ms echo tail at {s} kHz with {M}% misadjustment.

::: part
answer: t*s
unit: taps
tolerance: 0.5%

### How many taps?

::: misses
- [any] Tail length times sample rate.
:::
:::

::: part
answer: 2*M/100
tolerance: 0.5%

### What NLMS step $\tilde\mu$ gives that misadjustment ($M \approx \tilde\mu/2$)?

::: misses
- [any] $\tilde\mu = 2M$.
:::
:::
:::

::: check
kind: parts
given: P = 32 | 256 | 1024; M = 1 | 5 | 10; f = 8 | 16

## An LMS filter with {P} taps and white input must reach {M}% misadjustment at {f} kHz.

::: part
answer: P/(2*M/100)
unit: samples
tolerance: 0.5%

### What convergence time constant results?

::: misses
- [any] From $M = \mu P\sigma^2/2$ and $\tau = 1/(\mu\sigma^2)$: $\tau = P/2M$.
:::
:::

::: part
answer: P/(2*M/100)/(f*1000)*1000
unit: ms
tolerance: 0.5%

### In milliseconds?

::: misses
- [any] Samples over the rate.
:::
:::
:::

::: check
kind: parts
given: T = 10 | 50 | 200; s = 8 | 16; P = 16 | 64

## An RLS filter with {P} taps at {s} kHz must track changes with a memory of about {T} ms.

::: part
answer: 1 - 1/(T*s)
tolerance: 0.001%

### What λ?

::: misses
- [any] $1 - 1/L$ with L the memory in samples.
:::
:::

::: part
answer: P*(1/(T*s))/(2 - 1/(T*s))*100
unit: %
tolerance: 0.5%

### What misadjustment results?

::: misses
- [any] $P(1 - \lambda)/(1 + \lambda)$.
:::
:::
:::

::: check
kind: parts
given: f = 697 | 941 | 1336 | 1633; N = 205 | 410

## A DTMF decoder at 8 kHz uses Goertzel blocks of N = {N} to detect {f} Hz.

::: part
answer: round(f*N/8000)
tolerance: 0

### Which bin?

::: misses
- [any] round(fN/f_s).
:::
:::

::: part
answer: abs(f - round(f*N/8000)*8000/N)
unit: Hz
tolerance: 1%

### How far is the tone from that bin's center?

::: misses
- [any] |f − k f_s/N|.
:::
:::
:::

::: check
kind: parts
given: s = 10 | 100 | 1000; c = 25 | 200

## A channelizer splits {s} MHz into channels {c} kHz apart, with an 8-taps-per-channel prototype.

::: part
answer: s*1000/c
unit: channels
tolerance: 0.5%

### How many channels?

::: misses
- [any] $f_s/\Delta f$.
:::
:::

::: part
answer: (8 + 0.5*log(s*1000/c)/log(2))*s
unit: M/s
tolerance: 0.5%

### About how many million multiplications a second?

::: misses
- [any] (8 + ½ log₂ M) per input sample.
:::
:::
:::

::: check
kind: parts
given: s = 16 | 48 | 1000; f = 0.25 | 1 | 2

## A wavelet transform at {s} kHz must make its final approximation band end at or below {f} kHz.

::: part
answer: ceil(log(s/(2*f))/log(2) - 1e-9)
unit: levels
tolerance: 0

### At least how many levels does it need?

::: misses
- [any] The approximation after J levels spans 0 to $f_s/2^{J+1}$.
:::
:::
:::

::: check
kind: parts
given: g = 0.8 | 1.5 | 3; W = 1920 | 3840; H = 1080 | 2160

## A Gaussian blur with σ = {g} pixels is applied to {W} × {H} frames, truncated at ±3σ.

::: part
answer: 2*ceil(3*g - 1e-9) + 1
unit: taps
tolerance: 0

### How long is the kernel?

::: misses
- [any] $2\lceil3\sigma\rceil + 1$.
:::
:::

::: part
answer: W*H*2*(2*ceil(3*g - 1e-9) + 1)/1e6
unit: M
tolerance: 0.5%

### How many million multiplications per frame, separably?

::: misses
- [any] 2K per pixel.
:::
:::
:::

::: check
kind: parts
given: G = 3 | 7 | 13

## An AR(1) process must allow {G} dB of one-step prediction gain.

::: part
answer: sqrt(1 - 10^(-G/10))
tolerance: 0.5%

### How large must its coefficient a be?

::: misses
- [any] Solve $10\log_{10}(1/(1 - a^2)) = G$.
:::
:::
:::

::: check
kind: parts
given: g = 0.5 | 0.8 | 0.95

## A noise-reduction filter should pass bands at a Wiener gain of at least {g}.

::: part
answer: 10*log(g/(1 - g))
unit: dB
tolerance: 0.5%

### What band SNR is needed?

::: misses
- [any] Solve $S/(1 + S) = g$.
:::
:::
:::

::: check
kind: parts
given: B = 1 | 20 | 100; o = 1.25 | 1.5

## A complex (analytic) baseband signal of bandwidth {B} MHz is sampled with oversampling {o}.

::: part
answer: o*B
unit: MS/s
tolerance: 0.5%

### What complex sample rate does it need?

::: misses
- [2*o*B] Complex samples need only the bandwidth, not twice it.
- [any] $f_s = oB$ complex samples per second.
:::
:::
:::

::: check
kind: parts
given: S = 70 | 90 | 100; s = 10 | 100; B = 0.2 | 2

## An ADC at {s} MS/s must give {S} dB SNR in a {B} MHz channel.

::: part
answer: ceil((S - 1.76 - 10*log(s/(2*B)))/6.02 - 1e-9)
unit: bits
tolerance: 0

### How many ideal bits does it need?

::: misses
- [any] Solve $6.02N + 1.76 + 10\log_{10}(f_s/2B) \ge S$.
:::
:::
:::
:::
