1
$\begingroup$

I have two cascaded one-pole sections with the same coefficient b for both sections. $$ y_A[n]=x_A[n]+b\cdot(y_A[n−1]−x_A[n])\\ y_B[n]=y_A[n]+b\cdot(y_B[n−1]−y_A[n]) $$

The final output of the system is $y_B[n]$.

I would like to re-implement the system as one biquad section of the form:

$$ y[n]=a_0x[n]+a_1x[n-1]+a_2x[n-2]-b_1y[n-1]-b_2y[n-2] $$

The final output of the system is $y[n]$.

I would like to know what calculations I have to perform in order to make the output of the biquad exactly match the output of the one-pole cascaded system. $$ y_B[n] = y[n] $$ Obviously the 5 biquad coefficients $a_0\; a_1\; a_2\; b_1\; b_2$ will have to be determined as a function of the $b$ coefficient as found in the cascaded system above.

Can someone lead me through the math?

Thank you.

$\endgroup$
1
$\begingroup$

A single one-pole filter satisfies the following difference equation:

$$y[n]=x[n]+b\left(y[n-1]-x[n]\right)=(1-b)x[n]+by[n-1]\tag{1}$$

which corresponds to this transfer function:

$$H(z)=\frac{1-b}{1-bz^{-1}}\tag{2}$$

If you cascade two of these systems, the transfer functions are multiplied:

$$H^2(z)=\frac{(1-b)^2}{(1-bz^{-1})^2}=\frac{(1-b)^2}{1-2bz^{-1}+b^2z^{-2}}\tag{3}$$

The transfer function in $(3)$ corresponds to the following difference equation for the cascaded system:

$$y[n]=(1-b)^2x[n]+2by[n-1]-b^2y[n-2]\tag{4}$$

Consequently, implementing $(4)$ is equivalent to implementing $(1)$ twice.

$\endgroup$
  • $\begingroup$ Yes, that's it. I just implemented it and it works like a charm. Thanks again. $\endgroup$ – Luigi Castelli Nov 16 '15 at 15:09
0
$\begingroup$

You must take the Z-Transform:

$$Y(z) = a_0 X(z) + a_1 z^{-1} X(z) + a_2 z^{-2} X(z) - b_1 z^{-1} Y(z) - b_2 z^{-2} Y(z)$$

Find the transfer function $H(z) = Y(z)/X(z)$

$$H(z) = \frac{a_0 + a_1 z^{-1} + a_2 z^{-2}}{b_1 z^{-1} + b_2 z^{-2}+1}$$

Now factor it out into a product of two biquads (just find the poles and zeros). Then you will have both your sections. Something like this:

$$H(z) = \left (\frac{z+z_0}{z+p_0} \right).\left(\frac{z+z_1}{z+p_1}\right)$$

Remember to group poles and zeros that are close-by!

To do the actual implementation (going back to the time-domain), you can look here:

  1. http://www.iowahills.com/A7ExampleCodePage.html
  2. http://www.engr.colostate.edu/ECE423/lab05/Lab_Notes/Lab_Notes_5.pdf
  3. http://www.disca.upv.es/aperles/arm_cortex_m3/curset/CMSIS/Documentation/DSP/html/group___biquad_cascade_d_f2_t.html
$\endgroup$
  • $\begingroup$ Thanks for your reply, however it doesn't answer my question. I have a one-pole cascaded section that produces the desired output when fed with one b coefficient set to a certain value. I need to find 5 equations (one for each of the 5 biquad coefficients) that calculate a0, a1, a2, b1, b2 in terms of b so that the biquad will generate an output exactly equal to the output of the cascaded one-pole system. So the answer will comprise 5 equations all in terms of b. Each equation will define one of the 5 biquad coefficients. $\endgroup$ – Luigi Castelli Nov 16 '15 at 5:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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