Default parameter set for sub 250 multirotors

I am starting this thread for people to propose a default parameter set for sub 250 sized aircraft. This should make it much easier for small multirotors to be set up using ArduPilot.

I would like as many people as possible to post what they believe is the important parameters to change to get good performance from this class of multirotor.

I will put the parameters we have settled on below:

ACRO_BAL_PITCH
ACRO_BAL_ROLL
ACRO_RP_EXPO
ACRO_RP_P
ACRO_THR_MID
ACRO_TRAINER
ACRO_Y_EXPO
ACRO_YAW_P
ATC_ACCEL_P_MAX
ATC_ACCEL_R_MAX
ATC_ACCEL_Y_MAX
ATC_ANG_LIM_TC
ATC_ANG_PIT_P
ATC_ANG_RLL_P
ATC_ANG_YAW_P
ATC_ANGLE_BOOST
ATC_INPUT_TC
ATC_RAT_PIT_D
ATC_RAT_PIT_FF
ATC_RAT_PIT_FLTD
ATC_RAT_PIT_FLTE
ATC_RAT_PIT_FLTT
ATC_RAT_PIT_I
ATC_RAT_PIT_IMAX
ATC_RAT_PIT_P
ATC_RAT_RLL_D
ATC_RAT_RLL_FF
ATC_RAT_RLL_FLTD
ATC_RAT_RLL_FLTE
ATC_RAT_RLL_FLTT
ATC_RAT_RLL_I
ATC_RAT_RLL_IMAX
ATC_RAT_RLL_P
ATC_RAT_YAW_D
ATC_RAT_YAW_FF
ATC_RAT_YAW_FLTD
ATC_RAT_YAW_FLTE
ATC_RAT_YAW_FLTT
ATC_RAT_YAW_I
ATC_RAT_YAW_IMAX
ATC_RAT_YAW_P
ATC_RATE_FF_ENAB
ATC_RATE_P_MAX
ATC_RATE_R_MAX
ATC_RATE_Y_MAX
ATC_SLEW_YAW
ATC_THR_MIX_MAN
ATC_THR_MIX_MAX
ATC_THR_MIX_MIN
AUTOTUNE_AGGR
AUTOTUNE_AXES
AUTOTUNE_MIN_D
INS_ACCEL_FILTER
INS_GYRO_FILTER
INS_HNTCH_ATT
INS_HNTCH_BW
INS_HNTCH_ENABLE
INS_HNTCH_FREQ
INS_HNTCH_HMNCS
INS_HNTCH_REF
LOIT_ACC_MAX
LOIT_ANG_MAX
LOIT_BRK_ACCEL
LOIT_BRK_DELAY
LOIT_BRK_JERK
LOIT_SPEED
MOT_BAT_CURR_MAX
MOT_BAT_CURR_TC
MOT_BAT_IDX
MOT_BAT_VOLT_MAX
MOT_BAT_VOLT_MIN
MOT_BOOST_SCALE
MOT_HOVER_LEARN
MOT_PWM_MAX
MOT_PWM_MIN
MOT_PWM_TYPE
MOT_SAFE_DISARM
MOT_SLEW_DN_TIME
MOT_SLEW_UP_TIME
MOT_SPIN_ARM
MOT_SPIN_MAX
MOT_SPIN_MIN
MOT_SPOOL_TIME
MOT_THST_EXPO
MOT_THST_HOVER
MOT_YAW_HEADROOM
PILOT_ACCEL_Z
PILOT_SPEED_DN
PILOT_SPEED_UP
PILOT_THR_BHV
PILOT_THR_FILT
PILOT_TKOFF_ALT
PSC_ACC_XY_FILT
PSC_ACCZ_D
PSC_ACCZ_FF
PSC_ACCZ_FLTD
PSC_ACCZ_FLTE
PSC_ACCZ_FLTT
PSC_ACCZ_I
PSC_ACCZ_IMAX
PSC_ACCZ_P
PSC_ANGLE_MAX
PSC_POSXY_P
PSC_POSZ_P
PSC_VELXY_D
PSC_VELXY_D_FILT
PSC_VELXY_FILT
PSC_VELXY_I
PSC_VELXY_IMAX
PSC_VELXY_P
PSC_VELZ_P
WP_NAVALT_MIN
WP_YAW_BEHAVIOR
WPNAV_ACCEL
WPNAV_ACCEL_Z
WPNAV_RADIUS
WPNAV_SPEED
WPNAV_SPEED_DN
WPNAV_SPEED_UP

