Page 1 of 1

How to adjust x,y,z acceleration when device not quite level

Posted: Mon Apr 10, 2017 8:49 pm
by itsalltoomuch
Hi,
We have multiple 1044 3/3/3 devices that are glued to floors as level on each axis as possible.
At idle a reasonably level device will look like x: -0.0038 y: 0.00455 z: 0.00122 (reduced by 1)

When the floor is shaken, the readings are displayed in a typical acceleration by time graph and for each axis the base of each series is always offset from zero.

Is there a recommended approach to adjusting the values read to reduce the typical offset from initial zero?

We have experimented with recording 1000 readings and calculating the maximum for x,y,z and then using this value to adjust actual values but this seems a bit clumbsy. Although the devices are running all the time, readings are only taken for a brief period once the acceleration goes above a threshold value.

TIA

Re: How to adjust x,y,z acceleration when device not quite l

Posted: Tue Apr 11, 2017 8:48 am
by mparadis
I'm not clear on what you're looking for- are you hoping to calibrate out this small amount of tilt, or are you finding that the sensors don't return to the same zero position after being moved?

Re: How to adjust x,y,z acceleration when device not quite l

Posted: Tue Apr 11, 2017 5:31 pm
by itsalltoomuch
Hi,
I'm wanting to to calibrate out this small amount of tilt.

Re: How to adjust x,y,z acceleration when device not quite l

Posted: Thu Apr 13, 2017 9:06 am
by mparadis
It's been a while since I've done this kind of math, but I believe you have to use some linear algebra:

1. When the accelerometer is at rest, measure the acceleration in all three axes and convert it into a vector.

2. Create a rotation matrix that rotates the vector into your desired vector (in this case, [0 0 1])

3. For all future data, convert into a vector and use the rotation matrix to determine the actual levelled acceleration.

Re: How to adjust x,y,z acceleration when device not quite l

Posted: Thu May 11, 2017 8:01 am
by heng