Intermittent Roll Oscillations

Tuning an X500V2 and for the most part it’s gone well. I have been chasing a slight roll oscillation. I’ve run autotune a couple of times, and today I ran auto tune just on roll. The tune only took a couple of minutes and the following flight in loiter looked good in the beginning. I flew around for a while and the roll oscillation returned near the end of the flight. Any suggestions?

Flight log

You could try the new recommended value for
INS_ACCEL_FILTER,10

I estimate this
INS_GYRO_FILTER,40 (or 42 to be exact)
any reason you turned it down?

There’s a section of the log 9:03 to 9:05 where HAcc and VAcc go a bit crazy, do you think the roll was going bad around that time?
You might want to try different values of GPS_GNSS_MODE to see if there’s more reliability. Pick GPS, SBAS and one other.

Is there a time section you can nominate where roll is worse?

1 Like

I’ll try the INS_ACCEL_FILTER,10.

Maybe I’m mistaken but didn’t the initial settings say to set INS_GYRO_FILTER to 20? I’ll try 42. I usually don’t mess with these values so I wouldn’t have changed it deliberately unless I read it somewhere, but I can’t rule out fat fingers.

I was wondering about the GPS, because it seemed to be drifting slowly during hover in the later part of the flight. About the same time as the oscillations were noticeable. It was rock solid in the first part of the flight. I’ll try the filter settings first and if those don’t help then I’ll try the GPS.

The last minute had really noticeable oscillations.

This idea just came to me: When I first tuned this quad I had a smaller battery (2300mah), so the MOT_THST_HOVER value, and therefore the INS_HNTCH_REF were set to .135. Since then I’ve changed to a larger/heavier 5200mah battery and the MOT_THST_HOVER has gone up to .171, but I realized haven’t changed the INS_HNTCH_REF.

Given the weight change, do you think it’s worth changing the INS_HNTCH_REF, and do you think re-doing the HNTCH would help?

Yes it would be worth it.
Just do a flight with
INS_LOG_BAT_MASK,1
INS_LOG_BAT_OPT,0
to check the frequencies aren’t too different
but you can certainly change
INS_HNTCH_REF = hover_thrust * (min_freq / hover_freq)^2
you can easily see the minimum frequency and hover frequency in the FFT graph
You might even be able to tweak the INS_HNTCH_FREQ and more.

1 Like

The latest recommendation is for INS_ACCEL_FILTER,10
There’s a discussion about it somewhere - Leonard has wanted to make this the new default (10) for years but been concerned about his time to support it. I think we can all do our bit, and there seems to be no big issues at all.

INS_GYRO_FILTER,20 was once the default no one touched, or even lowered to allow for vibrations. Then we all got into more advanced tuning with Leonard’s guide…

So now INS_GYRO_FILTER,20 is OK for initial flights if you’re having stability issues, or it is normal for larger multirotors. Generally we should all use the calculated value from the Initial Params section of MissionPlanner, or from “THE” spreadsheet if you dont use MP.

I’ve seen discussion here about the INS_ACCEL_FILTER,10 default, so I’ll certainly give that a go. As for the GYRO_FILTER, I’ll also try your recommendation. I use the initial params section in MP, so I’m going to chalk this one up to finger trouble somewhere along the way and it wasn’t an issue until I changed the weight.

As always, thanks @xfacta for all your help!

Well, it’s better. But there’s still an underlying oscillation, mostly in roll. Maybe even oscillation isn’t the right word … occasional nervous twitch.

Filters set as recommended. HNTCH adjusted. Autotuned all 3 axis. I didn’t do anything about the GPS because I was running out of daylight, and at this point I’m not sure that’s related.

Looking at the log I don’t see much wrong. In fact if I hadn’t seen it (and heard it) I wouldn’t have said there was much wrong. The screen shots below show an example of one point where there was the twitch on the roll axis, and you can seem the same on the accelerometer graphs. But it’s not there all the time. It was about 1c when I was doing the last flight so needless to say the motors didn’t feel warm.


Autotune did really well on this quad when it was lighter. Could this be as simple as just turning down the ATC_RAT_RLL_D a couple of points?

Log file

You are correct - everything in the log looks so good you’d never know to look for that roll glitch.
It’s going to be hard to nail down though, you’ll have to set
LOG_BITMASK,180223
to add Fast Attitude and PID logging if you want to get to the bottom of it.

I dont think there’s any need to change D terms, pitch and roll D are both within the same ratio compared to their corresponding P and I terms. If you wanted to experiment you could add 0.001 or 0.002 to each of them and see what effect that has. I doubt it will heat the motors because D terms are not high and it’s a small change.

1 Like