Help tuning a Mini Build

I was trying to autotune on a miniquad with 2300kv Sunnysky motors, 3S and 6" props (Kim250pro)

This was on AC3.2-rc3 and also tried to downgrade to 3.1.5 and it still didn’t work.

Autotune starts well on the roll and then just stops, no matter how long i wait, and even on no wind day when I didn’t have to correct position

Configuring the PIDs manually I didn’t see anything special:
stabP at 7
rateP 0.13
rateI 0.13
rateD 0.0110

These are not perfect.

I would really like autotune to work, I read somewhere that it doesn’t go above certain threshold of PID tuning but I don’t remember where and couldn’t find it.

It flies ok but when I punch the throttle it oscillates.
What really really helped was raising the MPU6050 low pass filter from the default 20hz to 98hz.
These small frames have low vibes and I guess i mounted the APM well for this to work.

I still get vibrations on fast forwards or going up fast.
I decoupled the pitch/roll rates and put less aggressive PIDs for roll:
StabP 5
P 0.10
I 0.11
D 0.009

When I lower the pid the oscillations disappear but it flies wobbly

What more can be done? why is autotune stopping?
Loiter has good posision hold but Altitude is drifting…

Any suggestions?

Hi there -

To answer your questions would really need some logs, specifically from the autotune sessions. Also, I’ve been tuning a similar setup (250 size frame, 2300kv t-motors etc) so maybe try my PID’s you may be very happy viewtopic.php?f=80&t=8793.

At quick glance, your PID’s are way too high for a 250 frame.

I decoupled the pitch/roll, looks better but still oscillates of fast runs or quick climeb

When lowering the PIDs closer to your levels it gets too wobbly.
It is better vibrating than wobbling.

The 250 frames are meant for acro maneuvers, I guess that if I had tried to fly calmly in Loiter/PosHold it would have been good enough.

About the hight PID, don’t forget I raised the LPF to 98hz.

Did you manage to complete autotune?

This is how it flies, notice the vibrations on the fast forwards:


yes my autotune completes - I’ve gone through a couple passes, but the manual tuning has given me the best results so far.

As far as the LPF, I have very little knowledge on changing this parameter so you got me there.

raphh, can you please explain the really high imix that you have? which problem you might have seen that it solved?

Also, i tried acro, the default rate is way too low for flips, thinking on maxing it to 10 and adding a mix on my rc that when i goto acro it will put expo on my pitch/roll

The high IMAX was suggested to me by a dev - here’s the post viewtopic.php?f=80&t=8793#p20841

I did not get a clear answer as to the purpose of this, perhaps someone else can shed more light. i’m curious as well! I have to say I noticed less wobbling with the change.

also - i have yet to use acro mode… i know i know ha - any tips on how it handles? things to avoid?

Thanks for the imax trick, seems to really help getting the almost perfect pids, when I raised the imax i really had to lower the “I”

The imax determine how much throttle can the “I” generate, I once had to use it on a real heavy nose quad, I donno why it so low by default or even why we need it, I think the imax is in PWM so about 2000 max and 1800 that you put is almost 100%

Regarding acro, i tried it , it has problems, not reactive enough by default, changing the acro_rp_rate to the max 10 really helps, then I added expo of 80% to my rc when i switch to acro. 10 still doesn’t flip fast enough.
After a few flips it reversed my pitch and i almost crashed, moving back to stabilized fixed the pitch.

The high IMAX was suggested to me by a dev - here’s the post viewtopic.php?f=80&t=8793#p20841

I did not get a clear answer as to the purpose of this, perhaps someone else can shed more light. i’m curious as well! I have to say I noticed less wobbling with the change.[/quote]

IMAX limits the integrator. The integrator is used to eliminate steady-state errors, such as those caused by a CG offset or motor failure. If the CG is bad, the default integrator limit is too small. With decent tuning, there’s no good reason to have an integrator limit at all.

Thanks, I think the default imax is small too, building the tuning around the bigger imax looked better, I heared it is being raised to 1000, but why do we actually need it?

I had the auto tune doesn’t complete thread which was removed…
I went back to 20hz on the LPF and with the high imax managed to reach the same result (not sure its the imax or not)

Attached is the autotune log i believe, its not long but after the roll finished tuning waited for a minutes or so for the pitch to start and it didn’t. then started it from scratch and again pitch tuning didn’t start.

If you can please extract the roll PID from the auto tune log it will be great

After chaning LPF to 20hz i now have -1>x<1 and -2>y<2 seems better.

Flies nice but still, can’t tighten the PID enough without oscillation on throttle.

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:

have a hoverthings 260 with APM. With stock PIDs it flys just ok. Tried autotune but it would not engage or it would quit part way through. Decided to search for some ‘example’ PIDs on a 250 or 260 that folks have had success with. Came across the above screenshot fro Raphh and a few others. When I try to input these into mission planner it seems the min range for rate roll P will not allow numbers that low. Has there been a change in mission planner min/max settings? Perhaps what used to be known as 0.0420 is now some other number?