---
title: Final exam
heading: "Final exam: digital signal processing"
eyebrow: S7 · Final exam
type: problems
---

::: hook
Twelve problems from the whole course: transforms and regions of convergence, sampling, converters and multirate systems, fractional delay, oversampled conversion, group delay and minimum phase, linear-phase types, structures and finite word length, IIR and FIR design, the DFT and fast convolution, FFT algorithms, windowed spectra, the STFT, spectrum estimation and subspace methods, linear prediction, Wiener, LMS and RLS filters, the Hilbert transform, filter banks, wavelets and images. Give yourself three hours and work without the lessons open. "Another set" deals a different exam.
:::

::: pool
pick: 12

::: check
kind: parts
given: a = 0.35 | 0.55; b = 1.3 | 2; n = 2 | 3; z = 1.5 | 3

## $X(z) = \frac{1}{(1 - \given{a}z^{-1})(1 - \given{b}z^{-1})}$.

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

### x[{n}] for the causal ROC?

::: misses
- [any] Both terms right-sided.
:::
:::

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

### x[−{n}] for the stable ROC?

::: misses
- [any] The b term, left-sided.
:::
:::

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

### X(z) at z = {z}, inside the causal ROC?

::: misses
- [any] Evaluate directly.
:::
:::
:::

::: check
kind: parts
given: f = 29 | 41; s = 22.05 | 32; B = 12 | 18; M = 16 | 64; p = 1 | 2

## A {f} kHz tone sampled at {s} kHz; and a {B}-bit quantizer oversampled ×{M} with order-{p} shaping.

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

### Apparent frequency?

::: misses
- [any] Fold.
:::
:::

::: part
answer: 6.02*B + 1.76 - 10*log(pi^(2*p)/(2*p + 1)) + (2*p + 1)*10*log(M)
unit: dB
tolerance: 0.05

### In-band SNR?

::: misses
- [any] The noise-shaping SNR formula.
:::
:::
:::

::: check
kind: parts
given: s = 96 | 384; M = 3 | 8; N = 96 | 240; w = 0.03 | 0.08

## A {s} kHz signal decimated by {M} with an {N}-tap polyphase FIR; a tone at {w}π.

::: part
answer: s/(2*M)
unit: kHz
tolerance: 0.5%

### Anti-aliasing limit?

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

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

### Multiplications per input sample?

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

::: part
answer: M*w
tolerance: 0.5%

### The tone after decimation, in units of π?

::: misses
- [any] $M\omega_0$.
:::
:::
:::

::: check
kind: parts
given: r = 0.85 | 0.95; c = 0.7 | 1.6; a = 0.5 | 0.8; w = 0.4 | 1.8

## A resonator with poles at {r}e^{±j{c}}; and a first-order all-pass with real a = {a}.

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

### Resonator group delay at ω = {c}?

::: misses
- [any] Both poles.
:::
:::

::: 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: a = 0.5 | 1.5; b = 1 | 3; w = 0.9 | 2.3; r = 0.6 | 0.8; t = 30 | 70

## Type II [{a}, {b}, {b}, {a}]; and a linear-phase filter with a zero at {r}e^{j{t}°}.

::: part
answer: 2*b*cos(w/2) + 2*a*cos(3*w/2)
tolerance: 0.5%

### Type II amplitude at ω = {w}?

::: misses
- [any] $2b\cos\frac{\omega}{2} + 2a\cos\frac{3\omega}{2}$.
:::
:::

::: part
answer: r^2 + 1/r^2 + 4*cos(t*pi/180)^2
tolerance: 0.5%

### Center coefficient of the forced 5-tap filter?

::: misses
- [any] $r^2 + 1/r^2 + 4\cos^2\theta$.
:::
:::
:::

::: check
kind: parts
given: a = 0.3 | -0.6; k = 0.4 | -0.35; B = 13 | 16; p = 0.9 | 0.98

## An all-pole $1 + \given{a}z^{-1} + \given{k}z^{-2}$; and a pole at {p} rounded at its input to B = {B} bits.

::: part
answer: a/(1 + k)
tolerance: 0.5%

### Lattice $k_1$?

::: misses
- [any] $a_1/(1 + k_2)$.
:::
:::

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

### Output roundoff noise, dB re 1?

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

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

### Dead band, in LSBs?

