Low pass filter or envelope detector in Excel

Click For Summary

Discussion Overview

The discussion revolves around filtering accelerometer data in Excel, specifically focusing on implementing a low pass filter or an envelope detector to reduce noise and extract meaningful signals from the data. Participants explore various methods and techniques for achieving this goal, including averaging, squaring data, and different types of filtering approaches.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant seeks guidance on implementing a low pass filter in Excel, expressing dissatisfaction with averaging methods that do not adequately address noise in the accelerometer data.
  • Another suggests squaring the data before averaging to avoid losing information after subtracting gravity, prompting questions about the measurement context.
  • There is a discussion about the definition of low pass filters, including parameters like insertion loss, cutoff frequency, and how to distinguish between noise and signal by frequency.
  • A participant mentions the challenges posed by unevenly spaced data points when applying a rolling average and suggests that a Butterworth filter might be more effective, though it introduces its own noise issues.
  • One participant experiments with different types of detectors and describes the limitations of using Fourier filtering due to discontinuities in the data series.
  • Concerns are raised about the resolution of the signal measurement, indicating that discretization noise may be a significant factor affecting the perceived noise in the data.

Areas of Agreement / Disagreement

Participants express differing views on the effectiveness of various filtering techniques and the nature of the data being analyzed. There is no consensus on the best approach to filter the accelerometer data, as multiple competing methods and interpretations are presented.

Contextual Notes

Participants note limitations related to the uneven spacing of data points and the resolution of the measurements, which may affect the filtering outcomes. The discussion includes various assumptions about the nature of the data and the intended signal extraction.

Who May Find This Useful

This discussion may be useful for individuals working with accelerometer data, those interested in digital signal processing techniques, and users looking to implement filtering methods in Excel.

likephysics
Messages
638
Reaction score
4
I am playing with some accelerometer data and need to filter out the noisy output.
How do I implement a Low pass filter in excel?
I tried avg, rolling avg. They all smooth out the data but not what I want (averaged accn is finite when it is actually zero!)
If I can create an envelope detector in excel that would be awesome. Any help?
 
Engineering news on Phys.org
Just off hand, I would square the data before averaging. Otherwise you get zeroafter subtracting gravity, you know.
 
Square the data, average it and then take the sqrt?

Zero after subtracting gravity? how? I am measuring accn along x axis.
 
Low pass filters are often defined by insertion loss in the passband, cutoff frequency and slope. Could you give us an idea of what you're looking for?

How do you distinguish between noise and signal, by frequency?

Perhaps you could post some sample data for and identify what signal you are trying to extract.

"One experiment is worth a thousand expert opinioins."
 
likephysics said:
Square the data, average it and then take the sqrt?
Zero after subtracting gravity? how? I am measuring accn along x axis.

Oh dear. I think I misunderstood. You're not measuring vibration amplitude, are you?
 
Phrak, no I am measuring position using accn.

skeptic2, I've attached the excel file. A plot would give you a better idea of what I am talking. Basically the data is a bit spiky. Ideally I would prefer to use a envelope detector to get a nice acceleration curve.
 

Attachments

I can see why a rolling average didn't work well. The data isn't clocked in at a constant rate according to column A.
 
likephysics said:
Phrak, no I am measuring position using accn.

skeptic2, I've attached the excel file. A plot would give you a better idea of what I am talking. Basically the data is a bit spiky. Ideally I would prefer to use a envelope detector to get a nice acceleration curve.

I did some DSP worksheets in Excel back when I was working through "Designing Digital Filters" by Williams. They really helped illustrate the DSP concepts. That was probably 10 years ago, though, so let me look back through some old backups to see if I can find them...
 
likephysics,

An envelope detector, at least in radio, detects the peak values of the waveform. I don't think that's what you want. I took your spreadsheet and experimented with three different types of detectors but when I wanted to send it back to you I discovered there is a 100k limit on attachment size and the spreadsheet had grown to 462k. I did send you a private message about what I found.

Briefly, I tried a rolling average but in order to avoid phase shifting the result, I averaged a few points before the current point together with a few points after. This would be the best solution IF the points were evenly spaced.

To address the unevenly spaced points issue, I tried a Butterworth implementation. The resultant curve rises or falls exponentially the same way as a charging capacitor depending on the difference between successive points with respect to amplitude and time. Although with a single instance (pole) it had more noise than the rolling average, by stacking or using the output of one as the input of another the noise can be eliminated and the output looked as good as with the rolling average.

I also tried Fourier filtering but that wasn't satisfactory due to the discontinuities at the beginning and end of the data series.
 
  • #10
your biggest problem appears to be that you can't measure a signal with resolution greater than 0.0323, and your max signal is .3871, for a ratio of ~12. most of the "noise" there is discretization noise. you really need either a bigger signal, higher resolution, or a more sensitive instrument that designed for this signal range.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
3K
Replies
7
Views
4K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
6K
  • · Replies 14 ·
Replies
14
Views
6K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K