X8 Motor Balance / position hold on first flight

I finally flew my newest X8 today and while it flew ok I noticed some issues concerning “motor balance” so…
could some tell me what order the motor balance channel averages are given in on an X8 config , perhaps it is the lower motors not pulling there weight or one of the mounts is tilted??

Also attaching the log… while it flew well in altitude hold every time I used position hold it seemed to move all around even up and down… perhaps it is my gains? as I am using PIDs from a previous x8 cube I built

attaching the log and a photo of the auto analysis… https://1drv.ms/u/s!AmW8JONezY1UgpEPjmdidwiFXpZj2g?e=tGNA6S
all input is appreciatedlog analyzer

Looking at that log, the motor balance looks fine to me. None of the outputs deviate from the others too much. Don’t worry about using the Auto Analysis, it’s too outdated.

Attitude control needs a bit of work though:

Use this spreadsheet to set all the initial values it offers, given your prop size and battery cells.
For a Quad X8 use the size of a single prop, don’t add sizes of two props together just because you have two on each arm :slight_smile:


Then probably increase these a bit
ATC_ANG_RLL_P,6.0
ATC_ANG_PIT_P,6.0
and “normalise” these a bit:
ATC_RAT_RLL_P,0.12
ATC_RAT_RLL_I,0.12
ATC_RAT_RLL_D,0.006
ATC_RAT_PIT_P,0.12
ATC_RAT_PIT_I,0.12
ATC_RAT_PIT_D,0.006

Do a tentative take off and look for oscillations, if so land and reduce all those values by about 10% and retry until there’s no visible oscillations. If it flies OK just do some gentle flying around and hovering. Let’s see that log file.

As far as I know there’s no advantage to using Oneshot with these types of multirotors, PWM will work just as well. But if you do have BLHELI32 ESCs we can easily set up harmonic notch filtering too, you just have to get the ESC telemetry wired up to a serial port. Even if you’re not using DSHOT you can still configure the ESCs to “auto telemetry”.
https://ardupilot.org/copter/docs/common-dshot-blheli32-telemetry.html
If you cant get ESC telemetry working, we can still help to set up harmonic notch filtering. Flight and tuning will be improved, it’s worth it.

This stands out as some sort of typing error or fat fingers :slight_smile:
WPNAV_RADIUS,304.79998779296875

Here’s a link to the complete tuning guide:
https://ardupilot.org/copter/docs/tuning-process-instructions.html

Thanks Shawn

I will make changes as u suggest…

Do you see an issue with clipping on 3rd accelorometer? The copter has very low vibe…

I have seen several cubes with this issue… lately I swap them with the orange cubes and the clipping dissappears

I have read that auto telemetry might cause an issue because the time when the telemetry information is transmitted by the single esc is not coordinated by the flight controller.

Is it worth non the less to use auto telemetry and is this based on real world experience?

THX, Tobias

@xfacta
updated parameters PIDs
Thanks again for your help, if you have time, could you look at the latest log attitude vs input? and give your advice… your initial advice was a huge help
https://1drv.ms/u/s!AmW8JONezY1UgpZ5k1Gni85UM7itdw?e=VXMUZy
I did lower some of the values for slightly smoother flight for a photogrammetry uav, but I value your input … you may also notice I switched the blue cube for orange as it showed clipping… perhaps someone could give me insight why on the same copter same mounting but different cube the clipping disappears?

The best way is to tune at minimum take off weight, for best use of the components (motor/props/ESCs) , then adjust these to suit your payload and mission:
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)
ATC_INPUT_TC,0.2 <- higher is softer

Attitude control looks a lot better now.

Set BATT_FS_CRT_ACT,1

What I would do now is set up the Harmonic Notch filter, try increasing the INS_GYRO_FILTER to whatever the spreadsheet suggests, then do a Autotune.

HNOTCH phase 1
INS_LOG_BAT_MASK,1
INS_LOG_BAT_OPT,0

  • hover test in ALTHOLD for 1 minute at least, check FFT in MissionPlanner

HNOTCH phase 2
INS_HNTCH_ENABLE,1 <- set this then refresh params to see the rest
INS_HNTCH_MODE,1
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_OPT,2

  • hover & dynamic test, check FFT results and adjust FREQ and BW

HNOTCH phase 3
INS_LOG_BAT_MASK,0
INS_LOG_BAT_OPT,0

  • no extra logging, assumes HNOTCH is working great

