Lab Report 6 DSP
Lab Report 6 DSP
DATED: 23-04-2023.
1
Task-1: Using MATLAB we determine the partial-fraction expansion of the z-transform
X(z) given by
18z3
X(z) =
18z3 + 3z2 – 4z -1
PSEUDO CODE:
2
Task-2: Determine the inverse z-transform of the 11 terms of following equation
1- 2z-1
X(z) =
(1-0.2z-1)(1+0.6z-1)
PSEUDO CODE:
1. Save values of numerator in b.
2. Save values of denominator in a.
3. Take roots of a.
4. Take roots of b.
5. Plot graph using z-plane.
6. [r,p,k] = residue(b,a) finds the residues, poles, and direct term of a Partial
Fraction Expansion of the ratio of two polynomials.
MATLAB CODE:
clc
close all
clear all
b = [1,0.4,-0.12];
a = [1,-2,0 ] ;
[h,t]=IMPZ(b,a,11);
stem(t,h)
title('z-transform')
xlabel('time')
ylabel('amplitude')
3
Task-3: Determine the Inverse z-transform of the following sequences, using partial fraction
expansion method.
4
Using the freqz function, plot the magnitude and phase of the frequency response of the filter.
PSEUDO CODE:
1. Convert the given equation in fraction form.
2. Save values of numerator in b.
3. Save values of denominator in a.
4. ‘Freqz’ can be used to plot the magnitude and phase of system response.
5. Using subplot, plot graph of MAGNITUDE RESPONSE and PHASE RESPONSE.
MATLAB CODE:
clc
clear all
close all
b = [1 1];
a= [1, -0.9, +0.68];
w = [0:1:500]*pi/500;
H=freqz(b,a,w);
magH = abs(H);
phaH = angle(H)*180/pi;
subplot(2,1,1);
plot(w/pi,magH);
title('Magnitude Response');
ylabel('H');
subplot(2,1,2);
plot(w/pi,phaH);
title('Phase Response');
ylabel('Degrees');
5
CONCLUSION/ CRITICAL ANALYSIS:
Following are the objectives of this lab report:
The computation of the z-transform of various signals and with the determination of
ROC. Understanding the properties of the z-transform and how these properties can
be used to simplify computations. The process of inverting the z-transform by using
method of partial fraction expansion.
Understanding how LTI systems are represented in the z-domain and the relationship
to the frequency response. Furthermore in this lab I have learned about the calculation
of inverse z-transform by written methods and by the MATLAB also. The MATLAB
command iztrans() is directly used to obtain the inverse z-transform. Then the
residuez() command can also be used to calculate the inverse z-transform, Also in this
lab we plotted the frequency response of difference equation in term of magnitude and
phase. For that purpose I used the freqz(num,den) command.