# Z-transform

Jump to: navigation, search

In mathematics and signal processing, the Z-transform converts a discrete time-domain signal, which is a sequence of real or complex numbers, into a complex frequency-domain representation.

It can be considered as a discrete equivalent of the Laplace transform. This similarity is explored in the theory of time scale calculus.

The Z-transform was introduced, under this name, by Ragazzini and Zadeh in 1952. The modified or advanced Z-transform was later developed by E. I. Jury, and presented in his book Sampled-Data Control Systems (John Wiley & Sons 1958). The idea contained within the Z-transform was previously known as the "generating function method".

## Definition

The Z-transform, like many integral transforms, can be defined as either a one-sided or two-sided transform.

### Bilateral Z-transform

The bilateral or two-sided Z-transform of a discrete-time signal x[n] is the function X(z) defined as

$X(z) = \mathcal{Z}\{x[n]\} = \sum_{n=-\infty}^{\infty} x[n] z^{-n} \$

where n is an integer and z is, in general, a complex number:

$z = A e^{j\varphi} = A ( \cos{\varphi} + j\sin{\varphi} )$
where A is the magnitude of z, and φ is the complex argument (also referred to as angle or phase) in radians.

### Unilateral Z-transform

Alternatively, in cases where x[n] is defined only for n ≥ 0, the single-sided or unilateral Z-transform is defined as

$X(z) = \mathcal{Z}\{x[n]\} = \sum_{n=0}^{\infty} x[n] z^{-n} \$

In signal processing, this definition is used when the signal is causal.

An important example of the unilateral Z-transform is the probability-generating function, where the component $x[n]$ is the probability that a discrete random variable takes the value $n$, and the function $X(z)$ is usually written as $X(s)$, in terms of $s = z^{-1}$. The properties of Z-transforms (below) have useful interpretations in the context of probability theory.

### Geophysical Definition

In geophysics, the usual definition for the Z-transform is a polynomial in z as opposed to $z^{-1}$. This convention is used by Robinson and Treitel and by Kanasewich. The geophysical definition is

$X(z) = \mathcal{Z}\{x[n]\} = \sum_{n} x[n] z^{n} \$

The two definitions are equivalent; however, the difference results in a number of changes. For example, the location of zeros and poles move from inside the unit circle, using one definition, to outside the unit circle, using the other definition (and vice versa). Thus, care is required to note which definition is being used by a particular author.

## Inverse Z-transform

The inverse Z-transform is

$x[n] = \mathcal{Z}^{-1} \{X(z) \}= \frac{1}{2 \pi j} \oint_{C} X(z) z^{n-1} dz \$

where $C \$ is a counterclockwise closed path encircling the origin and entirely in the region of convergence (ROC). The contour or path, $C \$, must encircle all of the poles of $X(z) \$.

A special case of this contour integral occurs when $C \$ is the unit circle (and can be used when the ROC includes the unit circle). The inverse Z-transform simplifies to the inverse discrete-time Fourier transform:

$x[n] = \frac{1}{2 \pi} \int_{-\pi}^{+\pi} X(e^{j \omega}) e^{j \omega n} d \omega \$ .

The Z-transform with a finite range of n and a finite number of uniformly-spaced z values can be computed efficiently via Bluestein's FFT algorithm. The discrete-time Fourier transform (DTFT) (not to be confused with the discrete Fourier transform (DFT)) is a special case of such a Z-transform obtained by restricting z to lie on the unit circle.

## Region of convergence

The region of convergence (ROC) is the set of points in the complex plane for which the Z-transform summation converges.

$ROC = \left\{ z : \left|\sum_{n=-\infty}^{\infty}x[n]z^{-n}\right| < \infty \right\}$

### Example 1 (No ROC)

Let $x[n] = 0.5^n\$. Expanding $x[n]\$ on the interval $(-\infty, \infty)\$ it becomes

$x[n] = \{..., 0.5^{-3}, 0.5^{-2}, 0.5^{-1}, 1, 0.5, 0.5^2, 0.5^3, ...\} = \{..., 2^3, 2^2, 2, 1, 0.5, 0.5^2, 0.5^3, ...\}\ .$

