X8 unstable descend

Hi all,

I am experiencing some issues with an X8 copter while descending or landing, sometimes it gets unstable. The same parameters and PIDs were also used for other similar copters and they are flying well.

Please check the attached log:
log_link

X8 Coaxial Copter
Pixhawk 4
Arducopter V4.0.4
230KV motors
24" props
6S Lipo, 30Ah

Thanks in advance!

See during descent a couple of the motors are going to minimum.

You’ve got MOT_SPIN_MIN at 0.18 , use the mission planner motor test to see if it can go a fraction lower, like 0.15 or 0.13 and still be reliable.
Also it looks like MOT_THRST_EXPO is wrong, normally for your props you’d have 0.77 as per the tuning guide, and in Leonard Halls immortal words about testing MOT_THST_EXPO

  • set too high you can see instability at low throttle <- this is you!
  • set too low you can see instability at high throttle

You ATC_RAT_x_D terms could probably come down to about 0.008

Use this spreadsheet and the tuning guide to set initial params, then you could easily set up the Harmonic Notch filter and run Autotune.
https://ardupilot.org/copter/docs/tuning-process-instructions.html
https://ardupilot.org/copter/docs/common-imu-notch-filtering.html

1 Like

Let us know if you need any help with the notch filter or further tuning.

See in Attitude graphs…


The Harmonic Notch filter will help to smooth that out and allow Autotune to do a proper job.

HNOTCH phase 1
INS_LOG_BAT_MASK,1 IMU 1
INS_LOG_BAT_OPT,0 capture pre-filter gyro data

  • hover test 1+ minutes, check FFT

HNOTCH phase 2
INS_HNTCH_ENABLE,1
INS_HNTCH_MODE,1 throttle based
INS_HNTCH_REF,hover_thrust
INS_HNTCH_FREQ,peak freq from FFT
INS_HNTCH_BW,peak_freq / 2
INS_HNTCH_ATT,40
INS_LOG_BAT_MASK,1
INS_LOG_BAT_OPT,2 capture post-filter gyro data

  • hover & dynamic test, check FFT results, adjust values if needed

HNOTCH phase 3
INS_LOG_BAT_MASK,0
INS_LOG_BAT_OPT,0

  • no extra logging, assumes HNOTCH is working great

Thank you for your answer!

I did a lot of flights with the copter, with the same old parameters, and the issue with unstable descend is happening very rare, maybe 5% of all the flights… regardless of the windspeed and wind gusts…

But still I decreased the MOT_SPIN_MIN to 0.1, and in the logs we can see much smoother ATT graphs for DesROLL vs ROLL and DesPITCH AND PITCH. Please see the attached logs, one was with MOT_SPIN_MIN 0.1, and another 0.2. Please check the attached logs.
MOT_THST_EXPO is 0.65 for my copter, which is already less than shown in the tuning-process-instructions page, because looking at the graph on the webpage, it should be 0.8 for 24 inch props, so I am still not sure If I should decrease it more.

I am waiting for your opinion about our last logs, to know If I need to proceed further with the Notch filter tuning.
Thanks a lot!
BR!

https://www.dropbox.com/s/qswezb3ias83ts0/mot_spin_min_0.1-anon.log?dl=0

https://www.dropbox.com/s/rbzlfdhhjgc5u3c/mot_spin_min_0.2-anon.log?dl=0

You are still getting motors going to minimum, but at least not for sustained lengths of time. You’ll have to add some dummy weight to keep motors up into a safe operating range.
Then you might be able to move MOT_THST_EXPO up to about 0.77. Try out that spreadsheet, just to compare for now, since you’ve got most things OK so far.

Definitely proceed with the Harmonic Notch Filter setup. Post a .bin log after each phase. Use AltHold mode for the tests. We will be able to help you with the frequencies and so on.
Are your ESC’s not BLHELI32 with telemetry? If by chance they were it’s definitely worth setting up the ESC telem and using that for the HNOTCH setup. Actually don’t bother - I just saw you’ve got a Pixhawk 4, and there’s only 4 DShot capable outputs on those, not enough for your X8.

