You are on page 1of 34

Digital Signal Processing

CSE - 610
Lecture # 6: Z-Transform & Transform Analysis

Dr. Muhammad Shehzad Hanif


shehzad.hanif@uet.edu.pk

Department of Mechatronics and Control Engineering


University of Engineering and Technology, Lahore
Z-Transform: Definition
 The two-sided or bilateral forward z-transform

X ( z )  Z  x[n]   x[n]z
n 
n

 The one-sided or unilateral forward z-transform



X ( z )  Z  x[n]   x[n]z  n
n 0

 Inverse Z-transform
1

n 1
x[n]  X ( z) z dz
2
2 j C
Inverse Z-Transform
 Two methods
 Inspection method
 Partial fraction Expansion
 Inspection method: Example
   
 1  1  1  1
X ( z)    , z  X ( z )   1  , z 
1 2  1  z 1  2
 1  z 1 
 2   2 
x[n]  ? x[n]  ?
1 1
a nu (n)  Z
 1
, z  a  a n
u[  n  1]  Z
 , z a
1  az 1  az 1
n
1
n
x[n]    u[n] 1
x[n]     u[n  1]
3 2 2
Inverse Z-Transform:
Partial Fraction Method
1 1
X ( z)  , z 
1 1 2
(1  z 1 )(1  z 1 )
4 2
x[n]  ? 1 A1 A2
X ( z)   
Solution: 1 1 1 1
(1  z 1 )(1  z 1 ) (1  z 1 ) (1  z 1 )
4 2 4 2

1 1
A1  (1  z 1 ) X ( z )   1
4 1
z 1/4 (1  z 1 )
2 z 1/4

1 1
A2  (1  z 1 ) X ( z )  2
2 1 
z 1/2 (1  z )
1

4 z 1/2

1
n n
2 1 1
X ( z)    2   u[n]    u[n]
4
1 1
(1  z 1 ) (1  z 1 ) 2 4
4 2
Inverse Z-Transform:
Partial Fraction Method
1  2 z 1  z 2
X ( z)  , z 1
3 1 1 2
1 z  z
2 2
Solution:
(1  z 1 ) 2
 , z 1
1 1
(1  z )(1  z 1 )
2
A1 A2
X ( z )  B0  
1 1 (1  z 1 )
(1  z )
2
9 8
 2 
1 1 (1  z 1 )
(1  z )
2
n
1
5  2 [n]  9   u[ n]  8u[ n]
2
Inverse Z-Transform: Example
1 1
X ( z )  z (1  z )(1  z 1 )(1  z 1 )
2

2
X(z) has only one pole at z = 0, so the partial fraction
method is not appropriate
1 1 1
 z  z 1 z
2

2 2
1 1
x[n]   [n  2]   [n  1]   [n]   [n  1]
2 2

6 Example 3.12, 3.13


Z-Transform Properties
Let x[n] 
Z
 X ( z ), ROC Rx
x1[n] 
Z
 X 1 ( z ), ROC Rx1
x2 [n] 
Z
 X 2 ( z ), ROC Rx 2
1. Linearity
ax1[n]  bx2 [n] 
Z
 aX1 ( z)  bX 2 ( z), ROC  Rx1 Rx 2
2. Time Shifting
x[n  n0 ] 
Z
 z  n0 X ( z ), ROC  Rx (except for the possible addition
or deletion at z=0 and z=)
z 1
n
1 Z 1 1
Example:  z 1.     u[n] and delay -1
1
1  z 1
1
1  z 1 4
4 4
n 1
1
  u[n  1], z  1/ 4
7 4
Z-Transform Properties
3. Multiplication by an exponential sequence
z
z0 x[n]  X ( )
n

z0
j0 n z  j0 z  e j
e.g. (e ) x[n]  X ( j0
)  X (e  X (e j ( 0 ) )
z ) 
n
e
r
e.g . r cos(0 n).u[n]  (e j0 n  e  j0n )u[n]
n

2
1
 (re j0 ) n u[n]  (re  j0 ) n u[n]
2
1 1 1 
  
2 1  re j0 z 1 1  re  j0 z 1 
1  r cos(0 ) z 1
 z r
8 1  2r cos(0 ) z  r z
1 2  2
Z-Transform Properties
4. Differentiation of X(z)
d
nx[n] 
 z X ( Z )
z
ROC  Rx
dx
e.g . X ( Z )  log(1  az 1 ) z a
d az 2
X (Z ) 
dx 1  az 1
d az 1 1 1
 z X (Z )  1
 a.z .
