You are on page 1of 28

LUT/Laboratory of Applied Mathematics/PL

The Z Transform
In the Z transform our focus is in the discrete-(time)
processes. With the advent of fast and cheap digital computers, there has been renewed emphasis on the analysis
and design of digital systems, which represent a major
class of engineering systems. Digital systems operate on
digital signals, which are usually generated by sampling a
continuous-time signal, that is, a signal defined for every
instant of a possibly infinite time interval. The sampling
takes place so that a digital sequence is generated. After
processing by a computer, the output digital signal may
be used to construct a new continuous-time signal, perhaps by the use of a zero-order hold device, and this in
turn might be used to control a plant or process. Digital
signal processing devices have made a major impact in
many areas of engineering, as well as in the home.
Laplace transform was a valuable aid in the analysis
of continuous-time systems, and z-transform will perform
the same task for discrete-time systems.
Since z transforms relate to sequences, we first review
the notation associated with sequences. A finite sequence
{xk }n0 is an ordered set of n + 1 real or complex numbers:

{xk }n0 = {x0, x1, x2, ..., xn}


Note that the set of numbers is ordered so that position
in the sequence is important. The position is identified
by the position index k, where k is an integer. If the
number of elements in the set is infinite then this leads
to the infinite sequence:
{xk }
0 = {x0 , x1 , x2 , ...}
When dealing with sampled functions of time t, it is
necessary to have a means of allowing for t < 0. To do
this, we allow the sequence of numbers to extend to infinity on both sides of the initial position x0, and write
{xk }
= {..., x2 , x1 , x0 , x1 , x2 , ...}
Sequences {xk }
for which xk = 0 (k < 0) are called
causal sequences, by analogy with continuous-time
causal functions f (t)H(t) (where H(t) = 1, where t 0
and zero elsewhere).
While for some finite sequences it is possible to specify
the sequence by listing all the elements of the set, it is
normally the case that a sequence is specified by giving a
formula for its general element xk .

The Z transform of a sequence {xk }


is defined in
general as

Z{xk }

X
xk
= X(z) =
zk

(1)

k=

Whenever the sum exists and where z is a complex


variable, as yet undefined.
The process of taking the z transform of a sequence
thus produces a function of a complex variable z, whose
form depends upon the sequence itself. The symbol Z
denotes the z-transform operator; when it operates
on a sequence {xk } it transforms the latter into the function X(z) of the complex variable z. It is usual to refer to
{xk }, X(z) as a z-transform pair, which is sometimes
written as {xk } X(z).
For sequences {xk }
that are causal, that is
xk = 0, (k < 0)
the z transform given in (1) reduces to

Z{xk }
0

= X(z) =

X
xk
k=0

zk

(2)

In this course we will be concerned with causal sequences.


Example 1. Determine Z-transform of the series (xk ) =
(1, 1, 1, . . .).
Example 2. Determine the z-transform of the sequence

{xk } = {2k } k 0
Z-transform of a sequence {ak } where a is a real or
complex constant is
Z{ak } =

X
ak
k=0

zk

1
z
=
(|z| > |a|) (3)
1 a/z z a

Example 3. Determine the Z transform of {xk } = ( 12 )k


Example 4. Find the Z-transform of the sequence {2k} =
{0, 2, 4, 6, 8, ...}.
A sequence of particular importance is the unit pulse
or impulse sequence:

{k } = {1} = {1, 0, 0, 0, ...}


It follows directly from (3) that
4

Z{k } =

1
=1
z0

Sampling
Sequences are often generated in engineering applications through the sampling of continuous-time signals,
described by functions f (t) of a continuous-time variable
t.
A continuous-time signal f (t) is sampled instantaneously
at uniform intervals T , the sampling interval. The sampling process generates the sequence:
{f (kT )} = {f (0), f (T ), f (2T ), ...}
When we take the Z-transform of the sequence we get:

Z{f (kT )} =

X
f (kT )
k=0

zk

when ever the series converges.


Example 5. The signal f (t) = etH(t) is sampled at
intervals T . What is the Z-transform of the resulting
sequence?
5

Properties of the Z - transform


The linearity property:
As for Laplace transforms, a fundamental property of
the Z transform is its linearity:
If {xk } and {yk } are sequences having z transforms
X(z) and Y (z) respectively and if and are any constants, real or complex then

Z{xk + yk } = Z{xk } + Z{yk } = X(z) + Y (z)


Example 6. The continuous-time function f (t) = cos wt,
where w is a constant, is sampled at intervals T , to generate the sequence {cos kwT }. Find the Z transform of
the sequence.
The first shift property (delaying)
We consider a delayed version of the sequence {xk },
denoted by {yk }, with
yk = xkk0
Here k0 is the number of steps in the delay; for example, if k0 = 2 then yk = xk2
6

