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

Comments & issues
itsalltoomuch
Phidgetsian
Posts: 6
Joined: Tue Dec 20, 2016 10:37 am
Contact:

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

Postby itsalltoomuch » Mon Apr 10, 2017 8:49 pm

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

User avatar
mparadis
Site Admin
Posts: 705
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

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

Postby mparadis » Tue Apr 11, 2017 8:48 am

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?

itsalltoomuch
Phidgetsian
Posts: 6
Joined: Tue Dec 20, 2016 10:37 am
Contact:

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

Postby itsalltoomuch » Tue Apr 11, 2017 5:31 pm

Hi,
I'm wanting to to calibrate out this small amount of tilt.

User avatar
mparadis
Site Admin
Posts: 705
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

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

Postby mparadis » Thu Apr 13, 2017 9:06 am

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.

heng
Fresh meat
Posts: 1
Joined: Thu May 11, 2017 7:53 am
Contact:

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

Postby heng » Thu May 11, 2017 8:01 am



Return to “General”

Who is online

Users browsing this forum: wuhuilin11 and 2 guests