Category Archives: dead reckoning

Accelerometer calibration testing

Just fixed some bugs inĀ the sensor simulation and first thing I did was to test the accelerometer calibration code.

I configured some noise in the sensor – 0.1g, a big bias (2.5, 1, -0.3) and some scale (0.9, 1.1, 1.04) and ran the 6 step Gauss-Newton calibration.

sim_sensors

 

To my surprise the algorithm converged to almost the exact sim input I configured:

gs_calibration

The scale found is actually 1/sim scale which is ok.

The error is ~0.01 for the bias and ~0.005 for the scale.

 

I must say I’m impressed. One less thing to worry about.

Next on the list is calibratingĀ at 2 temperatures to be able to compensate temp drift.

 

 

Advertisements

Drift

I managed to get the mpu6000 fifo done and I now have pretty good gyro readings. It seems like I was getting 20-30 duplicate samples per second.

Here’s how the Ground Station sensor page looks like:

gs-sensors

The bottom 3 sensors also have an average graphed (the blue line).

 

With the gyro fixed, I tested the dead reckoning and god pretty bad results.

ahrs

Top graph is linear acceleration, middle one is velocity and bottom one position. They are reset every 10 seconds. So the bottom graph shows 2-3m of drift when the quad is perfectly still.

This indicated a mismatch between the quad rotation I’m calculating and the real rotation. So the gravity cancellation doesn’t work correctly.

 

This needs more work.