Lab 05-The Z Transform: Objectives: Time Required: 3 Hrs Programming Language: MATLAB Software Required
Lab 05-The Z Transform: Objectives: Time Required: 3 Hrs Programming Language: MATLAB Software Required
1 Objectives:
. The goal of this laboratory is to gain familiarity with the Z Transform of the signals and systems
2 Time Required: 3 hrs
.
3 Programming Language: MATLAB
.
4 Software Required:
. (a). MATLAB 7 or above
.
Laplace transform can be considered to be a generalization of the Fourier Transform (FT) in the
continuous-time domain. Similarly, in the discrete-time domain, Z-transform is a generalization of
the discrete-time Fourier Transform (DTFT). Z-transform plays an important role in both analysis
and design of discrete-time systems. It provides another domain in which signals and systems can be
investigated.
X(Z)=∑∞
𝑛=−∞ 𝑥 [𝑛]𝑍
−𝑛
or notationally as X(Z) = X{X[n]}. Two important properties of Z-transform are apparent from its
definition. First, this transform is linear. Its second property enables the treatment of shifted
sequences, i.e.
Z-transform has many other valuable properties that make it a powerful analysis tool. One of the
most important properties is the equivalence of convolution of two sequences and the multiplication
of Z-transform in the transform domain, i.e.
X[n] * Y[n] => X(Z)Y(Z)
∞ ∞
If r=1, i.e. |Z| =1, the Z transform is equal to DTFT of the sequence x[n]. Z Transform plays role in
the design and analysis of discrete time systems. Fourier transform is used for conversion of time
domain to frequency domain while Z transform is used for conversion of time domain into the
complex domain. If DTFT of the X[n] exists, it should be convergent (stable) sequence. DTFT does
not exist for non convergent sequences e.g.
1
For x [n] = an u(n) , DTFT is −𝑗𝜔
for |a| < 1
1−𝑎 𝑒
The system will be unstable for |a| > 1 and its DTFT wont exist but its Z transform will exist. If the
region of convergence (ROC) of a system covers the unit circle than system will be stable or un
stable otherwise. Fourier transform for the sequence 2nu(n) is not possible. To handle this, we use
another factor r.
2 𝑛 2 𝑛
(𝑟 ) 𝑢(𝑛) => DTFT => ∑∞
𝑛=−∞ (𝑟 ) 𝑒
−𝑗𝜔𝑛
|r| should be >2 for the system to be stable
1
2
(1−( )𝑒 −𝑗𝜔𝑛
𝑟
The pole zero plot of rational Z Transform G(Z) can be obtained in matlab using the function
Zplane. The function freqz can be used to evaluate the values of a rational z transform on the unit
circle.
Exercise 1: Evaluate the following Z transform on the unit circle using program 1 of Lab 5
There are two versions of the function zplane. If the function is given in rational form in terms of
numerator and denominator, the command to use is zplan(num,den) where num and den are row
vectors containing the coefficients. 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 my
MATLAB, poles are plotted as X and zeros as o. the function tf2zp can be used to determine the poles
and zeros of rational z transform G(Z)
3|Page Digital Signal Processing
disp('stability');
nr=input('input the numerator coefficients:');
dr=input('input the denominator coefficients:');
z=tf(nr,dr,1)
[r,p,k]=residuez(nr,dr)
figure
zplane(nr,dr);
if abs(p)<1
disp('the system is stable');
else
disp('the system is unstable');
end;
Explore the usage of functions tf ,tf2zp,zp2tf, residuez ,zp2sos and their return values by finding the
help of MATLAB .
Example :
Express the following z-transform in factored form, plot its poles and zeros and then
determine the ROC.
Exercise 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 the z-transform G(z) of given Eq.
Exercise 3: From the pole-zero plot generated in Question Q5, 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?
Inverse z-Transform
The inverse g[n] of a rational z-transform G(z) can be computed using MATLAB in basically two
different ways . To this end, it is necessary to know a priori the ROC of G(z).
The function impz provides the samples of the time-domain sequence, which is assumed to be causal.
There are three versions of this function: [g,t] = impz(num,den), [g,t] impz(num,den, L), and [g,t] =
impz(num,den, L, FT), 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, and FT is the specified sampling frequency in
Hz with default value of unity.
A closed-form expression for the inverse of a rational z-transform can be obtained by first performing
a partial-fraction expansion using the function residuez and then determining the inverse of each term
in the expansion by looking up a table of z-transforms. The function residuez can also be used to
convert a z-transform given in the form of a partial-fraction expansion to a ratio of polynomials in
z−1.
Exercise 4: 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 G(z) of Eq. given. Use the command
stem for plotting the sequence generated by the inverse transform.
Exercise 5: Write a MATLAB program to determine the partial-fraction expansion of a rational z-
transform. Using this program determine the partial-fraction expansion of G(z) of Eq. given and then
its inverse z-transform g[n] in closed form. Assume g[n] to be a causal sequence.
5|Page Digital Signal Processing
Summary: This lab gives a tutorial about generating Z transform of discrete time signals in
MATLAB.
Instructions:
1. Do it yourself.
2. Attach Extra sheets for the problems which should include the code and its results screen shots.
3. Submit it before leaving until been specified by teacher
4. After marking, these will be deposited with teacher for record.