---
title: Problem set 5
heading: "Problem set 5: designing and verifying filters"
eyebrow: C4 · Problem set 5
type: problems
---

::: hook
These problems use lessons 24 to 26: the speaker crossover, the second-order filter code lab and the Butterworth design lab, together with the design formulas they rely on.
:::

::: pool
pick: 12

::: check
kind: parts
given: R = 4 | 8; fc = 2 | 3.5

## A first-order crossover splits {fc} kHz between {R} Ω speakers.

::: part
answer: R/(2*pi*fc*1000)*1e6
unit: µH
tolerance: 0.5%

### What series inductor feeds the woofer?

::: misses
- [any] $L = R/(2\pi f_c)$.
:::
:::

::: part
answer: 1/(2*pi*fc*1000*R)*1e6
unit: µF
tolerance: 0.5%

### What series capacitor feeds the tweeter?

::: misses
- [any] $C = 1/(2\pi f_cR)$.
:::
:::
:::

::: check
kind: parts
given: R = 4 | 8; fc = 1.5 | 3

## A second-order Butterworth crossover low-pass feeds a {R} Ω woofer, crossing at {fc} kHz.

::: part
answer: sqrt(2)*R/(2*pi*fc*1000)*1e3
unit: mH
tolerance: 0.5%

### What inductor does it need?

::: misses
- [any] $\sqrt2R/\omega_c$.
:::
:::

::: part
answer: 1/(sqrt(2)*R*2*pi*fc*1000)*1e6
unit: µF
tolerance: 0.5%

### What capacitor goes across the woofer?

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

::: check
kind: parts
given: n = 1 | 2; r = 2 | 4

## A crossover of order {n} protects a tweeter from frequencies {r} times below the crossover.

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

### How far down is the tweeter's feed there, assuming a Butterworth high-pass?

::: misses
- [any] The high-pass mirrors the low-pass: $10\log_{10}(1 + r^{2n})$.
:::
:::

::: part
answer: 6.02*n*log(r)/log(2)
unit: dB
tolerance: 1%

### What does the asymptote, $6n$ dB per octave, predict?

::: misses
- [any] Octaves times $6n$.
:::
:::
:::

::: check
kind: parts
given: f0 = 0.5 | 5; Q = 0.707 | 1.5; C2 = 1 | 10

## A unity-gain, equal-resistor Sallen-Key low-pass must have $f_0$ = {f0} kHz and Q = {Q}, with $C_2$ = {C2} nF.

::: part
answer: 4*Q^2*C2
unit: nF
tolerance: 0.5%

### What is $C_1$?

::: misses
- [any] $C_1 = 4Q^2C_2$.
:::
:::

::: part
answer: 1/(2*pi*f0*1000*sqrt(4*Q^2*C2*C2)*1e-9)/1000
unit: kΩ
tolerance: 0.5%

### What is R?

::: misses
- [any] $R = 1/(2\pi f_0\sqrt{C_1C_2})$.
:::
:::
:::

::: check
kind: parts
given: R = 4.7 | 10; C1 = 22 | 47; C2 = 2.2 | 10; f = 0.5 | 4

## A Sallen-Key stage has R = {R} kΩ (both), $C_1$ = {C1} nF, $C_2$ = {C2} nF.

::: part
answer: sqrt(C1*C2*1e-18)*R*1000/(C2*1e-9*2*R*1000)
tolerance: 0.5%

### What is its Q?

::: misses
- [any] $\frac{\sqrt{R^2C_1C_2}}{2RC_2} = \frac12\sqrt{C_1/C_2}$.
:::
:::

::: part
answer: 20*log(abs(1/(-(2*pi*f*1000)^2*(R*1000)^2*C1*C2*1e-18 + j*2*pi*f*1000*2*R*1000*C2*1e-9 + 1)))
unit: dB
tolerance: 0.5%

### What is its gain at {f} kHz?

::: misses
- [any] Evaluate $\frac{1}{s^2R^2C_1C_2 + 2sRC_2 + 1}$.
:::
:::
:::

::: check
kind: parts
given: Q = 1 | 2 | 5

## A second-order low-pass has Q = {Q}.

::: part
answer: 20*log(Q/sqrt(1 - 1/(4*Q^2)))
unit: dB
tolerance: 0.5%

### How high is its peak gain?

::: misses
- [any] $\frac{Q}{\sqrt{1 - 1/4Q^2}}$ for Q > 0.707.
:::
:::

::: part
answer: sqrt(1 - 1/(2*Q^2))
tolerance: 0.5%

### At what fraction of $f_0$ is the peak?

::: misses
- [any] $\sqrt{1 - 1/2Q^2}$.
:::
:::
:::

::: check
kind: parts
given: n = 3 | 5; k = 1 | 2 | 3

## An order-{n} Butterworth filter, normalized to $\omega_c$ = 1.

::: part
answer: cos(pi*(2*k + n - 1)/(2*n))
tolerance: 0.001

### What is the real part of pole k = {k}?

