LAB: Z-Transform and Its Properties

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

University of Engineering and Technology Lahore

Department of Mechatronics and Control Engineering

LAB: Z-Transform and its Properties

OBJECTIVE:
 To familiarize with Z-transform
 To become familiar with basic properties of the system such as linearity and multiplication by scalar
number
 To become familiarize with symbolic math tool
 To understand the stability of discrete time signal by analyzing location of poles in z plane.
 Pole zero cancelation and multiple poles on same location unit circle (marginally stable system
becomes unstable)

BACKGROUND:
Z-transform is defines as:
N
−k
X ( z ) =∑ x [ k ] z
k=0
Linearity property of z-transform is defined as:
ax1[n]+bx2[n] → aX1(z)+bX2(z)

TASK:

1. Write some sinusoidal function and find out its z-transform.


Use symbolic tool in order to get the result of z-transform in discrete time domain.

2. For each of the systems in (1) use and verify properties.


Write two functions, take their z-transform separately then sum up these results. Secondly sum up
the given functions in discrete time domain then take z-transform. Verify both results are equal
(Linearity Property).
Take a discrete time function, multiply with a scalar quantity then take z-transform. Now take z-
transform of given function then multiply with a scalar quantity. Show that both results are same.

COMMANDS:

ztrans, zplane.

Comments:

________________________________________________________________________________________________________________________________

________________________________________________________________________________________________________________________________

________________________________________________________________________________________________________________________________

TASK CODES:

Code 1:

a=0.8,

MCT 413 : Discrete Signal Processing


Department of Mechatronics and Control Engineering, U.E.T. Lahore
University of Engineering and Technology Lahore
Department of Mechatronics and Control Engineering

syms n z
%x1_n=a^n
x1_n=sin((2*pi*n)/7)
y=ztrans(x1_n,n,z)
%x2_n=a^n-1
x2_n=sin(((2*pi*(n))/7)-((2*pi)/7))
z=ztrans(x2_n,n,z)

Code 2:

syms n z
%a=2;
%ztrans(a^n,n,z)
%this can also be solved if we use ztrans(0.8^n)only the time variable

x1=sin((2*pi*n)/7);
x2=cos((pi*n)/3);

x1_z=ztrans(x1,n,z)
x2_z=ztrans(x2,n,z)
x_sum=x1_z+x2_z

xsum1=ztrans(x1+x2,n,z)

y=x_sum-xsum1 % now for linearity

Code 3:

syms n z
%a=0.8; b=2;
y=sin((2*pi*n)/7)
t=ztrans(y,n,z)
%A=[1.6 -2.8 1];
%B=[0 -1.2 0]
[n,d]=numden(t)
a=solve(n)
b=solve(d)
a=double(a)
b=double(b)
zplane(a,b)
grid on

Code 4:

syms n z
A=0.5;
x1=sin((2*pi*n)/7);
x1_z=ztrans(x1,n,z)
MCT 413 : Discrete Signal Processing
Department of Mechatronics and Control Engineering, U.E.T. Lahore
University of Engineering and Technology Lahore
Department of Mechatronics and Control Engineering

x=x1_z*A;

x1_n=x1*A;
x2_z=ztrans(x1_n,n,z)

y=x-x2_z % now for multiplication by constant

Code 5:

clc,clear,close
% Set up vector for zeros
z = [j ; -j];
% Set up vector for poles
p = [-1 ; .5+.5j ; .5-.5j];
figure(1);
zplane(z,p);
title('Pole/Zero Plot for Complex Pole/Zero Plot Example');

Pole/Zero
Pole/ZeroPlot
Plotfor
forComplex
ComplexPole/Zero
Pole/ZeroPlot
PlotExample
Example
11

0.8
0.8
0.6
0.6
0.4
0.4
Part

0.2
ImaginaryPart

0.2
Imaginary

00

-0.2
-0.2
-0.4
-0.4
-0.6
-0.6
-0.8
-0.8
-1
-1
-1
-1 -0.5
-0.5 00 0.5
0.5 11
Real
RealPart
Part

MCT 413 : Discrete Signal Processing


Department of Mechatronics and Control Engineering, U.E.T. Lahore

You might also like