::: misses
- [any] $0.5/(1 - |a|)$.
:::
:::
:::

::: check
kind: parts
given: p = 0.1 | 0.2; s = 0.3 | 0.4; A = 20 | 35; a = 2000 | 6000; T = 0.15 | 0.25

## A bilinear Butterworth: 1 dB at {p}π, {A} dB at {s}π; and an analog pole at −{a} rad/s sampled every {T} ms.

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

### Order?

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

::: part
answer: (1 - a*T/2000)/(1 + a*T/2000)
tolerance: 0.5%

### Bilinear pole?

::: misses
- [any] $\frac{1 + sT/2}{1 - sT/2}$.
:::
:::

::: part
answer: exp(-a*T/1000)
tolerance: 0.5%

### Impulse-invariant pole?

::: misses
- [any] $e^{sT}$.
:::
:::
:::

::: check
kind: parts
given: A = 45 | 65; d = 0.08 | 0.15; a = 0.02 | 0.005; b = 0.001 | 0.0003

## A Kaiser design for {A} dB and a {d}π transition; and an equiripple design with δ₁ = {a}, δ₂ = {b}, same transition.

::: part
answer: step(A - 50)*0.1102*(A - 8.7) + step(50 - A)*(0.5842*(A - 21)^0.4 + 0.07886*(A - 21))
tolerance: 0.5%

### Kaiser β?

::: misses
- [any] Kaiser's formula.
:::
:::

::: part
answer: (A - 8)/(2.285*d*pi)
tolerance: 0.5%

### Kaiser M (unrounded)?

::: misses
- [any] $(A - 8)/(2.285\Delta\omega)$.
:::
:::

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

### Equiripple order estimate?

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

::: check
kind: parts
given: L = 8 | 9; m = 2 | 3; n = 0 | 1; let N = L + m; X = 300 | 1200; P = 65 | 200

## Two length-{L} pulses circularly convolved with {N}-point DFTs; and sequences of lengths {X} and {P}.

::: part
answer: (L - abs(n - L + 1) + abs(L - abs(n - L + 1)))/2 + (L - abs(n + N - L + 1) + abs(L - abs(n + N - L + 1)))/2
tolerance: 0

### Circular output at n = {n}?

::: misses
- [any] Linear value plus the wrapped tail.
:::
:::

::: part
answer: 2^ceil(log(X + P - 1)/log(2) - 0.0001)
tolerance: 0

### Smallest power-of-two FFT for the linear convolution?

::: misses
- [any] Next power of two ≥ X + P − 1.
:::
:::
:::

::: check
kind: parts
given: N = 1024 | 16384; f = 697 | 1336; G = 205 | 256

## A radix-2 FFT of length {N}; and a Goertzel detector for {f} Hz with N = {G} at 8 kHz.

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

### FFT complex multiplications?

::: misses
- [any] $\frac{N}{2}\log_2N$.
:::
:::

::: part
answer: 2*cos(2*pi*round(f*G/8000)/G)
tolerance: 0.5%

### Goertzel coefficient?

::: misses
- [any] $2\cos(2\pi k/N)$ with k = round(fN/f_s).
:::
:::
:::

::: check
kind: parts
given: d = 0.2 | 0.45; N = 512 | 4096; s = 48 | 96; X = 2000 | 30000

## An {N}-point FFT at {s} kHz; a tone {d} bin off center; a Hann-windowed on-bin peak of {X}.

::: part
answer: 20*log(sin(pi*d)/(N*sin(pi*d/N)))
unit: dB
tolerance: 0.02

### Rectangular scalloping?

::: misses
- [any] $20\log\frac{\sin\pi d}{N\sin(\pi d/N)}$.
:::
:::

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

### Hann-windowed amplitude?

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

::: check
kind: parts
given: R = 1500 | 30000; T = 8 | 40; N = 131072 | 524288; L = 2048 | 8192

## A chirp at {R} Hz/s under a {T} ms Hann window; and Welch analysis of {N} samples with {L}-sample segments.

::: part
answer: R*T/1000 + 2000/T
unit: Hz
tolerance: 0.5%

### Chirp spread?

::: misses
- [any] RT + 2/T.
:::
:::

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

### Welch segments?

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

::: part
answer: 100/sqrt(N/L)
unit: %
tolerance: 0.5%

