Z-transform and rational functions as a database for sequences

The Z-transform is essentially a clever database that can store and operate on the values of a discrete-time signal. The inverse Z-transform can be used to query the database.

The Z-transform database

The definition of the Z-transform

$$U[z]=\mathcal{Z} \{ u[n] \} = \sum_{n=0}^{\infty} u[n] \, z^{-n} = u[0] + u[1] z^{-1} + u[2] z^{-2} + \cdots$$

means that there is a one-to-one correspondence between the value of the signal at time $n$ and the coefficient of the term $z^{-n}$ in the Z-transform.

This correspondence is evident when the signal is finite. For example, the sequence

$$u[n] = \{1,2,3,4\}$$

has as Z-transform

$$U[z]=\mathcal{Z} \{ u[n] \} = 1 + 2 z^{-1} + 3 z^{-2} + 4 z^{-3}$$

which is a polynomial in $z^{-1}$.

When $u[n]$ is not finite, then $U[z]$ can be more complicated. For example

$$u[n]=\{0,1, 2,\cdots\}$$

is such that

$$U[z]=\mathcal{Z} \{ u[n] \} = \sum_{n=0}^{\infty} n \, z^{-n} = \frac{z}{(z-1)^2}.$$

Indeed, by regarding $U[z]$ as a function of $q = z^{-1}$

$$U[q]=\frac{q}{(1-q)^2}$$

and expanding $U[q]$ in a Taylor series around $q=0$ one obtains

$$U[q]=\frac{q}{(1-q)^2}=1 q+2 q^2+3 q^3+\cdots$$

because $ U[0] = 0$ and

$$\frac{1}{n!} U[q]^{(n)}(q) = \frac{n + q}{(1 – q)^{n+2}}$$

so that $U[q]^{(n)}(0)/n!=n$. (Think about what it means for $U$ not to admit a Taylor series expansion about $q = 0$!)

The ability of a rational function to encode an entire infinite sequence is remarkable! In the above example, the entire infinite sequence $0, 1, 2, \cdots$, can be compressed and stored as the finite number of coefficients of the polynomials that make up the corresponding Z-transform.

Querying the database

Once we have a sequence stored in the database, that is encoded as a function of the complex variable $z$, it is possible to “query” that database using a familiar tool: the inverse Z-transform.

The most basic query is: what is the value of $u[n]$ at a specific $n=k$? This question has a simple answer if $k = 0$, in which case the initial-value should be given simply by $U[q]$ evaluated at $q = 0$, or in terms of the original variable $z$,

$$u[0] = \lim_{z\rightarrow \infty} U[z]$$

because $z\rightarrow \infty$ implies $q=z^{-1} \rightarrow 0$. This evaluation can be adapted to give the value at any sample time by exploring the relationship between the sequence and the derivatives of $U$ mentioned above, that is

$$u[n]=\frac{1}{n!} \lim_{q \rightarrow 0}U[q]^{(n)}(q).$$

However, in many cases, e.g. rational functions, it will not be necessary to explicitly calculate derivatives. Indeed, if a $U$ is rational then all the machinery of rational functions can be used to calculate a formula for the entire sequence $u[n]$ in terms of the inverse Z-transform.

In the example above, expanding $U$ in partial fractions

$$U[z]=\frac{z^{-1}}{(1-z^{-1})^2}=\frac{1}{(1-z^{-1})^2}- \frac{1}{1-z^{-1}}$$

we obtain

$$u[n]=\mathcal{Z}^{-1}\{U[z]\}=(n+1) 1[n]- 1[n]=n 1[n].$$

Complex queries

For a more sophisticated query, consider the problem of calculating the sum of a sequence $u[n]$ encoded as its Z-transform up to a desired term $n$. That is to calculate

$$y[n]=\sum_{k=0}^{n} u[n].$$

Because

$$y[n]=\sum_{k=0}^{n} u[n] =\sum_{k=0}^{\infty} 1[n-k] \, u[n]$$

can be thought as a convolution in which $g[n]=1[n]$ is the impulse response of the corresponding filter, the terms of the above sum can be calculated again by the inverse Z-transform after multiplying the Z-transform of the input by the Z-transform of the impulse response, that is the transfer-function.

In the case of the sequence $u[n]=\{0,1,2,\cdots\}$ we have

$$
\begin{aligned}
Y[z]=G[z] U[z]&=\frac{1}{1-z^{-1}} \frac{z^{-1}}{(1-z^{-1})^2}= \frac{z^{-1}}{(1-z^{-1})^3}\\
&= \frac{1}{(1-z^{-1})^3}- \frac{1}{(1-z^{-1})^2}
\end{aligned}$$

after expansion in partial fractions which has as inverse

$$y[n]= \mathcal{Z}^{-1}\{Y[z]\}= \frac{1}{2}(n+1)(n+2) 1[n] -(n+1) 1[n]=\frac{1}{2} n (1 + n).$$

One should recognize above the classic formula for the sum of the arithmetic sequence.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.