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
Balaji Kumar (2021). 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 .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!