Flash and JavaScript are required for this feature.

Download the video from iTunes U or the Internet Archive.

**Topics covered:** Methods of implementing the inverse z-transforms: Inspection method, power series, partial fraction expansion, and contour integration.

**Instructor:** Prof. Alan V. Oppenheim

Lecture 6: The Inverse z-Tr...

## Related Resources

The Inverse z-Transform (PDF)

The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To make a donation or view additional materials from hundreds of MIT courses, visit MIT OpenCourseWare at ocw.mit.edu.

ALAN OPPENHEIM: Well, in the last lecture we introduced the z transform. In this lecture, I'd like to go backwards. That is, I'd like to introduce the inverse z transform and demonstrate some of its properties with a few examples.

To begin with, let me remind you of the z transform relationship as we talked about it in the last lecture. The z transform X of z of a sequence x of n is given by the sum of x of n times z to the minus n.

The inverse z transform, of course, is the relationship, or the set of rules, that allow us to obtain x of n the original sequence from its z transform, x of z. There are a variety of methods that can be used for implementing the inverse z transform. Some of them are somewhat informal methods. And others, one in particular which we'll talk about, is a somewhat formal method.

To begin with, an informal method and a method that, in fact, most of us tend to use the most often is a method that we could refer to as the inspection method for computing the inverse z transform. Basically, the inspection method says if we've computed a z transform from a sequence, then by looking at that z transform, we can recognize more or less by inspection the sequence that that z transform came from.

For example, we have worked several times now the computation of the z transform of an exponential sequence, which is a right sided sequence, and gotten is the answer, or the z transform, 1 over 1 minus a z to the minus one, with a region of convergence for the magnitude of z greater than the magnitude of a. Consequently, having worked that example, if I now present you with this z transform and ask you what sequence generated it. One way of doing that, obviously, is by inspection. By recognizing that this sequence generates that z transform.

Another example that we've worked several times now is the exponential sequence, which is left sided. That is 0 for n greater than zero, generating the same ratio of polynomials as in the right sided exponential, but with a region of convergence which is the interior of a circle rather than in this case where the region of convergence is the exterior of a circle. And in fact, it was the comparison between these two z transforms that caused us to focus in the last lecture on the importance of the region of convergence.

So this is one method, which I emphasize again is in fact, one of the most common methods. That is, just simply recognizing the z transform as something that we've computed previously from a sequence. And that obviously also as you work more examples, you build up a larger list of sequences and z transforms which pairs what you can recognize.

The second method for computing the inverse z transform is based on the fact that the z transform relationship is basically a power series in z. That is, if we look back here at the z transform expression, this is essentially a power series relationship which expands x of z in powers of z. Consequently, given a z transform, if we can expand it in terms of powers of z, then we can pick off the coefficients in that expansion as values of the sequence x of n.

For example, let's take the sequence, sorry the z transform x of z, which is 1 over 1 minus a z to the minus 1. Or we can rewrite it as z over z minus a. Now this of course is a z transform whose inverse we know how to compute by inspection. However, we can also compute the inverse z transform by expanding this expression in a power series. Let's divide 1 by 1 minus a z to the minus 1, and then recognize the coefficients in that expansion as values of the sequence X of n.

So carrying that out. We have 1 divided into 1 is 1. Multiplying back we have 1 minus a z to the minus 1. Subtracting we then have a z to the minus 1. Dividing by 1 we then have a times z to the minus 1. Multiplying down again, we have a z to the minus 1 minus a squared z to the minus 2. Subtracting we have a squared z to the minus 2. Dividing by 1 we have a squared z to the minus 2. And if we continue this, we'll generate terms 1, a times z to the minus 1, a squared times z to the minus 2, a cubed times z to the minus 3, et cetera.

This series will continue with an infinite number of terms. And we can recognize then this as the expansion of x of z in the form the sum of x n times z to the minus n. Consequently, we can recognize that apparently x of n is 1 at n equal zero, a at n equals 1, a squared at n equals 2, a cubed at n equals 3, etc.

