Re: Port Tau Labs Autotune to LP
« Reply #45 on: May 22, 2016, 08:59:24 am »
I'd I get it flying someway auto tune can work even with  dronin

Tomcatt

  • *
  • 23
Re: Port Tau Labs Autotune to LP
« Reply #46 on: June 23, 2016, 03:38:21 pm »
Hello guys, is this still supported?

Mateusz

  • *
  • 808
Re: Port Tau Labs Autotune to LP
« Reply #47 on: June 23, 2016, 04:17:21 pm »
Hello guys, is this still supported?

I would rather say available/included. If you ask about Autotune port, as far as I know it's pretty close to being merged. It's very stable, and it seems pull-up request got lots of approvals but few more devs need to click "Approve" button and merge it :) So it will be soon in "next" development branch, and I am almost sure in upcoming release.
« Last Edit: June 23, 2016, 04:25:59 pm by Mateusz »

chromvis

  • *
  • 117
Re: Port Tau Labs Autotune to LP
« Reply #48 on: June 24, 2016, 10:43:59 pm »
I want to try it on Sparky2. I install next version on it - looks OK, although FC is not mounted on quad yet, just did basic tests and calibration on FC itself.
Is anyone tried autotune on Sparky2? I did it on 2 quads with revolution FC with now mixed feelings. One, small NightHawk 200 fly very good after this tune. Another, NightHawk280 clone with BLHeli 30A and RS2205 motors 6040 props (3S bat) heats motors and ESCs - looks like high frequency vibrations (may be not, but it did not do that before autotune).
Any suggestions how to modify parameters (I played a bit with D, not much effect)?
Does it make sense to wait until it merged with next? (I actually lost my latest autotune build and have to build it again)?
Thanks for any suggestions/comments.

Mateusz

  • *
  • 808
Re: Port Tau Labs Autotune to LP
« Reply #49 on: June 24, 2016, 11:13:41 pm »
I want to try it on Sparky2. I install next version on it - looks OK, although FC is not mounted on quad yet, just did basic tests and calibration on FC itself.
Is anyone tried autotune on Sparky2? I did it on 2 quads with revolution FC with now mixed feelings. One, small NightHawk 200 fly very good after this tune. Another, NightHawk280 clone with BLHeli 30A and RS2205 motors 6040 props (3S bat) heats motors and ESCs - looks like high frequency vibrations (may be not, but it did not do that before autotune).
Any suggestions how to modify parameters (I played a bit with D, not much effect)?
Does it make sense to wait until it merged with next? (I actually lost my latest autotune build and have to build it again)?
Thanks for any suggestions/comments.

Hi,

I also used Autotune on two builds with Sparky2. First one 250mm works like charm and is way more responsive, the other one 290 had micro-oscilations and motors were gettng hot, as well. That's why this module shouldn't be used blindly, but PIDs require checking them before flying.
You can tell if something is wrong either from high Yaw PIDs or if your copter does not lift up (requires too much throttle). Then just don't fly that. Latest Autotune had extra limiting factor which prevents over-estimated high PIDs, and solved the problem of micro-oscillations for me. Were you using recent one ?

As for pull-up request you can find it in the git and follow it, but it is close to being merged and pretty much approved, so I guess it will be very soon in next branch.
 

chromvis

  • *
  • 117
Re: Port Tau Labs Autotune to LP
« Reply #50 on: June 25, 2016, 12:50:15 am »
Hi,
I used it early May, so it may be old. I will set Sparky2 on 380 quad with 2000kv motors and test without Autotune first. My be by this time tune will be merged to next. Thanks.

Re: Port Tau Labs Autotune to LP
« Reply #51 on: June 25, 2016, 04:14:01 am »
AutoTune has not been merged into next yet,
You can search the wiki for autotune.  It shows you where to get the source code, etc.

I found some parts of the original timing measurement that the original code did not take into account and I put it into:
    ssh://[email protected]/TheOtherCliff/librepilot.git
    theothercliff/LP-340_AutoTune_fix_some_time_measurement_issues_in_original_code

It would help if you could build this and see if it works better for both your quads.

Thanks!

chromvis

  • *
  • 117
Re: Port Tau Labs Autotune to LP
« Reply #52 on: June 25, 2016, 05:03:39 am »
I will try in a week or two.

chromvis

  • *
  • 117
Re: Port Tau Labs Autotune to LP
« Reply #53 on: June 27, 2016, 03:57:42 am »
I tested autotune (build r1212-gb5890b9) on three different copters:

1.   NightHawk 200  with EMax 2204 2300kv motors with Dalprop 50x45x3 props, 20A BLHeli ESC (not OneShot), 3S 1500 mAh battery, Revolution FC, weight 540g with bat.)
2.   NightHawk 280 clone with RS2205 2300kv motors, GemFan 60x40x2 props, 30A BLHeli ESC (One Shot), 3S battery, Revolution FC with GPS and external mag, total weight 780 g with 4000 mAh batt.; and 700 g with 2200 mAh batt.
3.   380 quad with EMax MT2208-II 2000 kv motors with 60x40x2 props (with 70x45 props hovering was at 10% throttle), 30A BLHeli ESC, 4S battery 2650 mAh, Sparky-2 FC with GPS and external mag, total weight 960 g.

