---
title: "Problem set 2: converters and multirate systems"
heading: "Problem set 2: quantization, jitter and dither, rate changes, noise shaping, CIC and halfband filters"
eyebrow: S7 · Problem set 2
type: problems
---

::: hook
These problems use lessons 6 to 9: converter SNR with real signals, effective bits, aperture jitter, dither and linearity; downsampling, upsampling and polyphase cost; oversampling and noise shaping; and CIC and halfband decimators.
:::

::: pool
pick: 12

::: check
kind: parts
given: B = 10 | 14 | 20; C = 2.5 | 4 | 5.6

## A {B}-bit converter digitizes a signal of crest factor {C} whose peaks just reach full scale.

::: part
answer: 6.02*B + 4.77 - 20*log(C)
unit: dB
tolerance: 0.5%

### What SNR results?

::: misses
- [6.02*B + 1.76] That's a full-scale sine's.
- [any] $6.02B + 4.77 - 20\log_{10}C$.
:::
:::

::: part
answer: (20*log(C/sqrt(2)))/6.02
unit: bits
tolerance: 0.5%

### How many bits of resolution does the crest factor cost, against a sine?

::: misses
- [any] The SNR difference over 6.02.
:::
:::
:::

::: check
kind: parts
given: S = 55 | 72 | 88; T = 12 | 16

## A converter measures {S} dB of SINAD; a design needs {T} effective bits.

::: part
answer: (S - 1.76)/6.02
unit: bits
tolerance: 0.5%

### What is the converter's ENOB?

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

::: part
answer: 6.02*T + 1.76 - S
unit: dB
tolerance: 0.5%

### How many decibels short of (positive) or beyond (negative) the need is it?

::: misses
- [any] $6.02T + 1.76$ − SINAD.
:::
:::
:::

::: check
kind: parts
given: f = 20 | 140 | 400; S = 60 | 74 | 90

## A converter must reach {S} dB SNR on a full-scale {f} MHz tone, limited by jitter alone.

::: part
answer: 10^(-S/20)/(2*pi*f*1e6)*1e15
unit: fs
tolerance: 0.5%

### What rms clock jitter can it tolerate?

::: misses
- [any] $\sigma = 10^{-\text{SNR}/20}/(2\pi f)$.
:::
:::
:::

::: check
kind: parts
given: B = 12 | 16; f = 10 | 100; s = 100 | 400

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

::: part
answer: -20*log(2*pi*f*1e6*s*1e-15)
unit: dB
tolerance: 0.5%

### What SNR does jitter alone allow?

::: misses
- [any] $-20\log_{10}(2\pi f\sigma)$.
:::
:::

::: 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 total SNR results?

::: misses
- [any] Add the two noise powers.
:::
:::
:::

::: check
kind: parts
given: B = 16 | 20 | 24

## A {B}-bit audio converter uses TPDF dither.

::: part
answer: 6.02*B + 1.76 - 4.77
unit: dB
tolerance: 0.5%

### What full-scale sine SNR does it give?

::: misses
- [any] Three times the noise power: −4.77 dB.
:::
:::

::: part
answer: 4.77/6.02
unit: bits
tolerance: 0.5%

### How many bits' worth of SNR does the dither cost?

::: misses
- [any] 4.77/6.02.
:::
:::
:::

::: check
kind: parts
given: a = 0.5 | 0.8 | 1.3; b = 0.7 | 1.4 | 1.9; c = 0.9 | 1.1

## Three adjacent codes measure {a}, {b} and {c} LSB wide, starting from zero INL.

::: part
answer: b - 1
unit: LSB
tolerance: 0.5%

### What is the middle code's DNL?

::: misses
- [any] Width − 1.
:::
:::

::: part
answer: a + b + c - 3
unit: LSB
tolerance: 0.5%

### What is the INL after the third code?

::: misses
- [any] The sum of the three DNLs.
:::
:::
:::

::: check
kind: parts
given: w = 0.05 | 0.12 | 0.3; M = 2 | 3 | 4

## A tone at ω = {w}π is downsampled by {M} without filtering.

::: part
answer: abs(w*M - 2*round(w*M/2))
tolerance: 0.5%

### Where does it appear, in units of π (between 0 and 1)?

::: misses
- [w/M] Downsampling stretches frequencies by M.
- [any] $M\omega$, folded into 0 to π.
:::
:::
:::

::: check
kind: parts
given: N = 48 | 96 | 255; M = 2 | 4 | 8; s = 48 | 192

## An N = {N}-tap FIR decimates a {s} kHz signal by {M}.

