Z-TRANSFORMS. 1 Introduction. 2 Review of Sequences

Similar documents
The Method of Partial Fractions Math 121 Calculus II Spring 2015

is identically equal to x 2 +3x +2

0.8 Rational Expressions and Equations

3.6. Partial Fractions. Introduction. Prerequisites. Learning Outcomes

(Refer Slide Time: 2:03)

Partial Fractions. Combining fractions over a common denominator is a familiar operation from algebra:

3. Mathematical Induction

A Quick Algebra Review

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

Integrals of Rational Functions

To give it a definition, an implicit function of x and y is simply any relationship that takes the form:

Partial Fractions Decomposition

Core Maths C1. Revision Notes

1.2 Linear Equations and Rational Equations

Chapter 31 out of 37 from Discrete Mathematics for Neophytes: Number Theory, Probability, Algorithms, and Other Stuff by J. M.

Vieta s Formulas and the Identity Theorem

Order of Operations More Essential Practice

is identically equal to x 2 +3x +2

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

5544 = = = Now we have to find a divisor of 693. We can try 3, and 693 = 3 231,and we keep dividing by 3 to get: 1

Representation of functions as power series

1 Lecture: Integration of rational functions by decomposition

1.6 The Order of Operations

MATH 4330/5330, Fourier Analysis Section 11, The Discrete Fourier Transform

A positive exponent means repeated multiplication. A negative exponent means the opposite of repeated multiplication, which is repeated

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

Stanford Math Circle: Sunday, May 9, 2010 Square-Triangular Numbers, Pell s Equation, and Continued Fractions

3.2. Solving quadratic equations. Introduction. Prerequisites. Learning Outcomes. Learning Style

Partial Fractions: Undetermined Coefficients

9.2 Summation Notation

LS.6 Solution Matrices

To discuss this topic fully, let us define some terms used in this and the following sets of supplemental notes.

Year 9 set 1 Mathematics notes, to accompany the 9H book.

Determine If An Equation Represents a Function

10.2 Series and Convergence

Math 4310 Handout - Quotient Vector Spaces

Unit 1 Number Sense. In this unit, students will study repeating decimals, percents, fractions, decimals, and proportions.

Partial Fractions. (x 1)(x 2 + 1)

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

Linear Programming Notes V Problem Transformations

3.1. RATIONAL EXPRESSIONS

Session 7 Fractions and Decimals

2.5 Zeros of a Polynomial Functions

PYTHAGOREAN TRIPLES KEITH CONRAD

Welcome to Basic Math Skills!

Partial Fractions. p(x) q(x)

COLLEGE ALGEBRA. Paul Dawkins

a 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 1 + a 22 x a 2n x n = b 2.

WHERE DOES THE 10% CONDITION COME FROM?

Limits. Graphical Limits Let be a function defined on the interval [-6,11] whose graph is given as:

Linear Programming Notes VII Sensitivity Analysis

Multiplication and Division with Rational Numbers

Continued Fractions and the Euclidean Algorithm

Calculate Highest Common Factors(HCFs) & Least Common Multiples(LCMs) NA1

Second Order Linear Nonhomogeneous Differential Equations; Method of Undetermined Coefficients. y + p(t) y + q(t) y = g(t), g(t) 0.

Activity 1: Using base ten blocks to model operations on decimals

Section 1.5 Exponents, Square Roots, and the Order of Operations

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

5 Homogeneous systems

CONTENTS. Please note:

CAHSEE on Target UC Davis, School and University Partnerships

TRIGONOMETRY Compound & Double angle formulae

Discrete Mathematics: Homework 7 solution. Due:

POLYNOMIAL FUNCTIONS

Integrating algebraic fractions

Notes on Orthogonal and Symmetric Matrices MENU, Winter 2013

Basic numerical skills: EQUATIONS AND HOW TO SOLVE THEM. x + 5 = = (2-2) = = 5. x = 7-5. x + 0 = 20.

A power series about x = a is the series of the form

Lies My Calculator and Computer Told Me

Chapter 17. Orthogonal Matrices and Symmetries of Space

Probability and Statistics Prof. Dr. Somesh Kumar Department of Mathematics Indian Institute of Technology, Kharagpur

Click on the links below to jump directly to the relevant section

If A is divided by B the result is 2/3. If B is divided by C the result is 4/7. What is the result if A is divided by C?

Solving Quadratic Equations

Equations, Inequalities & Partial Fractions

Math Workshop October 2010 Fractions and Repeating Decimals

Pre-Algebra Lecture 6

This is a square root. The number under the radical is 9. (An asterisk * means multiply.)

47 Numerator Denominator

Exponents and Radicals

Week 13 Trigonometric Form of Complex Numbers

6.4 Normal Distribution

6.3 Conditional Probability and Independence

The Deadly Sins of Algebra

Indices and Surds. The Laws on Indices. 1. Multiplication: Mgr. ubomíra Tomková

Linear Algebra Notes for Marsden and Tromba Vector Calculus

All the examples in this worksheet and all the answers to questions are available as answer sheets or videos.

2x + y = 3. Since the second equation is precisely the same as the first equation, it is enough to find x and y satisfying the system

Mathematics 31 Pre-calculus and Limits

CHAPTER 5 Round-off errors

