You are on page 1of 5

Experiment Title.2.

Student Name:RekhaRani UID:19BEC1058


Branch: ECE Section/Group-B
Semester: 5th Date of Performance:11/11/21
Subject Name:Digital Signal Processing Lab
Subject Code:ECP-317_19BEC-1_B

1. Aim/Overview of the practical:


To implement LP FIR filter for a given sequence.
2. Tool Used:MATLAB ONLINE
3. Algorithm:

Step I : Enter the pass band frequency (fp) and stop band frequency (fq).

Step II : Get the sampling frequency (fs), length of window (n).

Step III : Calculate the cut off frequency, fn

Step IV : Use boxcar, hamming, blackman Commands to design window.

Step V : Design filter by using above parameters.

Step VI : Find frequency response of the filter using matlab command freqz.

Step VII : Plot the magnitude response and phase response of the filter

3. Program-
fs=8000; % sampling frequency
n=50; % order of the filter

w=1200/ (fs/2);

b=fir1(n,w,'low'); % Zeros of the filter

freqz(b,1,128,8000); % Magnitude and Phase Plot of the filter figure(2)

[h,w]=freqz(b,1,128,8000);

subplot(2,1,1);

plot(w,abs(h));% Normalized Magnitude Plot

title('Normalized Magnitude Plot');

grid

subplot(2,1,2);

figure(2)
zplane(b,1); % the plot in lab

title('zplane');

4. Observations/Discussions(For applied/experimental sciences/materials based labs):

5. Percentage error (if any or applicable):N/A


6. Result/Output/Writing Summary:

Learning outcomes (What I have learnt):

1.1) Learn about various command of MATLAB.

2) Differentiate between Command Window, Editor Window, Workspace,


and Command History.
3) Learn about Clc,clear all, close all commands of MATLAB.

Evaluation Grid (To be created as per the SOP and Assessment guidelines by the faculty):

Sr. No. Parameters Marks Obtained Maximum Marks


1.
2.
3.

You might also like