Bidirectional Dshort with Dynamic Harmonic Notch Filters

Hi guys,

I have set up a 5’’ race drone with Matek H743 Slim. I have done the initial tuning, and it can do the altitude hold mode. The next step is autotune, but I need to set up the dynamic harmonic notch filters first. I have set the dbshot and it has the rpm feedback. My hover freq is 183hz.

My first question:
I set SERVO_DSHOT_ESC for 1 or 3, and both work, but when set to 3, no extended dshot telemetry. My ESC is Mamba f55_128k, how do I know if it either supports EDT or not?

My second question:
What value should I use for INS_HNTCH_OPTS? The copter document says I should use Muti-Source (=2), but the plane document for quad plane says I better use Update at loop rate (=4), or I should use Triple notch for better performance on small quad. If I select all 3, is there any drawbacks?

My final question:
In the quad plane document, the INS_HNTCH_BW is suggested to be INS_HNTCH_FREQ / 4 and then tuned even smaller. Should I follow this?

Thank you for your help!

One of the flight log

SERVO_DSHOT_ESC,1

Yes, definitely use 1/4 of Freq when using per-motor notch.
The frequency (and BW) need to be lower than you lowest expected frequency, and they will scale up with RPM. So defaults of 80/40 are fine, except you would reduce the BW to 20 (at most), maybe even down to 10.

INS_HNTCH_ENABLE,1
INS_HNTCH_BW,10    //  INS_HNTCH_FREQ / 4 when INS_HNTCH_OPTS,2
INS_HNTCH_FM_RAT,1
INS_HNTCH_FREQ,80
INS_HNTCH_HMNCS,3
INS_HNTCH_MODE,3
INS_HNTCH_OPTS,0    //  2 for per-motor notches
INS_HNTCH_REF,1
INS_LOG_BAT_MASK,1
INS_LOG_BAT_OPT,4

Send a .bin log and we can check too

1 Like

Thanks for your reply, I linked a flight log. If the default 80Hz is okay, does that mean I don’t need to measure the hover frequency and never need to change INS_HNTCH_FREQ?

Back to one of your original questions:

Yes there are - if bandwidth is too wide or there are too many notches, that introduces lag into PIDs and that leads to instability. Keep bandwidth and features to a minimum, just what is required to do the job.
You dont have excessive vibrations anyway.

This what you have now for notch filtering

You can see overlapping notches (the grey areas) and they are unnecessarily wide. It’s tracking the RPM alright, but there must be too much variation in RPM or something.

This is the best I could get the HNOTCH and it should still be OK for most conditions, and since you have low vibrations that should not be an issue:

image

INS_HNTCH_MODE,1   // change to throttle-based
INS_HNTCH_FREQ,180
INS_HNTCH_BW,40
INS_HNTCH_REF,0.11
INS_HNTCH_FM_RAT,0.70
INS_HNTCH_HMNCS,3
INS_HNTCH_OPTS,0

And I would change to these values regardless of the HNOTCH configuration:

ATC_THR_MIX_MAN,0.5
INS_ACCEL_FILTER,10
MOT_HOVER_LEARN,1  // or maybe 0
MOT_THST_EXPO,0.52
MOT_THST_HOVER,0.12
SERVO_DSHOT_ESC,1

Send another log after those changes if you like

1 Like