Sns Lab Report 11
Sns Lab Report 11
Lab # 11
To Measure the Response of Discrete-Time
Signals Using Z-Transform in MATLAB
OBJECTIVE:
➢ To understand what is z-transform.
➢ To understand how to compute z-transform in MATLAB.
➢ To understand how to compute inverse z-transform in MATLAB.
➢ To understand how to find out the partial fraction of the given function and to compute
the z-transform of the sequence.
Required Equipment:
➢ Software
MATLAB
Methodology:
Z-TRANSFORM:
Laplace transformation is a more general transform as compared to Fourier Transform for
continuous-time signals, z-Transform is a more general transform than discrete-time
Fourier Transform when dealing with discrete-time signal. A discrete-time signal is
defined in the discrete time domain n; that is, it is given by a function f [n], n < Z. Z-
Transform is denoted by the symbol and expresses a signal in z-domain, i.e., the
signal is given by a function F(z) that can be expressed as:
F(z) = Z{f [n]}
In order to return from the z-domain back to the discrete-time domain, the inverse z-
transform is applied. The inverse z-transform is denoted by the symbol Z−1{.}; that is,
one can write as
f [n] = Z −1{F (z)}
PROCEDURE:
1. In this lab z-transform of the given function (signal) has been compute in the MATLAB by
using the z-trans command.
2. The command z-trans is used in the MATLAB to find the z-transform of the given signal.
First of all pre-lab has been done and in pre lab 1 and 2 simple z-transform has been
computed by using the z-trans command.
3. In pre-lab 3 to find the partial fraction RESIDUE COMMAND is being used in MATLAB.
4. In the lab task z-trans command is already used but to find the inverse z-transform iztrans
command is used and the entire inverse is being computed by this command.
5. Then we studied the condition of convergence which states that the Fourier Transform X
(e jw) of a sequence x[n] is said to exist if å x[n]e- jwn converges into some sense If x[n]
is absolutely summable sequence.
6. To compute the z-transform of the sequence the sum command is being used. The entire
lab task has been done by using these simple commands.
7. After that we go through some of the z transform pairs and how to do inverse z transform
through partial fraction. A signal in rational form can be expressed in partial fraction form
by using the command residue. After all of this we performed the lab task given in the lab
manual and computed their result and concluded the today’s lab.
CONCLUSION:
➢ In this lab it has been learned about the z-transform.
➢ It has been understood with the command of z-trans to compute z-transform.
➢ It has been learned how to use the z Trans command in MATLAB.
➢ It has also been understood about how to compute the inverse z-transform in
MATLAB.
➢ It has been learned also got familiarized with the iztrans command to compute the
inverse Z-transform.
➢ It has been learned about the residue command to find the partial fraction of the
function (signal).
PRE-LAB TASKS:
Compute the z-transform of the signal x[n] = u[n] + nu[n] + n2u[n].
Task 1:
CODE:
% HAFIZ ZAIN UL HASSAN
% FA19-BEE-113-B
% PRE-Lab Report Experiment No 12
% Task No. 1
clc
clear all
close all
syms n z
x_n=1+n+n.^2
x_z=ztrans(x_n)
OUTPUT RESULTS:
PRE-LAB TASK 2:
Compute the z-transform of the signals x[n] = u[n] and x[n] = u[n -1]
CODE:
% HAFIZ ZAIN UL HASSAN
% FA19-BEE-113-B
% PRE-Lab Report Experiment No 12
% Task No. 2
clc
clear all
close all
syms n z
x1_n=1
%z transform