Smoothing/Filtering Data from Analog to Digital Converter

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 4K views
j777
Messages
148
Reaction score
0
Hi,

I am trying to filter noise out of data gathered from an analog to digital converter. I've looked at averaging techniques but I fear that they cause too much data loss. Can anybody recommend other smoothing/filtering techniques that might result in less data loss and can be done dynamically as the data is read?

See the attachment to get an idea of what the noise looks like (the sharp spikes throughout the graph).


Thanks
 

Attachments

  • graph.jpg
    graph.jpg
    12.8 KB · Views: 564
Mathematics news on Phys.org
Ok. If that is the best way I'll post further questions about the low-pass filter in the EE forum. Thanks.
 
It's one way -- but it's not necessarily the easiest. Since your signal is very low-frequency (as compared to Nyquist) you could also just find all the samples which are very different from the immediately preceding sample. In other words, find the difference between sample k and sample k-1, and look for large values. These are places where the derivative of the signal is very high -- but since you know the desired signal is slow, you know these points are errors.

Finally, remove any such samples, and replace them with a linear or cubic spline interpolation of the nearby samples.

- Warren
 
That sounds like a better idea. I actually tried to implement something like what you have explained but failed to figure out an elegant way to determine if a point was in fact an error. Using the derivative of the signal seems like a good approach. I will give it a try...thank you.