Looking for cause of pitch and roll oscillations without input


I have tried manual tuning to no avail. What seems strange to me is that even without any RC input it is unstable and oscillates in all axis. It is an new build, very large X8 with 40kg payload.
It feels quite unstable with lower gains but starts to oscillate badly whenever I increase PID values, there is nothing in between that would work.

Here is the .bin file https://we.tl/t-gXZlemtyfh]

You can see DesRoll stays neutral for brief periods of time while Roll keeps going. Same for Pitch and Yaw.

Did you tuned the notch filters?

Not yet. I am reluctant to switch to althold with until I can sort this out in stabilize mode.

What is your LiPo / ESC / Motor / Prop combination ?

I think your rate P terms are close (large movements nearly OK) but I terms are wrong (overshoot) and D terms too high (oscillations) - that’s my way of thinking anyway…

Start with these relatively safe PIDs
If you need to change them to achieve stability, try to keep them in proportion at this stage.

But definitely get your voltage and current monitoring working correctly - and accurately! Then set the failsafes properly and these.
It’s a mistake to think “I’ll set up the battery monitoring stuff later, once I get it flying”
Don’t leave out any of the battery related settings.

All the settings you need are in this spreadsheet, or press Alt A in MissionPlanner

Just make sure it’s stable in flight, and AltHold is working well then move to the Harmonic Notch Filter setup then Autotune.

EDIT: you might find ATC_ANG_PIT_P and ATC_ANG_RLL_P can go up a bit, use steps of 0.5 or 1.0 for those when changing them. If those RAT PIDs work out OK you can try the ANG P’s up to 5 or 6, but really autotune will work it all out once you’ve got the notch filtering done.

14s Li-ion battery, custom built motors and 40" static thrust optimized props.

Thanks for the input. I will bring I and D down and see how it goes.
I have no way of applying current monitoring at this point - no hardware available to deal with such current levels.

Keep I = P, try the values I suggested

Even Mauch current sensors can’t do it ???


Voltage monitoring should not be an issue, and that is more important than current monitoring.

Worked great as a starting point.
I would appreciate if you could take a look at recent log and see if there is any room for improvement. Are vibrations levels fine? I see some clipping(clip2). Is this acceptable?
P and R values are not equal because of frame design(more length than width).
I did play with YAW axis a bit and added some D term because of slight offset motors sit on(to help with yaw authority) but it is still not perfect - there is some bounce and slight altitude loss.

Yes Z axis vibrations are getting too high. You’ll have to try and reduce the vibrations so you are not getting that clipping.

Definitely get the voltage monitoring working and set the other battery params and these correctly:
It makes a significant difference as battery voltage changes, and for diagnostics.

I would set up the Harmonic Notch Filter and then run Autotune, but you’ll need all that battery voltage stuff set up properly first, because the battery voltage will definitely change during Autotune.

It’s actually dead easy to make your own voltage divider if all you want to measure is battery voltage. Current is very handy to know too, and harder to measure, but that’s what Mauch sensors are for :slight_smile:

I think I succeeded in bringing Z axis vibrations to a tolerable level. Here is the bin file: https://we.tl/t-0xnVJpvk5e

I went ahead and performed harmonic notch filter too. Not sure if the results are good enough.
Here is the FFT before:

And after:

I would have 1st tried centering on the 48Hz mode (BW 24) which would clean up that and the next 2 harmonics.

This is the result after INS_HNTCH_FREQ 48 and INS_HNTCH_BW 24.
It was quite a bit more windy during this flight.

This looks good. A reminder that the Notch Filter is only active on the Gyro’s so no point in looking at the Accel data with FFT to set this filter.

1 Like

I have been tuning manually in stabilize and noticed the aircraft is nodding slowly on pitch axis during forward/backward flight, especially when decelerating after releasing the sticks.
What did help was raising D term while tuning in flight - from 0.022 to 0.029. Isn’t this too much?
I did try to go as low as 0.010 and it was even worse.
It is a heavy beast at 160kg AUW spinning 40" propellers.

Would you be able to take a look at the log file and tell if I am heading the right path? https://we.tl/t-zDJib2eRoa

No, I wouldn’t say .029 is too much for the D term. Pitch/Des Pitch is still showing overshoot, you could probably increase it further. It looks like the Rate Pitch and Roll are still at default (4.5). I would try increasing this a bit.

1 Like

Hello mr. Payload :smiley:

Could the ESC drive frequency have impact on gains? Would lower PWM contribute to a less stability and require lowering PIDs?