I am in the process of calibrating a triaxial Accelerometer. I have placed the Accel into 12 positions, each position should give the following 'ideal' G Values (X,Y,Z):
$0.7071000, 0.0000000, 0.7071000$
$0.0000000, 0.0000000, 1.0000000$
$0.0000000, 0.7071000, 0.7071000$
$0.0000000, 1.0000000, 0.0000000$
$-0.7071000, 0.0000000, -0.7071000$
$0.0000000, 0.0000000, -1.0000000$
$0.0000000, -1.0000000, 0.0000000$
$-1.0000000, 0.0000000, 0.0000000$
$0.0000000, -0.7071000, -0.7071000$
$0.7071000, 0.7071000, 0.0000000$
$1.0000000, 0.0000000, 0.0000000$
$-0.7071000, -0.7071000, 0.0000000$
Obviously due to scaling errors, bias and axis misalignment I will not get 'ideal' values. The 'unknown' scaling, bias and misalignment terms are $$ sx, sy, sz, bx, by, bz, mxy, mxz, myx, myz, mzx, mzy$$ I am implementing a standard linear sensor model which I aim to solve using two methods (for comparison), firstly, within Mathcad using the 'Find' function and secondly using a Newton-Raphson method of iteration.
The Linear Sensor Model I am using is as follows:
$$ A = \left(\matrix{ x \cr y \cr z }\right)_{I} = \left(\matrix{ 1 & M_{xy} & M_{xz} \cr M_{yx} & 1 & M_{yz} \cr M_{zx} & M_{zy} & 1 }\right) * \left(\matrix{ 1/S_{x} & 0 & 0 \cr 0 & 1/S_{y} & 0 \cr 0 & 0 & 1/S_{z} }\right) * \left(B_{d} + \left(\matrix{ B_{x} \cr B_{y} \cr B_{z}}\right) - \left(\matrix{ C_{x} \cr C_{y} \cr C_{z}}\right) \right) $$
Which expanded gives:
$$ A_{x} = \frac{B_{d} + B_{x} - C_{x}}{S_{x}} + \frac{M_{xy} * \left(B_{d} + B_{y} - C_{y}\right)}{S_{y}} + \frac{M_{xz} * \left(B_{d} + B_{z} - C_{z}\right)}{S_{z}} $$ $$ A_{y} = \frac{M_{yx}*\left(B_{d} + B_{x} - C_{x}\right)}{S_{x}} + \frac{B_{d} + B_{y} - C_{y}}{S_{y}} + \frac{M_{yz} * \left(B_{d} + B_{z} - C_{z}\right)}{S_{z}} $$ $$ A_{z} = \frac{M_{zx}*\left(B_{d} + B_{x} - C_{x}\right)}{S_{x}} + \frac{M_{zy} * \left(B_{d} + B_{y} - C_{y}\right)}{S_{y}} + \frac{B_{d} + B_{z} - C_{z}}{S_{z}} $$
Where $ A_{x} $ is the calculated Gx value and so on. $ B_{x} $ is the X axis bias error and so on, $ S_{x} $ is the X axis scaling error and so on, $ C_{x} $ is the X axis 'counts' output from the Accelerometer, the $ M_{xy} $, etc terms are the inter axis alignment errors (the accels are not aligned 'exactly' orthogonally, but they are within 0.1 degree).
Now, what I have done is to solve the following system of equations (12 equations, one for each position):
$$ \sqrt{A_{x_i}^2+A_{y_i}^2+A_{z_i}^2} - 1 = 0 $$
Where i denotes the position number from 1 to 12.
Note: The 'ideal' G Total across all axis is 1, therefore, using the 'counts' from the accels, each position is fed into the system and unknowns are generated to satisfy the system.
A solution is generated which gives me the accuracy I need, however...
What I really need is to solve for each axis in turn - the solution generated for the above system generates values for the system but not the individual components. For example, a G Total of 1 can be generated but the values for say the X axis on it's own is incorrect (which I would expect).
Therefore, in order to generate a solution for each axis I simply performed the method using 12 equations per axis. So for example, for the X axis I tried to solve the following system of equations:
$$ A_{x_i} = p_{i} $$
Where $ p_{i} $ is the Gx 'ideal' value at position $ i $ and $ A_{x_i} $ is the calculated X axis value at position i.
My issue is that I cannot solve for each individual axis. The Find function does not work, using the Minerr function will generate values but the Error co-efficient is 3.4 which is huge!
I can't help but think that the initial Linear Model is incorrect and I need some sort of 'Noise' term.
Is there anyone out there who has either performed a similar process or can point me in the right direction with regards to solving each axis. Or indeed, am I doing something wrong with the above?
Thankyou, Mike.