ECG Signal Processing

March 24, 2010

(This article was first published on BioStatMatt » R, and kindly contributed to R-bloggers)

After reading (most of) “The Scientists and Engineers Guide to Digital Signal Processing” by Steven W. Smith, PhD, I decided to take a second crack at the ECG data. I wrote a set of R functions that implement a windowed (Blackman) sinc low-pass filter. The convolution of filter kernel with the input signal is conducted in the frequency domain using the fast Fourier transform, which is much of the focus of Smith’s book.You can check out the complete R script. Also, you can reproduce the analysis and the image below in R by running the following command


The low-pass filter was first applied to eliminate the high frequency noise, anything greater than 30Hz. I next applied the filter at a cutoff frequency of 1Hz in order to isolate the slow wave that corresponds to respirations. The image below gives the sequence of filtering.

To leave a comment for the author, please follow the link and comment on their blog: BioStatMatt » R. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: , ,

Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)