Signals and Systems (Lab) Resource Person : Hafiz Muhammad Ijaz COMSATS Institute of Information...
-
Upload
dwight-townsend -
Category
Documents
-
view
232 -
download
0
Transcript of Signals and Systems (Lab) Resource Person : Hafiz Muhammad Ijaz COMSATS Institute of Information...
Signals and Systems (Lab)
Resource Person : Hafiz Muhammad Ijaz
COMSATS Institute of Information Technology
Lahore Campus
www.powerpointpresentationon.com
EXPERIMENT # 11
Z-Transform and its MATLAB
implementation .
In This Lab… Introduction to Z-TransformHow to implement Z-transform and Inverse Z-transform in
MATLAB?What is meant by Region of Convergence (ROC)
Pole Zero Plot Stable and Unstable Systems Impulse Response and Step Response
MATLAB Implementation of inverse Z-transform using Partial Fraction Expansion
How to use Z-Transform to solve Difference Equations using MATLAB?
Introduction to Z-Transform
Bilateral Z-Transform
Unilateral Z-Transform
Inverse Z-Transform
MATLAB Implementation of Z-Transform
Solution of Example 1syms z
x0=3; x1=5;x2=4;x3=3;
Xz=x0*(z^0)+x1*(z^-1)+x2*(z^-2)+x3*(z^-3);
pretty(Xz)
Solution of Example 1 Cont…
syms zx=[3 5 4 3];n=[0 1 2 3];X=sum(x.*(z.^-n));pretty(X)
The command ztrans and iztrans
Solution of Example 2syms n zf = 2^n ;
Z = ztrans(f)
Zt = simplify(Z)
iz=iztrans(Z)
Discrete Time System Properties
Pole-Zero Plot and Stability
num=[.1 .1];den=[1 -1.5 0.7]; zplane(num,den)
Is this system is STABLE??
-1 -0.5 0 0.5 1
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Real Part
Imag
inar
y P
art
Pole-Zero Plot Cont…
figure(2)
H=tf(num,den,1);
pzmap(H)
-1 -0.5 0 0.5 1-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1Pole-Zero Map
Real Axis
Imag
inar
y A
xis
Step Responsefigure(3)subplot(2,1,1)num=[.1 .1];den=[1 -1.5 0.7];dstep(num,den) subplot(2,1,2)Stepz(num,den)
0 5 10 15 20 25 30 35 40 45 500
0.5
1
1.5
n (samples)
Am
plitu
deStep Response
0 5 10 15 20 25 30 350
0.5
1
1.5Step Response
Time (sec)
Am
plitu
de
Impulse Response figure(4)subplot(2,1,1)dimpulse(num,den) subplot(2,1,2)impz(num,den)
0 5 10 15 20 25 30 35-0.2
0
0.2
0.4
0.6Impulse Response
Time (sec)
Am
plitu
de
0 5 10 15 20 25 30 35 40 45 50-0.2
0
0.2
0.4
0.6
n (samples)
Am
plitu
deImpulse Response
Partial Fraction Expansion of a Rational Function
The Command residue
Solution of Example 4
num=[ 1 3 1];den=[ 1 0 -3 2][R,P,K]=residue(num,d
en)
Solution of Difference Equation using Z-Transform
Thus
Solution of Example 5syms n z Y X=ztrans(0.9^n,z) Y1=z^(-1)*Y;Y2=z^(-2)*Y; G=Y+0.5*Y1+2*Y2-X; SOL=solve(G,Y);pretty(SOL); y=iztrans(SOL,n);
Tutorial Questions
SummaryIntroduction to Z-Transformimplement Z-transform and Inverse Z-transform using
MATLAB.Region of Convergence (ROC)
Pole Zero Plot Stable and Unstable Systems Impulse Response and Step Response
MATLAB Implementation of inverse Z-transform using Partial Fraction Expansion
Solution of Difference Equations using MATLAB.