How can I determine linear motion in 3D using a 3-axis accelerometer?

  • Context: Undergrad 
  • Thread starter Thread starter mark2468
  • Start date Start date
  • Tags Tags
    Accelerometer Direction
Click For Summary

Discussion Overview

The discussion revolves around determining linear motion in three-dimensional space using a 3-axis accelerometer. Participants explore the challenges of interpreting acceleration data, particularly when the device is tilted or moving at an angle, and seek methods to accurately capture linear motion in relation to the device's orientation.

Discussion Character

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

Main Points Raised

  • Mark expresses difficulty in determining the direction of acceleration when the device is tilted, despite knowing the total acceleration formula.
  • One participant asserts that an accelerometer cannot determine motion but only measures acceleration relative to its orientation, highlighting the need for orientation data to interpret world coordinates.
  • Another suggests representing linear motion as a vector and mentions the possibility of converting to spherical coordinates for angle representation.
  • Mark clarifies that he knows the orientation relative to the world but struggles with capturing linear acceleration when the device moves at an angle.
  • A participant questions whether Mark is asking how to transform acceleration vectors from the accelerometer's coordinate system to the ground's coordinate system.
  • Another participant proposes using quaternion multiplication to perform a rotation on the acceleration vector based on the accelerometer's orientation.
  • Mark reiterates his challenge in capturing linear acceleration in the z direction when the device is moved directly up, noting that all three axes change.
  • A later reply provides a mathematical approach to calculate the components of acceleration based on the device's orientation, emphasizing the importance of calibration.

Areas of Agreement / Disagreement

Participants do not reach a consensus on a definitive method for determining linear motion in 3D using a 3-axis accelerometer. Multiple competing views and approaches are presented, with ongoing uncertainty regarding the best solution.

Contextual Notes

Participants discuss the limitations of accelerometers in determining motion without additional orientation data. There are unresolved mathematical steps and dependencies on the definitions of coordinate transformations and calibration methods.

mark2468
Messages
12
Reaction score
0
Hi.

I have a problem using 3-axis accelerometer. I understand that the total acceleration is the square root of (x^2 + y^2 + z^2) but I cannot determine the direction of the acceleration.

Say the device is at 45 degrees and is moved straight up, how can this vertical motion be detected.
I can determine the angle/tilt of the device using trigonometry but cannot determine the linear motion in 3d. How can this be achieved, or is there any basic formula available.

Thanks,

Mark.
 
Physics news on Phys.org
Accelerometer cannot determine motion at all, and will only measure acceleration relative to its own orientation. It cannot, for example, tell you the difference between being horizontal and accelerating horizontally, or being tilted and accelerating straight up. Both will give you the same acceleration in X, Y, and Z directions.

If you need to know acceleration in the world-coordinates, you need to know orientation relative to world.
 
You'd probably be best off leaving the linear motion as a vector, but if you want angles, you could just convert to http://en.wikipedia.org/wiki/Spherical_coordinates"
 
Last edited by a moderator:
Thanks for the reply's.

I do know the orientation relative to world, the problem is linear acceleration. Its easy get the acceleration in one direction if the other two don't move but what if it moves up at an angle or starts at an angle and moves straight up or straight across linearly.

"You'd probably be best off leaving the linear motion as a vector"

I am unable to determine the linear motion, how is this achieved??

Thanks again,

Mark.
 
If you know orientation, what's your problem? Are you simply asking how to transform a vector from one coordinate system to another? That is, take the x, y, z relative to accelerometer and transform to x, y, z relative to ground?
 
Well if you represent the accelerometer's orientation as a unit vector, you can just perform a rotation on the acceleration vector opposite the rotation of the orientation vector. It winds up being easiest to do as quaternion multiplication
 
The problem is that I know the angle relative to ground (45 degrees in this case) but when the device is moved directly up I am unable so capture this as linear acceleration in the z direction because all 3 axis change.

This may seem trivial for some people but i am new to this.

Mark.
 
Lets say the 45° is rotation of Z axis towards X axis. Then:

a_x = \frac{a'_x+a'_z}{\sqrt{2}}

a_y = a'_y

a_z = \frac{a'_z-a'_x}{\sqrt{2}}

Where a' are the accelerations reported by accelerometer. Make sure to calibrate your axis appropriately, you should be measuring 9.8m/s² in negative z when the thing isn't accelerating.
 

Similar threads

  • · Replies 47 ·
2
Replies
47
Views
5K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
11
Views
24K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 4 ·
Replies
4
Views
9K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 5 ·
Replies
5
Views
24K