Suppose we have the following open loop transfer function in a discrete system: \begin{equation} G(z) = \frac{0.1z+0.15}{(z-1)(z-0.1)} \end{equation} Under the unity negative feedback, we know that closed loop transfer fucntion becomes: \begin{equation} G_c(z) = \frac{G(z)}{1+G(z)} = \frac{z+1.5}{z^2-z+0.25} \end{equation}
Now, we want to find the steady state error when the input is unit ramp. \begin{equation} e_{ss} = lim_{z -> 1} [(1-z^{-1})\frac{1}{1+G(z)}R(z)] \end{equation} \begin{equation} R(z) = \frac{Tz^{-1}}{(1-z^{-1})^2} \end{equation} \begin{align*} e_{ss} &= lim_{z -> 1} [(1-z^{-1})\frac{1}{1+G(z)}\frac{Tz^{-1}}{(1-z^{-1})^2}] \\ &= lim_{z -> 1}\frac{1}{1 + \frac{0.1z+0.15}{(z-1)(z-0.1)}}\frac{Tz^{-1}}{1-z^{-1}} \\ &= \frac{(z-1)(z-0.1)}{(z-1)(z-0.1)+0.1z+0.15}\frac{Tz^{-1}}{1-z^{-1}} \\ &= \frac{(z-1)(z-0.1)z^{-1}}{z^{-1}[(z-1)(z-0.1)+0.1z+0.15]}\frac{Tz^{-1}}{1-z^{-1}} \\ &= \frac{(z-0.1)}{[(z-1)(z-0.1)+0.1z+0.15]}T \\ &= \frac{0.9}{0.25} T \end{align*} As shown above the state error is constant. When I try to test this result in MATLAB, however, the output seems to not be able to follow the input. MATLAB script which I use as follows:
num = [0 1 1.5]
den = [1 -1 0.25]
r = 0:100
c = filter(num,den,r)