EDIT: raise MOT_SPIN_MIN a little, like 0.12, so it’s not the same as MOT_SPIN_ARM - either that or drop MOT_SPIN_ARM provided you test that motors can always start reliably.

In the second log with MOT_SPIN_MIN,0.2 motors are spending a lot of time at minimum and this will lead to instability - surprised it flies that well at all actually.
Stay focused on adding a bit of dummy payload and MOT_SPIN_MIN,0.12 - and the Harmonic Notch Filter.
Once the HNOTCH is set up correctly, Autotune will get this flying like a race quad (well nearly :slight_smile: )

Hi,

I did some more test flights today, changed the MOT_SPIN_ARM to 0.09 and MOT_SPIN_MIN to 0.12. Also I tried different MOT_THST_EXPO, from 0.65 to 0.77, please check the attached logs. In my opinion it was the most stable with 0.69, agree?
Regarding the dummy weight it is not possible to add it, so I am doing the tests without it.
I will proceed with HNOTCH setup now. Just wanted to know your thoughts about MOT_THST_EXPO.

Thanks a lot!
Have a great day!

https://www.dropbox.com/s/de808ebu7jukr6e/2021-05-06%2014-37-40_MOT_THST_EXPO_0.65-anon.log?dl=0

https://www.dropbox.com/s/2v38g74zsd33woo/2021-05-06%2014-22-24_MOT_THST_EXPO_0.69-anon.log?dl=0

https://www.dropbox.com/s/pobo52zozhybiu2/2021-05-06%2013-43-26_MOT_THST_EXPO_0.73-anon.log?dl=0

https://www.dropbox.com/s/24755z37r0jjdua/2021-05-06%2014-08-58_MOT_THST_EXPO_0.77-anon.log?dl=0

Please see the attached logs, after HNOTCH phase 1:

https://www.dropbox.com/s/6et0kjhdmgzjwdu/2021-05-06%2015-49-32_HNOTCH_phase1_HOVER-anon.log?dl=0

https://www.dropbox.com/s/al2xxskfxhl8eed/2021-05-06%2015-54-32_HNOTCH_phase1_DYNAMIC-anon.log?dl=0

Thank you!

For the phase 2 you wrote that the INS_HNTCH_ATT should be 40, but it is out of range, (5-30). Should I proceed with the default 15?

Yes, MOT_THST_EXPO,0.69 looks the best there. That’s good testing, most people don’t bother but also in most cases the Tuning Guide gives good enough initial values.

You can ignore the out of range message.
I suspect you’ve already chosen these:
INS_HNTCH_ENABLE,1
INS_HNTCH_MODE,1
INS_HNTCH_REF,0.2876
INS_HNTCH_FREQ,40 <- technically could be 39, but see how the next FFT looks
INS_HNTCH_BW,20
INS_HNTCH_ATT,40
INS_LOG_BAT_MASK,1
INS_LOG_BAT_OPT,2
Now do some more dynamic flight and also check for a good range of stick movements not causing oscillations. If that works out well, and you check the FFT and those peaks are right down then you are good to run Autotune.
This should fly very well after your tuning, X8’s can have very good authority.

Considering that usually something with such large props would be carrying a significant or expensive payload you will want to investigate these:
ATC_INPUT_TC,0.2 through to 0.3, softer RC control
and probably set these so they suit your heaviest/most expensive payload:
ATC_ACCEL_P_MAX x (min_TOW / max_TOW)
ATC_ACCEL_R_MAX x (min_TOW / max_TOW)
ATC_ACCEL_Y_MAX x (min_TOW / max_TOW)

Hi,

I already did yesterday the phase 2 and 3, with these parameters:

