Development discussion of TauLabs software such as flight controllers, sensors, radios and speed controllers.

Altitude hold refinement

User avatar
User

peabody124

Posts

686

Joined

Tue Feb 18, 2014 12:33 pm

Altitude hold refinement

by peabody124 » Fri Mar 07, 2014 1:50 pm

So we've had a fair bit of work on altitude hold in the last month or two:
- https://github.com/TauLabs/TauLabs/pull/1080 consolidated the code so that the navigation and simple altitude hold uses the same settings, meaning you only have to tune once.
- went to a simple nested PID controller like attitude control which is simpler to tune and was used by PH previously.
- introduced a complementary filter (based on ardupilot) for the baro that is used when not in INS mode that seems to perform quite well and doesn't require tuning like the old altitude hold EKF
- https://github.com/TauLabs/TauLabs/pull/1119 responds to a request from KipK to make it more responsive in altitude hold mode. this switches to a full state control system so your stick input directly alters the rate requested (similar to axis lock) and gets it a lot more responsive
- adds exponential (adjustable) to the throttle so you can have pretty good rates

I took this out on my mini quad ( http://buildandcrash.blogspot.com/2014/ ... p-pro.html ) and was quite pleased with the results. Flew in altitude hold mode for pretty much the entire flight and didn't have any issues. Controlling height this way is pretty intuitive, although bringing the throttle down very low still made me mentally nervous.



The only question I have with this new PR: do we want to enable the climb rate by default? It feels really natural so I'm pretty comfortable with the defaults. Alternatively if we set climbrate to 0 then it behaves like a strict altitude controller and the stick input does nothing.
User avatar
User

peabody124

Posts

686

Joined

Tue Feb 18, 2014 12:33 pm

Re: Altitude hold refinement

by peabody124 » Fri Mar 07, 2014 1:51 pm

Reserved for discussion of 16 state INS
User avatar
User

metRo_

Posts

146

Joined

Tue Mar 04, 2014 5:26 pm

Re: Altitude hold refinement

by metRo_ » Fri Mar 07, 2014 8:37 pm

to be honest i couldnt understand if the result was good or not by the video but will be able to test it next sunday :)
User avatar
User

peabody124

Posts

686

Joined

Tue Feb 18, 2014 12:33 pm

Re: Altitude hold refinement

by peabody124 » Fri Mar 07, 2014 9:05 pm

Yeah I should have flown some without input. I was pretty happy with how it flew.
User avatar
User

metRo_

Posts

146

Joined

Tue Mar 04, 2014 5:26 pm

Re: Altitude hold refinement

by metRo_ » Sat Mar 08, 2014 12:29 am

Can you just remember me that I need to enable to use altitude mode?
User avatar
User

Oso Grande

Posts

72

Joined

Wed Mar 05, 2014 2:52 pm

Location

Houston

Re: Altitude hold refinement

by Oso Grande » Sun Mar 09, 2014 5:21 am

Overall, I like it.

Just a quick video before it started raining to hard to continue. I have done no tuning for AH other than activate it. I take off in attitude and switch to AH while facing the truck prior to turning right.

https://vimeo.com/88549064

Getting used to where to hold the throttle was a challenge, it seemed 60% throttle held altitude and more and it rose, and less it fell. I agree with Peabody that it was mentally tough to move the throttle lower than 25% to get a faster drop. Reminder, even at 0% throttle there was still prop movement, so definitely glad it's not possible to arm in AH.

I noticed a slight dip in elevation even with the throttle holding at 60% when cruising more than about 20 feet. I'm betting this can be tuned out and is just an observation. It did seem comfortable with flying less than a foot of the ground. The top ups you see were me not trusting it and goosing the throttle periodically.

More testing to be done when the rain stops for sure, but so far I like what I see.
User avatar
User

peabody124

Posts

686

Joined

Tue Feb 18, 2014 12:33 pm

Re: Altitude hold refinement

by peabody124 » Sun Mar 09, 2014 7:17 am

You can embed the link with the [vimeo] tag. You need to not use the s in https though:



Also, awesome. I was impressed it worked tightly enough to fly through that swing.
User avatar
User

metRo_

Posts

146

Joined

Tue Mar 04, 2014 5:26 pm

Re: Altitude hold refinement

by metRo_ » Mon Mar 10, 2014 10:16 am

Is this already merged into last master release?
User avatar
User

peabody124

Posts

686

Joined

Tue Feb 18, 2014 12:33 pm

Re: Altitude hold refinement

by peabody124 » Mon Mar 10, 2014 12:52 pm

Yep. Make sure you read these notes about how the new mode is controlled. People didn't like what was required to enable control previously so now it is on by default. You can disable by settings AltitudeHoldSettings.MaxRate to 0.

Also to answer your previous question, to use it just enable the AltitudeHold module and set a flight mode to altitude hold. Personally I would recommend using the complementary filter until I finish testing the 16 state INS improvements and push that.
User avatar
User

metRo_

Posts

146

Joined

Tue Mar 04, 2014 5:26 pm

Re: Altitude hold refinement

by metRo_ » Mon Mar 10, 2014 1:34 pm

peabody124 wrote:Yep. Make sure you read these notes about how the new mode is controlled. People didn't like what was required to enable control previously so now it is on by default. You can disable by settings AltitudeHoldSettings.MaxRate to 0.

Also to answer your previous question, to use it just enable the AltitudeHold module and set a flight mode to altitude hold. Personally I would recommend using the complementary filter until I finish testing the 16 state INS improvements and push that.


I did should read the notes before I test it. It looked ok but I didn't know that I should maintain the stick at middle to hold the altitude lol

Which is the percentage of stick deadband?
Next

Who is online

Users browsing this forum: No registered users and 2 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign