# Second order section digital Bandpass

Does anyone have a ressouce on how I can calculate second order section bandpass coefficients?

I used following formulas from the Book Electronic Circuits (U.Tietze, Ch. Schenk) for the Lowpass: My coefficients match exaclty (difference is max 2e-14) with the second order sequions of MATLAB for the same lowpass.

For a bandpass filter I used following formulas:

The results differ quite alot from MATLAB, expecially if the order is higher than 2. Also I dont think I can apply the formulas direcly for second order sections because the coefficients only depend on constant values.

1. Paramters  fs = 1000; fs1 = 200; fs2 = 300; w1 = 2*pi*fs1/fs; w2 = 2*pi*fs2/fs; Omega1 = 2*tan(w1/2); Omega2 = 2*tan(w2/2); syms s z Om2 Om1 a1 b1 A0 % apply LP to BP transformation G_s_BP = subs(H_s, s, (s^2 + Om1*Om2)/(s*(Om2 - Om1))); 
2. Start with analogue transfer function H_s  H_s = A0 / (1 + a1*s + b1*s^2); % apply LP to BP transformation G_s_BP = subs(H_s, s, (s^2 + Om1*Om2)/(s*(Om2 - Om1))); 
3. Digital conversion with bilinear transformation  G_z_BP = subs(G_s_BP, s, 2*(( z - 1)/(z + 1))); % order polynomial such that coefficients can be read out coeffs_z = collect(G_z_BP, z)  Those coeffs_z are very similar to the ones given by the iowahills software