Thus the sequence {yk } is simply the sequence {xk }


moved backward, or delayed by two steps.
For example if (xk ) = (4, 5, 7, 11, ...), then (xk2) =
(0, 0, 4, 5, 7, 11, ...). So, the sequence is delayed by k0 = 2
steps. Or another example (k4) = (0, 0, 0, 0, 1, 0, 0, 0, ...),
unit pulse has been delayd by four steps.
First shifting property of z transforms:
1
Z{xk }
(4)
z k0
Example 7. Find the Z-transform of the sequence {0, 0, 1, 3, 9, 27, ...}
Z{xkk0 } =

Example 8. Find the Z-transform of {0, 0, 0, 0, 1, 0, 0, ...}


Example 9. Find the Z-transform of {0, 1, 1, 1, 1, ...}
Example 10. Sequence is of form {xk } = ( 12 )k , (k
0). Determine the Z-transform of the shifted sequence
{xk2}

The second shift property


First we consider a single-step advance. If {yk } is the
single-step advanced version of the sequence {xk } then
{yk } is generated by

yk = xk+1
Z-transform for {yk } is

Z{xk+1} = zX(z) zx0

(5)

In a similar manner for a two-step advanced sequence


{xk+2} we have

Z{xk+2} = z 2X(z) z 2x0 zx1

(6)

Note the similar structure of these equations and Laplace


transforms first and second derivatives! In general for a
k0-step advanced sequence {xk+k0 }
Z{xk+k0 } = z k0 X(z)

kX
0 1

xnz kon

n=0

As an example, say we have the sequence


{xk } = {3, 6, 12, 24, ...}
8

(7)

then the first advance of this is the sequence


{xk+1} = {6, 12, 24, 48, ...}
and the second advance is
{xk+2} = {12, 24, 48, 96, ...}
The second shift theorem tells us that
Z{xk+1} = zX(z) zx0
Z{xk+2} = z 2X(z) z 2x0 zx1
Thus, considering the example with {xk } = {3, 6, 12, 24, ...}
above, we have
X(z) = Z{xk } = 3Z{1, 2, 4, 8} =
now,

3z
z2

3z 2 3z 2 6z
6z
3z 2
Z{xk+1} = zX(z)zx0 =
3z =

=
z2
z2
z2
z2
and
3z 3
Z{xk+2} = z X(z) z x0 zx1 =
3z 2 6z
z2
2

3z 3 3z 3 + 6z 2 6z 2 + 12z
12z
=
=
z2
z2
9

Some further properties:


Multiplication by ak
If Z{xk } = X(z) then for a constant a
Z{ak xk } = X(a1z)

(8)

