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:

Roll Mean:
Roll STD:
Roll Max:
Roll Min:
Roll Rate Mean:
Roll Rate STD:
Roll Rate Max:
Roll Rate Min:

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: