Electronic – IIr filter layout to formula problems

dspiir

The layout

I am trying to create the formula for this layout but I have the feeling that I made a mistake.

The formula that I have at the moment is:

enter image description here

Can someone tell me if this is correct?

Best Answer

Your transfer function seems to be OK, i had misread your diagram completely.

Retrace every branch from output to input and sum them up together to get the transfer function of the filter.Let the signal s[n] be input signal into the buffer \$b_0\$ (ie the signal just after the first summer)

$$ y[n] = b_0s[n] + b_1s[n-1] + b_2s[n-2] $$ $$ s[n] = x[n] + a_1s[n-1] + a_2s[n-2] $$

Then take the Z-transform of both sides of both equations.

From the first equation: $$ Y(z) = b_0S(z) + b_1z^{-1}S(z) + b_2z^{-2}S(z) $$ $$ \frac{Y(z)}{S(z)} = b_0 + b_1z^{-1} + b_2z^{-2} $$

Then for the second equation:

$$ S(z) = X(z) + a_1z^{-1}S(z) + a_2z^{-2}S(z) $$

$$ \frac{S(z)}{X(z)} = \frac{1}{1 - a_1z^{-1} - a_2z^{-2}} $$

meaning to get the final equation we just multiply the two

$$ \frac{Y(z)}{X(z)} = \frac{b_0 + b_1z^{-1} + b_2z^{-2}}{1 - a_1z^{-1} - a_2z^{-2}} $$