::: misses
- [any] $\cos\frac{\pi(2k + n - 1)}{2n}$.
:::
:::

::: part
answer: 1/(2*sin(pi/(2*n)))
tolerance: 0.5%

### What is its highest stage Q?

::: misses
- [any] $1/(2\sin(\pi/2n))$.
:::
:::
:::

::: check
kind: parts
given: Q = 0.541 | 1.307; fc = 0.5 | 2; R = 10 | 22

## A Butterworth stage needs Q = {Q} at {fc} kHz with equal resistors of {R} kΩ.

::: part
answer: 2*Q/(2*pi*fc*1000*R*1000)*1e9
unit: nF
tolerance: 0.5%

### What is $C_1$?

::: misses
- [any] $2Q/(\omega_cR)$.
:::
:::

::: part
answer: 1/(2*Q*2*pi*fc*1000*R*1000)*1e9
unit: nF
tolerance: 0.5%

### What is $C_2$?

::: misses
- [any] $1/(2Q\omega_cR)$.
:::
:::
:::

::: check
kind: parts
given: C = 10 | 47; t = 1 | 5; f0 = 1 | 3

## A capacitor marked {C} nF is ±{t}%, in a stage designed for {f0} kHz.

::: part
answer: f0*(1/sqrt(1 + t/100) - 1)*1000
unit: Hz
tolerance: 1%

### If both capacitors are {t}% high, how far does $f_0$ move?

::: misses
- [any] $f_0 \propto 1/\sqrt{C_1C_2}$.
:::
:::

::: part
answer: 0
tolerance: 0.001

### By how much does Q change in that case?

::: misses
- [any] Q depends on the ratio $C_1/C_2$, which is unchanged.
:::
:::
:::

::: check
kind: parts
given: N = 50 | 200; d = 3 | 4

## A code lab sweeps {d} decades with {N} points per decade, both ends included.

::: part
answer: N*d + 1
tolerance: 0.1%

### How many frequencies does it compute?

::: misses
- [any] $Nd + 1$.
:::
:::

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

### What is the ratio between neighbors?

::: misses
- [any] $10^{1/N}$.
:::
:::
:::

::: check
kind: parts
given: Q = 0.5 | 0.707 | 1.5; f = 1 | 3

## A second-order low-pass has f₀ = {f} kHz and Q = {Q}.

::: part
answer: Q
tolerance: 0.5%

### What's its gain at f₀?

::: misses
- [any] Q.
:::
:::

::: part
answer: 1/sqrt((1 - 4)^2 + (2/Q)^2)
tolerance: 0.5%

### At twice f₀?

::: misses
- [any] x = 2.
:::
:::
:::

::: check
kind: parts
given: n = 2 | 4 | 6; f = 1 | 10

## An order-{n} Butterworth low-pass has its corner at {f} kHz.

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

### What's its gain an octave above?

::: misses
- [any] $10\log(1 + 2^{2n})$ down.
:::
:::

::: part
answer: f*(10^(4) - 1)^(1/(2*n))
unit: kHz
tolerance: 0.5%

### Where is it 40 dB down?

::: misses
- [any] $(10^{A/10} - 1)^{1/2n}$.
:::
:::
:::

::: check
kind: parts
given: a = 3 | 6; b = 10 | 20; Q = 5 | 30

## A band-pass is centered between {a} and {b} kHz on a log scale, with Q = {Q}.

::: part
answer: sqrt(a*b)
unit: kHz
tolerance: 0.5%

### Where's its center?

::: misses
- [(a + b)/2] Filters are symmetric on a log scale.
- [any] $\sqrt{ab}$.
:::
:::

::: part
answer: sqrt(a*b)/Q
unit: kHz
tolerance: 0.5%

### What's its bandwidth?

::: misses
- [any] $\frac{f_0}{Q}$.
:::
:::
:::

::: check
kind: parts
given: R = 4.7 | 47; C = 1 | 10

## A crossover's low-pass uses {R} kΩ and {C} nF.

::: part
answer: 1/(2*pi*R*1e3*C*1e-9)/1000
unit: kHz
tolerance: 0.5%

### Where's its corner?

::: misses
- [any] $\frac{1}{2\pi RC}$.
:::
:::

::: part
answer: 1/sqrt(2)
tolerance: 0.5%

### What fraction of the voltage passes at the corner?

::: misses
- [any] $\frac{1}{\sqrt2}$.
:::
:::
:::

::: check
kind: parts
given: s = 400 | 1000; d = 2000 | 6000

## A design lab's filter has poles at $-\given{s} \pm j\given{d}$ rad/s.

::: part
answer: sqrt(s^2 + d^2)/(2*s)
tolerance: 0.5%

### What's its Q?

::: misses
- [any] $\frac{\omega_0}{2\sigma}$.
:::
:::

::: part
answer: exp(-pi*s/d)*100
unit: %
tolerance: 0.5%

### How much does its step response overshoot?

::: misses
- [any] $e^{-\pi\sigma/\omega_d}$.
:::
:::
:::
:::
