Lab 4-2
Lab 4-2
Engineering School
Lab 4
Significance of 𝒛−𝒏
The z-transform of a discrete-time signal x(n) is defined as the power series
Where z is a complex variable. The relation sometimes called the direct z-transform
because it transforms the time-domain signal x(n) into its complex-plane
representation X(z).
𝑧 = 𝑟𝑒 𝑗𝑤
𝑧 −𝑛 = 𝑟 −𝑛 𝑒 −𝑗𝑤𝑛
𝑧 −𝑛 = 𝑟 −𝑛 (cos(𝑤𝑛) − 𝑗𝑠𝑖𝑛(𝑤𝑛)
Where:
r: real number
𝑒 𝑗𝑤 : Euler’s number
Code:
syms z
x = [1 3 5 8 4];
m = length(x);
X=0;
for i=0:m-1
X = X + x(i+1)*z^(-i);
end
disp(X)
Lab Task:
Code:
syms z
x = input('Enter the sequence x(n): ');
n1 = input('Enter the start value of n: ');
n2 = n1+length(x)-1;
m = 1;
result = 0;
for i=n1:n2
result = result + x(m)*(z^(-i));
m = m + 1;
end
disp(result);
Finding z-transform of a function
Lab Task
Find z-transform of 𝑎𝑛 .
Code
syms n z a
f = a^n;
m=ztrans(f,z)
Lab Task
Find z-transform of sin(wn).
Code
syms w z n
f = sin(w*n);
m=ztrans(f,z)
Lab Task
1
Find z-transform of .
4𝑛
Code
syms z n
f = 1/4^n;
m = ztrans(f,n,z)
pretty(m)
zplane(a,b);
EXERCISES:
2- y[n] = u[n-2]
1 𝑛
3- ( ) 𝑢[𝑛 − 1]
4
Solution
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
B) Find the inverse z transform of the following
Solution
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
C) Find convolution of the following functions by means of Z transform:
1 𝑛
𝒙[𝒏]=2𝑛 𝒖[−𝒏+𝟏] , 𝒉[𝒏]=( ) 𝒖[𝒏−𝟐]
3
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------