Multiwii Automatic Altitude Hold, no PIDs, source and video

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
ahodel
Posts: 4
Joined: Mon Jul 14, 2014 9:38 pm

Multiwii Automatic Altitude Hold, no PIDs, source and video

Post by ahodel »

Here's a video of a 450 quad and an octo running my automatic altitude hold code for Multiwii 2.3.



It's a complete rewrite of the BARO PID loop and does away with the need to tune and/or set PID's for AltHold/BARO. Everything is automatically adjusted based on variance.

Grab IMU.cpp from https://github.com/andrewhodel/MW23/raw/master/IMU.cpp and replace your local Multiwii 2.3 IMU.cpp with it then flash.

Commented code at https://github.com/andrewhodel/MW23/blo ... U.cpp#L339

Both the quad and octo in this video are running on a Crius AIOP v2 with only the Barometer for Altitude Hold.
Last edited by ahodel on Sat Aug 02, 2014 4:23 am, edited 1 time in total.

ahodel
Posts: 4
Joined: Mon Jul 14, 2014 9:38 pm

Re: Multiwii Automatic Altitude Hold, no PIDs, source and vi

Post by ahodel »

Here's a plot of the important data in windy conditions, it should help explain how it works.

Please test it out and give feedback.

graph.png

brm
Posts: 287
Joined: Mon Jun 25, 2012 12:00 pm

Re: Multiwii Automatic Altitude Hold, no PIDs, source and vi

Post by brm »

very nice example of an adaptive control!

sismeiro
Posts: 173
Joined: Tue Feb 21, 2012 12:33 pm

Re: Multiwii Automatic Altitude Hold, no PIDs, source and vi

Post by sismeiro »

Hi,

It seems very good. Let's wait and see if more people test this mod and if Alex is also happy with it to include it before 2.4 release.

Regards,
Luis Sismeiro

brm
Posts: 287
Joined: Mon Jun 25, 2012 12:00 pm

Re: Multiwii Automatic Altitude Hold, no PIDs, source and vi

Post by brm »

ahodel wrote:Here's a plot of the important data in windy conditions, it should help explain how it works.

Please test it out and give feedback.

graph.png


i hope to test it this week. if possible i create a video.
this little framework can also be used to autotune the regular pid settings.
then it needs a bit more code but this is overseeable.

vapourium
Posts: 1
Joined: Wed Jan 07, 2015 10:33 am

Re: Multiwii Automatic Altitude Hold, no PIDs, source and vi

Post by vapourium »

Hi, ive replaced the IMU.cpp file and when trying to compile the sketch i get a long list of errors. Is there anything else i need to change in the sketch ive tryed this with mw2.3 and mw2.3 navib7 and both give errors.

mahomedia
Posts: 12
Joined: Tue Feb 05, 2013 10:59 pm

Re: Multiwii Automatic Altitude Hold, no PIDs, source and vi

Post by mahomedia »

Is it possible to achieve alt hold like APM. How APM holds altitude? What can we do about this?

PropNut
Posts: 2
Joined: Wed Jan 21, 2015 6:47 pm

Re: Multiwii Automatic Altitude Hold, no PIDs, source and vi

Post by PropNut »

This seems to work well on a Hobby King MultiWii 328P. I tried it with V2.3, and R1648. It holds within approximately 3' (1m) I'm going to look for some capacitors to try the "Baro Power Filter" described here: http://www.multiwii.com/forum/viewtopic.php?f=17&t=5595
Edit: Power filtering didn't help on this board. I posted a little more info in the above thread.

Post Reply