If you’re not sure about the Harmonic Notch setup, then post a link to a .bin file after “phase 1”.

I completed the phase one, however when hovering in altitude hold I had to make several adjustments due to wind… hopefully the log will work
https://1drv.ms/u/s!AmW8JONezY1UgpZ62bPCHIoQtEFDcw?e=ARTgGQ
I am interested in learning to do this on my own however any help you could give so I can follow along is much appreciated
Thanks

OK, set these for your next test flight:

INS_HNTCH_ENABLE,1 <- set this then refresh params to see the rest
INS_HNTCH_MODE,1
INS_HNTCH_REF,0.3737
INS_HNTCH_FREQ,114
INS_HNTCH_BW,57
INS_HNTCH_ATT,40
INS_LOG_BAT_OPT,2

And you should be able to set these too:
ATC_THR_MIX_MAN,0.5
PSC_ACCZ_I,0.7474
PSC_ACCZ_P,0.3737

Do another test flight, a bit more dynamic if you like.
And you should be able to run Autotune if there’s no wind. You can run one axis at a time if you need to with the AUTOTUNE_AXES parameter ->
7 = All
1 = Roll Only
2 = Pitch Only
4 = Yaw Only
Set up Autotune as a flight mode on your transmitter. Take off and try Loiter mode to make sure everything is working OK, switch to Autotune - once it definitely finishes twitching just bring it back and land without changing modes, disarm and wait 30 seconds.
Now arm and fly in your chosen flight mode to test it out.

I flew the copter with the filter this morning, I think it flew great but held off auto-tuning as the second battery I have is 270g heavier (13000mah vs 16000mah) so I have been using the lighter battery The log is attached , vibe looked a little higher but was fling more aggressively
https://1drv.ms/u/s!AmW8JONezY1UgpZ8NTIy9OTW3dD1tQ?e=KAZfSk
Will the heavier battery effect the notch filter?
I think you suggested changing the ATC_ACCEL_** for heavier battery, do you mean to reset this depending on which battery is being used?
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)

If everything looks good I will autotune next calm day… Thanks again, hoping to add notch to my other copters

Vibrations looked acceptable.
You could try these and another test flight if you get a chance, just to refine that notch filter a bit more:
INS_HNTCH_REF,0.378
INS_HNTCH_FREQ,102
INS_HNTCH_BW,51
It will be very interesting to see Autotune results :slight_smile:

If there’s not much difference in weight between those batteries I wouldn’t worry too much. Tune with the lightest one if you can, but probably no need to change those Accels unless that new battery is double the weight. It’ll be a gimbal and camera or heavy payload that you need to change the Accels for.

Thanks really appreciate everything…calling for rain tomorrow so may not get out till later in the week
The drone currently holding a sony a7r II, on a 2 axis gimbal facing forwrd balancing the drone CG it uses alex mos board so its rock solid, but for autotune I disable the gimble and tape the roll and pitch motor so its not interfering with the autotune

Hi Shawn… The X8 has been flying great thanks to your help…
Yesterday I added a notch filter to my favorite quad trying to follow the process you gave me…
The quad used 12.5" tri props similar design to the X-8 below are the two logs before and after changing the settings… could you have a look to be sure I entered the correct values,
https://1drv.ms/u/s!AmW8JONezY1UgpcPUlPoFibsCD1-Jg?e=6FxePh
also any comments on the set up is appreciated… I previously used autotune to tune the copter you have been a great help!
Thanks
Mike

It looks good. The HNotch is definitely working well.
You could slightly change this: INS_HNTCH_REF,0.2781 to 0.2780

Any reason why ATC_ANG_PIT_P,7.976295 and ATC_ANG_RLL_P,17.8 are so different?
EDIT: Ah yes the gimbal and camera!

Your MOT_SPIN_ARM and MOT_SPIN_MIN are very close together. MOT_SPIN_MIN might be able to go up to 0.12 and MOT_SPIN_ARM might be able to go lower than what it is now, but test MOT_SPIN_ARM for reliable start-up with MissionPlanner motor test. It will be interesting to check motor PWMs during aggressive flight (not just hovering) and descents, compared to MOT_SPIN_MIN.

You can set these
ATC_RAT_PIT_FLTD,17
ATC_RAT_PIT_FLTT,17
ATC_RAT_RLL_FLTD,17
ATC_RAT_RLL_FLTT,17
ATC_RAT_YAW_FLTT,17