c 2008 Je rey A. Miron We have described the constraints that a consumer faces, i.e., discussed the budget constraint.

Lecture 5 Rational functions and partial fraction expansion

3.1. Solving linear equations. Introduction. Prerequisites. Learning Outcomes. Learning Style

Fractions and Linear Equations

Chapter 9. Systems of Linear Equations

5.1 Radical Notation and Rational Exponents

Simple Examples. This is the information that we are given. To find the answer we are to solve an equation in one variable, x.

Part 1 Expressions, Equations, and Inequalities: Simplifying and Solving

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m

Transcription:

Z-TRANSFORMS. Introduction The Z-transform is a tranform for sequences. Just like the Laplace transform takes a function of t and replaces it with another function of an auxillary variable s, well, the Z-transform takes a sequence and replaces it with a function of an auxillary variable,. The reason for doing this is that it makes difference equations easier to solve, again, this is very like what happens with the Laplace tranform, where taking the Laplace tranform makes it easier to solve differential equations. A difference equation is an equation which tells you what the k + 2th term in a sequence is in terms of the k + th and kth terms, for example. Difference equations arise in numerical treatments of differential equations, in discrete time sampling and when studying systems that are intrinsically discrete, such as population models in ecology and epidemiology. 2 Review of Sequences A sequence is a list of numbers, sequences can be finite, like (2, 2, 3, 4) or infinite, like (, 2, 3, 4, 5,...). We are interested in infinite sequences. These all have the general form (x 0, x, x 3,...) with the x k s standing for the numbers in the sequence. We use the short hand: (x k ) k=0 = (x 0, x, x 2,...) In otherwords, on the righthand side, we are saying the sequence is formed by writing out the x k s with k put equal to ero, then one and so on up to infinity. Often we are lay and just write (x k ) when we mean (x k ) k=0.

The sequence (2, 5, 8,, 4,...) is an arithmetic sequence, each term is calculated by adding three to the term before it. In fact, you can write a formula telling you what the kth term is: x k = 2 + 3k, and so (2 + 3k) k=0 = (2, 5, 8,, 4,...) This is really the most you can know about the sequence, if you have a formula saying x k is such and such a thing involving k then you have solved the sequence and you can easily work out x k for any k, for example, we know that x 000 = 3002 in the example above. Another way of writing down the information in the sequence is to say: x k+ = x k + 3 x 0 = 2 This tells you how to find the next term in the sequence in terms of the previous one and it tells you where to start, at x 0 = 2. This is a difference equation. It allows you to work out the sequence, but only step by step. To calculate x 000 you would first of all have to know x 999 and to work this out you need x 998 and so on and so on. We will see later how to use Z-tranforms to solve a sequence when we only know the difference equation. Another common sort of sequence is a geometric sequence, an example is (3, 5, 75, 375,...) Here, each term is given by multiplying the previous term by five, so, the difference equation is x k+ = 5x k x 0 = 3 There is another name also used for a difference equation, it can be called an induction step, the difference usually is that you called it a difference equation if you intend to solve it and an induction step if you intend to use it as it is to work out the sequence term by term. 2

We also know the solution in this case: x k = 3 5 k That is: (3 5 k ) k=0 = (3, 5, 75, 375,...) More generally, a geometric sequence has the form: (cα k ) k=0 = (c, cα, cα 2, cα 3,...) () and x 0 = c and α is called the ratio. Example The sequence: ( 60, 30, 5, 5 2, 5 ) 4,... is a geometrical sequence with c = 60 and α = /2. And the sequence (,,,,,...) is a geometrical sequence with c = and α =. A series is what you get when you sum up all the terms in a sequence. That is if the sequence is: (x k ) = (x 0, x, x 2...) then the series is: x k. k=0 Remark: This sum could be in some cases but we will not use anything that does not converge ;o) what is more, we will care a lot about geometric sequences and its series, nothing else... 3

Example 2 Consider the sequence: ( ) = (, 2, 4, 8 ),... 2 k k=0 The corresponding series (sum) is: S = 2 = + k 2 + 4 + 8 +... k=0 and if you think about it, S = 2 since at each step you are adding half the distance from where you are to two, if you keep adding for infinity you will finally get to two. 2 Hey! what is coming is important: In fact, you can sum any geometric sequence with ratio less than one. When the ration is less than one we write r instead of α. Let S = cr k = c r k k=0 Next, we remember the formula that for r <. binomial expansion. Hence k=0 r = r k (2) k=0 You can check this formula either using the Taylor series or the S = c r If the ratio is bigger than or equal to one then the corresponding series diverges, that is, it doesn t sum up to finite amount. 2 Zeno s paradox was based on this, Zeno, a philosopher in ancient Greece, worried about the fact that to get from A to B you had to first cross half the distance from A to B, then half of the distance remaining and so on for infinity. He thought that, since you had to cross an infinity of shorter and shorter distances, it must take you an infinite amount of time. He is wrong, of course, each shorter and shorter distance takes less and less time to cross and it all adds up to a finite number. Zeno had two paradoxes, the other has to do with asking when something moves, since at any instant it is in just one place. 4 (3)

