Integrating Acceleration for Distance

Click For Summary

Discussion Overview

The discussion revolves around the integration of acceleration data from an accelerometer to estimate distance traveled. Participants explore the challenges of accurately accounting for gravitational effects and the implications of integrating acceleration in three dimensions, particularly when the device is free to rotate.

Discussion Character

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

Main Points Raised

  • One participant mentions implementing an algorithm to integrate acceleration for estimating wear rates, noting that the accelerometer outputs 9.81 m/s² on the z-axis due to gravity.
  • Another participant argues that simply integrating the magnitude of net acceleration will not yield accurate distance traveled, using the example of a centrifuge to illustrate that high acceleration can correspond to negligible net distance.
  • There is a suggestion to subtract 9.81 from the z acceleration before integration, with a caution that if the z-axis is not perfectly vertical, this value should be converted to a vector form for accurate subtraction.
  • A participant expresses confusion about whether summing accelerations before or after integration would yield the same result, highlighting the complexity of treating x, y, and z independently due to potential rotations of the device.
  • Another participant asserts that subtracting 9.81 as a scalar ignores the direction of acceleration, emphasizing the need for vector subtraction to accurately integrate the residual vector acceleration.
  • Concerns are raised about the inability to compensate for the device's rotation unless angular accelerations are also measured and integrated.
  • There is a discussion about the implications of summing accelerations and then integrating versus integrating separately, with examples illustrating how incorrect methods could lead to vastly different results.

Areas of Agreement / Disagreement

Participants express differing views on the methodology for integrating acceleration data, particularly regarding the treatment of gravitational effects and the implications of vector versus scalar integration. No consensus is reached on the best approach to accurately estimate distance traveled.

Contextual Notes

Participants highlight limitations related to the orientation of the device and the challenges of accurately measuring position in the Earth's frame without knowing the device's orientation. There are unresolved questions about the mathematical steps involved in the integration process.

pff
Messages
17
Reaction score
0
I'm trying to integrate acceleration from an acceleraometer to find a distance travelled.

I have heard all the stories about this not being accurate but i didn't come up with the method I'm just trying to implement an algorithm to do it. I'ts justan estimate for wear rates, not positioning.

I'm working with 3dof, so i have x y and z acceleration.
at the moment I'm integrating each twice separately to get a distance, then taking the sqrt of the sum of the squares to get the eulicidean distance travelled.

The main issue I'm having that nobody considered is that the accelerometer gives 9.81 on the z thanks to gravity, and the measurements go out the window.

Is it possible to do the eulicidean distance of the acceleration, subtract the 9.81, then do the integration to get the distance travelled?

Is this valid? Would it work?
 
Physics news on Phys.org
Is it possible to do the eulicidean distance of the acceleration, subtract the 9.81, then do the integration to get the distance travelled?

Is this valid? Would it work?

If what you have is the magnitude of the net acceleration then integrating it will not give you a distance travelled. Think about a centrifuge -- high acceleration but net distance traveled is negligible.

What you need to do is to subtract the 9.81 from the "z" coordinate of the acceleration and then integrate as before. If your z axis is not perfectly vertical then you would want to convert that 9.81 to an (x,y,z) acceleration value and subtract that from x, y and z.
 
Thanks for the reply, but the idea of the centrefuge has confused me even more.
Wouldn't we get the same result by summing before integrating rather than after? (comparing the two methods i outlined in the first post)

Treating x y and z independantly gives me a major headache in that I cannot say that z will stay z, the device I'm measuring is free to rotate in all axes, and so I'm lost as how to compensate.
 
It sounds like your methodology is perfectly correct. Just subtract 9.81 from the z acceleration, and integrate. There is no reason why this all shouldn't be accurate. In fact, integrating tends to reduce the inaccuracy. Of course, don't use Forward Euler. Try to use higher order integration formulas. For example, use the acceleration at time t to integrate the velocity between t -(Δt)/2 to t + (Δt)/2. Then use the velocity at t + (Δt)/2 to integrate the distance between t and t + Δt.
 
Last edited:
pff said:
Thanks for the reply, but the idea of the centrefuge has confused me even more.
Wouldn't we get the same result by summing before integrating rather than after? (comparing the two methods i outlined in the first post)

You spoke of taking the euclidean distance and subtracting 9.81 from that. That's not a vector subtraction. That's a scalar subtraction. That means you would not be integrating a vector. You would be integrating a scalar, completely ignoring the direction of the acceleration.

The point I was trying to make is that you need to subtract the 9.81 as a vector, leaving a residual vector acceleration and integrate that.

The centrifuge example would have a high scalar acceleration. Integrate that and you get a huge number. But integrate the vector and the directions would tend to cancel out over the long run giving a much lower number.

Did I make sense that time or am I still losing you?
 
pff said:
the device I'm measuring is free to rotate in all axes, and so I'm lost as how to compensate.
You can't, unless it also measures angular accelerations, which you have to integrate too, to track orientation.
 
I understand now that i would be ignoring the direction of the acceleration by subtracting after taking the sum.

If i could subtract the 9.81 from the z, could i then go ahead with summing the accelerations and then integrating? Is this be the same as integrating separately?
 
pff said:
If i could subtract the 9.81 from the z,
You have to subtract the 9.81 from the z in Earth's frame. But the device gives you xyz in the device frame. If you don't know the orientation of the device, you have no chance to get the position in the Earth's frame.
 
pff said:
could i then go ahead with summing the accelerations and then integrating? Is this be the same as integrating separately?

No. You still have the same problem. (Which is in addition to the problem that A.T. is pointing out).

Suppose you walk around and around and around the room with a 0.01 g acceleration toward the center of the room. And suppose that you do this for ten minutes.

If you integrate the vector and then sum you'll wind up with the correct answer -- a small net distance moved.

If you sum and then integrate the scalar you'll wind up with the wrong answer. 0.01 g for 600 seconds is about 17 kilometers.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
7K
  • · Replies 41 ·
2
Replies
41
Views
4K
  • · Replies 18 ·
Replies
18
Views
5K
  • · Replies 7 ·
Replies
7
Views
5K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 8 ·
Replies
8
Views
6K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 4 ·
Replies
4
Views
9K
  • · Replies 6 ·
Replies
6
Views
6K
  • · Replies 4 ·
Replies
4
Views
1K