::: part
answer: N*s*1000/1e6
unit: M/s
tolerance: 0.5%

### How many million multiplications a second does it need naively?

::: misses
- [any] N per input sample.
:::
:::

::: part
answer: N*s*1000/M/1e6
unit: M/s
tolerance: 0.5%

### And in polyphase form?

::: misses
- [any] N/M per input sample.
:::
:::
:::

::: check
kind: parts
given: L = 3 | 160 | 441; s = 22.05 | 44.1; let M = 2 + 145*step(L - 100) + 173*step(L - 300)

## A converter changes {s} kHz audio by the ratio L/M with L = {L}, M = {M}.

::: part
answer: L*s
unit: kHz
tolerance: 0.5%

### What is the intermediate rate?

::: misses
- [any] L times the input rate.
:::
:::

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

### What is the output rate?

::: misses
- [any] L/M times the input rate.
:::
:::
:::

::: check
kind: parts
given: f = 1 | 3 | 5; s = 8 | 16; L = 2 | 3 | 4

## A {f} kHz tone at {s} kHz is upsampled by {L} by inserting zeros.

::: part
answer: s - f
unit: kHz
tolerance: 0.5%

### What is the lowest image frequency?

::: misses
- [s + f] The lowest image mirrors the tone about the old sample rate: $f_s - f$.
- [any] $f_s - f$.
:::
:::

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

### Where must the interpolation filter cut off?

::: misses
- [any] At the old Nyquist frequency, π/L at the new rate.
:::
:::
:::

::: check
kind: parts
given: B = 1 | 4 | 12; M = 8 | 32 | 128

## A {B}-bit quantizer is oversampled by {M}.

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

### What in-band SNR does oversampling alone give?

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

::: part
answer: 6.02*B + 1.76 - 10*log(pi^4/5) + 50*log(M)
unit: dB
tolerance: 0.5%

### And with second-order noise shaping?

::: misses
- [any] $6.02B + 1.76 - 12.90 + 50\log M$.
:::
:::
:::

::: check
kind: parts
given: B = 1 | 3; p = 1 | 2 | 3; S = 90 | 110

## A {B}-bit modulator with order-{p} shaping must reach {S} dB in band.

::: part
answer: 10^((S - 6.02*B - 1.76 + 10*log(pi^(2*p)/(2*p + 1)))/((2*p + 1)*10))
tolerance: 0.5%

### What oversampling ratio does it need?

::: misses
- [any] Solve the shaped SNR formula for M.
:::
:::
:::

::: check
kind: parts
given: N = 3 | 5; R = 16 | 32 | 100; b = 14 | 16

## A CIC decimator has N = {N}, R = {R}, M = 1 and {b}-bit input.

::: part
answer: R^N
tolerance: 0.5%

### What is its DC gain?

::: misses
- [any] $R^N$.
:::
:::

::: part
answer: b + ceil(N*log(R)/log(2) - 1e-9)
unit: bits
tolerance: 0

### How wide must its registers be (rounding the growth up)?

::: misses
- [any] b plus $\lceil N\log_2R\rceil$.
:::
:::
:::

::: check
kind: parts
given: N = 2 | 4 | 6; R = 8 | 25; p = 0.1 | 0.25

## A CIC decimator (N = {N}, R = {R}) passes up to {p} of its output rate.

::: part
answer: -N*20*log(abs(sin(pi*p)/(R*sin(pi*p/R))))
unit: dB
tolerance: 0.5%

### What is its droop at the band edge?

::: misses
- [any] $-N \cdot 20\log_{10}|\sin\pi\nu/(R\sin(\pi\nu/R))|$.
:::
:::

::: part
answer: -N*20*log(abs(sin(pi*(1 - p))/(R*sin(pi*(1 - p)/R))))
unit: dB
tolerance: 0.5%

### What rejection does it give the band aliasing onto that edge?

::: misses
- [any] The formula at ν = 1 − ν_p.
:::
:::
:::

::: check
kind: parts
given: K = 6 | 10 | 20; s = 96 | 384

## A (4K − 1)-tap halfband with K = {K} decimates a {s} kHz signal by 2.

::: part
answer: K*s*1000/2/1e6
unit: M/s
tolerance: 0.5%

### How many million multiplications a second does it need?

::: misses
- [any] K per output sample, at half the input rate.
:::
:::

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

### Where is its response exactly −6 dB?

::: misses
- [s/2] At a quarter of the input rate, π/2.
- [any] ω = π/2.
:::
:::
:::
:::
