Frequency response from biquad coefficients¶
- Author or source: moc.feercinos@retep
- Type: biquad
- Created: 2004-11-29 09:49:47
Here is a formula for plotting the frequency response of a biquad filter. Depending on the coefficients that you have, you might have to use negative values for the b- coefficients.
1 2 3 4 5
//w = frequency (0 < w < PI) //square(x) = x*x y = 20*log((sqrt(square(a0*square(cos(w))-a0*square(sin(w))+a1*cos(w)+a2)+square(2*a0*cos(w)*sin(w)+a1*(sin(w))))/ sqrt(square(square(cos(w))- square(sin(w))+b1*cos(w)+b2)+square(2* cos(w)*sin(w)+b1*(sin(w))))));