---
title: "Problem set 12: digital signal processing across the course"
heading: "Problem set 12: problems that combine sampling, transforms, filter design, spectral analysis and adaptive processing"
eyebrow: S7 · Problem set 12
type: problems
---

::: hook
These problems draw on the whole course and most combine ideas from different weeks: a converter judged by both its aliasing and its quantization noise, a filter designed and then implemented in fixed point, a spectrum estimated and then modeled, a resampler's filter designed and costed, a converter limited by its clock, a decimation chain and a transform coder. Work them as a review before the final.
:::

::: pool
pick: 12

::: check
kind: parts
given: f = 26 | 31; s = 48 | 44.1; B = 16 | 20; M = 4 | 64

## A {f} kHz tone reaches a {B}-bit converter at {s} kHz that is oversampled by {M} for the audio band.

::: part
answer: abs(f - s*round(f/s))
unit: kHz
tolerance: 0.01

### Where would the tone alias without oversampling?

::: misses
- [any] Fold about the nearest multiple of $f_s$.
:::
:::

::: part
answer: 6.02*B + 1.76 + 10*log(M)
unit: dB
tolerance: 0.05

### In-band quantization SNR with the oversampling?

::: misses
- [any] $+10\log M$.
:::
:::
:::

::: check
kind: parts
given: a = 0.8 | 0.95; B = 11 | 15; w = 0.1 | 0.5

## A first-order filter with pole {a}, rounded at its input to {B} fractional bits.

::: part
answer: (a*cos(w) - a^2)/(1 - 2*a*cos(w) + a^2)
tolerance: 0.5%

### Group delay at ω = {w}?

::: misses
- [any] The pole's group delay.
:::
:::

::: part
answer: 10*log(2^(-2*B)/12/(1 - a^2))
unit: dB
tolerance: 0.05

### Output roundoff noise, dB re 1?

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

::: part
answer: 1 - a
tolerance: 0.5%

### L1 input scaling?

::: misses
- [any] $1 - |a|$.
:::
:::
:::

::: check
kind: parts
given: p = 0.15 | 0.25; s = 0.35 | 0.45; A = 30 | 50

## A lowpass with 1 dB passband to {p}π and {A} dB from {s}π, designed both ways.

::: part
answer: ceil(log((10^(A/10) - 1)/(10^0.1 - 1))/(2*log(tan(s*pi/2)/tan(p*pi/2))))
tolerance: 0

### Bilinear Butterworth order?

::: misses
- [any] Prewarp, then the order formula.
:::
:::

::: part
answer: ceil((A - 8)/(2.285*(s - p)*pi))
tolerance: 0

### Kaiser window M (using the stopband δ)?

::: misses
- [any] ⌈(A − 8)/(2.285Δω)⌉.
:::
:::
:::

::: check
kind: parts
given: a = 0.012 | 0.06; b = 0.001 | 0.0001; d = 0.05 | 0.1; L = 3 | 4

## An equiripple prototype for an interpolate-by-{L} converter: δ₁ = {a}, δ₂ = {b}, transition {d}π.

::: part
answer: (-10*log(a*b) - 13)/(2.324*d*pi)
tolerance: 0.5%

### Order estimate?

::: misses
- [any] Kaiser's equiripple estimate.
:::
:::

::: part
answer: ((-10*log(a*b) - 13)/(2.324*d*pi) + 1)/L
tolerance: 0.5%

### Polyphase taps per output (from the unrounded estimate)?

::: misses
- [any] (M + 1)/L.
:::
:::
:::

::: check
kind: parts
given: N = 2048 | 8192; P = 129 | 513; s = 48 | 96

## A {P}-tap FIR filter applied by overlap-save with N = {N} at {s} kHz.

::: part
answer: 4*(N*log(N)/log(2) + N)/(N - P + 1)
tolerance: 0.5%

### Multiplies per output?

::: misses
- [any] The cost model.
:::
:::

::: part
answer: P/(4*(N*log(N)/log(2) + N)/(N - P + 1))
tolerance: 0.5%

### Saving over direct convolution?

::: misses
- [any] P over the block cost.
:::
:::

::: part
answer: (N - P + 1)/s
unit: ms
tolerance: 0.5%

### Latency?

::: misses
- [any] Block length over $f_s$.
:::
:::
:::

::: check
kind: parts
given: f = 1.2 | 3.3; s = 16 | 48; N = 1024 | 4096; X = 5000 | 60000

## A tone at {f} kHz, {s} kHz sampling, {N}-point Hann FFT; it reads |X| = {X} at its peak.

::: part
answer: f*N/s
tolerance: 0.5%

### Bin position?

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

::: part
answer: 2*X/(N*0.5)
tolerance: 0.5%

### Amplitude (if on a bin)?

::: misses
- [any] $2|X|/(N \times 0.5)$.
:::
:::

::: part
answer: 2*s*1000/N
unit: Hz
tolerance: 0.5%

### Resolution?

::: misses
- [any] $2f_s/N$.
:::
:::
:::

::: check
kind: parts
given: N = 65536 | 262144; L = 1024 | 4096; s = 8 | 48; P = -100 | -70

## Welch analysis of an {N}-sample record at {s} kHz with {L}-sample Hann segments; one bin reads {P} dB.

::: part
answer: floor(2*N/L - 1 + 0.0001)
tolerance: 0

### Segments?

::: misses
- [any] ⌊2N/L⌋ − 1.
:::
:::