Multiplication by k n
If Z{xk } = X(z) then for a positive integer n
d n
) X(z)
(9)
dz
(First differentiate with respect to z and then multiply by z. Raising to the power of n means repeat
the operation n times.)
Z{k nxk } = (z

Initial-value theorem
If {xk } is a sequence with z transform X(z) then the
initial-value theorem states that

lim X(z) = x0

Final-value theorem

10

If {xk } is a sequence with z transform X(z) then the


final-value theorem states that

lim xk = lim (1 z 1)X(z)

k1

provided that the poles of (1 z 1)X(z) are inside


the unit circle.

11

{xk }
xk = 1
xk = ak
xk = k
xk = kak1
xk = ekT
xk = cos kwT
xk = sin kwT

Table 1: Short table of z transforms


Z{xk }
Region of existence
z
|z| > 1
z1
z
|z| > |a|
za
z
|z| > 1
(z1)2
z
|z| > a
(za)2
z
|z| > eT
zeT
z(zcos wt)
|z| > 1
z 2 2z cos wt+1
(z sin wt)
|z| > 1
z 2 2z cos wt+1

xk =

1
0

(k = 0)
(k > 0)

Z{xk } = 1 All z.

12

The Inverse Z transform


Here we consider the problem of recovering a causal
sequence {xk } from knowledge of its Z transform X(z).
Formally the symbol Z 1[X(z)] denotes a causal sequence {xk } whose Z transform is X(z); that is,
if Z{xk } = X(z) then {xk } = Z 1[X(z)]
The most obvious way of finding the inverse transform
of X(z) is to make use of a table of transforms.
Sometimes it is possible to write down the inverse transform directly from the table, but often it is first necessary to carry out some algebraic manipulation on X(z).
In particular, we frequently need to determine the inverse
transform of a rational expression of the form P (z)/Q(z),
where P (z) and Q(z) are polynomials in z. In such cases
the procedure, as for Laplace transforms, is first to resolve
the expression, or a revised form of the expression, into
partial fractions and then to use the table of transforms.
Example 11. Find

Z 1

z
z2

Example 12. Find


13


Z 1

z
(z 1)(z 2)

Example 13. Find

Z 1

2z + 1
(z + 1)(z 3)

Example 14. Find inverse Z-transform of


z
z 2 + a2
where a is a real constant.
Y (z) =

14

Discrete-time systems and difference equations


The main use for Z-transforms is solving difference
equations. An example of difference equation is
xk+2 xk+1 2xk = 0
with x0 = 0 and x1 = 1. This is called a two-step difference equation because it relates xk+2 to the two terms
below it in sequence, xk+1 and xk . We can work the sequence out term by term. With k = 0 we have
x2 x1 2x0 = 0
inserting x0 = 0 and x1 = 1 we get that x2 = 1.
Next, with k = 1 the difference equation is
x3 x2 2x1 = 0
and we know x2 = 1 and x1 = 1, therefore x3 = 3, and
so on with k = 2 we get that x4 = 5.
So far we have worked out that the sequence start
off (0, 1, 1, 3, 5, ...). What we really want is to be able
to write xk in terms of k, we can do this using the Ztransform.

15

First, we take the Z-transform of both sides of the


equation
Z{xk+2} Z{xk+1} 2Z{xk } = 0
Using advancing theorem this means
z 2X z 2x0 zx1 zX zx0 2X = 0
inserting x0 = 0 and x1 = 1
z 2X z zX 2X = 0
or
z
z2 z 2
Now that we know X = Z{(xk )} we want to find xk .
To do this we use partial fractions on the right hand side.
z
we see that
Recalling the basic Z-transform Z{ak } = za
we want a z on the top after the partial fractions expansion has been done. If we did a partial fraction expansion
on z/(z 2 z 2) we would end up with something that
has no z on top of the fractions. To avoid this we move
the z over to the left hand side:
X=

X
1
= 2
z
z z2
and then write
16

1
1
A
B
=
=
+
z 2 z 2 (z 2)(z + 1) z 2 z + 1
Multiplying across 1 = A(z + 1) + B(z 2). z = 2
gives A = 1/3 and z = 1 gives B = 1/3. Now
X
1
1
1
= 2
=

z
z z 2 3(z 2) 3(z + 1)
so
X=

z
z

3(z 2) 3(z + 1)

and hence
1
1
xk = 2k (1)k
3
3
Example 15. Suppose that a sequence of observations {xk } is being recorded and we receive observation {xk } at (time)step k. We might attempt to
process this sequence of observations {xk } using the
discrete-time feedback system (like in figure). At time
step k the observation {xk } enters the system as an
input, and, after combination with the feedback signal at the summing junction S, proceeds tot the block
labelled D. This block is a unit delay block, and its
function is to hold its input signal until the clock
advances one step, to step k + 1. At this time the input signal is passed without alteration to become the
17

signal {yk+1}, the (k + 1)th member of the output sequence {yk }. At the same time this signal is fed back
through a scaling block of amplitude to the summing
junction S. This process is instantaneous, and at S
the feed back signal is substracted from the next input observation {xk } to provide the next input to the
delay block D. the process then repeats at each clock
step.
To analyse the system, let {rk } denote the sequence
of input signals to D; then owing to the delay action
of D, we have:
yk+1 = rk
Also, owing to the feedback action,
rk = xk yk
where is the feedback gain. Combining the two
expressions gives
yk+1 = xk yk
or

yk+1 + yk = xk
18

(10)

Equation (10) is an example of a first-order difference equation, and it relates adjacent members of the
sequence {yk } to each other and to the input sequence
{xk } as well as, in this case, the feedback gain .
Example 16. Solve the difference equation
8Yk+2 6Yk+1 + Yk = 9
given that Y0 = 1 and Y1 =

3
2

Z tranfer function
Let us consider the general linear constant-coefficient
difference equation model for a linear time-invariant system, with input sequence {uk } and output sequence {yk }.
Both {yk } and {uk } are causal sequences. Such a difference equation model takes the form

anYk+n+an1Yk+n1+...+a0yk = bmuk+m+bm1uk+m1+...+b0uk
(11)
where k 0 and n,m, are positive integers with(n
m). Assuming the system to be initially in a quiecent
state, we take z transforms to give

19

(anz n+an1z n1+...+a0)Y (z) = (bmz m+bm1z m1+...+b0)U (z)


(12)
where Y (z) = Z{yk } and U (z) = Z{uk }. The system
discrete or z tranfer function G(z) is defined as

Y (z) (bmz m + bm1z m1 + ... + b0)


G(z) =
=
(13)
U (z)
(anz n + an1z n1 + ... + a0)
and is normally rearranged (by dividing numerator and
denominator by an) so that the coefficient of z n in the
denominator is 1.
On writing P (z) = (bmz m + bm1z m1 + ... + b0),
Q(z) = (anz n + an1z n1 + ... + a0), the discrete transfer
function may be expressed as
P (z)
Q(z)
The equation Q(z) = 0 is called the characteristic
equation of the discrete system, its order, n, determines
the order of the system, and its roots are refered to as the
poles of the discrete transfer function. Likewise, the roots
of P (z) = 0 are referred to as the zeros of the discrete
transfer function.
G(z) =

20

The impulse response


Consider the sequence
{k } = {1, 0, 0, ...}
Z transform of this sequence is Z{k } = 1. The sequence is called the impulse sequence. Consider a
system with transfer function G(z), so that the z transform Y (z) of the output sequence {yk } corresponds to
an input sequence {uk }. G(z) = Y (z)/U (z). If the input sequence {uk } is the impulse sequence {k } then the
output sequence {yk } is called the impulse response of
the system. Hence
Z{yk } = Y (z) = G(z)
That is, the z transfer function of the system is the Z
transform of the impulse response!
Y (z) = Y (z)U (z)
Example 17. Find the impulse response of the system
with Z tranfer function
G(z) =

z
z 2 + 3z + 2
21

Stability:
A linear constant-coefficient discrete-time system with
transfer function G(z) is stable if and only if all the poles
of G(z) lie within the unit circle |z| < 1 in the complex z
plane. If one or more poles lie outside this unit circle then
the system is unstable. If one or more distinct poles lie
on the unit circle |z| = 1, with all the other poles inside,
then the system is said to be marginally stable.
Example 18. Which of the following systems, specified
by their transfer function G(z), are stable?
a)
1
G(z) =
z + 0.75
b)
z
G(z) = 2
z z + 0.5
c)
z2
G(z) = 3
z 3z 2 + 2.5z 1

