Z-transform

advertisement
1
Lecture 7: Z-transform
Instructor:
Dr. Gleb V. Tcheslavski
Contact:
gleb@ee.lamar.edu
Office Hours:
Room 2030
Class web site:
http://ee.lamar.edu/gleb/ds
p/index.htm
ELEN 5346/4304
DSP and Filter Design
Fall 2008
2
Definitions
Z-transform converts a discrete-time signal into a complex
frequency-domain representation. It is similar to the Laplace
transform for continuous signals.
X ( z )   xn z
n
n is an integer time index;
When the magnitude r =1,
n
(7.2.1)
If (where) it exists!
z  re j
is a complex number;  - angular freq.
z  e j 
X ( z)  X  e j    xne jn
n
If it exists!
ELEN 5346/4304
DSP and Filter Design
Fall 2008
(7.2.2)
3
Region of Convergence (ROC)
The Region of convergence (ROC) is the set of points z in the complex plane,
for which the summation is bounded (converges):
n
x
z
 n 
(7.3.1)
n
Since z is complex:
z  re j
(7.3.2)
X ( z)    xn r  n  e jn   xn r n e jn
n
In general, z-transform exists for
Im
rELEN 5346/4304
DSP and Filter Design
r+
(7.3.3)
n
r  r  r
(7.3.4)
r  z  r
(7.3.5)
Re
Fall 2008
4
Region of Convergence (ROC)
Examples of ROCs
from Mitra
ELEN 5346/4304
DSP and Filter Design
Fall 2008
5
Region of Convergence (ROC)
X ( z )   xn z  n
n
 xn  ...,a 2 ,a 1 ,,a,a 2 ,...
Example 7.1: Let xn = an


There are no values of z satisfying:
n 
xn z  n  
Example 7.2: Let xn = an un – a causal sequence
 X ( z )   a un z
n
n
n

   az 1  
n
n 0
1
1  az 1
(7.5.1)
Im
for az 1  1 z  a
ROC
a
We can modify (7.5.1) as
X ( z) 
N ( z )0z  0zero( s)
D( z )0z  a pole( s)
ELEN 5346/4304
DSP and Filter Design
z
N ( z)

z  a D( z )
Re
(7.5.2)
roots of numerator: X(z) = 0
roots of denominator: X(z)  
Fall 2008
x
6
Region of Convergence (ROC)
X ( z )   xn z  n
n
Example 7.3: Let xn = -an u-n-1 – an anticausal sequence
X ( z )   a u n 1 z
n
n
n

   az
m 1

1  m
1
n  1  0n  1    a n z 1 
n
n 

   a z 
1
m 1
m
a 1 z
z


1  a 1 z z  a
(7.6.1)
Im
for a 1 z  1 z  a
x
a
Conclusion 1: z-transform exists only within the ROC!
Conclusion 2: z-transform and ROC uniquely specify the signal.
Conclusion 3: poles cannot exist in the ROC; only on its boundary.
Note: if the ROC contains the unit circle (|z| = 1), the system is stable.
ELEN 5346/4304
DSP and Filter Design
Fall 2008
Re
7
The transfer function
X ( z )   xn z  n
n
Time shift:
xnm  xnm z ( nm) z m  {l  n  m}  z m  xl z l  z m X ( z )
z
n
l

i 
LTI:

a y
Consider an LCCDE:
and take z-transform
utilizing time shift
i
n i
  b j xn- j
(7.7.2)
j 


i
j
a
z
Y
(
z
)

b
z
 i
 j X ( z)
i 
n
(7.7.3)
j 
yn  hn  xn Y ( z )   hm xn m z  n   hm  xn m z  ( nm ) z  m  H ( z ) X ( z )
z
(7.7.1)
m
m
(7.7.4)
n
X (z)
M
The system transfer function
H ( z) 
Y ( z)

X ( z)
b z
j 0
N
i
a
z
 i
i 0
ELEN 5346/4304
DSP and Filter Design
Fall 2008
j
j
  hn z  n
n
(7.7.5)
8
Rational z-transform
X ( z )   xn z  n
n
Frequently, a z-transform can be described as a rational function, i.e. a
ratio of two polynomials in z-1:
P( z ) n0  n1 z 1  ...  nM 1 z ( M 1)  nM z  M
(7.8.1)
H ( z) 

1
 ( N 1)
N
D( z ) d0  d1 z  ...  d N 1 z
 dN z
Here M and N are the degrees of the numerator’s and denominator’s
polynomials. An alternative representation is a ratio of two polynomials in z:
M
 ( M 1)
 ...  nM 1 z  nM
P( z )
 N  M  n0 z  n1 z
H ( z) 
z
D( z )
d0 z N  d1 z N 1  ...  d N 1 z  d N
(7.8.2)
Finally, a rational z-transform can be written in a factorized form:
M
H ( z) 
n0  (1  z j z 1 )
j 1
N
d0  (1  pi z 1 )
M
 z ( N M )
i 1
zeros: numerator = 0
n0  ( z  z j )
j 1
N
d 0  ( z  pi )
(7.8.3)
i 1
Poles: denominator = 0
ELEN 5346/4304
DSP and Filter Design
Fall 2008
9
Notes on poles of a system function
Positions of poles of a transfer function are used to evaluate system
stability. Let assume a single real pole at z = . Therefore:
Y ( z)
1
H ( z) 

zY  z   Y  z   X  z 
X ( z) z  
(7.9.1)
The difference equation is:
yn1   yn  xn  yn   yn1  xn1
(7.9.2)
Therefore, the impulse response is:
for
hn   hn1   n1
(7.9.3)
n  0,1, 2,3,...hn  0,1,  ,  2 ,...
(7.9.4)
Iff || < 1, hn decays as n and the system is BIBO stable; otherwise, hn
grows without limits. Therefore, poles of a stable system (and signals
in fact) must be inside the unit circle.
Zeros may be placed anywhere. Zeros at the origin produce a time delay.
ELEN 5346/4304
DSP and Filter Design
Fall 2008
The transfer function and the
Frequency response
BIBO:
j
h


z

1

RO
C

H
e
   H ( z) ze j
 n
10
X ( z )   xn z  n
n
(7.10.1)
n
M
H ( z) 
b z
j 0
N
b0 z
j
a z
i 0
j
i

i
M
M
 (z  z )
j 1
N
j
a0 z  N  ( z  pi )
(7.10.2)
i 1
where zj are zeros and pi are poles of the transfer function.
M

e j  z j


M
 H  e j   b0 1  jN1
b0 e  j ( M  N )  (e j  z j )
a0

j 1
e j  pi
(7.10.3)
H  e j  




N
i 1

a0  (e j  pi )
M
N

i 1
j
j
j
H  e   b0  a0   ( M  N ) (e  z j )   (e  pi )
j 1
i 1

BIBO:
ELEN 5346/4304
DSP and Filter Design
Fall 2008
The transfer function and the
Frequency response
11
X ( z )   xn z  n
n
A good way to evaluate the system’s frequency response:
H  e j 
k 
2
k
p
M
P  DFT bm 0 



N
P  DFT ak 0 


(7.11.1)
Zero-padded
When the frequency approaches a pole, the frequency response has a local
maximum, a zero forces the response to a local minimum.
For real systems, poles and zeros are symmetrical with respect to the real axis.
Magnitude of H()
1.5
1
0.5
0
0
0.1
pole
ELEN 5346/4304
DSP and Filter Design
0.2
0.3
Fractional frequency, 
0.4
0.5
zero
Fall 2008
12
The transfer function and the SFG

 zS ( z )  AS ( z )  bX ( z )
 Sn 1  ASn  bxn


T
T
z
y

c
S

dx
Y
(
z
)

c
S ( z )  dX ( z )


n
n
 n
(7.12.1)
 zI  A  S ( z )  bX ( z )S ( z )  zI  A  bX ( z )
1
Y ( z )  c T  zI  A bX ( z )  dX ( z )
(7.12.2)
H ( z )  c T  zI  A b  d
(7.12.3)
1
1
Poles of H(z) correspond to the eigenvalues of the
system matrix.
ELEN 5346/4304
DSP and Filter Design
Fall 2008
13
More on Transfer function
M
H ( z) 
P( z )

D( z )
b
m0
N
m
z
m
k
a
z
 k
k 0
b0 z

M
M
 (z  z )
j 1
N
j
a0 z  N  ( z  pi )
zeros
M

b0  ( M  N )
z
a0
i 1
 (z  z
m 1
N
m
)
(7.13.1)
 (z  p )
k 1
k
poles
1) N > M: zeros at z = 0 of multiplicity N-M
2) M > N: poles at z = 0 of multiplicity M-N
 j ( M  N )

