Calculate transfer function of two parallel transfer functions in a feedback loop I have rational transfer functions:

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

$$H_2(z) = \frac{ q_0 + q_1z^{-1} + q_2z^{-2} }{p_0 + p_1z^{-1} + p_2z^{-2}}$$

And they are being used in the following feedback loop:



Sometimes this system blows up, and other times it is stable depending $H_1$ and $H_2$. I'm guessing that when it blows up, the poles of the combined system are outside the unit circle.

How do I calculate the transfer function of the system so I can start re-arranging it?
Your two transfer functions are in parallel, i.e they simply add up. So your feedback transfer function is simply $G(z) = H_1(z)+H_2(z)$. You want to makes sure that the magnitude of $G(z)$ is smaller than one.

and the overall closed loop transfer function is

$$H(z) = \frac{Y(z)}{X(z)} = \frac{1}{1+H_1(z)+H_2(z)}$$