Harmonic notch support (ESC, Throttle, FFT)

ohh, so INS_HNTCH_FREQ apply only when INS_HNTCH_MODE =4?

You only need to set it carefully for INS_HNTCH_MODE =1, for everything else it is the ratio of INS_HNTCH_FREQ/INS_HNTCH_BW that matters and the defaults are fine

1 Like

Would it make sense to lower FFT_MINHZ from 40 to 35 in this case? It is a large octo. This info is from a flight without harmonic notch enabled (INS_HNTCH_ENABLE = 0). I’m planning on enabling a dynamic notch (INS_HNTCH_MODE = 4) once I’m confidant that FFT is tracking well.

Yeah, probably would be ok. Looks like it is tracking well - can you share a log?

here’s a link to the bin on GDrive

Y is tracking by far the best - you should set the HMNC_PEAK tracking to follow only that. Where it drops out I think is simply because the number of tracked peaks drops - this is a known problem that I hope to get to soon. You might get a little improvement by dropping SNR_REF to 20 rather than 25. I don’t think lowering MINHZ is going to help.

flew a few basic hovers again, testing different params. @andyp1per 's recommendation of setting FFT_HMNC_PEAK = 5 (so it tracks the pitch (or Y) axis) gave the best results. I tried turning the SN ratio down, but didn’t see improvements, so I bumped it back up. [log] (https://drive.google.com/file/d/1SILzVKuVeicUIEHNm9wJxxnU4oGQ5bMj/view?usp=sharing)

before

now after filtering


looks good i think. also disable noisy ICM gyro

@andyp1per one more answer please :slight_smile:
should i increase Accel filter to 120-130hz? or leave it 80?

You can leave the accel filter low. On my minquads I have it set to 20

1 Like

@andyp1per with SCHED_LOOP_RATE,800 i have this CPU load. its critical?




here whole parameters. In last revision i lower SCHED_LOOP_RATE to 400.

log file here

A handful of long loops is to be expected. A PM of about 35% is what I would expect. So it doesn’t look unusual to me.

1 Like

How does one obtain this graph (PSD vs Frequency graph)? It looks like it’s from mavgraphy.py, but what are the commands to generate it? It’s from the Initial Flight and Post-Flight Analysis page in the Wiki

It’s mavfft_isb.py included in the pymavlink release - just feed it a log file with batch logging data

1 Like

Hi I am little bit confused. In the wiki of “Throttle based dynamic notch” there is information that before first flight I have to:
Set INS_LOG_BAT_MASK = 1 to collect data from the first IMU

but in Complete Parameter List is written that:
INS_LOG_BAT_MAS=1 collects data from 2nd IMU ???

INS_LOG_BAT_MASK: Sensor Bitmask

Bitmap of which IMUs to log batch data for. This option takes effect on the next reboot.

Bitmask
Bit Meaning


0 IMU1
1 IMU2
2 IMU3

and finally in the wiki after tuning the notch I have to change:
INS_LOG_BAT_MASK=0

So there is a mistake in complete parameters list or in the wiki (docs)?

It’s a bitmask

1 Like

Where is the confusion?

I didn’t notice that bit mask is used not value. Sorry my mistake

What’s yall’s opinion here? All the peaks in the GYRO FFT are clearly harmonics of ~38hz. Is it safe to filter that low? bin here

image

Yes, just keep the notch narrow.