3 The Definition of Z-transform The Z-transform of a sequence (x k ) is defined as Z[(x k ) k=0] = k=0 x k k (4) We often write: X() = Z[(x k ) k=0] (5) You can see that when you do the Z-transform it sums up all the sequence, and so the individual terms affect the dependence on, but the resulting function is just a function of, it has no k in it. It will become clearer later why we might do this, first, we will look at how to calculate the Z-tranform of a few example. Example 3 Lets find the Z-tranform of a geometric sequence (α k ). We have: Z[(α k ) k=0] = k=0 α k k = ( α ) k = α k=0 = α, Using (3) and supposing α < or equivalently α <. In particular, this means that Z[(,,,...)] = Another Z-transform can be derived from this by differenciating with repect to α. This is a usefull trick, you might worry about whether it is okay to differenciate through the sum and so on, but we just assume everything works. So: Z[(α k ) k=0 ] = α d dα Z[(αk ) k=0 ] = dα d ( ) α Z [ ] d dα (αk ) k=0 = ( α) 2 Z[(kα k ) k=0 ] = ( α) 2 5

and this means: Z[(0,, 2, 3,...)] = ( ) 2 Hence, we now have two entries in our table of Z-transforms: Z[(α k ) k=0] = α (6) Z[(kα k ) k=0] = ( α) 2 (7) Example 4 Considerer the sequence (e kt ) = (, e T, e 2T, e 3T,...), T > 0, constant. Compute its Z-Transform. Z[(e kt ) k=0] = k=0 e kt k = ( e T k=0 ) k If we suppose that e T < (which is equivalent to say that the > e T ) then (, e T, e 2T 2...) = (( e T )k ) k=0 therefore we can apply equation (2) as follows: is a geometric sequence of ratio less than. And Z[(e kt ) k=0 ] = e T = e T Example 5 Find the Z-tranforms of ( ) (a) 4 k (b) (3 k ) (c) (( 2) k ) (d) (4, 6, 64, 256,...) (e) (, 3, 9, 27,...) (f) (0,, 4, 2, 64, 60,...) For (a) we have r = /4 so [( )] Z = 4 k TRY THEM!!! /4 = For (b) r = 3 giving For (a) we have r = /4 so Z[(3 k )] = 6 3 4 4

In (c) r = 2 but this makes no difference In (d) we see that r = 4 so and in (e) r = 3 so Z[(( 2) k )] = + 2 Z[(4, 6, 6, 64, 256,...)] = Z[(, 3, 9, 27,...)] = Finally, looking carefully at (f) you realie 4 + 3 (k2 k ) = (0,, 4, 2, 64, 60,...) and hence: Z[(0,, 4, 2, 64, 60,...)] = ( 2) 2 The unit pulse Another entry to the table of standard Z-tranforms is supplied by the unit pulse: (δ k ) k=0 = (, 0, 0, 0,...) so only the first term of this sequence is non-ero: x 0 = and x k = 0 for all k > 0. The Z-transform of this sequence can be worked out directly, remember the definition of the Z-tranform Z[(x k ) k=0] = =0 x k k. In this case there is only one term in the sequence and hence only one term in the sum: Z[(δ k ) k=0] = 0 = 7

4 Linearity of the Z-tranform It is possible to add sequences and to multiply them by constants. Say (x k ) k=0 and (y k ) k=0 are two sequences and a and b are two constants then we have a sequence (ax k + by k ) k=0 = a(x k ) k=0 + b(y k ) k=0 Example 6 The sequence (2 k +3) k=0 = (4, 5, 7,,...) is the sum of the sequence (2 k ) = (, 2, 4, 8,...) and the sequence (3, 3, 3,...). Another example is the sequence (cα k ) which is c times the sequence (α k ). Theorem The Z-tranform is linear. This means that: Z[(ax k + by k ) k=0] = az[(x k ) k=0)] + bz[(y k ) k=0] Proof: Easy!!!! Z((ax k + by k ) k=0 ) = 0 ax k + by k k, by definition = a x k 0 k + b y k 0 k, = az((x k ) k=0 ) + bz((x k) k=0 ) by linearity of the sum Example 7 Z[(4, 5, 7,,...)] = Z[(2 k + 3) k=0 ] Recall that Z((2 k )) = = Z[(2 k ) k=0 ] + 3Z[(,,,...)], by linearity = 2 + 3 ( ) = ( ) + 3( 2) ( 2)( ) = 4 2 7 2 3 + 2 0 2 k k =, provided > 2 2 8

and Z((3, 3, 3,...)) = 3 = 3, provided > k 0 and both things happen at the same time in ( ), which implies that Z = And other example is: 2 + 3, provided > 2. Z[(cα k ) k=0] = cz[(α k ) k=0] = c α 5 The Delay Theorem or First Shifting Thereom A delayed sequence is one that starts later than some other known sequence. It has the form (x k k0 ) k=0 so for k < k 0 the subscript is negative and, since x j = 0 for j < 0, all the entries up to k = k 0 are ero. Here is an example, say: then: (x k ) k=0 = (4, 5, 7,,...) (x k 2 ) k=0 = (0, 0, 4, 5, 7,,...) so, the sequence is delayed by k 0 = 2 steps. Here is another example: (δ k 4 ) k=0 = (0, 0, 0, 0,, 0, 0, 0,...) In this example the unit pulse has been delayed by four steps. The delay theorem tells us how to related the Z-tranform of a delayed sequence to the Z-tranform of the corresponding undelayed sequence: Theorem 2 The Delay Theorem. Z[(x k k0 )] = k 0 Z[(x k)] (8) This Theorem is also called the First Shifting Theorem for Z-transforms. 9

