1 CEMTool Tutorial The z-Transform Overview This tutorial is part of the CEMWARE series. Each tutorial in this series will teach you a specific topic of common applications by explaining theoretical concepts and providing practical examples. This tutorial is to demonstrate the use of CEMTool for solving digital processing problems. This tutorial discusses the Z-transform. Table of Contents 1. Bilateral Z transform 2. Important properties of the z-transform 3. Inversion of the z-transform 4. System representation in the z-domain 5. Solution of the difference equations 1. Bilateral z-transform The z-transform of a sequence x(n) is given by () ( ) ( ) n n X z Z xn xnz ¥ - =-¥ = = é ù ë û å (1) where z is a complex variable. The set of z values for which X(z) exists is called the region of convergence (ROC) and is given by x x R z R - + < < (2) for some non-negative numbers x R - and x R + The inverse z-transform of a complex function X(z) is given by ( ) () () 1 1 1 2 n C xn Z X z X zz dz j p - - = = é ù ë û ò (3) where C is a counterclockwise contour encircling the origin and lying in the ROC. Example 1: Let x 1 (n)= a n u(n ), 0 < | a| < ∞ . (This sequence is called a positive-time sequence). Then
23
Embed
tutorial Chapter4 The Z transform - CEMTool3. Inversion of the z-transform From equation (3) the inverse z-transform computation requires an evaluation of a complex contour integral
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
1
CEMTool Tutorial The z-Transform
Overview
This tutorial is part of the CEMWARE series. Each tutorial in this series will teach you a specific
topic of common applications by explaining theoretical concepts and providing practical examples.
This tutorial is to demonstrate the use of CEMTool for solving digital processing problems. This
tutorial discusses the Z-transform.
Table of Contents
1. Bilateral Z transform
2. Important properties of the z-transform
3. Inversion of the z-transform
4. System representation in the z-domain
5. Solution of the difference equations
1. Bilateral z-transform
The z-transform of a sequence x(n) is given by
( ) ( ) ( ) n
nX z Z x n x n z
¥-
=-¥
= =é ùë û å (1)
where z is a complex variable. The set of z values for which X(z) exists is called the region of
convergence (ROC) and is given by
x xR z R- +< < (2)
for some non-negative numbers xR - and xR +
The inverse z-transform of a complex function X(z) is given by
( ) ( ) ( )1 112
n
C
x n Z X z X z z dzjp
- -= =é ùë û ò� (3)
where C is a counterclockwise contour encircling the origin and lying in the ROC.
Example 1:
Let x1(n)= anu(n ), 0 < | a| < ∞ . (This sequence is called a positive-time sequence). Then
2
( )1 10 0
11 1
nn n a zX z a z
z az z
¥ ¥-
-
æ ö= = = =ç ÷ - -è øå å
If z a> à ROC: a z< < ¥
X 1 (z ) in this example is a rational function; that is, ( ) ( )( )1
B z zX zA z z a
= =-
where B(z)=z is the numerator polynomial and A(z)=z−a is the denominator polynomial. The roots
of B (z) are called the zeros of X (z), while the roots of A(z) are called the poles of X(z). In this
example X1(z) has a zero at the origin z=0 and a pole at z=a. Hence x1(n) can also be represented
by a pole-zero diagram in the z-plane in which zeros are denoted by ‘o’ and poles by ‘×’.
2. Important properties of the z-transform
The properties of the z-transform are generalizations of the properties of the discrete-time Fourier
transform. We state the following important properties of the z-transform without proof.
1. Linearity:
( ) ( ) ( ) ( )1 1 2 2 1 1 2 2 1 2; : x xZ a x n a x n a X z a X z ROC ROC ROC+ = + Çé ùë û (4)
2. Sample shifting:
( ) ( )0 :nnxZ a x n z X z ROC ROC-é ù =ë û (5)
3. Frequency shifting:
( ) ; :nx
zZ a x n X ROC ROC scaled by aa
æ öé ù = ç ÷ë û è ø (6)
4. Folding:
( ) 1 ; : xZ x n X ROC Inverted ROCz
æ ö- =é ù ç ÷ë û è ø (7)
5. Complex conjugation:
( ) ( )* * * ; : xZ x n X z ROC ROCé ù =ë û (8)
6. Differentiation in the z -domain:
( ) ( ) ; : x
dX zZ nx n z ROC ROC
dz= -é ùë û (9)
7. Multiplication:
( ) ( ) ( ) ( )
1
11 2 1 2
2
1 / ;2
:C
x x
Z x n x n X v X z v v dvj
ROC ROC Inverted ROCp
-=é ùë û
Ç
ò� (10)
8. Convolution:
( ) ( ) ( ) ( )1 2 1 2 1 2* ; : x xZ x n x n X z X z ROC ROC ROC= Çé ùë û (11)
This last property transforms the time-domain convolution operation into a multiplication
between two functions. It is a significant property in many ways. First, if X1(z) and X2(z) are two
3
polynomials, then their product can be implemented using the conv function in CEMTool.
Example 2:
Let ( ) 1 21 2 3 4X z z z- -= + + and ( ) 1 2 3
2 3 4 5 6X z z z z- - -= + + + . Determine
( ) ( ) ( )3 1 2X z X z X z= .
Solution:
From the definition of the z -transform we observe that ( ) { }1 2,3,4x n = and ( ) { }2 3,4,5,6x n =
Then, the convolution of the above two sequences will give the coefficients of the required
polynomial product.
CEMTool script:
C>x1 = [2,3,4]; x2 = [3,4,5,6]; x3 = conv(x1,x2)
x3 =
6 17 34 43 38 24
Hence ( ) 1 2 3 4 53 6 17 34 43 38 24X z z z z z z- - - - -= + + + + +
3. Inversion of the z-transform
From equation (3) the inverse z-transform computation requires an evaluation of a complex
contour integral that, in general, is a complicated procedure. The most practical approach is to
use the partial fraction expansion method. It makes use of the z-transform. The z-transform,
however, must be a rational function. This requirement is generally satisfied in digital signal
processing.
Central Idea: When X(z) is a rational function of z−1, it can be expressed as a sum of simple
factors using the partial fraction expansion. The individual sequences corresponding to these
factors can then be written down using the z-transform table.
The inverse z-transform procedure can be summarized as follows:
Method: Given
( )1
0 11
1
... ,1 ...
MM
x xNN
b b z b zX z R z Ra z a z
- -
- +- -
+ + += < <
+ + + (12)
• express it as
( )( )11
0 1 11
01
...1 ...
N M NkN
kNkN
b b z b zX z C za z a z
- -- ---
- -=
+ + += +
+ + + å% % %
where the first term on the right-hand side is the proper rational part and the second term is the
4
polynomial (finite-length) part. This can be obtained by performing polynomial division if M ≥ N
using the deconv function
• perform a partial fraction expansion on the proper rational part of X(z) to obtain
( ) 11 01
N M Nkk
kk kk
RX z C zp z
--
-= =
= +-å å (13)
where pk is the kth pole of X(z) and Rk is the residue at pk. It is assumed that the poles are distinct
for which the residues are given by
( )
( )11
10 1 11
1
... 11 ... k
NN
k kN z pN
b b z b zR p za z a z
- ----
- - =
+ + += -
+ + +
% % %
For repeated poles the expansion (13) has a more general form. If a pole pk has multiplicity r, then
its expansion is given by
( )
( ) ( )( )
( )111
,1 ,2 ,.211 1 11...
11 1 1
rlrk k k rk l
l rl kk k k
R R z R zR zp zp z p z p z
- --- -
-- - -=
= + + +-- - -
å (14)
where the residues Rk,l are computed using a more general formula.
• assuming distinct poles as in (13), write x(n)as
( ) ( )11
1 0
11
N M N
k kk kk
x n R Z C n kp z
d-
--
= =
é ù= + -ê ú-ë ûå å
• finally, use the relation
( )( )
1
1
nk k x
nk k k x
p u n z RzZz p p u n z R
--
+
ì £é ù ï= íê ú- - - - ³ë û ïî (15)
to complete x(n). A similar procedure is used for repeated poles.
A CEMTool function residuez is available to compute the residue part and the direct (or
polynomial) terms of a rational function in z−1. Let
( ) ( )( )
10 1
10 1
11 0
......
1
MM
NN
N M Nkk
kk kk
B zb b z b zX za a z a z A z
R C zp z
- -
- -
--
-= =
+ + += =
+ + +
= +-å å
be a rational function in which the numerator and the denominator polynomials are in ascending
powers of z−1. Then [R,p,C]=residuez(b,a) computes the residues, poles, and direct terms of X(z) in
which two polynomials B(z) and A(z) are given in two vectors b and a, respectively. The returned
column vector R contains the residues, column vector p contains the pole locations, and row
vector C contains the direct terms.
If p(k)= ... =p(k+r-1) is a pole of multiplicity r, then the expansion includes the term of the form
( ) ( )
1 121 1 1...
1 1 1k k k r
rk k k
R R Rp z p z p z
+ + -- - -+ + +
- - - (16)
5
which is different from (14).
Similarly, [b,a]=residuez(R,p,C), with three input arguments and two output arguments, converts
the partial fraction expansion back to polynomials with coefficients in row vectors b and a.
Example 3:
Let us consider the rational function
( ) 23 4 1zX z
z z=
- +
First rearrange X(z ) so that it is a function in ascending powers of z−1.
( )1 1
1 2 1 2
03 4 3 4
z zX zz z z z
- -
- - - -
+= =
- + - +
Now using the CEMTool script,
C>b= [0,1]; a = [3,-4,1]; [R,p,C] = residuez(b,a)
R =
0.5000
-0.5000
p =
1.0000
0.3333
C =
Empty matrix: 0-by-0
.
we obtain
( ) 11
1 12 2
11 13
X zz z-
-= -
- -
Example 4:
Compute the inverse z -transform of
( )( ) ( )21 1
1 , 0.91 0.9 1 0.9
X z zz z- -
= >- +
Solution:
We will evaluate the denominator polynomial as well as the residues using the CEMTool Script:
C> b= 1; a = poly([0.9,0.9,-0.9])
a =
1.0000 -0.9000 -0.8100 0.7290
6
C>[R,p,C]=residuez(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 denominator polynomial is computed using CEMTool’s polynomial function poly,
which computes the polynomial coefficients, given its roots. We could have used the conv
function, but the use of the poly function is more convenient for this purpose. From the residue
calculations and using the order of residues given in (16), we have