Of course, there are lots of ways of expanding a function like this in a power series. For example, if I simply reverse the order of these two terms and carried out the division, this isn't the series I'd get. What I'd get instead is the series, which is minus a to the minus 1 times z, minus a to the minus 2 times z squared, minus a to the minus 3 times z cubed, etc.

In that case, if this was the expansion, then what I would have to recognize as the sequence corresponding to this is the sequence which is 0 at n equals zero. It has no terms of the form z to the minus a positive power. So apparently, it's all 0 for n greater than zero. And it's minus a to the minus 1 at n equals minus 1, minus a to the minus 2 at n equals minus 2, etc.

So in fact, for this example, I could expand this either in this power series, or I could expand it in this power series. Well, which power series is the right power series? We know in fact that given just this ratio of polynomials, there are several choices for the sequence that it corresponds to depending on the region of convergence. If I associate as the region of convergence the magnitude of z greater than the magnitude of a, then it's this power series that converges. And this power series diverges.

So for that region of convergence, that is with the magnitude of z greater than the magnitude of a as the region of convergence, this is the power series. And consequently, the answer is a to the n times u of n, which of course is consistent with what we know already or equivalently consistent with the inspection method.

On the other hand, if the region of convergence was the magnitude of z less than the magnitude of a, then it's this power series that converges. And consequently in that case, we get a left sided sequence, which again is consistent with what we know either from the inspection method or equivalently from the examples that we've worked before.

One obvious drawback to the power series is the fact that when we generate the inverse z transform this way, we get the values in the sequence as individual terms. That is, we generate x of n not in closed form. We generate it as a sequence. For simple sequences of course, we can recognize a closed form form for that. But in more complicated cases, we can't.

All right. A third method for generating the inverse z transform is basically an extension of the inspection method, which allows us to take a more complicated z transform expression and expand it out in terms of terms that we can recognize by inspection. And this method I'll refer to as the method based on the partial fraction expansion.

I assume that some of you are familiar with the partial fraction expansion in general for a rational function. But in case you're not or in case you're rusty on it, let me just quickly review what the partial fraction expansion consists of. Let's consider the general function of a variable, I'll take as a complex variable x, which is a rational function in x. It is one polynomial in the numerator divided by a denominator polynomial. And let me remark incidentally that you shouldn't confuse this x with the sequence values x of n that we've been referring to. This is simply some arbitrary complex number, or complex variable.

Now I can in general expand the rational function in terms of an expansion of a form which, at least under certain simple conditions, is a sum of terms of the form of a constant, Rk divided by x minus xk, where the x minus xk are the roots of the denominator polynomial q of x. And these coefficients are referred to as the residues.

Now to expand this rational function in this form without additional terms, I need to apply the restriction, which I'll do for the purposes of this lecture, that the order of the numerator polynomial is less than the order of the denominator polynomial, and that in addition, there are no multiple order roots of the denominator polynomial.

In other words, the denominator polynomial is n-th order, then the n roots of the denominator polynomial are distinct. In the text, there is the more general discussion of the partial fraction expansion when the order of the numerator is greater than or equal to the order of the denominator or if there are multiple order roots. The essential ideas of course don't change. It's just the mechanics of implementing the expansion in the form of the expansion.

So for this lecture we'll assume that the expansion simply has terms of this form. And this then is referred to as the partial fraction expansion of f of x. Now how do we get the coefficients Rk in the expansion? Well essentially by recognizing that if we multiply f of x by one of the denominator factors, say x minus xr, and evaluate that product of x equals xr. Then relating that to this sum, as I've indicated here, when k is equal to r, these two factors cancel out.

When k is not equal to r, then when I substitute x equals xr in here, then this term vanishes. So basically then, what happens inside this sum is that the term inside this sum is equal to 0 for k not equal to r, and it's equal to capital Rr, that is the residue at the pole, x equals xr when k is equal to r.

So consequently, there's only one term left in this sum, which is capital Rr. And therefore the residues, that is capital Rr, can be obtained by multiplying f of x by x minus xr, evaluating the result at x equals xr. And the resulting number is the residue of f of x at the pole x equals xr. That's for the case of simple order poles, that is first order roots of the denominator polynomial. And also for the case when the order of the numerator polynomial is less than or equal to the order of the denominator polynomial.

