EECE 301 Signals & Systems Prof. Mark Fowler Note Set #34 • D-T Systems: Z-Transform … Solving Difference Eqs. & Transfer Func. • Reading Assignment: Sections 7.4 – 7.5 of Kamen and Heck 1/16 Course Flow Diagram The arrows here show conceptual flow between ideas. Note the parallel structure between the pink blocks (C-T Freq. Analysis) and the blue blocks (D-T Freq. Analysis). New Signal Models Ch. 1 Intro C-T Signal Model Functions on Real Line System Properties LTI Causal Etc D-T Signal Model Functions on Integers New Signal Model Powerful Analysis Tool Ch. 3: CT Fourier Signal Models Ch. 5: CT Fourier System Models Ch. 6 & 8: Laplace Models for CT Signals & Systems Fourier Series Periodic Signals Fourier Transform (CTFT) Non-Periodic Signals Frequency Response Based on Fourier Transform Transfer Function New System Model New System Model Ch. 2 Diff Eqs C-T System Model Differential Equations D-T Signal Model Difference Equations Ch. 2 Convolution Zero-State Response C-T System Model Convolution Integral Zero-Input Response Characteristic Eq. D-T System Model Convolution Sum Ch. 4: DT Fourier Signal Models DTFT (for “Hand” Analysis) DFT & FFT (for Computer Analysis) Ch. 5: DT Fourier System Models Freq. Response for DT Based on DTFT New System Model New System Model Ch. 7: Z Trans. Models for DT Signals & Systems Transfer Function New System Model 2/16 ZT For Difference Eqs. Given a difference equation that models a D-T system we may want to solve it: -with IC’s -with IC’s of zero Apply ZT to the Difference Equation Use the Transfer Function Approach Note… the ideas here are very much like what we did with the Laplace Transform for CT systems. We’ll consider the ZT/Difference Eq. approach first… 3/16 Solving a First-order Difference Equation using the ZT Given : y[n ] + ay[n − 1] = bx[n ] Solve for: y[n] for n = 0, 1, 2,… IC = y[ −1] x[n ] for n = 0, 1, 2 , ... Take ZT of differential equation: Z {y[n ] + ay[n − 1]} = Z {bx[n ]} Use Linearity of ZT Z {y[n ]}+ aZ {y[n − 1]} = bZ {x[n ]} Y(z) X(z) Need Right-Shift Property… but which one??? Because of the non-zero IC we need to use the non-causal form: Z {y[n − 1]} = z −1Y ( z ) + y[−1] 4/16 [ ] Using these results gives: Y ( z ) + a z −1Y ( z ) + y[ −1] = bX ( z ) Which is an algebraic equation that can be solved for Y(z): Y ( z) = b − ay[ −1] X ( z) + −1 −1 1 + az 1 + az Not the best form for doing Inverse ZT… we want things in terms of z not z-1 Multiply each term by z/z Y ( z ) = −ay[ −1] z bz + X ( z) z+a z+a On ZT Table bz Part due to input signal H ( z) = modified by Transfer Function z+a y[n ] = − ay[ −1]( −a ) n u[n ] + Z −1{H ( z ) X ( z )} If |a| < 1 this dies out as n ↑, its an IC-driven transient If the ICs are zero, this is all we have!!! 5/16 Ex.: Solving a Difference Equation using ZT: 1st-Order System w/ Step Input z For x[n ] = u[n ] ↔ X ( z ) = z −1 Then using our general results we just derived we get: Y ( z) = − ay[−1]z ⎛ bz ⎞⎛ z ⎞ +⎜ ⎟ ⎟⎜ z+a ⎝ z + a ⎠⎝ z − 1 ⎠ For now assume that a ≠ -1 so we don’t have a repeated root. Then doing Partial Fraction Expansion we get (and we have to do the PFE by hand because we don’t know a… but it is not that hard!!!) − ay[ −1]z ( aab+1 )z ( ab+1 )z Y ( z) = + + z+a z+a z −1 [ b y[n ] = −ay[ −1]( −a ) + a ( −a )n + (1) n a +1 n IC-Driven Transient: decays if system is stable ] Now using ZT Table we get: n = 0, 1, 2,... Input-Driven Output… 2 Terms: 1st term decays (Transient) 2nd term persists (Steady State) 6/16 Solving a Second-order Difference Equation using the ZT The Given Difference Equation: y[n] + a1 y[n − 1] + a2 y[n − 2] = b0 x[n] + b1 x[n − 1] Assume that the input is causal Assume you are given ICs: y[-1] & y[-2] Find the system response y[n] for n = 0, 1, 2, 3, … Take the ZT using the non-causal right-shift property: Y ( z ) + a1 (z −1Y ( z ) + y[ −1]) + a2 (z −2Y ( z ) + z −1 y[ −1] + y[ −2]) = b0 X ( z ) + b1 z −1 X ( z ) − a1 y[ −1] − a2 y[ −1]z −1 − a2 y[ −2] b0 + b1 z −1 + Y ( z) = X ( z) −1 −2 −1 −2 1 + a1 z + a2 z 1 + a1 z + a2 z Due to IC’s… decays if system is stable H(z) Due to input – will have transient part and steady-state part 7/16 Let’s take a look at the IC-Driven transient part: − a1 y[ −1] − a2 y[ −1]z −1 − a2 y[ −2] A − Bz −1 Yzi ( z ) = = −1 −2 1 + a1 z + a2 z 1 + a1 z −1 + a2 z −2 Multiply top and bottom by z2: Az 2 + Bz Yzi ( z ) = 2 z + a1 z + a2 Now to do an inverse ZT on this requires a bit of trickery… Take the bottom two entries on the ZT table and form a linear combination: C1a n cos(Ωo n )u[n ] + C2 a n sin(Ωo n )u[n ] a = a2 C1 = A ↔ C1 z 2 + a (C2 sin(Ωo ) − C1 cos(Ωo ) )z z 2 − 2a cos(Ωo ) z + a 2 ⎡ − a1 ⎤ Ω0 = cos ⎢ ⎥ ⎢⎣ 2 a2 ⎥⎦ cos(Ω0 ) B − C1 C2 = sin(Ω0 ) a sin(Ω0 ) −1 Compare & Identify 8/16 Finally, by a trig ID we know that C1a n cos(Ωo n )u[n ] + C2a n sin(Ωo n )u[n ] = Ca n cos(Ωo n + θ )u[n ] So… all of this machinery leads to the insight that the IC-Driven transient of a second-order system will look like this: y zi [n ] = Ca n cos(Ωo n + θ )u[n ] …where: 1. The frequency Ω0 and exponential a are set by the Characteristic Eq. a = a2 ⎡ − a1 ⎤ Ω0 = cos−1 ⎢ ⎥ ⎢⎣ 2 a2 ⎥⎦ 2. The amplitude C and the phase θ are set by the ICs Note: If |a2| < 1 then we get a decaying response!! 9/16 Solving a Nth-order Difference Equation using the ZT N M Contains x[n], x[n-1],… i =1 i =0 If this system is causal, we won’t have x[n+1], x[n+2], etc. here y[n] + ∑ ai y[n − i ] = ∑ bi x[n − 1] A( z ) = z N + a1 z N −1 + ... + a N −1 z + a N B( z ) = b0 z N + b1 z N −1 + ... + bM z N − M C ( z ) = depends on the IC' s Transforming gives: Y ( z) = C ( z ) B( z ) + X ( z) A( z ) A( z ) Transient and steady state part due to input H(z) – transfer function Transient part due to ICs 10/16 Discrete-Time System Relationships Time Domain Z / Freq Domain Pole/Zero Pole/Zero Diagram Diagram Roots Difference Difference Equation Equation ZT (Theory) Inspect (Practice) y[ k ] + an −1 y[k − 1] + " + a1 y[k − (n − 1)] + a0 y[k − n] = bn f [k ] + bn −1 f [k − 1] + " + b1 f [k − (n − 1)] + b0 f [k − n] h[k] bn z n + bn −1z n −1 + " + b1 z + b0 H ( z) = n z + an −1 z n −1 + " + a1z + a0 Unit Circle ZT DTFT Impulse Impulse Response Response Transfer Transfer Function Function Frequency Frequency Response Response H ( Ω ) = H ( z ) | z = e jΩ 11/16 Example System Relationships Time Domain Difference Difference Equation Equation Z / Freq Domain ZT (Theory) Inspect (Practice) Input-Output Form y (n) − α y (n − 1) = β x(n) Transfer Transfer Function Function [ ] Y (z) 1−α z = β X (z) −1 Recursion Form y (n) = β x(n) + α y (n − 1) β Y ( z) H ( z) = = −1 X ( z) 1 − α z βz H ( z) = z −α 12/16 Example System (cont.) Z / Freq Domain z = e jΩ z −1 = e − jΩ On Unit Circle H ( z) = β 1 − α z −1 Transfer Transfer Function Function z −1 = e − jΩ β H (Ω ) = 1 − α e − jΩ Ω ∈ (−π , π ] Unit Circle Frequency Frequency Response Response 13/16 Example System (cont.) Plotting Transfer Function β β = 1 − α e − jΩ 1 − [α cos(Ω) − jα sin(Ω)] β = [1 − α cos(Ω)] + jα sin(Ω) Euler’s Equation H (Ω ) = H (Ω) = β [1 − α cos(Ω)] + [α sin(Ω)] 2 ⎡ α sin(Ω) ⎤ ∠H (Ω) = − tan −1 ⎢ ⎥ 1 α cos( ) − Ω ⎦ ⎣ 2 Group into Real & Imag Standard Eqs for Mag. & Angle 14/16 Example System (cont.) Z/Freq Domain Im{z} Unit Circle Pole/Zero Pole/Zero Diagram Diagram Re{z} Roots Transfer Transfer Function Function β βz H ( z) = = −1 1−α z z −α Zero Num. = 0 When z = 0 Pole Den. = 0 When z = α If α < 1: Inside UC If α > 1: Outside UC 15/16 Example System (cont.) Time Domain Z / Freq Domain H ( z) = Inv. ZT Table β 1 − α z −1 Transfer Transfer Function Function h(n) = βα n Impulse Impulse Response Response Inv. DTFT π β h( n) = ∫ dΩ −π 1 − α e − jΩ Use Table if Possible ZT Unit Circle DTFT Frequency Frequency Response Response β H (Ω ) = 1 − α e − jΩ Ω ∈ (−π , π ] 16/16