AC3.2 Autotune issue for mini quad

My issue is that the autotune completes, in no wind, with very low PIDs on one or both of rate roll and pitch, see the picture below. The rate p gain works OK at about 0.1000, but isn’t perfect, and hence I tried the autotune to dial them in, and for whatever reason they are calculated to be far too low, with rate p now about 0.100 and it isn’t stable at all, luckily it’s a mini quad and shakes off small crashes :slight_smile:

I’m using the HK pilot micro (which is based on the APM 2.5) on my mini quad (280mm motor to motor diagonal), with 3S, 2280kv motors, and 6x3 props giving 3.6:1 thrust to weight, and hovering at throttle mid of 400, for reference. I have also checked the vibration, and it is well within the suggested limits.

This is my second attempt with similar results, so either it’s just not great for the mini quads, or I’m missing something. Any ideas? Could it be related to: https://github.com/diydrones/ardupilot/issues/1337?

Logs attached.

[attachment=0]after autotune.png[/attachment]

I have a feeling I may be slowly solving this myself, but please anyone feel free to reply if you have any ideas.

I followed the advice here: http://ardupilot.com/forum/viewtopic.php?f=80&t=8960&start=10

[quote=“sevet”]So, problem solved.

Devs looked into this and fixed arducopter behavior for Mini frames, hooray!! :stuck_out_tongue:

This works only from version 3.2-rc5 (already on mission planner beta firmware)
You also need to put the LPF on 42hz (INS_MPU6K_FILTER) for the magic to star working :wink:
(FYI: for some reason this fix is not in the release notes!)

I also recomment putting IMAX of rate roll and rate pitch on 1800.

Now we can autotune!, values are bit too soft/calm for a mini, but its a really really good start and a point in the right direction.

Autotune took about 11 minutes but it was a bit windy. (lucky my battery gets me 13 minutes)

Also new in 3.2-rc5 is acro expo, I put it on 0.4 (high) and set acro_rp_rate to 10 (max)

I also fly with acro trainer on level only :blush:[/quote]

I autotuned again and got the below PIDs, which are much closer to the correct values, but certainly not quite there, there is oscillation and sluggish control of the roll, so I plan to adjust it closer to the pitch PID values.

[attachment=0]post autotune with MPU@42Hz && IMAX @1800.png[/attachment]

Hi. I start the autotune with the standard pids of P 1.500 and I 1000.

So here are my latest values, flying well except for >60% throttle (3.6:1 Power to weight) where there is some high frequency oscillation, but otherwise good.
Does the autotune use the values you give it as a starting point, or is it from scratch each time?

I’m interested in that too.

Yes, AFAIK Autotune starts with what you have stored, regardless of how those params came to be. It retunes based on the successful completion of a single Autotune event. However, as you probably know the Tuned parameters are not stored unless you complete the landing sequence described in the WIKI. Based on several comments I’ve read it appears there is still some room for some artful tuning after Autotune.

[quote=“ronhogwarts”]So here are my latest values, flying well except for >60% throttle (3.6:1 Power to weight) where there is some high frequency oscillation, but otherwise good.
Does the autotune use the values you give it as a starting point, or is it from scratch each time?[/quote]

I believe autotune is getting a revamp for 3.3 whenever that comes out, so hopefully that’ll work better with mini quads. For now I’ll try autotune one more time with the decent PIDs I’ve found, but I’m not holding my breath. Is it worth opening an issue on Github, as I know there are many people having these issues?

Just a heads up for anyone, here are my autotune PIDs (first) vs the manually tuned PIDs (second), with Imax at 1800 and the filter set to 42Hz as I said before. They are really low and the quad is unflyable. Another thing to note is that I’m using the X quad format, and I understand it makes no difference than using the H. I’m having no luck with 3.2.1’s autotune for mini quads.

Autotune PIDs:
[attachment=1]wrong autotune.png[/attachment]

Manual PIDs:
[attachment=0]Untitled.png[/attachment]

[quote=“ronhogwarts”]I have a feeling I may be slowly solving this myself, but please anyone feel free to reply if you have any ideas.

I followed the advice here: http://ardupilot.com/forum/viewtopic.php?f=80&t=8960&start=10

[quote=“sevet”]So, problem solved.

Devs looked into this and fixed arducopter behavior for Mini frames, hooray!! :stuck_out_tongue:

This works only from version 3.2-rc5 (already on mission planner beta firmware)
You also need to put the LPF on 42hz (INS_MPU6K_FILTER) for the magic to star working :wink:
(FYI: for some reason this fix is not in the release notes!)

I also recomment putting IMAX of rate roll and rate pitch on 1800.

Now we can autotune!, values are bit too soft/calm for a mini, but its a really really good start and a point in the right direction.

Autotune took about 11 minutes but it was a bit windy. (lucky my battery gets me 13 minutes)

Also new in 3.2-rc5 is acro expo, I put it on 0.4 (high) and set acro_rp_rate to 10 (max)

I also fly with acro trainer on level only :blush:[/quote]

I autotuned again and got the below PIDs, which are much closer to the correct values, but certainly not quite there, there is oscillation and sluggish control of the roll, so I plan to adjust it closer to the pitch PID values.

[attachment=0]post autotune with MPU@42Hz && IMAX @1800.png[/attachment][/quote]

Hi ronhogwarts,

Do you have a log of the autotune.
You are correct that autotune looks like it is failing for your 250. As most of my development is done on a 250, I know it does work if everything is right. However, 250’s are very fussy because they are quiet suitable to CG problems and noise issues.
There are some changes in the next release I hope makes things more reliable but I will have to see one of your autotune logs to have any idea what is actually going wrong.

I have the “nearly all” log below for reference. I checked it with the APM log file analyser.

Let me explain what I know:

[ul]The vibrations are ±5 on the x and y axis, so quite high, probably as the HK APM micro is hard mounted to the 250 pro frame with nylon threads, as usual for 250 quads. To cure this I may be able to balance props and motors, but as they are removed for transport, and thus reattached in different positions on the motors this may not be a long term solution.

I raised the LPF to 42Hz from 20Hz and the Imax to 1800 from 1000 as suggest by the link above, although given the vibrations I’m experiencing would it better to lower it to 20Hz again?

The VCC is complaining of too much variation, although I don’t see that being a particular issue here.

The CG is correct, and Alt hold works fairly well without oscillation.[/ul]

So overall I can understand that this might be compounding the issue, I welcome any comments or suggestions, see the log files below:

Log file:
drive.google.com/file/d/0B6QFq1 … xCdU0/view

Analyser output:
drive.google.com/file/d/0B6QFq1 … pfZFU/view