pub fn rc_highpass_impulse_response(
r_ohms: f64,
c_farads: f64,
sample_rate: f64,
n_samples: usize,
) -> Vec<f64>Expand description
First-order RC highpass filter impulse response.
The continuous-time transfer function is: H(s) = sRC / (1 + sRC) where τ = RC.
Bilinear transform: s = (2/T) * (1 - z^-1) / (1 + z^-1) This gives: H(z) = (b0 + b1z^-1) / (1 + a1z^-1) where: K = 2/T, Kτ = K*τ b0 = Kτ / (1 + Kτ) b1 = -Kτ / (1 + Kτ) = -b0 a1 = (1 - Kτ) / (1 + Kτ)