Looking at the sum

$\sum_{n=-\infty}^{\infty}x[n]z^{-n} > \infty\ .$

Therefore, there are no such values of $z\$ that satisfy this condition.

### Example 2 (causal ROC)

ROC shown in blue, the unit circle as a dotted grey circle and the circle $\left|z\right| = 0.5$ is shown as a dashed black circle

Let $x[n] = 0.5^n u[n]\$ (where $u$ is the Heaviside step function). Expanding $x[n]\$ on the interval $(-\infty, \infty)\$ it becomes

$x[n] = \{..., 0, 0, 0, 1, 0.5, 0.5^2, 0.5^3, ...\}\$

Looking at the sum

$\sum_{n=-\infty}^{\infty}x[n]z^{-n} = \sum_{n=0}^{\infty}0.5^nz^{-n} = \sum_{n=0}^{\infty}\left(\frac{0.5}{z}\right)^n = \frac{1}{1 - 0.5z^{-1}}\$

The last equality arises from the infinite geometric series and the equality only holds if $\left|0.5 z^{-1}\right| < 1\$ which can be rewritten in terms of $z\$ as $\left|z\right| > 0.5\$. Thus, the ROC is $\left|z\right| > 0.5\$. In this case the ROC is the complex plane with a disc of radius 0.5 at the origin "punched out".

### Example 3 (causal ROC)

ROC shown in blue, the unit circle as a dotted grey circle and the circle $\left|z\right| = 0.5$ is shown as a dashed black circle

Let $x[n] = -(0.5)^n u[-n-1]\$ (where $u$ is the Heaviside step function). Expanding $x[n]\$ on the interval $(-\infty, \infty)\$ it becomes

$x[n] = \{..., -(0.5)^{-3}, -(0.5)^{-2}, -(0.5)^{-1}, 0, 0, 0, 0, ...\}\$

Looking at the sum

$\sum_{n=-\infty}^{\infty}x[n]z^{-n} = -\sum_{n=-\infty}^{-1}0.5^nz^{-n} = -\sum_{n=-\infty}^{-1}\left(\frac{z}{0.5}\right)^{-n}\$
$= -\sum_{m=1}^{\infty}\left(\frac{z}{0.5}\right)^{m} = -\frac{0.5^{-1}z}{1 - 0.5^{-1}z} = \frac{z}{z - 0.5} = \frac{1}{1 - 0.5z^{-1}}\$

Using the infinite geometric series, again, the equality only holds if $\left|0.5^{-1}z\right| < 1\$ which can be rewritten in terms of $z\$ as $\left|z\right| < 0.5\$. Thus, the ROC is $\left|z\right| < 0.5\$. In this case the ROC is a disc centered at the origin and of radius 0.5.

What differentiates this example from the previous example is only the ROC. This is intentional to demonstrate that the transform result alone is insufficient.

### Examples conclusion

Examples 2 & 3 clearly show that the Z-transform $X(z)\$ of $x[n]\$ is unique when and only when specifying the ROC. Creating the pole-zero plot for the causal and anticausal case show that the ROC for either case does not include the pole that is at 0.5. This extends to cases with multiple poles: the ROC will never contain poles.

In example 2, the causal system yields an ROC that includes $\left| z \right| = \infty\$ while the anticausal system in example 3 yields an ROC that includes $\left| z \right| = 0\$.

ROC shown as a blue ring $0.5 < \left| z \right| < 0.75\$

In systems with multiple poles it is possible to have an ROC that includes neither $\left| z \right| = \infty\$ nor $\left| z \right| = 0\$. The ROC creates a circular band. For example, $x[n] = 0.5^nu[n] - 0.75^nu[-n-1]\$ has poles at 0.5 and 0.75. The ROC will be $0.5 < \left| z \right| < 0.75\$, which includes neither the origin nor infinity. Such a system is called a mixed-causality system as it contains a causal term $0.5^nu[n]\$ and an anticausal term $-(0.75)^nu[-n-1]\$.

