Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

2065-23

Advanced Training Course on FPGA Design and VHDL for


Hardware Simulation and Synthesis

26 October - 20 November, 2009

Digital Signal Processing


The z-transform

Massimiliano Nolich
DEEI
Facolta' di Ingegneria Universita' degli Studi di Trieste
via Valerio, 10, 34127
Trieste
Italy
The z-transform
See Oppenheim and Schafer, Second Edition pages 94–139, or First Edition
pages 149–201.

1 Introduction

The z-transform of a sequence xŒn is


1
X
n
X.z/ D xŒnz :
nD 1

The z-transform can also be thought of as an operator Zfg that transforms a


sequence to a function:
1
X
n
ZfxŒng D xŒnz D X.z/:
nD 1

In both cases z is a continuous complex variable.


We may obtain the Fourier transform from the z-transform by making the
substitution z D e j! . This corresponds to restricting jzj D 1. Also, with
z D re j! ,
1
X 1
X
j! j! n n j!n
X.re /D xŒn.re / D .xŒnr /e :
nD 1 nD 1

That is, the z-transform is the Fourier transform of the sequence xŒnr n . For
r D 1 this becomes the Fourier transform of xŒn. The Fourier transform
therefore corresponds to the z-transform evaluated on the unit circle:

1
z−plane Im
z D e j!

!
Re

Unit circle

The inherent periodicity in frequency of the Fourier transform is captured


naturally under this interpretation.
The Fourier transform does not converge for all sequences — the infinite sum
may not always be finite. Similarly, the z-transform does not converge for all
sequences or for all values of z. The set of values of z for which the
z-transform converges is called the region of convergence (ROC).
The Fourier transform of xŒn exists if the sum 1
P
nD 1 jxŒnj converges.
However, the z-transform of xŒn is just the Fourier transform of the sequence
xŒnr n . The z-transform therefore exists (or converges) if
1
X
n
X.z/ D jxŒnr j < 1:
nD 1

This leads to the condition


1
X
n
jxŒnjjzj <1
nD 1

for the existence of the z-transform. The ROC therefore consists of a ring in
the z-plane:

2
z−plane Im
Region of
convergence

Re

In specific cases the inner radius of this ring may include the origin, and the
outer radius may extend to infinity. If the ROC includes the unit circle jzj D 1,
then the Fourier transform will converge.
Most useful z-transforms can be expressed in the form
P .z/
X.z/ D ;
Q.z/
where P .z/ and Q.z/ are polynomials in z. The values of z for which
P .z/ D 0 are called the zeros of X.z/, and the values with Q.z/ D 0 are
called the poles. The zeros and poles completely specify X.z/ to within a
multiplicative constant.
Example: right-sided exponential sequence
Consider the signal xŒn D an uŒn. This has the z-transform
1
X 1
X
n n 1 n
X.z/ D a uŒnz D .az / :
nD 1 nD0

Convergence requires that


1
X
1 n
jaz j < 1;
nD0

1
which is only the case if jaz j < 1, or equivalently jzj > jaj. In the ROC, the

3
series converges to
1
X
1 n 1 z
X.z/ D .az / D 1
D ; jzj > jaj;
nD0
1 az z a

since it is just a geometric series. The z-transform has a region of convergence


for any finite value of a.
z−plane Im
unit circle

a
Re
1

The Fourier transform of xŒn only exists if the ROC includes the unit circle,
which requires that jaj < 1. On the other hand, if jaj > 1 then the ROC does
not include the unit circle, and the Fourier transform does not exist. This is
consistent with the fact that for these values of a the sequence an uŒn is
exponentially growing, and the sum therefore does not converge.
Example: left-sided exponential sequence
Now consider the sequence xŒn D an uŒ n 1. This sequence is left-sided
because it is nonzero only for n  1. The z-transform is
1
X X1
n n
X.z/ D a uŒ n 1z D an z n

nD 1 nD 1
1
X 1
X
n n 1
D a z D1 .a z/n :
nD1 nD0

4
1
For ja zj < 1, or jzj < jaj, the series converges to
1 1 z
X.z/ D 1 1z
D 1
D ; jzj < jaj:
1 a 1 az z a
z−plane Im
unit circle

