lucas

  • **
  • 67
Port Tau Labs Autotune to LP
« on: January 27, 2016, 01:10:51 am »
I read in your issues that a few months back Cliff suggested to implement the TL Autotune in LP. Task LP-76


What happened to that?

If the autcome of an Autotune is solid, I bet a lot of users will migrate form whatever Firmware to LibrePilot.


Re: Port Tau Labs Autotune to LP
« Reply #1 on: February 21, 2016, 10:53:09 pm »
I'm just starting to implement auto-tune on LP.  I would guess that it won't be in the next release, but should be buildable around then?

gitit20

  • *
  • 55
  • If it will fly I will crash it.
Re: Port Tau Labs Autotune to LP
« Reply #2 on: February 27, 2016, 02:47:16 am »
I really like the idea of autotune let me know when you need it tested haha :)
Do the best you can It's all you can do.

Re: Port Tau Labs Autotune to LP
« Reply #3 on: March 14, 2016, 05:17:51 am »
The dRonin AutoTune port to LibrePilot is basically done.  Testers are testing and I am getting tweaking some default values.  I have become optimistic about it actually making it into the coming release.

if you want to build it yourself,
bitbucket  TheOtherCliff  theothercliff/LP-73_blahblah

Better yet, join the FTT and read the FTT thread on it for setup pointers.  :)

Re: Port Tau Labs Autotune to LP
« Reply #4 on: March 14, 2016, 09:21:19 am »
Holy guacamole! That is great news! :) Good job TheOtherCliff.

lucas

  • **
  • 67
Re: Port Tau Labs Autotune to LP
« Reply #5 on: March 14, 2016, 02:40:24 pm »
Good job Cliff....that was fast!!!

aa8mc

  • **
  • 50
Re: Port Tau Labs Autotune to LP
« Reply #6 on: March 18, 2016, 05:16:01 am »
Cliff can you PM me details on the FTT?
F450 Quad Clone
Outrunner1000KV Motors
HobbyWing FlyFun 30A ESCs
1045 Props
Telemetry via OP Link
FlySky FS-i6 transmitter w/ 10 channel mod
Sparky2 Flight controller
HobbyAce UBLOX 6M GPS
Running LibrePilot next branch
MinimOSD
FlySight Spexman FPV Goggles
Floureon 5500mAh LiPos

Mateusz

  • *
  • 808
Re: Port Tau Labs Autotune to LP
« Reply #7 on: March 18, 2016, 09:16:09 am »
A bit of background. Autotune feature was initially introduced back in OpenPilot before split of TauLabs happened. You can see that in old GCS movies. Then OP removed Autotune (probably for safety considerations), but TauLabs kept it. I can imagine it was not considered to be safe, for users who have no knowledge of PIDs tuning, but tried using it. Of course Autotune, improved over time, and each team added value to it.

Now it is back in LibrePilot. It is automatic process but in my option it does not remove burden from user of knowing what PIDs are, and how the process works. It may work for everyone else, but you might be the lucky guy from FTT discovering case when it fails miserably. I advice to always check PIDs before flying them, do they make sense for your build ? Be aware that this is development branch of feature that have just been added.

For testing you should use Attitude mode both for tuning and flying. There is a chance that oscillations can make quad climb even at very low throttle, requiring to stop motors, let it fall, recover (repeat) to get it down. Also try to take off with new settings instead of switching to them in flight, to get a feeling how new PIDs work and be prepared to stop it. Another recommendation is not to use big props that put your motors on the edge of power rating. If motors can stand full throttle for long time you should be safe. This is important in case of micro-oscillations, which can make motors hot. Even if the PIDs look reasonable be careful the first time you let props spin with the new PIDs. Bad PIDs can cause oscillations, and that can cause a very low throttle setting to act like 50% throttle, likewise high throttle can become 50% as well. Some oscillations can't be seen or heard, but you can tell they are there if it feels like all throttle settings are closer to 50% than they should be.

All feedback is of great value for further improvements.

lucas

  • **
  • 67
Re: Port Tau Labs Autotune to LP
« Reply #8 on: March 18, 2016, 03:02:02 pm »
Thanks Mateusz.   Do only the FTT guys get to test it?  Or can you share the test FW?

liftbag

  • *****
  • 215
    • LibrePilot
Re: Port Tau Labs Autotune to LP
« Reply #9 on: March 18, 2016, 03:21:33 pm »
Thanks Mateusz.   Do only the FTT guys get to test it?  Or can you share the test FW?
Better not to spread around this branch. It can destroy your quad or can be dangerous.
I am among those who have no particular luck with this Autotune.

Mateusz

  • *
  • 808
Re: Port Tau Labs Autotune to LP
« Reply #10 on: March 18, 2016, 05:02:49 pm »
Thanks Mateusz.   Do only the FTT guys get to test it?  Or can you share the test FW?

