Given a digital filter consisting of a chain of digital biquad filters. Given a digital biquad filter with a normalized Direct form 1 difference equation: $ y_n = b_0x_n + b_1x_{n-1}+b_2x_{n-2} - a_1y_{n-1} - a_2y_{n-2}$
My goal is to implement the biquad filter with few multiplications. For this end I play with the coefficients. A first question is:
- Can I change coefficients $a_1$ and $a_2$ proportionately, and still retain the frequency response of the biquad filter?"
The rest of this post assumes an affirmative answer.
Many of my filters will have $b_0 = b_2$. As a start I change $b_0, b_1, b_2$ so that $b_0$ (and $b_2$) are powers of 2. This changes the gain of the biquad filter, this will be compensated later in the signal chain.
I want to change the coefficients $a_1$ and $a_2$ in a similar way, to eliminate yet another multiplier. I reason that this should be possible - the feedback is dependent on the proportion of $a_1$ and $a_2$. I am, however, unable to fathom how this affects the gain of the biquad filter. So my second question is:
- How does proportional changes to $a_1$ and $a_2$ affect the gain of the biquad filter?
A concrete example
Assume the following coefficients:
a0 = 1.000000
a1 = 0.305805
a2 = -0.192467
b0 = 0.236979
b1 = 0.412704
b2 = 0.236979
If used "as is", four multipliers are needed (we would add $x_n$ and $x_{n-2}$ before multiplying with $b_2$). To remove one of the four multiplications is easy. I modify the non-recursive coefficients b0, b1 and b2 in such a way that b0 is a power of 2.
a0 = 1.000000
a1 = 0.305805
a2 = -0.192467
b0 = 0.236979/0.236979*0.25 = 0.25
b1 = 0.412704/0.236979*0.25 = 0.435380
b2 = 0.236979/0.236979*0.25 = 0.25
I now have a gain of $b_2/0.25$ I now modify $a_1$ and $a_2$:
a0 = 1.000000
a1 = 0.305805/0.305805*0.25 = 0.25
a2 = -0.192467/0.305805*0.25 = -0.157344
b0 = 0.250000
b1 = 0.435380
b2 = 0.250000
Experimentally, it seems the gain now changes with a factor 1.25, but how to derive this?