Z Transform, their Inverses Transform or System Functions | EECS 216, Papers of Signals and Systems

Material Type: Paper; Professor: Yagle; Class: Intro Signals&Syst; Subject: Electrical Engineering And Computer Science; University: University of Michigan - Ann Arbor; Term: Unknown 1989;

Typology: Papers

Pre 2010

Uploaded on 09/02/2009

koofers-user-dvm-2
koofers-user-dvm-2 🇺🇸

9 documents

1 / 15

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Z-Transforms, Their Inverses
Transfer or System Functions
Professor Andrew E. Yagle, EECS 216 Instructor
Dept. of EECS, The University of Michigan, Ann Arbor, MI 48109-2122
I. Abstract
The purpose of this document is to introduce EECS 216 students to the z-transform and what it’s for. It
also introduces transfer (system) functions and shows how to use them to relate system descriptions.
A. Table of contents by sections:
1. Abstract (you’re reading this now)
2. Forward Z-Transforms: How do I compute z-transforms?
3. Inverse Z-Transforms: How do I “undo” a z-transform?
4. Transfer (System) Functions: What are they for?
5. Poles and Zeros: Transient and Frequency Responses
6. The Atlanta Airport: (Has he completely lost his mind?)
7. Half-Dozen Examples: This stuff is actually very useful!
Why should you care about z-transforms and transfer functions? Because of problems like this:
Given that the response of an LTI system to input (1
2)nu[n] is output {0,0,1}=δ[n2],
Compute the response of the system to input 2 cos( π
3n).Thatis:
If x[n]=(
1
2)nu[n]LTI y[n]={0,0,1},thenx[n]=2cos(
π
3n)LTI y[n]=?
By the end of this document, we will solve this very problem, and quite easily. How? Read on...
II. Forward Z-Transforms
We consider the cases of finite-duration and infinite-duration signals separately.
A. Finite-Duration Signals
Let x[n] be a discrete-time signal which is:
Causal (x[n]=0forn<0)
Finite Duration (x[n]=0forall n>N for some N)
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Z Transform, their Inverses Transform or System Functions | EECS 216 and more Papers Signals and Systems in PDF only on Docsity!

Z-Transforms, Their Inverses

Transfer or System Functions

Professor Andrew E. Yagle, EECS 216 Instructor

Dept. of EECS, The University of Michigan, Ann Arbor, MI 48109-

I. Abstract The purpose of this document is to introduce EECS 216 students to the z-transform and what it’s for. It also introduces transfer (system)functions and shows how to use them to relate system descriptions.

A. Table of contents by sections:

  1. Abstract (you’re reading this now)
  2. Forward Z-Transforms: How do I compute z-transforms?
  3. Inverse Z-Transforms: How do I “undo” a z-transform?
  4. Transfer (System)Functions: What are they for?
  5. Poles and Zeros: Transient and Frequency Responses
  6. The Atlanta Airport: (Has he completely lost his mind?)
  7. Half-Dozen Examples: This stuff is actually very useful!

Why should you care about z-transforms and transfer functions? Because of problems like this:

Given that the response of an LTI system to input ( 12 )nu[n] is output { 0 , 0 , 1 } = δ[n − 2], Compute the response of the system to input 2 cos( π 3 n). That is: If x[n] = ( 12 )nu[n] → LTI → y[n] = { 0 , 0 , 1 }, then x[n] = 2 cos( π 3 n) → LTI → y[n] =?

By the end of this document, we will solve this very problem, and quite easily. How? Read on... II. Forward Z-Transforms We consider the cases of finite-duration and infinite-duration signals separately.

A. Finite-Duration Signals

Let x[n] be a discrete-time signal which is:

  • Causal (x[n] = 0 for n < 0)
  • Finite Duration (x[n] = 0 for all n > N for some N )

The z-transform of x[n] is the polynomial (in z−^1 )

Z{x[n]} = X(z) = x[0] + x[1]z−^1 + x[2]z−^2 +... + x[N ]z−N^ = (x[0]zN^ + x[1]zN^ −^1 +... + x[N ])/zN^ (1)

