How to work with the notch filter?

Hi everyone, I would like to understand how to interact with the notch filter. Once the notch filter is enabled, I visualize the FFT log and I see a resonance spike at 80HZ at 100db, now on what parameter do we need to intervene to attenuate this value?

1 Like

Hi @Marco_fly you can see my draft docs on this here:


Thanks Andy i need to study your description thank again for now.

This is very impressive. I flashed my Pixracer in a 5" quad with 4.0.0-dev that was flying pretty well with Stable and ran thru your draft doc procedure. What was good is super smooth now. 177Hz hover frequency at a .13 throttle and the default 20Hz BW. The post filter results are astonishing. I haven’t done any agressive flying yet but the preliminary results are very promising!

Note: The 1st flight after flashing the dev version from Stable was a bit exciting as some of the new ATC filter settings were not set. No crash or anything but it was an oscillating mess until I set the Rate target frequency for Pitch and Roll.

1 Like

Excellent news!

Yes, I saw this too and just thought I had fat-fingered something, but now I think there is a bug - @Leonardthall @rmackay9 FYI

BTW the weather is awful here, so haven’t had a chance to generate graphs for the doc - if you have any appropriate logs that demonstrate the different stages that would be awesome!

What wasn’t set?

Extra characters because I have to.

The parameters with the red arrows (target frequency) were at 20. The green arrows (derivative) transferred. The Error Frequency settings I didn’t know what to do with so left them at 0 and it flies well.

Ah interesting! So since FLTT is filtering the target rather than the derivative it does not need to be so high (default is 20 which should be fine). But I think 0 is bad, right @Leonardthall?

After looking at your post I stated that wrong. FLTT was at 20 not zero as I previously stated. This caused roll oscillation. I changed it to 40 and it fixed that. In the attached after update to dev and then what I changed it to.

Post corrected above.

That’s really interesting - I will discuss with Leonard

Andy-Flight logs attached pre and post notch filter implementation.

That’s perfect! I can see the axe shape and everything. Interesting that your worst vibes are on x - mine is the same, but I’m struggling to figure out physically why this might be. The affect is astonishing as you say, although I’m guessing we are comparing pre-filter with post-filter here so the LPF would have made things less bad in the non-notch case.

good morning everyone, but these parameters are only available in the dev version? I’m using 3.6.11 official aren’t there on this version? Thanks

In which case just set the NOTCH parameters in the same way.

Thanks @dkemxr!

The take home here is that on small quads 20 Hz is still a little too low. I may look at changing this to be equal to the D term filter setting in the auto translation stuff.

It also shows that I really need to look at ramping the RC inputs to reduce that noise source for the small quads that can’t reduce the filter that low without compromising the tune a little.

My hats off to you guys! The attached are from a 130 (3") size quad on 4S I have really struggled with. It’s an Omni Nano V6 FC hard mounted (yea,I know bad idea). I have more tuning to do but so far it’s flying pretty well!

Cool! I finally got around to tuning my 3" today. Because I have ESC telemetry I used this: and it’s as solid as a rock, my easiest tune ever!
The FC is not quite hard mounted but the rubber gummies it is on are pretty solid.

As a matter of fact I have ESC telemetry also I just didn’t use it for anything. But I don’t see the INS_HNTCH_MODE parameter. Telemetry is showing ~15 RPM (15,000 I presume) at hover. Does this sound right?

You need to build with that PR for it to work. 15000 rpm sounds plausible

Hi @andyp1per
I’m playing with notch filter and I’m not sure how to decide if my filter is good or I need to decrease the attenuation?

Here is my unfiltered data:

and this is after notch filter:

Does it seem filtered too much?

This is a 13" quad and the filter settings are:
attenuation: 10 (default 15)
freq: 67
BW: 25