Hi Lucas,

Do you have spare sacrifice quad that is not expensive ? FTT members usually have a few spare builds and accept risk connected with testing development code.
It is not just firmware (FW) but also GCS that needs patches. People testing now, know already how to build, work with git to fetch changes, which makes testing smoother for developer that can instead focus on fixing issues. However, I don't want to stop you from using this code :) Shame on me if your quad goes bananas, though you were warned ;)
But more seriously, feedback from expert on PID tuning, wouldn't hurt :)

Mateusz

lucas

  • **
  • 67
Re: Port Tau Labs Autotune to LP
« Reply #11 on: March 18, 2016, 06:21:04 pm »
Better not to spread around this branch. It can destroy your quad or can be dangerous.
I am among those who have no particular luck with this Autotune.

Sorry to hear that liftbag...

As of these moment you can find 153 succesful autotune reports on the dRonin website...do you mind testing their autotune?? 

http://dronin.org/autotown/autotuneresults.html#

Your feedback on that will shed light on the reason of your LP autotuning failure.  If you get good results on theirs there could be some glitches on the LP implementation, if you get the same results... then Autotune (Theirs an LP´s) could be deemed unreliable (or even dangerous)

Hi Lucas,

Do you have spare sacrifice quad that is not expensive ? FTT members usually have a few spare builds and accept risk connected with testing development code.
It is not just firmware (FW) but also GCS that needs patches. People testing now, know already how to build, work with git to fetch changes, which makes testing smoother for developer that can instead focus on fixing issues. However, I don't want to stop you from using this code :) Shame on me if your quad goes bananas, though you were warned ;)
But more seriously, feedback from expert on PID tuning, wouldn't hurt :)

Mateusz
 
Every quad that I own is inexpensive (appart from the original FCs on them) and can be considered spares.  I don´t mind the risk involved and don´t mind destroying some of them.  But I don´t know how to work with github, fetch changes, build, etc. 

I´m OK at tuning PIDs, not an expert by any means, but I take the time to tune my quads until I get good results.  If the best way to give some feedback and help this or other user friendly features make their way into the official releases is by joining the FTT I might offer myself (and my quads) for that.  I understand liftbags concern about letting this branch going public if it might be dangerous.



Mateusz

  • *
  • 808
Re: Port Tau Labs Autotune to LP
« Reply #12 on: March 18, 2016, 06:49:17 pm »
If the best way to give some feedback and help this or other user friendly features make their way into the official releases is by joining the FTT I might offer myself (and my quads) for that.

If you want to join FTT, then it would be awesome. I think may liftbags know more.

About dRonin 153 results, I've submitted mine as well, after just running autotune being curious what comes out. I think they're using this data to fine tune algorithm.


« Last Edit: March 18, 2016, 07:31:12 pm by Mateusz »

liftbag

  • *****
  • 215
    • LibrePilot
Re: Port Tau Labs Autotune to LP
« Reply #13 on: March 18, 2016, 10:24:19 pm »

Sorry to hear that liftbag...

As of these moment you can find 153 succesful autotune reports on the dRonin website...do you mind testing their autotune?? 

http://dronin.org/autotown/autotuneresults.html#

Your feedback on that will shed light on the reason of your LP autotuning failure.  If you get good results on theirs there could be some glitches on the LP implementation, if you get the same results... then Autotune (Theirs an LP´s) could be deemed unreliable (or even dangerous)
I think the focus is, what do you expect? I'm used to have really good PIDs in minutes using OPTune. I mean, PIDs good for racing or aerobatics. What I seek, are PIDs at least as good as OPTune PIDs.
For all I know LP Autotune is currently ported from dRonin, so it should not be very different.
Yet I get totally unsatisfactory results, even worse, the result depends on the PIDs used during the test.
At this point, a test with dRonin is a necessary action.
« Last Edit: March 18, 2016, 10:43:10 pm by liftbag »

Re: Port Tau Labs Autotune to LP
« Reply #14 on: March 21, 2016, 03:43:01 am »
Just for context/background the original Autotune I wrote for OpenPilot years ago used relay tuning. This required fairly aggressive oscillation. The dRonin Autotune is the same as the Tau Labs one I wrote a few years back. It works quite differently with much smaller oscillations to directly calculate the properties of your multi rotor (primarily the response latency of the motors).

You can see the original testing and description here


It's convenient because it calculates quite a few of the parameters, and does this from a well grounded framework. You can find the derivation of the calculation of parameters from the system properties here: https://github.com/TauLabs/TauLabs/raw/next/flight/Doc/Autotuning%20Derivation.pdf and hopefully a publication on the actual system identification approach will be coming out in not too long.

Glad you guys are finding it useful! We've had people using it at TL for 2 years now with thousands of successful tunes. I completely agree people should know enough to eye ball the parameters for sanity before trying to fly, though.