Proof: By definition of Z-transform: Z[(x k k0 )] = k=0 x k k0 k Now do a change of index: let j = k k 0. Hence, k = j + k 0 ; when k = 0, j = k 0 and when k =, j =. Thus: Z[(x k k0 )] = x j j+k 0 j= k 0 However, because x j = 0 for j < 0 the sum starts at j = 0. Thus: Z[(x k k0 )] = j=0 x j = j+k 0 k 0 as required. (Because the subscript is mute ). j=0 x j = j Z[(x k)], k 0 Example 8 The sequence (0, 0,, 3, 9, 27,...) = (x k 2 ) k=0 where (x k) k=0 = (3k ) k=0 = (, 3, 9, 27,...) so the Z-tranform is: Z[(0, 0,, 3, 9, 27,...)] = 2 Z[(, 3, 9, 27,...)] = 2, provided > 3. 3 Note: 3 k 2, k > 3 (0, 0,, 3, 9, 27,...) = 0, otherwise Example 9 Consider: Z[(δ k 4 ) k=0] = 4 Z[(δ k)] = 4 since Z[(δ k )] =. Example 0 The seqence (0,,,,,...) is the one step delay of (,,,,...) so we have: Z[(0,,,,,...)] = Z[(,,,,...)] = 0 =

There is anther way of doing the same question: by using linearity. We can write: so More examples! (0,,,,,...) = (,,,,...) (, 0, 0, 0,...) Z[(0,,,,,...)] = Z[(,,,,...)] Z[(, 0, 0, 0,...)] = ( ) = = Work out the Z-transform of the following sequences:. (2, 4, 0, 28,...) 2. (2, 2, 0, 26,...) 3. (3, 0, 0, 0,...) 4. (0, 0,,,,...) 5. (0, 2, 4, 0, 28,...) 6. (0, 0,, 2, 4, 8,...) 7. (,, 0,,,,...) Try to do it yourself before reading the solution Solutions:. So this sequence is: so we use linearity (2, 4, 0, 28,...) = (,,,,...) + (, 3, 9, 27,...) Z[(2, 4, 0, 28,...)] = Z[(,,,,...)] + Z[(, 3, 9, 27,...)] = + 3 = 22 4 2 4 + 3, provided > 3.

2. So this sequence is: (2, 2, 0, 26,...) = (,,,,...) + (, 3, 9, 27,...) so we use linearity: Z[(2, 2, 0, 27,...)] = Z[(,,,,...)] + Z[(, 3, 9, 27,...)] = + + 3 = 22 + 2 2 + 2 3, provided > 3. 3. (3, 0, 0, 0,...) = 3(δ k ) so Z[(3, 0, 0, 0,...)] = 3. 4. (0, 0,,,,...) is the k 0 = 2 delay of (,,,,...) which means that: provided >. Z[(0, 0,,,,...)] = 2, 5. (0, 2, 4, 0, 28,...) is (x k ) where (x k ) = (2, 4, 0, 28,...) as in first exercise, hence: Z[(0, 2, 4, 0, 28,...)] = 2 2 4 2 4 + 3 = 2 4 2 4 + 3 6. (0, 0,, 2, 4, 8,...) = (2 k 2 ) and Z[(2 k )] = /( 2), so, provided > 2. Z[(0, 0,, 2, 4, 8,...)] = 2 7. This one is a bit trickier. Notice that: 2 = ( 2), (,, 0,,,,...) = (,,,,,...) (0, 0,, 0, 0,...) and (0, 0,, 0, 0,...) = (δ k 2 ). Hence, using linearity and the delay theorem we get: Z[(,, 0,,,,...)] = Z[(,,,,,...)] Z[(0, 0,, 0, 0,...)] 2