8 Likes

First I’ll just mention some things… I’ll post parameters when I have time to look through them.

I have ACRO_YAW_P increased because out of the box, Yaw seems a lot more sensitive in betaflight. So maybe increase this.

We should discuss all the ATC parameters. Not sure if ACCEL_*_MAX needs to be changed from defaults. I’m thinking about .08 for P and I, and .001 for D for the defaults. But I’m only using 2s, so maybe someone w/ a more powerful battery should offer some advice. I think a few of us have settled on about 80 for the filters, so maybe 80 for FLTD and FLTT. My yaw settings are really strange, but I’m happy w/ them. (I have P at .25 which is pretty high for a small copter, and a tiny bit of D, .0001, and some feed forward) anyway, I’m curious what others are using. And there are some other ATC values I’m not sure of.

We should set autotune_aggr to be .1 for these performance oriented copters.
And autotune min d should be lowered, .0005

At least a couple of us have had trouble w/ accel and gyro biases building up w/ these small cheap FC’s… So I’ve lowered EK2_ABIAS_P_NSE AND EK2_GBIAS_P_NSE. Added an extra zero to each one.
I also decreased the GPS sensitivity… Glitch radius and the hdop required to arm. These GPS’s are tiny and in my case, take 10+ minutes to get a good lock. And most of the time I fly in stabilize anyway… I don’t think I’ve ever taken off in a GPS mode.

Maybe set LOG_BACKEND_TYPE,4, because all these FC’s have onboard logging.

Maybe mot_thst_expo,.5 for these small motors?

I adjusted some PSC settings when I first started tuning this small copter, and haven’t thought about them much since… Have others adjusted them?

Sched_Loop_Rate,800?

Accel filter? (Mine is 25, I think default is 20, not sure it matters)
INS_GYRO_FILTER,100?

Increase Loit speeds and Pilot speeds?

Servo_Blh settings. Default poles is generally 12 for these small copters. And I think we should recommend and assume they’re using ESC’s w/ telemetry, so enable that.

Enable the harmonic notch to be dynamic based on ESC. Set a reasonable frequency and attenuation.

I increased my WPNAV speeds a lot, too, but not sure if that’s safe in general.

Whew, there are a lot of parameters… I need to compare what I’ve got w/ default. And maybe plug in a spare FC and figure out everything that’s set up in the initial setup… Then see what I’ve changed on mine from there… I’ll post a list of parameter suggestions whenever I have time to go through all this.

This are my current Gecko 3" tuned parameters using ESC telemetry:

Gecko3-Tuned.param (19.5 KB)

I agree with @wicked1 for the most part. I think the most important are:

INS_GYRO_FILTER = 100
INS_HNTCH_ENABLE = 1 :slight_smile:
ATC_RAT_PIT_FLTD = 80  
ATC_RAT_PIT_FLTT = 80  
ATC_RAT_RLL_FLTD = 80
ATC_RAT_RLL_FLTT = 80
SCHED_LOOP_RATE = 800

I know these filter settings are quite high, but if the notch is enabled correctly it should be fine and too low quickly leads to instability. I have these set on a 250, 180 and 160 without problems.
Then for 4s to prevent a flyaway on arming for first flight:

MOT_SPIN_ARM = 0.03
MOT_SPIN_MIN = 0.05

And to get a good tune

AUTOTUNE_MIN_D = 0.0003

I futzed with ACCZ a little, I suppose what I really should do is set back to defaults and see what is strictly necessary.

Without ESC telemetry this gets a lot harder because you have to get in the air and figure out your hover throttle and motor peak. For a small copter you could probably pick

INS_HNTCH_FREQ  = 200
INS_HNTCH_REF = 0.2

and not be a million miles off.
LOG_BACKEND_TYPE should be set automatically by the hwdef.dat

I think the yaw filter should be added to the list of bare minimum… At least a year ago the default was very low, and I had issues until I raised it (thanks to your advice).
Your PID’s are definitely lower than mine… Your roll value of .03 would give me control issues… would feel ‘drunk’. But I guess my initial suggestion of .08 is too high. Maybe .06?
All of the parameters you mentioned should definitely be included… and the PID’s.

But otherwise, what do you think about including more? My little brainstorming session last night was going over everything I’ve changed… But some might not be a good idea. And a little documentation would cover that… Like the bias issues. Maybe leave the P_NSE as default, but mention if it leans, check logs, look for an always increasing bias, adjust those settings.
I wouldn’t be able to arm in my area if I didn’t lower the GPS prearm check sensitivity. But that might be another one we could document rather than change.

And what about increasing the pilot speeds, etc… These small copters can definitely go faster. They’re smaller and safer.

I guess what I’m asking is should we just include the minimum required to get people in the air and able to auto-tune? Or should we take advantage of the fact we’re making small copters and don’t need to worry about someone chopping their head off w/ 16" props, so we can add a bit of performance out of the box?

The PIDs for my 3" are half those for my 4" which are half of those for my 5" so I think standard PIDs are not possible unless we have a battery/size combo. But that might be fine - we already have frame/battery templates for larger copters

it is a tough one to deal with. it was resulting in cpu overload often, and seems to have relevance to NODMA options on UARTs, do we really need it arbitrarily? i ran it on the kakute f7 mini - it works, but, i know on older kakute f7 it was causing crashes when cpu was sporadically loaded to 100%.

as of set of params for my 4" tuned gecko model - here it is. gecko4kakute110419.param (22.1 KB)

it was re-tuned after getting filter to work, i think.

as of 3" model - here is the diff between your pids and mine, and i think we have the same frame of 3" gecko?

|ATC_ACCEL_P_MAX|311297.6875|0|
|ATC_ACCEL_R_MAX|441499.40625|0|
|ATC_ACCEL_Y_MAX|92158.4765625|0|
|ATC_ANG_YAW_P|12.80016040802|18|
|ATC_INPUT_TC|0.119999997317791|0.08|
|ATC_RAT_PIT_D|0.00108707905746996|0.0003|
|ATC_RAT_PIT_I|0.0585125312209129|0.075|
|ATC_RAT_PIT_P|0.0585125312209129|0.075|
|ATC_RAT_RLL_D|0.000617525423876941|0.0003|
|ATC_RAT_RLL_I|0.027447460219264|0.075|
|ATC_RAT_RLL_P|0.027447460219264|0.075|
|ATC_RAT_YAW_I|0.0158658903092146|0.03024306|
|ATC_RAT_YAW_IMAX|0.222000002861023|0.22|
|ATC_RAT_YAW_P|0.158658906817436|0.1|
|AUTOTUNE_MIN_D|0.00100000004749745|0.0003|

I’m asking myself if its really possible to make some sort of usefull preset without taking into account 1S - 2S - 3S - 4S options and the relative motor’s KV, maybe this is possible, but how could it be correct for either 2 blade or 3 blade propellers too?

Instead about SCHED LOOP RATE, I’m using a F4 Flight controller and I’m flying with main loop at 1000 since 1 year on more than 40 copter in a swarm rig, without any issue.

Interesting. I am running with this on F4 and long FFT without issue - but there have been quite a few improvements here I think.

So ATC_ACCEL_*_MAX I set to zero to get maximum responsiveness, I’m guessing yours are from autotune which I’m sure is fine.
ATC_INPUT_TC - I set low to increase responsiveness but for new pilots that’s probably the wrong thing - the default or higher is probably fine.
Your RLL/PIT D looks really high - did you autotune this? What size motors/battery? I think you should reduce AUTOTUNE_MIN_D and see what another autotune gives you - I think your D will come down quite a lot, and I don’t think you need it this high - you will be heating up your motors
AUTOTUNE_MIN_D is really too high by a long way!

Are you using DShot? If so what speed?

