OKAN UNIVERSITY FACULTY OF ENGINEERING AND ARCHITECTURE EEE 43 DIGITAL SIGNAL PROCESSING (DSP) 2 DIFFERENCE EQUATIONS AND THE Z- TRANSFORM FALL 22 Yrd. Doç. Dr. Didem Kivanc Tureli didemk@ieee.org didem.kivanc@okan.edu.tr
Linear constant coefficient difference equations Discrete time systems can be finite impulse response or infinite impulse response. Finite impulse response systems have a that dies out over time. Infinite impulse response systems will continue to give an output indefinitely when they receive an impulse at the input (like oscillators). We are interested in infinite impulse response (IIR) systems which can be described using linear constant coefficient difference equations.
Recursive difference equations y[n-] is called the state of the system. x[n] is the system input.
Recursive implementation of the system
If y[-]=, then the system is linear in the general sense. The system output can be calculated by either convolving with h[n] or using the difference equation. If y[-] is not zero, it is linear in a more general sense, involving linearity with respect to both initial conditions and input.
Why z-transform? Need to analyze some signals which don t have a Fourier Transform (Fourier sum/integral does not converge). A better notation to deal with transient signals.
z-transform from Laplace transform For a sampled signal x(m) = x(mt s ), the Laplace transform becomes s st sm X e x t e dt x m e ( ) () ( ) X ( z) = x( m) z m = = m= m= begins at. One sided z transform, sum m ( ) x( m) z X z = m= Two sided z transform, sum begins at negative infinity.
Fourier and z- Transforms Compare the z-transform to the discrete time Fourier transform (DTFT). forward reverse Discrete time i n iωn X ω = xne ω xn = X( ) e d Fourier transform ( ) [ ] [ ] ω ω n= 2π 2π (DTFT) z-transform m m X ( z ) = x ( m ) z x ( m ) = X ( z ) z dz 2π j m= where C is any positively oriented simple C closed curve that lies in the R< < z region and winds around the origin The DTFT is the z-transform evaluated on the unit circle, where z =.
z-transform from Laplace transform Laplace Transform: The s stands for a growing or decaying exponential, good for analyzing transient signals. st ( σ+ jω)t σ t jωt e = e = e e z-transform: The z stands for a growing or decaying exponential, good for analyzing transient signals. ( + j ) z = e = e = e e m sm σ ω m σ m jωm
Laplace Transform Plane s-plane jω 3π/2 π π/2 σ π/2 π 3π/2 π= π π/2 z-plane s σ jω z = e = e e Inside of the unit circle on the z-plane corresponds to the left half plane on the s-plane. The unit circle on the z-plane corresponds to the imaginary axis on the s-plane The outside of the unit circle on the z-plane corresponds to the right half plane on the s plane. π/2
In practice jω axis on s plane (unit circle, z =, on z-plane) ) sin(t).5 -.5.5 -.5 - z = 5 5 2 25 3-2 - 2 right half plane on s plane (outside unit circle, z >, on z-plane) 2 e -t/2 sin(t).5 -.5.5 -.5 - z < 5 5 2 25 3-2 - 2 left half plane on s plane (inside unit circle, z <, on z-plane) e t/2 sin(t) 2-2.5 -.5 z > -4 5 5 2 25 3 - -2-2
Frequency mapping on the z-plane An angle of 2π, once round the unit circle, corresponds to a frequency of F s Hz where F s is the sampling frequency. Hence a frequency of f Hz corresponds to an angle φ given by 2π ϕ = f radians F s For example, at a sampling rate of F s = 4 khz, a frequency of 5 khz corresponds to an angle of 2π ϕ = 5 =.5 π radians = 45 degrees 4
Im X(z) ( ) z = e jω ω Re Re Im X(e jω ) π π ω
The region of convergence (ROC) of X(z) is the set of all the values of z for which X(z) ( ) attains a finite computable value. That is, the ROC is all z for which X(z) <. In general the ROC consists of the area between cocentric rings.
Example Find the z-transform and the region of convergence for the following function: ( ) ( ) { m = x m = δ m = m SOLUTION: m ( ) ( ) X z = x m z = z = m= Since X(z)= for all z, the region of convergence is the whole z- plane.
Example Find the z-transform and the region of convergence for the following function: ( ) ( ) { = m= k x m δ m k = m k SOLUTION: ( ) ( ) δ ( ) X z = x m z = z = z m= m k k X(z) is finite-valued for all the values of z except for z=. The region of convergence is the whole z-plane except the origin z=.
Example Find the z-transform and the region of convergence for the following function: ( ) ( ) { = m= k x m δ m+ k = m k SOLUTION: ( ) ( ) δ ( ) X z = x m z = z = z m= m k k X(z) is finite-valued for all the values of z except for z=. The region of convergence is the whole z-plane except the point z=.
Example Find the z-transform and the region of convergence for the following function: ( ) ( ) ( ) { = m= ± k x m δ m+ k + δ m k = m ± k SOLUTION: ( ) ( ) δ ( ) δ ( ) X z = x m z = z + z = z + z m= m k k k k X(z) is finite-valued for all the values of z except for z= and z=. The region of convergence is the whole z-plane except the points z= and z=.
Example Determine the z-transform and region of convergence of SOLUTION: ( ) x m m α m = m < m α X z = x m z = z = α z m= m= m= z m m m = ( ) ( ) α α if < z otherwise. The region of convergence (ROC) is z > α jω ROC = { z = re r > >α }
Example Determine the z-transform and region of convergence of SOLUTION: ( ) x( ) X z ( ) x m m = m α m < z m m if < m α z z = m z α = = = m= m= z m= α α otherwise. z α if z < α if z < α ( ) ( = z = α z ) α otherwise. otherwise. < α The region of convergence (ROC) is z
Example Determine the z-transform and region of convergence of ( ) x m α = β m m m m < SOLUTION: m m m m z ( ) ( ) X z β α α = x m z = + = + m= m= z m= z m= β m= z + if z > α and z < β = ( α z ) ( β z ) otherwise. The region of convergence (ROC) is α < z < β m
Properties of the z transform Linearity Z ax n by n ax z by z Time shifting ( ) + y ( ) = ( ) + ( ) Z d x ( n d ) = z X ( z ) Note that z delays the signal by unit and z k by k units, and z+ is a noncausal unit time advance, and z+k advances a signal in time by k units. x( n) x d ( n d) z x( n) d z ( + d) x n time delay time advance
Example Determine the z-transform and region of convergence of ( ) x m = m k α m m < k SOLUTION: ( ) m m k m k m k m k k α z α z z ( ) = ( ) = = = ( αz ) X z x m z z m= m= k m= k m= k z = ( α z ) if α z < otherwise. The region of convergence (ROC) is α < z m
Properties of the z transform Multiplication by an Exponential Sequence (Frequency Modulation) ( ) X( z ) n axn = Z a But multiplication will affect the region of convergence and all the pole-zero locations will be scaled by a factor of a. Time shifting ( )* ( ) ( ) ( ) Z x n y n = X z Y z z-domain differentiation ( ) Z nx n = z dx ( z) dz
Properties of the z transform Conjugation Time reversal Z x* ( n ) = X * ( z* ) Z x ( n ) = X ( z ) z / R x Real and imaginary parts Z Re x ( n ) = X ( z ) + X * ( z* ) 2 Z Im x( n) = X ( z) X *( z* ) 2 j Initial value x ( ) = limx ( z) z
Transfer functions, poles, zeros Consider the following system x( m) h N M = k + k k= k= ( ) ( ) ( ) y m a y m k b x m k To find the transfer function, take the z transform of both sides. ( ) H z N M = k + k= k= ( ) k k ( ) ( ) Y z a z Y z b z X z ( ) ( ) Y z b + bz + + b z = = = X z a z a z M M k= N N N k M k = bz k k k az k
Finding the poles and zeros Rewriting this M ( ) + + + M N ( ) Y z b bz b z H ( z) = = X z az an z M b M b M M z + z bz b + + b = N N N z z a z a ( z z)( z z2) ( z z ) ( )( ) ( ) bz = = M M M+ N k = Gz N N z z p z p 2 z p N N M k = ( z z ) zeros k ( z p ) k Gain poles
Finding the poles and zeros If N > M, H(z = ) = and there is a zero at z =, if N < M, H(z ( = ) = and there is a pole at z =. A zero exists at infinity if H(z = ) = and a pole exists at infinity if H(z = ) =. For a system with real-valued coefficients a k and b k, complexvalued poles or zeros always occur in complex conjugate pairs. For a stable system the poles should have a magnitude of less than one and lie inside the unit circle. The transfer function H(z) an be represented using the polezero plot on the complex plane. In the pole-zero plot, the location of the poles are marked by crosses ( ) and the locations of the zeros are marked by circles (O).
Example Find the z-transform and plot the pole-zero diagram of the following right-sided discrete-time signal 8.8 m.6 α m x( m) =.4 m <.2 SOLUTION: 2 4 6 8 2 m m m = z = α z = = m= m= α z z ( ) x ( m ) X z ( ) ( α ) z The region of convergence (ROC) is α < z.8 6.6.4.2 -.2 -.4 -.6 -.8 - -2 -.5 - -.5.5.5 2
Example: The Response of a Single (First-Order) Zero or Pole Find the z-transform and plot the pole-zero diagram of the following right-sided discrete-time signal x(m) SOLUTION: ( ) = α ( ) + ( ) y m x m x m ( ) ( ) ( ) ( )( = α + = + α ) Y z z X z X z X z z ( ) Y( z) X ( z) ( ) = z H z = = ( +α z ) H z + α = z = α is a zero. z - + α y(m) To find which frequencies the zero corresponds to, substitute z=e jω. j j H e ω = +αe ω ( ) ( )
( ) ( ) ω = z = H = + α when α =, H () = ω = π z = H = α when α =+, H( ) =
Finding the poles and zeros Causal Systems : ROC extends outward from the outermost pole. Stable (BIBO stable) Systems : ROC includes the unit circle. Example: consider the system Im[z] [] yn ( ) = ayn ( ) + xn ( ) Y ( z ) = az Y ( z ) + X ( z ) Y( z) = Re[z] X z az ( ) ( ) = a n u( n) y n a
Determination of Frequency Response from pole-zero pattern A LTI system is completely characterized by its pole-zero pattern. You can tell if a filter is high pass or low pass by just looking at its poles and zeros as follows: Example ( ) = ( z p )( z p ) H z z z 2 The red vectors are the vectors (z p ) and (z p 2 ) which are the denominator of H(z). The green vector is the vector (z z ) which is the numerator of H(z). z Im[z] [] p p 2 e jω Re[z]
Determination of Frequency Response from pole-zero pattern Example (continued) ( ) H z The magnitude of the green vector will be constant no = z z ( z p )( z p ) 2 Im[z] [] matter where we look on the jω unit circle. The magnitude of the red - vectors are smallest for points close to (+i) on the real axis. This means that H(z) is smallest for low frequencies (around +j) and largest for high frequencies (around +j). H(z) is a low pass filter. z p p 2 e Re[z]
Bibliography Notes on the z-transform by Saeed Vaseghi http://dea.brunel.ac.uk/cmsp/courses/multimedia_signal_procsignal proc essing.htm