Skip to main content

twin_t_notch_filter

Function twin_t_notch_filter 

Source
pub fn twin_t_notch_filter(
    signal: &[f64],
    r_ohms: f64,
    c_farads: f64,
    sample_rate: f64,
) -> Vec<f64>
Expand description

Twin-T notch filter.

Classic Twin-T topology with R, R, R/2, C, C, 2C. The ideal transfer function (with infinite impedance output) is: H(s) = (s^2R^2C^2 + 1) / (s^2R^2C^2 + 4sR*C + 1)

This gives a notch at f_notch = 1/(2piR*C) with notch Q determined by the topology. The load resistor RL modifies the depth of the notch.

For the ideal case (no load), uses bilinear transform to biquad IIR.