::: part
answer: P - 10*log(1.5*s*1000/L)
unit: dB
tolerance: 0.05

### Density, dB per hertz?

::: misses
- [any] Subtract 10 log(ENBW $f_s/L$).
:::
:::
:::

::: check
kind: parts
given: p = 0.55 | 0.7; q = 0.15 | 0.5; S = -3 | 8

## A process with φ = [1, {p}, {q}] observed where the SNR is {S} dB.

::: part
answer: (q - p*p)/(1 - p*p)
tolerance: 0.5%

### Second reflection coefficient?

::: misses
- [any] Levinson–Durbin.
:::
:::

::: part
answer: 10^(S/10)/(1 + 10^(S/10))
tolerance: 0.5%

### Wiener gain there?

::: misses
- [any] S/(1 + S).
:::
:::
:::

::: check
kind: parts
given: P = 128 | 512; s = 0.05 | 0.3; M = 8 | 20; f = 8 | 16

## An LMS echo canceller: {P} taps, input power {s}, {M}% misadjustment, at {f} kHz.

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

### Step size?

::: misses
- [any] $2M/(P\sigma_x^2)$.
:::
:::

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

### Convergence time constant (white input)?

::: misses
- [any] $1/(\mu\sigma_x^2)$ samples.
:::
:::
:::

::: check
kind: parts
given: s = 96 | 2048; M = 32 | 256; N = 512 | 4096; k = 7 | 21

## A polyphase channelizer: {M} channels at {s} kHz, {N}-tap prototype.

::: part
answer: k*s/M
unit: kHz
tolerance: 0.5%

### Center of channel {k}?

::: misses
- [any] $kf_s/M$.
:::
:::

::: part
answer: M*N/(N/M + log(M)/log(2)/2)
tolerance: 0.5%

### Saving over separate filters?

::: misses
- [any] MN over the polyphase-FFT cost.
:::
:::
:::

::: check
kind: parts
given: c = 1.5 | 4; a = 0.6 | 0.9; w = 0.5 | 2

## A channel $1 - \given{c}z^{-1}$ and an all-pass section with real pole {a}.

::: part
answer: c^2/(c^2 + 1)
tolerance: 0.5%

### First-sample energy fraction of the minimum-phase counterpart?

::: misses
- [any] $c^2/(c^2 + 1)$.
:::
:::

::: part
answer: (1 - a^2)/(1 - 2*a*cos(w) + a^2)
tolerance: 0.5%

### All-pass group delay at ω = {w}?

::: misses
- [any] $(1 - a^2)/|1 - ae^{-j\omega}|^2$.
:::
:::
:::

::: check
kind: parts
given: m = 5 | 8 | 13; L = 3 | 4; M = 2 | 3; N = 72 | 120

## A polyphase L/M resampler, L = {L}, M = {M}, {N}-tap prototype.

::: part
answer: (m*M) - L*floor(m*M/L + 0.0001)
tolerance: 0

### Phase p for output {m}?

::: misses
- [any] $mM \bmod L$.
:::
:::

::: part
answer: floor(m*M/L + 0.0001)
tolerance: 0

### Newest input index b?

::: misses
- [any] $\lfloor mM/L\rfloor$.
:::
:::

::: part
answer: N/L
tolerance: 0.5%

### Taps per output?

::: misses
- [any] N/L.
:::
:::
:::

::: check
kind: parts
given: B = 12 | 14 | 16; f = 70 | 250; s = 50 | 150

## A {B}-bit ADC samples a {f} MHz tone with {s} fs of clock jitter.

::: part
answer: -10*log(10^(-(6.02*B + 1.76)/10) + (2*pi*f*1e6*s*1e-15)^2)
unit: dB
tolerance: 0.5%

### What SNR does it reach?

::: misses
- [any] Quantization and jitter noise powers add.
:::
:::

::: part
answer: (-10*log(10^(-(6.02*B + 1.76)/10) + (2*pi*f*1e6*s*1e-15)^2) - 1.76)/6.02
unit: bits
tolerance: 0.5%

### How many effective bits?

::: misses
- [any] (SNR − 1.76)/6.02.
:::
:::
:::

::: check
kind: parts
given: f = 6.144 | 12.288; c = 8 | 16; N = 3 | 5

## A {f} MHz bitstream is decimated to 48 kHz: an N = {N} CIC by {c}, then halfbands.

::: part
answer: log(f*1000/48/c)/log(2)
unit: stages
tolerance: 0.5%

### How many halfband stages follow?

::: misses
- [any] $\log_2$ of the remaining factor.
:::
:::

::: part
answer: -N*20*log(abs(sin(pi*20*c/(f*1000))/(c*sin(pi*20/(f*1000)))))
unit: dB
tolerance: 1%

### How much does the CIC droop at 20 kHz?

::: misses
- [any] Its response at 20 kHz, relative to DC.
:::
:::
:::

::: check
kind: parts
given: r = 0.75 | 0.9 | 0.97

## An AR(1) signal (ρ = {r}) is transform-coded with long blocks.

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

### What coding gain is available?

::: misses
- [any] $1/(1 - \rho^2)$.
:::
:::

::: part
answer: 10*log(1/(1 - r^2))/6.02
unit: bits
tolerance: 0.5%

### How many bits per sample does it save at equal distortion?

::: misses
- [any] Over 6.02.
:::
:::
:::
:::
