LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Removing DC offset that drifts

Like some of you, I am trying to extract displacement information by doubly integrating accelerometer data. I am running into two problems that I hope the signal processing expertise of this bulletin board can help.

The periodic signal that I am trying to measure is ~1-3 hertz. I have attempted to filter the data with various LabVIEW bandpass filters (forward and backward filtered) but I cannot sufficiently remove the DC offset such that the results from the double integration do not just take off to infinity. I have been subtracting the mean from both the acceleration data and the first integral results (velocity) just to get a periodic displacement result that is the correct order of magnitude. however, I've noticed that noodling w
ith the number of poles of the various filters I've tried (butterworth, chebyshev) can effect the displacement results by as much as 20%.

So, my two questions:
(1) How can I remove the DC offset of a 1-3 Hz signal that is drifting over time?

(2) What is good practice for using digital filters? Can I "calibrate" the filter by figuring out the number of poles that gives a result that matches a known displacement and then subsequently use that filter setting for future measurements?

I look forward to your response.
Jeremy
0 Kudos
Message 1 of 7
(6,087 Views)
Jeremy,

You are facing a tough challenge.

(1) How fast does the DC offset change? How much data is available? Do you need to analyze it while it is being acquired? Do you have a "clean" version of the periodic signal frequency (something to synchronize with)? Are there other interfering signals in addition to the offset?
(2) Many books have been written on filter design. Filter performance comes down to the frequency separation between the deired and undesired signals. Another factor is that all filters have a transient effect when first applying a signal. Before worrying about the type and order of the filter, the application needs to be clearly defined.

I will see what I can offer after you answer the questions above.

Lynn
0 Kudos
Message 2 of 7
(6,087 Views)
[OT]
The high output imeadance of accelerometers coupled to the high impeadance input of a DAQ board can result in the input signal climbing slowly to the rail.

A large valued resistor (? 1Meg?) wired across the input can bleed off the charge and help with the DC drift.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 7
(6,087 Views)
Lynn, thanks for your quick response.
(1) The DC offset drifts probably mVs over an hour or so but this translates to mGs of acceleration which really messes up the results. We sample at 500 Hz for ~1 minute intervals (thus ~30,000 data points). No clean signal available. We have a solid-state RC filter that is intended to remove any noise above 50 Hz. Other than that, I don't believe we have any other signals at this point.

If you need any other information, please ask.
Jeremy
0 Kudos
Message 4 of 7
(6,087 Views)
"Lynn, thanks for your quick response.
(1) The DC offset drifts probably mVs over an hour or so but this translates to mGs of acceleration which really messes up the results. We sample at 500 Hz for ~1 minute intervals (thus ~30,000 data points). No clean signal available. We have a solid-state RC filter that is intended to remove any noise above 50 Hz. Other than that, I don't believe we have any other signals at this point.

If you need any other information, please ask.
Jeremy
0 Kudos
Message 5 of 7
(6,087 Views)
If you have the signal processing toolkit. There is a denoise and detrend vi that does some really neat stuff to a signal. Is your data an array type or a waveform?? Can you attach some data to the thread and I'll play with it on my end.
Message 6 of 7
(6,087 Views)
I, too, would like to see some data. A couple of ideas:

You indicate that you sample for about a minute at at time. If you process each minute's worth of data separately the drift over an hour should be negligible for that minute.

Can you use knowledge of the limits of behavior of the system to "rest" the drift? For example suppose your system can only move +/- 5 mm. If the integrated offset tells you the device is at 4 mm but still swinging +/- 2 mm you know the offset has to be wrong.

Lynn
0 Kudos
Message 7 of 7
(6,087 Views)