Wednesday, August 1, 2012

Houston, we have a problem (IMU weirdness)

Notes from yesterday:

While looking into the direct use of the gyros for the 'D' term (as opposed to numerical differentiation), I noticed that the gyro output looked pretty crappy. Here's a plot of a ten-minute sample, vertical axis represents degress/s:



I'd expect the gyros to be a little noisy, but that's atrocious!!! There's also a weird bias toward negative values, and this isn't what gyro bias looks like. I took a look at the output using the factory software run from my laptop with the factory cable, and indeed, there's something amiss. The values obtained from the factory software are an order of magnitude less noisy. Here are the results of comparing 10-minute runs obtained via the PC (with factory cable) vs. from the Quad, with the Quad sitting on my bench, motionless:


Factory
Quad
Roll Mean:
-0.78432
-0.63128
Roll STD:
0.14276
0.55705
Roll Max:
-0.4
1.04
Roll Min:
-1.4
-2.6
Roll Rate Mean:
0.000353
-0.00224
Roll Rate STD:
0.331451
1.89036
Roll Rate Max:
2.635684
4.458878
Roll Rate Min:
-2.92217
-8.58552


On the roll axis, the standard deviation is 5x higher on the Quad. On the roll rate axis, the mean value is a nearly 10x higher, and the standard deviation is 6x higher. 
I carefully reviewed the IMU reading code and couldn't find anything, so I started thinking that there's some corruption on the serial line to the IMU, so I inserted some checksum code. Surprisingly, most of the time, there were no checksum errors (unless I wiggled the wires!...that's certainly a problem, but probably not the problem). The only thing I can think of is noise on the power lines to the IMU, since that's the only fundamental difference that i can think of. I'll spend some quality time with the o-scope.

No comments: