You are on page 1of 6

EXPERIMENT NO.

2
OBJECTIVE : To develop programs for computing Z- transform and Inverse Ztransform.

THEORY : The Z-transform of a discrete time signal x(n) is


X (z) =x(n)z -n
where, z is a complex variable. Since z-transform is an infinite series, it exists only for
those
values of z for which this series converges. The region of convergence (ROC) of X(z)
is the
set of all values of z for which X(z) attains a finite value.
Inverse Z-transform :
The inverse Z-transform is the conversion of Z-domain signal into time domain
signal. The
inversion can be done by Cauchys Integral theorem, long division process, partial
fraction
expansion etc.
Ques 1. Find the Z-transform of the following signals and also find the R.O.C
.
x(n)={2,1,3,-4,1,2}
Soln :
clc
clear all
close all
syms z n x
y=x.*z.^(-n);
y=subs(y,{x,n},{[2 1 3 -4 1 2],0:5});
p=sum(y);
pretty(simplify(p))
Output:
4 3 2
z +3z -4z +z+2
------------------------ + 2
5
z
Ques 2. Find the inverse Z-transform of the signal
X(z)= (1+2 z-1+z-2 )/ (1- z-1+ 0.3561z-2 )
Soln : clc
close all

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

Ques 4. Find the Z-transform of the following signals


.
x(n)=n+1
Soln :
clc
clear all
close all
syms z n x;
x=n+1;
h1=x*z^(-n);
h=symsum(h1,n,0,inf);
pretty(h)
disp('check')
pretty(ztrans(x))

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

Ques 6. Find the residues of the following polynomial


X(z)= (z )3/[(z - 0.5)(z - 0.75)(z -1)]
Soln :
clc
clear all
close all
[r p k]=residuez([1],[1 -1.8 1.175 -0.375])
Output :
r=
1.7391
-0.3696 - 0.3844i
-0.3696 + 0.3844i

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.

You might also like