Why do z-transforms use z−^1 instead of z? “It’s always something”–Gilda Radner on Saturday Night Live. But there is a good reason for this–see below under “Poles and Zeros.” Three important properties of the z-transform that follow from its definition:

  • Linearity: Z{ax[n] + by[n]} = aX(z) + bY (z)where X(z) = Z{x[n]} and Y (z) = Z{y[n]}
    • Use this to break up computation of z-transform (and their inverses)
  • Delays: Z{x[n − D]} = z−DZ{x[n]} = z−DX(z)
    • Delaying a signal by D > 0 multiplies its z-transform by z−D
    • But remember that the z-transform is only defined for causal signals
  • Convolution: Z{x[n] ∗ y[n]} = X(z)Y (z)where X(z) = Z{x[n]} and Y (z) = Z{y[n]}
    • This follows since convolution is polynomial multiplication
    • Just think–no more convolutions to compute! You should like Z already Two examples that pretty much tell the whole story for finite-duration signals:

Z{ 3 , 1 , 4 , 2 , 5 } = 3 + 1z−^1 + 4z−^2 + 2z−^3 + 5z−^4 = 3z^4 + 1z^3 + 4z^2 + 2z + 5)/z^5 Z{ 2 δ[n] + 7δ[n − 2] + 3δ[n − 5]} = 2 + 7z−^2 + 3z−^5 = (2z^5 + 7z^3 + 3)/z^5 (2)

Recall that the underline in the first example shows the location of time n = 0. The second example can be performed either directly from the definition, or by using the linearity and delay properties on Z{δ[n]} = 1.

B. Infinite-Duration Signals

Now let x[n] be a causal signal of infinite duration (i.e., x[n] can be nonzero for arbitrarily large time n). The z-transform of x[n] is now the power series

Z{x[n]} = X(z) = x[0] + x[1]z−^1 + x[2]z−^2 +... =

∑^ ∞

n=

x[n]z−n^ (3)

If you know what a Laplace transform is, this should look like a discrete-time version of it, as indeed it is. If you don’t know what a Laplace transform is, you aren’t missing anything that will help you. The above three properties still hold, but computing X(z)now requires use of:

1 + r + r^2 + r^3 +... = 1/(1 − r) IF |r| < 1 (4)

An example of plugging into this formula:

Z{cos((π/3)n)u[n]} = z

(^2) − z cos(π/3) z^2 − 2 z cos(π/3)+ 1 =^

z^2 − 0. 5 z z^2 − z + 1 (12)

since cos(π/3)= (1 /2). Note the ROC is |z| > |ejω^ | = 1 for any ω.

D. Finite-Duration-Plus-Infinite Duration

The significance of linearity of the z-transform is shown in these two examples:

Z{{ 3 , 1 , 4 } + u[n]} =^3 z

(^2) + 1z + 4 z^2

z − 1 z − 1 +^

z z − 1

z^2 z^2 =

4 z^3 − 2 z^2 + 3z − 4 z^3 − z^2 (13)

Simple enough, but try this:

Z{2 cos((π/3)n)u[n] − { 2 , 1 }} = 2Z{cos((π/3)n)u[n]} − Z{ 2 , 1 } = 2 z

