0% found this document useful (0 votes)
104 views7 pages

Lab 4

The document discusses lab work on implementing the z-transform and its applications in analyzing discrete-time systems. The z-transform is introduced as the discrete-time counterpart of the Laplace transform. MATLAB commands related to z-transforms like freqz, impz, tf2zp, and zplane are described. Questions involve using these commands to analyze rational z-transforms, determine their pole-zero plots and regions of convergence, compute inverse z-transforms, and find partial fraction expansions.

Uploaded by

shahzaib
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views7 pages

Lab 4

The document discusses lab work on implementing the z-transform and its applications in analyzing discrete-time systems. The z-transform is introduced as the discrete-time counterpart of the Laplace transform. MATLAB commands related to z-transforms like freqz, impz, tf2zp, and zplane are described. Questions involve using these commands to analyze rational z-transforms, determine their pole-zero plots and regions of convergence, compute inverse z-transforms, and find partial fraction expansions.

Uploaded by

shahzaib
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

LAB # 4: Implementation of Z-Transform and its applications in Discrete Time

system analysis.
The z-transform is a useful tool in the analysis of discrete-time signals and systems and is the discrete-
time counterpart of the Laplace transform for continuous-time signals and systems. The z-transform may
be used to solve constant coefficient difference equations, evaluate the response of a linear time-invariant
system to a given input, and design linear filters. In this lab, we will look at the z-transform and examine
how it may be used to solve a variety of different problems.
Background Review
R 5.1 In previous lab, we saw that the discrete-time Fourier transform (DTFT) of a sequence x[n] is
equal to

However in order for this series to converge, it is necessary that the signal be absolutely summable.
Unfortunately, many of the signals that we would like to consider are not absolutely summable and,
therefore, do not have a DTFT. Some examples include

R 5.2 The z-transform is a generalization of the DTFT that allows one to deal with such sequences. The z-
transform G(z) of a sequence g[n] is defined as

Where z= rejω is a complex variable.


R 5.3 The values of z for which the sum converges define a region in the z-plane referred to as the region
of convergence (ROC). The z-transform may be viewed as the DTFT of an exponentially weighted
sequence.

and we see that X(z) is the discrete-time Fourier transform of the sequence r -n x[n]. Furthermore, the ROC
is determined by the range of values of r for which

1
R 5.4 In the case of LTI discrete-time systems, all pertinent z-transforms are rational functions of z−1, that
is, they are ratios of two polynomials in z−1:

Which can be alternately written in factored form as

The roots of the numerator polynomial, ξr, are referred to as the zeros of X(z), and the roots of the
denominator polynomial, λs, are referred to as the poles. There are additional N − M zeros at z=0 (the
origin in the z-plane) if N>M or additional M − N poles at z=0 if N<M.
R 5.5 For a sequence with a rational z-transform, the ROC of the z-transform cannot contain any poles and
is bounded by the poles.
R 5.6 A rational z-transform G(z)= P(z) /D(z) , where the degree of the polynomial P(z) is M and the
degree of the polynomial D(z) is N, and with distinct poles at z=λs,s=1 ,2 ,...,N, can be expressed in a
partial-fraction expansion form given by

R 5.7 The inverse z-transform g n of a z-transform G(z) is given by

Where C is a counterclockwise contour encircling the point z in the ROC of G(z) .


MATLAB Commands Used
The MATLAB commands you will encounter in this exercise are as follows:
Operators and Special Characters
: . + - * / ; % <
Elementary Matrices and Matrix Manipulation
ones pi zeros
Language Constructs and Debugging
Break end for if input pause error
Elementary Functions

2
abs angle conj exp imag real

3
Two-Dimensional Graphics
axis grid legend plot stem title
xlabel ylabel
General Purpose Graphics Functions
clf subplot
Signal Processing Toolbox
freqz impz tf2zp zplane
For additional information on these commands, type help command in the Command window.
Exercise 5.1 Analysis of z-Transforms:
The function freqz can be used to evaluate the values of a rational z-transform on the unit circle. To do this,
Program P6_1 (it’s rewritten below) can be used without any modifications.
% Program P6_1
% Evaluation of the DTFT
clf;
% Compute the frequency samples of the DTFT
w = -4*pi:8*pi/511:4*pi;
num = [2 1];den = [1 -0.6];
h = freqz(num, den, w);
% Plot the DTFT
subplot(2,1,1)
plot(w/pi,real(h));grid
title('Real part of H(e^{j\omega})')
xlabel('\omega /\pi');
ylabel('Amplitude');
subplot(2,1,2)
plot(w/pi,imag(h));grid
title('Imaginary part of H(e^{j\
omega})') xlabel('\omega /\pi');
ylabel('Amplitude');
pause
subplot(2,1,1)
plot(w/pi,abs(h));grid

