Worksheet 10#

To accompany Unit 5.3 The Inverse Z-Transform#

Colophon#

This worksheet can be downloaded as a PDF file. We will step through this worksheet in class.

An annotatable copy of the notes for this presentation will be distributed before the second class meeting as Worksheet 16 in the Week 9: Classroom Activities section of the Canvas site. I will also distribute a copy to your personal Worksheets section of the OneNote Class Notebook so that you can add your own notes using OneNote.

You are expected to have at least watched the video presentation of Chapter 6.3 of the notes before coming to class. If you haven’t watch it afterwards!

After class, the lecture recording and the annotated version of the worksheets will be made available through Canvas.

Agenda#

  • Inverse Z-Transform

  • Examples using PFE

  • Examples using Long Division

  • Analysis in MATLAB

The Inverse Z-Transform#

The inverse Z-Transform enables us to extract a sequence \(f[n]\) from \(F(z)\). It can be found by any of the following methods:

  • Partial fraction expansion

  • The inversion integral

  • Long division of polynomials

Partial fraction expansion#

We expand \(F(z)\) into a summation of terms whose inverse is known. These terms have the form:

\[k,\;\frac{r_1 z}{z - p_1},\;\frac{r_1 z}{(z - p_1)^2},\;\frac{r_3 z}{z - p_2},\ldots\]

where \(k\) is a constant, and \(r_i\) and \(p_i\) represent the residues and poles respectively, and can be real or complex1.

Notes

  1. If complex, the poles and residues will be in complex conjugate pairs

\[\frac{r_{i} z}{z - p_i} + \frac{r_{i}^* z}{z - p_i^*}\]

Step 1: Make Fractions Proper#

  • Before we expand \(F(z)\) into partial fraction expansions, we must first express it as a proper rational function.

  • This is done by expanding \(F(z)/z\) instead of \(F(z)\)

  • That is we expand

\[\frac{F(z)}{z} = \frac{k}{z} + \frac{r_1}{z-p_1} + \frac{r_2}{z-p_2} + \cdots\]

Step 2: Find residues#

  • Find residues from

\[r_k = \lim_{z\to p_k}(z - p_k)\frac{F(z)}{z} = (z - p_k)\left.\frac{F(z)}{z}\right|_{z=p_k}\]

Step 3: Map back to transform tables form#

  • Rewrite \(F(z)/z\):

\[z\frac{F(z)}{z} = F(z) = k + \frac{r_1z}{z-p_1} + \frac{r_2z}{z-p_2} + \cdots\]

Example 1#

Karris Example 9.4: use the partial fraction expansion to compute the inverse z-transform of

\[F(z) = \frac{1}{(1 - 0.5z^{-1})(1 - 0.75z^{-1})(1 - z^{-1})}\]



















Solution example1.pdf

MATLAB solution#

See example1.mlx. (Also available as example1.m.)

Uses MATLAB functions:

  • collect – expands a polynomial

  • sym2poly – converts a polynomial into a numeric polymial (vector of coefficients in descending order of exponents)

  • residue – calculates poles and zeros of a polynomial

  • ztrans – symbolic z-transform

  • iztrans – symbolic inverse ze-transform

  • stem – plots sequence as a “lollipop” diagram

clear all
cd matlab
format compact
open example1
syms z n
assume(n,'integer')

The denoninator of \(F(z)\)

Dz = (z - 0.5)*(z - 0.75)*(z - 1);

Multiply the three factors of Dz to obtain a polynomial

Dz_poly = collect(Dz)

Make into a rational polynomial#

\(z^2\)

num = [0, 1, 0, 0];

\(z^3 - 9/4 z^2 - 13/8 z - 3/8\)

den = sym2poly(Dz_poly)

Compute residues and poles#

[r,p,k] = residue(num,den)

Symbolic proof#

\[f[n] = 2\left(\frac{1}{2}\right)^n - 9\left(\frac{3}{4}\right)^n + 8\]
% z-transform
fn = 2*(1/2)^n-9*(3/4)^n + 8;
Fz = ztrans(fn)
% inverse z-transform
iztrans(Fz)

Sequence#

n = 0:15;
sequence = subs(fn,n);
stem(n,sequence)
title('Discrete Time Sequence f[n] = 2*(1/2)^n-9*(3/4)^n + 8');
ylabel('f[n]')
xlabel('Sequence number n')

Example 2#

Karris example 9.5: use the partial fraction expansion method to to compute the inverse z-transform of

\[F(z) = \frac{12z}{(z+1)(z - 1)^2}\]



















Solution example2.pdf

MATLAB solution#

See example2.mlx. (Also available as example2.m.)

open example2

Uses additional MATLAB functions:

  • dimpulse – computes and plots a sequence \(f[n]\) for any range of values of \(n\)

Example 3#

Karris example 9.6: use the partial fraction expansion method to to compute the inverse z-transform of

\[F(z) = \frac{z + 1}{(z-1)(z^2 + 2z + 2)}\]



















Solution example3.pdf

MATLAB solution#

See example3.mlx. (Also available as example3.m.)

open example3

Inverse Z-Transform by the Inversion Integral#

The inversion integral states that:

\[f[n] = \frac{1}{j2\pi}\oint_C {F(z){z^{n - 1}}\,dz} \]

where \(C\) is a closed curve that encloses all poles of the integrant.

This can (apparently) be solved by Cauchy’s residue theorem!!

Fortunately (:-), this is beyond the scope of this module!

See Karris Section 9.6.2 (pp 9-29—9-33) if you want to find out more.

Inverse Z-Transform by the Long Division#

To apply this method, \(F(z)\) must be a rational polynomial function, and the numerator and denominator must be polynomials arranged in descending powers of \(z\).

We will work through an example in class.

[Skip next slide in Pre-Lecture]

Example 4#

Karris example 9.9: use the long division method to determine \(f[n]\) for \(n = 0,\,1,\,\mathrm{and}\,2\), given that

\[F(z) = \frac{1 + z^{-1} + 2z^{-2} + 3z^{-3}}{(1 - 0.25z^{-1})(1 - 0.5z^{-1})(1 - 0.75z^{-1})}\]



















Solution example4.pdf

MATLAB#

See example4.mlx. (also available as example4.m.)

open example4

Methods of Evaluation of the Inverse Z-Transform#

Partial Fraction Expansion#

Advantages

  • Most familiar.

  • Can use MATLAB residue function.

Disadvantages

  • Requires that \(F(z)\) is a proper rational function.

Inversion Integral#

Advantage

  • Can be used whether \(F(z)\) is rational or not

Disadvantages

  • Requires familiarity with the Residues theorem of complex variable analaysis.

Long Division#

Advantages

  • Practical when only a small sequence of numbers is desired.

  • Useful when z-transform has no closed-form solution.

Disadvantages

  • Can use MATLAB dimpulse function to compute a large sequence of numbers.

  • Requires that \(F(z)\) is a proper rational function.

  • Division may be endless.

Summary#

  • Inverse Z-Transform

  • Examples using PFE

  • Examples using Long Division

  • Analysis in MATLAB

Coming Next

  • DT transfer functions, continuous system equivalents, and modelling DT systems in Matlab and Simulink.