How to improve AutoTune results on big quad coaxial X8 [RESOLVED]

Hello friends,
Ran autotune on all three axes and did a test flight after for a few minutes.

sample for the ATT before Autotune

Looking at the logs, I see that the attitude is much much better but not that great, maybe it’s because AUTOTUNE_AGGR is set to 0.05 ???
ATT after autotune


link to test flight log
link to new params

Should I simply raise the aggressiveness of autotune and run it again?
Is any issue seems odd from the logs?
Please help.

Best,
Gal

P.S.
Cube Black
8 * 380KV motors
top props 16x5.5
bottom props 15x5.5
AUW 4.3kg

To answer my own questions

I raised aggressiveness to 0.1 and run AutoTune again. Results are much less than satisfactory.
Desired Roll/Pitch are followed but not close as probably it should.

So, I am on my way to manual tuning and I followed closely the tuning sections of ArduPilot, however it seems like who wrote those sections forgot to mention the I and D gains which for lames/hobbyists like me this information is crucial to figure it out.

Any ways, from reading and watching some tutorials on Betaflight, I guess it should be same process though numbers are different and some capabilities are not available in AP.

You’ve got a lot of parameters correct, try changing these though and run another autotune.

ATC_RAT_PIT_FLTD,14.00
ATC_RAT_PIT_FLTT,14.00
ATC_RAT_RLL_FLTD,14.00
ATC_RAT_RLL_FLTT,14.00
ATC_RAT_YAW_FLTT,14.00
PSC_ACCZ_I,0.45
PSC_ACCZ_P,0.225
ATC_THR_MIX_MAN,0.50
AUTOTUNE_AGGR,0.1

Also for bigger craft, usually with expensive or sensitive payload, you might want a smoother response. This smooths RC inputs, the old “RC Feel” parameter:

ATC_INPUT_TC,0.2 <- experiment, 0.3 is softer still

You can set up Channel 6 on your RC if you’ve got a knob to use for tuning, or even a switch could do it:

TUNE,45
TUNE_MAX,0.15
TUNE_MIN,0.3

EDIT: fixed “FLT” parameter names that I had wrong
See this new spreadsheet:

2 Likes

Hi Shawn,
Thank you so much for looking into this, much appreciated.

So, I set the params per your suggestion and went out this morning to fly.
I have decided to go for the ch6 manual tuning (on YouTube it looks simple) however for a 60yrs old with no experience in manual tuning nothing I did seemed to make a difference (I went up to 1.3 on P term) and I couldn’t tell if it was good or bad.
first flight log
first flight params

I raised D and I a little though the quad seemed to fly worse. So after 2 batteries I returned to my initial PID settings where I thought the quad seemed OK.

So, I got brave and decided to add the second battery (all my tuning was on one battery) and it was a very bad experience, I think I was lucky I landed safely.


last flight log
last flight params

So, from that poor experience, I decided to go tomorrow for AutoTune with your recommended tune_aggr = 0.075 and hope for the best.

I shall upload the results here.

Thanks,
Gal

Did AutoTune this morning and here are the results which I am not sure of, roll and pitch doesn’t seem to follow closely the desired roll/pitch.

here are the params I ended up with

flight log
flight params

Any idea how to improve?
Thanks,
Gal

The tune is actually pretty good. With small changes in attitude there is some jitter/oscillation but the magnitude is low. When larger commands of pitch and roll are demanded it’s not bad. Any improvement will likely have to come with manual tuning. I would start with Rate Roll/Pitch kP with the current value if you want to attempt it at all.

1 Like

As @dkemxr points out the tune is not bad.
The ringing in pitch and roll may be helped by another autotune set at a lower aggressiveness but you would have to weigh that up against response.


Some of that ringing could also be due to frame resonance as there is a pronounced Z axis resonance at speed.

You also have a bit of spread on your motor outs which might be worth addressing.

1 Like

It would be interesting to see FFT analysis of this carft at Hover. Follow the process for batch logging in the Dynamic Notch Wiki and post that log. You only need to hover for a minute or so in AltHold.
https://ardupilot.org/copter/docs/common-imu-notch-filtering.html

These settings:

1 Like

