Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
The Z Transform
Problems
You are at: Basic Concepts - Background From Linear Systems/Transforms - Z-Transforms - Application To Systems
Click 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:
Goals
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, yk. The subscript "k" indicates a
sampled time interval and that yk is the value of y(t) at the kth sample
instant.
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, yk.
Z[y ] = Y[z]
k
Example
yk = yoak
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 yk = yoak. Put that expression into the sum to get.
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
2z/(z - 0.9)
We can plot the pole and zero for this function, and that plot is shown
below.
Let's think about this signal a little bit more.
Example
yk = yoak
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.
yk = yoak
We will first examine the unit impulse in the sampled world. We'll
call that impulse k.
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.
Example/Simulation
These signals have some interesting properties, and we can make a few
observations.
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.
Example
fk = f(kT) = e-kTsin(kT)
fk = f(kT) = e-kTsin(kT)
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.
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.
f1k = [e-kT+jkT]
fk = f1k + f2k
fk = [(e-T+jT)k]/2j - [(e-T-jT)k]/2j
fk = fo[(a)k - (a*)k]
o Note, a* is the complex conjugate of a, and a = e-T+jT.
o fo = 1/2j
We can combine these two terms, if that is desired. The result is:
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-
sin(kT), used above. With these values we can compute the pole
kT
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. 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.
An Observation About Decay Rate
z1 = e-T-jT
z2 = e-T+jT
The critical observation to be made is that the response has terms like
the expression below, which is repeated from the material above.
fk = f(kT) = e-kTsin(kT)
Then, we should realize that the critical term is the envelope of the
response, and that is determined by:
Envelopek = e-kT= (e-T)k
Or, in other words, the magnitude of the poles (And since they
are complex conjugates, they both have the same magnitude.)
determines the decay rate per sample period. That decay
rate/sample period id:
-T
o Decay Rate/Sample Period = e
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.
= 0.05,
= .3
T = 1.0
Now, note the following for this example.
The decay factor, e-T = e-0.05, so each sample interval, the bound
on the sinusoid will decrease to e-0.05 of the value the preceding
sample period. That's approximately a 5% decrease to 0.951
times the preceding value.
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-jT
z2 = e-T+jT
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:
fk = f(kT) = e-kTsin(kT)
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.
Example
E9 Here is a simulator which allows you to input the decay rate and
the anglular change between samples.
Problem
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.
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.
Example
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:
o one up,
o one at zero,
o one down, and
o one at zero, etc.
We can sum up what you should have obtained from this part of
the lesson.
And these were part of the set of goals enumerated early in this
lesson.
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:
The first term in the sum, for k = 0, is y-1. We will assume that
the signals we deal with - including yk 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.
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.
Now, also consider the transform of the same sequence delayed by one
sample period.
Problems
o Introduction to Z Transforms
o Application To Systems - Transfer Functions
The Z Transform
Discrete Data
What is a discrete-time system and why do we care about
it?
Until now we have assumed that time is continuous. In other words, time can take
on any value, and this is generally true of linear physical systems involving
components as capacitors, masses, thermal resistances... However, computers are
increasingly being integrated into systems. For the computer, time is not continuous,
it passes in discrete intervals. So whenever a computer is being used, it is important
to understand the ramifications of the inherently discrete nature of time. As with the
Laplace Transform, we will assume that functions of interest are equal to zero for
time less than zero.
diagram at the right. In this diagram x(t) represents a continuous-time signal that is
sampled every T seconds, the resulting signal is called x*(t). This represents a
continuous-time signal that is measured by a computer every T seconds that results
in a sampled signal. A common example of this is music stored on a CD. The
continous-time signal is generated by the human voice, pianos, guitars... and is
sampled 44,100 times per second. The resulting sequence of numbers is stored on
the disc for replay at a later time (note).
There are a number of ways to represent the sampling process mathematically. One
way that is commonly used is to immediately represent the sampled signal by a
series x[n]. In this scheme the first sample (i.e., the first time the switch closes, is
x[0], the next sample is x[1], and so on. This technique has the advantage of being
very simple to understand, but makes the connection of the sampled signal to the
Laplace Transform easy to understand. We will use a different technique that is a
bit more complicated mathematically but will, in the long run, yield some physical
insights not afforded by the simpler technique. To understand the sampling process
in this paradigm, first consider a signal that is a train of evenly spaced impulse
functions. We start the sampling function with k=0 because all of the functions that
we consider will be zero for time less than zero. (note)
This sampling process can be clarified with an image. The graph below shows x(t),
If we multiply this by the impulse train, we get the sampled function, x*(t). For this
figure, T=0.1, and the function x(t) is shown as a thin dotted red line for reference.
The key insight of this whole process is that the sampled function, x*(t), is simply a
train of impulses whose magnitude is given by the height of the function x(t) (at the
times x(kT)).We can rewrite the sampled signal as
where x[k] is the magnitude of the kth element in the sequence and x[k]=x(kT).
Generally when we consider a sequence we will implicitly assume a sampling
interval, T, and simply use x[k].
The Z Transform
Since we now have a time domain signal, we wish to see what kind of analysis we
can do in a transformed domain. Let's start by taking the Laplace Transform
of the sampled signal:
This obviously looks different than the Laplace Transforms we have seen in
the past. For one thing, there is an infinite sum. For another, we are used to
seeing functions in the Laplace domain that are the ratios of polynomial in the
variable 's,' not exponentials in 's.'
so
and
This may seem a complicated way to define sequences, but it turns out that many
sequences of interest to us (impulse, unit step, ...) will have Z Transforms that can be
expressed in a compact form.
From the definition of the impulse, every term of the summation is zero except
when k=0. So
Note that this is the same as the Laplace Transform of a unit impulse in
continuous time. The fact that the Z Transform of an impulse is unity will yield
many of the same properties, and allow for many of the same analysis
techniques (i.e., transfer functions...) to be used for discrete time systems that
were used for continuous time systems.
Note that this function is just the exponential function that we are used to
seeing (f(t)=e-αt, with t>0) after it has been sampled at t=kT.
Other Functions
The Z Transform of some other functions is given in the Table of Transforms.
Solution
We can write
so
Some Properties of the Z Transform
As we found with the Laplace Transform, it will often be easier to work with the Z
Transform if we develop some properties of the transform itself.
Linearity
As with the Laplace Transform, the Z Transform is linear.
where
Note that this approximation involves not only t[k] but a time-shifted version as well,
f[k+1]. This is referred to as a difference equation. Let's examine what effect
such a shift has upon the Z Transform. The difference equation will serve the same
purpose with discrete time systems and the Z Transform that differential equations
served with continuous time systems and the Laplace Transform.
If we shift the function to the right by 3 intervals, we get the function x[k-3], shown
below.
To find the Z Transform of this shifted function, start with the definition of the
transform:
Since the first three elements (k=0, 1, 2) of the transform are zero, we can start the
summation at k=3.
Let's try to develop the Z Transform in the same way as we did previously.
Now we run into a problem because we can't easily make the lower bound on
the summation equal to zero. However, we can add in and subtract off the first three
points, without changing the result.
Now we can combine the first two sums into one longer summation, and finish.
What we have done, in effect, is to subtract off the points that were shifted to
negative values of k (highlighted with a darker gray background below).
Once these points are subtracted off, we end up with a sequence that is zero for k
less than zero (below).
Convolution
The convolution property for the Z Transform can be proved in much the same way
as it was for the Laplace Transform. It is stated here without proof. If y[k] is the
convolution of x[k] and h[k],
then
Other Properties
These and other properties of the Z Transform are found on the Z Transform
Properties table.
© Copyright 2005-2013 Erik Cheever This page may be freely used for educational purposes.
Z Transforms
Why Are Z Transforms Used?
The Z Transform
Signals With Multiple Poles
Important Facts About Z Transforms
Problems
You are at: Basic Concepts - Background From Linear Systems/Transforms - Z-Transforms - Application To Systems
Click 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:
At this point, there are an incredible number of systems we use every day
that have digital components which satisfy difference equations.
There are numerous sampled systems that look like the one shown below.
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.
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, yk. The subscript "k" indicates a sampled time interval and
that yk is the value of y(t) at the kth sample instant.
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,
yk.
Z[y ] = Y[z]
k
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.
Example
yk = yoak
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 yk = yoak. Put that expression into the sum to get.
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
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.
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
yk = yoak
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 we do the algebra for the sequence in the example above, we have
yk = yoak
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:
o Y(t) = yoe-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:
o Y(kT) = yk = yoe-kT/ = yoe(-T/)k = yo[e(-T/)k]
Now, you can think of this as yk = yoak with:
o a = [e(-T/)]
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.
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 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.
o 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.
o 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.
And, you should observe that we could, in fact, have performed these
steps in the opposite order, i.e.
o We could have started with the expression above, with two
decaying terms (.7k and.9k), and added in a unit impulse, then
o We could have taken the transform of both terms, including the k
term, and then,
o We could have combined terms to get the function we started with
above
10/[(z - 0.7)(z - 0.9)]
Example/Simulation
These signals have some interesting properties, and we can make a few
observations.
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.
Example
fk = f(kT) = e-kTsin(kT)
fk = f(kT) = e-kTsin(kT)
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.
We can use the expansion for the sine to give us
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.
f1k = [e-kT+jkT]
fk = f1k + f2k
fk = [(e-T+jT)k]/2j - [(e-T-jT)k]/2j
fk = fo[(a)k - (a*)k]
o Note, a* is the complex conjugate of a, and a = e-T+jT.
o 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.
o 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 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. 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.
z1 = e-T-jT
z2 = e-T+jT
The critical observation to be made is that the response has terms like the
expression below, which is repeated from the material above.
fk = f(kT) = e-kTsin(kT)
Then, we should realize that the critical term is the envelope of the response,
and that is determined by:
Envelopek = e-kT= (e-T)k
Or, in other words, the magnitude of the poles (And since they are
complex conjugates, they both have the same magnitude.) determines the
decay rate per sample period. That decay rate/sample period id:
o Decay Rate/Sample Period = e-T
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
z1 = e-T-jT
z2 = e-T+jT
The magnitude of both poles is |e-T|. The factor, ejT, only changes the
angle of the first pole - and the factor, e-jT, 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:
fk = f(kT) = e-kTsin(kT)
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.
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 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.
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.
One interesting particular case is when the poles are on the imaginary
axis. Here is a copy of the simulator we used earlier.
Example
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:
o one up,
o one at zero,
o one down, and
o 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.
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
and that's the theorem.
This one takes a little more effort to demonstrate. First, let's look at the
shifted function.
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.
The first term in the sum, for k = 0, is y-1. We will assume that the
signals we deal with - including yk 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.
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.
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:
Notice how y-1 = 0, and how every term gets cancelled except the very last. In
what is shown y2 is left. In the limit, the "final value" is left. So, we have the
final value theorem as a result.
Problems
o Problem Sampled1A01 - Getting the transform of a decaying
sequence.
o Problem Sampled1A05 - Getting the transform of a double delayed
signal
o Introduction to Z Transforms
o Application To Systems - Transfer Functions