ECG Signal Noise Reduction with Low-Pass Filter Implementation in Excel

Click For Summary

Discussion Overview

The discussion revolves around the implementation of a low-pass filter for ECG signal noise reduction using Excel. Participants explore different types of filters, their equations, and the effectiveness of the filtering approach taken by the original poster.

Discussion Character

  • Homework-related
  • Technical explanation
  • Debate/contested

Main Points Raised

  • The original poster describes their attempt to filter ECG data using a specific formula for a low-pass filter, which they implemented in Excel.
  • One participant questions whether the filter is FIR or IIR and expresses confusion about the original poster's equation, suggesting that the equation for an FIR LPF is not simply the average of previous inputs.
  • Another participant confirms that the filter is FIR based on the absence of feedback and describes it as an averaging filter, speculating that the filter may roll off too slowly or have a cutoff frequency that is too high.
  • Suggestions are made for alternative filtering methods, including the use of Matlab with Signal Processing extensions and a reference to a free book on digital signal processing that includes a recursive filter.
  • The original poster shares a screenshot of their Excel spreadsheet to clarify their approach and seeks further assistance on filtering methods.
  • A later reply mentions that the recursive filter suggested from the book improved the plot of the ECG signal, indicating a successful outcome from the implementation.

Areas of Agreement / Disagreement

Participants express differing views on the effectiveness of the original filtering method and the appropriateness of the filter type used. There is no consensus on the best filtering approach, as multiple suggestions and methods are proposed throughout the discussion.

Contextual Notes

Participants reference specific equations and methods without fully resolving the mathematical details or assumptions behind the filtering techniques. The discussion includes varying levels of familiarity with digital signal processing concepts.

Who May Find This Useful

This discussion may be useful for individuals interested in signal processing, particularly in the context of biomedical signals like ECG, as well as those looking for practical implementations of filtering techniques in Excel.

engineer23
Messages
68
Reaction score
0

Homework Statement



I have data for an ECG and I want to filter it.

Homework Equations



The problem tells me to run the signal through a low pass filter.
I tried a single pass double pole filter (essentially the average of three averages). If we have data points A, B, C, D, E, and F, then the filter takes the data and reduces it through the following formula: [(A+B+C)/3 + (B+C+D)/3 + (C+D+E)/3]/3

Also, the signal to noise ratio is the range of signal/range of noise.

The Attempt at a Solution



I implemented the filter in Excel. But when I plot the filtered data, I don't really see much noise reduction. Is there a better low-pass filter I can use that will give me a clear(er) ECG signal? If so, how do I implement it in Excel?



Thanks...
 
Physics news on Phys.org
Is your filter FIR or IIR? I don't really understand your equation... the DSP equation for the next output will depend on a finite number of the previous inputs... is that what you are trying to represent with your equation? The equation for an FIR LPF is not the simple average of the previous few inputs...

What impulse response are you designing for, and what design method are you using?


EDIT -- Here's some further reading at wikipedia.org: http://en.wikipedia.org/wiki/Digital_signal_processing

And I also really like the DSP book by Charles S. Williams. Check it out as a learning resource if you get a chance.
 
Last edited:
I think it would help if I could show you the Excel file w/ my attempt at filtering. I can't attach it in a post though. Is there a way I can e-mail it to you or pm you with it? I think it would make the problem much clearer.

The filter should be FIR, since this is the only kind of filter we have talked about in class.
 
I don't think Excel attachments work on the PF. Can you just PDF a couple screenshots, with the active cell showing your running LPF equation? I have an Excel spreadsheet that I could do that with, but that would posting an answer, so I'm not able to do that...
 
OK...I have attached a screenshot of the spreadsheet. Column A is time and B is the original signal. My attempt at filtering is shown in the next two columnns. My formula for an "averaging" filter" can be seen in the Excel display.
I have also included the plot of the original ECG signal.

Is there an easier/better way to filter this data using a low pass filter that I am missing?

Thanks for your help!
 

Attachments

Berkeman, et all,

The attachments are not oked yet, but looking at his formula, it is a FIR filter. You can tell because it has no feedback. It is an averaging filter (thats what a LPF is). Given how unsophisticed your approach is, I would guess that the filter rolls off too slowly or maybe your cutoff frequency is too high.

If you have Matlab available with the Signal Processing extensions, you can make a filter exactly to your specification very easily, but I suppose you don't since if you did you would not be trying to do it in excel.

I have to put a small child to bed so I need to go, but look on the web for an excellent FREE book on filters by Steven W Smith called Digital Signal Processing: A Practical Guide for Engineers and Scientists. It has some example code that might work you... Sorry, I have to go and then I have to study my own stuff...
 
Child put to bed and homework done.

I going to guess because your attachments are still pending but try this:

Look in the free book I suggested at page 282. There is a cute little recursive filter there that may do the trick and would work well in Excel. It works well in fixed point and is simple to implement. The code (in Basic) is on page 284. Run it several times over the data. Tell me how it works out.
 
Here is a screenshot of the DSP practice sheet that I was mentioning...
 

Attachments

  • DSP Practice in Excel.jpg
    DSP Practice in Excel.jpg
    72.4 KB · Views: 5,720
Thanks everyone! I used the recursive filter in Excel and my plot looks much less noisy. The Signal Processing book is a very useful resource!
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 23 ·
Replies
23
Views
3K
  • · Replies 12 ·
Replies
12
Views
11K
  • · Replies 9 ·
Replies
9
Views
36K
  • · Replies 7 ·
Replies
7
Views
2K