Description
Question (100 pts):
a) (5 pts) Obtain and plot the frequency spectrum of this signal (magnitude and phase).
b) (5 pts) What part of this spectrum corresponds to the signal, and what part corresponds to
noise?
Note: You will see that the signal contains high frequency noise!
c) (20 pts) Since ECG is actually a random signal, a more appropriate spectral analysis tool is
the PSD. Calculate and plot the PSD of this data using periodogram and Welch’s method.
Moving Average Filtering:
d) (10 pts) Apply a 10-point moving average filter to ecg_2.mat.
i. Plot the filtered signal and the original signal on top of each other on the same plot
(with a different color). Comment!
ii. Plot the filtered signal and the original signal frequency spectrums on top of each
other on the same plot (with a different color). Compare them!
FIR filtering
e) (30 pts) Design a lowpass digital FIR filter using two window functions. Decide which ones
you choose and why. Design the filter so that you get the cleanest ECG as possible. What
filter specs provide you with the cleanest ECG? Convince the reader of your exam why your
particular selection is the best. You may, for example, compare a few different designs
obtained by different specs. Plot the magnitude and phase spectra of these filters.
i. Apply each of the above designed filters to the ECG signal you downloaded. Is the
signal denoised? Play around with the filter specs, and find out whether other specs
may give you better denoised signal.
ii. Plot the filtered signal and the original signal on top of each other on the same plot
(with a different color). Comment!
iii. Plot the filtered signal and the original signal frequency spectrums on top of each
other on the same plot (with a different color). Compare them!
IIR Filtering
f) (30 pts) Repeat part (e) by designing digital IIR filters using Butterworth and Chebychev
filter approximations. Which type of Chebychev filter (type I or II) should you prefer? Why?
Compare the filter characteristics to those of FIR filters. What differences are most
prominent?
i. Apply each of the above designed filters to the ECG signal you downloaded. Is the
signal denoised? Play around with the filter specs, and find out whether other specs
may give you better denoised signal.
ii. Plot the filtered signal and the original signal on top of each other on the same plot
(with a different color). Comment!
iii. Plot the filtered signal and the original signal frequency spectrums on top of each
other on the same plot (with a different color). Compare them!