= = 3 + 2 2 ( ), provided >. 6 The Inverse Z transform. The inverse Z transform is defined in a similar way to the inverse Laplace transform. Suppose that X() = Z((x k ) k=0 ), then: Z (Z((x k ))) = (x k ) k=0 and Z(Z (X()) = X(). The best way to understand is through examples so let s go! Example An easy one, straight away from the table: Example 2 One with a fraction: Z ( 2 ) = (2k ) k=0 Suppose X() = 3 + 2 2 + 3. Then: By the Delay Theorem: X() = 3 3 + 22 3 + 3 = + 2 + 3. Z () = (δ k ) k=0 = (, 0, 0, 0,...) and Z ( ) = (δ k ) k=0 = (0,, 0, 0,...) Z ( 3 ) = (δ k 3) k=0 = (0, 0, 0,, 0,...) 3

Recall that the term in the sequences with negative subscripts are 0. Hence, using linearity: Z ( 3 + 2 2 + 3 ) = Z () + 2Z ( ) + Z ( 2 ) = (, 2, 0,, 0,...). Example 3 One with partial fractions: Compute the inverse Z transform of X() = ( )( 2). Since we cannot identify any sequence first hand, we proceed as we did with Laplace transforms, splitting the fraction in two which are simpler: X() = ( )( 2) = + 2, check it!. Therefore: X() = so via the table we conclude: ( )( 2) = + 2, Z ( ( )( 2) ) = Z ( ) + Z ( 2 ) = (,,,...) + (2k ) k=0 + 2 k, k > 0 = (2 k ) k=0 = 0, otherwise Another way of solving this examples is not getting rid of the in the partial fraction decomposition: so: and therefore: X() = X() = ( )( 2) ( )( 2) = A + B 2, A( 2) B( ) = + ( )( 2) ( )( 2), = A( 2) + B( ) = A 2A + B B = (A + B) 2A B, 4

so we conclude: = A + B, 0 = 2A B A =, B = 2, hence: X() = ( )( 2) = + 2 2, but we cannot identify in the table any sequence that go these Z transforms, so we do the following trick (that you should have always in mind :o) in case you do not remember to divide by in the exam!): and therefore X() = ( )( 2) = + 2 2. indicates a delayed sequence by one step by Delay Theorem and we know that Z ( ) = (,,,...) and Z ( 2 2 ) = (2, 4,...) = 2(, 2, 4,..). Hence: Z + 22 k, k > 0 ( ) = (0,,,,...)+2(0,, 2, 4,..) = ( )( 2) 0, otherwise + 2 k, k > 0 = 0, otherwise that is exactly the same result we obtained before!! Example 4 And the last one: Find Z ( 2 + ( + )( 3) ). Notice that the only way we have to solve it is by partial fractions decomposition since there is not a constant alone in the numerator to divide by the numerator and denominator as it happened in previous example :o[ 2 + ( + )( 3) = A + + B 3, 5

so then: 2 + ( + )( 3) A( 3) B( + ) = + ( + )( 3) ( + )( 3), 2 + = A( 3) + B( + ) = A 3A + B + B = (A + B) + B 3A which implies that: Therefore: A = 4, B = 7 4. 2 + ( + )( 3) = 4( + ) + 7 4( 3). We use the same trick as in previous example, multiply and dividing by : 2 + ( + )( 3) = Via the table and using linearity: and 4 Z ((( ) k )) k=0) = 7 4 Z ((3 k )) k=0) = 4( + ) = 7 4( 3) = 7 4( + ) 4( 3). 4 ( )k, if k > 0 0, if k=0 7 4 3k, if k > 0 0, if k=0, and indicates delayed sequences by one step, so by the Delay Theorem: Z 2 + ( ( + )( 3) ) = 4 ( )k + 7 4 3k, if k > 0 0, if k=0 7 The Advancing Theorem or Second Shifting Theorem The Advancing Theorem is used for finding the Z-tranform of a sequence which has been advanced. Here is an example, say we have the sequence: (x k ) = (3, 6, 2, 24,...) 6

then the first advance of this is the sequence: (x k+ ) = (6, 2, 24, 48,...) and the second advance is: (x k+2 ) = (2, 24, 48, 96,...) Theorem 3 The Advancing Theorem. Z[(x k+ )] = Z[(x k )] x 0 Z[(x k+2 )] = 2 Z[(x k )] 2 x 0 x, this Theorem can be called as The Second Shifting Theorem. Proof: Let us do it! Going back to first principals and use a change of index: Z[(x k+ )] = k=0 x k+ k now, let j = k +, so k = j and when k = 0 we have j =, when k =, then j = as well. Hence: Z[(x k+ )] = k=0 x k+ k = j= x k j Next we use: j = j and the can come to the front of the sum since it has no index: j = j and the can come to the front of the sum since it has no index: Z[(x k+ )] = 7 j= x j j

Now, the sum starts at one instead of ero, we fix this by adding and subtracting the eroth term: Z[(x k+ )] = = = j= j= j=0 x j j x j j + x 0 x 0 x j j x 0 Finally, the sum is just Z[(x k )], remember, it doesn t matter what we call an index if we are summing over it, Z[(x k )] means exactly the same thing as Z[(x j )], this finishes the proof: Z[(x k+ )] = Z[(x k )] x 0 To do the second advance we just apply the first advance formula twice. In short, as well as being the second advance of (x k ), (x k+2 ) is the first advance of (x k+ ). The first term in the sequence (x k+ ) is x. Applying the formula for the first advance we have: and then applying it again: Z[(x k+2 )] = Z[(x k+ )] x Z[(x k+2 )] = (Z[(x k )] x 0 ) x = 2 Z[(x k )] 2 x 0 x Example 5 Consider (x k ) = (3, 6, 2, 24,...) above, we have: Then: Z[(x k )] = Z[(3, 6, 2, 24,...)] = Z[3(, 2, 4, 8,...)] = Z((3 2 k )) = Z[(x k+ )] = Z[(x k )] x 0 = 32 2 3 = 32 2 32 6 2 = 6 2 8 3 2

