I just discovered the IMU notch filter while doing a few test flights with master and I think the results are worth to report here.
A few words about the vehicle: quadcopter, 4x 17" props, 3.7 kg, 6s. The frame is pretty rigid, props are spinning at about 3100 rpm during hover. FC: PixRacer, very carefully insulated from vibration.
However, at sharply tuned PIDs, there always was some tendency to run into a self-sustaining D oscillation on roll, depending on actual takeoff weight and weather. Often that happened in the middle of the flight and was gone a few minutes later. When it happened, the reported VIBE level went up from normally 1…4 in hover to 20 and above.
To apply the notch filter, I did a FFT on ACC and GYR raw data and found this situation before enabling the filter:
Based on this data, I tuned the notch filter to 40.5 Hz center frequence (in the middle between GYR and ACC peaks), 10 Hz bandwidth and 15dB attenuation.
This is what I got thereafter:
After enabling the notch filter, I was able to crank up the D value from 0.003 to 0.0045 without triggering oscillations (0.005 is the limit).
Conclusion: the IMU notch filter is a mighty tool, making at least my vehicle to run smoother and more agile than ever before. No issues found so far in more than one hour en-route flight (mostly Auto pattern @ 7.5 m/s, but also some climbs, rapid descends, PosHold, Loiter). And last but not least, most “vibration” (in the sense of the VIBE messages) is obviously not caused by unbalanced props, motors or aerodynamics, but control loops .
Open question 1: where does the difference in observed resonance frequency between GYR and ACC come from?
Open question 2: why 36…45 Hz when the RPM is around 3100 rpm (51.6Hz)? Is there some aliasing going on?
Idea for further improvement: more than one notch filter. At least my vehicle seems to have different resonance frequencies on X and Y axes.