WB21 All
WB21 All
WB21 All
HELM
Contacts:
Post:
HELM,
Mathematics
Education
Centre,
Loughborough
University,
Loughborough,
LE11
3TU.
Email:
helm@lboro.ac.uk
Web:
http://helm.lboro.ac.uk
Contents 21
z-Transforms
21.1 The z-Transform 2
Learning outcomes
In this Workbook you will learn about the properties and applications of the z-transform,
a major mathematical tool for the analysis and design of discrete systems including digital
control systems.
Introduction
The z-transform is the major mathematical tool for analysis in such topics as digital control and
digital signal processing. In this introductory Section we lay the foundations of the subject by briefly
discussing sequences, shifting of sequences and difference equations. Readers familiar with these
topics can proceed directly to Section 21.2 where z-transforms are first introduced.
2 HELM (2015):
Workbook 21: z-Transforms
®
Sequences
A sequence is a set of numbers formed according to some definite rule. For example the sequence
{1, 4, 9, 16, 25, . . .} (1)
is formed by the squares of the positive integers.
If we write
y1 = 1, y2 = 4, y3 = 9, . . .
then the general or n th term of the sequence (1) is yn = n2 . The notations y(n) and y[n] are
also used sometimes to denote the general term. The notation {yn } is used as an abbreviation for a
whole sequence.
An alternative way of considering a sequence is to view it as being obtained by sampling a continuous
function. In the above example the sequence of squares can be regarded as being obtained from the
function
y(t) = t2
by sampling the function at t = 1, 2, 3, . . . as shown in Figure 1.
y = t2
9
1 t
1 2 3
Figure 1
The notation y(n), as opposed to yn , for the general term of a sequence emphasizes this sampling
aspect.
Task
Find the general term of the sequence {2, 4, 8, 16, 32, . . .}.
Your solution
Answer
The terms of the sequence are the integer powers of 2: y1 = 2 = 21 y2 = 4 = 2 2
y3 = 8 = 23 . . . so yn = 2n .
HELM (2015): 3
Section 21.1: The z-Transform
Here the sequence {2n } are the sample values of the continuous function y(t) = 2t at t = 1, 2, 3, . . .
An alternative way of defining a sequence is as follows:
(i) give the first term y1 of the sequence
(ii) give the rule for obtaining the (n + 1)th term from the nth .
A simple example is
yn+1 = yn + d y1 = a
where a and d are constants.
It is straightforward to obtain an expression for yn in terms of n as follows:
y2 = y1 + d = a + d
y3 = y2 + d = a + d + d = a + 2d
y4 = y3 + d = a + 3d
.. (2)
.
yn = a + (n − 1)d
Task
Calculate the nth term of the arithmetic sequence defined by
yn+1 − yn = 2 y1 = 9.
Write out the first 4 terms of this sequence explicitly.
Suggest why an arithmetic sequence is also known as a linear sequence.
Your solution
4 HELM (2015):
Workbook 21: z-Transforms
®
Answer
We have, using (2),
yn = 9 + (n − 1)2 or
yn = 2n + 7
so y1 = 9 (as given), y2 = 11, y3 = 13, y4 = 15, . . .
A graph of yn against n would be just a set of points but all lie on the straight line y = 2x + 7,
hence the term ‘linear sequence’.
yn
y(x) = 2x + 7
13
11
9
n
1 2 3
Nomenclature
The equation
yn+1 − yn = d (3)
is called a difference equation or recurrence equation or more specifically a first order, constant
coefficient, linear, difference equation.
The sequence whose nth term is
yn = a + (n − 1)d (4)
is the solution of (3) for the initial condition y1 = a.
The coefficients in (3) are the numbers preceding the terms yn+1 and yn so are 1 and −1 respectively.
The classification first order for the difference equation (3) follows because the difference between
the highest and lowest subscripts is n + 1 − n = 1.
Now consider again the sequence
{yn } = {2n }
Clearly
yn+1 − yn = 2n+1 − 2n = 2n
so the difference here is dependent on n i.e. is not constant. Hence the sequence {2n } = {2, 4, 8, . . .}
is not an arithmetic sequence.
HELM (2015): 5
Section 21.1: The z-Transform
Task
For the sequence {yn } = 2n calculate yn+1 − 2yn . Hence write down a difference
equation and initial condition for which {2n } is the solution.
Your solution
Answer
yn+1 − 2yn = 2n+1 − 2 × 2n = 2n+1 − 2n+1 = 0
The term ‘homogeneous’ refers to the fact that the right-hand side of the difference equation (5) is
zero.
6 HELM (2015):
Workbook 21: z-Transforms
®
Task
What additional information is needed if (6) is to be solved?
Your solution
Answer
Two initial conditions, the values of y1 and y2 must be specified so we can calculate
y3 = y2 + y1
y4 = y3 + y2
and so on.
Task
Find the first 6 terms of the solution sequence of (6) for each of the following sets
of initial conditions
(a) y1 = 1 y2 = 3
(b) y1 = 1 y2 = 1
Your solution
Answer
(a) {1, 3, 4, 7, 11, 18 . . .}
(b) {1, 1, 2, 3, 5, 8, . . .} (7)
The sequence (7) is a very famous one; it is known as the Fibonacci Sequence. It follows that the
solution sequence of the difference equation (6)
yn+2 = yn+1 + yn
with initial conditions y1 = y2 = 1 is the Fibonacci sequence. What is not so obvious is what is the
general term yn of this sequence.
One way of obtaining yn in this case, and for many other linear constant coefficient difference
equations, is via a technique involving Z−transforms which we shall introduce shortly.
HELM (2015): 7
Section 21.1: The z-Transform
Shifting of sequences
Right Shift
Recall the sequence {yn } = {n2 } or, writing out the first few terms explicitly,
{yn } = {1, 4, 9, 16, 25, . . .}
The sequence {vn } = {0, 1, 4, 9, 16, 25, . . .} contains the same numbers as yn but they are all
shifted one place to the right. The general term of this shifted sequence is
vn = (n − 1)2 n = 1, 2, 3, . . .
Similarly the sequence
{wn } = {0, 0, 1, 4, 9, 16, 25, . . .}
has general term
(n − 2)2 n = 2, 3, . . .
wn =
0 n=1
Task
For the sequence {yn } = {2n } = {2, 4, 8, 16, . . . } write out explicitly the first 6
terms and the general terms of the sequences vn and wn obtained respectively by
shifting the terms of {yn }
(a) one place to the right (b) three places the the right.
Your solution
Answer
(a)
2n−1 n = 2, 3, 4, . . .
{vn } = {0, 2, 4, 8, 16, 32 . . .} vn =
0 n=1
(b)
2n−3 n = 4, 5, 6, . . .
{wn } = {0, 0, 0, 2, 4, 8 . . .} wn =
0 n = 1, 2, 3
8 HELM (2015):
Workbook 21: z-Transforms
®
The operation of shifting the terms of a sequence is an important one in digital signal processing and
digital control. We shall have more to say about this later. For the moment we just note that in a
digital system a right shift can be produced by delay unit denoted symbolically as follows:
{yn } {yn−1 }
−1
z
Figure 2
A shift of 2 units to the right could be produced by 2 such delay units in series:
Figure 3
(The significance of writing z −1 will emerge later when we have studied z−transforms.)
Left Shift
Suppose we again consider the sequence of squares
{yn } = {1, 4, 9, 16, 25, . . .}
with yn = n2 .
Shifting all the numbers one place to the left (or advancing the sequence) means that the sequence
{vn } generated has terms
v0 = y1 = 1 v1 = y2 = 4 v2 = y 3 = 9 . . .
and so has general term
vn = (n + 1)2 n = 0, 1, 2, . . .
= yn+1
Notice here the appearance of the zero subscript for the first time.
Shifting the terms of {vn } one place to the left or equivalently the terms of {yn } two places to the
left generates a sequence {wn } where
w−1 = v0 = y1 = 1 w0 = v1 = y2 = 4
and so on.
The general term is
wn = (n + 2)2 n = −1, 0, 1, 2, . . .
= yn+2
HELM (2015): 9
Section 21.1: The z-Transform
Task
If {yn } = {1, 1, 2, 3, 5, . . .} n = 1, 2, 3, . . . is the Fibonacci sequence, write out
the terms of the sequences {yn+1 }, {yn+2 }.
Your solution
Answer
yn+1 = {1, 1, 2, 3, 5, . . .} where y0 = 1 (arrowed), y1 = 1, y2 = 2, . . .
↑
It should be clear from this discussion of left shifted sequences that the simpler idea of a sequence
‘beginning’ at n = 1 and containing only terms y1 , y2 , . . . has to be modified.
We should instead think of a sequence as two-sided i.e. {yn } defined for all integer values of n and
zero. In writing out the ‘middle’ terms of a two sided sequence it is convenient to show by an arrow
the term y0 .
For example the sequence {yn } = {n2 } n = 0, ±1, ±2, . . . could be written
{. . . 9, 4, 1, 0, 1, 4, 9, . . .}
↑
A sequence which is zero for negative integers n is sometimes called a causal sequence.
For example the sequence, denoted by {un },
0 n = −1, −2, −3, . . .
un =
1 n = 0, 1, 2, 3, . . .
is causal. Figure 4 makes it clear why {un } is called the unit step sequence.
un
−3 −2 −1 0 1 2 n
Figure 4
The ‘curly bracket’ notation for the unit step sequence with the n = 0 term arrowed is
{un } = {. . . , 0, 0, 0, 1, 1, 1, . . .}
↑
10 HELM (2015):
Workbook 21: z-Transforms
®
Task
Draw graphs of the sequences {un−1 }, {un−2 }, {un+1 } where {un } is the
unit step sequence.
Your solution
Answer
un−1
n
−3 −2 −1 0 1 2 3
un−2
n
−3 −2 −1 0 1 2 3
un+1
n
−3 −2 −1 0 1 2
HELM (2015): 11
Section 21.1: The z-Transform
Basics of z-Transform
Theory 21.2
Introduction
In this Section, which is absolutely fundamental, we define what is meant by the z-transform of a
sequence. We then obtain the z-transform of some important sequences and discuss useful properties
of the transform.
Most of the results obtained are tabulated at the end of the Section.
The z-transform is the major mathematical tool for analysis in such areas as digital control and digital
signal processing.
' $
• understand sigma (Σ) notation for
summations
12 HELM (2015):
Workbook 21: z-Transforms
®
1. The z-transform
If you have studied the Laplace transform either in a Mathematics course for Engineers and Scientists
or have applied it in, for example, an analog control course you may recall that
The z-transform plays a similar role for discrete systems, i.e. ones where sequences are involved, to
that played by the Laplace transform for systems where the basic variable t is continuous. Specifically:
Key Point 1
Definition:
For a sequence {yn } the z-transform denoted by Y (z) is given by the infinite series
∞
X
Y (z) = y0 + y1 z −1
+ y2 z −2
+ ... = yn z −n (1)
n=0
Notes:
1. The z-transform only involves the terms yn , n = 0, 1, 2, . . . of the sequence. Terms y−1 , y−2 , . . .
whether zero or non-zero, are not involved.
2. The infinite series in (1) must converge for Y (z) to be defined as a precise function of z.
We shall discuss this point further with specific examples shortly.
3. The precise significance of the quantity (strictly the ‘variable’) z need not concern us except
to note that it is complex and, unlike n, is continuous.
Key Point 2
We use the notation Z{yn } = Y (z) to mean that the z-transform of the sequence {yn } is Y (z).
HELM (2015): 13
Section 21.2: Basics of z-Transform Theory
Less strictly one might write Zyn = Y (z). Some texts use the notation yn ↔ Y (z) to denote that
(the sequence) yn and (the function) Y (z) form a z-transform pair.
We shall also call {yn } the inverse z-transform of Y (z) and write symbolically
{yn } = Z−1 Y (z).
Z{δn } = 1 + 0z −1 + 0z −2 + . . .
= 1
If the single non-zero value is other than at n = 0 the calculation of the z-transform is equally simple.
For example,
1 n=3
δn−3 =
0 otherwise
From (1) we obtain
Z{δn−3 } = 0 + 0z −1 + 0z −2 + z −3 + 0z −4 + . . .
= z −3
Task
Write down the definition of δn−m where m is any positive integer and obtain its
z-transform.
Your solution
Answer
1 n=m
δn−m = Z{δn−m } = z −m
0 otherwise
14 HELM (2015):
Workbook 21: z-Transforms
®
Key Point 3
Z{δn−m } = z −m m = 0, 1, 2, . . .
SN = 1 + z −1 + . . . + z −(N −1)
1 − z −N
=
1 − z −1
1
As N → ∞ SN → provided |z −1 | < 1
1 − z −1
Hence, in what is called the closed form of this z-transform we have the result given in the following
Key Point:
Key Point 4
1 z
Z{un } = = ≡ U (z) say, |z −1 | < 1
1 − z −1 z−1
The restriction that this result is only valid if |z −1 | < 1 or, equivalently |z| > 1 means that the
position of the complex quantity z must lie outside the circle centre origin and of unit radius in an
Argand diagram. This restriction is not too significant in elementary applications of the z-transform.
HELM (2015): 15
Section 21.2: Basics of z-Transform Theory
The geometric sequence {an}
Task
For any arbitrary constant a obtain the z-transform of the causal sequence
0 n = −1, −2, −3, . . .
fn = n
a n = 0, 1, 2, 3, . . .
Your solution
Answer
We have, by the definition in Key Point 1,
F (z) = Z{fn } = 1 + az −1 + a2 z −2 + . . .
which is a geometric series with common ratio az −1 . Hence, provided |az −1 | < 1, the closed form
of the z-transform is
1 z
F (z) = = .
1 − az −1 z−a
The z-transform of this sequence {an }, which is itself a geometric sequence is summarized in Key
Point 5.
Key Point 5
1 z
Z{an } = −1
= |z| > |a|.
1 − az z−a
Notice that if a = 1 we recover the result for the z-transform of the unit step sequence.
16 HELM (2015):
Workbook 21: z-Transforms
®
Task
Use Key Point 5 to write down the z-transform of the following causal sequences
(a) 2n
(b) (−1)n , the unit alternating sequence
(c) e−n
(d) e−αn where α is a constant.
Your solution
Answer
1 z
(a) Using a = 2 Z{2n } = = |z| > 2
1 − 2z −1 z−2
1 z
(b) Using a = −1 Z{(−1)n } = −1
= |z| > 1
1+z z+1
z
(c) Using a = e−1 Z{e−n } = |z| > e−1
z − e−1
z
(d) Using a = e−α Z{e−αn } = |z| > e−α
z − e−α
The basic z-transforms obtained have all been straightforwardly found from the definition in Key Point
1. To obtain further useful results we need a knowledge of some of the properties of z-transforms.
HELM (2015): 17
Section 21.2: Basics of z-Transform Theory
3. Linearity property and applications
Linearity property
This simple property states that if {vn } and {wn } have z-transforms V (z) and W (z) respectively
then
Z{avn + bwn } = aV (z) + bW (z)
for any constants a and b.
(In particular if a = b = 1 this property tells us that adding sequences corresponds to adding their
z-transforms).
The proof of the linearity property is straightforward using obvious properties of the summation
operation. By the z-transform definition:
∞
X
Z{avn + bwn } = (avn + bwn )z −n
n=0
∞
X
= (avn z −n + bwn z −n )
n=0
∞
X ∞
X
= a vn z −n + b wn z −n
n=0 n=0
= aV (z) + bV (z)
We can now use the linearity property and the exponential sequence {e−αn } to obtain the z-transforms
of hyperbolic and of trigonometric sequences relatively easily. For example,
en − e−n
sinh n =
2
Hence, by the linearity property,
1 1
Z{sinh n} = Z{en } − Z{e−n }
2 2
1 z z
= −
2 z − e z − e−1
z − e−1 − (z − e)
z
=
2 z 2 − (e + e−1 )z + 1
e − e−1
z
=
2 z 2 − (2 cosh 1)z + 1
z sinh 1
=
z2− 2z cosh 1 + 1
Using αn instead of n in this calculation, where α is a constant, we obtain
z sinh α
Z{sinh αn} =
z2 − 2z cosh α + 1
18 HELM (2015):
Workbook 21: z-Transforms
®
Task
eαn + e−αn
Using cosh αn ≡ obtain the z-transform of the sequence {cosh αn} =
2
{1, cosh α, cosh 2α, . . .}
Your solution
Answer
We have, by linearity,
1 1
Z{cosh αn} = Z{eαn } + Z{e−αn }
2 2
z 1 1
= +
2 z − eα z − e−α
2z − (eα + e−α )
z
=
2 z 2 − 2z cosh α + 1
z 2 − z cosh α
=
z 2 − 2z cosh α + 1
Trigonometric sequences
If we use the result
z
Z{an } = |z| > |a|
z−a
√
with, respectively, a = eiω and a = e−iω where ω is a constant and i denotes −1 we obtain
z z
Z{eiωn } = Z{e−iωn } =
z−e +iω z − e−iω
Hence, recalling from complex number theory that
eix + e−ix
cos x =
2
we can state, using the linearity property, that
HELM (2015): 19
Section 21.2: Basics of z-Transform Theory
1 1
Z{cos ωn} = Z{eiωn } + Z{e−iωn }
2 2
z 1 1
= +
2 z − eiω z − e−iω
2z − (eiω + e−iω )
z
=
2 z 2 − (eiω + e−iω )z + 1
z 2 − z cos ω
=
z 2 − 2z cos ω + 1
(Note the similarity of the algebra here to that arising in the corresponding hyperbolic case. Note
also the similarity of the results for Z{cosh αn} and Z{cos ωn}.)
Task
By a similar procedure to that used above for Z{cos ωn} obtain Z{sin ωn}.
Your solution
20 HELM (2015):
Workbook 21: z-Transforms
®
Answer
We have
1 1
Z{sin ωn} = Z{eiωn } − Z{e−iωn } (Don’t miss the i factor here!)
2i 2i
z 1 1
∴ Z{sin ωn} = −
2i z − eiω z − e−iω
−e−iω + eiω
z
=
2i z 2 − 2z cos ω + 1
z sin ω
=
z2 − 2z cos ω + 1
Key Point 6
z 2 − z cos ω
Z{cos ωn} =
z 2 − 2z cos ω + 1
z sin ω
Z{sin ωn} =
z2 − 2z cos ω + 1
Key Point 7
z 2 − z cosh α
Z{cosh αn} =
z 2 − 2z cosh α + 1
z sinh α
Z{sinh αn} =
z 2 − 2z cosh α + 1
Again notice the denominators in Key Point 7. Compare these results with those for the two trigono-
metric sequences in Key Point 6.
HELM (2015): 21
Section 21.2: Basics of z-Transform Theory
Task
Use Key Points 6 and 7 to write down the z-transforms of
n no
(a) sin (b) {cos 3n} (c) {sinh 2n} (d) {cosh n}
2
Your solution
Answer
z sin 12
n no
(a) Z sin = 2
z − 2z cos 21 + 1
2
z 2 − z cos 3
(b) Z{cos 3n} =
z 2 − 2z cos 3 + 1
z sinh 2
(c) Z{sinh 2n} =
z 2 − 2z cosh 2 + 1
z 2 − z cosh 1
(d) Z{cosh n} =
z 2 − 2z cosh 1 + 1
22 HELM (2015):
Workbook 21: z-Transforms
®
Task
Use the results for Z{cos ωn} and Z{sin ωn} in Key Point 6 to obtain the z-
transforms of
n nπ o n nπ o
(a) {cos(nπ)} (b) sin (c) cos
2 2
Write out the first few terms of each sequence.
Your solution
Answer
(a) With ω = π
z 2 − z cos π z2 + z z
Z{cos nπ} = 2
= 2
=
z − 2z cos π + 1 z + 2z + 1 z+1
nπ o z 2 − cos π2
π n z2
(c) With ω = Z cos = = 2
2 2 z2 + 1 z +1
n nπ o
where cos = {1, 0, −1, 0, 1, . . .}
2
(These three results can also be readily obtained from the definition of the z-transform. Try!)
HELM (2015): 23
Section 21.2: Basics of z-Transform Theory
4. Further z -transform properties
We showed earlier that the results
Z{vn + wn } = V (z) + W (z) and similarly Z{vn − wn } = V (z) − W (z)
follow from the linearity property.
You should be clear that there is no comparable result for the product of two sequences.
Z{vn wn } is not equal to V (z)W (z)
For two specific products of sequences however we can derive useful results.
Multiplication of a sequence by an
Suppose fn is an arbitrary sequence with z-transform F (z).
Consider the sequence {vn } where
vn = an fn i.e. {v0 , v1 , v2 , . . .} = {f0 , af1 , a2 f2 , . . .}
By the z-transform definition
Z{vn } = v0 + v1 z −1 + v2 z −2 + . . .
= f0 + a f1 z −1 + a2 f2 z −2 + . . .
∞
X
= an fn z −n
n=0
∞
X z −n
= fn
n=0
a
∞
X
But F (z) = fn z −n
n=0
z
Thus we have shown that Z{an fn } = F
a
Key Point 8
z
n
Z{a fn } = F
a
That is, multiplying a sequence {fn } by the sequence {an } does not change the form of the z-
z
transform F (z). We merely replace z by in that transform.
a
24 HELM (2015):
Workbook 21: z-Transforms
®
Task
Using Key Point 8, write down the z-transform of the sequence {vn } where
vn = e−2n sin 3n
Your solution
Answer
z sin 3
We have, Z{sin 3n} =
z 2 − 2z cos 3 + 1
so with a = e−2 we replace z by z e+2 to obtain
ze2 sin 3
Z{vn } = Z{e−2n sin 3n} =
(ze2 )2 − 2ze2 cos 3 + 1
ze−2 sin 3
=
z 2 − 2ze−2 cos 3 + e−4
HELM (2015): 25
Section 21.2: Basics of z-Transform Theory
Task
Using the property just discussed write down the z-transform of the sequence {wn }
where
wn = e−αn cos ωn
Your solution
Answer
z 2 − z cos ω
We have, Z{cos ωn} =
z 2 − 2z cos ω + 1
So replacing z by zeα we obtain
Key Point 9
z 2 − ze−α cos ω
Z{e−αn cos ωn} =
z 2 − 2ze−α cos ω + e−2α
ze−α sin ω
Z{e−αn sin ωn} =
z 2 − 2ze−α cos ω + e−2α
Note the same denominator in each case.
26 HELM (2015):
Workbook 21: z-Transforms
®
Multiplication of a sequence by n
An important sequence whose z-transform we have not yet obtained is the unit ramp sequence {rn }:
0 n = −1, −2, −3, . . .
rn =
n n = 0, 1, 2, . . .
rn
3
2
1
2 3 n
0 1
Figure 5
Figure 5 clearly suggests the nomenclature ‘ramp’.
We shall attempt to use the z-transform of {rn } from the definition:
Z{rn } = 0 + 1z −1 + 2z −2 + 3z −3 + . . .
This is not a geometric series but we can write
z −1 + 2z −2 + 3z −3 = z −1 (1 + 2z −1 + 3z −2 + . . .)
= z −1 (1 − z −1 )−2 |z −1 | < 1
1
Z{rn } = Z{n} = 2
z 1 − z1
z
= |z| > 1
(z − 1)2
Key Point 10
The z-transform of the unit ramp sequence is
z
Z{rn } = = R(z) (say)
(z − 1)2
z
Recall now that the unit step sequence has z-transform Z{un } = = U (z) (say) which is
(z − 1)
the subject of the next Task.
HELM (2015): 27
Section 21.2: Basics of z-Transform Theory
Task
z
Obtain the derivative of U (z) = with respect to z.
(z −1)
Your solution
Answer
We have, using the quotient rule of differentiation:
dU d z (z − 1)1 − (z)(1)
= =
dz dz z − 1 (z − 1)2
−1
=
(z − 1)2
28 HELM (2015):
Workbook 21: z-Transforms
®
We differentiate both sides with respect to the variable z, doing this term-by-term on the right-hand
side. Thus
∞
dF −2 −3 −4
X
= −f1 z − 2f2 z − 3f3 z − ... = (−n)fn z −n−1
dz n=1
∞
X
−1 −1 −2 −3 −1
= −z (f1 z + 2f2 z + 3f3 z + . . .) = −z n fn z −n
n=1
Key Point 11
dF
If Z{fn } = F (z) then Z{n fn } = −z
dz
Task
By differentiating the z-transform R(z) of the unit ramp sequence obtain the z-
transform of the causal sequence {n2 }.
Your solution
HELM (2015): 29
Section 21.2: Basics of z-Transform Theory
Answer
We have
z
Z{n} =
(z − 1)2
so
2 d z
Z{n } = Z{n.n} = −z
dz (z − 1)2
By the quotient rule
(z − 1)2 − (z)(2)(z − 1)
d z
=
dz (z − 1)2 (z − 1)4
z − 1 − 2z −1 − z
= 3
=
(z − 1) (z − 1)3
Multiplying by −z we obtain
z + z2 z(1 + z)
Z{n2 } = 3
=
(z − 1) (z − 1)3
Clearly this process can be continued to obtain the transforms of {n3 }, {n4 }, . . . etc.
Y (z) = y0 + y1 z −1 + y2 z −2 + yj z −3 + . . .
V (z) = v0 + v1 z −1 + v2 z −2 + v3 z −3 + . . .
= y−1 + y0 z −1 + y1 z −2 + y2 z −3 + . . .
= y−1 + z −1 (y0 + y1 z −1 + y2 z −2 + . . .)
i.e.
V (z) = Z{yn−1 } = y−1 + z −1 Y (z)
30 HELM (2015):
Workbook 21: z-Transforms
®
Task
Obtain the z-transform of the sequence {wn } = {yn−2 } using the method illus-
trated above.
Your solution
Answer
The z-transform of {wn } is W (z) = w0 + w1 z −1 + w2 z −2 + w3 z −3 + . . . or, since wn = yn−2 ,
W (z) = y−2 + y−1 z −1 + y0 z −2 + y1 z −3 + . . .
= y−2 + y−1 z −1 + z −2 (y0 + y1 z −1 + . . .)
i.e. W (z) = Z{yn−2 } = y−2 + y−1 z −1 + z −2 Y (z)
Clearly, we could proceed in a similar way to obtains a general result for Z{yn−m } where m is any
positive integer. The result is
Z{yn−m } = y−m + y−m+1 z −1 + . . . + y−1 z −m+1 + z −m Y (z)
For the particular case of causal sequences (where y−1 = y−2 = . . . = 0) these results are particularly
simple:
Z{yn−1 } = z −1 Y (z)
Z{yn−2 } = z −2 Y (z)
(causal systems only)
Z{yn−m } = z −m Y (z)
You may recall from earlier in this Workbook that in a digital system we represented the right shift
operation symbolically in the following way:
Figure 6
The significance of the z −1 factor inside the rectangles should now be clearer. If we replace the
‘input’ and ‘output’ sequences by their z-transforms:
Z{yn } = Y (z) Z{yn−1 } = z −1 Y (z)
it is evident that in the z-transform ‘domain’ the shift becomes a multiplication by the factor z −1 .
N.B. This discussion applies strictly only to causal sequences.
HELM (2015): 31
Section 21.2: Basics of z-Transform Theory
Notational point:
A causal sequence is sometimes written as yn un where un is the unit step sequence
0 n = −1, −2, . . .
un =
1 n = 0, 1, 2, . . .
The right shift theorem is then written, for a causal sequence,
Z{yn−m un−m } = z −m Y (z)
Examples
z
Recall that the z-transform of the causal sequence {an } is . It follows, from the right shift
z−a
theorems that
zz −1 1
(i) Z{an−1 } = Z{0, 1, a, a2 , . . .} = =
z−a z−a
↑
z −1 1
(ii) Z{an−2 } = Z{0, 0, 1, a, a2 , . . .} = =
z−a z(z − a)
↑
Task
Write the following sequence fn as a difference of two unit step sequences. Hence
obtain its z-transform.
fn
0 1 2 3 4 5 6 7 n
Your solution
32 HELM (2015):
Workbook 21: z-Transforms
®
Answer
1 n = 0, 1, 2, . . .
Since {un } =
0 n = −1, −2, . . .
1 n = 5, 6, 7, . . .
and {un−5 } =
0 otherwise
it follows that
fn = un − un−5
z z −5 z z − z −4
Hence F (z) = − =
z−1 z−1 z−1
Z{yn+1 } = y1 + y2 z −1 + y3 z −2 + . . .
= y1 + z(y2 z −2 + y3 z −3 + . . .)
The term in brackets is the z-transform of the unshifted sequence {yn } apart from its first two terms:
thus
Z{yn+1 } = y1 + z(Y (z) − y0 − y1 z −1 )
Task
Obtain the z-transform of the sequence {yn+2 } using the method illustrated above.
Your solution
HELM (2015): 33
Section 21.2: Basics of z-Transform Theory
Answer
Z{yn+2 } = y2 + y3 z −1 + y4 z −2 + . . .
= y2 + z 2 (y3 z −3 + y4 z −4 + . . .)
= y2 + z 2 (Y (z) − y0 − y1 z −1 − y2 z −2 )
Key Point 12
The right shift theorems or delay theorems are:
Note carefully the occurrence of positive powers of z in the left shift theorems and of negative
powers of z in the right shift theorems.
34 HELM (2015):
Workbook 21: z-Transforms
®
Table 1: z-transforms
fn F (z) Name
δn 1 unit impulse
δn−m z −m
z
un unit step sequence
z−1
z
an geometric sequence
z−a
z
eαn
z − eα
z sinh α
sinh αn
z 2 − 2z cosh α + 1
z 2 − z cosh α
cosh αn
z 2 − 2z cosh α + 1
z sin ω
sin ωn
z2 − 2z cos ω + 1
z 2 − z cos ω
cos ωn
z 2 − 2z cos ω + 1
ze−α sin ω
e−αn sin ωn
z 2 − 2ze−α cos ω + e−2α
z 2 − ze−α cos ω
e−αn cos ωn
z 2 − 2ze−α cos ω + e−2α
z
n ramp sequence
(z − 1)2
z(z + 1)
n2
(z − 1)3
z(z 2 + 4z + 1)
n3
(z − 1)4
z
an f n F
a
dF
n fn −z
dz
This table has been copied to the back of this Workbook (page 96) for convenience.
HELM (2015): 35
Section 21.2: Basics of z-Transform Theory
z-Transforms and
Introduction
In this we apply z-transforms to the solution of certain types of difference equation. We shall see that
this is done by turning the difference equation into an ordinary algebraic equation. We investigate
both first and second order difference equations.
A key aspect in this process in the inversion of the z-transform. As well as demonstrating the use of
partial fractions for this purpose we show an alternative, often easier, method using what are known
as residues.
36 HELM (2015):
Workbook 21: z-Transforms
®
HELM (2015): 37
Section 21.3: z-Transforms and Difference Equations
So consider
yn+1 − 3yn = 4 n = 0, 1, 2, . . . (1)
with initial condition y0 = 1.
We multiply both sides of (1) by z −n and sum each side over all positive integer values of n and
zero. We obtain
X∞ X ∞
−n
(yn+1 − 3yn )z = 4z −n
n=0 n=0
or
∞
X ∞
X ∞
X
−n −n
yn+1 z −3 yn z =4 z −n (2)
n=0 n=0 n=0
4z
(z − 3)Y (z) − z =
(z − 1)
4z z 2 + 3z
(z − 3)Y (z) = +z =
z−1 z−1
z 2 + 3z
so Y (z) = (4)
(z − 1)(z − 3)
The final step consists of obtaining the sequence {yn } of which (4) is the z-transform. As it stands
(4) is not recognizable as any of the standard transforms that we have obtained. Consequently, one
method of ‘inverting’ (4) is to use a partial fraction expansion. (We assume that you are familiar
with simple partial fractions. See 3.6)
38 HELM (2015):
Workbook 21: z-Transforms
®
Thus
(z + 3)
Y (z) = z
(z − 1)(z − 3)
−2 3
= z + (in partial fractions)
z−1 z−3
−2z 3z
so Y (z) = +
z−1 z−3
Now, taking inverse z-transforms, the general term yn is, using the linearity property,
z z
yn = −2Z−1 { } + 3 Z−1 { }
z−1 z−3
The symbolic notation Z−1 is common and is short for ‘the inverse z-transform of’.
Task
Using standard z-transforms write down yn explicitly, where
z z
yn = −2Z−1 { } + 3 Z−1 { }
z−1 z−3
Your solution
Answer
yn = −2 + 3 × 3n = −2 + 3n+1 n = 0, 1, 2, . . . (5)
HELM (2015): 39
Section 21.3: z-Transforms and Difference Equations
These agree with those obtained by recursive solution of the given problem (1):
yn+1 − 3yn = 4 y0 = 1
which yields
y1 = 4 + 3y0 = 7
y2 = 4 + 3y1 = 25
y3 = 4 + 3y2 = 79 etc.
More conclusively we can put the solution (5) back into the left-hand side of the difference equation
(1).
If yn = −2 + 3n+1
then 3yn = −6 + 3n+2
and yn+1 = −2 + 3n+2
So, on the left-hand side of (1),
yn+1 − 3yn = −2 + 3n+2 − (−6 + 3n+2 )
which does indeed equal 4, the given right-hand side, and so the solution has been verified.
Key Point 13
To solve a linear constant coefficient difference equation, three steps are involved:
1. Replace each term in the difference equation by its z-transform and insert the initial condi-
tion(s).
2. Solve the resulting algebraic equation. (Thus gives the z-transform Y (z) of the solution
sequence.)
The third step is usually the most difficult. We will consider the problem of finding inverse z-
transforms more fully later.
40 HELM (2015):
Workbook 21: z-Transforms
®
Task
Solve the difference equation
yn+1 − yn = d n = 0, 1, 2, . . . y0 = a (6)
where a and d are constants.
(The solution will give the n th term of an arithmetic sequence with a constant
difference d and initial term a.)
Your solution
Answer
If Y (z) = Z{yn } we obtain the algebraic equation
d×z
z Y (z) − zy0 − Y (z) =
(z − 1)
Note that the right-hand side transform is that of a constant sequence {d, d, . . .}. Note also the
use of the left shift theorem.
Now insert the initial condition y0 = a and then solve for Y (z):
Your solution
HELM (2015): 41
Section 21.3: z-Transforms and Difference Equations
Answer
d×z
(z − 1)Y (z) = +z×a
(z − 1)
d×z a×z
Y (z) = 2
+
(z − 1) z−1
Finally take the inverse z-transform of the right-hand side. [Hint: Recall the z-transform of the ramp
sequence {n}.]
Your solution
Answer
We have
z z
yn = d × Z−1 { 2
} + a × Z−1 { }
(z − 1) z−1
∴ yn = dn + a n = 0, 1, 2, . . . (7)
using the known z-transforms of the ramp and unit step sequences. Equation (7) may well be a
familiar result to you – an arithmetic sequence whose ‘zeroth’ term is y0 = a has general term
yn = a + nd.
i.e. {yn } = {a, a + d, . . . a + nd, . . .}
This solution is of course readily obtained by direct recursive solution of (6) without need for z-
transforms. In this case the general term (a + nd) is readily seen from the form of the recursive
solution: (Make sure you really do see it).
N.B. If the term a is labelled as the first term (rather than the zeroth) then
y1 = a, y2 = a + d, y3 − a + 2d,
so in this case the n th term is
yn = a + (n − 1)d
rather than (7).
42 HELM (2015):
Workbook 21: z-Transforms
®
Task
Use the right shift theorem of z-transforms to solve (8) with the initial condition
y−1 = a.
(a) Begin by taking the z-transform of (8), inserting the initial condition and solving for Y (z):
Your solution
HELM (2015): 43
Section 21.3: z-Transforms and Difference Equations
Answer
We have, for the z-transform of (8)
dz
Y (z) − (z −1 Y (z) + y−1 ) = [Note that here dz means d × z]
z−1
dz
Y (z)(1 − z −1 ) − a =
z−1
z−1 dz
Y (z) = +a
z (z − 1)
dz 2 az (9)
Y (z) = 2
+
(z − 1) z−1
The second term of Y (z) has the inverse z-transform {a un } = {a, a, a, . . .}.
The first term is less straightforward. However, we have already reasoned that the other term in yn
here should be (n + 1)d.
dz 2
(b) Show that the z-transform of (n + 1)d is . Use the standard transform of the ramp and
(z − 1)2
step:
Your solution
Answer
We have
Z{(n + 1)d} = dZ{n} + dZ{1}
by the linearity property
dz dz
∴ Z{(n + 1)d} = 2
+
(z − 1) z−1
1+z−1
= dz
(z − 1)2
dz 2
=
(z − 1)2
as expected.
44 HELM (2015):
Workbook 21: z-Transforms
®
Your solution
Answer
Returning to (9) the inverse z-transform is
yn = (n + 1)d + a un i.e. yn = a + (n + 1)d n = −1, 0, 1, 2, . . .
as we expected.
Task
Earlier in this Section (pages 37-39) we solved
yn+1 − 3yn = 4 n = 0, 1, 2, . . . with y0 = 1.
Now solve yn − 3yn−1 = 4 n = 0, 1, 2, . . . with y−1 = 1. (10)
Your solution
Answer
We have, taking the z-transform of (10),
4z
Y (z) − 3(z −1 Y (z) + 1) =
z−1
(using the right shift property and inserting the initial condition.)
4z
∴ Y (z) − 3z −1 Y (z) = 3 +
z−1
(z − 3) 4z 3z 4z 2
Y (z) = 3+ so Y (z) = +
z z−1 z − 3 (z − 1)(z − 3)
HELM (2015): 45
Section 21.3: z-Transforms and Difference Equations
z
Write the second term as 4z and obtain the partial fraction expansion of the
(z − 1)(z − 3)
bracketed term. Then complete the z-transform inversion.
Your solution
Answer
z − 12 3
= + 2
(z − 1)(z − 3) z−1 z−3
We now have
3z 2z 6z
Y (z) = − +
z−3 z−1 z−3
so
yn = 3 × 3n − 2 + 6 × 3n = −2 + 9 × 3n = −2 + 3n+2 (11)
Compare this solution (11) to that of the previous problem (5) on page 39:
Your solution
Answer
Solution (11) is just the solution sequence (5) moved 1 unit to the left. We anticipated this since
the difference equation (10) and associated initial condition is the same as the difference equation
(1) but shifted one unit to the left.
46 HELM (2015):
Workbook 21: z-Transforms
®
Task
By solving
yn+2 = yn+1 + yn (12)
y0 = y1 = 1
obtain the general term yn of the Fibonacci sequence.
Begin by taking the z-transform of (12), using the left shift property. Then insert the initial conditions
and solve the resulting algebraic equation for Y (z), the z-transform of {yn }:
Your solution
Answer
z 2 Y (z) − z 2 y0 − zy1 = zY (z) − zy0 + Y (z) (taking z-transforms )
z 2 Y (z) − z 2 − z = zY (z) − z + Y (z) (inserting initial conditions)
(z 2 − z − 1)Y (z) = z 2
so
z2
Y (z) = (solving for Y (z)).
z2 − z − 1
HELM (2015): 47
Section 21.3: z-Transforms and Difference Equations
Now solve the quadratic equation z 2 − z − 1 = 0 and hence factorize the denominator of Y (z):
Your solution
Answer
z2 − z − 1 = 0
√ √
1± 1+4 1± 5
∴ z= =
2 2
√ √
1+ 5 1− 5
so if a = , b=
2 2
2
z
Y (z) =
(z − a)(z − b)
This form for Y (z) often arises in solving second order difference equations. Write it in partial
fractions and find yn , leaving a and b as general at this stage:
Your solution
Answer
z Az Bz
Y (z) = z = + in partial fractions
(z − a)(z − b) z − a (z − b)
a b
where A = and B =
a−b b−a
Hence, taking inverse z-transforms
1
yn = Aan + Bbn = (an+1 − bn+1 ) (13)
(a − b)
48 HELM (2015):
Workbook 21: z-Transforms
®
Answer √ √
1+ 5 1− 5 √
With a = b= so a − b = 5
2 2
we obtain, using (13)
√ !n+1 √ !n
1 1+ 5 1− 5
yn = √ − n = 2, 3, 4, . . .
5 2 2
With an appropriate computational aid you could (i) check that this formula does indeed give the
familiar sequence
{1, 1, 2, 3, 5, 8, 13, . . .}
and (ii) obtain, for example, y50 and y100 .
Key Point 14
The inverse z-transform of
z2 1
Y (z) = a 6= b is yn = (an+1 − bn+1 )
(z − a)(z − b) (a − b)
HELM (2015): 49
Section 21.3: z-Transforms and Difference Equations
Task
Use the right shift property of z-transforms to solve the second order difference
equation
yn − 7yn−1 + 10 yn−2 = 0 with y−1 = 16 and y−2 = 5.
[Hint: the steps involved are the same as in the previous Task]
Your solution
Answer
z 2 − 7z + 10
Y (z) = 62 − 160z −1
z2
62z 2 160z
Y (z) = 2
− 2
z − 7z + 10 z − 7z + 10
(62z − 160)
= z
(z − 2)(z − 5)
12z 50z
= + in partial fractions
z−2 z−5
so yn = 12 × 2n + 50 × 5n n = 0, 1, 2, . . .
We now give an Example where a quadratic equation with repeated solutions arises.
50 HELM (2015):
Workbook 21: z-Transforms
®
Example 1
(a) Obtain the z-transform of {fn } = {nan }.
(b) Solve
yn − 6yn−1 + 9yn−2 = 0 n = 0, 1, 2, . . .
y−1 = 1 y−2 = 0
Solution
z n z/a az
(a) Z{n} = ∴ Z{na } = 2 = where we have used the
(z − 1)2 (z/a − 1) (z − a)2
z
property Z{fn an } = F
a
(b) Taking the z-transform of the difference equation and inserting the initial conditions:
Y (z) − 6(z −1 Y (z) + 1) + 9(z −2 Y (z) + z −1 ) = 0
Y (z)(1 − 6z −1 + 9z −2 ) = 6 − 9z −1
Y (z)(z 2 − 6z + 9) = 6z 2 − 9z
6z 2 − 9z
6z − 9 6 9
Y (z) = =z =z + in partial fractions
(z − 3)2 (z − 3)2 z − 3 (z − 3)2
from which, using the result (a) on the second term,
yn = 6 × 3n + 3n × 3n = (6 + 3n)3n
We shall re-do this inversion by an alternative method shortly.
Task
Solve the difference equation
yn+2 + yn = 0 with y0 , y1 arbitrary. (14)
Your solution
HELM (2015): 51
Section 21.3: z-Transforms and Difference Equations
Answer
To find the inverse z-transforms recall the results for Z{cos ωn} and Z{sin ωn} from Key Point 6
(page 21) and some of the particular cases discussed in Section 21.2. Hence find yn here:
Your solution
Answer
π
Taking Z{cos ωn} and Z{sin ωn} with ω =
2
n nπ o z2
Z cos = 2
2 z +1
n nπ o z
Z sin = 2
2 z +1
−1 z2 −1 z nπ nπ
Hence yn = y0 Z { 2 } + y1 Z { 2 } = y0 cos + y1 sin (15)
z +1 z +1 2 2
Those of you who are familiar with differential equations may know that
d2 y
2
+y =0 y(0) = y0 , y 0 (0) = y00 (16)
dt
has solutions y1 = cos t and y2 = sin t and a general solution
y = c1 cos t + c2 sin t (17)
where c1 = y0 and c2 = y00 .
This differential equation is a model for simple harmonic oscillations. The difference equation (14)
and its solution (15) are the discrete counterparts of (16) and (17).
52 HELM (2015):
Workbook 21: z-Transforms
®
Task
Write down the poles and zeros of
3(z + 4)
G(z) = (18)
z 2 (2z+ 1)(3z − 9)
State the order of each pole.
Your solution
Answer
G(z) has a zero when z = −4.
G(z) has first order poles at z = −1/2, z = 3.
G(z) has a second order pole at z = 0.
HELM (2015): 53
Section 21.3: z-Transforms and Difference Equations
Residue at a pole
The residue of a complex function G(z) at a first order pole z0 is
Res (G(z), z0 ) = [G(z)(z − z0 )]z0 (19)
The residue at a second order pole z0 is
d
Res (G(z), z0 ) = (G(z)(z − z0 )2 ) (20)
dz z0
You need not worry about how these results are obtained or their full mathematical significance.
(Any textbook on Complex Variable Theory could be consulted by interested readers.)
Example
Consider again the function (18) in the previous guided exercise.
3(z + 4)
G(z) =
z 2 (2z + 1)(3z − 9)
(z + 4)
=
z + 12 (z − 3)
2z 2
The second form is the more convenient for the residue formulae to be used.
Using (19) at the two first order poles:
1 1
Res G(z), − = G(z) z − −
2 2 1
2
(z + 4) 18
= 2
=−
2z (z − 3) 1 5
2
(z + 4) 1
Res [G(z), 3] = =
1 9
2z 2 z +
2 3
54 HELM (2015):
Workbook 21: z-Transforms
®
Task
Carry out the differentiation shown on the last line of the previous page, then
substitute z = 0 and hence obtain the required residue.
Your solution
Answer
Differentiating by the quotient rule then substituting z = 0 gives
17
Res (G(z), 0) =
9
Key Point 15
Residue at a Pole of Order k
If G(z) has a k th order pole at z = z0
G1 (z)
i.e. G(z) = G1 (z0 ) 6= 0 and finite
(z − z0 )k
k−1
1 d k
Res (G(z), z0 ) = (G(z) (z − z0 ) ) (21)
(k − 1)! dz k−1 z0
HELM (2015): 55
Section 21.3: z-Transforms and Difference Equations
Inverse z-transform formula
Recall that, by definition, the z-transform of a sequence {fn } is
F (z) = f0 + f1 z −1 + f2 z −2 + . . . fn z −n + . . .
If we multiply both sides by z n−1 where n is a positive integer we obtain
F (z)z n−1 = f0 z n−1 + f1 z n−2 + f2 z n−3 + . . . fn z −1 + fn+1 z −2 + . . .
Using again a result from complex integration it can be shown from this expression that the general
term fn is given by
fn = sum of residues of F (z) z n−1 at its poles (22)
The poles of F (z)z n−1 will be those of F (z) with possibly additional poles at the origin.
To illustrate the residue method of inversion we shall re-do some of the earlier examples that were
done using partial fractions.
Example:
z2
Y (z) = a 6= b
(z − a)(z − b)
so
z n+1
Y (z)z n−1 = = G(z), say.
(z − a)(z − b)
G(z) has first order poles at z = a, z = b so using (19).
z n+1 an+1
Res (G(z), a) = =
z−b a a−b
n+1
bn+1 −bn+1
z
Res (G(z), b) = = =
z−a b b−a a−b
We need simply add these residues to obtain the required inverse z-transform
1
∴ fn = (an+1 − bn+1 )
(a − b)
as before.
56 HELM (2015):
Workbook 21: z-Transforms
®
Task
Obtain, using (22), the inverse z-transform of
6z 2 − 9z
Y (z) =
(z − 3)2
Firstly, obtain the pole(s) of G(z) = Y (z)z n−1 and deduce the order:
Your solution
Answer
6z n+1 − 9z n
G(z) = Y (z)z n−1 =
(z − 3)2
whose only pole is one of second order at z = 3.
Now calculate the residue of G(z) at z = 3 using (20) and hence write down the required inverse
z-transform yn :
Your solution
HELM (2015): 57
Section 21.3: z-Transforms and Difference Equations
Answer
d n+1 n
Res (G(z), 3) = (6z − 9z )
dz 3
= 6 × 3n + 3n3n
This is the same as was found by partial fractions, but there is considerably less labour by the residue
method.
In the above examples all the poles of the various functions G(z) were real. This is the easiest
situation but the residue method will cope with complex poles.
Example
We showed earlier that
z2 nπ
and cos
z2 + 1 2
formed a z-transform pair.
z2
We will now obtain yn if Y (z) = using residues.
z2 + 1
Using residues with, from (22),
z n+1 z n+1
G(z) = = where i2 = −1.
z2 + 1 (z − i)(z + i)
we see that G(z) has first order poles at the complex conjugate points ± i.
Using (19)
in+1
n+1
z (−i)n+1
Res (G(z), i) = = Res (G(z), −i) =
z+i i 2i (−2i)
(Note the complex conjugate residues at the complex conjugate poles.)
z2 1 n+1
Hence Z−1 { 2
}= i − (−i)n+1
z +1 2i
But i = eiπ/2 and −i = e−iπ/2 , so the inverse z-transform is
1 i(n+1)π/2 π nπ
− e−i(n+1)π/2 = sin(n + 1) = cos
e as expected.
2i 2 2
58 HELM (2015):
Workbook 21: z-Transforms
®
Task
Show, using residues, that
z nπ
Z−1 { 2 } = sin
z +1 2
Your solution
Answer
Using (22):
z zn zn
G(z) = z n−1 = =
z2 + 1 z2 + 1 (z + i)(z − i)
in
Res (G(z), i) =
2i
(−i)n
Res (G(z), −i) =
−2i
z 1 n
Z−1 { } = (i − (−i)n )
z2 + 1 2i
1 inπ/2
= (e − e−inπ/2 )
2i
nπ
= sin
2
HELM (2015): 59
Section 21.3: z-Transforms and Difference Equations
4. An application of difference equations – currents in a
ladder network
The application we will consider is that of finding the electric currents in each loop of the ladder resis-
tance network shown, which consists of (N + 1) loops. The currents form a sequence {i0 , i1 , . . . iN }
V io i1 in in+1 iN
Figure 7
All the resistors have the same resistance R so loops 1 to N are identical. The zero’th loop contains
an applied voltage V . In this zero’th loop, Kirchhoff’s voltage law gives
V = Ri0 + R(i0 − i1 )
from which
V
i1 = 2i0 − (23)
R
Similarly, applying the Kirchhoff law to the (n + 1)th loop where there is no voltage source and 3
resistors
0 = Rin+1 + R(in+1 − in+2 ) + R(in+1 − in )
from which
in+2 − 3in+1 + in = 0 n = 0, 1, 2, . . . (N − 2) (24)
(24) is the basic difference equation that has to be solved.
Task
Using the left shift theorems obtain the z-transform of equation (24). Denote by
I(z) the z-transform of {in }. Simplify the algebraic equation you obtain.
Your solution
60 HELM (2015):
Workbook 21: z-Transforms
®
Answer
We obtain
z 2 I(z) − z 2 i0 − zi1 − 3(zI(z) − zi0 ) + I(z) = 0
Simplifying
(z 2 − 3z + 1)I(z) = z 2 i0 + zi1 − 3zi0 (25)
Task
Look at the table of z-transforms on page 35 (or at the back of the Workbook)
and suggest what sequences are likely to arise by inverting I(z) as given in (26).
Your solution
Answer
The most likely candidates are hyperbolic sequences because both {cosh αn} and {sinh αn} have
z-transforms with denominator
z 2 − 2z cosh α + 1
which is of the same form as the denominator of (26), remembering that cosh α ≥ 1. (Why are the
trigonometric sequences {cos ωn} and {sin ωn} not plausible here?)
To proceed, we introduce a quantity α such that α is the positive solution of 2 cosh α = 3 from
which (using cosh2 α − sinh2 α ≡ 1) we get
HELM (2015): 61
Section 21.3: z-Transforms and Difference Equations
r √
9 5
sinh α = −1=
4 2
Hence (26) can be written
2 V
z − 1+ z
i0 R
I(z) = i0 2 (27)
z − 2z cosh α + 1
To further progress, bearing in mind the z-transforms of {cosh αn} and {sinh αn}, we must subtract
and add z cosh α to the numerator of (27), where cosh α = 23 .
3z V
2
z − z cosh α + 2 − 1 + i0 R z
I(z) = i0
z 2 − 2z cosh α + 1
3 Vz
(z 2 − z cosh α) −1 z−
2 i0 R
= i0 2
+ 2
z − 2z cosh α + 1 z − 2z cosh α + 1
The first term in the square bracket is the z-transform of {cosh αn}.
3iN = iN −1
62 HELM (2015):
Workbook 21: z-Transforms
®
Exercises
1. Deduce the inverse z-transform of each of the following functions:
2z 2 − 3z
(a)
z 2 − 3z − 4
2z 2 + z
(b)
(z − 1)2
2z 2 − z
(c)
2z 2 − 2z + 2
3z 2 + 5
(d)
z4
2. Use z-transforms to solve each of the following difference equations:
Answers
1 (a) (−1)n + 4n (b) 2 + 3n (c) cos(nπ/3) (d) 3δn−2 + 5δn−4
2 (a) yn = 4n − 3n (b) yn = 21 × 3n − 3 (c) yn = 2 × 2n − 2 − n (d) yn = n5n
(e) yn = 2 × (−3)n + 4 × (−3)n−3 un−2 (f) yn = 12 × 2n + 50 × 5n (g) yn = (6 + 3n)3n
HELM (2015): 63
Section 21.3: z-Transforms and Difference Equations
Engineering
Applications
of z-Transforms 21.4
Introduction
In this Section we shall apply the basic theory of z-transforms to help us to obtain the response or
output sequence for a discrete system. This will involve the concept of the transfer function and we
shall also show how to obtain the transfer functions of series and feedback systems. We will also
discuss an alternative technique for output calculations using convolution. Finally we shall discuss
the initial and final value theorems of z-transforms which are important in digital control.
64 HELM (2015):
Workbook 21: z-Transforms
®
1. Applications of z-transforms
Transfer (or system) function
Consider a first order linear constant coefficient difference equation
yn + a yn−1 = bxn n = 0, 1, 2, . . . (1)
where {xn } is a given sequence.
Assume an initial condition y−1 is given.
Task
Take the z-transform of (1), insert the initial condition and obtain Y (z) in terms
of X(z).
Your solution
Answer
Using the right shift theorem
Y (z) + a(z −1 Y (z) + y−1 ) = b X(z)
where X(z) is the z-transform of the given or input sequence {xn } and Y (z) is the z-transform of
the response or output sequence {yn }.
Solving for Y (z)
Y (z)(1 + az −1 ) = bX(z) − ay−1
so
bX(z) ay−1
Y (z) = − (2)
1 + az −1 1 + az −1
The form of (2) shows us clearly that Y (z) is made up of two components, Y1 (z) and Y2 (z) say,
where
bX(z)
(i) Y1 (z) = which depends on the input X(z)
1 + az −1
−ay−1
(ii) Y2 (z) = which depends on the initial condition y−1 .
1 + az −1
HELM (2015): 65
Section 21.4: Engineering Applications of z-Transforms
Clearly, from (2), if y−1 = 0 (zero initial condition) then
Y (z) = Y1 (z)
and hence the term zero-state response is sometimes used for Y1 (z).
Similarly if {xn } and hence X(z) = 0 (zero input)
Y (z) = Y2 (z)
and hence the term zero-input response can be used for Y2 (z).
In engineering the difference equation (1) is regarded as modelling a system or more specifically a
linear discrete time-invariant system. The terms linear and time-invariant arise because the difference
equation (1) is linear and has constant coefficients i.e. the coefficients do not involve the index n.
The term ‘discrete’ is used because sequences of numbers, not continuous quantities, are involved.
As noted above, the given sequence {xn } is considered to be the input sequence and {yn }, the
solution to (1), is regarded as the output sequence.
{xn } {yn }
system
input output
(stimulus) (response)
Figure 8
A more precise block diagram representation of a system can be easily drawn since only two operations
are involved:
1. Multiplying the terms of a sequence by a constant.
2. Shifting to the right, or delaying, the terms of the sequence.
A system which consists of a single multiplier is denoted as shown by a triangular symbol:
{xn } {yn }
A yn = Axn
Figure 9
As we have seen earlier in this workbook a system which consists of only a single delay unit is
represented symbolically as follows
{xn } {yn }
z −1 yn = xn−1
Figure 10
The system represented by the difference equation (1) consists of two multipliers and one delay unit.
Because (1) can be written
yn = bxn − ayn−1
a symbolic representation of (1) is as shown in Figure 11.
66 HELM (2015):
Workbook 21: z-Transforms
®
{xn } {yn }
+
b
+
z −1 −a
Figure 11
The circle symbol denotes an adder or summation unit whose output is the sum of the two (or more)
sequences that are input to it.
We will now concentrate upon the zero state response of the system i.e. we will assume that the
initial condition y−1 is zero.
Thus, using (2),
bX(z)
Y (z) =
1 + az −1
so
Y (z) b
= (3)
X(z) 1 + az −1
Y (z)
The quantity , the ratio of the output z-transform to the input z-transform, is called the
X(z)
transfer function of the discrete system. It is often denoted by H(z).
Key Point 16
The transfer function H(z) of a discrete system is defined by
Y (z) z-transform of output sequence
H(z) = =
X(z) z-transform of input sequence
when the initial conditions are zero.
HELM (2015): 67
Section 21.4: Engineering Applications of z-Transforms
Task
(a) Write down the transfer function H(z) of the system represented by (1)
(i) using negative powers of z
(ii) using positive powers of z.
(b) Write down the inverse z-transform of H(z).
Your solution
Answer
(a) From (3)
b
(i) H(z) =
1 + az −1
bz
(ii) H(z) =
z+a
(b) Referring to the Table of z-transforms at the end of the Workbook:
{hn } = b(−a)n n = 0, 1, 2, . . .
{xn } {yn }
H(z)
X(z) Y (z)
Figure 12
From the definition of the transfer function it follows that
Y (z) = X(z)H(z) (at zero initial conditions).
The corresponding relation between {yn }, {xn } and the inverse z-transform {hn } of the transfer
function will be discussed later; it is called a convolution summation.
The significance of {hn } is readily obtained.
1 n=0
Suppose {xn } =
0 n = 1, 2, 3, . . .
i.e. {xn } is the unit impulse sequence that is normally denoted by δn . Hence, in this case,
X(z) = Z{δn } = 1 so Y (z) = H(z) and {yn } = {hn }
In words: {hn } is the response or output of a system where the input is the unit impulse sequence
{δn }. Hence {hn } is called the unit impulse response of the system.
68 HELM (2015):
Workbook 21: z-Transforms
®
Key Point 17
For a linear, time invariant discrete system, the unit impulse response and the system transfer
function are a z-transform pair:
It follows from the previous Task that for the first order system (1)
b bz
H(z) = −1
= is the transfer function and
1 + az z+a
{hn } = {b(−a)n } is the unit impulse response sequence.
Task
Write down the transfer function of
(a) a single multiplier unit (b) a single delay unit.
Your solution
Answer
(a) {yn } = {A xn } if the multiplying factor is A
∴ using the linearity property of z-transform
Y (z) = AX(z)
Y (z)
so H(z) = =A is the required transfer function.
X(z)
(b) {yn } = {xn−1 }
so Y (z) = z −1 X(z) (remembering that initial conditions are zero)
∴ H(z) = z −1 is the transfer function of the single delay unit.
HELM (2015): 69
Section 21.4: Engineering Applications of z-Transforms
Task
Obtain the transfer function of the system.
yn + a1 yn−1 = b0 xn + b1 xn−1 n = 0, 1, 2, . . .
where {xn } is a known sequence with xn = 0 for n = −1, −2, . . . .
[Remember that the transfer function is only defined at zero initial condition i.e.
assume y−1 = 0 also.]
Your solution
Answer
Taking z-transforms
70 HELM (2015):
Workbook 21: z-Transforms
®
Task
Take the z-transform of (4), assuming given initial values y−1 , y−2 . Show that
Y (z) has two components. Obtain the transfer function of the system (4).
Your solution
Answer
From (4)
Example
Obtain (i) the unit impulse response (ii) the unit step response of the system specified by the second
order difference equation
3 1
yn − yn−1 + yn−2 = xn (5)
4 8
Note that both these responses refer to the case of zero initial conditions. Hence it is convenient to
first obtain the transfer function H(z) of the system and then use the relation Y (z) = X(z)H(z) in
each case.
We write down the transfer function of (5), using positive powers of z. Taking the z-transform of
(5) at zero initial conditions we obtain
3 1
Y (z) − z −1 Y (z) + z −2 Y (z) = X(z)
4 8
3 −1 1 −2
Y (z) 1 − z + z = X(z)
4 8
Y (z) z2 z2
∴ H(z) = = 2 3 1 =
X(z) z − 4z + 8
(z − 12 )(z − 14 )
HELM (2015): 71
Section 21.4: Engineering Applications of z-Transforms
We now complete the problem for inputs (i) xn = δn (ii) xn = un , the unit step sequence, using
partial fractions.
z2 2z z
H(z) = 1
1
= 1 − 1
z− 2
z− 4
z−2 z− 4
Hence, taking inverse z-transforms, the unit step response of the system is
n n
1 1 1 8
yn = (−2) × + × + n = 0, 1, 2, . . .
2 3 4 3
Notice carefully the form of this unit step response - the first two terms decrease as n increases and
are called transients. Thus
8
yn → as n→∞
3
8
and the term is referred to as the steady state part of the unit step response.
3
Combinations of systems
The concept of transfer function enables us to readily analyse combinations of discrete systems.
Series combination
Suppose we have two systems S1 and S2 with transfer functions H1 (z), H2 (z) in series with each
other. i.e. the output from S1 is the input to S2 .
Figure 13
72 HELM (2015):
Workbook 21: z-Transforms
®
{xn } {yn }
H1 (z)H2 (z)
X(z) Y (z)
Figure 14
Task
Obtain (a) the transfer function (b) the governing difference equation of the system
obtained by connecting two first order systems S1 and S2 in series. The governing
equations are:
S1 : yn − ayn−1 = bxn
S2 : yn − cyn−1 = dxn
(a) Begin by finding the transfer function of S1 and S2 and then use (6):
Your solution
HELM (2015): 73
Section 21.4: Engineering Applications of z-Transforms
Answer
b
S1 : Y (z) − az −1 Y (z) = bX(z) so H1 (z) =
1 − az −1
d
S2 : H2 (z) =
1 − cz −1
so the series arrangement has transfer function
bd
H(z) =
(1 − az −1 )(1 − cz −1 )
bd
=
1 − (a + c)z −1 + acz −2
If X(z) and Y (z) are the input and output transforms for the series arrangement, then
bdX(z)
Y (z) = H(z) X(z) =
1 − (a + c)z −1 + acz −2
(b) By transfering the denominator from the right-hand side to the left-hand side and taking inverse
z-transforms obtain the required difference equation of the series arrangement:
Your solution
Answer
We have
Y (z)(1 − (a + c)z −1 + acz −2 ) = bdX(z)
Y (z) − (a + c)z −1 Y (z) + acz −2 Y (z) = bdX(z)
from which, using the right shift theorem,
yn − (a + c)yn−1 + acyn−2 = bd xn .
which is the required difference equation.
You can see that the two first order systems in series have an equivalent second order system.
74 HELM (2015):
Workbook 21: z-Transforms
®
Feedback combination
{xn } {wn }
+ H1 (z) Y (z)
W (z)
X(z) +
−1 H2 (z)
Figure 15
For the above negative feedback arrangement of two discrete systems with transfer functions
H1 (z), H2 (z) we have, at zero initial conditions,
Y (z) = W (z)H1 (z) where W (z) = X(z) − H2 (z)Y (z)
Task
Eliminate W (z) and hence obtain the transfer function of the feedback system.
Your solution
Answer
so
Y (z)(1 + H2 (z)H1 (z)) = X(z)H1 (z)
Y (z) H1 (z)
∴ =
X(z) 1 + H2 (z)H1 (z)
This is the required transfer function of the negative feedback system.
HELM (2015): 75
Section 21.4: Engineering Applications of z-Transforms
2. Convolution and z-transforms
Consider a discrete system with transfer function H(z)
{xn } {yn }
H(z)
X(z) Y (z)
Figure 16
We know, from the definition of the transfer function that at zero initial conditions
Y (z) = X(z)H(z) (7)
We now investigate the corresponding relation between the input sequence {xn } and the output
sequence {yn }. We have seen earlier that the system itself can be characterised by its unit impulse
response {hn } which is the inverse z-transform of H(z).
We are thus seeking the inverse z-transform of the product X(z)H(z). We emphasize immediately
that this is not given by the product {xn }{hn }, a point we also made much earlier in the workbook.
We go back to basic definitions of the z-transform:
Y (z) = y0 + y1 z −1 + y2 z −2 + y3 z −3 + . . .
X(z) = x0 + x1 z −1 + x2 z −2 + x3 z −3 + . . .
H(z) = h0 + h1 z −1 + h2 z −2 + h3 z −3 + . . .
Hence, multiplying X(z) by H(z) we obtain, collecting the terms according to the powers of z −1 :
x0 h0 + (x0 h1 + x1 h0 )z −1 + (x0 h2 + x1 h1 + x2 h0 )z −2 + . . .
Task
Write out the terms in z −3 in the product X(z)H(z) and, looking at the emerging
pattern, deduce the coefficient of z −n .
Your solution
76 HELM (2015):
Workbook 21: z-Transforms
®
Answer
(x0 h3 + x1 h2 + x2 h1 + x3 h0 )z −3
which suggests that the coefficient of z −n is
x0 hn + x1 hn−1 + x2 hn−2 + . . . + xn−1 h1 + xn h0
.. ..
. .
z −n : yn = x0 hn + x1 hn−1 + x2 hn−2 + . . . + xn−1 h1 + xn h0 (9)
n
X
= xk hn−k (10a)
k=0
n
X
= hk xn−k (10b)
k=0
The sequence {yn } whose n th term is given by (9) and (10) is said to be the convolution (or more
precisely the convolution summation) of the sequences {xn } and {hn },
The convolution of two sequences is usually denoted by an asterisk symbol (∗).
where the general term of {xn } ∗ {hn } is in (10a) and that of {hn } ∗ {xn } is in (10b).
In words: the output sequence {yn } from a linear time invariant system is given by the convolution
of the input sequence with the unit impulse response sequence of the system.
HELM (2015): 77
Section 21.4: Engineering Applications of z-Transforms
Key Point 18
{xn } {yn }
H(z)
X(z) Y (z)
Figure 17
We have, at zero initial conditions
Y (z) = X(z)H(z) (definition of transfer function)
{yn } = {xn } ∗ {hn } (convolution summation)
where yn is given in general by (9) and (10) with the first four terms written out explicitly in (8).
Although we have developed the convolution summation in the context of linear systems the proof
given actually applies to any sequences i.e. for arbitrary causal sequences say {vn } {wn } with z-
transforms V (z) and W (z) respectively:
Z−1 {V (z)W (z)} = {vn } ∗ {wn } or, equivalently, Z({vn } ∗ {wn }) = V (z)W (z).
Indeed it is simple to prove this second result from the definition of the z-transform for any causal
sequences {vn } = {v0 , v1 , v2 , . . .} and {wn } = {w0 , w1 , w2 , . . .}
n
X
Thus since the general term of {vn } ∗ {wn } is vk wn−k
k=0
we have
∞
( n )
X X
Z({vn } ∗ {wn }) = vk wn−k z −n
n=0 k=0
Putting m = n − k or n = m + k we obtain
∞ X
X ∞
Z({vn } ∗ {wn }) = vk wm z −(m+k) (Why is the lower limit m = 0 correct?)
m=0 k=0
Finally,
∞
X ∞
X
−m
Z({vn } ∗ {wn }) = wm z vk z −k = W (z)V (z)
m=0 k=0
78 HELM (2015):
Workbook 21: z-Transforms
®
Example 2
Calculate the convolution {yn } of the sequences
{vn } = {an } {wn } = {bn } a 6= b
(i) directly (ii) using z-transforms.
Solution
(i) We have from (10)
n
X n
X
yn = vk wn−k = ak bn−k
k=0 k=0
n
n
X a k
= b
k=0
b
a a 2 a n
n
= b 1+ + + ...
b b b
a
The bracketed sum involves n + 1 terms of a geometric series of common ratio .
b
a n+1
1−
n b
∴ yn = b a
1−
b
(bn+1 − an+1 )
=
(b − a)
−1 z2
∴ yn = Z { }
(z − a)(z − b)
bn+1 − an+1
= using partial fractions or residues
(b − a)
HELM (2015): 79
Section 21.4: Engineering Applications of z-Transforms
Task
Obtain by two methods the convolution of the causal sequence
{2n } = {1, 2, 22 , 23 , . . .}
with itself.
Your solution
Answer
(a) By direct use of (10) if {yn } = {2n } ∗ {2n }
n
X n
X
k n−k n
yn = 2 2 =2 1 = (n + 1)2n
k=0 k=0
80 HELM (2015):
Workbook 21: z-Transforms
®
This result follows, at least informally, from the definition of the z-transform:
F (z) = f0 + f1 z −1 + f2 z −2 + . . .
from which, taking limits as z → ∞ the required result is obtained.
Task
Obtain the z-transform of
f (n) = 1 − an , 0<a<1
Verify the initial value theorem for the z-transform pair you obtain.
Your solution
Answer
Using standard z-transforms we obtain
z z
Z{fn } = F (z) = −
z−1 z−a
1 1
= −1
−
1−z 1 − az −1
hence, as z → ∞ : F (z) → 1 − 1 = 0
Similarly, as n → 0
fn → 1 − 1 = 0
so the initial value theorem is verified for this case.
HELM (2015): 81
Section 21.4: Engineering Applications of z-Transforms
Final value theorem
Suppose again that {fn } is a sequence with z-transform F (z). We further assume that all the poles
of F (z) lie inside the unit circle in the z−plane (i.e. have magnitude less than 1) apart possibly from
a first order pole at z = 1.
The ‘final value’ of fn i.e. lim fn is then given by lim fn = lim(1 − z −1 )F (z)
n→∞ n→∞ z→1
Example
Again consider the sequence f n = 1 − an 0 < a < 1 and its z-transform
z z 1 1
F (z) = − = −1
−
z−1 z−a 1−z 1 − az −1
Clearly as n → ∞ then fn → 1.
Considering the right-hand side
(1 − z −1 )
(1 − z −1 )F (z) = 1 − → 1 − 0 = 1 as z → 1.
1 − az −1
Note carefully that
z z
F (z) = −
z−1 z−a
has a pole at a (0 < a < 1) and a simple pole at z = 1.
The final value theorem does not hold for z-transform poles outside the unit circle
z
e.g. fn = 2n F (z) =
z−2
Clearly fn → ∞ as n → ∞
whereas
−1 z−1 z
(1 − z )F (z) = → 0 as z → 1
z (z − 2)
82 HELM (2015):
Workbook 21: z-Transforms
®
Exercises
1. A low pass digital filter is characterised by
yn = 0.1xn + 0.9yn−1
Two such filters are connected in series. Deduce the transfer function and governing difference
equation for the overall system. Obtain the response of the series system to (i) a unit step and
(ii) a unit alternating input. Discuss your results.
yn = xn − 0.7xn−1 + 0.4yn−1
yn = 0.9xn−1 − 0.7yn−1
are connected in series. Find the difference equation governing the overall system.
yn = 6xn−1 + 5yn−1
yn = αxn−1 + βyn−1
H1 (z)
H3 (z) =
1 + H1 (z)H2 (z)
and determine values for the parameters α and β if H3 (z) is to have a second order pole at
z = 0.5. Show briefly why the feedback systems S3 stabilizes the original system.
[Hint: yn − yn−1 = n2 ]
5. Evaluate each of the following convolution summations (i) directly (ii) using z-transforms:
HELM (2015): 83
Section 21.4: Engineering Applications of z-Transforms
Answers
3. α = 3.375 β = −4
n
X (2n + 1)(n + 1)n
4. k2 =
k=1
6
1
5. (a) (an+1 − bn+1 ) (b) (n + 1)an (c) δn−8 (d) {1, 2, 3, 4, 3, 2, 1}
(a − b)
84 HELM (2015):
Workbook 21: z-Transforms
®
Introduction
A sequence can be obtained by sampling a continuous function or signal and in this Section we
show first of all how to extend our knowledge of z-transforms so as to be able to deal with sampled
signals. We then show how the z-transform of a sampled signal is related to the Laplace transform
of the unsampled version of the signal.
HELM (2015): 85
Section 21.5: Sampled Functions
1. Sampling theory
If a continuous-time signal f (t) is sampled at terms t = 0, T, 2T, . . . nT, . . . then a sequence of
values
{f (0), f (T ), f (2T ), . . . f (nT ), . . .}
is obtained. The quantity T is called the sample interval or sample period.
f (t)
------
t
T 2T nT
Figure 18
In the previous Sections of this Workbook we have used the simpler notation {fn } to denote a
sequence. If the sequence has actually arisen by sampling then fn is just a convenient notation for
the sample value f (nT ).
Most of our previous results for z-transforms of sequences hold with only minor changes for sampled
signals.
So consider a continuous signal f (t); its z-transform is the z-transform of the sequence of sample
values i.e.
X∞
Z{f (t)} = Z{f (nT )} = f (nT )z −n
n=0
We shall briefly obtain z-transforms of common sampled signals utilizing results obtained earlier. You
may assume that all signals are sampled at 0, T, 2T, . . . nT, . . .
Unit step function
1 t≥0
u(t) =
0 t<0
Since the sampled values here are a sequence of 1’s,
1
Z{u(t)} = Z{un } =
1 − z −1
z
= |z| > 1
z−1
86 HELM (2015):
Workbook 21: z-Transforms
®
Ramp function
t t≥0
r(t) =
0 t<0
The sample values here are
{r(nT )} = {0, T, 2T, . . .}
z
The ramp sequence {rn } = {0, 1, 2, . . .} has z-transform .
(z − 1)2
Tz
Hence Z{r(nT )} = since {r(nT )} = T {rn }.
(z − 1)2
Task
Obtain the z-transform of the exponential signal
−αt
e t≥0
f (t) =
0 t < 0.
[Hint: use the z-transform of the geometric sequence {an }.]
Your solution
Answer
The sample values of the exponential are
{1, e−αT , e−α2T , . . . , e−αnT , . . .}
i.e. f (nT ) = e−αnT = (e−αT )n .
z
But Z{an } =
z−a
z 1
∴ Z{(e−αT )n } = −αT
= −αT
z−e 1−e z −1
HELM (2015): 87
Section 21.5: Sampled Functions
Sampled sinusoids
Earlier in this Workbook we obtained the z-transform of the sequence {cos ωn} i.e.
z 2 − z cos ω
Z{cos ωn} =
z 2 − 2z cos ω + 1
Hence, since sampling the continuous sinusoid
f (t) = cos ωt
yields the sequence {cos nωT } we have, simply replacing ω by ωT in the z-transform:
Task
Obtain the z-transform of the sampled version of the sine wave f (t) = sin ωt.
Your solution
Answer
z sin ω
Z{sin ωn} =
z 2 − 2z cos ω + 1
∴ Z{sin ωt} = Z{sin nωT }
z sin ωT
= 2
z − 2z cos ωT + 1
88 HELM (2015):
Workbook 21: z-Transforms
®
Shift theorems
These are similar to those discussed earlier in this Workbook but for sampled signals the shifts are
by integer multiples of the sample period T . For example a simple right shift, or delay, of a sampled
signal by one sample period is shown in the following figure:
f (nT )
t
T 2T 3T
f (nT − T )
t
T 2T 3T 4T
Figure 19
The right shift properties of z-transforms can be written down immediately. (Look back at the shift
properties in Section 21.2 subsection 5, if necessary:)
If y(t) has z-transform Y (z) which, as we have seen, really means that its sample values {y(nT )}
give Y (z), then for y(t) shifted to the right by one sample interval the z-transform becomes
Z{y(t − T )} = y(−T ) + z −1 Y (z)
The proof is very similar to that used for sequences earlier which gave the result:
Z{yn−1 } = y−1 + z −1 Y (z)
Task
Using the result
Z{yn−2 } = y−2 + y−1 z −1 + z −2 Y (z)
write down the result for Z{y(t − 2T )}
Your solution
Answer
Z{y(t − 2T )} = y(−2T ) + y(−T )z −1 + z −2 Y (z)
These results can of course be generalised to obtain Z{y(t − mT )} where m is any positive integer.
In particular, for causal or one-sided signals y(t) (i.e. signals which are zero for t < 0):
Z{y(t − mT )} = z −m Y (z)
Note carefully here that the power of z is still z −m not z −mT .
HELM (2015): 89
Section 21.5: Sampled Functions
Examples:
For the unit step function we saw that:
z 1
Z{u(t)} = =
z−1 1 − z −1
Hence from the shift properties above we have immediately, since u(t) is certainly causal,
zz −1 z −1
Z{u(t − T )} = =
z−1 1 − z −1
zz −3 z −3
Z{u(t − 3T )} = =
z−1 1 − z −1
and so on.
u(t − T )
t
T 2T 3T
u(t − 3T )
t
T 2T 3T 4T 5T
Figure 20
while the Laplace transform written symbolically as L{f (t)} is an integral, defined for a continuous
time function f (t), t ≥ 0 as
Z ∞
F (s) = f (t)e−st dt.
0
90 HELM (2015):
Workbook 21: z-Transforms
®
1
L{f (t)} = F (s) =
s+α
which has a (simple) pole at s = −α = s1 say.
As we have seen, sampling f (t) gives the sequence {f (nT )} = {e−αnT } with z-transform
1 z
F (z) = = .
1 − e−αT z −1 z − e−αT
The z-transform has a pole when z = z1 where
z1 = e−αT = es1 T
[Note the abuse of notations in writing both F (s) and F (z) here since in fact these are different
functions.]
Task
The continuous time function f (t) = te−αt has Laplace transform
1
F (s) =
(s + α)2
Firstly write down the pole of this function and its order:
Your solution
Answer
1
F (s) = has its pole at s = s1 = −α. The pole is second order.
(s + α)2
Now obtain the z-transform F (z) of the sampled version of f (t), locate the pole(s) of F (z) and
state the order:
Your solution
HELM (2015): 91
Section 21.5: Sampled Functions
Answer
Consider f (nT ) = nT e−αnT = (nT )(e−αT )n
Tz
The ramp sequence {nT } has z-transform
(z − 1)2
∴ f (nT ) has z-transform
T zeαT T ze−αT
F (z) = = (see Key Point 8)
(zeαT − 1)2 (z − e−αT )2
This has a (second order) pole when z = z1 = e−αT = es1 T .
We have seen in both the above examples a close link between the pole s1 of the Laplace transform
of f (t) and the pole z1 of the z-transform of the sampled version of f (t) i.e.
z1 = es1 T (1)
where T is the sample interval.
Multiple poles lead to similar results i.e. if F (s) has poles s1 , s2 , . . . then F (z) has poles z1 , z2 , . . .
where zi = esi T .
The relation (1) between the poles is, in fact, an example of a more general relation between the
values of s and z as we shall now investigate.
Key Point 19
The unit impulse function δ(t) can be defined informally as follows:
P! (t)
1
!
t
!
Figure 21
1
The rectangular pulse P (t) of width ε and height shown in Figure 21 encloses unit area and has
ε
Laplace transform
Z ε
1 −st 1
Pε (s) = e = (1 − e−εs ) (2)
0 ε εs
As ε becomes smaller Pε (t) becomes taller and narrower but still encloses unit area. The unit impulse
function δ(t) (sometimes called the Dirac delta function) can be defined as
92 HELM (2015):
Workbook 21: z-Transforms
®
The Laplace transform, say ∆(s), of δ(t) can be obtained correspondingly by letting → 0 in (2),
i.e.
1
∆(s) = lim (1 − e−εs )
ε→0 εs
(εs)2
1 − (1 − εs + − . . .)
= lim 2! (Using the Maclaurin seies expansion of e−εs )
ε→0 εs
(εs)2 (εs)3
εs − + + ...
= lim 2! 3!
ε→0 εs
= 1
Task
A shifted unit impulse δ(t − nT ) is defined as lim Pε (t − nT ) as illustrated below.
ε→0
P! (t − nT )
1
!
t
nT nT + !
Your solution
HELM (2015): 93
Section 21.5: Sampled Functions
Answer
nT +ε nT +ε
1 −st 1
Z
−st
L{Pε (t − nT )} = e dt = −e
nT ε εs nT
1 −snT
− e−s(nT +ε)
= e
εs
1 −snT
= e (1 − e−sε ) → e−snT as ε → 0
εs
Hence L{δ(t − nT )} = e−snT (4)
which reduces to the result (3)
L{δ(t)} = 1 when n = 0
These results (3) and (4) can be compared with the results
Z{δn } = 1
Z{δn−m } = z −m
for discrete impulses of height 1.
Now consider a continuous function f (t). Suppose, as usual, that this function is sampled at t = nT
for n = 0, 1, 2, . . .
f (t)
------ t
T 2T 3T 4T
Figure 22
This sampled equivalent of f (t), say f∗ (t) can be defined as a sequence of equidistant impulses, the
‘strength’ of each impulse being the sample value f (nT )i.e.
∞
X
f∗ (t) = f (nT )δ(t − nT )
n=0
This function is a continuous-time signal i.e. is defined for all t. Using (4) it has a Laplace transform
∞
X
F∗ (s) = f (nT )e−snT (5)
n=0
If, in this sum (5) we replace esT by z we obtain the z-transform of the sequence {f (nT )} of samples:
∞
X
f (nT )z −n
n=0
94 HELM (2015):
Workbook 21: z-Transforms
®
Key Point 20
The Laplace transform
∞
X
F (s) = f (nT )e−snT
n=0
of a sampled function is equivalent to the z-transform F (z) of the sequence {f (nT )} of sample
values with z = esT .
z
1 1 1
z−1
z
t nT 1
(z − 1)2
2 2 T 2 z(z + 1)
t (nT ) 1
(z − 1)3
z
e−αt e−αnT |e−αT |
z − e−αT
z sin ωT
sin ωt sin nωT 1
z2 − 2z cos ωT + 1
z(z − cos ωT )
cos ωt cos nωT 1
z 2 − 2z cos ωT + 1
T ze−αT
te−αt nT e−αnT |e−αT |
(z − e−αT )2
e−αT z −1 sin ωT
e−αt sin ωt e−αnT sin ωnT |e−αT |
1 − 2e−αT z −1 cos ωT + e−2aT z −2
1 − e−αT z −1 cos ωT
e−αT cos ωt e−αnT cos ωnT |e−αT |
1 − 2e−αT z −1 cos ωT + e−2aT z −2
Note: R is such that the closed forms of F (z) (those listed in the above table) are valid for |z| > R.
HELM (2015): 95
Section 21.5: Sampled Functions
Table of z-transforms
fn F (z) Name
δn 1 unit impulse
δn−m z −m
z
un unit step sequence
z−1
z
an geometric sequence
z−a
z
eαn
z − eα
z sinh α
sinh αn
z2 − 2z cosh α + 1
z 2 − z cosh α
cosh αn
z 2 − 2z cosh α + 1
z sin ω
sin ωn
z2 − 2z cos ω + 1
z 2 − z cos ω
cos ωn
z 2 − 2z cos ω + 1
ze−α sin ω
e−αn sin ωn
z 2 − 2ze−α cos ω + e−2α
z 2 − ze−α cos ω
e−αn cos ωn
z 2 − 2ze−α cos ω + e−2α
z
n ramp sequence
(z − 1)2
z(z + 1)
n2
(z − 1)3
z(z 2 + 4z + 1)
n3
(z − 1)4
z
n
a fn F
a
dF
n fn −z
dz
96 HELM (2015):
Workbook 21: z-Transforms
Index for Workbook 21