dx 1  az 1  az 1
nx[n]  a  a 
n 1
u[n  1]
n
a
 x[n]  (1) n 1 u[n  1]
9 n
Z-Transform Properties
5. Conjugation of complex sequence
  
x [n]  X (Z ) ROC Rx
6. Time Reversal
  1 1
x [  n]  X (  ) ROC
Z Rx
1
x[n]  X ( )
Z
7. Convolution Integral
x1[n]  x2 [n]  X1 (Z ) X 2 (Z )
Z

8. Initial Value Theorem


x[0]  lim X ( Z )
z 
10
Z-Plane: Stability & Causality
n
1 • Causal
x[n]    u[n] • Stable
2
1
X (Z ) 
1 1
1 z
2
1
ROC : z 
2
• Outward
• Contains Unit Circle
11
Z-Plane: Stability & Causality
n • Not causal
1
x[n]     u[n  1] • Instable
2
1
X (Z ) 
1 1
1 z
2
1
ROC: z 
2
• Inward
• Does not contain Unit Circle
12
Z-Plane: Stability & Causality
• Causal
x[n]   2  u[ n]
n
• Instable

1
X (Z )  1
1 2z
ROC : z  2

• Outward
• Does not contain Unit Circle

13
Z-Plane: Stability & Causality
• Not causal
x[n]    2  u[n  1]
n
• Stable

1
X (Z )  1
1 2z
ROC : z  2

• Inward
• Contains Unit Circle

14
Inverse Z-Transform: Choice of ROC
Given Pole Zero plot and Z-Transform, determine sequence x[n]

1
X (Z ) 
1  0.5 z 1
Solution1:
x[n]  (0.5) n u[ n]
Solution 2:
x[n]  -(0.5) n u[ n  1]

15
Inverse Z-Transform: Choice of ROC
1 1

1  0.5 z 1 1  2 z 1
Solution1:
(0.5) n u[n]  (2) n u[n]
Solution 2:
(0.5) n u[n  1]  (2) n u[n  1]
Solution 3:
(0.5) n u[n]  (2) n u[n  1]

16
Convolution in Z-domain: Example
x1[n]  [1, 2,1]
x2 [n]  [1,1,1,1,1,1]  u[ n]  u[ n  6]

X 1 ( z )  1  2 z 1  z 2
X 2 ( z )  1  z 1  z 2  z 3  z 4  z 5

Y ( z)  X1 ( z) X 2 ( z)
 1  z 1  z 6  z 7
17 y[n]  [1, 1, 0, 0, 0, 1,1]
Convolution in Z-domain: Example
Convolve x[n]  a nu[n] and h[n]  u[n] for a  1
1
X ( z)  1
,z a
1  az
1
H ( z)  1
,z 1
1 z
1 1 z2
{x[n]* h[n]}  X ( z ) H ( z )  1
. 1
 , z 1
1  az 1  z ( z  a)( z  1)
1  1 a 
   
1  a  1  z 1 1  az 1 

x[n]* y[n] 
1
1 a
 u[n]  (a) n 1 u[n]

Pole zero diagram for


18 convolution result
Linear Constant-Coefficient
Difference Equation in Z-domain
N M

 a y[n  k ]   b
k 0
k
m0
m x[n  m] ARMA Equation

Taking Z-transform on both sides


N M

 a Z{ y[n  k ]}   b
k 0
k
m0
m Z {x[n  m]}

Using time shifting property


N M
Y ( z ) ak z k
 X ( z )  bm z  m
k 0 m0
M

Y ( z)  m
b z m
B( z ) Transfer function of
H ( z)   m0
N
 ARMA Equation
 k
X ( z) k A( z )
19 a z
k 0
Linear Constant-Coefficient
Difference Equation in Z-domain

M
FIR Filter (All zeros/Moving Average): H ( z )   bm z  m
m 0

b0
IIR Filter (All pole/Autoregressive): H ( z)  N
1   ak z  k
k 1

20
Example

y[n]  0.2 y[n  1]  x[n]  0.6 x[ n  1]