And just store away for later, because I want to refer back to this point, that in particular, when there are multiple order poles, the evaluation of the residue is somewhat more complicated. In particular it involves computing some derivatives, et cetera. And the more the higher the multiplicity of the pole, the more complicated it is. And that's a point that will sneak back at us toward the end of the lecture.

Now this of course is for a general rational function. Let's apply this now to the inverse z transform. Well, we know that the z transform-- well let's restrict ourselves to the case where the z transform is a rational function of z or z to the minus 1. And consequently we can, referring back to the general notion of the partial fraction expansion, either think of the variable z as what we're calling x over there, in which case we have an expansion of the z transform in the form of the sum on k of ak divided by z minus little ak, where the little ak's are the poles, and the capital Ak's are the residues.

Alternatively, if we interpret z to the minus 1 as x, then we can expand x of z in the form of some other residues Bk divided by z to the minus 1 minus some coefficient, little bk. Or we can rewrite that as capital Bk divided by 1 minus ak z to the minus 1. So here we're expanding in terms of-- we're treating the z transform as a rational function in z. Here we're treating the z transform as a rational function in z to the minus 1.

So what does the method consist of? Well the method consists of expanding x of z in terms of simple terms like this, and then using the inspection method to recognize what the inverse transform is for each of the individual terms. To get the final sequence then, we add those up. That is, we've expressed the z transform as a sum of simple factors. So the sequence, the original sequence, we can express as the sum of the inverse z transform obtained by the expect inspection method of each of the individual factors.

All right. Let's just work a simple example to show you what the mechanics are of this and how it works out. Let's take an example where x of z is 1 over 1 minus 1/2 z to the minus 1 times 1 minus 1/4 z to the minus 1 with a region of convergence which I'll take as the magnitude of z greater than a half. This has two poles of course. One at z equals 1/2, the other at z equals 1/4. And the region of convergence is outside the outermost pole. So what we expect to get is a right sided sequence.

And let's work this one by treating the variable x in our previous discussion as z to the minus 1. And obviously, it doesn't matter which one we use. Although it turns out actually that depending on how you pick it, you either end up with a numerator polynomial whose order is greater than the denominator polynomial, or the other way around.

OK. Well, so we want then to expand this z transform in terms of a sum of factors. And let's just rewrite this to make things a little clearer by multiplying denominator and numerator by 2, by minus 2 rather, and then also by minus 4. We can simply rewrite this as 8 divided by z to minus 1 minus 2 times z to the minus 1 minus 4. So that it's more in the form of x minus a constant times x minus another constant.

All right. Well, so here then we have the z transform that we want to expand in a partial fraction expansion in terms of treating z to the minus 1 as the complex variable x in the expansion. We have two poles, two roots of the denominator polynomial, one at z to the minus 1 equals 2, the other at z the minus 1 equals 4. So we need to calculate the residues at each of those roots. To calculate the residue at z to the minus 1 equals 2, what are the steps?

Well, we multiply this by z to the minus 1 minus 2. That is, x minus 2 where x we're interpreting as z to the minus 1. And then evaluate the result at z to the minus 1 equals 2. Well obviously of course, this term cancels out that term. And we want to do that before we substitute z to the minus 1 equals 2. And then substituting z to the minus 1 equals 2, we get minus 2 left over in the denominator divided into eight. And that's equal to minus 4. So the residue then at z to the minus 1 equals 2 is equal to minus 4.

Similarly, to calculate the residue at the root z to the minus 1 equals 4, we multiply by z to the minus 1 minus 4. Then these two terms will cancel out. Evaluate the resulting expression at z to the minus 1 equals 4. So we have 4 minus 2 is 2 and to 8 is 4. And the residue then at z to the minus 1 equals 4, the residue is equal to 4. Consequently, the partial fraction expansion for x of z, for this x of z, is minus 4, minus 4, over z to the minus 1 minus 2 plus 4 over z to the minus 1 minus 4.

