Roll oscillation/overshoot and quicktuning

I am trying to get a new hexcopter stable with a Cube Orange autopilot, Tarot T960 frame (X configuration), 18 inch props, TMotor 80A ESCs, and T-Motor U7 420Kv motors.

I have not loved the autotune mode due to our limited flight area and wide movements, and had a good experience with the VTOL quicktune script before. I got the copter stable enough and vibration free in Alt Hold, then ran the quicktune script to get a good set of rate parameters, which it seems to have done. One note is my 2 cents on the “T-Motor and MOT_THST_EXPO” debate: it didn’t seem to do well flying with this at 0.2, so we did a (crude) thrust stand test and got a value closer to 0.6. Based on this I set it back to the default 0.65 and that made the copter more stable.

But there is still this persistent overshoot in the roll axis in Loiter mode. I tried reducing ATC_ANG_RLL_P by 60-70% of the default 4.5 to 1.75 but it still persists and makes me feel like I am going too low. Does it need to be raised? Is there some other underlying cause I’m missing? Are the rate gains bad? Do I have to suck it up and use the autotune mode?

Here are two logs, the first is the complete log of running the VTOL quicktune script and then another flight after doing some brief testing in LOITER. The second log contains my experiments with reducing the ATC_ANG_RLL_P parameter.

There’s some higher than desired Z vibrations. Check your props are tracking well, and that none of the arms/motors are loose.

As for the tuning, my vote is to run autotune. You can see the roll oscillations, but the pitch could be dialed in better as well.

Thanks, I had wondered about that. Is it generally expected that the vibrations in all axes be pretty equal? I will double check the mechanical aspects.

Just to confirm, do the values of ATC_ANG_{PITT_RLL_YAW}_P affect the autotune at all? I didn’t think so but want to be sure. I know it adjusts them in its course but they don’t have to be very good to begin do they?

I was able to halve vibrations overall by replacing a couple bad propellers (though they seem to not be the best quality but they’re what I have), removing the motor vibration bumpers and hard-mounting them, and adjusting the notch filter to target the lowest frequency peak at 50Hz instead of the highest magnitude at 100.

I tried to run the autotune but it complained that it could not level after several iterations and suggested manual tuning. I wonder if this was due to the wind, or the fact that the gains need to be reduced from what the script determined. Log is below. I also have some zooming around in LOITER and ALT_HOLD to see how things are doing. There is certainly some overshoot but it does not seem grossly ill-tuned to me. I would like it to be better though.

Can you get MOT_SPIN_MIN,0.15 to be a fraction lower and still be OK for descents? Maybe 0.13 ? You dont want to cause a desync so leave it at 0.15 if you have to.

I would also change these
and recheck the next log to verify these HNOTCH settings, then put back INS_LOG_BAT_OPT,2 for another test flight.
If that HNOTCH works out OK then try Autotune just for pitch and roll - do yaw later, it’s less critical

Thanks for your time reviewing this.

I had a couple questions before changing:

  1. I’m not sure what to look for when lowering MOT_SPIN_MIN, does anything else need to be changed too? I recognize the hover is very close to it but it looks like the motor PWMs bottom out only when the copter is already touching the ground. Desyncs would obviously be a very undesirable outcome.
  2. Why change the notch frequency? I imagine you saw energy at 30Hz but that was pretty dynamic flight in the log. Just hovering it’s close to 50. Should INS_HNTCH_FM_RAT be adjusted instead/too?
  3. The Z seemed good to me, what is the reason to change those parameters? I do see advice online to change PSC_ACCZ_P to be close to MOT_THST_HOVER but it’s not clear why.
  4. Is reducing the INS_ACCEL_FILTER due to vibration? It turns out I did not actually change the levels very much outside in real flight unfortunately.

I changed the INS_ACCEL_FILTER but elected to not touch the HNTCH settings yet. I will triple check that but it seems like the current setting is good based on the instructions on the wiki. I also will look at the PSC_ACCZ settings and MOT_SPIN_MIN later but I have not seen issues in Z or with the motor minimums yet.

I also did manage to reduce vibrations some by adjusting the landing gear.

I did the autotune in two separate flights here: logs

It looks and feels a lot better now. The maximum accelerations have reduced which feels friendlier and there is much less overshoot. I deliberately tried to upset it near the end of the second log and it got a little dicey but recovered. I think I was just asking for trouble there.

I will get back to you about the PSC_ACCZ and MOT_SPIN_MIN. Anything else to try? Do you think there is too much oscillation in the motor outputs still? Thank you very much again.