How to know when a filter causes too much phase lag?

Hi! I am building a 17 inch X8 copter and already done the maidem flight which went well.

Log:34.32 MB file on MEGA

Now I am setting the notch filter parameters and I want to use esc telemetry mode. Because I will use INS_HNTCH_OPTS 6, I will have one notch per motor and so I know that I should reduce the INS_HNTCH_BW significantly to avoid phase lag.

Since the motors frequency are around 40hz, I think I should set INS_HNTCH_FREQ to 30 (approx 0.7 x motor frequency) and INS_HNTCH_BW to 4 or 5 (approx INS_HNTCH_FREQ/Number of motors).

Is this correct? Or is INS_HNTCH_FREQ 30 too low and will get into the control bandwith??

Another doubt is what should I do with INS_HNTCH_HMNCS? In the graphs below you can see that maybe I should set INS_HNTCH_HMNCS to 7 because I have the main harmonic and two other relevant harmonics. However, there are other two smaller peaks at 175hz and 225hz. Should I consider them and set INS_HNTCH_HMNCS to 31 or will it introduce too much delay or lag?

FFT pre-filter:
image

FFT post-filter:

Use the Webtools Filter Review Tool not Mission Planner.
Filter Review Tool

I already used it. I know there is a graph at the end with phase delay. The problem is that I don´t know how to interpret the graph and find where is the point where there is too much delay that it can cause trouble in flight. Do you know any documentation that explains that?

Watch the video:
Filter Review Tool

1 Like