Loiter oscillations badly

I’m test a new copter setup right now, and try to set the loiter mode right, everything’s seems to fine, except have bit overshot on the wind direction, but today I have some seriously oscillations,so I switch back to alt hold then everythings fine again, I found another post about loiter oscillations. any idea why’s that ?
Also I really need some help with how to take out the ATT.Roll and ATT.Pitch’s noise,any help would be appreciated.
here’s the log https://mega.nz/file/c48yRJSK#ZrlqaTqGki2nXGByFTne7lay04OkySwZ0Ai795Awzws

the problem is poor tune of your copter

you have noise on PID values and its more on roll

i can see that you are using default PIDs on a 20inch quad (i undestand its from MOT_THST_EXPO = 0.75)

try to reduce PIDs of both roll and pitch till oscillations has disappears then run autotune
you can read complete guide in this section of docs

Make sure that Dshot is selected if your using it and not normal for your esc. combining normal and dshot will make bad osalations as expected.

Thank you so much for reply, hosein
actually It’s a 21 inch, DJI E2000 PRO, and I change it back to 0.65 during the test which is not in the log, because DJI’s ESC is slightly different. 0.75 make the copter’s response wired to me. In the last few tests, I set the filters try to reduce the RATE.xout’s noise, which is worked, and i reduce the pitch’s D term try to take off the oscillations, and it’s not in the log too. but you can see in the first few minutes the ATT.pitch is very noisy, in the last few minutes it’s much more better, and now I try to tuning the PIDs, The pitch is already autotuned, but It’s still not good. I notice the pid is noisy too, and the poor pid setting cause that, am i understand it right?
Oh…sorry for the bad title here, my poor English… about the oscillation, it’s not oscillate all the time if you look the ATT.pitch you will find some very obviously peaks…

well i neve set the dshot,and I’m using DJI E2000 PRO, but i’ll check it anyway, thank you

1 Like

What would be the point of selecting Dshot if the ESC’s don’t support it? This is what I see for the specs for the 1240S ESC’s that come with that system:
Operating Pulse Width 1120 to 1920 μs

yes wrong PIDs could make ATT.pitch and roll noise
try to autotune roll and yaw then do some fine tuning by reducing PIDs in steps on 5 percent

i was faced this problem after autotune on a 650 size copter, i was did a manual tune after first autotune then i executed autotune again to get more accurate PIDs

only point is making a crazy copter :sweat_smile: :wink:

Yes, same as the DJI E2000 but i set the mot_pwm_min a bit lower than 1120.

Do you have a Hover log with pre-notch filter data? Some of your Notch filter settings don’t look right. For example you have INS_HNTCH_REF as .29 and MOT_THST_HOVER is .45. And I wonder if you shouldn’t set the dynamic notch frequency lower and disable the static notch. Post the pre filter log if you have it or make another AltHold flight.

about the reference value i set it based on wiki’s instruction

First perform a long dynamic flight using your current settings and post-filter batch logging. Examine the FFT and look at how far the motor noise peak extends below the hover frequency. Use this frequency - min_freq - as the lower bound of your scaling. Then in order to calculate an updated value of the throttle reference use:
INS_HNTCH_REF = hover_thrust * SQUAREROOT( min_freq / hover_freq )
i’m not sure about .29 is right or not, but the the post-filer’s FFT seems acceptable.

I might not configure it that way but OK. I think your static notch and dynamic notch overlap also with the center freq and BW set.

ok…should I disable the static notch for it?

I don’t know, would have to review the pre-filter log. But in many cases you can set the center frequency of the dynamic filter at the lower frequency and cover the rest with the harmonics and not use the static filter.

Thanks for the advice, Dave.
I disable the static filter today, the result is worse than yesterday’s, so I leave it enabled…, I’ll try lower the dynamic filter’s frequency tomorrow, and also I’m have trouble to take out the ATT.Poll, ATT.Pitch’s noise, I try autotune today, totally no wind, but still get the noisy result…

Make another A;ltHold hover flight with INS_LOG_BAT_OPT ay 0 and review the base vibes.

@XinChengGe if oscillate pattern or amplitude is changing in different flight your harmonic notch filtering is worng if not, its ok, go for tuning

I’ve done the autotune tonight, It’s much better than last time, the loiter seems fine, but still have lots of noise on ATT I’ll do the pre flight FFT as Dave said. Is there any thing to tune? the ins_gyro_filter 18 and ins_accel_filter 15 now.

If Loiter is stable try to reducing PIDs in step of 10% and check DesRoll,Roll and DesPitch,Pitch qfter you got a good pid save your parameter and run autotune again

actually the autotune is increase the P I and decrease the D term, ATC_RAT_x_P & I is around 0.1 and D is around 0.001, as i suspect yesterday’s noise is came from High D term, autotune is take out the D term noise, and I also tried lower the accel_x_max, the result is the same, I’m not sure lower the P I will reduce the noise, if set the P I to 0.8, this is the same value I tested yesterday, with the noise even worse than today, if lower than 0.7 the copter is feel to sluggish…so I’m really confused here, don’t know where the noise came from, maybe I should just leave it be?