0% found this document useful (0 votes)
33 views

Assignment # 04

This document contains an assignment for an Advanced Digital Signal Processing course. It includes two questions - the first asks students to write code for convolution between two arrays, and the second asks students to apply FIR and IIR low pass filters with a cutoff frequency of 40Hz to an ECG data set stored in an array. Students are instructed to submit their code and output plots by the given deadline.

Uploaded by

Imran Shah
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Assignment # 04

This document contains an assignment for an Advanced Digital Signal Processing course. It includes two questions - the first asks students to write code for convolution between two arrays, and the second asks students to apply FIR and IIR low pass filters with a cutoff frequency of 40Hz to an ECG data set stored in an array. Students are instructed to submit their code and output plots by the given deadline.

Uploaded by

Imran Shah
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Advanced Digital Signal Processing

Course Instructor: Dr. Tahir Zaidi


Assignment # 04

Due Date for On Campus Students: April 25, 2015


Due Date for DL Students: April 25, 2015
Important Notes:
This is an individual assignment. Each student must work alone, without help from any
other person. Copied assignment will get Zero Marks.
Submit the .doc file or .pdf along with codes.
Upload the Assignment on Canvas.
Filename should be firstname_rollnumber.rar
In this assignment you will be required to give C++ code which is compatible with Code
Composer Studio v3.3. If you are unable to write the code in Code Composer Studio, write a
program in C++ and send a running program.

Question # 01
Write a code for convolution between the following two arrays.
A = [ 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90
0.95 1];
B = [ 0.309 0.587 0.809 0.951 1 0.951 0.809 0.587 0.309 1.224e16 0.309 0.587 0.809 0.951
1 0.951 0.809 0.587 0.309 2.449e16];

Question # 02
Download the file ECG_Data(2).txt and store the data in an array of type double.
a) Apply an FIR low pass, with cutoff frequency 40 Hz. Use difference equation for
filtering. Plot the results. Use H[n] as given below.
H[n]
=
[0.266429741357649,
0.0438184729162442,
0.0464078581676495,
0.0484869832839731, 0.0494457581421799, 0.0498726328512953, 0.0494457581421799,
0.0484869832839731, 0.0464078581676495, 0.0438184729162442, 0.266429741357649]

b) Apply an IIR low pass filter, with cutoff frequency 40 Hz. Use difference equation for
filtering. Plot the results. Use Coeff matrices and gain given below,
Num Coeff = [1 2 1];
Den Coeff = [1 1.86462554633675 0.925106300799212];
G = 0.0151201886156165

You might also like