so, those 2 params above i just altered and it seemly fixed crazy vibrations on the 4" model. it is way smoother now.
everything shown for pids is after auto-tune, i did not tinker with it afterwards. i will try to autotune it now, later, but it is not clear when rain and wind will calm down.

as of the build - it is gecko 4, uses aramattans titan mini 1407/3650kv, 850mah 95c 4s tattu.
i did not resolder tekko32 esc yet, plan on doing it some time when i will be sufficiently bored. for now it uses same one nano v6 came with, 25a one, do not recall the name.

anyway, last flight was pretty good after bumping those 2 filters to 80hz, not sure how it was missed - they were left at 20hz.i did not expect much of a change due to that, but, it actually did matter a lot.

btw, on the 3" CTUN->N sits almost always around 200, on the 4" it sits around 116 at loiter.

when time permits i will try it all on both my 6" racers. they were pretty good tuned before, so, it wil be interesting to see how it will go.

Do you use the titan minis on the 3" as well? My F20’s are very similar hence why I think your D is too high.

Yeah the target filter thing is a weird one - I’m not sure @Leonardthall has figured out why it needs to be like that, but you are not the only one who had a wobbly copter when set at the default!

Are you punching the 3" much? My hover CTUN->N might be 215 but it goes up to 350 if I push the throttle to max.

DShot 1200 in every copter. In the recent BlHeli32 now its possible either a new DShot2400!

That’s good to know. I might try that. What FC are you using?

I’ve had no issues w/ loop rate @ 800… also flying for over a year… F4.

About ‘default pid’s’, we only need them to be flyable enough to hover and engage auto_tune.
But you’re all way lower than me on 2s. And everyone’s roll seems to be lower, so maybe we’ll set roll and pitch differently.
We just need something where the 4s setups aren’t vibrating too much to fly. And 2s setups have enough to still be in control. Anything is better than the current default.
Maybe .04 for roll, and .06 for pitch? I’ll have to try those and see if mine is flyable.

1 Like

I suspect that might be tricky - D from my 250 would burn the motors on my 160 …

In general the battery voltage and KV will offset each other and result in less parameter spread than we might expect otherwise.

We have a fix that slows the loop rate down if we start overloading the CPU so this problem should be much less severe now. The main problem now is the slowing of the loop rate will cause the filter frequencies to move a little.

I would not suggest this for best performance or for the defaults. The Autotune values can often be doubled but with the post autotune values will result in very reliable response from the aircraft.

If that filter is set equal to the D term filter you should be fine. This is a new filter so we are still learning what it should be set to. The main purpose of this filter is to reduce the noise contribution of the low rate RC updates (50 Hz) and the EKF update (depends). This results in a smoother output to the ESC and all the good stuff that goes with it. I want to add ramping on the RC input and EKF to further improve this, especially on small aircraft that can’t keep the frequency of these filters low enough to effectively filter these noise sources.

I would be interested to hear from everybody how low they can set the target filter on roll and pitch before they compromise their performance.

This is right. We are not looking for the optimal parameters but safe starting parameters that will reduce the chance that people miss a parameter they need to set.

We just need enough to safely get to autotune. Some pilots may need to double specific pid values because the aircraft is too loose before they can do autotune.

hi, nope, not at all. moreover, i do not like those titans much at all, neither bigger ones nor those 1407. they develop bearings play quite fast and, just do not feel well to me. but, for now, it works.
this 4" build goes about of 30 m/s top speed now, i think i could make it up to at least to 50m/s with better ESCs and motors, but dunno which motors i want there yet, will see. i have tornado t1 set, but it is extremely notchy and was a problem to tune for. may be with this new filtering it would actually work, as they are quite torquey, those motors, with really strong magnets, but, it produces tons of vibrations.

on 3" i have motors that work and fit much better - emax rs1306 4000kv. they are much less notchy and vibrations are much lower overall. those 1306 fit 3" prop well and it just feels right as it goes, if you know what i mean. :slight_smile:

this one

in 3800kv would be a good match with a 45A Tekko32 ESC and Kakute f7 mini, but i am not sure if it will sit well on gecko 4" arms. and, it is an another $80 into the wind. :slight_smile: