How IIR Filter coefficients formula derived? for LPF, HPF, BPF, BSF there are coefficients formula for a0, a1, a2, b0, b1.

How it came? I would like to know the derivation for all those coeffs w.r.t LPF, HPF, BPF, BSF.

For ex, $b_0 = \frac12(1 - \cos(\omega_0))$ for LPF how it came?

Is it possible to get those details?


1 Answer 1


There are many ways to arrive at filter coefficients, depending on your specs. But from your question I assume that you're talking about basic second-order building blocks (biquads). Also here there are several possibilities, but one standard approach - and that's probably the one you're after - is to start with the second-order transfer function of an analog filter (low pass, high pass, etc.), and then use the bilinear transform to transform the filter to a corresponding discrete-time filter.

For a low pass filter, the steps are

  1. start with the transfer function of a normalized second-order continuous-time low pass filter: $$H(s)=\frac{1}{s^2+\sqrt{2}s+1}\tag{1}$$
  2. use the bilinear transform $$s=k\frac{z-1}{z+1}\tag{2}$$ to obtain the discrete-time transfer function


  1. choose the constant $k$ depending on the desired cut-off frequency of the discrete-time filter. If $\omega_0$ is the desired normalized $3$ dB cut-off frequency of the discrete-time filter, i.e., $\omega_0=2\pi f_0/f_s$ where $f_s$ is the sampling frequency, then $k$ must be chosen as $$k=\frac{1}{\tan(\omega_0/2)}\tag{4}$$

Eqs $(3)$ and $(4)$ completely specify the desired discrete-time filter.

Note that the coefficients in Eq. $(3)$ can also be written in terms of $\sin(\omega_0)$ and $\cos(\omega_0)$. This is the form that you find for instance in Robert Bristow-Johnson's audio EQ-cookbook. In order to rewrite $(3)$ in that form, note that $k$ can be written as


and $k^2$ can be written as


Plugging $(5)$ and $(6)$ into $(3)$ and using a bit of algebra will give you the transfer function of a discrete-time low pass biquad with normalized cut-off frequency $\omega_0$ in the following form:




These formulae and the ones for biquads with other characteristics (high pass, band pass, etc.) can be found in Robert Bristow-Johnson's audio EQ-cookbook. The derivations for the other filter types are very similar to the one for the low pass filter shown here.

  • 1
    $\begingroup$ That should be "robert bristow-johnson" :-) But I'll let it pass. $\endgroup$
    – Peter K.
    Commented Apr 13, 2020 at 14:21
  • 2
    $\begingroup$ @PeterK.: Oh yeah, for some reason I can never remember his name :) $\endgroup$
    – Matt L.
    Commented Apr 13, 2020 at 14:24
  • $\begingroup$ @ksi: That's exactly what I tried to explain in my answer. You'll have to sit down yourself and use the formulae I've shown you. Have you actually tried replacing $s$ in $H(s)$ by $k(z-1)/(z+1)$? Once you've done that you just need to replace the constant $k$ (and $k^2$) by the expressions given in my answer, and you'll arrive at exactly the same formulae for the filter coefficients as I did. If you really arrive at a different result, please add the steps to your question and we can try to figure out where you went wrong. $\endgroup$
    – Matt L.
    Commented Apr 13, 2020 at 15:22
  • $\begingroup$ @ksi: I've added a few steps to get you started. $\endgroup$
    – Matt L.
    Commented Apr 13, 2020 at 16:22
  • $\begingroup$ @ksi: Mind the normalization. The $a_1$ given at the end of my answer is not equal to $2(1-k^2)$ but it is $2(1-k^2)/(k^2+\sqrt{2}k+1)$. Check again Eq. $(3)$, where I've added another step (to normalize $a_0$ to $1$). $\endgroup$
    – Matt L.
    Commented Apr 14, 2020 at 11:36

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.