ECG downsampling while prevending aliasing

9 views (last 30 days)
Hello everyone,
I have an ECG signal, sampled with an Fs of 44100 samples per second and the size of my signal is 2154163 samples. My signal contains artificial noise as can be seen in the 2 figures I attach (first figure is a part of my FFT results and second figure a zoom at the low frequencies). My task is to properly filter the signal so I can extract a heartbeat estimation. My first thought was to develop some notch filters but it is almost impossible to construct a steady filter for that low frequencies with such a huge sampling rate, so I guess some downsampling would be necessary. I read this article "https://www.mathworks.com/help/signal/ug/downsampling-aliasing.html" but it didn't really help me to actually implement the proper downsampling.. I also tried the "decimate" function of matlab but I noticed that it doesn't work as I would expect.. I would appreciate any kind of help or any idea on how to proceed..
Thanks a lot!

Accepted Answer

Star Strider
Star Strider on 11 May 2017
A good choice for the ‘new’ sampling frequency is 250 Hz, although any frequency in the range of 250 to 1000 Hz will work. The bandwidth of a normal EKG is about 50 Hz, but any abnormalities increase the bandwidth to 100 Hz. A sampling frequency of 250 Hz or higher results in a Nyquist frequency of at least 125 Hz, so you can effectively filter your resampled EKG with a sampling frequency of 250 Hz.
I would use the Signal Processing Toolbox resample function, since it does everything you want.
Example
[p,q] = rat(250/44100);
EKG_New = resample(EKG_Original, p, q);
Any filter design (Chebyshev, Butterworth) should work. If you want to design a notch filter, I would use a Chebyshev design, since it produces a short, efficient, filter with short transition regions. Also see Remove the 60 Hz Hum from a Signal (link) for a relevant example.
  4 Comments
Thanos
Thanos on 11 May 2017
I have used wavelets in the past and something like that returns relatively satisfactory results.. :
%
deb = ECG(1);
scal = 'mln'; % level-dependent estimation of the level noise
xd = wden(ECG-deb,'sqtwolog','s',scal,3,'db6')+deb;
Thank you very much! :)
Star Strider
Star Strider on 11 May 2017
As always, my pleasure!
I’m re-learning wavelets after not having worked with them in many years. The Daubechies 6 is a good choice for denoising.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!