Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Homework 7 (MATLAB Part)

MATLAB Part (To be submitted through Brightspace. Due date: Nov 8, 11:59PM (New York Time)

You should submit a zip file that contains:

1.   A report (in .pdf format), includes the MATLAB code you wrote for each problem and result for each problem (in terms of plots and necessary discussion),

2.   Individual .m files. You could use the “live script” feature of MATLAB to generate your report.

Submit your zip file via Brightspace under “Assignments” .

Please be advised that there are differences between this year’s homework and previous years. So please follow this year’s instructions and do not submit the homework did by previous years’ students.

Problem 1.

Baseline drift correction using dc notch filter: Download the ECG data file              'ecg_lfn.dat' (on Brightspace). The sampling frequency is 1000 samples/second.   Plot the ECG signal and observe the baseline drift. Design an order-1 recursive     filter with a frequency response null at omega =0, and a pole on the positive real axis. This system is a dc-notch filter. Apply your dc-notch filter to the ECG data to remove the baseline drift. Evaluate the effectiveness of the filter by overlaying    the filtered signal with the original ECG signal in the same plot. Comment on the effect of the pole position. Hint: your filter transfer function will have the form

of : H(z)=(z-q)/(z-p). The zero should be q=1. The pole should have a general form of p=r, with 0<r<1. You are asked to evaluate the effect of varying r. For each        value of r, you should show the frequency response of your filter, and the overlay of the original signal with the filtered signal.                                                                   Show the required figures when r = 0: 0.1: 1 and comments on the effect of the  pole position according to these figures. You can also choose some other r (at       least five different r are required).

 

The following MATLAB functions may be used:

filter:

https://www.mathworks.com/help/matlab/ref/filter.html

freqz:

https://www.mathworks.com/help/signal/ref/freqz.html?s_tid=srchtitle#bt8l9fo-1