22

Convolution
Suppose that a linear discrete-time time-invariant system has impulse response sequence {yk }, and suppose
that we wish to find the system response {yk } to an input sequence {uk }. First we express the input sequence
{uk } = {u0, u1, u2, ...}
as
{uk } = {u0{k }, u1{k1}, u2{k2}, ...}
where

kj = {

0 if k =
6 j
1 if k = j

In other words kj is simply an impulse sequence with


the pulse shifted to k = j. Now the input sequence {uk }
is a weighted sum of shifted impulse sequences. By summing the sequences we get

{yk } =

uj {ykj }

(14)

j=0

The h : th term of the output sequence is determined


23

by

yh =

h
X

uj yhj

(15)

j=0

That is
k
X
uj ykj }
{yk } = {

(16)

j=0

(15) is called the convolution sum. We have explored the time-domain input-output relationship for a
linear system, and now we proceed to link this approach
with our work in the transform domain.
By definition

U (z) =

uk z k

(17)

yk z k

(18)

j=0

Y (z) =

X
j=0

so

24

Y (z)U (z) = u0y0 + (u0y1 + u1y0 )1/z...


Consider the kth term. We see that the coefficient of
z k is simply
k
X

uj ykj

j=0

Since Y (z) = Y (z)U (z), this is also y(k).


k
X
{yk } = {
uj ykj }
j=0

We have thus shown that the time-domain and trasformdomain approaches are equivalent, and in passing, we
have established the z transform of the convolution sum
as

Z{

k
X

uj vkj } = U (z)V (z)

j=0

where Z{uk } = U (z), Z{vk } = V (z).


Example 19. A system has Z transfer function

25

z
z + 1/2
What is the system step response?
G(z) =

26

The relationship between Laplace and Z transforms


Consider the samples taken at uniform intervals T from
the continuous-time signal f (t):
{f (nT )} = {f (0), f (T ), f (2T ), ...}
An alternative way of representing the sampled function is to define the continuous-time sampled version of
f (t) as f(t) where
P
P
f(t) =
f
(t)(t

nT
)
=
n=0
n=0 f (nT )(t nT )
Taking the Laplace transform of f(t), we have
Z
L{f(t)} =

L{f(t)} =

f (kT )(t kT )]estdt

(19)

n=0

f (kT )

n=0

(t kT )estdt

(20)

giving

L{f(t)} =

X
n=0
27

f (kT )eksT

(21)

Making the change of variable z = esT leads to the


result:
L{f(t)} =

f (kT )z 1 = F (z)

(22)

k=0

Where F (z) denotes the z transform of the sequence


{f (kT )}. We can therefore view the z transform of a sequence of samples in discrete time as the Laplace transform of the continuous-time sampled function f(t) with
an appropriate change of variables
z = esT or s = T1 lnz

28

You might also like