4
title('Magnitude Spectrum |H(e^{j\omega})|')
xlabel('\omega /\pi');
ylabel('Amplitude');
subplot(2,1,2)
plot(w/pi,angle(h));grid
title('Phase Spectrum arg[H(e^{j\omega})]')
xlabel('\omega /\pi');
ylabel('Phase in radians');
Questions:
Q 5.1 Using Program P6_1 evaluate the following z-transform on the unit circle:

Pole Zero Plot


The pole-zero plot of a rational z-transform G(z) can be readily obtained using the function zplane. There
are two versions of this function. If the z-transform is given in the form of a rational function as in Q 5.1,
the command to use is zplane(num, den) where num and den are row vectors containing the coefficients of
the numerator and denominator polynomials of G(z) in ascending powers of z−1. On the other hand, if the
zeros and poles of G(z) are given, the command to use is zplane(zeros, poles) where zeros and poles are
column vectors. In the pole-zero plot generated by MATLAB, the location of a pole is indicated by the
symbol ‘×’ and the location of a zero is indicated by the symbol ‘o’.
The function tf2zp can be used to determine the zeros and poles of a rational z-transform G(z) . The
program statement to use is [z, p, k] = tf2zp(num,den) where num and den are row vectors containing the
coefficients of the numerator and denominator polynomials of G(z) in ascending powers of z −1 and the
output contains the gain constant k and the computed zeros and poles given as column vectors z and p,
respectively.
The reverse process of converting a z-transform given in the form of zeros, poles, and the gain constant to a
rational form can be implemented using the function zp2tf. The program statement to use is [num,den] =
zp2tf(z,p,k).
The factored form of the z-transform can be obtained from the zero-pole description using the function sos
= zp2sos(z,p,k). The function computes the coefficients of each second-order factor given as an L×6 matrix
sos where

5
where the Lth row contains the coefficients of the numerator and the denominator of the Lth second order
factor of the z-transform G z :

Q 5.2 Write a MATLAB program to compute and display the poles and zeros, to compute and display the
factored form, and to generate the pole-zero plot of a z-transform that is a ratio of two polynomials in z−1.
Using this program, analyze

Q 5.3 From the pole-zero plot generated in Question Q 5.2, determine the number of regions of
convergence (ROC) of G(z) . Show explicitly all possible ROCs. Can you tell from the pole-zero plot
whether or not the DTFT exists?
Q 5.4 Write a MATLAB program to compute and display the rational z-transform from its zeros, poles
and gain constant. Using this program, determine the rational form of a z-transform whose zeros are at
ξ1=0.3
,ξ2=2.5 ,ξ3=-0.2+j 0.4 and ξ4= −0.2-j 0.4 ;the poles are at λ1=0.5 ,λ2=-0.75,λ3=0.6+j 0.5, and λ4=0.6-j 0.7;
and the gain constant k is 3.9.
Exercise 5.2 Inverse z-Transform
The function [g,t]=impz(num,den,L) provides the samples of the time-domain sequence, which is assumed
to be causal. Where num and den are row vectors containing the coefficients of the numerator and
denominator polynomials of G(z) in ascending powers of z−1, L is the desired number of the samples of
the inverse transform, g is the vector containing the samples of the inverse transform starting with the
sample at n=0 & t is the length of g.
Questions:
Q 5.5 Write a MATLAB program to compute the first L samples of the inverse of a rational z-transform
where the value of L is provided by the user through the command input. Using this program compute and
plot the first 50 samples of the inverse of
6
Partial Fraction Representation
[r,p,k] = residuez(num,dem) converts a discrete time system, expressed as the ratio of two polynomials, to
partial fraction expansion
𝑟1 𝑟2 𝑟𝑛
( 𝑧) = + + …………………+ +𝑘
−1 −1 −1
1 − 𝑝1𝑧 1 − 𝑝2 𝑧 1 − 𝑝𝑛𝑧
Q5.6 Write a MATLAB program to determine the partial-fraction expansion of a rational z-transform. Using
this program determine the partial-fraction expansion of

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy