


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This is lab manual for Digital Signal Processing course at COMSATS Institute of Information Technology, provided by Dr. Khalida Jaleel. It includes: Z-Transform, Pole-Zero, Plotting, Diagrams, Inverse, Signal, Frequency, Response, Phase, Spectrum
Typology: Exercises
1 / 4
This page cannot be seen from the preview
Don't miss anything!



Marks:- 10 Objective: By the end of this lab students will be able to: Determine Z-Transform of any signal Find inverse Z-Transform of the signal Plot Pole-Zero diagrams.
Pre-Lab Tasks:
Some Useful MATLAB Commands:
freqz: can be used to plot the magnitude and phase of system response. Also it is used to find Frequency response of any system. tf2zp: This function is used to find poles and zeros of a rational z-transform expressed as ratios of polynomials in descending powers of z. zp2tf : It is used as inverse process of above function. zplane: This function plots zeros and poles. residuez: It can be used to develop the partial-fraction expansion of a rational z- transform and to convert a z-transform expressed in a partial-fraction form to its rational form. impz: The inverse of a rational z-transform can be readily calculated using this function. filter: This command can also be used for calculating inverse of z-transform. sptool: Signal Processing Tool - Graphical User Interface. sptool opens the sptool window which allows you to import, analyze, and manipulate signals, filters, and spectra.
In Lab Tasks
Task 1:
Matlab Code:
b=[0 1 1 ] a= [1 -2 +3] % -ve powerz of z are on right n other on left roots(a) roots(b) zplane(b,a); %gives zeros,poles
Frequency Response:
The Freqz function computes and display the frequency response of given Z- Transform of the function freqz(b,a,Fs) b= Coeff. Of Numerator a= Coeff. Of Denominator Fs= Sampling Frequency
Matlab Code:
b=[2 5 9 5 3] a= [5 45 2 1 1] freqz(b,a); %Gives magnitude n phase spectrum
Task 2: Plot the magnitude and phase of the frequency response of the given digital filter Using freqz function: Y(n) = 0.2x(n) + 0.52y(n-1) – 0.68(y(n-2)
Matlab Code:
b = [0.2]; a= [1, -0.52, 0.68]; w = [0:1:500]pi/500; H=freqz(b,a,w); magH = abs(H); phaH = angle(H)180/pi; %normalize spectrum only into radians,not compulsory subplot(2,1,1); plot(w/pi,magH); title('Magnitude Response'); xlabel('frequency in pi units'); ylabel('│H│'); subplot(2,1,2); plot(w/pi,phaH); title('Phase Response'); xlabel('frequency in pi units'); ylabel('Degrees');
Task 3 Determine the Inverse z-transform using partial fraction expansion.