On 200 quad autotune process was smooth. Although copter is not very agile even at SmoothQuick Accessory at 100% (I set it to Accessory 1 slider). There are very minimal difference in the copter reaction between 0 and 100% slider position.

Minimal PID (smooth)     Roll      Pitch      Yaw
      P          0.00052      0.00098   0.00148
      I          0.00058      0.00110   0.00134
      D          0.000045   0.000085   0.000102
Max (agile)            Roll      Pitch      Yaw
      P         0.00185      0.00350   0.0042
      I         0.00408      0.00773   0.00661
      D         0.000080   0.000151   0.000168

Tuning of the second copter was not successful at all. With big battery (4000 mAh, 770g) it run through half of tuning process and start falling. I had to jerk throttle up to keep it flying. After two or three jerks it fall. Restart at default settings (Bank 1) was OK, it flew smooth.
With 2200 mAh batt. 700 g same copter went through autotune a bit longer but did not finish, just fell.
I have to do some more tests, I am not sure that it is autotune fault, it may be calibration or setup, or ESCs – this copter gave me headaches before too.
Third (380) copter with Sparky 2 flight controller went through autotune without any problems. Right after original assembly, it was its maiden flight (with Sparky 2).
Results were the most impressive. Big difference between smooth and agile modes. Very fast reaction without jerks and noticeable overshoots (even in most agile form). Very good feeling to fly it.

Minimal PID (smooth)     Roll      Pitch      Yaw
      P          0.00183      0.00254   0.00634
      I          0.00401      0.00555   0.01209
      D          0.000030   0.000041   0.000082
Stab      P         4.28      4.28
      I         2.248   2.248

Max (agile)            Roll      Pitch      Yaw
      P         0.00498      0.00690   0.01250
      I         0.01883      0.02606   0.03238
      D         0.000060   0.000083   0.000135
Stab. P = 6.695  and I = 3.516 (same for Roll and Pitch)
I am a bit surprised that in agile set derivative term is lower than in smooth mode. D, generally allow damping overshoots faster. Any way, it fly very well.

Would be happy to hear suggestions and questions.

Tomcatt

  • *
  • 23
Re: Port Tau Labs Autotune to LP
« Reply #54 on: June 27, 2016, 04:43:07 am »
Let me know when you have a build for the Revolution.  I'll test it for you. :)

smfelton

Re: Port Tau Labs Autotune to LP
« Reply #55 on: June 27, 2016, 08:49:06 pm »
AutoTune has not been merged into next yet,
You can search the wiki for autotune.  It shows you where to get the source code, etc.

I found some parts of the original timing measurement that the original code did not take into account and I put it into:
    ssh://[email protected]/TheOtherCliff/librepilot.git
    theothercliff/LP-340_AutoTune_fix_some_time_measurement_issues_in_original_code

It would help if you could build this and see if it works better for both your quads.

Thanks!

I'm not very familiar with bitbucket, how do I change to this repository, i'm building 'next' on my hackintosh without any issues but I must admit trying to get to this is baffling me.
Thank you
Shane

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Port Tau Labs Autotune to LP
« Reply #56 on: June 27, 2016, 09:08:40 pm »
Declare another remote repository, named cliff_repo here:

Code: [Select]
git remote add cliff_repo https://bitbucket.org/TheOtherCliff/librepilot.git
fetch the repo and checkout the branch

Code: [Select]
git fetch cliff_repo
git checkout theothercliff/LP-340_AutoTune_fix_some_time_measurement_issues_in_original_code

chromvis

  • *
  • 117
Re: Port Tau Labs Autotune to LP
« Reply #57 on: June 27, 2016, 09:10:06 pm »
i am using Windows Msys2. It works fine. Basic procedure description is given in https://librepilot.atlassian.net/wiki/display/LPDOC/Windows+Building+and+Packaging .

In "Get the code using Msys2" section instead of "ssh:" use "https:"
I mean:  "git clone https://[email protected]/TheOtherCliff/librepilot.git ". You can add the name for new directory at the end after space.
then "cd ... " to your directory
then  "git checkout  theothercliff/LP-340_AutoTune_fix_some_time_measurement_issues_in_original_code"
After that you can either choose to build specific part (although I am not that much experienced in it, so I just usually ask to make the whole package exactly as it is written in the manual. It takes longer (on my i5 laptop about 1 hour) but i will have all firmware, installation file and ready to run software (be aware, it is additional 1.8 Gb on disk).h

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Port Tau Labs Autotune to LP
« Reply #58 on: June 27, 2016, 09:16:58 pm »
Using various "remote" repos like i explained in previous post avoid redo the "git clone" every time you want to change the active repo.

a simple

Code: [Select]
git remote
list all repo avialable from the same source dir

smfelton

Re: Port Tau Labs Autotune to LP
« Reply #59 on: June 27, 2016, 10:38:39 pm »
Fantastic thank you guys, very much appreciated.
Shane