CEMTool Tutorial. The z-transform

Similar documents
Chapter 7: The z-transform. Chih-Wei Liu

The z-transform. 7.1 Introduction. 7.2 The z-transform Derivation of the z-transform: x[n] = z n LTI system, h[n] z = re j

Z - Transform. It offers the techniques for digital filter design and frequency analysis of digital signals.

3. Z Transform. Recall that the Fourier transform (FT) of a DT signal xn [ ] is ( ) [ ] = In order for the FT to exist in the finite magnitude sense,

Chapter 7 z-transform

Chapter 4 : Laplace Transform

Definition of z-transform.

Digital Signal Processing

Generalizing the DTFT. The z Transform. Complex Exponential Excitation. The Transfer Function. Systems Described by Difference Equations

Chapter 3. z-transform

ECE-S352 Introduction to Digital Signal Processing Lecture 3A Direct Solution of Difference Equations

COMM 602: Digital Signal Processing

The z-transform can be used to obtain compact transform-domain representations of signals and systems. It

Lecture 3. Digital Signal Processing. Chapter 3. z-transforms. Mikael Swartling Nedelko Grbic Bengt Mandersson. rev. 2016

Question1 Multiple choices (circle the most appropriate one):

6.003 Homework #3 Solutions

Appendix: The Laplace Transform

EE Midterm Test 1 - Solutions

Solutions of Chapter 5 Part 1/2

Discrete-Time Systems, LTI Systems, and Discrete-Time Convolution

FIR Filter Design: Part II

2D DSP Basics: 2D Systems

Frequency Response of FIR Filters

The z Transform. The Discrete LTI System Response to a Complex Exponential

The z transform is the discrete-time counterpart of the Laplace transform. Other description: see page 553, textbook.

M2.The Z-Transform and its Properties

ADVANCED DIGITAL SIGNAL PROCESSING

Solutions. Number of Problems: 4. None. Use only the prepared sheets for your solutions. Additional paper is available from the supervisors.

Frequency Domain Filtering

Signals & Systems Chapter3

Digital signal processing: Lecture 5. z-transformation - I. Produced by Qiangfu Zhao (Since 1995), All rights reserved

EECE 301 Signals & Systems

September 2012 C1 Note. C1 Notes (Edexcel) Copyright - For AS, A2 notes and IGCSE / GCSE worksheets 1

Time-Domain Representations of LTI Systems

MAXIMALLY FLAT FIR FILTERS

Introduction to Signals and Systems, Part V: Lecture Summary

Finite-length Discrete Transforms. Chapter 5, Sections

Discrete-Time Signals and Systems. Signals and Systems. Digital Signals. Discrete-Time Signals. Operations on Sequences: Basic Operations

Exponential Moving Average Pieter P

CALCULUS BASIC SUMMER REVIEW

We are mainly going to be concerned with power series in x, such as. (x)} converges - that is, lims N n

DIGITAL SIGNAL PROCESSING LECTURE 3

CEMTool Tutorial. Fourier Analysis

from definition we note that for sequences which are zero for n < 0, X[z] involves only negative powers of z.

APPENDIX F Complex Numbers

The Z-Transform. (t-t 0 ) Figure 1: Simplified graph of an impulse function. For an impulse, it can be shown that (1)

Ch3 Discrete Time Fourier Transform