The stability of a system can also be determined by knowing the ROC alone. If the ROC contains the unit circle (i.e., $\left| z \right| = 1\$) then the system is stable. In the above systems the causal system (Example 2) is stable because $\left| z \right| > 0.5\$ contains the unit circle.

If you are provided a Z-transform of a system without an ROC (i.e., an ambiguous $x[n]\$) you can determine a unique $x[n]\$ provided you desire the following:

• Stability
• Causality

If you need stability then the ROC must contain the unit circle. If you need a causal system then the ROC must contain infinity and the system function will be a right-sided sequence. If you need an anticausal system then the ROC must contain the origin and the system function will be a left-sided sequence. If you need both, stability and causality, all the poles of the system function must be inside the unit circle.

The unique $x[n]\$ can then be found.

## Properties

Properties of the z-transform
Time domain Z-domain Proof ROC
Notation $x[n]=\mathcal{Z}^{-1}\{X(z)\}$ $X(z)=\mathcal{Z}\{x[n]\}$ ROC: $r_2<|z|
Linearity $a_1 x_1[n] + a_2 x_2[n]\$ $a_1 X_1(z) + a_2 X_2(z) \$ $\begin{array} {lcl} X(z) &=& \sum_{n=-\infty}^{\infty} (a_1x_1(n)+a_2x_2(n))z^{-1}\ \\ & = & a_1\sum_{n=-\infty}^{\infty} (x_1(n))z^{-1} + a_2\sum_{n=-\infty}^{\infty}(x_2(n))z^{-1}\ \\ & = & a_1X_1(z) + a_2X_2(z)\end{array}$ At least the intersection of ROC1 and ROC2
Time shifting $x[n-k]\$ $z^{-k}X(z) \$ ROC, except $z=0\$ if $k>0\,$ and $z=\infty$ if $k<0\$
Scaling in the z-domain $a^n x[n]\$ $X(a^{-1}z) \$ $\begin{array} {lcl} Z \{a^n x[n]\} &=& \sum_{n=-\infty}^{\infty} a^{n}x(n)z^{-n} \\ & = & \sum_{n=-\infty}^{\infty} x(n)(a^{-1}z)^{-n} \\ & = & X(a^{-1}z) \end{array}$ $|a|r_2<|z|<|a|r_1 \$
Time reversal $x[-n]\$ $X(z^{-1}) \$ $\begin{array} {lcl} \mathcal{Z}\{x(-n)\} &=& \sum_{n=-\infty}^{\infty} x(-n)z^{-n}\ \\ & = & \sum_{m=-\infty}^{\infty} x(m)z^{m}\ \\ & = & \sum_{m=-\infty}^{\infty} x(m){(z^{-1})}^{-m}\ \\ & = & X(z^{-1}) \end{array}$ $\frac{1}{r_1}<|z|<\frac{1}{r_2} \$
Complex conjugation $x^*[n]\$ $X^*(z^*) \$ $\begin{array} {lcl}Z\{x^*(n)\} & = & \sum_{n=-\infty}^{\infty} x^*(n)z^{-n}\ \\ & = & \sum_{n=-\infty}^{\infty} [x(n)(z^*)^{-n}]^*\ \\ & = & [ \sum_{n=-\infty}^{\infty} x(n)(z^*)^{-n}\ ]^* \\ & = & X^*(z^*)\end{array}$ ROC
Real part $\operatorname{Re}\{x[n]\}\$ $\frac{1}{2}\left[X(z)+X^*(z^*) \right]$ ROC
Imaginary part $\operatorname{Im}\{x[n]\}\$ $\frac{1}{2j}\left[X(z)-X^*(z^*) \right]$ ROC
Differentiation $nx[n]\$ $-z \frac{dX(z)}{dz}$ $\begin{array} {lcl}Z\{nx(n)\} & = & \sum_{n=-\infty}^{\infty} nx(n)z^{-n}\ \\ & = & z \sum_{n=-\infty}^{\infty} nx(n)z^{-n-1}\ \\ & = & -z \sum_{n=-\infty}^{\infty} x(n)(-nz^{-n-1})\ \\ & = & -z \sum_{n=-\infty}^{\infty} x(n)\frac{d}{dz}(z^{-n})\ \\ & = & -z \frac{dX(z)}{dz}\end{array}$ ROC
Convolution $x_1[n] * x_2[n]\$ $X_1(z)X_2(z) \$ $\begin{array} {lcl}\mathcal{Z}\{x_1(n)*x_2(n)\} & = & \mathcal{Z} \{\sum_{l=-\infty}^{\infty} x_1(l)x_2(n-l)\}\ \\ & = & \sum_{n=-\infty}^{\infty} [\sum_{l=-\infty}^{\infty} x_1(l)x_2(n-l)]z^{-n}\ \\ & = & \sum_{l=-\infty}^{\infty} x_1(l) \sum_{n=-\infty}^{\infty} x_2(n-l)z^{-n} ]\ \\ & = & [\sum_{l=-\infty}^{\infty} x_1(l)z^{-l}] [\sum_{n=-\infty}^{\infty} x_2(n)z^{-n} ]\ \\ & = & X_1(z)X_2(z)\end{array}$ At least the intersection of ROC1 and ROC2
Correlation $r_{x_1,x_2}(l)=x_1[l] * x_2[-l]\$ $R_{x_1,x_2}(z)=X_1(z)X_2(z^{-1})\$ At least the intersection of ROC of X1(z) and X2($z^{-1}$)
First Difference $x[n] - x[n-1] \$ $(1-z^{-1})X(z) \$ At least the intersection of ROC of X1(z) and $|z|>0$
Accumulation $\sum_{k=-\infty}^{n} x[k]\$ $\frac{1}{1-z^{-1} }X(z)$ At least the intersection of ROC of X1(z) and $|z|>1$
Multiplication $x_1[n]x_2[n]\$ $\frac{1}{j2\pi}\oint_C X_1(v)X_2(\frac{z}{v})v^{-1}\mathrm{d}v \$ -
Parseval's relation $\sum_{n=-\infty}^{\infty} x_1[n]x^*_2[n]\$ $\frac{1}{j2\pi}\oint_C X_1(v)X^*_2(\frac{1}{v^*})v^{-1}\mathrm{d}v \$
• Initial value theorem
$x[0]=\lim_{z\rightarrow \infty}X(z) \$, If $x[n]\,$ causal
• Final value theorem
$x[\infty]=\lim_{z\rightarrow 1}(1-z^{-1})X(z) \$, Only if poles of $(1-z^{-1})X(z) \$ are inside the unit circle