@dkemxr @mboland,
much obliged for you reviewing,

It is great that the tune is better than I thought, until this heavy project, I used to run AutoTune and never looked back…

Would you think it would be beneficial to try manually raise P gains a little using ch6 and than feel the behavior in the air and review results in logs, i.e. take the the long way to paradise?
Currently when flying in PosHold, the response is pretty good (except on yaw) and I would hate loosing that.

@mboland motors outs: motors 1234 are 16x5.5 props and 5678 are 15x5.5 props, so higher rcouts to 5678 Wouldn’t that create such a spread?

I shall fly tomorrow morning (windless until 10am) and do the AltHold hover for FFT.

Thanks

P.S. the ACCEL MA on error rate of PIT/RLL seems to be almost double on the PIT, is it something of concern?

Try setting these:
AUTOTUNE_AGGR,0.1
PSC_ACCZ_P,0.221196
ATC_THR_MIX_MAN,0.5
This one is already close enough:
PSC_ACCZ_I,0.5 (0.442392 calculated)

1 Like

@dkemxr @mboland
Here is the FFT graph

log
params

If you want to try the Dynamic Notch filter these settings would be a good 1st attempt.
INS_HNTCH_ENABLE 1 (then refresh params)
INS_HNTCH_ATT 30
INS_HNTCH_BW 40
INS_HNTCH_FREQ 59
INS_HNTCH_HMNCS 3
INS_HNTCH_MODE 1 (note)
INS-HNTCH_REF .216 (note)

SET INS_LOG_BAT_OPT to 2 and then make another flight.

Note: I see in your log you have a field for CESC with data for 8 ESC’s that looks like ESC telemetry including RPM. Is this CAN ESC data? If so then you would want to use motor RPM as the reference for the filter not throttle. In that case INS_HNTCH_MODE would be 3 and the INS_HNTCH_REF would be 1.

Cool!

Normally I would use APM Planner for plotting but oddly it does not show individual CESC data. Good old MP does.

1 Like

Yes I use CAN esc’s. I might try this now or tomorrow. Thank you

I understand why you have the spread in Motor RPM on an X8 with different size props but I wondered how this would work with the Notch filter and ESC RPM as the reference. It uses the average RPM of all motors there is data for. So you might be OK or you might have to use throttle reference, not sure what will work best. The cutting edge is a reference from in-flight FFT which is in Master.I just started experimenting with that.

1 Like

Well, I plan to fly tomorrow and I already set the notch filter settings so I shall have fresh logs (if ap_logger.cpp will not crash on me again).
Thank you

hi @mboland @dkemxr,

I did an AutoTune on RLL/PIT this morning with AUTOTUNR_AGGR=0.08 didn’t do YAW since the wind picked up. I did one short test flight both in AltHold and PosHold so we can have the FFT results. Looking at the ATT in log seems like the diff between desired and actual is very far, however the quad feels much more stable so I do not really know and would appreciate your input.

log file
params file
Best,
Gal

The filter is certainly doing it’s job. Massive change in relative magnitude on those peaks. The tune doesn’t look bad. The same low magnitude jitter with small attitude commands and more overshoot on Pitch. At this point I would resort to manual tuning but you could try another autotune with an even lower aggression I suppose. Nice job so far Gal!

1 Like

Thank you Dave, seems like a little storm is heading here, hope it shall be over tomorrow morning.
I shall try to AT wit 0.065 aggr
Thanks

While most people seem to have great success with Autotune for me it has been hit and miss. More hit’s than misses for sure but I kind of like the challenge of manual tuning. It can be time consuming but most of my craft have WiFi radios so I can download the logs after landing and disarming and do a quick analysis, make changes and get it back in the air w/o powering down.

It sure would be nice to have more than one in-flight tuning channel available. Hint to the Dev’s :grinning:

1 Like

@dkemxr my challenge is not “technical” (60 yrs of age), it is simply a lack of knowledge to understand what I see, what is a twitch, prop wash or wobble. I don’t understand what I see in the logs i.e when you tell me the results of AT is pretty good, I don’t know why because I can’t find this information anywhere using either AP docs and even not using our big brother Google.

I tried using ch6 for rll/pit p but as I mentioned, not enough knowledge.