1 1 2 = show that: over variables x and y. [2 marks] Write down necessary conditions involving first and second-order partial derivatives for ( x0, y

Linear time invariant systems

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Science. BACKGROUND EXAM September 30, 2004.

Fall 2011, EE123 Digital Signal Processing

Module 18 Discrete Time Signals and Z-Transforms Objective: Introduction : Description: Discrete Time Signal representation

REVISION SHEET FP1 (MEI) ALGEBRA. Identities In mathematics, an identity is a statement which is true for all values of the variables it contains.

Lecture 2 Linear and Time Invariant Systems

Solution of EECS 315 Final Examination F09

Signal Processing. Lecture 02: Discrete Time Signals and Systems. Ahmet Taha Koru, Ph. D. Yildiz Technical University.

The Z-Transform. Content and Figures are from Discrete-Time Signal Processing, 2e by Oppenheim, Shafer, and Buck, Prentice Hall Inc.

Generating Functions. 1 Operations on generating functions

REVISION SHEET FP1 (MEI) ALGEBRA. Identities In mathematics, an identity is a statement which is true for all values of the variables it contains.

Olli Simula T / Chapter 1 3. Olli Simula T / Chapter 1 5

Lecture 3: Divide and Conquer: Fast Fourier Transform

EE / EEE SAMPLE STUDY MATERIAL. GATE, IES & PSUs Signal System. Electrical Engineering. Postal Correspondence Course

62. Power series Definition 16. (Power series) Given a sequence {c n }, the series. c n x n = c 0 + c 1 x + c 2 x 2 + c 3 x 3 +

Signal Processing in Mechatronics. Lecture 3, Convolution, Fourier Series and Fourier Transform

Chimica Inorganica 3

TEACHER CERTIFICATION STUDY GUIDE

Principle Of Superposition

GATE ELECTRONICS & COMMUNICATION

SOLUTIONS TO EXAM 3. Solution: Note that this defines two convergent geometric series with respective radii r 1 = 2/5 < 1 and r 2 = 1/5 < 1.

Most text will write ordinary derivatives using either Leibniz notation 2 3. y + 5y= e and y y. xx tt t

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences

Chapter 8. DFT : The Discrete Fourier Transform

GEORGIA INSTITUTE OF TECHNOLOGY SCHOOL OF ELECTRICAL AND COMPUTER ENGINEERING

Module 2: z-transform and Discrete Systems

The Discrete Fourier Transform

Solutions to Final Exam

Complex Analysis Spring 2001 Homework I Solution

Analog and Digital Signals. Introduction to Digital Signal Processing. Discrete-time Sinusoids. Analog and Digital Signals

The Discrete Fourier Transform

Chapter 2 Systems and Signals

Course Outline. Designing Control Systems. Proportional Controller. Amme 3500 : System Dynamics and Control. Root Locus. Dr. Stefan B.

Recurrence Relations

Appendix F: Complex Numbers

Complex Numbers Solutions

EE422G Homework #13 (12 points)

x[0] x[1] x[2] Figure 2.1 Graphical representation of a discrete-time signal.

U8L1: Sec Equations of Lines in R 2

Curve Sketching Handout #5 Topic Interpretation Rational Functions

PRELIM PROBLEM SOLUTIONS

NICK DUFRESNE. 1 1 p(x). To determine some formulas for the generating function of the Schröder numbers, r(x) = a(x) =

Lesson 10: Limits and Continuity

AH Checklist (Unit 3) AH Checklist (Unit 3) Matrices

SNAP Centre Workshop. Basic Algebraic Manipulation

FFTs in Graphics and Vision. The Fast Fourier Transform

a for a 1 1 matrix. a b a b 2 2 matrix: We define det ad bc 3 3 matrix: We define a a a a a a a a a a a a a a a a a a

Filter banks. Separately, the lowpass and highpass filters are not invertible. removes the highest frequency 1/ 2and

Discrete-time signals and systems See Oppenheim and Schafer, Second Edition pages 8 93, or First Edition pages 8 79.

Algebra II Notes Unit Seven: Powers, Roots, and Radicals

Solution of Linear Constant-Coefficient Difference Equations

6.003: Signals and Systems. Feedback, Poles, and Fundamental Modes

Transcription:

CEMTool Tutorial The -Trasform Overview This tutorial is part of the CEMWARE series. Each tutorial i this series will teach you a specific topic of commo applicatios by explaiig theoretical cocepts ad providig practical examples. This tutorial is to demostrate the use of CEMTool for solvig digital processig problems. This tutorial discusses the Z-trasform. Table of Cotets. Bilateral Z trasform 2. Importat properties of the -trasform 3. Iversio of the -trasform 4. System represetatio i the -domai 5. Solutio of the differece equatios. Bilateral -trasform The -trasform of a sequece x() is give by - = é ù = X Z ëx û å x () =- where is a complex variable. The set of values for which X() exists is called the regio of covergece (ROC) ad is give by R < < R (2) x- x+ for some o-egative umbers Rx - ad R x + The iverse -trasform of a complex fuctio X() is give by 2p j = é ù = x Z X X d ë û ò (3) C where C is a couterclockwise cotour ecirclig the origi ad lyig i the ROC. Example : Let x ()= a u( ), 0 < a <. (This sequece is called a positive-time sequece). The

- æ ö å å ç 0 0 a X = a = = = è ø - a If > a à ROC: a < < X ( ) i this example is a ratioal fuctio; that is, X ( ) B = = A - a where B()= is the umerator polyomial ad A()= a is the deomiator polyomial. The roots of B () are called the eros of X (), while the roots of A() are called the poles of X(). I this example X () has a ero at the origi =0 ad a pole at =a. Hece x () ca also be represeted by a pole-ero diagram i the -plae i which eros are deoted by o ad poles by. 2. Importat properties of the -trasform The properties of the -trasform are geeraliatios of the properties of the discrete-time Fourier trasform. We state the followig importat properties of the -trasform without proof.. Liearity: ù Z éa x + a x = a X + a X ; ROC : ROCx Ç ROCx 2. Sample shiftig: ë 2 2 û 2 2 2 (4) - é ë ù û = (5) Z a x 0 X ROC : ROC x 3. Frequecy shiftig: æ ö é ë ù û = ç è a ø ; : Z a x X ROC ROCx scaled by a 4. Foldig: æ ö Z éë x( - ) ùû = X ç ; ROC : Iverted ROCx è ø 5. Complex cojugatio: * * Z é ëx ù û = X * ; ROC : ROCx (8) 6. Differetiatio i the -domai: 7. Multiplicatio: 8. Covolutio: ; : x dx Z éë x( ) ùû = - ROC ROC (9) d Z éë x ( ) x ( ) ù = X ( v) X ( v) v dv 2 û 2 / ; 2p j ò C (0) ù ROC : ROC Ç Iverted ROC Z éx * x = X X ; ROC : ROCx Ç ROCx x ë 2 û 2 2 () This last property trasforms the time-domai covolutio operatio ito a multiplicatio betwee two fuctios. It is a sigificat property i may ways. First, if X () ad X 2 () are two x2 (6) (7) 2

polyomials, the their product ca be implemeted usig the cov fuctio i CEMTool. Example 2: -2-2 -3 Let X ( ) = 2 + 3 + 4 ad X 2 ( ) 3 4 5 6 X ( ) = X ( ) X ( ). 3 2 = + + +. Determie Solutio: From the defiitio of the -trasform we observe that x ( ) = { 2,3, 4} ad x2 ( ) = { 3, 4,5,6} The, the covolutio of the above two sequeces will give the coefficiets of the required polyomial product. CEMTool script: C>x = [2,3,4]; x2 = [3,4,5,6]; x3 = cov(x,x2) x3 = 6 7 34 43 38 24 X 3 = 6 + 7 + 34 + 43 + 38 + 24-2 -3-4 -5 Hece 3. Iversio of the -trasform From equatio (3) the iverse -trasform computatio requires a evaluatio of a complex cotour itegral that, i geeral, is a complicated procedure. The most practical approach is to use the partial fractio expasio method. It makes use of the -trasform. The -trasform, however, must be a ratioal fuctio. This requiremet is geerally satisfied i digital sigal processig. Cetral Idea: Whe X() is a ratioal fuctio of, it ca be expressed as a sum of simple factors usig the partial fractio expasio. The idividual sequeces correspodig to these factors ca the be writte dow usig the -trasform table. The iverse -trasform procedure ca be summaried as follows: Method: Give express it as -M b0 + b +... + bm - N + a +... + an X =, R < < R X ( ) b% + b% +... + b% = + x- x+ - N - M -N 0 N - N å + a +... + an k = 0 where the first term o the right-had side is the proper ratioal part ad the secod term is the C k -k (2) 3

polyomial (fiite-legth) part. This ca be obtaied by performig polyomial divisio if M N usig the decov fuctio perform a partial fractio expasio o the proper ratioal part of X() to obtai R = + - p N M -N -k å å Ck (3) k = k k = 0 k X where p k is the k th pole of X() ad R k is the residue at p k. It is assumed that the poles are distict for which the residues are give by ( N ) b% - - - 0 + b% +... + b% N ( Rk = - p N k - - + a +... + a ) = pk N For repeated poles the expasio (3) has a more geeral form. If a pole p k has multiplicity r, the its expasio is give by å r -( l) -( r) Rk. l Rk, Rk,2 Rk, r = + +... + l 2 r (4) l= - pk - p - p - p k k k where the residues R k,l are computed usig a more geeral formula. assumig distict poles as i (3), write x()as N M N x å - é ù Rk Z ê C k k - ú å k = ë- pk û k = 0 = + d ( - ) fially, use the relatio Z ( ) é ù ì ï p u R ê ú = í ë - p û ïî - p u - - ³ R k k x- k k k x+ to complete x(). A similar procedure is used for repeated poles. (5) A CEMTool fuctio residue is available to compute the residue part ad the direct (or polyomial) terms of a ratioal fuctio i. Let X -M b0 + b +... + bm - N 0 + +... + N N M -N k å å k = - pk k = 0 k -k B = = a a a A R = + C be a ratioal fuctio i which the umerator ad the deomiator polyomials are i ascedig powers of. The [R,p,C]=residue(b,a) computes the residues, poles, ad direct terms of X() i which two polyomials B() ad A() are give i two vectors b ad a, respectively. The retured colum vector R cotais the residues, colum vector p cotais the pole locatios, ad row vector C cotais the direct terms. If p(k)=... =p(k+r) is a pole of multiplicity r, the the expasio icludes the term of the form Rk Rk + Rk + r + +... + (6) 2 r - pk - - - p - p ( k ) ( k ) 4

which is differet from (4). Similarly, [b,a]=residue(r,p,c), with three iput argumets ad two output argumets, coverts the partial fractio expasio back to polyomials with coefficiets i row vectors b ad a. Example 3: Let us cosider the ratioal fuctio X ( ) = 2 3-4 + First rearrage X( ) so that it is a fuctio i ascedig powers of. X 0 + = = 3-4 + 3-4 + Now usig the CEMTool script, -2-2 C>b= [0,]; a = [3,-4,]; [R,p,C] = residue(b,a) R = 0.5000-0.5000 p =.0000 0.3333 C = Empty matrix: 0-by-0. we obtai = 2-2 - - 3 X Example 4: Compute the iverse -trasform of X ( ) =, > 0.9-2 - - 0.9 + 0.9 Solutio: We will evaluate the deomiator polyomial as well as the residues usig the CEMTool Script: C> b= ; a = poly([0.9,0.9,-0.9]) a =.0000-0.9000-0.800 0.7290 5

C>[R,p,C]=residue(b,a) R = 0.2500 0 0.5000-0.0000i p = -0.9000 0.9000 + 0.0000i 0.9000-0.0000i C = Empty matrix: 0-by-0 Note that the deomiator polyomial is computed usig CEMTool s polyomial fuctio poly, which computes the polyomial coefficiets, give its roots. We could have used the cov fuctio, but the use of the poly fuctio is more coveiet for this purpose. From the residue calculatios ad usig the order of residues give i (6), we have X 0.25 0.5 0.25 = + +, x > 0.9-0.9 + 0.9 2 ( - 0.9 ) ( ) ( 0.9 ) 2 ( - 0.9 ) ( ) 0.25 0.5 0.25 = + +, x > 0.9-0.9 0.9 + 0.9 Usig the -trasform property of time-shift 5 + 0.25 0.9 0.9 x = u + + u + + 0.25 0.9 u 9 which upo simplificatio becomes = 0.75( 0.9) + 0.5 ( 0.9) + 0.25( - 0.9) x u u u CEMTool verificatio: C> =[0:7];delta=[(-0)==0]; x = filter(b,a,delta) % check sequece x =.0000 0.9000.6200.4580.9683.775 2.258.932 C>x = (0.75)*(0.9).^ + (0.5)*.*(0.9).^ + (0.25)*(-0.9).^ % aswer sequece x =.0000 0.9000.6200.4580.9683.775 2.258.932 6

Example 4: Determie the iverse -trasform of X + 0.4 2 = - 0.8 2 + 0.64-2 so that the resultig sequece is causal ad cotais o complex umbers. Solutio: We will have to fid the poles of X( ) i the polar form to determie the ROC of the causal sequece. CEMTool script: C>b= [,0.4*sqrt(2)]; a=[,-0.8*sqrt(2),0.64]; C>[R,p,C] = residue(b,a) R = 0.5000 -.0000i 0.5000 +.0000i p = 0.5657 + 0.5657i 0.5657-0.5657i C = Empty matrix: 0-by-0 C>Mp=(abs(p))'% pole magitudes Mp = 0.8000 0.8000 C>Ap=(agle(p))'/pi % pole agles i pi uits Ap = 0.2500-0.2500 From the above calculatios X Thus, we have 0.5 - j 0.5 + j = +, > 0.8 p p j - j 4 4-0.8e - 0.8e j - j 4 4 = ( 0.5 - ) 0.8 + ( 0.5 + ) 0.8 x j e u j e u p p p p é j j j j ì - ü ì - üù 4 4 4 4 = 0.8 0.5íe + e ý - j íe - e ý u êë î þ î þúû é æ p ö æ p öù = 0.8 êcosç + 2si ç u 4 4 ú ë è ø è øû CEMTool verificatio: p p 7

C>=0:7;delta=[(-0)==0]; C>b= [,0.4*sqrt(2)]; a=[,-0.8*sqrt(2),0.64];x=filter(b,a,delta) x =.0000.697.2800 0.3620-0.4096-0.695-0.5243-0.483 C>x = ((0.8).^).*(cos(pi*/4)+2*si(pi*/4)) x =.0000.697.2800 0.3620-0.4096-0.695-0.5243-0.483 4. System represetatio i the -domai Similar to the frequecy respose fuctio H(e jω ), we ca defie the -domai fuctio, H(), called the system fuctio. However, ulike H(e jω ), H() exists for systems that may ot be BIBO stable. DEFINITION The System Fuctio - The system fuctio H() is give by ; éë ùû å h- h+ (7) - H = Z h = h R < < R Usig the covolutio property () of the -trasform, the output trasform Y() is give by Y ( ) = H ( ) X ( ) : ROCy = ROCh Ç ROCx (8) provided ROC x overlaps with ROC h. Therefore a liear ad time-ivariat system ca be represeted i the -domai by é ù = X ëh û Y H X Whe LTI systems are described by a differece equatio N M å k å l (9) k = l= 0 + ( - ) = ( - ) y a y k b x l the system fuctio H() ca easily be computed. Takig the -trasform of both sides, ad usig properties of the -trasform, or H ( ) N k l + - = - Y a Y b X M å å k k = l= 0 After factoriatio, we obtai H l æ b ö ç Y ( ) = = = = ø - X ( ) A ( + ) ( +... + an ) = b 0 N Õ N - M l= N Õ k = M -l -M M M åb 0... l b + + B l 0 ( ) b = è 0 N N N -k å ak k = ( - ) ( - p ) l k (20) (2) 8

where l are the system eros ad p k are the system poles. Thus H() (ad hece a LTI system) ca also be represeted i the -domai usig a pole-ero plot. This fact is useful i desigig simple filters by proper placemet of poles ad eros. To determie eros ad poles of a ratioal H(), we ca use the CEMTool fuctio roots o both the umerator ad the deomiator polyomials. (Its iverse fuctio poly determies polyomial coefficiets from its roots as we discussed i the previous sectio.) It is also possible to use CEMTool to plot these roots for a visual display of a pole-ero plot. The fuctio plae(b,a) plots poles ad eros, give the umerator row vector b ad the deomiator row vector a. As before, the symbol o represets a ero ad the symbol x represets a pole. The plot icludes the uit circle for referece. Similarly, plae(,p) plots the eros i colum vector ad the poles i colum vector p. Note very carefully the form of the iput argumets for the proper use of this fuctio. TRANSFER FUNCTION REPRESENTATION If the ROC of H() icludes a uit circle ( = e jω ), the we ca evaluate H() o the uit circle, resultig i a frequecy respose fuctio or trasfer fuctio H(e jω ). The from (2) j( N -M ) = b0e H e w M Õ( e - l ) N Õ( e - pk ) The factor (e jω l ) ca be iterpreted as a vector i the complex -plae from a ero to the uit circle at = e jω, while the factor (e jω p k ) ca be iterpreted as a vector from a pole p k to the uit circle at = e jω. This is show i Figure. Hece the magitude respose fuctio (22) Figure : Pole ad ero vectors 9

e -... e - M H ( e ) = b0 e p j... e w - - p N ca be iterpreted as a product of the legths of vectors from eros to the uit circle divided by the legths of vectors from poles to the uit circle ad scaled by b 0. Similarly, the phase respose fuctio M N j ( w j j ) [ 0 p ] éë wùû å ( w k ) å ( w k ) (24) Ð H e = or + N - M + Ð e - - Ð e - p ca be iterpreted as a sum of a costat factor, a liear-phase factor, ad a oliear-phase factor (agles from the ero vectors mius the sum of agles from the pole vectors ). (23) CEMTool IMPLEMENTATION CEMTool provides a fuctio called freq for plottig magitude ad phase resposes, which uses the iterpretatio give above. I its simplest form this fuctio is ivoked by [H,w] = freq(b,a,n) which returs the N-poit frequecy vector w ad the N-poit complex frequecy respose vector H of the system, give its umerator ad deomiator coefficiets i vectors b ad a. The frequecy respose is evaluated at N poits equally spaced aroud the upper half of the uit circle. Note that the b ad a vectors are the same vectors we use i the filter fuctio or derived from the differece equatio represetatio (9). The secod form [H,w] = freq(b,a,n, whole ) uses N poits aroud the whole uit circle for computatio. I yet aother form H = freq(b,a,w) it returs the frequecy respose at frequecies desigated i vector w, ormally betwee 0 ad π. It should be oted that the freq fuctio ca also be used for umerical computatio of the DTFT of a fiite-duratio, causal sequece x(). I this approach, b=x ad a=. Example 5: Give a causal system y ( ) = 0.9y ( - ) + x( ) a. Determie H() ad sketch its pole-ero plot. b. Plot H(e jω ) ad H(e jω ). c. Determie the impulse respose h(). Solutio: The differece equatio ca be put i the form y ( ) - 0.9y ( - ) = x( ) H a. From (2) = ; > 0.9-0.9 - sice the system is causal. There is oe pole at 0. 9 ad oe ero at the origi. We will use CEMtool to illustrate the use of the plae fuctio. 0

C> b= [, 0]; a = [, -0.9]; plae(b,a) Note that we specified b=[,0] istead of b= because the plae fuctio assumes that scalars are eros or poles. The resultig pole-ero plot is show i Figure 2. Figure 2: Pole-ero plot of example 5 b. Usig (4.23) ad (4.24), we ca determie the magitude ad phase of H(e jω ). Oce agai we will use CEMTool to illustrate the use of the freq fuctio. Usig its first form, we will take 00 poits alog the upper half of the uit circle. CEMTool Script: C>b= [, 0]; a = [, -0.9]; [H,w] = freq(b,a,00); magh = abs(h); phah = agle(h);

C> subplot(2,,);plot(w/pi,magh);grido; C> xlabel("frequecy i pi uits"); ylabel("magitude"); C> title("magitude Respose"); C> subplot(2,,2);plot(w/pi,phah/pi);grido; C> xlabel("frequecy i pi uits"); ylabel("phase i pi uits"); C> title("phase Respose"); The respose plots are show i Figure 3. Figure 3: Frequecy respose plots i example 5 c. From the trasform: é ù h Z ê u ë- 0.9 ú û =, > 0.9 = ( 0.9) 2

Example 6: Give that = 2 H + - 0.9 + 0.8 is a causal system, fid a. its trasfer fuctio represetatio, b. its differece equatio represetatio, ad c. its impulse respose represetatio. Solutio: The poles of the system fuctio are at = 0.9Ð ±. Hece the ROC of the above causal system 3 is > 0.9. Therefore the uit circle is i the ROC, ad the discrete-time Fourier trasform H(e jω ) exists. a. Substitutig = e jω i H (), e + e + = = w p p e - 0.9e + 0.8 æ j j öæ 3 ö 3 ç e - 0.9e ç e - 0.9e è øè ø j2 H e b. Usig H ()= Y ()/X (), Cross multiplyig, -2-2 Y + æ ö + = ç = X - 0.9 + 0.8è ø - 0.9 + 0.8 2-2 -2 2 2-0.9 - + 0,8 - = - + - Y Y Y X X Now takig the iverse -trasform, or - 0.9 ( - ) + 0.8 ( - 2) = ( - ) + ( - 2) y y y x x = 0.9 ( ) - 0.8 ( - 2) + ( - ) + ( - 2) y y y x x p c. Usig the CEMTool Script, C>b= [0,,]; a = [,-0.9,0.8]; [R,p,C] = residue(b,a) R = -0.673-0.9979i -0.673 + 0.9979i p = 0.4500 + 0.7794i 0.4500-0.7794i C =.2346 3

C>Mp = (abs(p))' Mp = 0.9000 0.9000 C>Ap = (agle(p))'/pi Ap = 0.3333-0.3333 We have Hece H - 0.673 + j0.9979-0.673 - j0.9979 =.2346 + +, > 0.9 j p p - - j 3 3-0.9e - 0.9e p p é ù h ê j e j e ú u ë û j j 3 3 =.2346d + (- 0.673 + 0.9979) 0.9 + (-0.673-0.9979) 0.9 é æ p ö æ p öù =.2346d + 0.9 ê-.2347 cosç +.9958si ç 3 3 ú ë è ø è øû ( ) u ( ) é æ p ö æ p öù = 0.9 ê-.2347 cosç +.9958si ç u 3 3 ú ë è ø è øû The last step results from the fact that h(0)=0. RELATIONSHIPS BETWEEN SYSTEM REPRESENTATIONS I this ad the previous two chapters we developed several system represetatios. Figure 4 depicts the relatioships betwee these represetatios i a graphical form. Figure 4: System represetatios i pictorial form 4

STABILITY AND CAUSALITY For LTI systems the BIBO stability is equivalet to h( k ) å - <. From the existece of the discrete-time Fourier trasform this stability implies that H(e jω ) exists, which further implies that the uit circle = must be i the ROC of H(). This result is called the -domai stability theorem; therefore the dashed paths i Figure 4.9 exist oly if the system is stable. THEOREM 2 -Domai LTI Stability A LTI system is stable if ad oly if the uit circle is i the ROC of H(). For LTI causality we require that h() = 0, for < 0 (i.e., a right-sided sequece). This implies that the ROC of H() must be outside of some circle of radius R h. This is ot a sufficiet coditio sice ay right-sided sequece has a similar ROC. However, whe the system is stable, the its causality is easy to check. THEOREM 3 -Domai Causal LTI Stability A causal LTI system is stable if ad oly if the system fuctio H() has all its poles iside the uit circle. Example 7: A causal LTI system is described by the followig differece equatio: = 0.8 ( - 2) + - ( - 2) y y x x Determie a. the system fuctio H ( ), b. the uit impulse respose h (), c. the uit step respose v (), that is, the respose to the uit step u(), ad d. the frequecy respose fuctio H (e jω ), ad plot its magitude ad phase over 0 ω π. Solutio: Sice the system is causal, the ROC will be outside of a circle with radius equal tothe largest pole magitude. a. Takig the -trasform of both sides of the differece equatio ad the solvig for Y ( )/X ( ) or usig (20), we obtai H -2-2 - - = =, > 0.9-2 - 0.8 + 0.9-0.9 b. Usig the MATLAB Script for the partial fractio expasio, 5

C>b= [,0,]; a = [,0,-0.8]; [R,p,C] = residue(b,a) R = -0.73-0.73 p = -0.9000 0.9000 C =.2346 We have H or =.2346-0.73-0.73, > 0.9 + 0.9-0.9 =.2346d - 0.73{ + (- ) }( 0.9) h u Z éë u ùû = U =, >, Hece - - V = H U c. Because of ( )( ) ( 0.9 )( 0.9 ) é + - ù é ù = ê ú, > 0.9 Ç < + - ê ë- ú êë úû û + =, > 0.9 ( + 0.9 )( - 0.9 ) V =.0556-0.0556, > 0.9-0.9 + 0.9 or Fially, v( ) = é.0556( 0.9) -0.0556(-0.9) ù u ( ) ë û Note that i the calculatio of V () there is a pole-ero cacellatio at =. This has two implicatios. First, the ROC of V ( ) is still { > 0. 9} ad ot { > 0. 9 > = > }. Secod, the step respose v () cotais o steady-state term u(). d. Substitutig = e jω i H ( ), H e - e = - 0.8e - j2w - j2w We will use the CEMTool Script to compute ad plot resposes. 6

b= [,0,]; a = [,0,-0.8]; w = [0:500:]*pi/500; H = freq(b,a,w); magh = abs(h); phah = agle(h); subplot(2,,); plot(w/pi,magh); grido; xlabel("frequecy i pi uits"); ylabel("magitude") title("magitude Respose"); subplot(2,,2); plot(w/pi,phah/pi); grido; xlabel("frequecy i pi uits"); ylabel("phase i pi uits") title("phase Respose") Figure 5 shows the Frequecy respose plots: Figure 5: Frequecy respose plots for example 7 7

5. Solutios of the differece equatios Oe form ivolved fidig the particular ad the homogeeous solutios, while the other form ivolved fidig the ero-iput (iitial coditio) ad the ero-state resposes. Usig -trasforms, we ow provide a method for obtaiig these forms. I additio, we will also discuss the trasiet ad the steady-state resposes. I digital sigal processig differece equatios geerally evolve i the positive directio. Therefore our time frame for these solutios will be 0. For this purpose we defie a versio of the bilateral -trasform called the oe-sided -trasform DEFINITION 4 The Oe-sided Trasform The oe-sided -trasform of a sequece x() is give by + + - = = [ ] = Z éë x ùû Z éë x u ùû X å x (25) The the sample shiftig property is give by ( - ) = ( - ) + Z éë x k ùû Z éë x k u ùû å å - = x - k = x m = 0 m=-k ( m k ) - + é ù = å x( m) + ê å x( m) ú m=- k ëm= 0 û - - m+ k -m -k + -k 2-k - k + or Z éx( - k ) ù = x( - ) + x( - 2 ) +... + x( - k ) + X ( ) = 0 ë û (26) This result ca ow be used to solve differece equatios with oero iitial coditios or with chagig iputs. We wat to solve the differece equatio N + a y - k = b x - m, ³ 0 M å å k k = m= 0 subject to these iitial coditios: { y ( i), i =,..., - N} ad m { x i, i =,...,- M } We ow demostrate its solutio usig a example. Example 8: 3 Solve y ( ) - y ( - ) + y ( - 2 ) = x( ), ³ 0 2 2 æ ö = ç è 4 ø where x( ) u ( ) subject to y ( ) = 4 ad y ( 2) = 0. Solutio : Takig the oe-sided -trasform of both sides of the differece equatio, we obtai + 3 - + - 2 + Y ( ) - é y ( ) Y ( ) y ( 2) y ( ) Y ( ) 2 ë - + ù û + é ù 2 ë - + - + û = - 4 8

Substitutig the iitial coditios ad rearragig, Y 3 ê ë 2 2 ú û - 4 é 2 ù - + = + ( - 2 ) + - - - + or Y ( ) + Fially, Y ( ) - 4-2 = + 3 3 - + - + 2 2 2 2 9-2 2 - + = 4 2 æ ö ( ) æ ö ç - - ç - è 2 ø è 4 ø -2-2 Usig the partial fractio expasio, we obtai Y + 2 = + 3 + 3 - - - 2 4 ( ) After iverse trasformatio the solutio is = ê + + ú u ( ) y éæ ö 2 æ ö ù ç ç êë è 2 ø 3 3 è 4 ø úû (27) (28) (29) Forms of the Solutios The above solutio is the complete respose of the differece equatio. It ca be expressed i several forms. Homogeeous ad particular parts: éæ ö 2ù æ ö = ç + + ç êë è 2 ø 3úû 3 è 4 ø ê ú u ( ) y The homogeeous part (the first part) is due to the system poles ad the particular part (the secod part) is due to the iput poles. Trasiet ad steady-state resposes: é æ ö æ ö ù 2 y ç ç u u êë 2 è 4 ø è 2 ø úû 3 = ê + ú + The trasiet respose (the first part) is due to poles that are iside the uit circle, while the steady-state respose (the secod part) is due to poles that are o the uit circle. Note that whe the poles are outside the uit circle, the respose is termed a ubouded respose. Zero-iput (or iitial coditio) ad ero-state resposes: I equatio (27) Y + () has two parts. The first part ca be iterpreted as ZS = Y H X while the secod part as 9

ZI = Y H X IC where X IC () ca be thought of as a equivalet iitial-coditio iput that geerates the same output Y ZI as geerated by the iitial coditios. I this example x IC () is IC {, 2} x = - Now takig the iverse -trasform of each part of (27), we write the complete respose as é æ ö æ ö 8ù é æ ö ù y ç ç u ç u êë 3 è 4 ø è 2 ø 3úû êë è 2 ø úû = ê - 2 + ú + ê3-2ú The first part is ero-state respose ad the secod part is ero-iput respose. From this example it is clear that each part of the complete solutio is, i geeral, a differet fuctio ad emphasies a differet aspect of system aalysis. CEMTool IMPLEMENTATION We used the filter fuctio to solve the differece equatio, give its coefficiets ad a iput. This fuctio ca also be used to fid the complete respose whe iitial coditios are give. I this form the filter fuctio is ivoked by y = filter(b,a,x,xic) where xic is a equivalet iitial-coditio iput array. To fid the complete respose i Example 8, we will use the CEMTool Script C>a=[ -3/2 /2];b=[]; = [0:7]; x = (/4).^; xic = [, -2]; y = filter(b,a,x,xic) y = 2.0000.2500 0.9375 0.7969 0.7305 0.6982 0.6824 0.6745 C>y2 = (/3)*(/4).^+(/2).^+(2/3)*oes(,8) % CEMTool Check y2 = 2.0000.2500 0.9375 0.7969 0.7305 0.6982 0.6824 0.6745 which agrees with the respose give i (29). I Example 4.4 we computed x IC () aalytically. However, i practice, ad especially for large order differece equatios, it is tedious to determie x IC () aalytically. CEMTool provides a fuctio called filtic, which is available oly i the Sigal Processig toolbox. It is ivoked by xic = filtic(b,a,y,x) i which b ad a are the filter coefficiet arrays ad Y ad X are the iitial coditio arrays from the iitial coditios o y() ad x(), respectively, i the form ( ), ( 2 ),..., ( ), ( 2 ),..., Y = éë y - y - y -N ùû X = éë x - x - x -M ùû 20

If x()=0, the X eed ot be specified i the filtic fuctio. I Example 8 we could have used C>Y = [4, 0]; xic = filtic(b,a,y) xic = -2 to determie x IC (). Example 9: Solve the differece equatio y ( ) = éx( ) + x( - ) + x( - 2) ù + 0.95y ( ) -0.9025y ( - 2 ), ³ 0 3 ë û æ p ö where x( ) = cosç u ( ) ad y ( ) = 2,y ( 2) = 3; x( ) =,x ( 2) = è 3 ø First determie the solutio aalytically ad the by usig CEMTool. Solutio: Takig a oe-sided -trasform of the differece equatio + + - + - 2 + Y ( ) = é ( ) ( 2) ( ) 3 ëx + x - + X + x - + x - + X ù û - + - 2 + + 0.95é ë y (- ) + Y ( ) ù û - 0.9025é ë y (- 2) + y (- ) + Y ( ) ù û ad substitutig the iitial coditios, we obtai -2 + + +.4742 2.383 3 3 3 + + Y = X 2 ( ) + - - -2-0.95 + 0.9025-0.95 + 0.9025 + - 0.5 X = ad simplifyig, we will -2 - + Clearly, x IC ()=[.4742, 2.383]. Now substitutig obtai Y() as a ratioal fuctio. This simplificatio ad further partial fractio expasio ca be doe usig CEMTool as show below. CEMTool script: C> b= [,,]/3; a = [,-0.95,0.9025]; Y = [-2,-3]; X = [,]; xic=filtic(b,a,y,x) xic =.4742 2.383 C> bxplus = [,-0.5]; axplus = [,,]; % X() trasform coeff. ayplus = cov(a,axplus) % Deomiator of Yplus() ayplus =.0000.9500 2.8525.8525 0.9025 C>byplus = cov(b,bxplus)+cov(xic,axplus) % Numerator of Yplus() byplus = 2

.8075 0.8308-0.4975.977 C> [R,p,C] = residue(byplus,ayplus) R = 0.0584-3.9468i 0.0584 + 3.9468i 0.8453 + 2.03i 0.8453-2.03i p = 0.5000 + 0.8660i 0.5000-0.8660i 0.4750 + 0.8227i 0.4750-0.8227i C = Empty matrix: 0-by-0 C> Mp = abs(p), Ap = agle(p)/pi % Polar form Mp =.0000.0000 0.9500 0.9500 Ap = 0.3333-0.3333 0.3333-0.3333 Hece Now, Y + ( ) -2-3.8075 + 0.8308-0.4975 +.977 = -.95 + 2.8525 -.8525 + 0.9025 0.0584 + j3.9468 0.0584 - j3.9468 = + - jp /3 - jp /3 - e - e 0.8453+ j2.03 0.8453 - j2.03 + + - jp /3 - jp /3-0.95e - 0.95e -2-3 -4 - jp = ( 0.0584 + 3.9468) + ( 0.0584-3.9468) y j e j e /3 jp /3 jp ( 0.8453 2.03)( 0.95) ( 0.8453 2.03)( 0.95) ( p ) ( p ) = 0.69 cos / 3 + 7.8937 si / 3 /3 - jp /3 + - j e + - j e é ( p ) ( p ) + 0.95 ë.6906 cos / 3-4.0623si / 3 ùû, ³ 0 22

The first two terms of y () correspod to the steady-state respose, as well as to the particular respose, while the last two terms are the trasiet respose (ad homogeeous respose) terms. To solve this example usig CEMTool, we will eed the filtic fuctio, which we have already used to determie the x IC ( ) sequece. The solutio will be a umerical oe. Let us determie the first 8 samples of y (). C> = [0:7]; x = cos(pi*/3); y = filter(b,a,x,xic) y =.8075 4.3555 2.8397.5664-4.776-3.404.3596 5.028 C>% CEMTool Verificatio A=real(2*R()); B=imag(2*R(2)); C=real(2*R(3)); D=imag(2*R(4)); y=a*cos(pi*/3)+b*si(pi*/3)+((0.95).^).*(c*cos(pi*/3)+d*si(pi*/3)) y =.8075 4.3555 2.8397.5664-4.776-3.404.3596 5.028 Refereces. CEMTool 6.0 User s Guide 2. Viay K. Igle ad Joh G. Proakis, Digital sigal processig usig MATLAB, CRC Press, Secod editio 200. 23