# Z-domain transfer function to difference equation

So I have a transfer function $H(Z) = \frac{Y(z)}{X(z)} = \frac{1 + z^{-1}}{2(1-z^{-1})}$. I need to write the difference equation of this transfer function so I can implement the filter in terms of LSI components. I think this is an IIR filter hence why I am struggling because I usually only deal with FIR filters. I have tried to simplify the filter, and I get:

$H(z) = \frac{z+1}{2(z-1)}$

This gives me the gain (K = 0.5) and the poles as +1, and the zeroes as -1, hence filter is stable.

Can anyone help me? I usually divide through by the denominator, and hence get the difference equation, but I can't in this case. Then it's just a case of looking at the difference equation and implementing the filter with delays, multiples, adders etc.

• A pole at z=1 results in a non BIBO stable system. May 28, 2018 at 18:32
• @Juancho That's true, cheers for spotting it. May 28, 2018 at 20:45

\begin{align*}\dfrac{Y(z)}{X(z)} &= \dfrac{1+z^{-1}}{2(1-z^{-1})}\\ \\ 2(1-z^{-1})Y(z)&=(1+z^{-1})X(z)\\ \\ Y(z) -Y(z)z^{-1}&= \frac{1}{2}X(z) +\frac{1}{2}X(z)z^{-1}\\ \\ y[n]-y[n-1]&=\frac{1}{2}x[n] + \frac{1}{2}x[n-1]\\ \\ y[n]&=y[n-1]+\frac{1}{2}x[n] + \frac{1}{2}x[n-1]\\ \end{align*}