## Table of common Z-transform pairs

Here:

• u[n]=1 for n>=0, u[n]=0 for n<0
• δ[n] = 1 for n=0, δ[n] = 0 otherwise
Signal, $x[n]$ Z-transform, $X(z)$ ROC
1 $\delta[n] \,$ $1\,$ $\mbox{all }z\,$
2 $\delta[n-n_0] \,$ $z^{-n_0} \,$ $z \neq 0\,$
3 $u[n] \,$ $\frac{1}{1-z^{-1} }$ $|z| > 1\,$
4 $- u[-n-1] \,$ $\frac{1}{1 - z^{-1}}$ $|z| < 1\,$
5 $n u[n] \,$ $\frac{z^{-1}}{( 1-z^{-1} )^2}$ $|z| > 1\,$
6 $- n u[-n-1] \,$ $\frac{z^{-1} }{ (1 - z^{-1})^2 }$ $|z| < 1 \,$
7 $n^2 u[n] \,$ $\frac{ z^{-1} (1 + z^{-1} )}{(1 - z^{-1})^3}$ $|z| > 1\,$
8 $- n^2 u[-n - 1] \,$ $\frac{ z^{-1} (1 + z^{-1} )}{(1 - z^{-1})^3}$ $|z| < 1\,$
9 $n^3 u[n] \,$ $\frac{z^{-1} (1 + 4 z^{-1} + z^{-2} )}{(1-z^{-1})^4}$ $|z| > 1\,$
10 $- n^3 u[-n -1] \,$ $\frac{z^{-1} (1 + 4 z^{-1} + z^{-2} )}{(1-z^{-1})^4}$ $|z| < 1\,$
11 $a^n u[n] \,$ $\frac{1}{1-a z^{-1}}$ $|z| > |a|\,$
12 $-a^n u[-n-1] \,$ $\frac{1}{1-a z^{-1}}$ $|z| < |a|\,$
13 $n a^n u[n] \,$ $\frac{az^{-1} }{ (1-a z^{-1})^2 }$ $|z| > |a|\,$
14 $-n a^n u[-n-1] \,$ $\frac{az^{-1} }{ (1-a z^{-1})^2 }$ $|z| < |a|\,$
15 $n^2 a^n u[n] \,$ $\frac{a z^{-1} (1 + a z^{-1}) }{(1-a z^{-1})^3}$ $|z| > |a|\,$
16 $- n^2 a^n u[-n -1] \,$ $\frac{a z^{-1} (1 + a z^{-1}) }{(1-a z^{-1})^3}$ $|z| < |a|\,$
17 $\cos(\omega_0 n) u[n] \,$ $\frac{ 1-z^{-1} \cos(\omega_0) }{ 1-2z^{-1}\cos(\omega_0)+ z^{-2} }$ $|z| >1\,$
18 $\sin(\omega_0 n) u[n] \,$ $\frac{ z^{-1} \sin(\omega_0) }{ 1-2z^{-1}\cos(\omega_0)+ z^{-2} }$ $|z| >1\,$
19 $a^n \cos(\omega_0 n) u[n] \,$ $\frac{ 1-a z^{-1} \cos( \omega_0) }{ 1-2az^{-1}\cos(\omega_0)+ a^2 z^{-2} }$ $|z| > |a|\,$
20 $a^n \sin(\omega_0 n) u[n] \,$ $\frac{ az^{-1} \sin(\omega_0) }{ 1-2az^{-1}\cos(\omega_0)+ a^2 z^{-2} }$ $|z| > |a|\,$

