1
$\begingroup$

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?

$\endgroup$
3
  • 1
    $\begingroup$ Write out the transfer function H(z) and you should readily see the answer to your question. Do you know how to go from your form of $y_n = ...$ to $H(z)= Y(z)/X(z)$? $\endgroup$ Apr 23, 2017 at 15:02
  • 1
    $\begingroup$ Not scaling $a_0$ along with $a_1$ and $a_2$ is incorrect. As @Dan Boschen mentions, that will be obvious if you convert the difference equation to the transfer function in the Z domain. $\endgroup$
    – Andy Walls
    Apr 23, 2017 at 16:46
  • $\begingroup$ I misinterpreted the effect of $a_0$ in a flow graph. You are right @andy-walls. This is easily seen by the difference equation that is not normalized, no need to go to the Z domain. $\endgroup$
    – Baard
    Apr 24, 2017 at 6:44

1 Answer 1

3
$\begingroup$

Sorry, that doesn't work. You have to scale all numerator (the "b") or all denominator coefficients (the "a") at the same time. That doesn't work for the denominator since you all practical implementations require $a_0=1$. Scaling $a_1$ and $a_2$ without scaling $a_1$ will move the poles and change the overall shape of the transfer function and not just the gain.

$\endgroup$

Your Answer

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

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