by Mitch » Tue Dec 08, 2009 5:25 pm
The tests were done using a test rig similiar to the gluonpilot board (still waiting for mine) - except the micro is a dspic30 with internal FRC and x16 pll. The gyros and accelerometers are MLX90609 and LIS3LV02DQ read via spi at about 400khz. I'm getting loop rates of about 100hz and wanted to experiment with the dynamic behavior of the kalman filter. I started by plotting raw data - very tedious. I wanted to display an axis (or two) in real time - similiar to the way Tom did in his blog page "Kalman demo application."
I found several utilities that were written to do this - however most were designed to emulate a glass cockpit display and had very high overhead in the graphics. One of the rare cases I needed to keep up with the pic on the pc - otherwise I have to reduce resolution, overflow the pc uart , or the graphics are too fuzzy to be of any value because they are not refreshing fast enough.
I don't have a magic formula for adjusting gains (by gains I include the measurement noise). So far it has been empirical trial and error using this graphic display. A valuable use of this display was to overlay lines to display the accelerometer only angle (assumed to be the best steady state value) , the kalman solution, and the difference between the two. Thus, at extremes, I could watch the filter converge to the steady state value when the sensors were rotated. I did initially discover several cases where the filter code diverged due to my failure to initialize a few values.
I still need to address the "over the top" issue where the angle changes from +180 degrees to -180 degrees I have a discontinuity which may or may not be a problem in application.
I also anticipate, in application, some significant vibration in the 30-200hz range due to prop or rotor (haven't decided which platform I'll use). I may vibrate the board a bit and see what I get.