Z Transform of Difference Equations Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Z Transform of Difference Equations

Since z transforming the convolution representation for digital filters was so fruitful, let's apply it now to the general difference equation, Eq. (5.1). To do this requires two properties of the z transform, linearity (easy to show) and the shift theorem (derived in §6.3.1 above). Using these two properties, we can write down the z transform of any difference equation by inspection, as we now show. In §6.8.2, we'll show how to invert by inspection as well.

Repeating the general difference equation for LTI filters, we have (see Eq. (5.1)) \begin{eqnarrayda}
y(n) &=& b_0 x(n) &+& b_1 x(n - 1) + \cdots + b_M x(n - M)\\
& & &-& a_1 y(n - 1) - \cdots - a_N y(n - N).\\

Let's take the z transform of both sides, denoting the transform by $ {\cal Z}\{\}$. Because $ {\cal Z}\{\}$ is a linear operator, it may be distributed through the terms on the right-hand side as follows: \begin{eqnarrayda}
{\cal Z}\{y(\cdot)\}
&=& {\cal Z}\{ b_0 x(n) &+& b_1 x(n - ...
...-M} X(z)\\
& & &-& a_1 z^{-1}Y(z) - \cdots - a_N z^{-N} Y(z),
\end{eqnarrayda} where we used the superposition and scaling properties of linearity given on page [*], followed by use of the shift theorem, in that order. The terms in $ Y(z)$ may be grouped together on the left-hand side to get

\lefteqn{Y(z) + a_1 z^{-1}Y(z) + \cdots + a_N z^{-N} Y(z) = }\...
... \\
& & b_0 X(z) + b_1 z^{-1}X(z) + \cdots + b_M z^{-M} X(z).

Factoring out the common terms $ Y(z)$ and $ X(z)$ gives

$\displaystyle Y(z)\left[1 + a_1 z^{-1}+ \cdots + a_N z^{-N}\right]
= X(z)\left[b_0 + b_1 z^{-1}+ \cdots + b_M z^{-M}\right].

Defining the polynomials

A(z) &\isdef & 1 + a_1\,z^{-1} + \,\cdots\, + a_N\,z^{-N}\\
B(z) &\isdef & b_0 + b_1\,z^{-1}+\,\cdots\,+b_M\,z^{-M},

the z transform of the difference equation becomes

$\displaystyle A(z)\,Y(z) = B(z)\,X(z).

Finally, solving for $ Y(z)/X(z)$, which is by definition the transfer function $ H(z)$, yields

$\displaystyle H(z) = \frac{Y(z)}{X(z)} = \frac{b_0 + b_1 z^{-1}+ \cdots + b_M z^{-M}}{1 + a_1 z^{-1}+ \cdots + a_N z^{-N}} \isdef \frac{B(z)}{A(z)}. \protect$ (7.5)

Thus, taking the z transform of the general difference equation led to a new formula for the transfer function in terms of the difference equation coefficients. (Now the minus signs for the feedback coefficients in the difference equation are explained.)

Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

[How to cite this work] [Order a printed hardcopy]

``Introduction to Digital Filters with Audio Applications'', by Julius O. Smith III, (August 2006 Edition).
Copyright © 2007-02-02 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA  [Automatic-links disclaimer]