Take z-transform on both sides
1 1
Y ( z )  0.2 z Y ( z )  X ( z )  0.6 z X ( z )
1 1
(1  0.2 z )Y ( z )  (1  0.6 z ) X ( z )
1
Y ( z ) (1  0.6 z )
H ( z)   1
X ( z ) (1  0.2 z )
21
MATLAB Example: Pole-zero plot
Convert transfer function to pole zero form and plot the poles
and zeros in z-plane
Example 1: y[n]  0.2 y[n 1]  x[n]  0.6 x[n 1]
a = [1, -0.2]
b = [1, -0.6]
[z, p, k] = tf2zp(b, a)
zplane(z,p)
Example 2:
y[n]  0.91y[n 1]  0.15 y[n  2]  0.12 y[n  3]  x[n]  0.6 x[n 1]  0.78x[n  2]
a = [1, -0.91, 0.15, -0.12]
b = [1, -0.6, 0.78]
[z, p, k] = tf2zp(b, a)
22 zplane(z,p)
MATLAB Example: Residue function
RESIDUEZ Z-transform partial-fraction expansion.
[R,P,K] = RESIDUEZ(B,A) finds the residues, poles and direct terms
of the partial-fraction expansion of B(z)/A(z),

B(z) r(1) r(n)


---- = ------------ +... ------------ + k(1) + k(2)z^(-1) ...
A(z) 1-p(1)z^(-1) 1-p(n)z^(-1)

B and A are the numerator and denominator polynomial coefficients,


respectively, in ascending powers of z^(-1). R and P are column
vectors containing the residues and poles, respectively. K contains
the direct terms in a row vector. The number of poles is
n = length(A)-1 = length(R) = length(P)
The direct term coefficient vector is empty if length(B) < length(A);
otherwise,
length(K) = length(B)-length(A)+1

If P(j) = ... = P(j+m-1) is a pole of multiplicity m, then the


expansion includes terms of the form
R(j) R(j+1) R(j+m-1)
-------------- + ------------------ + ... + ------------------
1 - P(j)z^(-1) (1 - P(j)z^(-1))^2 (1 - P(j)z^(-1))^m

[B,A] = RESIDUEZ(R,P,K) converts the partial-fraction expansion back


23 to B/A form.
MATLAB Example: Residue function
1 2
1  0.6 z  0.78 z
H ( z) 
1  0.91z 1  0.15 z 2  0.12 z 3
a = [1, -0.91, 0.15, -0.12]
b = [1, -0.6, 0.78]
[r, p, k] = residuez(b, a)

1.1372 -0.0686 + 0.9600i -0.0686 - 0.9600i


H ( z)   
1  0.8926 z 1 1  (0.0087 + 0.3666i) z 1 1  (0.0087 - 0.3666i)z 1

24
Laplace Transform vs Z-Transform

25
Transform Analysis of LTI
Systems
Frequency Response of LTI Systems

j j j
Output Y (e )  H (e ) X (e )
Magnitude and Phase Response
j j j
Y (e )  H (e ) . X (e )
j j j
Y ( e )  H ( e )  X (e )
27
Ideal Frequency Selective Filter
Ideal low pass filter
j
1,   c
H l p (e )  
0, c    
sin c n
hl p [n]  ,   n  
n
Ideal high pass filter
H hp (e j )  1  H lp (e j )
hhp [n]   [n]  hlp [n]
sin c n
  [ n] 
28 n
Phase Distortion and Delay
Frequency response of an Ideal low pass filter (delayed)
 j nd
j

 e ,   c
H l p (e )  

0, c    
H l p (e j )  1,   c
H l p (e j )   nd ,   c
Time domain response of an Ideal low pass filter (delayed)

sin c (n  nd )
hl p [n]  ,   n  
 (n  nd )
29 Phase is a continuous function of 
Group Delay

 It is defined as

j
 ( )  grd  H (e )   
d
d

arg  H (e j )  
Note:
If the group delay is constant then system is said to have linear
phase (Linear phase systems) otherwise system has non-
linear phase.

30
Example: Effect of Distortion and
Group Delay

Group delay
and Frequency
response of a
filter shown in
figure a & b

31
Example: Effect of Distortion and Group
Delay
Let x[n] be an input to the system. The time domain and frequency
domain responses of x[n] are shown below

32
Example: Effect of Distortion and Group
Delay
Output of the system is

The filter has considerable attenuation at  = 0.85 the pulse at that


frequency is clearly not visible on the output. Since the group delay at 
= 0.25 is approx. 200 samples and at  = 0.5 is approx. 50 samples,
the second pulse in x[n] is delayed by 200 samples and third pulse is
delayed by 50 samples.
33
References

 Chapter # 3 & 5, Discrete-Time Signal Processing


by Alan V. Oppenheim, Ronald W. Schafer &
John R. Buck. 2nd Edition, Pearson Education -
Prentice Hall, 1999

34

You might also like