Tau Labs Altitude control loop architecture and INS tuning

So for the last week or two I have been looking a bit at the performance of the Tau Labs altitude control and INS filter we have and the altitude control loop.

 

One issue I was suffering from is that the velocity estimate would be biased because of variations in the accelerometer bias. I switched to using a 16 state version of the INS written by Dale Schinstock that included an estimate of the bias terms for hte accels which improved things somewhat.

I'm still not happy with the performance It is a dual loop control - the position error sets a velocity desired which then runs through a PI controller. 

So the first question I had was whether there was a problem in the estimation or in the control system. I grabbed some logs with my Freedom board and then also did some video processing. I swept a number of settings for hte baro variance and definitely if I assign to much noise to the barometer, then it doesn't track well enough. However, with the typical settings I use then it does a pretty good job of estimating the altitude. I made a video showing it with two values of the variance:

 

The plot on the right in some segments shows the segmented quad location from the video stream (i.e. ground truth)

 

One thing that struck me. When I tune it up to get a good estimate of position, that increases the noise in the velocity estimate. I feel like this ends up limiting my tuning parameters. I've also implemented the ardupilot complementary filter,  (keep meaning to grab a video log of that too) and cannot tune it to the point I'm happy.

 

Anyway, the solution I'm considering is to apply some low pass filtering to the velocity estimate in the controller. Essentially the velocity control component is like a derivative of the position estimate, and this seems like a reasonable / sensible technique. However, I'd love to hear any comments from others here.

 

Discussion at new Tau Labs forum: http://forum.taulabs.org/viewtopic.php?f=17&t=27&start=20

 

Views: 2394

Comment by James Cotton on March 15, 2014 at 2:59pm

Ok, so integrating raw z accel (no compensation for tilt, but it was fairly level) looks quite good. Also notable, it is not underestimating the velocity so something else is going on.

So for now the latency from the filtering does seem to be what is probably limiting my tuning, more than control structure.

Comment by James Cotton on March 15, 2014 at 3:10pm

Yeah, found something suboptimal about INS updates. Will fix and post more tests. I'll also make a similar plot/video for the ardupilot altitude complementary filter if you guys would find that useful.

Comment by James Cotton on March 15, 2014 at 3:29pm

A lot of improvements are in next, but nothing in the last week. All the stuff with the 16 state INS and these videos I am still testing.

Comment by James Cotton on March 19, 2014 at 9:48am

Tangentially related, I wrote up how I'm generating the video overlays etc in case anyone is interested http://buildandcrash.blogspot.com/2014/03/logging-and-python-parsin... . Most of it would probably generalize across flight controllers if you can get the data into python.

Comment by James Cotton on March 23, 2014 at 12:13pm

So playing around I'm finding that some amount of care towards vibration is definitely key. My crappy HT-FPV frame was definitely a part of the problem. Some more work on the filter and now I'm pretty happy with the result:

 

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

Groups

Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service