Professional Documents
Culture Documents
2
OBJECTIVE : To develop programs for computing Z- transform and Inverse Ztransform.
clear all
syms z x n
xz=(z^2 + (2*z) + 1)/(z^2 -z + 0.3561);
pretty(xz)
a=[1 2 1];
b=[1 -1 0.3561];
poly(b);
r=roots(b)
l=length(r)
x=0;
XZ=(z^2 + (2*z) + 1)/((z-r(1))*(z-r(2)))
for i=1:l
x=x+ subs(((z-r(i))*XZ*(z^n)),z,r(i));
end
simplify(x)
output:
2
z +2z+1
-------------2
3561
z - z + ----10000
r=
0.5000 + 0.3257i
0.5000 - 0.3257i
l= 2
XZ =
-(z^2 + 2*z + 1)/((z - 1/2 + (1061^(1/2)*i)/100)*(1/2 - z + (1061^(1/2)*i)/100))
ans =
(50*1061^(1/2)*(1/2 - (1061^(1/2)*i)/100)^n*((- 1/2 + (1061^(1/2)*i)/100)^2 + 2 (1061^(1/2)*i)/50)*i)/1061 - (50*1061^(1/2)*(1/2 + (1061^(1/2)*i)/100)^n*((1/2 +
(1061^(1/2)*i)/100)^2 + 2 + (1061^(1/2)*i)/50)*i)/1061
Ques 3. Determine whether or not all the roots of the following polynomial are
inside the
unit circle:
X(z) = (1+ 2.5z-1+ 2.5z-2 +1.25z-3+ 0.3125z-4 + 0.03125z-5 )
Soln :
clc
close all
clear all
h=tf([1],[1 2.5 2.5 1.25 1.25 0.3125 0.03125]);
[p z]=pzmap(h);
zplane(p,z)
Output :
1
0.8
0.6
Imaginary Part
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
-1.5
-1
-0.5
0
Real Part
0.5
Output :
/
2
/
2
2
\
|
z
| nz -nz+z
|
piecewise| Inf if z = 1, -------- + limit| - -------------------, n = Inf | if
|
2
| n
n 2 n
|
\
(z - 1)
\ z -2zz +z z
/
\
|
z <> 1 |
|
/
check
z
z
----- + -------z-1
2
(z - 1)
Ques 5. Determine whether or not all the roots of the following polynomial are
inside the
unit circle:
X(z) = (1+0.2z-1 +0.3z-2 + 0.4z-3 + 0.5z-4 + 0.6z-5 )
Soln :
clc
close all
clear all
h=tf([1],[1 0.2 0.3 0.4 0.5 0.6]);
[p z]=pzmap(h);
zplane(p,z)
Output :
1
0.8
0.6
Imaginary Part
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
-1
-0.5
0
Real Part
0.5
LEARNING OUTCOME :In this experiment we have learnt to find the ztransform and the inverse z-transform using inbuilt functions ztrans and iztrans
respectively.We have also learnt to find the poles and zeros plot as well as residue of
the polynomial.