a
Re
1

Note that the expression for the z-transform (and the pole zero plot) is exactly
the same as for the right-handed exponential sequence — only the region of
convergence is different. Specifying the ROC is therefore critical when dealing
with the z-transform.
Example: sum of two exponentials
n n
The signal xŒn D 12 uŒn C 13 uŒn is the sum of two real exponentials.
The z-transform is
1  n  n 
X 1 1
X.z/ D uŒn C uŒn z n
nD 1
2 3
1  n 1  n
X 1 X 1
D uŒnz n C uŒnz n
nD 1
2 nD 1
3
1  1 
1 1 n X 1 1 n
X  
D z C z :
nD0
2 nD0
3

From the example for the right-handed exponential sequence, the first term in
this sum converges for jzj > 1=2, and the second for jzj > 1=3. The combined
transform X.z/ therefore converges in the intersection of these regions, namely

5
when jzj > 1=2. In this case
1
1 1 2z.z 12
/
X.z/ D 1
C D :
1 2
z 1 1 C 31 z 1 .z 1
2
/.z C 1
3
/
The pole-zero plot and region of convergence of the signal is
z−plane Im
unit circle

1
Re
1 1 1
3 12 2

Example: finite length sequence


The signal 8
<a n 0nN 1
xŒn D
:0 otherwise
has z-transform
N
X1 N
X1
X.z/ D an z n
D .az 1 n
/
nD0 nD0

1 .az 1 /N 1 zN aN
D D :
1 az 1 zN 1 z a
Since there are only a finite number of nonzero terms the sum always
converges when az 1 is finite. There are no restrictions on a (jaj < 1), and
the ROC is the entire z-plane with the exception of the origin z D 0 (where the
terms in the sum are infinite). The N roots of the numerator polynomial are at

zk D ae j.2k=N / ; k D 0; 1; : : : ; N 1;

6
since these values satisfy the equation z N D aN . The zero at k D 0 cancels
the pole at z D a, so there are no poles except at the origin, and the zeros are at

zk D ae j.2k=N / ; k D 1; : : : ; N 1:

2 Properties of the region of convergence

The properties of the ROC depend on the nature of the signal. Assuming that
the signal has a finite amplitude and that the z-transform is a rational function:
 The ROC is a ring or disk in the z-plane, centered on the origin
(0  rR < jzj < rL  1).
 The Fourier transform of xŒn converges absolutely if and only if the ROC
of the z-transform includes the unit circle.
 The ROC cannot contain any poles.
 If xŒn is finite duration (ie. zero except on finite interval
1 < N1  n  N2 < 1), then the ROC is the entire z-plane except
perhaps at z D 0 or z D 1.
 If xŒn is a right-sided sequence then the ROC extends outward from the
outermost finite pole to infinity.
 If xŒn is left-sided then the ROC extends inward from the innermost
nonzero pole to z D 0.
 A two-sided sequence (neither left nor right-sided) has a ROC consisting
of a ring in the z-plane, bounded on the interior and exterior by a pole (and
not containing any poles).

 The ROC is a connected region.

7
3 The inverse z-transform
Formally, the inverse z-transform can be performed by evaluating a Cauchy
integral. However, for discrete LTI systems simpler methods are often
sufficient.

3.1 Inspection method

If one is familiar with (or has a table of) common z-transform pairs, the inverse
can be found by inspection. For example, one can invert the z-transform
!
1 1
X.z/ D 1
; jzj > ;
1 2z 1 2

using the z-transform pair


Z 1
an uŒn ! 1
; for jzj > jaj:
1 az
By inspection we recognise that
 n
1
xŒn D uŒn:
2
Also, if X.z/ is a sum of terms then one may be able to do a term-by-term
inversion by inspection, yielding xŒn as a sum of terms.

3.2 Partial fraction expansion

For any rational function we can obtain a partial fraction expansion, and
identify the z-transform of each term. Assume that X.z/ is expressed as a ratio
of polynomials in z 1 :
PM k
kD0 bk z
X.z/ D PN :
a z k
kD0 k

8
It is always possible to factor X.z/ as