Also I’d be interested to see what difference these make before Autotune if you are able to try them and post another .bin log
ATC_RAT_PIT_D,0.0067
ATC_RAT_RLL_D,0.0078

Then after all that, run Autotune again and this should come out very tightly tuned :slight_smile:
How it is now, many people would be more than satisfied.

Thanks Shawn…
I will make the changes you suggest and send the log… As I mentioned the 6s quad I built is my favorite, it has the most hours on it of any of my copters… I recently updated the here compass to the here 3 but it Flys really nice…all my copters have altitude movement , eaning if i open it up across the sky then suddenly stop, the drone will visibly rise 3 ft ± yet the Hud altitude remains the same…I guess from barometer being effected by air movement across the autopilot…all my designs are the same see image

Yes see if you an put a cover over the FC area to shield it from prop wash.

Hi Shawn… attached is the log with more aggressive flight with updates you suggested…
https://1drv.ms/u/s!AmW8JONezY1UgpcQ2a_MdbkvuZRiAw?e=ffULEW

let me know what you think, seemed a little more twitchy…
can you tell me if compass offsets are ok, I calibrated the compass twice now since I switched to here-3 and auto analysis is still giving me a warning

Also I notice a little clipping on clip-2 I never noticed it on this drone before

Thanks
Mike

Try ATC_INPUT_TC,0.2 and see what you think about RC feel then. It wont change the actual PIDs/rates and so on, but it will smooth out the RC input more inline with carrying a gimbal.

Set INS_HNTCH_REF,0.273 since you MOT_SPIN and MOT_THST_HOVER are all sorted out. Motor outputs look really good.

Just set COMPASS_USE3,0 since it is most affected by current draw/throttle, even though you’ve done the compass/motor calibration. Don’t worry about the Autoanalysis since it’s a bit outdated and you’ve got no compass related warnings appearing in the log.

I couldn’t see a problem with Altitude at all, It looks a lot better than the previous log. But that’s probably something you still need to visually check.
That Clip2 starts early on in the flight, there’s something vibrating. I think Clip 2 relates to the IMU that is not isolated, so it will be most affected.
There is a 72Hz peak in the FFT so you might need a static notch, but best to see if you can nail down the cause of the vibration first. Save the static notch as a last resort.

Yes, it is definitely twitchy. Attitude control looks a bit different this time.
Last log I looked at, excursions from desired happened mostly when the craft was meant to be level

This log, you see there’s still excursions in the first segment of this graph, but otherwise pitch and roll versus desired is tracking really well but noisy.

It’s getting trickier to fix now… Here’s what I’d do:
Lower all these to slow things down a little and filter more noise:
ATC_ACCEL_R_MAX,57000
ATC_ACCEL_P_MAX,27900
ATC_RAT_PIT_FLTD,15.00
ATC_RAT_PIT_FLTT,15.00
ATC_RAT_RLL_FLTD,15.00
ATC_RAT_RLL_FLTT,15.00
ATC_RAT_YAW_FLTT,15.00
INS_GYRO_FILTER,30.00
Test fly and re-examine logs - Maybe secure that gimbal and run Autotune again. You can always reduce the ATC_ACCEL values after Autotune.
If it’s not much better then you’re going to have to increase logging and start some more manual tuning.
LOG_BITMASK,180223

Thanks Shawn…I will be back out in the morning to test…
What does the compass use “3” represent…parameters show 0- disable, “1” enable

BTW, I would love to see someone with more experience fly it. Its amazing how fast it can move
My piloting is to plan the mission and automate it…kinda boring but the models are cool… https://portalvhds9m50w2f473vf2.blob.core.windows.net/bentle-campus2019/extoncomplete092019/App/index.html#%2F

Hi Shawn… just a follow up on your methodology… It is excellent, I autotuned as you suggested the quad and it only took 8 minutes on all 3 axis… we used the quad and the x8 a little over 1 1/2 weeks ago capturing a town in mountainous western PA… in total nearly 5 hours in the air between the two copters mostly autonomous but we flew them manually at some instances also… Thanks again!

I was hoping you could have a look at the last copter I built (no really this is the last one).
I added the notch below is link to the pre notch flight and post…can you have a look I havnt run autotune as im having trouble with my radios yaw turning the copter during the post notch flight…
https://1drv.ms/u/s!AmW8JONezY1Ugpc_rdC69sYDaJh14w?e=AfiHq0

But you input has been super helpful and I value it greatly!
Thanks
M