Eliminating DC offset from accelerometer

In summary: C-R high pass filter to achieve this.For example a C-R HPF at 0.03 Hz will introduce only about 1/2 a degree phase shift at your signal frequency. You'll need a good bipolar electrolytic capacitor and preamp with a reasonably high input resistance to make this work. Something like 50k and 100uF should work ok.There is a problem however if the DC offset is changing, because then it's not really DC is it. So it can get through the HPF if its transition frequency is set too low. So you might need to compromise, set the transition frequency a bit higher than the above example and accept a little bit more phase shift.
  • #1
joe_lou
6
0
Hi,

I have an interesting problem: most people use accelerometers to sense orientation and thus measure the DC output value.

What I'm trying to do is sense higher frequency vibrations (3-10 Hz). The accelerometer will also be slowly changing orientation so the DC offset will be changing with time.

Right now I'm using a digital high-pass filter on the signal and while it works it introduces some unavoidable phase shift. See:
http://tinyurl.com/3zpgez9


Just want to check with any mechatronics gurus out there to see if there are any better ways to eliminate or subtract the DC offset from my sensor. Thanks so much!
 
Engineering news on Phys.org
  • #2
Getting rid of DC response from sensor

Hi,

I'm trying to sense higher frequency vibrations (3-10 Hz) for a project (just the amplitude). I decided to use an accelerometer that will be slowly changing orientation so the DC offset will be changing with time. I want to get rid of this offset as it will mess with my control system.

Right now I'm using a digital high-pass filter on the signal and while it works it introduces some unavoidable phase shift. See for example:
http://tinyurl.com/3zpgez9


Just want to check to see if there are any better ways to eliminate or subtract the DC offset due to changes in orientation from my sensor. Thanks so much!
 
  • #3
How are you reading the accelerometer? What you need is a DC blocking capacitor (or "AC coupling" on your DAQ device).
 
  • #4
You may be able to use the digital equivalent of an ideal high pass filter with constant phase shift. Are you familiar with the discrete Fourier transform?
 
  • #5
MRFMengineer said:
How are you reading the accelerometer? What you need is a DC blocking capacitor (or "AC coupling" on your DAQ device).

I think a DC blocking capacitor would form a high pass RC filter (R being the DAC), with the phase shift that implies. For the latter option it might be worth finding more information on the DAC's AC coupling feature, if there is one.
 
  • #6
Thanks -- I'm reading the signal with an 8-bit microcontroller. I am vaguely familiar with DFT but it may be too much for the controller I'm using.

MisterX said:
You may be able to use the digital equivalent of an ideal high pass filter with constant phase shift. Are you familiar with the discrete Fourier transform?
 
  • #7
What microcontroller have you been using? How was the filtering described in the OP implemented?
 
  • #8
Is there an amplifier between the accelerometer and the microcontroller?
 
  • #9


Use DC offset cancellation. High pass always introduce phase shift.

Use a very low frequence multipole low pass filter and filter out all the signals ( 3-10Hz) you want, use a summing junction to subtract the DC out. Problem is then you have to wait for the DC to settle before sampling.
 
  • #10
How much phase shift can you tolerate?

If you make the transition frequency of your HPF sufficiently low then the phase shift at 3-10Hz will be small. You could even use a simple C-R high pass filter to achieve this.

For example a C-R HPF at 0.03 Hz will introduce only about 1/2 a degree phase shift at your signal frequency. You'll need a good bipolar electrolytic capacitor and preamp with a reasonably high input resistance to make this work. Something like 50k and 100uF should work ok.

There is a problem however if the DC offset is changing, because then it's not really DC is it. So it can get through the HPF if its transition frequency is set too low. So you might need to compromise, set the transition frequency a bit higher than the above example and accept a little bit more phase shift.

It would help if you could tell us what sort of drift rate you expect on the DC offset and what amount of phase shift you can tolerate.
 
  • #11
I'm using an AVR (atmega8a) and I'm currently digitally implementing a high-pass filter in my code.

I've been tweaking the parameters on that filter...as someone mentioned I can program a very slow cut-off frequency but that introduces phase lag. If the cut-off frequency is higher, the accuracy is better (no phase lag) but changes in orientation of the accelerometer pass through the filter.

It is a trade-off and is a bit annoying to tune...just wanted to see if I'm stuck with using this approach.

I'm new to AC coupling -- what happens if there is drift in the DC (accelerometer changing orientation)? Does that pass through? What frequencies are cut off?

MisterX said:
What microcontroller have you been using? How was the filtering described in the OP implemented?
 
Last edited:
  • #12
This is the exact trade-off I'm experiencing. I'm digitally implementing the filter and am just manually tuning until I get the behavior that is "acceptable".

I'm really wondering if I can get it better though...

uart said:
How much phase shift can you tolerate?

If you make the transition frequency of your HPF sufficiently low then the phase shift at 3-10Hz will be small. You could even use a simple C-R high pass filter to achieve this.

For example a C-R HPF at 0.03 Hz will introduce only about 1/2 a degree phase shift at your signal frequency. You'll need a good bipolar electrolytic capacitor and preamp with a reasonably high input resistance to make this work. Something like 50k and 100uF should work ok.

There is a problem however if the DC offset is changing, because then it's not really DC is it. So it can get through the HPF if its transition frequency is set too low. So you might need to compromise, set the transition frequency a bit higher than the above example and accept a little bit more phase shift.

It would help if you could tell us what sort of drift rate you expect on the DC offset and what amount of phase shift you can tolerate.
 
  • #13
no, the signals are currently read directly by the microcontroller

MRFMengineer said:
Is there an amplifier between the accelerometer and the microcontroller?
 
  • #14
Hi people,

I have accelerometer readings from a 3 axis accelerometer and need some help coding a few things. I am using MATLAB for the coding bit. It is worn by someone kayaking on one of the hands. and when the paddle hits the water there is a jerk produced and I have to charaterise that jerk produced . I am using a Fourier trasnform and a low pass filter and then transferring it back to the time domain.
 

Related to Eliminating DC offset from accelerometer

1. What is DC offset in an accelerometer?

DC offset in an accelerometer is a constant voltage or bias that is present in the accelerometer's output signal. This bias can result in inaccurate acceleration measurements and can be caused by various factors such as temperature changes or manufacturing defects.

2. Why is it important to eliminate DC offset from accelerometer data?

Eliminating DC offset is important because it can affect the accuracy and reliability of acceleration measurements. This is especially crucial in scientific research or engineering applications where precise measurements are necessary.

3. How can DC offset be removed from accelerometer data?

DC offset can be removed from accelerometer data through various techniques such as using high-pass filters, performing calibration, or using specialized software. These methods essentially subtract the offset from the signal to obtain a more accurate measurement of acceleration.

4. Are there any potential drawbacks to eliminating DC offset?

Yes, there can be potential drawbacks to eliminating DC offset from accelerometer data. For example, if the offset is too large, removing it may result in a loss of some useful data. It is also important to carefully select the method used for eliminating DC offset to avoid introducing any additional errors or artifacts in the data.

5. Can DC offset be completely eliminated from accelerometer data?

While it is possible to reduce DC offset to a very small level, it is not always possible to completely eliminate it. This is because the offset can be influenced by external factors such as temperature changes, which may be difficult to control. However, by using appropriate techniques and equipment, the offset can be minimized to a level that has a negligible effect on the accuracy of the accelerometer data.

Similar threads

Replies
24
Views
3K
  • Electrical Engineering
Replies
9
Views
2K
  • Electrical Engineering
Replies
1
Views
1K
  • Electrical Engineering
Replies
12
Views
2K
Replies
7
Views
21K
Replies
17
Views
25K
  • Electrical Engineering
Replies
7
Views
15K
  • Electrical Engineering
Replies
2
Views
5K
  • General Engineering
Replies
9
Views
8K
  • Electrical Engineering
Replies
6
Views
2K
Back
Top