b0 M 1
Q
kD1 .1 ck z /
X.z/ D QN ;
a0 kD1 .1 dk z 1/

where the ck ’s and dk ’s are the nonzero zeros and poles of X.z/.
 If M < N and the poles are all first order, then X.z/ can be expressed as
N
X Ak
X.z/ D 1
:
1 dk z
kD1

In this case the coefficients Ak are given by


1
ˇ
Ak D .1 dk z /X.z/ˇzDd
k:

 If M  N and the poles are all first order, then an expansion of the form
M
XN N
r
X Ak
X.z/ D Br z C 1
rD0
1 dk z
kD1

can be used, and the Br ’s be obtained by long division of the numerator by


the denominator. The Ak ’s can be obtained using the same equation as for
M < N.
 The most general form for the partial fraction expansion, which can also
deal with multiple-order poles, is
M
XN N s
r
X Ak X Cm
X.z/ D Br z C 1
C 1 /m
:
rD0
1 dk z mD1
.1 di z
kD1;k¤i

Ways of finding the Cm ’s can be found in most standard DSP texts.


The terms Br z r correspond to shifted and scaled impulse sequences, and
invert to terms of the form Br ıŒn r. The fractional terms
Ak
1 dk z 1

9
correspond to exponential sequences. For these terms the ROC properties must
be used to decide whether the sequences are left-sided or right-sided.
Example: inverse by partial fractions
Consider the sequence xŒn with z-transform
1 C 2z 1 C z 2 .1 C z 1 /2
X.z/ D D ; jzj > 1:
1 23 z 1 C 12 z 2 .1 1
2
z 1 /.1 z 1/

Since M D N D 2 this can be expressed as


A1 A2
X.z/ D B0 C C :
1 12 z 1 1 z 1

The value B0 can be found by long division:

2
1 3
z 2 z 1 2 1

2 2
C1 z C2z C1
2 1
z 3z C2
1
5z 1
so
1
1 C 5z
X.z/ D 2 C 1
:
.1 2
z 1 /.1 z 1/

The coefficients A1 and A2 can be found using


1
ˇ
Ak D .1 dk z /X.z/ˇzDd ;
k

so
1 C 2z 1 C z 2ˇ
ˇ
1C4C4
A1 D ˇ D D 9
1 z 1 ˇ
z 1 D2 1 2
and ˇ
1 2ˇ
1 C 2z C z 1C2C1
A2 D D D 8:
ˇ
1 21 z 1 1=2
ˇ
ˇ 1 D1
z
Therefore
9 8
X.z/ D 2 1
C 1
:
1 2
z 1 1 z

10
Using the fact that the ROC is jzj > 1, the terms can be inverted one at a time
by inspection to give

xŒn D 2ıŒn 9.1=2/n uŒn C 8uŒn:

3.3 Power series expansion

If the z-transform is given as a power series in the form


1
X
n
X.z/ D xŒnz
nD 1

D : : : C xŒ 2z 2 C xŒ 1z 1 C xŒ0 C xŒ1z 1


C xŒ2z 2
C :::;

then any value in the sequence can be found by identifying the coefficient of
the appropriate power of z 1 .
Example: finite-length sequence
The z-transform
1
X.z/ D z 2 .1 z 1
/.1 C z 1
/.1 z 1
/
2
can be multiplied out to give
1 1
X.z/ D z 2 z 1C z 1
:
2 2
By inspection, the corresponding sequence is therefore

ˆ
ˆ 1 nD 2
ˆ
ˆ 1
ˆ
ˆ
< 2
ˆ nD 1
xŒn D 1 nD0
ˆ
1
ˆ
nD1
ˆ
ˆ
ˆ2
ˆ
ˆ
:̂0 otherwise

11
or equivalently
1 1
xŒn D 1ıŒn C 2 ıŒn C 1 1ıŒn C ıŒn 1:
2 2
Example: power series expansion
Consider the z-transform
1
X.z/ D log.1 C az /; jzj > jaj:

Using the power series expansion for log.1 C x/, with jxj < 1, gives
1
X . 1/nC1 an z n
X.z/ D :
nD1
n

The corresponding sequence is therefore


8
<. 1/nC1 an n1
n
xŒn D
:0 n  0:

Example: power series expansion by long division


Consider the transform
1
X.z/ D ; jzj > jaj:
1 az 1
Since the ROC is the exterior of a circle, the sequence is right-sided. We
therefore divide to get a power series in powers of z 1 :
1
1Caz Ca2 z 2
C
1

1 az 1
1
1 az
1
az
1
az a2 z 2

a2 z 2
C
or
1 1
1
D 1 C az C a2 z 2
C  :
1 az

12
Therefore xŒn D an uŒn.
Example: power series expansion for left-sided sequence
Consider instead the z-transform
1
X.z/ D ; jzj < jaj:
1 az 1
Because of the ROC, the sequence is now a left-sided one. Thus we divide to
obtain a series in powers of z:
1 2 2
a z a z 

aCz z
z a 1z2
az 1
Thus xŒn D an uŒ n 1.

4 Properties of the z-transform


In this section, if X.z/ denotes the z-transform of a sequence xŒn and the
ROC of X.z/ is indicated by Rx , then this relationship is indicated as
Z
xŒn !X.z/; ROC D Rx :

Furthermore, with regard to nomenclature, we have two sequences such that


Z
x1 Œn !X1 .z/; ROC D Rx1
Z
x2 Œn !X2 .z/; ROC D Rx2 :

4.1 Linearity

The linearity property is as follows:


Z
ax1 Œn C bx2 Œn !aX1 .z/ C bX2 .z/; ROC containsRx1 \ Rx1 :

13
4.2 Time shifting

The time-shifting property is as follows:


Z n0
xŒn n0  !z X.z/; ROC D Rx :

(The ROC may change by the possible addition or deletion of z D 0 or


z D 1.) This is easily shown:
1
X 1
X
n .mCn0 /
Y .z/ D xŒn n0 z D xŒmz
nD 1 mD 1
1
X
n0 m n0
Dz xŒmz Dz X.z/:
mD 1

Example: shifted exponential sequence


Consider the z-transform
1 1
X.z/ D 1
; jzj > :
z 4
4

From the ROC, this is a right-sided sequence. Rewriting,


!
1
z 1 1 1
X.z/ D D z ; jzj > :
1 14 z 1 1 41 z 1 4

The term in brackets corresponds to an exponential sequence .1=4/n uŒn. The


factor z 1 shifts this sequence one sample to the right. The inverse z-transform
is therefore
xŒn D .1=4/n 1
uŒn 1:
Note that this result could also have been easily obtained using a partial
fraction expansion.

14
4.3 Multiplication by an exponential sequence

The exponential multiplication property is


Z
z0n xŒn !X.z=z0 /; ROC D jz0 jRx ;

where the notation jz0 jRx indicates that the ROC is scaled by jz0 j (that is,
inner and outer radii of the ROC scale by jz0 j). All pole-zero locations are
similarly scaled by a factor z0 : if X.z/ had a pole at z D z1 , then X.z=z0 / will
have a pole at z D z0 z1 .

 If z0 is positive and real, this operation can be interpreted as a shrinking or


expanding of the z-plane — poles and zeros change along radial lines in
the z-plane.
 If z0 is complex with unit magnitude (z0 D e j!0 ) then the scaling
operation corresponds to a rotation in the z-plane by and angle !0 . That is,
the poles and zeros rotate along circles centered on the origin. This can be
interpreted as a shift in the frequency domain, associated with modulation
in the time domain by e j!0 n . If the Fourier transform exists, this becomes
F
e j!0 n xŒn !X.e j.! !0 /
/:

Example: exponential multiplication


The z-transform pair
Z 1
uŒn ! 1
; jzj > 1
1 z
can be used to determine the z-transform of xŒn D r n cos.!0 n/uŒn. Since
cos.!0 n/ D 1=2e j!0 n C 1=2e j!0 n , the signal can be rewritten as
1 j!0 n 1 j!0 n
xŒn D .re / uŒn C .re / uŒn:
2 2

15
From the exponential multiplication property,
1 j!0 n Z 1=2
.re / uŒn ! ; jzj > r
2 1 re j!0 z 1
1 j!0 n Z 1=2
.re / uŒn ! ; jzj > r;
2 1 re j!0 z 1
so
1=2 1=2
X.z/ D C ; jzj > r
1 re j!0 z 1 1 re j!0 z 1

