Pitch oscillation during braking maneuver

I have a 7 inch drone with around 1kg which sometimes presents pitch oscillation during braking after releasing the sticks in loiter mode after a forward flight. I analysed the following log and managed to find that when this problem happens it seems to be at the same moment when the back two motors reach the minimum pwm value but I don´t know if this is the true cause.

The problem is that I don’t know how to avoid these oscillations. Could it be the MOT_ parameters needing ajusting? I think autotune gave good results for PID values so I don´t think PID rates are the fault here. Please let me know if you have any suggestion

I’m guessing this is a pretty well powered quad. Those motors hitting minimums suggest that either the tune is too aggressive for the configuration, or the MOT_SPIN_MIN is a bit too high.

Maybe it is the tune thats too agressive. I lowered the INS_GYRO_FILTER to 40hz and the FLTD and FLTT values to 20 and did a new autotune and Pterm values lowered from 0,90 to 0,60 and D term from 0,003 to 0,002. However I still did not have the chance to test in fast flight.

However, if this is the solution it is weird because I thought that increasing PID values was the way to go to deal with propwash oscillations.

I would go back to the filter and rate values in that log.
Then I would reduce these by 10% and see what effect that has.
ATC_ANG_PIT_P 24.5 → 22.0
ATC_ANG_RLL_P 24 → 21.5

and these if reactions are a bit too snappy
ATC_ACCEL_P_MAX 255000 → 229500
ATC_ACCEL_R_MAX 280000 → 252000

Ascent and descent looked good, MOT_THST_EXPO is probably correct, so that’s good.

I already tried that but had no effect. In fact I tried almost everything with the previous tune. Increased and decreased manually the P and D term values, ATC_ANG_PIT_P, ATC_THR_MIX_MAX increased to 0.9, tried different INS_HNTCH_MODE and nothing solved the problem. However I never reduced the PID as low as the last autotune and still have to test

OK fair enough. Good on you for trying everything.
It will be interesting to see how those new autotuned values work out.

Also try lowering MOT_THST_EXPO to about 0.55 or 0.50 and see if that makes a difference.
Hover will have to relearn, so give that some time in AltHold or Loiter.

I never tried changing MOT_THST_EXPO because I was not sure how it would affect the drone. I just used the recomended value for a 7 inch. Is it necessary to do a new autotune after changing that?

Worth checking against the parameters I got: ArduCopter 7" Long-Range Standard Build

I do not see oscillation in braking

Andy’s Chimera 7"

ATC_ACCEL_P_MAX,297466.1
ATC_ACCEL_R_MAX,332351.7
ATC_ACCEL_Y_MAX,72000
ATC_ANG_PIT_P,18
ATC_ANG_RLL_P,18
ATC_ANG_YAW_P,11
ATC_RAT_PIT_D,0.002445553
ATC_RAT_PIT_FLTD,75
ATC_RAT_PIT_FLTT,30
ATC_RAT_PIT_I,0.1238205
ATC_RAT_PIT_P,0.1238205
ATC_RAT_PIT_SMAX,40
ATC_RAT_RLL_D,0.001506945
ATC_RAT_RLL_FLTD,75
ATC_RAT_RLL_FLTT,30
ATC_RAT_RLL_I,0.08245585
ATC_RAT_RLL_P,0.08245585
ATC_RAT_YAW_D,0.02
ATC_RAT_YAW_FF,0.0043
ATC_RAT_YAW_FLTD,60
ATC_RAT_YAW_FLTE,1.408289
ATC_RAT_YAW_FLTT,30
ATC_RAT_YAW_I,0.01972056
ATC_RAT_YAW_P,0.1972056
INS_GYRO_FILTER,150

Well… I tried the previous tune that I got after autotune with ins_gyro_filter at 40 hz that resulted in lower PID values… and the drone crashed after releasing the sticks and braking from aprox 70kmh entering a yaw spin out of control.
Maybe the lower gyro_filter did limit the autotune max PID values which made that the drone wasn´t able to recover from the braking maneuver.

Here is the log of the crash:

I have other drones equal to this so I can continue tests with the others. My only problem with @andyp1per values is that I can´t increase ins_gyro_filter past 60 hz (and consequently FLTD and FLTT values to 30) without getting high frequency pitch oscillations on hover and hot motors

You need to have good notch configuration to get good control - how are you controlling the notch? This will all be noise related…

Also have you checked for frame resonance?

I am using esc telemetry to control the notch.

I was able to make a new autotune moments ago with ins_gyro_filter at 57hz (and FLTD and FLTT at 28,5) which is the recommended value for a 7 inch by the “initial parameter sheet”. The PID values raised a lot. This is the first time I was able to get the drone flying with this value of gyro filter without getting pitch vibrations. Probably it is due to the fact that I ajusted the ins_hntch parameters better than before.

Here is the log of a normal flight (not high speed) with new PID values:

Should I try keep increasing the gyro filter, fltd and fltt parameters and perform new autotunes until reaching vibrations?

You need to drop INS_HNTCH_FREQ and INS_HNTCH_BW but keep the proportions the same. This is the braking problem - your INS_HNTCH_FREQ is the lower bound and you are going below this when you brake. Because you are using ESC telemetry this is fine.

You should do a hover and check there is not a frame resonance frequency you are missing - this may well be the reason the gyros won’t got higher

Sorry for not replying earlier. I have been busy at work.

I noticed that you set INS_HNTCH_FREQ lower than INS_GYRO_FILTER, which is not what is recommended in the wiki. Is it problematic or is it safe to set the parameters like that?

It’s fine if you are using ESC telemetry - you just need to be careful about the notch going into the control bandwidth (so <50Hz) - if you go that low then you need to use a narrow notch. It’s actually very common to have notch settings below that of the gyro LPF.