An Introduction To Z Transforms
An Introduction To Z Transforms
Z Transforms
The Z Transform
Problems
You are at: Basi c Concepts - Background From Li near Systems/Transforms - Z-Transforms - Appli cati on To Systems
Cli ck here to return to the Table of Contents
You should know that Laplace transform methods are widely used for analysis in linear
systems. Laplace transform methods are used when a system is described by a linear
differential equation, with constant coefficients. However:
There are numerous systems that are described by difference equations - not
differential equations - and those systems are common and different from those
described by differential equations.
Systems that satisfy difference equations include things like:
Computer controlled systems - systems that take measurements with digital I/O
boards or GPIB instruments, calculate an output voltage and output that voltage
digitally. Frequently these systems run a program loop that executes in a fixed
interval of time.
Other systems that satisfy difference equations are those systems with Digital Filters
- which are found anywhere digital signal processing - digital filtering is done. That
includes:
Digital signal transmission systems like the telephone system.
Systems that process audio signals. For example, a CD contains digital signal
information, and when it is read off the CD, it is initially a digital signal that can
be processed with a digital filter.
At this point, there are an incredible number of systems we use every day that have
digital components which satisfy difference equations.
In continuous systems Laplace transforms play a unique role. They allow system and
circuit designers to analyze systems and predict performance, and to think in different
terms - like frequency responses - to help understand linear continuous systems. They are a
…bucknell.edu/…/Sampled1.html 1/26
3/1/2011 An Introduction to Z Transforms
very powerful tool that shapes how engineers think about those systems. Z-transforms play
the role in sampled systems that Laplace transforms play in continuous systems.
In continuous systems, inputs and outputs are related by differential equations and
Laplace transform techniques are used to solve those differential equations.
In sampled systems, inputs and outputs are related by difference equations and Z-
transform techniques are used to solve those differential equations.
In continuous systems, Laplace transforms are used to represent systems with transfer
functions, while in sampled systems, Z-transforms are used to represent systems with
transfer functions.
There are numerous sampled systems that look like the one shown below.
In a voice transmission situation, the processing might be to band-limit the signal and
filter noise from the signal.
In a control situation, a measurement might be processed to calculate a signal to
control a system.
And there are many other situations.
Goals
In sampled systems you will deal with sequences of samples, and you will need to learn
Z-transform techniques to deal with those signals. In this lesson many of your goals relate
to basic understanding and use of Z-transform techniques. In particular, work toward these
goals.
…bucknell.edu/…/Sampled1.html 2/26
3/1/2011 An Introduction to Z Transforms
Later you will need to learn about transfer functions in the realm of sampled systems. As
you move through this lesson, there are other things you should learn.
What Is A Z Transform?
You will be dealing with sequences of sampled signals. Let us assume that we have a
sequence, y k. The subscript "k" indicates a sampled time interval and that y k is the value of
y(t) at the kth sample instant.
It's easy to get a sequence of this sort if a computer is running an A/D board, and
measuring some physical variable like temperature or pressure at some prescribed interval,
T seconds. A sampled sequence like this plays the same role that a continuous signal plays in
a continuous system. It carries information just like a continuous signal.
We will use the following notation. A large "z" denotes the operation of taking a Z-
transform (i.e., performing the sum above) and the result is usually denoted with an upper-
case version of the variable used for the sampled time function, y k.
Z[yk] = Y[z]
The definition is simple. Take the sequence, and multiply each term in the sequence by
a negative power of z. Then sum all of the terms to infinity. That's it.
Let's look at the transform of some simple functions to show how this definition works.
…bucknell.edu/…/Sampled1.html 3/26
3/1/2011 An Introduction to Z Transforms
Example
E1 We are going to calculate the Z-transform of a simple sequence. So that you can see the
sequence in all its glory, we have a sequence calculator for you. The expression for the
sequence is:
y k = y oak
To use the calculator, input a in the text box and click the Start button. If you want to see
the sequence for a different value of a, click the Clear button to clear the plot, enter a new
value for a and click the Start button to replot. We have used a value of 1.0 for the
starting value.
The simulator lets you see the sequence for different values of a. We want to get the Z-
transform of the sequence for a general value of a. To do that we calculate the sum above.
But, we know that y k = y oak. Put that expression into the sum to get.
…bucknell.edu/…/Sampled1.html 4/26
3/1/2011 An Introduction to Z Transforms
Things work differently in the z-plane. It's not the same as the s-plane where a pole
must be in the left half of the s-plane to represent a function that decays to zero. Here,
for a function to decay to zero, the pole must be inside the unit circle - shown in red on the
plot. Here is an example.
Example
E2 You have a decaying sampled signal. The signal is 2.0*(.9)k. The Z-transform of the
signal is:
2z/(z - 0.9)
We can plot the pole and zero for this function, and that plot is shown below.
This signal decays to zero, just like a decaying exponential (like e-t/τ)
This signal could, conceivably, have been generated by sampling a decaying exponential.
…bucknell.edu/…/Sampled1.html 5/26
3/1/2011 An Introduction to Z Transforms
In the sampled world, this signal is probably going to play the same role as the
decaying exponential plays in the continuous world.
In the sampled world, the transform of this signal has a pole at z = a. In the continuous
world, the transform of e-t/τ has a pole at s = -1/τ.
Now, let's look at another signal. We'll just change things by making a negative. That
won't change the algebra that we do, but it will change how the function looks.
Example
E3 We are going to calculate the Z-transform of another sequence. The only difference
from the last situation is that we are going to consider negative values for a. We didn't look
at negative values before, but we did ignore the possibility. It's time to rectify that.
y k = y oak
In the calculator, you can input negative values for both the starting value. You should
notice and think about the following points. Try both of those possibilities, and then ponder
the following.
When a is negative, successive points in the plot alternate sign. In other words, there
are oscillations, but they only take two sample periods. Remember that behavior.
We'll revisit it later when we consider multiple real poles.
…bucknell.edu/…/Sampled1.html 6/26
3/1/2011 An Introduction to Z Transforms
When you take the Z-transform, this function has a single pole at z = -a.
Can you sketch where the pole is when a = -0.5?
The simulator still works when a is larger than 1.0 or less than -1.0 (like a = -2.5).
However, the response is not well behaved for those values.
Where is the pole for a larger than 1.0 or less than -1.0?
When we do the algebra for the sequence in the example above, we have
y k = y oak
Again, it pays to compare our results to continuous signal results and to sum up.
There is one other interesting correlation we can make with analog signals. In analog
signals, decaying exponentials are important. Note the following.
Say you have a decaying exponential. We can represent that with a time constant
description:
Y(t) = y oe-t/τ
Now, consider sampling that decaying exponential. Assume that you sample every T
seconds. Then the kth sample (taken a t = kT) is given by:
Y(kT) = y k = y oe-kT/τ = y oe(-T/τ)k = y o[e(-T/τ)k]
…bucknell.edu/…/Sampled1.html 7/26
3/1/2011 An Introduction to Z Transforms
This is a pretty interesting correspondence between sampled and analog signals. Clearly, if
you sample a decaying exponential you get the kind of sequence we have been discussing
earlier. Conversely, any time you have a decaying sequence you might want to think of the
decaying sequence as a sampled decaying exponential - and there may well be times when that
is advantageous.
As with Laplace transforms there are a number of simple signals that are important.
Besides decaying signals, two important signals are the unit impulse and the unit step. Before
we go much further we will look at the Z-transforms of those two signals because they are
important.
We will first examine the unit impulse in the sampled world. We'll call that impulse Δ k.
Remember that this is a sampled signal so it is not defined except for integer values of
k.
…bucknell.edu/…/Sampled1.html 8/26
3/1/2011 An Introduction to Z Transforms
Δ k is zero for k>0, so all those terms are zero.
Δ k is one for k = 0, so that is the only term in the sum.
That means that we have:
Z[Δ k] = Δ ozo = 1
We can see that the sequence, Δ k, is going to play the role that the unit impulse (Dirac
Impulse) plays in continuous signals and systems. Just like the unit impulse, the transform of
Δ k is 1.
Another important signal is the unit step. Here is a unit step in the sampled signal
domain.
To get the expression, U[z] = z/(z - 1), the series can be summed using standard
techniques from calculus. Or, you can divide out the result - z/(z - 1) - to generate the
series. Either way, you should convince yourself that the series is, in fact, correct.
To this point we have considered some simple functions in the sampled time domain.
They include the following:
There are other interesting signals. The ones considered to this point are among the
…bucknell.edu/…/Sampled1.html 9/26
3/1/2011 An Introduction to Z Transforms
simplest and most fundamental signals. There are more complex signals.
We haven't considered signals with more than one pole. Next, we will consider a signal
with two poles.
There are tools that you have available from work with Laplace transforms.
For example, with two real poles you should be able to divide the transform into
two parts, each with one real pole, using partial fractions. Then you can analyze
each part separately.
Conversely, a sequence with two decaying exponential sequences should give two
poles. That should generalize to more complex signals.
Clearly there are lots of interesting situations with multiple poles, and we need to
examine some situations there. Let's look at a case with two real poles.
Taking the inverse Z-transform, we find the following sequence. Note Δ k is a unit
impulse at k = 0.
And, you should observe that we could, in fact, have performed these steps in the
opposite order, i.e.
We could have started with the expression above, with two decaying terms (.7k
and.9k), and added in a unit impulse, then
We could have taken the transform of both terms, including the Δ k term, and then,
We could have combined terms to get the function we started with above
10/[(z - 0.7)(z - 0.9)]
Example/Simulation
…bucknell.edu/…/Sampled1.html 10/26
3/1/2011 An Introduction to Z Transforms
E4 Here is a simulator that will compute the inverse transform of:
…bucknell.edu/…/Sampled1.html 11/26
3/1/2011 An Introduction to Z Transforms
The oscillations are more pronounced (wilder?).
These signals have some interesting properties, and we can make a few observations.
The number of decaying terms (ak terms) determines the number of poles.
In the cases we considered, the poles were real.
With real pole any oscilations we encountered were of the type where the cycle
period was just two sample periods, i.e. the signal went up, then it went down, then
back up, etc.
We know that there are other kinds of signals with oscillations. We especially know
that there are probably signals that take many sample periods to complete an oscillation.
Think of measuring temperature every hour during the day. If you have two identical days
in a row, you would have 24 samples in a period. In the next section we will examine signals
with those properties.
A signal with two real poles is a simple case of a more general situation. In continuous
signals we often encounter decaying sinusoids. Those signals have a time representation given
below.
f(t) = e-akTsin(bt)
Note, this signal starts at zero for t = 0. A plot of a signal of this sort is shown below.
…bucknell.edu/…/Sampled1.html 12/26
3/1/2011 An Introduction to Z Transforms
Example
E5 Imagine that we have a decaying sinusoid - as above - and that we sample the sinusoid at
intervals of T seconds. We would have a sampled signal:
The decaying sinusoid is similar to the alternating decaying signal, but it has significant
differences:
Now, we have to evalulate the summation. That doesn't look easy. There is another
way.
We can recognize that sin(β kT) can be represented with a sum of two exponentials.
…bucknell.edu/…/Sampled1.html 13/26
3/1/2011 An Introduction to Z Transforms
We can take each term in this expansion separately. Let's start with the first part of this
expansion. Define a new function for this first part. Call that function f1k.
fk = f1k + f2k
fk = [(e-α T+jβ T)k]/2j - [(e-α T-jβ T)k]/2j
fk = fo[(a)k - (a*)k]
Note, a* is the complex conjugate of a, and a = e-α T+jβ T.
fo = 1/2j
We know how to take the z transform of the sequence, fk. That sequence is just the sum of
two of the decaying signal sequences - even though we now have complex values for "a". So,
let's take the Z-transform of the sequence.
We can combine these two terms, if that is desired. The result is:
The poles are complex conjugates - much like we find complex conjugate poles for
continuous systems with decaying oscillations.
The poles are in the right half of the z-plane, but they still represent decaying
oscillations - contrasting with poles in continuous systems in the left half of the s-
plane.
The poles are inside the unit circle.
The unit circle is the stability boundary for sampled systems, like the imaginary
axis is for continuous systems.
Just as in continuous systems, proximity to the stability boundary implies low relative
stability. Poles in the z-plane that are close to the unit circle will produce slowly
…bucknell.edu/…/Sampled1.html 15/26
3/1/2011 An Introduction to Z Transforms
decaying oscillations just like poles in the s-plane do when they are close to the jω-
axis.
Example/Simulation
E6 Let's look at the numbers we used above. Here they are repeated.
α = 0.05,
β = .3
T = 1.0
These are the values in the expression for the sequence, fk = f(kT) = e-α kTsin(β kT), used
above. With these values we can compute the pole location and the real and imaginary part
of the pole location. Here is the computation.
The plot above, repeated here, shows the pole locations. The plot is consistent with our
calculations.
E7 Here is a simulator in which you can enter the real and imaginary parts for a pair of
complex poles in the z-plane. In this simulator, do the following.
Check the values used above, i.e. Real Part = 0.909 and Imaginary Part = +/-0.281.
…bucknell.edu/…/Sampled1.html 16/26
3/1/2011 An Introduction to Z Transforms
Actually, the simulator should have these values preset.
Determine if the period is correct. You will need to figure out what the period should
be, and remember that the sample period, T, is one second for this simulation.
Determine if the number of samples in a period is correct.
To get a handle on decay rate remember that the poles of a sampled system with two
complex poles are:
z1 = e-α T-jβ T
z2 = e-αT+jβT
The critical observation to be made is that the response has terms like the expression below,
which is repeated from the material above.
Then, we should realize that the critical term is the envelope of the response, and that is
…bucknell.edu/…/Sampled1.html 17/26
3/1/2011 An Introduction to Z Transforms
determined by:
If the magnitude of the pole(s) is less than one, the response will eventually settle out
to a constant value (possibly zero) because the transient part of the response will
eventually die out.
If the magnitude of the pole(s) is greater than one, the response will grow indefinitely.
That's why the unit circle is the stability boundary for sampled systems. Poles outside
the unit circle represent signals that grow in time, while poles inside the unit circle
represent signals that eventually decay to zero.
It is possible to get even more insight into how pole position is related to response.
We can relate these features of the response to the pole position. Let's look at the
example sequence we looked at earlier. Here's the sequence and the pole positions are shown
in the figure at the right below.
α = 0.05,
β = .3
T = 1.0
…bucknell.edu/…/Sampled1.html 18/26
3/1/2011 An Introduction to Z Transforms
The magnitude of the pole - the distance of the pole from the origin - determines the decay
rate. That distance is shown on the plot, and it is equal to e-αT. That's the amount the
envelope of the response decays each sample period. Remember, the poles are at:
z1 = e-α T-jβ T
z2 = e-α T+jβ T
The magnitude of both poles is |e-α T|. The factor, ejβ T, only changes the angle of the
first pole - and the factor, e-jβT, changes the angle of the second pole - but in the opposite
direction.
The same angle, β T, appears in both poles - once positively, and once negatively. That
angle determines how much the angle of the sinusoidal signal (which is also decaying!) changes
each sample period since the response is given by:
Example
α = 0.05,
β = .3
T = 1.0
With β = .3 and T = 1.0, we have β T = .3 radians or about 17.2 degrees. That means
that the sinusoidal part of the response will move through a complete cycle in a little over 21
sample periods. Check that using the simulator.
…bucknell.edu/…/Sampled1.html 19/26
3/1/2011 An Introduction to Z Transforms
Example
E9 Here is a simulator which allows you to input the decay rate and the anglular change
between samples.
Problem
P1 Say that you want the response to decay to within 5% of the starting value in 20 sample
…bucknell.edu/…/Sampled1.html 20/26
3/1/2011 An Introduction to Z Transforms
periods. What should the decay factor be?
Enter your answer in the box below, then click the button to submit your answer. You will
get a grade on a 0 (completely wrong) to 100 (perfectly accurate answer) scale.
Check My Answer
The distance from the origin determines the rate of decay. The closer to the origin the
quicker the decay - as measured in sample periods.
The angle off the horizontal - measured from the origin - determines the number of
sample periods in a period of the sinusoid.
Let's look at some particular cases. In the process we shoul come to a better
understanding of how pole position affects response.
One interesting particular case is when the poles are on the imaginary axis. Here is a
copy of the simulator we used earlier.
Example
…bucknell.edu/…/Sampled1.html 21/26
3/1/2011 An Introduction to Z Transforms
The various examples show behavior that is much like the behavior you would get in a
continuous system by changing the damping ratio.
What is interesting about the response for a ninety degree angular rate is that there
are a lot of points that are zero. To explain that consider the following:
For a nintey degree angular rate, the poles are at +90o and -90o.
The angle of the poles determines the number of samples in a period of oscillation.
For an angle of 90o, there are four samples in a period.
With four samples in a period, in this case there is:
one up,
one at zero,
one down, and
one at zero, etc.
We can sum up what you should have obtained from this part of the lesson.
You should be able to relate the distance of a pole from the origin of the z-plane to the
decay rate.
…bucknell.edu/…/Sampled1.html 22/26
3/1/2011 An Introduction to Z Transforms
You should be able to relate the angle of the pole off the horizontal - measured from
the origin - to the number of samples in an oscilation period.
And these were part of the set of goals enumerated early in this lesson.
When dealing with sampled signals, there are some relationships you need to know. In
continuous systems, multiplication by s comes about by taking the transform of a derivative.
That's important in continuous systems because that's what eventually lets you apply Laplace
transforms to differential equations and develop concepts like the transfer function.
Linearity Theorem
These two theorems are fairly easy to show, and the first is really a special case of the
second - the linearity theorem - so we will just show how the second one comes about. Here
is a statement of the linearity theorem again:
Now, we can follow the following steps, starting with the definition
…bucknell.edu/…/Sampled1.html 23/26
3/1/2011 An Introduction to Z Transforms
The most important theorem for Z-transforms is the real translation theorem - also
known as the shifting theorem. The shifting theorem says:
This one takes a little more effort to demonstrate. First, let's look at the shifted
function.
Shifting the index by -1 (changing k to k-1) delays the function by one sample point.
A function is shown to the right in red. The same function - delayed by one sample period -
is shown in blue on the plot.
Now, let us look at the Z-transform of the shifted function. Here is the summation we
want to perform.
…bucknell.edu/…/Sampled1.html 24/26
3/1/2011 An Introduction to Z Transforms
The first term in the sum, for k = 0, is y -1. We will assume that the signals we deal
with - including y k here - all start at zero so that y -1 = 0.
Noting that, we can let m = k - 1, and substitute that in the sum. Then the sum will run
from m = -1 to infinity. Here is that expression.
Ultimately, we conclude that the transform of the delayed signal is just z-1 times the
transform of the undelayed signal, i.e.:
Z[yk-1] = z-1 Y[z] = Y[z]/z
There are other important results you will need to know for control systems. One of
those is the final value theorem. Here is a statement of the result of the theorem.
Paraphrasing the result, we say that the limit of the sequence as time (k) becomes large
is the limit in the z-domain of (z - 1)/z times the transform of the function, Y[z]. (Note that
(1 - z-1) is the same as (z - 1)/z.)
Now, also consider the transform of the same sequence delayed by one sample period.
…bucknell.edu/…/Sampled1.html 25/26
3/1/2011 An Introduction to Z Transforms
Now, take the limit of this difference as z approaches 1. The sums on the right hand side of
this equation can be written as:
[y o - y -1] + [y 1 - y 0] + [y 2 - y 1] + . . .
Notice how y -1 = 0, and how every term gets cancelled except the very last. In what is
shown y 2 is left. In the limit, the "final value" is left. So, we have the final value theorem
as a result.
Problems
Introduction to Z Transforms
Application To Systems - Transfer Functions
…bucknell.edu/…/Sampled1.html 26/26