## Relationship to Laplace transform

The bilateral Z-transform is simply the two-sided Laplace transform of the ideally sampled time function

$x_{s}(t) = \sum_{n=-\infty}^{\infty} x(nT) \delta(t-nT) = \sum_{n=-\infty}^{\infty} x[n] \delta(t-nT) \$

where $x(t)$ is the continuous-time function being sampled, $x[n]=x(nT)$ the nth sample, $T$ is the sampling period, and with the substitution: $z = e^{sT}$.

Likewise the unilateral Z-transform is simply the one-sided Laplace transform of the ideal sampled function. Both assume that the sampled function is zero for all negative time indices.

The Bilinear transform is a useful approximation for converting continuous time filters (represented in Laplace space) into discrete time filters (represented in z space), and vice versa. To do this, you can use the following substitutions in $H(s)$ or $H(z)$  :

$s =\frac{2}{T} \frac{z-1}{z+1}$ from Laplace to z (Tustin transformation);

$z =\frac{2+sT}{2-sT}$ from z to Laplace.

## Relationship to Fourier transform

The Z-transform is a generalization of the discrete-time Fourier transform (DTFT). The DTFT can be found by evaluating the Z-transform $X(z)\$ at $z=e^{j\omega}\$ or, in other words, evaluated on the unit circle. In order to determine the frequency response of the system the Z-transform must be evaluated on the unit circle, meaning that the system's region of convergence must contain the unit circle. Otherwise, the DTFT of the system does not exist.

## Linear constant-coefficient difference equation

The linear constant-coefficient difference (LCCD) equation is a representation for a linear system based on the autoregressive moving-average equation.

$\sum_{p=0}^{N}y[n-p]\alpha_{p} = \sum_{q=0}^{M}x[n-q]\beta_{q}\$

