Deriving difference equation from a rational system function $H(z)$

164 Views Asked by At

If I have the system function $H(z)$ of a linear time-invariant system, how do I derive the difference equation relating its input $x(n)$ and output $y(n)$? The system function is given by

$$H(z) = \frac{1-\frac{1}{2}z^{-1}}{(1-\frac{1}{4}z^{-1})(1-\frac{1}{2}e^{i\frac{\pi}{4}}{4}z^{-1})(1-\frac{1}{2}e^{-i\frac{\pi}{4}}{4}z^{-1})}$$

Edit: All I know is that $\displaystyle H(z) = \frac{Y(z)}{X(z)}$

I think there must be a shortcut to solving this, because plugging the denominator into the inverse $z$-transform and solving directly is not something I have the required math background for.

1

There are 1 best solutions below

0
On

$$H(z) = \frac{Y(z)}{X(z)} = \frac{1-\frac{1}{2}z^{-1}}{(1-\frac{1}{4}z^{-1})(1-\frac{1}{2}e^{i\frac{\pi}{4}}{4}z^{-1})(1-\frac{1}{2}e^{-i\frac{\pi}{4}}{4}z^{-1})}$$

If you expand the denominator, you will get something like this:

$$ \begin{gather} \left(1-\frac{1}{4}z^{-1}\right)\left(1-\frac{1}{2}e^{i\frac{\pi}{4}}{4}z^{-1}\right)\left(1-\frac{1}{2}e^{-i\frac{\pi}{4}}{4}z^{-1}\right)\\ \left(1-\frac{1}{4}z^{-1}\right)\left(1-\frac{1}{2}e^{i\frac{\pi}{4}}{4}z^{-1}-\frac{1}{2}e^{-i\frac{\pi}{4}}{4}z^{-1}+4z^{-2}\right)\\ \left(1-\frac{1}{4}z^{-1}\right)\left(1-4\left(\frac{e^{i\frac{\pi}{4}}+e^{-i\frac{\pi}{4}}}{2}\right)z^{-1}+4z^{-2}\right)\\ \left(1-\frac{1}{4}z^{-1}\right)\left(1-4\cos(\pi/4)z^{-1}+4z^{-2}\right)\\ 1-4\cos(\pi/4)z^{-1}+4z^{-2}-\frac{1}{4}z^{-1}+\cos(\pi/4)z^{-2}-z^{3} \end{gather} $$

Which finally results in:

$$1-\frac{(1+8\sqrt{2})}{4}z^{-1}+\frac{(8+\sqrt{2})}{2}z^{-2}-z^{-3}$$

So, you have the Z-transformed Difference Equation:

$$Y(z)\left[1-\frac{(1+8\sqrt{2})}{4}z^{-1}+\frac{(8+\sqrt{2})}{2}z^{-2}-z^{-3}\right]=X(z)\left[1-\frac{1}{2}z^{-1}\right]$$

And its inverse:

$$y[n]-3.0784y[n-1]+4.7071y[n-2]-y[n-3]=x[n]-0.5x[n-1]$$