This weekend, I went through and re-evaluated the Kalman filters at flight velocity. As I suspected last weekend, the accelerometer noise became even greater, and was introducing noise into the filters output. I collected new samples with the copter actually airborne though safely tied down to our testing board, and tweaked the Kalman filters yet again. At this point, I don’t see how the filter is finding any correlation between the gyro and the accelerometer, which I suspect is causing some drift in the filters output. Its also easy to see from these graphs that the pitch accelerometer suffers more noise than roll, and the noise is offset towards positive pitch angles. Will and I had noted earlier that the accelerometer is a lot more loose on the pitch axis due to that axis being parallel with the female headers holding it to the board, and that in particular it is most free in the positive pitch direction. Hopefully we can fix this next weekend by screwing down the 5 DOF board.
After that I calibrated the PID gains again, testing them again at higher velocities and going for a tighter more responsive setup. In doing this, I noticed that the pitch access is not very balanced, something we probably need to correct. For now, I gave it a larger I term, though that seemed to make it less stable than the more balanced roll axis.
I also worked on improving the magnetometer, and manage to perform tilt compensation from the roll and pitch kalman filters, instead of form the incredibly noisy raw accelerometer signal. The raw magnetometer output is now quite clean, but limited to the micromag3′s slow sampling rate of about 10hz (though I could speed it up but lose some precision). However, when I attempted to Kalman the micromag with the yaw gyro while hovering on the test scan, a new problem reared its ugly head:
Unfortunately the motors seem to be causing gyro jitter in our LISY300AL similar to that which had been reported in other copters (though an entirely manageable amount for the Kalman filter), but more dramatically, non-linearity in the micromag. During this test the board was limited to a total yaw of less than 45 degrees and remained mostly at the same heading, yet the micromag steadily climbs as the motors velocity increase, and even shows a 180 degree peak in the middle, which the gyro indicated was no more than maybe 20-30 degrees. This is kind of a “duh” moment, but I had hoped that the magnetometer wouldn’t be terribly affected in the center of the motors, but apparently we will need to perform hard iron calibration. Most annoyingly however, calibrating it to work with the motors on will cause it to work incorrectly with the motors off. A possibly better solution would be to relate the magnetic drift with the velocity of the motors.
For now, I disabled yaw control and attempted to get it to lift off while attached to our test board. Unfortunately, it never appeared to balance well on the pitch axis, but roll looked somewhat stable, though not nearly as stable as in the single axis test. It was hard to really see its behaviour though, because the test board gives it maybe 5 inches of room in any direction. On Jeff’s (online) urgings, I finally decided to give it a chance outdoors. After a few runs, this video is the closest it got to actual flight:
I actually got it to hover when I put the full stick fighting the pitch motion it seemed unable to correct for on its own, but this stability was short lived. And yaw control is clearly needed as well. Still, its inching closer to a successful flight! Fixing the accelerometer mount and performing hard iron calibration should hopefully get us there, possibly even next weekend! (though I realize I’ve been saying that for nearly a month…)



0 Responses to “Weed whacking”