Tuning advice needed

Hi all,

I’m trying to set up an 18kg X8 multicopter on Arducopter 4.0.3 and had some issues with handling during autotune. It didn’t seem too bad in stabilise or althold, so I proceeded to autotune.

I have followed the instructions for initial setup for tuning carefully but I’m unable to complete autotune because correcting for wind drift is a bit sketchy - when returning the stick to centre, even fairly gradually, the copter overshoots significantly n both pitch and roll:

Strangely I got another significant overshoot after switching back to althold, which I hadn’t seen before starting autotune. I had understood that the original values should be re-applied when switching out of autotune?

Here is a zoomed in view of the one that occurred in atlhold:

I’m unsure what manual steps I should take to improve the situation. I’m unsure if I should reduce the roll/pitch P gains, increase the roll/pitch D gains, or both. Current (and pre-flight) values (the defaults I believe) are
ATC_RAT_PIT_P,0.135
ATC_RAT_PIT_D,0.0036
ATC_RAT_RLL_P,0.135
ATC_RAT_RLL_D,0.0036

Autotune (aborted) appeared to make the ATUN.RD converge to 0.0053 and ATUN.RP was fluctuating around 0.09 within in a few steps.

Should I try these values?

Unfortunately I’m not permitted to post the log files - apologies, I know that’s frustrating and makes helping far more difficult. Happy to provide further info/screenshots though. I really appreciate any assistance.

what about vibration ?
send graph of VIBE and RCOUT values
also under RATE , Rout and Pout will help

Here is VIBE:


Clip 0, 1 and 2 are zero while in air.

Zoomed in view on last major overshoot, in AltHold mode:

RCOUT for all 8 motors. I’m uncertain why there are sustained and noticeable differences between co-axial motors eg 3 and 8, 1 and 6

Rate ROUT and POUT:

A zoomed in view of the last major overshoot, in AltHold mode:

With a 18Kg drone, I would recommend the latest stable version 4.0.4

Ok first try to physically balance your copter (its hard to say its an unbalance or twisted arms with this image) then configure first step of harmonic notch filtering and send preflight fft analysis

https://ardupilot.org/copter/docs/common-imu-fft.html

Will try the upgrade to latest stable release although the release notes didn’t mention anything that seemed relevant.

I checked the CG before flight and it was pretty good. The frame (foxtech D130 Titan) does have a rather high CG. I may try lowering the battery platform slightly as there is space to bring it down 5 or 10mm.

I had balanced all the blades.

Do the vibes look bad? I’ll look at the notch filtering page and see what I can do. The ESCs have RPM feedback but there is no documentation and it seems to be a proprietary format :slightly_frowning_face:

I’m currently awaiting new props due to a tip over on landing :frowning_face:

I had checked the arm alignment previously.

Can you post your .param file? Also what props, ESCs, motors and batteries (cell count) are you using?

The motor and ESC are these Foxtech/Hobbywing combos:
https://www.foxtechfpv.com/foxtech-8120-100kv-foc-esc-hv-combo-2.html
The props are Foxtech Supreme 3010T 30"x10" CF

I’m using 12S 22000 (2x6S 22000 in series)

Here are the params:

D130 2020-09-21 preflight.param (17.9 KB)

I have tried doing the FFT analysis on the .bin file from the flight using the instructions here:
https://ardupilot.org/copter/docs/common-imu-notch-filtering.html
However when I click the “new DF log” button, nothing appears. None of the graphs even have Hz as the axis. Is this because I didn’t have FFT_ENABLE = 1 for the flight as per your link? It’s listed as a future feature/parameter for 4.1 so I don’t think this exists for 4.0.3 or 4.0.4?

Thanks for all the input.

Set INS_LOG_BAT_MASK to 1

1 Like

@xfacta @Leonardthall
please help me with tuning of my X8 (octocopter) loaded with AC 4.0.4

i was started with arducopter tuning instruction and modified the some parameter as mentioed in the tuning page. this are the my parameter file 2020-09-22 20-01-30.log.param (18.2 KB)

vibe on all axis are seems to be ok.
my configuration are:

  1. U8ll 85kv motor
  2. Alpha 60A HV
  3. T.motor proprller 30inch.
  4. FC CUAV v5+ loaded AC 4.0.4
  5. Takeoff weight is 18kg.

initially takeoff in stabilize mode there was gentle takeoff anf gave stick command look like lazy command hover for some time and changed to loiter mode .
after changed to loiter mode even in throttle stick centered the copter slightly increases and decreases its height randomly.
i have enabled FFT log and attached here.
https://drive.google.com/file/d/1nOIDqCdxS7pIFPBsZ86Cx2X0ncmxa8Ot/view?usp=sharing

i have setted INS_GYROFILTER value to 16hz and ATC_XXX parameter also changed according to fliter frequency.