e
 1constmagnitude

 j ( M  N )
e

 distortionless
 j ( M  N )
  (M  N )lin. phase

e
 H  e j 

BIBO z | 1 ROCH ( z ) j H  e j   
j
z e

H
e




H ( zi )  0Y ( zi )  0;H ( pi )  Y ( pi )  
ELEN 5346/4304
DSP and Filter Design
Fall 2008
(7.13.2)
14
Types of digital filters
1. FIR (“all-zero”) filter:
bn  n  M
H ( z )   bm z hn  
m 0
0otherwise
M
m
All poles are at z = 0: a “nest of poles”
ROC: the entire z-plane except of the origin (z = 0).
FIR filters are stable.
ELEN 5346/4304
DSP and Filter Design
Fall 2008
(7.14.1)
15
Types of digital filters
2. IIR (“all-pole”) filter:
H ( z) 
b0
N
a z
k 0
k
All zeros are at z = 0: a “nest of zeros”
ELEN 5346/4304
DSP and Filter Design
Fall 2008

k
(7.15.1)
16
Types of digital filters
3. General IIR (“zero-pole”) filter:
M
H ( z) 
b
m0
N
k
a
z
 k
k 0
ELEN 5346/4304
DSP and Filter Design
m
z
m
Fall 2008

(7.16.1)
17
On test signals…
Y ( z )  H ( z ) X ( z ) yn  hn  xn
(7.17.1)
z
 n hn
(7.17.2)
xn   xk nk  yn
(7.17.3)
k
Calculate
yn   xk hnk
and compare to
 yn
k
We don’t need any other that a delta function test signals since a unit-pulse
response is a complete system’s description.
ELEN 5346/4304
DSP and Filter Design
Fall 2008
18
Types of sequences and convergence
1. Two-sided:
G( z ) 
N

n M
gn z n
Converges everywhere except of z = 0 and z = 
ELEN 5346/4304
DSP and Filter Design
Fall 2008
(7.18.1)
19
Types of sequences and convergence
2. Right-sided:
G( z ) 
Blows up at z = 


n M
gn z  n 
1

n M

gn z n   gn z n
(7.19.1)
n 0
Assume: if converges at z = z0, converges for |z| > | z0|
ROC: r - < |z| <  - exterior ROC
For a causal sequence: |z| > r - = max|pk| - a max pole of G(z)
To be causal, a sequence must be right-sided (necessary but not sufficient)
ELEN 5346/4304
DSP and Filter Design
Fall 2008
20
Types of sequences and convergence
3. Left-sided:
G( z ) 
N

n  
gn z  n 
1

n  
N
gn z  n   gn z  n
Converges at z0
n 0
Blows up at z = 0
ROC: 0 < |z| < r + - interior ROC
When encountering an interior ROC, we need to check convergence at
z = 0. If the sequence “blows up” at zero – it’s an anti-causal sequence
ELEN 5346/4304
DSP and Filter Design
Fall 2008
(7.20.1)
21
Properties
from Mitra
ELEN 5346/4304
DSP and Filter Design
Fall 2008
22
Common pairs
ELEN 5346/4304
DSP and Filter Design
Fall 2008
23
Inverse z-transform
xn 
1
2 j 
X ( z ) z n1dz
(7.23.1)
c
Where C is a counterclockwise closed path encircling the origin and is entirely in
the ROC. Contour C must encircle all the poles of X(z).
In general, there is no simple way to compute (7.23.1)
A special case:
C is the unit circle (can be used when the ROC includes the unit circle).
The inverse z-transform reduces to the IDTFT.
1
xn 
2
ELEN 5346/4304
DSP and Filter Design


X  e j  e jn d

Fall 2008
(7.23.2)
24
Inverse z-transform
X ( z )   xn z  n
n
A. Via Cauchy residue theorem
xn   i
(7.24.1)
i
For all poles of X(z)zn-1 inside C (contour of integration)
Where i are the residues of X(z)zn-1
for a pole of multiplicity k:
Residue function:
ELEN 5346/4304
DSP and Filter Design
1 d k 1i ( z )
i 
(k  1)! dz k 1
i ( z )  X ( z ) z
Fall 2008
n 1
(7.24.2)
z  pi
 z  pi 
k
(7.24.3)
25
Inverse z-transform: Example
X ( z )   xn z  n
n
X ( z) 
Example:
xn 
1
2 j

