# Why is a feedback loop not represented by the least order transfer function?

I have a feedback loop with transfer $L(z)= \frac{H(z)C(z)}{1+H(z)C(z)}$.

$$H(z) = h\quad \text{and} \quad C(z) = \frac{K}{z-\alpha}.$$

If I manually calculate the transfer function, I get:

$$L(z) = \frac{Kh}{z-\alpha + Kh}$$

But if I let MATLAB do the calculation I get:

$$L(z) = \frac{z-\alpha}{z-\alpha}\frac{Kh}{z-\alpha + Kh}$$

$L(z)$ is unstable with $\alpha=2$ and $K=\frac{1}{h}$. The second transfer function (calculated with MATLAB) has two poles $(1,2)$ of which one is outside the unit circle. So the second one seems to be correct. What is wrong with the first one?

• What matlab function are you using? There is a pole-zero cancellation in the matlab version of $L(z)$. – Peter K. May 5 '13 at 19:51
• What do you mean by "$L(z)$ is unstable", exactly? The first TF looks correct to me. – lxop May 5 '13 at 20:46
• @PeterK. I create z with tf('z', -1) and then just do C = K/(z-alpha) and L = HC/(1+HC). – i.amniels May 5 '13 at 21:02
• @lxop with given values of K and alpha, the output of L is not bounded. For example step(L) will explode. – i.amniels May 5 '13 at 21:03
• According to the Mathworks z = tf('z',-1) means you've created a discrete time system with a sampling rate of -1. That seems wrong. Quote: z = tf('z',Ts) to specify a TF model with sample time Ts using a rational function in the discrete-time variable, z. – Peter K. May 5 '13 at 21:09

Not really an answer, but let's work it out with $H(z) = h$ and $C(z) = \frac{K}{z-\alpha}$.:
$$\begin{array} \ L(z) &=& \frac{H(z)C(z)}{1+H(Z)C(z)}\\ &=& \frac{h \frac{K}{z-\alpha}}{ 1 + h \frac{K}{z-\alpha}}\\ &=& \frac{h K}{ z - \alpha + h K}\\ &=& \frac{h K}{ z - \alpha + h K}\ \ \frac{z - \beta}{ z - \beta} \end{array}$$
I added the last line to show what I mean by a pole-zero cancellation. $\beta$ can be any value; if the pole and the zero at $\beta$ cancel out, the overall value of $\frac{z - \beta}{ z - \beta}$ is 1.
The trick will be to figure out why matlab inserts the extra $\frac{z - \alpha}{ z - \alpha}$ in there in the first plcae,