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:
Can someone tell me if this is correct?
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:
Can someone tell me if this is correct?
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}} $$
I won't tell you if it's correct but I'll show you what it should be: -
Don't forget the minus signs on the "a" coefficients. It was taken from here.
There is the form that uses \$Z^{-1}\$ - it would make the first formula in the picture this: -
\$y[n] = \omega[n]\cdot(b_0 + b_1Z^{-1} + b_2Z^{-2})\$ and from inspection you should recognize the \$\omega[n]\$ is the output from the summer to the left. Hope this helps.