File

advertisement
The Islamia University of Bahwalpur
UNIVERSITY COLLEGE OF ENGINEERING & TECHNOLOGY
DIGITAL SIGNAL PROCESSING
Lab 4: Z-Transform
1. Introduction:
As discussed in the class, Z-transform is an extremely useful mathematical tool for the
analysis and design of discrete time systems. The z-transfer function, also known as the
Pulse Transfer Function H(z) is defined as the ratio of the z-transform of the output to the
z-transform of the input when all initial conditions are zero.
Mathematically,
b  b1z 1  b 2 z 2  ......  bM z  M
(1)
H( z )  0
1  a1z 1  a 2 z  2  ......  a N z  N
The roots of the denominator of H(z) are called “poles” and those of the numerator are
called “zeros”. The above equation has M zeros and N poles.
A system is said to be stable if all of its poles lie inside of a unit circle on the z-plane. The
following example illustrate the use of MATLAB to compute zero and poles of a transfer
function and to plot them onto the z-plane.
Example1:
Find poles and zeros of the following pulse transfer function and plot them onto the
z-plane.
2  z 1
H( z ) 
1  0.1z 1  0.02z  2
Solution:
1. From the file menu, create a new m file
2. write the following MATLAB code
num = [2 -1];
den = [1 -0.1 -0.02];
zplane(num,den)
% numerator of H(z)
% denominator of H(z)
3. save the file with extension m
4. return back to MATLAB workspace and run the program
On the z-plane, “x” indicate the poles and “0” indicate the zeros.
Is this system stable? Why?
Exercise 1: Repeat example 1 for
2.25  2.1z 1  3.95z 2  1.6z 3  0.2z 4
H( z ) 
4  2.96z 1  0.8z  2  0.1184z  3  0.0064z  4
2. Inverse Z-transform
As we know, there are two methods to find inverse z-transform:
(a) Partial fraction method
(b) Power series method
MATLAB has build-in functions to find the inverse z-transform by using both of the
above methods.
2.1 Partial Fractions:
Example 2: Using MATLAB determine the partial fraction expansion of
18z 3
H( z ) 
18z 3  3z 2  4z  1
Solution:
Use the following MATLAB program:
num=[18 0 0 0];
den = [18 3 -4 -1];
[r, p, k] = residuez(num,den); % students are advised to get on-help about “residuez” to
% findout more about it.
disp(‘Residues’); disp(r’)
disp(‘Poles’); disp(p’)
disp(‘Constants’); disp(k)
The result of your program should be as under:
H( z ) 
0.24
0.4

1
1  0.3333z
1  0.3333z 1


2

0.36
1  0.5z 1
2.2 Power series Method
To find inverse z-transform by power series, one may use the built-in function “impz”.
Use on-line help facility of MATLAB to find-out more about this built-in function. That
is, type
help impz
You may also use MATLAB function “filter” for the same purpose.
Example 3:
Determine the inverse z-transform of
1  2 z 1
1  0.4z 1  0.12z  2
Solution:
Use the following MATLAB program
L = 11;
% Length of output vector
num = [1 2];
nen = [1 0.4 -0.12];
[y, t] = impz(num,den,L);
disp(‘Coefficients of the power series expansion’);
disp(y’)
Example 4: Repeat example 3 with the built-in function “filter”
N = 11;
num = [1 2];
den = [1 0.4 -0.12];
x =[1 zeros(1,N-1)];
y = filter(num,den, x);
disp(‘Coefficients of the power series expansion’);
disp(y)
Exercise2: Find the inverse z-transform of the transfer function given in Example 2.
3. Impulse Response and Step response of Discrete time Systems:
The impulse response and step response of an LTI discrete time system can easily be
plotted by using the built-in functions (dimpulse” and “dstep”.
Exercise 3: Plot impulse response and step response of the transfer function given in
example 1 and 2. Also try the built-in function “filter” to plot the same responses.
Download