INS_HNTCH_ENABLE, 1
INS_HNTCH_MODE, 1
INS_HNTCH_REF 0.287
INS_HNTCH_FREQ, 75 (the highest peak seen in the phase 1 FTT logs)
INS_HNTCH_BW, 37 (INS_HNTCH_FREQ \ 2)
INS_HNTCH_ATT, 15 (the default)
INS_LOG_BAT_MASK, 1
INS_LOG_BAT_OPT, 2

These are the logs, I see the peaks are lower now, comparing to phase1, is it good enough? Or I need to change the INS_HNTCH_FREQ and INS_HNTCH_ATT to 40 and INS_HNTCH_BW to 20 and do again?
Thanks a lot!

https://www.dropbox.com/s/yfxtt1u2u0geaa4/2021-05-06%2017-08-39_phase2_hover.log-anon.log?dl=0

https://www.dropbox.com/s/f5rz2b7h7rqkqx7/2021-05-06%2017-12-14_phase2_dynamic.log-anon.log?dl=0

https://www.dropbox.com/s/bx5pyyh7pufqbwq/2021-05-06%2017-46-43_phase3_hover.log-anon.log?dl=0

https://www.dropbox.com/s/d9pka9i4lrry65w/2021-05-06%2017-36-44_phase3_dynamic.log-anon.log?dl=0

Use INS_HNTCH_ATT,40

You might want to add a static notch, you’ve still got a real peak around 39 Hz like bad frame resonance or something
INS_NOTCH_ENABLE,1
INS_NOTCH_ATT,30
INS_NOTCH_FREQ,39
INS_NOTCH_BW,10

Before you try Autotune, I’d be tempted to try slightly lower rate PIDs and see if all the little shakes are reduced

ATC_RAT_RLL_P,0.12
ATC_RAT_RLL_I,0.12
ATC_RAT_RLL_D,0.0075
ATC_RAT_PIT_P,0.12
ATC_RAT_PIT_I,0.12
ATC_RAT_PIT_D,0.0075

Hi,

I did some flight tests after changing:
INS_HNTCH_ATT, 40
INS_HNTCH_FREQ, 40
INS_HNTCH_BW, 20.

After that I added the static Notch:
INS_NOTCH_ENABLE,1
INS_NOTCH_ATT,30
INS_NOTCH_FREQ,39
INS_NOTCH_BW,10
But after it I’ve noticed that the peaks in the FFT are a little higher, so It didn’t help, right?

Please check the attached logs, also I have to mention that I was flying in windy conditions, ~50kmh wind gusts.
Should I disable the static Notch (INS_NOTCH_ENABLE) and after that do the autotune? Or should I leave it enabled?

Thanks a lot!
Have a great day!

https://www.dropbox.com/s/n1l9nnqws1nh798/2021-05-10%2013-14-12_phase1_HOVER.log-anon.log?dl=0

https://www.dropbox.com/s/demdw96s22v4tp2/2021-05-10%2013-04-20_phase1_DYNAMIC.log-anon.log?dl=0

https://www.dropbox.com/s/dk94h6hmq702u2o/2021-05-10%2013-42-19_phase2_HOVER.log-anon.log?dl=0

https://www.dropbox.com/s/iiii63ap9tmagl9/2021-05-10%2013-46-14_phase2_DYNAMIC.log-anon.log?dl=0

https://www.dropbox.com/s/gbntbwwnfh445vv/2021-05-10%2014-06-50_phase2_staticNotch_HOVER.log-anon.log?dl=0

https://www.dropbox.com/s/2vb4blqlas1l279/2021-05-10%2014-10-43_phase2_staticNotch_DYNAMIC.log-anon.log?dl=0

Hi,

We needed to do some changes to our copter, now we added a slightly bigger and heavier camera, and also a bigger LiPo. I did again the phase 1 and phase2, with the same parameters, and there is still a small peak in the FFT graphs. Also I tryed phase 2 with Static Notch enabled, but as I see Static Notch is not helping. Please have a look at the logs if we are having the right INS_HNTCH parameters, or should they be changed because of the payload and battery change?

Thank you very much!
Have a great weekend!

Log Files:
https://we.tl/t-sUPlCEFwBm