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.
Multiwii Automatic Altitude Hold, no PIDs, source and video
Multiwii Automatic Altitude Hold, no PIDs, source and video
Last edited by ahodel on Sat Aug 02, 2014 4:23 am, edited 1 time in total.
Re: Multiwii Automatic Altitude Hold, no PIDs, source and vi
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.
Please test it out and give feedback.
Re: Multiwii Automatic Altitude Hold, no PIDs, source and vi
very nice example of an adaptive control!
Re: Multiwii Automatic Altitude Hold, no PIDs, source and vi
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
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
Re: Multiwii Automatic Altitude Hold, no PIDs, source and vi
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.
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.
Re: Multiwii Automatic Altitude Hold, no PIDs, source and vi
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.
Re: Multiwii Automatic Altitude Hold, no PIDs, source and vi
Is it possible to achieve alt hold like APM. How APM holds altitude? What can we do about this?
Re: Multiwii Automatic Altitude Hold, no PIDs, source and vi
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.
Edit: Power filtering didn't help on this board. I posted a little more info in the above thread.