Low pass filter or envelope detector in Excel

Click For Summary
The discussion focuses on filtering accelerometer data in Excel to eliminate noise and extract meaningful signals. Users explore the implementation of a low pass filter and an envelope detector, noting that traditional methods like rolling averages fail due to data irregularities and the presence of gravity. Suggestions include squaring the data before averaging and experimenting with Butterworth filters to manage noise while addressing unevenly spaced data points. One participant highlights the limitations of the current measurement resolution, indicating that discretization noise significantly affects the results. Overall, the conversation emphasizes the need for more sensitive instruments or improved data processing techniques to achieve clearer acceleration curves.
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 14 ·
Replies
14
Views
6K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K