Harmonic notch support (ESC, Throttle, FFT)

It doesn’t learn, but it has to try and figure out which the important peak is. At any point in time the energy can bounce around a lot so that for instance the energy at 80Hz >> 160Hz and then at the next instant 160Hz >> 80Hz. It does this by tracking three peaks and having a bias for tracking whatever it was tracking before (so that peak 1 is always 80Hz for instance), but this algorithm assumes that there are always 3 peaks. If there are 2 (for instance you lose 80Hz for a period) then the order will change.

Hello @andyp1per log attached with batch logging

https://mshelisrl-my.sharepoint.com/:u:/g/personal/davide_monti_mshelisrl_onmicrosoft_com/EdW3r_m_KcBJj0DYgKQzw2MB53f0gnxFG38EJWupQZikcQ?e=1IP0ZB

Looks like it tracks well the freq now.

How does it look?

Thanks

Can i put

INS_LOG_BAT_OPT= 2
INS_LOG_BAT_MASK=7

Back to 0 for both?

Yeah looks ok, but:

Your primary harmonic is at something like 48Hz which the FFT is totally missing because you have FFT_MINHZ set to 80. You should try MINHZ set to 40 to pick this up. You don’t have to go this low with the harmonic notch because you can control that through INS_HNTCH_FREQ, but given that a significant amount of noise is at 48Hz this is why the engine is struggling.

I’m guessing this is quite a large copter?

Copter is a 22" bladed quad.

All you advice is set FFT_MINHZ to 40 and leave the rest as it is?

Is it ok to return the 2 batch log params to zero?

INS_LOG_BAT_OPT= 0
INS_LOG_BAT_MASK=0

Should i set INS_HNTCH_FREQ to 40 too?

Yes

Yes, but it’s also useful to see how well the noise is being squashed.

Don’t set INS_HNTCH_FREQ lower just yet - let’s first see how well the FFT tracks the lower peak and then see whether lowering INS_HNTCH_FREQ makes sense

Ok, i’ll log next flights too, will zero the param on logging later when finished.

changed FFT_MINHZ to 40

thanks

Hello @andyp1per , latest log with mods.

https://mshelisrl-my.sharepoint.com/:u:/g/personal/davide_monti_mshelisrl_onmicrosoft_com/EcRek9A5xtVEjtn-aqsRs6UB_9Xjmzd2IUtzpx9W4G76HQ?e=jc7SIb

Very odd. It’s not getting picked up at all. I suggest you go back to 80. If you are able to do a similar flight with INS_LOG_BAT_OPT=1 that would show us the input noise.

ok will do it on monday back to 80 and log bat 1.

thank you

INS_HNTCH_ENABLE is the dynamic notch filter, it dynamically changes the filter frequency using the methods you configure it to use.

INS_NOTCH_ENABLE is the static notch filter, it uses a constant frequency.

Two different notch filters, for two different use cases.

Well noted with thanks.
Before you explained: I thought INS_HNTCH_ENABLE with throttle based (I do not have RPM sensors or such), it is “static” because we have to set static frequency, bandwitdth for it (and its harmonics too). With the help of FFT, the notches are automatically tracked and eliminated.

@andyp1per while we are at it, what do you think of the tuning?

thanks

@andyp1 INS_LOG_BAT_OPT=1 log attached.

thanks

https://mshelisrl-my.sharepoint.com/:u:/g/personal/davide_monti_mshelisrl_onmicrosoft_com/EeqpS2gcLLNBqIq7EL4Bb6YBO_H-4fbyFEkR4ttGbP1teg?e=KvvXTu

The FFT isn’t lying - all the energy is in the 2nd, 3rd and 4th harmonics

So net-net, the FFT engine not going to do a lot better on your copter unless we start trying to track 4 peaks

What is your advice? It is limited to 3 peaks tracking?

@andyp1per should i leave it as is for now?

thanks

Yeah I think leave as is for now

Ok, thank you.

Corrado