Both sides of the above equation can be divided by $\alpha_0 \$, if it is not zero, normalizing $\alpha_0 = 1\$ and the LCCD equation can be written

$y[n] = \sum_{q=0}^{M}x[n-q]\beta_{q} - \sum_{p=1}^{N}y[n-p]\alpha_{p}\$

This form of the LCCD equation is favorable to make it more explicit that the "current" output $y[{n}]\$ is a function of past outputs $y[{n-p}]\$, current input $x[{n}]\$, and previous inputs $x[{n-q}]\$.

### Transfer function

Taking the Z-transform of the above equation (using linearity and time-shifting laws) yields

$Y(z) \sum_{p=0}^{N}z^{-p}\alpha_{p} = X(z) \sum_{q=0}^{M}z^{-q}\beta_{q}\$

and rearranging results in

$H(z) = \frac{Y(z)}{X(z)} = \frac{\sum_{q=0}^{M}z^{-q}\beta_{q}}{\sum_{p=0}^{N}z^{-p}\alpha_{p}} = \frac{\beta_0 + z^{-1} \beta_1 + z^{-2} \beta_2 + \cdots + z^{-M} \beta_M}{\alpha_0 + z^{-1} \alpha_1 + z^{-2} \alpha_2 + \cdots + z^{-N} \alpha_N}.\$

### Zeros and poles

From the fundamental theorem of algebra the numerator has M roots (corresponding to zeros of H) and the denominator has N roots (corresponding to poles). Rewriting the transfer function in terms of poles and zeros

$H(z) = \frac{(1 - q_1 z^{-1})(1 - q_2 z^{-1})\cdots(1 - q_M z^{-1}) } { (1 - p_1 z^{-1})(1 - p_2 z^{-1})\cdots(1 - p_N z^{-1})}\$

Where $q_k\$ is the $k^{th}\$ zero and $p_k\$ is the $k^{th}\$ pole. The zeros and poles are commonly complex and when plotted on the complex plane (z-plane) it is called the pole-zero plot.

In addition, there may also exist zeros and poles at $z=0$ and $z=\infty$. If we take these poles and zeros as well as multiple-order zeros and poles into consideration, the number of zeros and poles are always equal.

By factoring the denominator, partial fraction decomposition can be used, which can then be transformed back to the time domain. Doing so would result in the impulse response and the linear constant coefficient difference equation of the system.

### Output response

If such a system $H(z)\$ is driven by a signal $X(z)\$ then the output is $Y(z) = H(z)X(z)\$. By performing partial fraction decomposition on $Y(z)\$ and then taking the inverse Z-transform the output $y[n]\$ can be found. In practice, it is often useful to fractionally decompose $\frac{Y(z)}{z}\$ before multiplying that quantity by $z\$ to generate a form of $Y(z)\$ which has terms with easily computable inverse Z-transforms.

## See also

• Advanced Z-transform
• Star transform
• Bilinear transform
• Finite impulse response
• Formal power series
• Laplace transform
• Laurent series
• Probability-generating function
• Zeta function regularization
• Discrete-time Fourier transform

## Bibliography

• Eliahu Ibrahim Jury, Sampled-Data Control Systems, John Wiley & Sons, 1958.
• Eliahu Ibrahim Jury, Theory and Application of the Z-Transform Method, Krieger Pub Co, 1973. ISBN 0-88275-122-0.
• Refaat El Attar, Lecture notes on Z-Transform, Lulu Press, Morrisville NC, 2005. ISBN 1-4116-1979-X.
• Ogata, Katsuhiko, Discrete Time Control Systems 2nd Ed, Prentice-Hall Inc, 1995, 1987. ISBN 0-13-034281-5.
• Alan V. Oppenheim and Ronald W. Schafer (1999). Discrete-Time Signal Processing, 2nd Edition, Prentice Hall Signal Processing Series. ISBN 0-13-754920-2.
• J. R. Ragazzini and L. A. Zadeh, "The analysis of sampled-data systems," Trans. Am. Inst. Elec. Eng. 71:225-234, 1952.