1 r cos !0 z 1
D ; jzj > r:
1 2r cos !0 z 1 C r 2 z 2

4.4 Differentiation

The differentiation property states that


Z dX.z/
nxŒn ! z ; ROC D Rx :
dz
This can be seen as follows: since
1
X
n
X.z/ D xŒnz ;
nD 1

we have
1 1
dX.z/ X
n 1
X
n
z D z . n/xŒnz D nxŒnz D ZfnxŒng:
dz nD 1 nD 1

Example: second order pole


The z-transform of the sequence

xŒn D nan uŒn

can be found using


Z 1
an uŒn ! 1
; jzj > a;
1 az

16
to be
az 1
 
d 1
X.z/ D z 1
D ; jzj > a:
dz 1 az .1 az 1 /2

4.5 Conjugation

This property is
Z
x  Œn !X  .z  /; ROC D Rx :

4.6 Time reversal

Here
Z 1
x  Œ n !X  .1=z  /; ROC D
:
Rx
The notation 1=Rx means that the ROC is inverted, so if Rx is the set of values
such that rR < jzj < rL , then the ROC is the set of values of z such that
1=rl < jzj < 1=rR .
Example: time-reversed exponential sequence
The signal xŒn D a n uŒ n is a time-reversed version of an uŒn. The
z-transform is therefore
1 a 1z 1 1
X.z/ D D ; jzj < ja j:
1 az 1 a 1z 1

4.7 Convolution

This property states that


Z
x1 Œn  x2 Œn !X1 .z/X2 .z/; ROC containsRx1 \ Rx2 :

17
Example: evaluating a convolution using the z-transform
The z-transforms of the signals x1 Œn D an uŒn and x2 Œn D uŒn are
1
X 1
X1 .z/ D an z n
D 1
; jzj > jaj
nD0
1 az

and
1
X
n 1
X2 .z/ D z D 1
; jzj > 1:
nD0
1 z
For jaj < 1, the z-transform of the convolution yŒn D x1 Œn  x2 Œn is
1 z2
Y .z/ D D ; jzj > 1:
.1 az 1 /.1 z 1/ .z a/.z 1/
Using a partial fraction expansion,
 
1 1 a
Y .z/ D 1 1
; jzj > 1;
1 a 1 z 1 az
so
1
yŒn D .uŒn anC1 uŒn/:
1 a

4.8 Initial value theorem

If xŒn is zero for n < 0, then

xŒ0 D lim X.z/:


z!1

18
Some common z-transform pairs are:

Sequence Transform ROC


ıŒn 1 All z
1
uŒn 1 z 1
jzj > 1
1
uŒ n 1 1 z 1
jzj < 1
m
ıŒn m z All z except 0 or 1
1
an uŒn 1 az 1
jzj > jaj
1
an uŒ n 1 1 az 1
jzj < jaj
az 1
nan uŒn .1 az 1 /2
jzj > jaj
az 1
nan uŒ n 1 .1 az 1 /2
jzj < jaj
8
<an 0nN 1; 1 aN z N
1 az 1 jzj > 0
:0 otherwise
1 cos.!0 /z 1
cos.!0 n/uŒn 1 2 cos.!0 /z 1 Cz 2
jzj > 1
1 r cos.!0 /z 1
r n cos.!0 n/uŒn 1 2r cos.!0 /z 1 Cr 2 z 2 jzj > r

4.9 Relationship with the Laplace transform

Continuous-time systems and signals are usually described by the Laplace


transform. Letting z D e sT , where s is the complex Laplace variable

s D d C j!;

we have
z D e .d Cj!/T D e d T e j!T :
Therefore

jzj D e d T and ^z D !T D 2f =fs D 2!=!s ;

19
where !s is the sampling frequency. As ! varies from 1 to 1, the s-plane is
mapped to the z-plane:
 The j! axis in the s-plane is mapped to the unit circle in the z-plane.
 The left-hand s-plane is mapped to the inside of the unit circle.
 The right-hand s-plane maps to the outside of the unit circle.

20

You might also like