Well finally, let's just put this back in a form that is more the form that we're used to looking at the z transform in. In particular multiplying this piece, numerator and denominator, by minus 1/2, we get 2 over 1 minus 1/2 z to the minus 1. Here, multiplying numerator and denominator by minus 1/4, we get minus 1 over 1 minus 1/4 z to the minus 1. And now we've broken x of z into a form that allows us to use the inspection method. That is, we can recognize from this-- remember that the region of convergence was outside a circle. So we want to interpret the region of convergence to be the same here.

So consequently for this piece we end up with 2 times 1/2 to the n times u of n. That's an n. And for this piece we end up with minus 1 times a quarter to the n times u of n. So by breaking x of z into a sum of components, simple terms, we were then able to apply the inspection method to each one of those to get the resulting z transform in a closed form expression, or at least the sum of some closed form expression.

All right. So that then is basically an extension of the inspection method. When the inspection method by itself doesn't work, it's usually the partial fraction expansion method that one uses, perhaps also in conjunction with some properties of the z transform, which is something that will be going into more in the next lecture.

Now finally, there is a somewhat more formal way of evaluating the inverse z transform. And in some cases, it's important to actually use this to explicitly evaluate the inverse z transform. In other cases, it's important to make reference to the more formal inverse transform relationship to discuss properties of the inverse z transform. So sometimes the formal inverse transform is computationally useful. In other cases, it's useful in proving theorems or developing properties or something of the sort.

Well this method, the final method and the most formal method, is the method that I refer to here as contour integration. And let me basically hand it to you. That is, rather than go through a derivation, let me just simply state what the inverse z transform relationship is. In the text there is a derivation of this. And so for the purposes of the lecture itself, let me just presented. Any objections? No.

So and then also work through at least one example to show you what the mechanics are. It's another nice thing about videotape lectures, there are never any objection. OK. Well, here it is. This is the inverse z transform. What does it say? It says the sequence x of n is 1 over 2 pi j times a contour integral, which I'll return to in a second, of x of z times z to the n minus 1 dz.

If you're not used to looking at an inverse transform relationship like this, let me just indicate that it's surprising how easy it is to verify that, in fact, this is the inverse z transform relationship, basically using the Cauchy residue theorem. But this is it. This is, of course, a complex function. This is a complex integral.

And the important thing to straighten out is this contour c. The contours c is a closed contour in the z plane which encircles the origin. So it's a closed contour. It encircles the origin. It's like a circle that goes around the origin, with another very important condition on it. Which is that it lies inside the region of convergence of x of z.

Well, that's not surprising, because the region of convergence for x of z is the only place where we're allowed to stick in values for z. So obviously quote, we're not allowed to look at values of this integrand except where x of z makes sense, that is except in the region of convergence. So obviously then, we have to evaluate this integral considering only values of z inside the region of convergence.

So contour c is a closed contour in the z plane, encircles the origin, and it lies inside the region of convergence. Now for x of z, a rational function of z, which are the cases we've been talking about, this entire integrand is a rational function. And consequently, a contour integral of this type can be simply evaluated using the notion of residues.

I'll state, and hopefully this is a property of complex contour integrals that you're familiar with, that the integral of a rational function of that type, the integral itself is 2 pi j times the sum of the residues inside the contour. And that 2 pi j cancels out as 1 over 2 pi j. And consequently, x of n is simply the sum of the residues of x of z times z to the n minus 1 at the poles inside the contour c.

The poles of what? The poles not of x and z only, but the poles of the entire integrand. That is, x of z multiplied by z to the n minus 1. Important point, which it's important to keep in mind. The integral or the residues that we're looking at are the residues, not just of x of z, but x of z multiplied by z to the n minus 1.

Another statement, just tuck it away, is that this is valid for both n greater than zero and equal to zero and n less than 0. We'll see in a minute that for n greater than zero, it might be easier to evaluate than for n less than 0, depending on the example. But tuck away the fact that this expression is a valid expression, no matter whether n is positive or negative or of course zero.

All right. Let's look at the mechanics of evaluating the inverse z transform this way. Let's return to the example x of z equals 1 over 1 minus 1/2 z to the minus 1 with a region of convergence the magnitude of z greater than 1/2. And by the way, by now if there's one thing you should have gotten out of these lectures, it certainly should be to be able to recognize what the inverse z transform of this is. It's an example that I guess we bounced around so many times.

