File Exchange

image thumbnail

MEMS Accelerometer Calibration using Gauss Newton Method

version 1.1.0.0 (481 KB) by Balaji Kumar
Computes the Scale factor Matrix and the bias vector of a MEMS accelerometer

11 Downloads

Updated 07 Apr 2015

View License

All you have to do is to place the accelerometer in 9 different static positions and record the x, y & z values.
The procedure exploits the fact that, in static conditions, the modulus of the accelerometer output vector matches that of the gravity acceleration. The calibration model incorporates the bias and scale factor for each axis and the cross-axis symmetrical
factors. The parameters are computed through Gauss-Newton nonlinear optimization.

The mathematical model used is A = M(V - B)
where M and B are scale factor matrix and bias vector respectively.
M = [ Mxx Mxy Mxz; Myx Myy Myz; Mzx Mzy Mzz ];
where Mxy = Myx; Myz = Mzy; Mxz = Mzx;
B = [ Bx; By; Bz ];
The diagonal elements of M represent the scale factors along the three axes, whereas the other elements of M are called cross-axis
factors. These terms allow describing both the axes’ misalignment and the crosstalk effect between different channels caused
by the sensor electronics. In an ideal world, M = 1; B = 0

The following files are provided in the package.

1. CalibAccel.m --> M-file to calculate the accelerometer sensor bias and scale factor.

2. data.txt --> Real test data

3. NunchuckDat.xls --> Data from a WII Nunchuck accelerometer. Shows you how to convert from bits to G values.

Please check my other related files here: http://www.mathworks.com/matlabcentral/fileexchange/42666-quadrotor-dynamics-modelling-using-simulink

My LinkedIn page: https://ca.linkedin.com/pub/dr-balaji-shankar-kumar-p-eng/13/7b7/350

Comments and Ratings (8)

hongmao tu

V V

Primoz

Hi, i can't watch this file, any clue?

Primoz

I used the script provided but still have bias (+-0.02g) on the axes perpendicular to gravity. Why?

Full question is posted on Robotics@StackExchange : http://robotics.stackexchange.com/questions/646/mems-accelerometer-calibration#comment808_648

mory

thanks

Updates

1.1.0.0

Added link to other related files.

MATLAB Release Compatibility
Created with R14
Compatible with any release
Platform Compatibility
Windows macOS Linux