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.
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.
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
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.