File Exchange

## MEMS Accelerometer Calibration using Gauss Newton Method

version 1.1.0.0 (481 KB) by Balaji Kumar

### Balaji Kumar (view profile)

Computes the Scale factor Matrix and the bias vector of a MEMS accelerometer

Updated 07 Apr 2015

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.

### Cite As

Balaji Kumar (2020). MEMS Accelerometer Calibration using Gauss Newton Method (https://www.mathworks.com/matlabcentral/fileexchange/33252-mems-accelerometer-calibration-using-gauss-newton-method), MATLAB Central File Exchange. Retrieved .

mahmood hassan

hongmao tu

amruth annegowda

V V

Primoz

Issis Contreras

### Issis Contreras (view profile)

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

Primoz

### Primoz (view profile)

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