C
z
; a  z
za
z n1
1
z dz 
za
2 j

C
Im
 a n  0
zn
dz  
z a
 a  0 n  0
0 is a residue of X(z)z-n-1 at z=0 – involves pole of
x
a
C
Re
multiplicity –n wnen n < 0.
1
d k 1
zn
k
n
a 
(
z

a
)

z
(k  1)! dz k 1
z  a k 1
z a
 an
multiplicity
1 d k 1 k ( z  a)1
1
k
k
n
Let n  k(n  0)0 
z

(

1)(

2)...(

(
k

1))(
z

a
)


a


a
z 0
(k  1)! dz k 1
z k
(k 1)!
n

a
 n  0
n
xn   n

x

a
un
n
n

a  a  0n  0
ELEN 5346/4304
DSP and Filter Design
Fall 2008
26
Inverse z-transform
X ( z )   xn z  n
n
B. Via recognition (table look-up)
Sometimes, the z-transform can be modified such way that it can be
found in a table…
Example:
X ( z)  e
n

an n a
a 1
 X ( z)  e    
  z ;  1 z  a
z
n 0  z  n !
n 0 n !
a
z
Therefore:
ELEN 5346/4304
DSP and Filter Design

a
z
an
xn  un
n!
Fall 2008
27
Inverse z-transform
X ( z )   xn z  n
n
C. Via long division
1. Right-sided z-transform sequences can be expanded into a power series in
z-1. The coefficient multiplying z-n is the nth sample of the inverse z-transform.
Example:
z 2  2 z 1  2
X ( z) 
; z  1
z 1  1
Lower powers first:
and long division:
2  2 z 1  z 2
X ( z) 
; z  1
1  z 1
2  z2  z3  z4 ...
1 z 1| 2  2 z 1  z 2
2  2 z 1
ELEN 5346/4304
DSP and Filter Design
z 2
z 2  z 3
Fall 2008
xn  {2,0,1,
 1,1,...}

x0 x1 x2 x3 x4
28
Inverse z-transform
X ( z )   xn z  n
n
2. Left-sided z-transform sequences – into a power series in z1…
Example:
z 2  2 z 1  2
X ( z) 
; z  1
z 1  1
Multiply both numerator and denominator by z2 …
z 2 z 2  2 z 1  2 1  2 z  2 z 2
X ( z)  2

z
z 1  1
z  z2
Long division…
X ( z)z 1  1  z  z 2  z3  z 4  ...
x1
ELEN 5346/4304
DSP and Filter Design
x0 x-1
x-2
Fall 2008
x-3
x-4
Non-causal
29
Inverse z-transform
X ( z )   xn z  n
n
Example:
Example:
z 2  2 z 1  2
1
X ( z )  1
;

 z 1
1
2
z

1
z

2



z
X ( z)  z  1 
; z  1
z 1
 z 1
1
xn   n 1   n  (1)n u n 1
ELEN 5346/4304
DSP and Filter Design
Fall 2008
not suitable for
long division!
30
Inverse z-transform
X ( z )   xn z  n
n
D. Via partial fraction expansion (PFE)
LetG ( z ) 
N ( z)
;r   z  r 
D( z )
(7.30.1)
If the degree of the numerator is equal or greater than the degree of the
denominator: M  N, G(z) is an improper polynomial. Then:
N ( z ) M  N l N1 ( z )
G( z ) 
  cl z 
D( z ) l  0
D( z )
(7.30.2)
A proper fraction: M1 < N
Then:
G( z ) 
M N
N
 cl z  
l 0
l
l 1
l
1  pl z
1
Simple poles: multiplicity of 1.
ELEN 5346/4304
DSP and Filter Design
Fall 2008
(7.30.3)
31
Inverse z-transform
X ( z )   xn z  n
n
Here l is a residue
l  ( z  pl )G ( z ) z n l
z  pl
(7.31.1)
poles
Therefore:
gn 
M N
 c
l 0
l
n


p
u

if

external

ROC
:

p

r
l
 l n
  l   n


p
u

if

internal

ROC
:

p

r
l 1

l
 l  n l
N
n l
This method is suitable for complex poles.
Problem: large polynomials are hard to manipulate…
??QUESTIONS??
ELEN 5346/4304
DSP and Filter Design
Fall 2008
(7.31.2)
Download