Professional Documents
Culture Documents
M RAFAY TARIQ
FA18-BEE-100
BEE-A
Lab Report 13
To Reproduce the Properties of Z-Transform Using MATLAB Functions.
Objective
The main objective is to make student familiar to Z-transformation and the properties of Z-
Transform.
Required Equipment:
Hardware
No hardware was used to perform this lab.
Software
MATLAB software is used to perform this lab.
Procedure/ Methodology
Before starting this lab we were guided by our lab instructor through video lecture.
To Reproduce the Properties of Z-Transform Using MATLAB Functions.
Before performing the in lab task we studied pre lab section.
In pre lab section we studied different properties of z transform.
The properties were Linearity, Right Shift, Right Shift 2, Left Shift, Scaling in the Z-
Domain, Time Reversal, Differentiation in the Z-Domain, Summation Convolution
in the time domain.
And then we performed our lab tasks.
Lab Tasks
Properties
Linearity:
syms n z
x1=n^2;
x2=2^n;
a1=3;
a2=4;
L=a1*x1+a2*x2;
Left=ztrans(L, z)
X1=ztrans(x1, z);
X2=ztrans(x2, z);
Right=a1*X1+a2*X2
Result:
Left =
(4*z)/(z - 2) + (3*z*(z + 1))/(z - 1)^3
Right =
(4*z)/(z - 2) + (3*z*(z + 1))/(z - 1)^3
Right Shift:
syms n z m=2; x1=3^(n-
m)*heaviside(n-m);
Left=simplify(ztrans(x1,z)
) x=3^n*heaviside(n);
X=ztrans(x, z);
Right=simplify((z^(-m))*X)
Result:
Left =
(3/(z - 3) + 1/2)/z^2
Right =
(3/(z - 3) + 1/2)/z^2
Right Shift 2:
n=-3:3; x=0.8.^n;
xminus1=x(3);
xminus2=x(2);
xminus3=x(1);
syms z n
xn2=0.8^(n-2);
Left=simplify(ztrans(xn2,z))
x=0.8.^n;
X=ztrans(x,z);
Right=simplify((z^-2)*X+xminus2+(z^-1)*xminus1)
Result:
Left = (25*z)/(16*(z - 4/5))
Right = (125*z)/(16*(5*z - 4))
Left Shift:
x0=0.8^(0);
x1=0.8^(1);
Lab Report | 1
syms n z
xn2=0.8^(n+2);
Left=simplify(ztrans(xn2,z))
x=0.8^n;
X=ztrans(x,z);
Right=simplify((z^2)*X-(z^2)*x0-x1*z)
Result:
Left = (16*z)/(25*(z - 4/5))
Right = (16*z)/(5*(5*z - 4))
Time Reversal:
syms n z x=0.9^n;
Left=ztrans(n*x,z)
X=ztrans(x,z);
d=diff(X,z);
Right=simplify(-z*d)
Result:
Lab Report | 1
Left =
(90*z)/(10*z - 9)^2
Right =
(90*z)/(10*z - 9)^2
Summation:
syms n z x=n^2;
s=symsum(x,n,0,n);
Left=simplify(ztrans(s,z))
X=ztrans(x,z);
Right=(z/(z-1))*X
Result:
Left =
(z^2*(z + 1))/(z - 1)^4
Right =
(z^2*(z + 1))/(z - 1)^4
Pre Task 1
Solution
%mrafaytariq
%fa18-bee-100
%bee_a
%prelab task
%mrafaytariq
%fa18-bee-100
%bee_a
%prelab task
clear all;
close all;
syms z n
x1_z=z/(z-0.9);
x2_z= ((2.*z)+3)./((z.^2)+(5.*z)+6);
convolution= x1_z*x2_z
Timedom=iztrans(convolution)
r=-100:200
s=subs(Timedom,r)
stem(r,s)
Lab Task 1
Solution
%mrafaytariq
%fa18-bee-100
%bee_a
%lab13task1
clc;
clear all;
close all;
syms z n
x1_z=z./(z-0.9)
x2_z=(z)./(z+6)
convolution=x1_z*x2_z
Timedom=iztrans(convolution)
Lab Report | 1