All right. Let's look at this z transform. First, let's just look at x of z in the z plane. Here's the z plane. We have a pole at z equals 1/2. And we have a 0 at z equals zero. Here's the unit circle. And in green, what I've indicated is the region of convergence.

Now to do the contour integration, it's not just x of z that we're looking at. It's x of z times z to the n minus 1 equals z to the n over z minus 1/2. Incidentally, what is the contour of integration look like then the z plane for this example? It's a closed contour inside the region of convergence and encircling the origin. So for example, it's a contour that looks like this. And incidentally, it is and I don't think I stress this before, it's a counter-clockwise contour. So this is the contour c. It's a counterclockwise contour. As I've drawn it, I didn't draw a very good circle, partly because I can't. But in fact, it also emphasizes the fact that it doesn't have to be a circle. It just has to be closed, inside the region of convergence, and circling the origin. And a counterclockwise contour.

All right. How many poles of x of z times z to the n minus 1 are there? That is, how many places are there that we have to evaluate residues? Well let's look, first of all, at n greater than or equal to 0. This doesn't introduce any poles. This introduces one pole equals 1/2. So we only need to evaluate the residue of this at this one pole that is at z equals 1/2.

So we want to compute the residue then of x of z times z to the n minus 1 at z equals 1/2. So that z to the n over z minus 1/2 multiplied by z minus 1/2 evaluated and z equals 1/2. These two cancel out. And we end up with simply 1/2 to the n. So for n greater than or equal to 0, the sequence x of n is just a half to the n.

So that's part of the result. Now we have to get the inverse z transform for n less than zero. Well for n less than 0, again of course we have 1 pole and z equal to 1/2. But now, remember that we had this factor, which was z to the n. And for n negative that introduces poles at the origin. And in fact it, introduces n poles.

So for n less than 0, we have not only this pole, but we have n poles at z equals 0. That's a problem. Because now we're going to have to evaluate the residues and each of these poles. And the more negative value of n we're trying to get x of n for, the worse it gets, because the higher the multiplicity of the pole.

All right. But look, we've seen this example before. We know that x of n is 1/2 to the n for n greater than or equal to 0 and it's 0 for n less than 0. As we knew that from other times that we've worked this example. So obviously, there must be some easy way to get the fact that x of n, in fact for this example, is 0 for n less than 0. All right.

Let's take a look at a way, an easy way. Here we have, again, the inverse z transform. x of n is 1 over 2 pi j times this contour integral. And let's simply make a substitution of variables. Let's make the substitution of variables z equal to p to the minus 1, in which case z to the n minus 1 is equal to p to the minus n plus 1. Which means incidentally that with z equal to r e to of the j theta, p, this new variable, is 1 over r times e to the minus j theta.

So now we want to make the substitution of variables in this contour integral. Well, let's see-- dz is minus p to the minus 2, just differentiating this. Well, I'll let you go through the algebra on your own. But if you take this substitution of variables, stuff it into that contour integral, then the result that we end up with is that x of n is equal to minus 1 over 2 pi j, the minus coming from the fact that dz is minus p to the minus 2 times dp. That's that minus sign. x of 1 over p times p to the minus n minus 1 dp.

And what happens to the contour? Well the contour previously was, let's say r e to the j theta. Let's take it as a circular contour. So the contour now is 1 over r e to the minus j theta. That means as one consequence that our old counter-clockwise contour turns into a clockwise contour. So that's what I've indicated here. But we also have this minus sign. And we can use that minus sign to change the direction of the contour. So if we change the contour back to a counterclockwise contour, get rid of the minus sign. Then finally we have the expression x of n is 1 over 2 pi j times the contour integral of capital X of 1 over p p to the minus n minus 1 dp.

And what is this contour now? Well if the old contour C was circular with a radius of r, this contour c prime is a circle with a radius of 1 over r. Well let's just look at what this substitution of variable z to 1 over p did as a matter of fact. Here I've illustrated the z plane. Here I've illustrated the p plane.