and Z[(x k+2 )] = 2 Z[(x k )] 2 x 0 x = 33 2 32 6 8 Difference equations = 33 2 33 6 2 2 62 2 2 = 2 2 As mentioned before, the main use for Z-tranforms is solving difference equations. An example of a difference equation is: x k+ x k = 0, with x 0 = You see that the equation tells you that the (k + )th term in the sequence is equal to the kth term. This doesn t tell you how to start off, but there is also an initial condition given: x 0 =. So, if x 0 =, the difference equation says x k+ = x k and with k = 0 this tells us x = x 0 =, next, with k =, the difference equation tells us that x 2 = x =, and so on, clearly every term in this sequence is one and the solution to the difference equation is: (x k ) = (,,,,...) Although this is too easy an example for it to be worthwhile, we could have solved this difference equation by taking the Z-tranform of both sides. Bearing in mind that the Z-transform of the sequence (0, 0, 0,...) is ero, we have: Z[(x k+ ) (x k )] = 0 and, hence, if we write Z[(x k )] = X() we have: X x 0 0 9

and then, we put in that x 0 = and find: so ( ) This is /( r) with r = and from the table of Z-tranforms, we see that this means (x k ) = (,,,...). This is what we expected. Example 6 Another difference equation: x k+2 x k+ 2x k = 0 with x 0 = 0 and x =. This is called a two-step difference equation because it relates x k+2 to the two terms below it in the sequence, x k+ and x k. We can work the sequence out term by term. With k = 0 we have: Putting in x 0 = 0 and x = x 2 x 2x 0 = 0 x 2 = Next, with k = the difference equation is: Putting in x 0 = 0 and x = x 3 x 2 2x = 0 x 2 = Next, with k = the difference equation is: x 3 x 2 2x = 0 and we know x 2 = and x =, therefore: x 3 = 3 20

