We did buy FRDM_64F freedom board with 3 axis gyro, 3 axis accelerometer, 3 axis magnetometer. but USB not being detected on this board due to some problem as per my colleague and i cannot use it right now.
So i ported this code into DSP controller TMS320F28335. When i am doing precision accelerometer calibration as per AN5286 using 4 para, 7 para calibration, i feel i got the correct calibration gain parameters since, inverse Gain matrix diagonal values are nearer to 1 (but x,y,z offset para are very less 0.000xx).
Also i test with board in each axis away and align with gravity vector ... i am getting sensor readings (after apply calibration paramters,)are very accurate and equal to 1g w.r.t axis orientation... But when i do 10 para calib (measurement more than 9) then diagonal Gain paras are coming at 2/3/4 instead of nearer to 1. i tried multiple times but Gain paras are coming at 2/3/4 at random calibration instants.. i am reading sensor at every 2.5ms and averaging them. Modulus of un-calibrated reading are also nearer to 1g(we can see readings below), so i think no problem with sensor readings.
the changes i have done:
i am using XYZ data address at 0x33 (at 0x39 accelerometer reading comes) instead of 0x01 address so that magnetometer + accelerometer reading can be taken without changing the address inbetween (i2c address increment automatically.) and also i will get the directly right justified 16 bit data (no need to convert left shifted 16 bit data to 14 bit data). I changed setting 4g to 8g with sensitivity 1024. of course i tried with 4g setting (by correcting sensitivity to 2048(existing 8192) as i am using right justified accelerometer data) also but same problem with 10 para calibration.. diagonal gain parameters are no where nearer to 1.
I'm printing the below raw 12 averaged reading of accelerometer which i have used for calibration.. .
meas1 = (-0.0134082027, -0.0690478459, 0.966635764)
meas2 = (0.0177197251, 0.0200390629, -1.0054394)
meas3 = (-0.0132861324, -1.0000824213, -0.0650292933)
meas4 = (0.0158447269, 0.99924314, 0.028500976)
meas5 = (1.02742672, -0.0213916004, -0.0155908205)
meas6 = (-1.01027834, 0.00377929676, -0.0351611301)
meas7 = (-0.0197656248, -0.546865225, 0.811196268)
meas8 = (-0.0207958985, -0.745546877, 0.642041028)
meas9 = (-0.0193212889, -0.893725574, 0.433476567)
meas10 = (-0.00514160143, 0.446332991, 0.862988293)
meas11 = (-0.000698242162, 0.661806643, 0.719794929)
meas12 = (0.00429687509, 0.835830092, 0.523242176)
these readings are taken with 12 different orientation including standard each axis way and align gravity and other 6 reading with board +- 30, +- 45, +60 orientation. i have check the same algorithm in GNU Octave platform(similar to Matlab) and given above reading as input, then it showing an error that Inverse matrix elements are imaginary number where as offset parameters almost same as that of DSP software output.
So i really stuck with this problem...
So please anyone suggest me where i have gone wrong...
Also is it possible to check 10 parameters calib with above readings using FRDM_64F Freedom board or any uC board, to cross check the same problem is being repeated with above reading or not?