### Bartlett spread with non-overlapping segments?

::: misses
- [any] $1/\sqrt{K}$.
:::
:::
:::

::: check
kind: parts
given: p = 0.45 | 0.6; q = 0.05 | 0.5; s = 3 | 8; v = 1 | 2

## Linear prediction with φ = [1, {p}, {q}]; and a signal of variance {s} in noise of variance {v}.

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

### Order-2 prediction error?

::: misses
- [any] $E_2 = E_1(1 - k_2^2)$.
:::
:::

::: part
answer: s*v/(s + v)
tolerance: 0.5%

### Scalar Wiener MMSE?

::: misses
- [any] $\sigma_s^2\sigma_v^2/(\sigma_s^2 + \sigma_v^2)$.
:::
:::
:::

::: check
kind: parts
given: P = 64 | 1024; s = 0.1 | 0.5; u = 0.4 | 1; n = 3 | 7; A = 1 | 2; B = 0.5 | 1.5; t = 70 | 160

## An LMS filter with {P} taps at input power {s}; NLMS with $\tilde{\mu}$ = {u}; and two tones {A} and {B} that are {t}° apart.

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

### LMS step bound?

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

::: part
answer: u/(P*s)
tolerance: 0.5%

### NLMS effective step?

::: misses
- [any] $\tilde{\mu}/(P\sigma_x^2)$.
:::
:::

::: part
answer: sqrt(A^2 + B^2 + 2*A*B*cos(t*pi/180))
tolerance: 0.5%

### Envelope of the two tones?

::: misses
- [any] Phasor sum.
:::
:::
:::

::: check
kind: parts
given: s = 48 | 1000; M = 16 | 128; N = 512 | 2048; D = 4 | 8; L = 3 | 5; m = 6 | 11

## A {M}-channel DFT bank at {s} kHz, {N}-tap prototype, decimated by {D}; and a resampler with L = {L}, M = 2.

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

### Channel spacing?

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

::: part
answer: s/D
unit: kHz
tolerance: 0.5%

### Channel output rate?

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

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

### Resampler phase for output {m}?

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

::: check
kind: parts
given: d = 0.3 | 0.5; w = 0.15 | 0.4; D = 0.25 | 0.6

## A linear interpolator delays by d = {d}; separately, a Thiran all-pass delays by {D} sample.

::: part
answer: sqrt((1 - d)^2 + d^2 + 2*d*(1 - d)*cos(w*pi))
tolerance: 0.5%

### What is the interpolator's |H| at ω = {w}π?

::: misses
- [any] $|(1 - d) + de^{-j\omega}|$.
:::
:::

::: part
answer: (1 - D)/(1 + D)
tolerance: 0.5%

### What is the Thiran coefficient?

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

::: check
kind: parts
given: N = 100 | 1000; S = 0 | 10 | 30; f = 1 | 48

## A tone at {S} dB SNR is recorded for {N} samples at {f} kHz.

::: part
answer: sqrt(12/(10^(S/10)*N*(N^2 - 1)))/(2*pi)*f*1000
unit: Hz
tolerance: 0.5%

### What is the Cramér–Rao bound on its frequency's standard deviation?

::: misses
- [any] $\sqrt{12/(\text{SNR}N(N^2 - 1))}\,f_s/2\pi$.
:::
:::
:::

::: check
kind: parts
given: P = 8 | 64; l = 0.99 | 0.999

## An RLS filter has {P} taps and λ = {l}.

::: part
answer: 1/(1 - l)
unit: samples
tolerance: 0.5%

### What is its memory?

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

::: part
answer: P*(1 - l)/(1 + l)*100
unit: %
tolerance: 0.5%

### What misadjustment?

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

::: check
kind: parts
given: s = 16 | 48; j = 2 | 3; K = 7 | 15; P = 2 | 12

## A wavelet transform runs at {s} kHz; separately, a separable K = {K} blur processes {P}-megapixel images.

::: part
answer: s/2^(j + 1)
unit: kHz
tolerance: 0.5%

### Where does level {j}'s detail band begin?

::: misses
- [any] $f_s/2^{j+1}$.
:::
:::

::: part
answer: 2*K*P
unit: M
tolerance: 0.5%

### How many million multiplications per image does the blur need?

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