0% found this document useful (0 votes)
61 views6 pages

Lab Report 6 DSP

This lab report discusses digital signal processing tasks completed in MATLAB. Task 1 involves determining the partial-fraction expansion of a z-transform. Task 2 calculates the inverse z-transform of an 11-term sequence. Task 3 finds the inverse z-transform using partial fraction expansion. Task 4 plots the magnitude and phase response of a digital filter using freqz. The conclusion analyzes the objectives of learning about z-transforms, inverses, and frequency responses in the digital domain.

Uploaded by

Khansa Maryam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views6 pages

Lab Report 6 DSP

This lab report discusses digital signal processing tasks completed in MATLAB. Task 1 involves determining the partial-fraction expansion of a z-transform. Task 2 calculates the inverse z-transform of an 11-term sequence. Task 3 finds the inverse z-transform using partial fraction expansion. Task 4 plots the magnitude and phase response of a digital filter using freqz. The conclusion analyzes the objectives of learning about z-transforms, inverses, and frequency responses in the digital domain.

Uploaded by

Khansa Maryam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

LAB REPORT # 06

NAME: KHANSA MARYAM.

ROLL NO.: FA20-BEE-232.

SUBMITTED TO: SIR MOBEEN SABIR.

SUBJECT: DIGITAL SIGNAL PROCESSING.

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:

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 = [18,0,0 0];
a = [18,3,-4,-1];
roots(a)
roots(b)
zplane(b,a)
[R,P,K] = residuez()

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.

x(z) = 1 – z-1 – 4z-2 + 4z-3


1 – 2.75z-1 + 1.625z-2 – 0.25z-3
PSEUDO CODE:
1. Save values of numerator in b.
2. Save values of denominator in a.
3. 4. [r,p,k] = residue(b,a) finds the residues, poles, and direct term of a Partial
Fraction Expansion of the ratio of two polynomials.
4. ‘impz’ The inverse of a rational z-transform can be readily calculated using this function.
5. Now stem plot x,y.
MATLAB CODE:
clc
clear all
close all

a=[ 1 -2.75 1.625 -0.25]


b=[1 -1 -4 4]
[R,P,K] = residuez(b,a)
[x,y] = impz(b,a)
stem(y,x)

Task-4: A digital filter is described by the difference equation,


Y(n) = x(n) + x(n-1) + 0.9y(n-1) – 0.81y(n-2)

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.

You might also like