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

In summary, the conversation discusses the use of a low pass filter to filter ECG data. The problem requires the use of a single pass double pole filter, which is essentially the average of three averages. However, the attempt at implementing this filter in Excel does not result in significant noise reduction. The conversation then discusses the possibility of using a better low-pass filter and mentions the difference between FIR and IIR filters. It is recommended to refer to a book on digital signal processing for further clarification and a recursive filter is suggested as a potential solution. Eventually, it is mentioned that the recursive filter is used in Excel and the results show a significant reduction in noise.
  • #1
engineer23
75
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
  • #2
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:
  • #3
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.
 
  • #4
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...
 
  • #5
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

  • hw3.doc
    55 KB · Views: 1,767
  • hw3plot.doc
    54 KB · Views: 1,261
  • #6
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...
 
  • #7
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.
 
  • #8
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,620
  • #9
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!
 

1. What is a low pass filter in Excel?

A low pass filter in Excel is a tool used to remove high frequency noise or unwanted signals from a dataset. It smooths out the data by averaging nearby points, making it easier to see overall trends.

2. How do I create a low pass filter in Excel?

To create a low pass filter in Excel, you can use the built-in "Moving Average" function. This function calculates the average of a specified number of data points and places the result in the middle of the range. You can adjust the number of data points to include in the average to control the level of smoothing.

3. Can I adjust the cutoff frequency of a low pass filter in Excel?

Yes, you can adjust the cutoff frequency of a low pass filter in Excel by changing the number of data points included in the average. A higher number of data points will result in a lower cutoff frequency, while a lower number of data points will result in a higher cutoff frequency.

4. Can a low pass filter in Excel be used for time series data?

Yes, a low pass filter in Excel can be used for time series data. It is a common tool for smoothing out fluctuations in time series data to better visualize trends.

5. Are there any limitations to using a low pass filter in Excel?

Yes, there are a few limitations to using a low pass filter in Excel. It can only be applied to numerical data, and it may not be as accurate as other advanced filtering methods. It is also important to consider the trade-off between smoothing and losing important data points when using a low pass filter.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
3
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
11
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
11
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
11
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
9
Views
34K
  • Engineering and Comp Sci Homework Help
Replies
23
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
2K
Back
Top