please look at the log and help me with parameter .

Thanks, I will try that. Waiting for new props atm.

Hi kalai1219,
Your clock-wise motors are working harder that CCW, so there’s probably some motor-mount twist there.
Current monitoring is not working properly.
It’s hard to tell much from that log because you don’t get up out of ground-effect.

Start with setting these and then do more test flights, ALT_HOLD should work be working well before you go to Autotune.
ATC_INPUT_TC,0.2
ATC_ACCEL_P_MAX,18000
ATC_ACCEL_R_MAX,18000
PSC_ACCZ_I,0.44
PSC_ACCZ_P,0.22
ATC_RAT_PIT_D,0.003
ATC_RAT_PIT_I,0.10
ATC_RAT_PIT_P,0.10
ATC_RAT_RLL_D,0.003
ATC_RAT_RLL_I,0.10
ATC_RAT_RLL_P,0.10
MOT_THST_EXPO,0.2
MOT_PWM_MIN,1100
MOT_PWM_MAX,1940
MOT_BAT_VOLT_MAX,50.4
MOT_BAT_VOLT_MIN,39.6

The stand-out items are those ESCs -> linear throttle and a set PWM range. And I’ve suggested softer RC input feel and safer PIDs to start with.

And check and set these too:
BATT_ARM_VOLT,44.3
BATT_CRT_VOLT,42
BATT_LOW_VOLT,43.2
BATT_FS_CRT_ACT,1
BATT_FS_LOW_ACT,2

Check and set your RC Failsafe too, it’s very important - test this on the ground.
FS_THR_ENABLE,1
You might also want to set up a RC channel that will do EMERGENCY STOP in case you look like destroying all those props.
RCx_OPTION,31

And set up the Fence for safety - this will also force you to wait for a 3D Fix before you can arm - this is a good thing :slight_smile:
FENCE_ENABLE,1
FENCE_TYPE,3
FENCE_ACTION,1

1 Like

Hi David E,
You need almost exactly the same params as I specified immediately before this reply, for Kalai1219.
Treat all those params as essential, but check they suit your situation (see the spreadsheet link below).
I think that Foxtech ESC doesnt have linear throttle, but you’ll need to lower your MOT_THST_EXPO,0.84 to about MOT_THST_EXPO,0.80 If it does have linear output you’d need to set MOT_THST_EXPO,0.2 (like some T-Motor ESCs)

Once you’ve got this flying reasonably in ALT_HOLD and LOITER then you can move onto Harmonic Notch filters and Autotune.
Dont try to use PIDs from half way through an aborted Autotune - Autotune is testing for extremes, simplistically, so anything you try might be too aggressive.

Use the Tuning Guide to get the PIDs close - Keep P and I terms equal.
https://ardupilot.org/copter/docs/tuning-process-instructions.html

And this spreadsheet to help:

You might be able to try PIDs a bit softer that standard/defaults, but not too soft that you lose control. There could be some experimentation needed:
ATC_RAT_PIT_D,0.003
ATC_RAT_PIT_I,0.12
ATC_RAT_PIT_P,0.12
ATC_RAT_RLL_D,0.003
ATC_RAT_RLL_I,0.12
ATC_RAT_RLL_P,0.12

EDIT: fixed MOT_THST_EXPO section

3 Likes

Thank you for your valuable suggestions.I will take this as reference pid and make test flight and comeback again .

Many thanks for the suggestions Shawn. I note that some of the numbers differ slightly from those I got from the tuning guide on the wiki.

I had previously set the MOT_BAT_VOLT_MAX and MOT_BAT_VOLT_MIN to zero because the documentation says the maximum is 35, anything above this is ignored.

Also, when doing autotune, what value for AUTOTUNE_AGGR would you recommend?

Where did you read that?:

For Autotune aggressiveness the default is best, 0.1
If you cant get a good stable/responsive aircraft in ALT HOLD and LOITER I used to think you could use something like 0.05 or 0.08 for aggr., and you probably still can. These days my preference would be to get the filters and PIDs closer to correct first and leave aggr. at 0.1 . Leonard says this is the best value and in fact you can go higher - but none of us ever do :slight_smile:
Probably try some maneuvers and then check logs for motors going to maximum or minimum outputs to indicate poor stability or risk of desync - then move on to Autotune if you’re satisfied the aircraft will survive aggressive twitches.

https://ardupilot.org/copter/docs/parameters.html#MOT_BAT_VOLT_MAX shows range as 0-36V. Mission planner says that values above 36V are ignored.

Thanks Shawn.

Strangely it wasn’t the autotune twitches that were causing problems, it was releasing the sticks after flying the copter back upwind. As I released them to centre (I did so gently) the copter would continue to rotate in pitch and roll past level at a constant rate, until I manually corrected it in the other direction. It then settled to level.