Signals and Systems (Lab) Resource Person : Hafiz Muhammad Ijaz COMSATS Institute of Information Technology Lahore Campus
EXPERIMENT # 11 Z-Transform and its MATLAB implementation.
In This Lab… Introduction to Z-Transform How 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 1 syms 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 z x=[ ]; n=[ ]; X=sum(x.*(z.^-n)); pretty(X)
The command ztrans and iztrans
Solution of Example 2 syms n z f = 2^n ; Z = ztrans(f) Zt = simplify(Z) iz=iztrans(Z)
Discrete Time System Properties
Pole-Zero Plot and Stability num=[.1.1]; den=[ ]; zplane(num,den) Is this system is STABLE??
Pole-Zero Plot Cont… figure(2) H=tf(num,den,1); pzmap(H)
Step Response figure(3) subplot(2,1,1) num=[.1.1]; den=[ ]; dstep(num,den) subplot(2,1,2) Stepz(num,den)
Impulse Response figure(4) subplot(2,1,1) dimpulse(num,den) subplot(2,1,2) impz(num,den)
Partial Fraction Expansion of a Rational Function
The Command residue
Solution of Example 4 num=[ 1 3 1]; den=[ ] [R,P,K]=residue(num,den)
Solution of Difference Equation using Z-Transform Thus
Solution of Example 5 syms 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
Summary Introduction to Z-Transform implement 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.