I have a Biquad II filter implementation in my embedded environment and I'm trying to find some equations to generate the coefficients for it.

I have already found the Audio Eq Cookbook, which simply describes how to calculate all of the coefficients for Type I.

LPF: (Taken from Audio Eq Cookbook, Type I Equations)

omega = 2*PI*frequency/sampleRate

sin   = sin(omega)
cos   = cos(omega)

alpha = sin/(2*Q)                                     (if Q is specified)
      = sin*sinh[ ln(2)/2 * bandwidth * omega/sin ]   (if bandwidth is specified)

            b0 =  (1 - cos)/2
            b1 =   1 - cos
            b2 =  (1 - cos)/2
            a0 =   1 + alpha
            a1 =  -2*cos
            a2 =   1 - alpha

What are the equations for type II coefficients?

  • $\begingroup$ Why would the coefficients depend on biquad type ? $\endgroup$
    – Hilmar
    Commented Mar 22, 2019 at 16:29
  • $\begingroup$ Can I use biquad I coefficients for II type as well? $\endgroup$
    – Can Uysal
    Commented Mar 24, 2019 at 12:25
  • $\begingroup$ hay, i didn't see this until now, 2 weeks later. the coefficients for the Direct Form 1 and Direct Form 2 are the same. but these coefficients have to be massaged a bit if your implementation is a form like Lattice or Ladder or some other State Variable Forms. $\endgroup$ Commented Apr 5, 2019 at 22:01
  • $\begingroup$ @robertbristow-johnson hey robert, please elaborate since I'm desperately wanting to implement a ladder filter. Can you lead me to a reading source? or even better, a math like this simple? $\endgroup$
    – Can Uysal
    Commented Apr 5, 2019 at 23:24
  • $\begingroup$ @robertbristow-johnson lol, robert it is you! you are the author of audio eq cookbook, huge fan! such an honour! :) thank you for this lovely source, It saved me like a years work maybe. Thank you! Your page in musicdsp is down by the way, is there any other sites hosting your original writing? While I find you here, would like to ask another question. When my filter drops down below 200-300 hz, some distortion/noise begin to rumble in low end, especially with high Q. Is there a way to eliminate this? Using direct form II transposed. $\endgroup$
    – Can Uysal
    Commented Apr 5, 2019 at 23:38


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.