Hello J Arbona and Justin Bohr , Damian Lewis, Don Dapkus, and all Engineers,
My project uses Arduino Uno and AIC3254. Both devices communicate through SPI. Current stage, I want to write coefficient of Bandpass filter from Arduino Uno to AIC3254. So I need the coefficient calculation processed by Arduino Uno. By this mean, I want to know the cofficient calculation. I cannot compromise with time if I use 1 HPF and 1 LPF, unless the combination of those HPF and LPF will give me only one set of coefficients.
1. Base on the value of center frequency, Fc, Bandwidth, sampling rate, Fs, below, could you please guide me on how to get the value of [B0, B1, B2, A1, A2] coefficients for bandpass digital biquad filters?
2. I have had refer to SLAA447 and TAS_BQ_Filter_Equations but not found.
3. I have had refer to:
H(z) = (N0 + 2*N1/z + N2/(z2)) / (32768 - 2*D1/z - D2/(z2))
So,
N0 = B0 = b0
N1 = B1 = b1 / 2
N2 = B2 = b2
D1 = A1 = - a1 / 2
D2 = A2 = - a2
But I dont get it because the formula of [b0, b1, b2, a1, a2] are missing.
4. I have had to try below equations for bandpass filter by using the same parameters as above (1) , but not success. The value of alpha@b0 gave an overflow value.
parameters: Fc=f0=1000Hz, Bandwidth=BW=100Hz, Scale=1, Fs=44100Hz
w0 = 2*pi*f0/Fs
alpha = sin(w0)*sinh( ln(2)/2 * BW * w0/sin(w0) )
BPF: H(s) = (s/Q) / (s^2 + s/Q + 1) (constant 0 dB peak gain) b0 = alpha b1 = 0 b2 = -alpha a0 = 1 + alpha a1 = -2*cos(w0) a2 = 1 - alpha
5. Is there any reference of the coefficient formula that I missed out? what is the real equation/formula of each coefficients [b0, b1, b2, a0, a1, a2] for bandpass digital biquad filter?
Thanks and Regards,
Kal