Losing control after applying notch filter at VERY low frequencies

Hi all,

I am trying to implement notch filter with my custom drone in Gazebo. I have two peaks at around 2.93/3.91Hz and 35.16/36.13Hz. When I am cutting down the first one, the drone flips over at the takeoff. The second one, it worsens controls, so the drone starts to crash on simpler turns.

My params to cut down 35.16Hz:

  • INS_HNTCH_MODE = 1:Throttle
  • INS_HNTCH_FREQ = 35.16
  • INS_HNTCH_BW = 17,58
  • INS_HNTCH_ATT = 40
  • INS_HNTCH_REF = 0,15
  • INS_HNTCH_FM_RAT = 1
  • INS_HNTCH_HMNCS = 3

3.91 Hz is generally the same, though I’ve tried several approaches:

  • 3.91 freq + 1.56 bw
  • 3.91 freq + 6 bw (as there are close peaks which narrower bw doesn’t cover)
  • 0.98 freq + 0.49 bw + 5 harmonics (yep, probably a bad way, but just to check it out and erase the peak completely)

This peak seems to be the highest, but I don’t know if I want to get rid of that, because it is so close to zero (other guys I saw didn’t).

Drone parameters and settings:

  • X-frame
  • 9-inch props
  • 0.15 throttle
  • MOT_SPIN_ARM = 0.04
  • MOT_SPIN_MIN = 0.07
  • MOT_THST_EXPO = 0.58

220 gyro filter is strange, but it helps reducing Y-vibrations a lot. Lowering it to 80 or 40 increases vibrations and decreases control.

Without notch filter, the drone is pretty manageable, though it crashes when going down or doing 135-180 degrees turns on high speed. I’m trying to do smth with that, that’s why notch filter.

I’d like to do Qicktune and Autotune also, but can’t since the drone doesn’t hold in Alt_hold.

Could you tell me what I’m doing wrong here?

You cannot and must not put a notch filter bellow 10Hz without making the vehicle crash. It causes phase lag in the system relevant band. So just do not do it. It blinds the control loop.

The second one is not high enough to require a notch filter

1 Like

And use ArduPilot Methodic Configurator it now has a template for gazebo vehicles.

1 Like

I don’t agree with this. It depends on the application and how you tune the notch. If you watch the Tradheli presentation from the Developers Conference, you will see tuning tips for heli’s where I use the PID notch filters to shape the response and remove peaks from lightly damped rigid body modes of a helicopter. It is probably 20 min into the presentation.

@MHawthorne I would check your tune to see if you are causing those peaks due to overtuning. Looking at your gains, though, the rate P and rate D gains look awfully low but I am a heli guy so maybe not. What I might suggest to check your tune is to use the analytic tune web tool which allows you to use a System ID mode frequency sweep to analyze the tune and improve it analytically before putting it into the aircraft and flying it. Here is the presentation I gave at the developers conference that describes how to use it. Watch the video and if you have questions, let me know.

1 Like