The unit circle in the z plane, when I replace z by 1 over p, turns again into the unit circle in the p plane, because the unit circle is where the magnitude of z is 1. And if I take the reciprocal of that, the magnitude is still 1. The important thing is what happened to this contour. Well this contour got converted if it was outside the unit circle into a new contour which is inside the unit circle. And in fact, in general, stuff that was in here, the inside of the unit circle, is going to end up outside the unit circle in the p plane. And things that were outside the unit circle in the z plane are going to end up inside the unit circle in the p plane.

This transformation simply takes stuff outside the unit circle and folds it inside the unit circle, takes things inside the unit circle and folds them outside the unit circle. And it's just simply a substitution of variables.

All right. Now with this substitution of variables, let's return to the example that we've been working. We have our example. x of z is 1 over 1 minus 1/2 z to the minus 1, the magnitude of z greater than 1/2. We want to replace z by 1 over p. So we want x of 1 over p. x of 1 over p, then simply replacing z to the minus 1 by p, is 1 over 1 minus 1/2 times p. If this was true for the magnitude of z greater than 1/2, then this is true for the magnitude of p less than 1/2. So we get minus 2 divided by p minus 2.

If we look at this in the p plane, we have then a pole in the p plane. The pole in the z plane was at z equals 1/2. So the pole in the p plane is at p equals 2. That's now outside the unit circle. The region of convergence, now, is inside the circle of radius 2. And where is the contour of integration c prime? Well that now is inside the circle of radius 2. For example, let's draw it here. So this is now the contour c prime. All right.

We want finally to evaluate the inverse z transform, or the inverse p transform, by looking at the residues of x of 1 over p times p to the minus n minus 1. The residues of that at its roots, at its poles, that are inside the contour of integration c prime. Well, for n less than 0, we have one pole at p equals 2. And for n negative, this will contribute no poles. Therefore, there are no roots of this inside this contour. And consequently, the contour integral is obviously zero.

So x of n is equal to zero for n less than 0. Now for greater than or equal to 0, we have one pole at p equals 2. But then because of this factor, p to the minus n minus 1, we have n plus 1 poles at p equals 0. So now it seems like for n greater than or equal to 0, we're back where we started from. Because now we have these multiple order poles at p equals 0. What do we do about that?

Well, we don't have to do anything about it. Because we already considered the case for n greater than or equal to 0. In that case, we didn't run into multiple order poles at the origin. We used the substitution of variables, z equals 1 over p to basically avoid that problem and to get the answer for n less than 0.

So consequently, the answer that we get, which we finally know to be the right answer in fact, is that x of n is equal to 0 for n less than zero. And as we worked out before, x of n is equal to 1/2 to the n for n greater than or equal to 0. Or finally, x of n is equal to 1/2 to the n times u of n.

All right. That's an example we've worked out now three times. And three times we got the same answer, so it must be right. All right. Well this roughs out the inverse z transform, several methods for getting the inverse z transform. Obviously, to become fluent with the inverse z transform requires working a lot of examples. And you know where you going to have all those examples to work. That is, in the study guide.

And you'll find as I stressed previously, that as you work more and more examples, what you find in computing inverse z transforms is that more and more frequently, you're able to recognize the answer.

Well, in the next lecture, we'll complete the discussion of the z transform. In particular, we'll among other things present some properties of the z transform, which also by the way, help us in computing inverse z transforms. And so in the next lecture, we'll be continuing the topic of the z transform, and in fact concluding the topic. Thank you.

## Welcome!

This OCW supplemental resource provides material from outside the official MIT curriculum.

**MIT OpenCourseWare** is a free & open publication of material from thousands of MIT courses, covering the entire MIT curriculum.

**No enrollment or registration.** Freely browse and use OCW materials at your own pace. There's no signup, and no start or end dates.

**Knowledge is your reward.** Use OCW to guide your own life-long learning, or to teach others. We don't offer credit or certification for using OCW.

**Made for sharing**. Download files for later. Send to friends and colleagues. Modify, remix, and reuse (just remember to cite OCW as the source.)

Learn more at Get Started with MIT OpenCourseWare