Calculate g in Any Direction from Tri-Axis Accelerometer

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

Discussion Overview

The discussion revolves around calculating the acceleration in a specific direction using data from a Tri-Axis accelerometer, particularly when the device's orientation is initially unknown. Participants explore mathematical approaches to derive a formula that can provide the acceleration in any direction based on initial and calibration values.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Exploratory

Main Points Raised

  • IMK seeks a formula to calculate the acceleration in any direction based on initial readings and calibration values from a Tri-Axis accelerometer.
  • IMK provides initial values (ix, iy, iz) and calibration values (cx, cy, cz) for further analysis.
  • Integral questions the use of the term "g," suggesting it typically refers to gravitational acceleration, while IMK clarifies that "g" is used interchangeably with acceleration in this context.
  • Uart proposes a mathematical approach involving the projection of the difference between the accelerometer reading and the reference vector into the reference direction.
  • IMK acknowledges the proposed method but notes issues with noise in the calibration data and considers the need for additional calibration to address filtering of deceleration and turns.

Areas of Agreement / Disagreement

Participants express differing views on the terminology used for acceleration, with some confusion around the term "g." There is no consensus on a definitive formula, and the discussion remains exploratory with various proposed approaches.

Contextual Notes

IMK mentions challenges with noise in the calibration data, which may affect the accuracy of the proposed mathematical solutions. There is also an indication that the proposed method may need adjustments to account for deceleration and turns.

Who May Find This Useful

Individuals working with accelerometers, those interested in sensor data analysis, and participants in projects involving motion tracking or orientation determination may find this discussion relevant.

IMK
Messages
61
Reaction score
0
Hello,
Could someone help me with this maths problem please?
I am working on a little project involving a Tri-Axis accelerometer and I need to be able to calculate the g in a particular direction when the devices installed orientation is initially unknown.

Thus when I power the device on I have three force values let us call these the initial values. ix, iy, iz. (From these initial values we have a sense of orientation also a static total g of 1.0 = sqrt( ix2 iy2 iz2 ))

Now I accelerate the device (keeping the orientation) in a straight line so as to get a g of 1.1 (static 1g plus 0.1 acceleration) this gives me a new set of calibration g values that we can call cx, cy, cz.

What I need please is a formula for calculating the g in any direction from the calibration line/direction.

Say if I move the device forward in the same direction as the calibration direction at 0.1g then the formula/function returns 0.1, if I moved it backward the formula/function returns -0.1. and if I acceleration the device at 90 degrees to the calibration direction the formula/function returns zero.

I have tried a few ideas based on dot products but I have become stuck, any help would be much appreciated.
Added the static/initial values and a set of calibration values:

ix = 0.34
iy = -0.74
iz = -0.68

cx = 0.54
cy = -0.58
cz = -0.84

Many thanks in advance IMK
 
Last edited:
Mathematics news on Phys.org
I am confused by your use of the symbol g, generally this is used to represent the acceleration due to gravity. As far as your accelerometer is concerned, g would be a constant acceleration in the direction of the center of the earth. You seem to be using it as your system acceleration. Could you please clarify just what your g is?
 
Hello, Integral and many thanks for your reply. Well I guess to be correct I should uses acceleration rather then g. But as the specs on the devices always use g, then for this case I think the terms g and acceleration are interchangeable.

Anyway I am finding some of the math for project a little tricky at times so if you have some input it would be more than appreciated.

Many thanks again IMK
 
I'm pretty sure that what you're looking to find is the difference between the accelerometer reading ("a") and the reference vector ("c") projected into the reference direction.

That is,

[tex]\frac { ( \vec{a} - \vec{c} ) \cdot \vec{c} } { \parallel \vec{c} \parallel }[/tex]
 
uart said:
I'm pretty sure that what you're looking to find is the difference between the accelerometer reading ("a") and the reference vector ("c") projected into the reference direction.

That is,

[tex]\frac { ( \vec{a} - \vec{c} ) \cdot \vec{c} } { \parallel \vec{c} \parallel }[/tex]

Hello Uart, and many thanks for your reply.
I have not had chance to do a proper test yet as the current data set I have has poor/noise calibration data, this I will do tomorrow and let you know. However I think the initial results look very good, although I mist the fact that it also filters deaccelleration in the reference vector as well as the turns. This I guess I can get arround by adding a second set of calibration data or figure a way to find the inverse.
Again Many thanks IMK
 

Similar threads

Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 10 ·
Replies
10
Views
22K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 12 ·
Replies
12
Views
25K
  • · Replies 4 ·
Replies
4
Views
6K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 7 ·
Replies
7
Views
11K
  • · Replies 7 ·
Replies
7
Views
6K