FA-91824 / Digital signal filters / Member archive
Notch design inverts the DC gain correction · case 04
The passband gain is squared away from unity instead of corrected.
Case contract
Input [f0, fs, r]: second-order notch with zeros on the unit circle at +-w0 (w0 = 2 pi f0 / fs) and poles at radius r: b = [1, -2 cos w0, 1], a = [1, -2 r cos w0, r^2]; b is scaled for unity DC gain (sum(a)/sum(b)). Coefficients rounded to 9 decimals; "bad-frequency" unless 0 < f0 < fs/2, "bad-radius" unless 0 <= r < 1.
Why this case matters
Notch filters remove mains hum and interference tones; angle or radius slips miss the tone or widen the notch.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: f0=1 fs=8 r=9/10 | {"a": [1.0, -1.272792206, 0.81], "b": [1.090428032, -1.542098112, 1.090428032]} | {"a": [1.0, -1.272792206, 0.81], "b": [0.917071068, -1.296934342, 0.917071068]} | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