and so on it goes, with k = 2 x 4 x 3 2x 2 = 0 and we know x 3 = 3 and x 2 =, so x 4 = 5 So far we have worked out that the sequence start off (0,,, 3, 5,...). What we really want is to be able to write x k in terms of k, we can do this using the Z-tranform. First, we take the Z-tranform of both sides of the equation: Z[(x k+2 ) Z[(x k+ )] 2Z[(x k )] = 0 Using the advancing theorem this means: 2 X 2 x 0 x X x 0 2 0 Putting in x 0 = 0 and x = 2 X X 2 0 or 2 2 Now that we know Z[(x k )] we want to find x k. To do this we use partial fractions on the right hand side. Recalling the basic Z-tranform Z[(r k )] = /( r) we see that we want a on the top after the partial factions expansion has been done. If we did a partial fraction expansion on /( 2 2) we would end up 2

with something that has no on top of the fractions. To avoid this we move the over to the left hand side: and then write: Multiplying across: 2 2 2 2 = ( 2)( + ) = A 2 + B + = A( + ) + B( 2) = 2 gives A = /3 and = gives B = /3. Now: 2 2 = 3( 2) 3( + ) so and hence: 3( 2) 3( + ) x k = 3 2k 3 ( )k We can quickly check that this gives the same values as those we calculated above, k = 0 x 0 = 3 3 = 0 k = x = 3 2 3 ( ) = k = 2 x 2 = 3 4 3 ( )2 = 4 3 3 = k = 3 x 2 = 3 8 3 ( )3 = 3 22

and k = 4 x 2 = 3 6 3 ( )4 = 5 The difference now is that we could also work out k = 8 say: x 8 = 3 256 3 = 85 without having to work out all the lower terms first. More Examples So far we have studied a difference equation which conveniently has ero on the right hand side and has initial conditions x 0 = 0 and x =. In the next note we will look at examples that aren t quite so convenient, but for now, it is a good idea to pratise some more examples like the one above.. Solve the difference equation x k+2 4x k+ 5x k = 0 with x 0 = 0 and x =. 2. Solve the difference equation x k+2 9x k+ + 20x k = 0 with x 0 = 0 and x =. 3. Solve the difference equation x k+2 +5x k+ +6x k = 0 with x 0 = 0 and x =. 4. Solve the difference equation x k+2 + 2x k+ 48x k = 0 with x 0 = 0 and x =. 5. Solve the difference equation x k+2 + 7x k+ 8x k = 0 with x 0 = 0 and x =. 6. Solve the difference equation x k+2 6x k+ +5x k = 0 with x 0 = 0 and x =. Try them to check that you understood before reading the solution 23

. So, take the Z-transform of both sides hence: 2 X 4X 5 0 2 4 5 Move the to the left and do partial fractions, 2 4 5 = ( 5)( + ) = 6( 5) 6( + ) Thus: and 6( 5) 6( + ) x k = 6 5k 6 ( )k 2. So, take the Z-transform of both sides 2 X 9X + 20 0 3. So, take the Z-transform of both sides hence: 2 X 9X + 20 0 2 9 + 20 Move the to the left and do partial fractions, 2 9 + 20 = ( 5)( 4) = 5 4 Thus and 5 4 x k = 5 k 4 k 24

4. So, take the Z-transform of both sides: 2 X + 5X + 6 0 hence: 2 + 5 + 6 Move the to the left and do partial fractions, 2 + 5 + 6 = ( + 2)( + 3) = + 2 + 3 Thus: and + 2 + 3 x k = ( 2) k ( 3) k 5. So, take the Z-transform of both sides 2 X + 2X 48 0 hence: 2 + 2 48 Move the to the left and do partial fractions, 2 + 2 48 = ( + 8)( 6) = 4( + 8) + 4( 6) Thus: and 4( + 8) + 4( 6) x k = 4 ( 8)k + 4 6k 25

6. So, take the Z-transform of both sides 2 X + 7X 8 0 hence: 2 + 2 48 Move the to the left and do partial fractions, 2 + 2 48 = ( + 8)( 6) = 4( + 8) + 4( 6) Thus: and 4( + 8) + 4( 6) x k = 4 ( 8)k + 4 6k 7. So, take the Z-transform of both sides 2 X + 7X 8 0 hence: 2 + 7 8 Move the to the left and do partial fractions, Thus: 2 + 7 8 = ( 2)( + 9) = ( 2) ( + 9) and ( 2) ( + 9) x k = ( 2)k ( 9)k 26

8. So, take the Z-transform of both sides 2 X 6X + 5 0 hence: 2 6 + 5 Move the to the left and do partial fractions: 2 6 + 5 = ( 5)( ) = 4( 5) 4( ) Thus: and 4( 5) 4( ) x k = 4 5k 4 Example 7 As another example of how to solve difference equations, let us solve: x k+2 6x k+ 55x k = 0 with x = and x 0 = 0. We begin by taking the Z-tranform of both sides, remember, if we write Z[(x k )] = X() then: Z[(x k+ )] = X x 0 Z[(x k+2 )] = 2 X 2 x 0 x so, in this case we get: 2 X 6X 55 0 or 2 6 55 27

As before, we do a partial fraction expansion, but, first we move the over to the right hand side: giving 2 6 55 = ( )( + 5) = A + B + 5 = A( + 5) + B( ) Choose = to learn A = /6 and = 5 to learn B = 6. Therefore: 6( ) + 6( + 5) 6( ) + 6( + 5) Both terms of the form /( r) and so x k = 6 ()k + 6 ( 5)k The basic process is simple, you take the Z-tranform of both sides, you solve for X, you use partial fractions to put it into a convenient form and then work out x k. In the rest of this note we will look at a variety of examples which exhibit the various difficulties that might be encountered doing this. Example 8 Not ero on the right hand side Consider the difference equation: x k+2 6x k+ 55x k = ( 3) k with x = 0 and x 0 = 0. This is different than the previous example in that the right hand side is not ero, it is 3 k. This doesn t make such a difference, take the Z-tranform of both sides, and noting the trivial initial data (x 0 = 0 and x = 0), 2 X 6X 55 Z[(3 k )] = + 3 28

thus: Now, use partial fractions: ( )( + 5)( + 3) (9) ( )( + 5)( + 3) = A + B + 5 + C + 3 or = A( + 5)( + 3) + B( )( + 3) + C( )( + 5) Now, the usual, = gives A = /224, = 5 gives B = /32 and = 3 gives C = /28. Not forgetting the minus in equation (9) this gives: 224 32 + 5 + 28 + 3 and so x k = 224 k 32 ( 5)k + 28 ( 3)k Example 9 Remember that the sequence on the right hand side might be a sequence of ones, = k, so, consider: x k+2 6x k+ 55x k = with x = 0 and x 0 = 0. Take the -tranform of both sides: and so X 6X 55 Z[()] = Z[( k )] = ( )( + 5)( ) Without going through the calculation, the partial fraction expansion is: ( )( + 5)( ) = 60 + 96 + 5 60 and so, x k = 60 k + 96 ( 5)k 60 29

Example 20 Repeated root As happens with Laplace transforms, there can be a repeated root. Consider: x k+2 6x k+ 55x k = k with x = 0 and x 0 = 0. Take the -tranform of both sides: and so X 6X 55= Z[( k )] = ( ) 2 ( + 5) Now, remember that for repeated root the partial fraction expansion has a term with the root and a term with its square: Thus: ( ) 2 ( + 5) = A + B ( ) + C 2 + 5 = A( )( 5) + B( + 5) + C( ) 2 Now, = gives B = /6 and = 5 gives C = /256. The problem is that no choice of gives A on its own, instead we chose any value that hasn t been used before, = 0 for example: = 55A + 5B + 2C and now, we substitute for the known values of B and C: Hence: = 55A + 5 6 + 2 256 so A = /256. This means that: = 55A + 20 256 55A = 20 256 = 55 256 256 + 6 ( ) + 2 256 + 5 30

The only problem now is that the /( ) 2 term might look unfamiliar, but recall: has this form. We get: Z[(kr k )] = ( r) 2 x k = 256 k + k 6 k + 256 ( 5)k Example 2 Less convenient inital data So far the values of x 0 and x have been chosen to keep things as simple as possible. More general values of x 0 and x might be less convenient, but there is no big change in the method. Consider: x k+2 6x k+ 55x k = 0 with x = 2 and x 0 = 6. Taking the Z-tranform of both sides gives: X 2 2 x 0 x 6(X x 0 ) 55 0 and substituting for the initial data: Moving everything around, this gives: X 2 6 2 2 6X + 36 55 0 62 34 2 6 55 We still want a on top when we are finished, so move one over: 6 34 2 6 55 and now, remember that the partial fraction expansion works fine provided whats on top is a polynomial of degree less than than the polynomial on the bottom, so we have 6 34 ( )( + 5) = A + B + 5 3

or 6 34 = A( + 5) + B( ) Choose = to get 66 34 = 6A or A = 2. = 5 gives: 30 34 = 6B or B = 4. Thus: and 2 + 4 + 5 x k = 2() k + 4( 5) k Example 22 Examples involving the delay theorem Consider: x k+2 6x k+ 55x k = δ k with x = 0 and x 0 = 0. δ k is the unit pulse: (δ k ) = (, 0, 0, 0,...) and Z[(δ k )] =. Hence: 2 X 6X 55 Z[(δ k )] = so ( )( + 5) Using the partial fraction expansion, this gives: 6 6 + 5 32

The problem now is that there are no s on top. However, if we rewrite it as [ 6 ] 6 + 5 Now, the part inside the square brackets has the form we are familiar with, we can see: Z [( 6 k )] 6 ( 5)k = 6 6 + 5 and we also know from the delay theorem that the affect of multiplying by / k 0 is to delay the sequence by k 0 steps. Hence, the sequence here is delayed by one step and: x k = 0 = 0 6 k 6 ( 5)k Of course, the sequence on the right might be more complicated, consider: x k+2 6x k+ 55x k = y k with x = 0 and x 0 = 0 where (y k ) = (0, 2, 0, 0, 0,...) We have to calculate Z[(y k )] before we can make any progress. However, it is easy to see that (y k ) is the first delay of twice the unit pulse (y k ) = 2(δ k ) so: Z[(y k )] = 2 Thus the Z-tranform of the difference equation gives: 2 X 6X 55 2 so, 2 ( )( + 5) 33

There are two ways to go on from here, the first is to use the previous partial fractions expansion: 2 [ 6 ] 6 + 5 = 2 [ 2 6 ] 6 + 5 so now we are dealing with a two step delay and, keeping the extra factor of two in mind x k = 0 8 k 2 8 ( 5)k 2 2 The other way to make progress is to work out the partial fraction expansion: ( )( + 5) = 55 + 76 + 80 + 5 (0) This means that 2 [ 55 + 76 + ] 80 + 5 and using the delay theorem: 0 = 0 x k = 2 δ 55 k + 88 (k + 40 ( 5)k () Now, it might look like this is a very different answer, but it isn t, expression (0) and expression () are actually the same. Now that putting k = in () gives: 2 55 δ 0 + 88 0 + 40 ( 5)0 = 2 55 + 88 + 40 = 0 and, what s more, k = k 2 and ( 5) k = 5 ( 5) k 2. And More Examples!. Solve the difference equation x k+2 4x k+ 5x k = 0 with x 0 = 0 and x =. 34

2. Solve the difference equation x k+2 9x k+ + 20x k = 2 k with x 0 = 0 and x = 0. 3. Solve the difference equation x k+2 + 5x k+ + 6x k = ( 2) k with x 0 = 0 and x = 0. 4. Solve the difference equation x k+2 + 2x k+ 48x k = 0 with x 0 = 4 and x = 2. 5. Solve the difference equation x k+2 + 7x k+ 8x k = δ k with x 0 = 0 and x = 0. TRY THEM!!!. So take the Z-transform of both sides 2 X 4X 5 0 and move things around to get X/ on one side and then do partial fractions 2 4 5 = ( 5)( + ) = A 5 + B + In the usual way, we have: = A( + ) + B( 5) and putting = 5 gives A = /6 and putting = gives B = /6. Now and hence: 6( 5) 6( + ) x k = 6 5k 6 ( )k 35

2. So, in this example, the right hand side of the difference equation is not ero. Taking the Z-transform of both sides we get: 2 X 9X + 20 Z[(2 k )] = Hence, since 2 9 + 20 = ( 5)( 4) ( 5)( 4)( 2) The usual partial fractions tells us that and so 2 ( 5)( 4)( 2) = 3( 5) 2( 4) + 6( 2) x k = 3 5k 2 4k + 6 2k 3. Again, taking the Z-tranform of both sides we have 2 X + 5X + 6 Now, since 2 + 5 + 6 = ( + 2)( + 3) + 2 ( + 2) 2 ( + 3) and there is a repeated root. The partial fraction expansion with a repeated root includes the root and its square, so we get and so ( + 2) 2 ( + 3) = A + 2 + B ( + 2) + C 2 + 3 = A( + 2)( + 3) + B( + 3) + C( + 2) 2 Choosing = 2 gives B = and = 3 gives C =. No value of will give A on its own, so we choose another convenient value and put in the known values of B and C: = 6A + 3 + 4 36

so A =. Now, this means and so + 2 + ( + 2) + 2 + 3 x k = ( 2) k + k( 2) k + ( 3) k 4. Take the Z-tranform of both sides, taking care to note the initial conditions: 2 X 4 2 2 + 2(X 4) 48 0 Thus: giving: Multiplying across we get: 2 X + 2X 48 4 2 0 4 0 ( + 8)( 6) = A + 8 + B 6 4 0 = A( 6) + B( + 8) Choosing = 8 we have implying A = 3. Choosing = 6 42 = 4A 4 = 4B so B = and we get and 3 + 8 + 6 x k = 3( 8) k + 6 k 37

5. Now, taking the Z-transform and using Z[(δ k )] = 2 X + 7X 8 and so: Thus: 2 + 7 8 = ( 9)( + 2) = ( 9) ( + 2) ( ) ( 9) ( + 2) and so, using the delay theorem, we have 0 k = 0 x k = 9k ( 2)k k > 0 38