# Manipulate Z-transform transfer function [closed]

I would like to express a Z-plane transfer function in a form of a difference equation so that I can implement it as an infinite impulse response filter.

Here is an example of a continuous time transfer function that I want to convert to a discrete time model using the bilinear transform method.

tfmodel = TransferFunctionModel[1/( a s^2 + b s + c), s]


I then convert this to a discrete time model:

discreteModel = ToDiscreteTimeModel[tfmodel, 1, z]


$\begin{array}{c|c}\frac{(z+1)^2}{4 a z^2-8 a z+4 a+2 b z^2-2 b+c z^2+2 c z+c}\\ \end{array}$

How can I then express it in the form of a difference equation? I need every exponent of Z to be negative on the numerator and denominator.

ANNEX: Dividing by the highest power of z doesn't work for me (becuase I am sure I am doing something wrong!)

FullSimplify[discreteModel / z^2]


The above command will not expand or factorise.

ANNEX: I tried the following:

ExpandAll[((1 + z)^2/(4 a - 2 b + c - 8 a z + 2 c z + 4 a z^2 + 2 b z^2 + c z^2)) / z^2]


And this gave me:

$\frac{z^2}{4 a z^4-8 a z^3+4 a z^2+2 b z^4-2 b z^2+c z^4+2 c z^3+c z^2}+\frac{2 z}{4 a z^4-8 a z^3+4 a z^2+2 b z^4-2 b z^2+c z^4+2 c z^3+c z^2}+\frac{1}{4 a z^4-8 a z^3+4 a z^2+2 b z^4-2 b z^2+c z^4+2 c z^3+c z^2}$

Which is not what I want, I would like only negative exponents

• "I need every exponent of Z to be negative on the numerator and denominator." - why not divide the numerator and denominator by the appropriate power of $z$? Jan 18, 2017 at 12:15
• I tried that but it wouldn't work. I added a bit to the end of my question to describe the problem. Jan 18, 2017 at 12:23
• How about discreteModel = ToDiscreteTimeModel[tfmodel, 1, 1/z] ? Jan 18, 2017 at 12:28
• Thank you @Nasser, that is now doing what I want! Jan 18, 2017 at 12:31
• Simplify[discreteModel[z] == discreteModel2[z]] is True. Jan 18, 2017 at 16:23