Problem in automode

Hello guys,
I have drone Octa Quad.
While in flight in auto mode, the drone suddenly starts to wobble and I have to save it by switching to mode ALTHOLD.

Please help me analyze the logs because I can see something is wrong, but I don’t know what is causing it.
I am sending the logs.

It looks like you have done some tuning. I’m not sure if it’s responsible for the issue you describe but the Dynamic Notch Filter isn’t configured properly. You should be targeting the 1st peak (not the largest which is a harmonic) and you have no throttle reference value. I would make these changes:

Then set INS_LOG_BAT_OPT to 2 and make a short AltHold hover flight to see the results. If you used Auto Tune to generate these PID values you should run it again after the Notch filter configuration. If you manually tuned go back and re-visit that.

After writing this post, I reset the controller configuration. I set up harmonic notch with parameters:

  • INS_HNTCH_REF=0.1636503
    After these settings, I carried out AUTOTUNE.
    I made the drone hover on my revised harmonic notch and later yours without re-autotuning.
    I post logs of the drone hovering on my and your parameters. Which one is correct?

Since neither is targeting the 26Hz mode, which is well below the bandwidth of the 58Hz center notch, that peak can probably be discounted. I suppose it’s magnitude will change flight to flight. There is not much to be done about it anyway as it’s too close to the control frequency. A static notch with a narrow bandwidth could be tried. So the 58Hz center notch is attenuating the 58Hz well as one would expect and the next harmonic. The 108Hz center notch is attenuating the higher harmonic a bit better at the expesne of the lower harmonic.

I suppose it won’t make much practical difference which one you use. But looking at Pitch/Roll Desired vs actual the tune isn’t looking that good. But there isn’t much pitch and roll action. Make another flight with some aggressive pitch and roll inputs to check this.

1 Like

Sorry for the late reply but I was unable to complete the test you requested. Do you suggest to try a static notch? Is it necessary? Will you help me set the appropriate parameters? Below are logs with aggressive inputs.

Actually the tune is looking good.

I don’t think you need a static notch. Attempting one on the ~30Hz gyro peak, which is small in magnitude anyway, could adversely effect control.

Thank you, the drone is flying properly. Do not change anything anymore?

No, I think you are good!