(^2) − z z^2 − z + 1 −^ (2 +^ z

Again, this is algebraically correct, but we can put both terms over a common denominator:

X(z) = 2 z

(^2) − z z^2 − z + 1 −^

2 z + 1 z =^

2 z^2 − z z^2 − z + 1

z z −^

2 z + 1 z

z^2 − z + 1 z^2 − z + 1 =^ −^

z + 1 z^3 − z^2 + z (15)

Note that the degree of the numerator is less than the degree of the denominator. This is called a strictly proper function, and it tell us that x[0] = 0. Why? For any causal function x[n], we have

zlim→∞ X(z)= lim z→∞(x[0] +^ x[1]z−^1 +^ x[2]x−^2 +^.. .) =^ x[0]^ (16)

This is called the Initial Value Theorem for the z-transform. It tells us:

  • If degree[numerator]<degree[denominator] (strictly proper X(z)), then x[0] = 0
  • If degree[numerator]=degree[denominator] (proper X(z)), then x[0] = 0
  • If degree[numerator]>degree[denominator] (improper X(z)), then X(z)is wrong! The above X(z)has degree[numerator]=degree[denominator]-2. This implies x[0] = x[1] = 0. Indeed, note that x[n] was constructed so that this would be the case. Why this obsession with writing X(z)as the ratio of two polynomials? You’ll find out in the next section. This is called a rational function, just as the ratio of two integers is called a rational number.

E. Application of Z-Transform

Already we can use z-transforms to make our life easier. Consider the following problem: Given: An LTI system is described by the difference equation y[n] − 2 y[n − 1] = x[n − 1] − x[n − 2]. Goal: Compute the output y[n] if the input x[n] = 3nu[n]. That is,

x[n] = 3nu[n] → y[n]-2y[n-1]=x[n-1]-x[n-2] → y[n] =? (17)

Solution: Take the z-transforms of the difference equation and of the input. This yields

Y (z) − 2 z−^1 Y (z) = z−^1 X(z) − z−^2 X(z); X(z) = (^) z −z 3 (18)

Inserting the second equation into the first gives

Y (z) = z

− (^1) − z− 2 1 − 2 z−^1

z z − 3 =^

z − 1 (z − 2)(z − 3) =^

z − 3 −^

z − 2 (19)

and just looking at the last expression, we recognize that

y[n] = 2(3)n−^1 u[n − 1] − (2)n−^1 u[n − 1] = (^) RESPONSEFORCED

( (^) like x[n]

+ RESPONSENATURAL

( (^) like h[n]

Note that y[n] has a term that looks like the input (forced response)and a term that looks like the impulse response (natural response). This almost always happens. How did I get that last expression from the next-to-last one? Read on... III. Inverse Z-Transforms As long as x[n] is constrained to be causal (x[n] = 0 for n < 0), then the z-transform is invertible: There is only one x[n] having a given z-transform X(z). Inversion of the z-transform (getting x[n] back from X(z)) is accomplished by recognition: What x[n] would produce that X(z)? Linearity of the z-transform allows us to break up X(z)into parts, each of which can be inverted separately. But usually we will have to use partial fractions to accomplish this (see below).

A. Inversion by Recognition

Sometimes z-transform inversion is easy:

Z−^1 { 2 z^4 + 7z^3 + z^2 + 8z + 3)/z^4 } = Z−^1 {2 + 7z−^1 + z−^2 + 8z−^3 + 3z−^4 } = { 2 , 7 , 1 , 8 , 3 } (21)

As before, this can be performed either directly from the definition, or by using the linearity and delay properties on Z−^1 { 1 } = δ[n]. An example with different types of terms to recognize:

Z−^1

{ (^4) z + 5 z^2 +^

1 − 3 z−^1

= Z−^1 { 4 z−^1 + 5z−^2 }^ + 6Z−^1

1 − 3 z−^1

= { 0 , 4 , 5 } + 6(3)nu[n] (22)

Don’t forget the step functions u[n]–your inverse z-transform must be zero for n < 0. Otherwise it’s wrong half the time, and you should only get half credit for it on an exam!

Z−^1

{ (^7) z z − 1 +^

8 z z − 2

= 7Z−^1

{ (^) z z − 1

+ 8Z−^1

{ (^) z z − 2

= 7u[n] + 8(2)nu[n] (23)

Matlab computes the above partial fraction expansion using [R,P,K]=residue([1 -3],[1 -3 2]); which gives R=[-1 2]’ and P=[2 1]’, so that Residues -1 and 2 are associated with Poles 2 and 1, respectively. There is no constant K since (^) z (^2) −z− 3 z^3 +2 is strictly proper.

C. Inversion Using Partial Fractions

The following six-step procedure computes the inverse z-transform of a proper rational function X(z):

  1. Compute poles {pn} of X(z)by setting denominator polynomial equal to zero and computing roots
  2. Write the partial fraction expansion of X(z)/z as:

X(z) z =^

A 0

z +^

A 1

z − p 1 +^

A 2

z − p 2 +^...^ +^

AN

z − pN^ (26)

  1. Compute the residues {An} of X(z)/z (NOT X(z)) using

An = X z(z )(z − pn)|z=pn = (^) (p (pn^ −^ z^1 )^...^ (pn^ −^ zn)^...^ (pn^ −^ zM^ ) n −^ 0)(pn −^ p 1 )^...^ (pn −^ pn− 1 )(pn −^ pn+1)^...^ (pn −^ pN )^

  1. Having computed the residues {An}, multiply through by z to get:

X(z) = A 0 + A (^1) z −^ z p 1 + A (^2) z −^ z p 2 +... + An z −^ z pN (28)

  1. Compute the inverse z-transform x[n] of X(z)by recognition:

x[n] = A 0 δ[n] + A 1 pn 1 u[n] + A 2 pn 2 u[n] +... + AN pnN u[n] (29)

  1. Complex poles and residues occur in complex conjugate pairs. Simplify each pair using the formula:

Apn^ + A∗(p∗)n^ = 2|A| · |p|n^ cos(ωt + θ)where A = |A|ejθ^ and p = |p|ejω^ (30)

In particular, the frequency ω is the angle of the pole. And don’t forget that factor of two in the front!

D. Real Simple Example (snicker)

Compute the inverse z-transform of X(z) = (^) z (^2) −z− 3 z^3 +. Do you think you can plug in the results of the partial fraction expansion we did above? Guess again:

  1. Compute poles: z^2 − 3 z + 2 = (z − 1)(z − 2)= 0 → p 1 = 1 and p 2 = 2 as before
  2. Write expansion for X(z)/z: X( zz )= A z^0 + (^) zA−^11 + (^) zA−^22
  3. Compute residues: A 0 = (^) (0−(01)(0−3)−2) = − 32. A 1 = (^) (1−(10)(1−3)−2) = 2. A 2 = (^) (2−(20)(2−3)−1) = − 12.
  4. Multiply by z: X(z) = − 32 + 2 (^) z−z 1 − (^12) z−^ z 2
  5. Invert by recognition: x[n] = − 32 δ[n] + 2u[n] − 12 (2)nu[n].
  6. Complex poles and residues? None here. But see below...

E. Simple Complex Example (snicker)

Compute the inverse z-transform of X(z) = (^) z (^2) −^22 zz+.

  1. Compute poles: z^2 − 2 z + 2 = 0 → p 1 = 1 + j and p 2 = p∗ 1 = 1 − j.
  2. Write expansion for X(z)/z: X( zz )= A z^0 + (^) z−(1+Aj) + (^) z−A(1∗−j)
  3. Compute residues: A 0 = (^) (0−(1+j2(0)))(0−(1−j)) = 0. A 1 = (^) (1+j)((1+2(1+j)j−)(1−j)) = −j.
  4. Multiply by z: X(z) = (^) z−−(1+jj) + (^) z−(1j−j)
  5. Invert by recognition: x[n] = −j(1 + j)nu[n] + j(1 − j)nu[n].
  6. Simplify complex: x[n] = 2(√2)n^ sin( π 4 n)since p = 1 + j = √ 2 ejπ/^4 and A = −j = 1e−jπ/^2.

F. Complex Complex Example (snicker)

Compute the inverse z-transform of X(z) = (^) z (^3) +4zz− (^2) +8^1 z+8 (C.T. Chen p. 257).

  1. Compute poles: z^3 + 4z^2 + 8z + 8 = 0 → p 1 = −2; p 2 = 2ej^2.^09 ; p∗ 2 = 2e−j^2.^09
  2. Write expansion for X(z)/z: X( zz )= A z + (^) zB+2 + (^) z− 2 Cej 2. 09 + (^) z− 2 Ce−∗j 2. 09
  3. Compute residues:
    • A = (z − 0) X( zz )|z=0 = (^) (0+2)(0− 2 ej 20 .− (^091) )(0− 2 e−j 2. (^09) ) = − (^18)
    • B = (z + 2) X z(z )|z=− 2 = (^) (−2)(− 2 − 2 ej 2 −. 092 − (^) )(^1 − 2 − 2 e−j 2. (^09) ) = (^38)
    • C = (z − 2 ej^2.^09 ) X( zz )|z=2ej 2. 09 = (^) (2ej 2 .(2 09 e (^) +2)(2j^2.^09 −ej1) 2 ./ 092 e−j 22 .e^09 j− 2. (^09) ) = 0. 19 e−j^2.^29
  4. Multiply by z: X(z) = − 18 + (^38) z+2^ z + (^0) z.^19 − 2 e−ejj 22 .. 0929 + (^0) z.−^192 ee+−jj^22 ..^2909
  5. Invert by recognition: x[n] = − 18 δ[n]+ 38 (−2)nu[n]+(0.19)2nej(2.^09 n−^2 .29)u[n]+(0.19)2ne−j(2.^09 n−^2 .29)u[n]
  6. Simplify complex: x(n) = − 18 δ[n] + 38 (−2)nu[n] + (0.38)2n^ cos(2. 09 n − 2 .29)u[n].

G. Repeated Poles at Origin

There is one case of repeated poles that does arise in practice: repeated poles at z = 0 (z = 0 is called “the origin” when referring to poles and zeros, since it is the origin of the complex plane). We already know that dividing its z-transform by zD^ merely delays x[n]. But we can’t just omit a zD^ in the denominator, compute the inverse z-transform of the remaining part of X(z), and delay the result, since the remaining X(z)may not be proper. Instead, handle this in the way that the following example shows: Compute the inverse z-transform of X(z) = z^3 +2 z 2 z (^) (^2 z+3−1)z +4. Due to the double pole at the origin z = 0, we can’t use partial fractions here. Instead, rewrite X(z)as

X(z) = z

(^3) + 2z (^2) + 3z + 4 z^2 (z − 1) =^

z^3 + 2z^2 + 3z + 4 z^3

z z − 1 = (1 + 2z

− (^1) + 3z− (^2) + 4z− (^3) ) z z − 1 (31)

and we recognize the inverse z-transform of this as

x[n] = { 1 , 2 , 3 , 4 } ∗ u[n] = u[n] + 2u[n − 1] + 3u[n − 2] + 4u[n − 3] (32)

In general, the numerator divided by zM^ becomes a linear combination, which is taken of zM^ divided by the denominator. Note zM^ /zD^ = zM−D; if D > M the remainder becomes a delay of D − M.

B. Frequency Response

Transfer functions can do much more than that. Suppose we input a complex exponential ejωn:

x[n] = ejωn^ → LTI → y[n] = h[n] ∗ ejωn^ =

∑^ ∞

i=

h[i]ejω(n−i)^ =

∑^ ∞

i=

h[i]e−jωiejωn^ = H(ejω^ )ejωn^ (38)

That is, the response to a complex exponential is the complex exponential multiplied by the transfer function evaluated at z = ejω^. This is why I strongly prefer to use H(ejω^ )to designate the frequency response function, unlike the “official” course notes (and many textbooks)which use H(ω). H(ejω^ )also serves as a not-so-subtle reminder that discrete-time functions of frequency are all periodic in ω with period 2π. Continuing with the above example, compute the response of the above system to cos((π/2)n). We have

H(ejπ/^2 ) = H(j) = 2 − (^3 1) j + 1 j^12 = 1 + 3j =

10 ej^1.^25 (39)

So the response is x[n] = cos( π 2 n) → LTI → y[n] = √10 cos( π 2 n + 1.25)(40)

Going the other way: Compute the transfer function of a system having gain function (magnitude response)

|H(ejω^ )| =

(3 + 4 cos ω)^2 + 16 sin^2 ω/

(1 + 2 cos ω)^2 + 4 sin^2 ω (41)

Suppress your first reaction (“How the heck am I supposed to do this?!”)and break the problem down:

  • Magnitude of ratio equals ratio of magnitudes, so we can look at numerator and denominator separately
  • Square root of the sum of squares of two terms: these must be the real and imaginary parts
  • Since H(ejω^ )is conjugate symmetric, its real part must be an even function of ω and its imaginary part must be an odd function. So 3 + 4 cos ω is the real part and ±4 sin ω is the imaginary part
  • Now it becomes clear: the numerator is 3 + 4ejω^ and the denominator is 1 + 2ejω
  • So H(z) = 3+4 1+2zz is one solution; 4+3 2+zz , 3+4 2+zz , 4+3 1+2zz are some others. Other possibilities involve sign changes.

V. Poles and Zeros An important way of representing transfer functions deserves its own section.

A. Definition

Let the transfer function of an LTI system be

H(z) = b^0 z

M (^) +... + bM a 0 zN^ +... + aN^ =^

b 0 (z − z 1 )... (z − zM ) a 0 (z − p 1 )... (z − pN ) (42)

  • The poles of the system are {p 1... pN }
  • The zeros of the system are {z 1... zM }

For example, the transfer function H(z) = ( (zz−−1)(3)(zz−−2)4) has zeros { 1 , 2 } and poles { 3 , 4 }. “Poles” were already defined in the subsection on partial fraction expansions. Poles and zeros are typically plotted on a pole-zero diagram, in which zeros are designated by O (which makes sense)and poles are designated by × (which at least can’t be confused with O). The unit circle

UNIT CIRCLE = {z : |z| = 1} = {z : z = ejω^ } (43)

which is a circle in the complex plane with radius one, is also plotted on pole-zero plots (not to be confused with a super-sized zero O!). Why? See below.

B. Impulse Response

How are poles and zeros any more informative than the coeffficients {an} and {bn}? They are, and in two different ways. The first way has to do with the impulse response of the system:

  • The impulse response h[n] = A 1 pn 1 u[n] +... AN pnN u[n]
  • This means that if |pi| > 1 for any i, the system is unstable
  • But if |pi| < 1 for all i, the system is BIBO stable (see below)
  • The closer any |pi| is to one, the longer h[n] takes to decay to zero If |pi| < 1 for all i, then h[n] is absolutely summable since

∑^ ∞ n=

|h[n]| ≤

∑^ ∞

n=

|A 1 | · |p 1 |n^ +... +

∑^ ∞

n=

|AN | · |pN |n^ = 1 |− |A^1 p| 1 |^ +... + 1 |− |ANp^ | N |^

We have used the triangle inequality |x + y| ≤ (|x| + |y|)for the initial sum and then for each individual sum. So we have a simple test for BIBO stability: An LTIsystem is BIBO stable if and only if all of its poles {pi} have |pi| < 1 (strict inequality). That is, all of its poles lie inside the unit circle. This explains why the unit circle is plotted on pole-zero plots: To determine whether an LTI system is BIBO stable, all you have to do is see whether all the ×s are inside the large ring! This also explains why the z-transform is defined using z−^1. If we used X(z) = ∑∞ n=0 x[n]zn, the condition for BIBO stability would be: all poles lie outside the unit circle. Since stable systems are more interesting than unstable systems (stable systems don’t blow up–a good selling point), having their poles inside the unit circle makes for neater pole-zero diagrams.

C. Frequency Response

The other reason has to do with the form of the frequency response. The gain (magnitude of the frequency response function)of a system with transfer function H(z)is

|H(ejω^ )| = [|ejω^ − z 1 |... |ejω^ − zM |]/[|ejω^ − p 1 |... |ejω^ − pN |] (45)

VI. The Atlanta Airport “That’s it; he’s finally lost his mind” (“finally”?)But this analogy does make sense. Read on... There’s an old saying in the travel industry: “Whether you’re going to heaven or to hell, you’re going to have to transfer in Atlanta.” Indeed, Atlanta is where it is because it was a rail center (it was originally called “Terminus.”)Today, it’s still a rail center, but if you are flying from anywhere in the southern USA to anywhere else in the southern USA, you still have to transfer flights at the Atlanta airport: Take a flight from your starting point to Atlanta, and then take another flight from Atlanta to your destination. What does this have to do with EECS 216? The transfer function of an LTI system plays the same role as the Atlanta airport in relating different descriptions of the system. To go from any description of an LTI system (impulse response, frequency response, difference equation, etc.)to any other description, first compute the transfer function (fly to Atlanta)then compute the desired description from the transfer function (fly from Atlanta to your destination). We have already seen an example of this above. From a given input-output pair, we first computed the transfer function, and then from the transfer function computed the step, impulse and frequency responses. But starting from any description, we can compute any other description using the transfer function as an intermediate step. Specifically, the flight schedule to Atlanta is:

  • Impulse Response: H(z) = Z{h[n]} and h[n] = Z−^1 {H(z)}.
  • Frequency Response: H(ejω^ ) = H(z)z=ejω and vice-versa (the frequency response of an LTI system having a finite number of poles and zeros can be written as a function of ejω^ –recall the example above).
  • Poles and Zeros: H(z) = (^) ab^00 ( (zz−−zp^11 ))......((zz−−zpMN^ )) and vice-versa. These specify H(z)to a scale factor b 0 /a 0.
  • Specific input-output pair: If x[n] → LTI → y[n], then H(z) = Y (z)/X(z)and y[n] = Z−^1 {H(z)X(z)}.
  • Difference Equation: Filters are actually implemented on a computer chip using a difference equation (note the analogy to a continuous-time differential equation). A difference equation computes y[n] recursively from past inputs and outputs (and present input) {y[n − 1]... y[n − N ], x[n]... x[n − M ]}:

a 0 y[n] + a 1 y[n − 1] +... + aN y[n − N ] = b 0 x[n] + b 1 x[n − 1] +... + bM x[n − M ] (46)

Given this description, H(z) = zN^ −M b a^00 z zMN^ ++......++baMN and vice-versa. Watch the zN^ −M^ in front.

This is all summarized in the figure on the next page:

INPUT-OUTPUT IMPULSE

x[n]→ h[n] →y[n] RESPONSE H(z)= H(z)= Y(z)/X(z) Z{h[n]} TRANSFER H(z) → FREQUENCY FUNCTION H(ejω^ ) RESPONSE DIFFERENCE EQN H(z)= y[n] +... + aN y[n − N ] B(z)/A(z) ∏(z − zn)/ ZEROS {zn} b 0 x[n] +... bM x[n − M ] ∏(z − pn) POLES {pn}

VII. Half-Dozen Examples

A. Example #

Problem: Compute poles and zeros of an LTI system having impulse response h[n] = 2nu[n] + 4nu[n]. Solution: H(z) = (^) z−z 2 + (^) z−z 4 = (^) z^22 z−^26 −z^6 +8z → ZEROS: POLES:^ {{^02 ,,^34 }}.

B. Example #

Problem: Compute poles and zeros of an LTI system y[n] − 3 y[n − 1] + 2y[n − 2] = x[n] − 4 x[n − 1].

  • Solution: H(z) = (^1) − 31 z−−^41 z (^) +2−^1 z− 2 z z^22 = (^) z 2 z (^) −^2 − 3 z^4 +2z.
  • Zeros: Solve N (z) = z^2 − 4 z = 0 → z = { 0 , 4 }. A common mistake: Cite only { 4 }.
  • Poles: Solve D(z) = z^2 − 3 z + 2 = 0 → z = { 1 , 2 }. Note zN^ −M^ → zero at the origin.

C. Example #

Problem: Compute the step response of an LTI system with zero at 1, pole at 3, and H(0)= 1. Solution: H(z) = 3 z z−−^13. U (z) = (^) z−z 1 → Y (z) = 3 (^) z−z 3 → y[n] = 3 · 3 nu[n]. Problem: Now compute a difference equation that implements the system. Solution: You can plug into the formula given above, but it is easier to cross-multiply: X^ Y^ ((zz)) =^ H(z) = 3^ z z−−^13 = 3^11 −− 3 zz−−^11 →^ y[n]^ −^3 y[n^ −^ 1] = 3x[n]^ −^3 x[n^ −^ 1].

D. Example #

Problem: Compute h[n] if x[n] = (−2)nu[n] → h[n] → y[n] = 23 (−2)nu[n] + 13 u[n]. Solution: X(z) = (^) z+2z and Y (z) = (^2) zz/+2^3 + (^) zz/−^31 = (^) (z+2)(z^2 z−1) → H(z) = (^) z−z 1 → h[n] = u[n]. The first term of y[n] is the forced response, which looks like the input to the system. The second term of y[n] is the natural response, which looks like the impulse response. Problem: Now compute a difference equation that implements the system. Solution: Cross-multiply: (^) XY^ ((zz)) = H(z) = (^) zz− 1 = (^1) −^1 z− 1 → y[n] − y[n − 1] = x[n]. This is called an accumulator or summer system, since it sums up the past input. Physically, a capacitor would do this (accumulate charge from the current fed into it).