Tuning the Harmonic Notch

Hi Andy @andyp1per

I tried the harmonic notch filter on a little 380 size helicopter for the first time. Can you please take a look at my log and advise if I’ve got it setup right?

G380-IMG_3324

Main rotor RPM: 2220
Tail rotor RPM: 8340-8400 (I believe)
Electric motor RPM: 11,100

Notch filter setting:

INS_HNTCH_ATT,40
INS_HNTCH_BW,10
INS_HNTCH_ENABLE,1
INS_HNTCH_FREQ,18.5
INS_HNTCH_HMNCS,11
INS_HNTCH_MODE,1
INS_HNTCH_REF,0
INS_NOTCH_ATT,20
INS_NOTCH_BW,25
INS_NOTCH_ENABLE,1
INS_NOTCH_FREQ,80

Thanks.

What does the pre-filter graph look like? You are missing that spike at 140Hz

Here is the pre-filter graph on a earlier flight.

To me it looks like this might be better:

INS_HNTCH_FREQ,37
INS_HNTCH_HMNCS,11

Thanks Andy @andyp1per,

I thought INS_HINTCH_FREQ needed to be set at half rotor rpm?

Tried your suggestion and it looks good.

Hi @andyp1per,
Ive been having issues with FFT. For some reason the input freq. is 24Hz. Ive tried using mavproxy but the output says “extracted 0 fft data sets”. I followed the documentation for FFT even in-flight FFT. The props are spinning at 5000RPM/80Hz. I have ESC telem connected and set up on a cube orange.

FFT_ATT_REF,15
FFT_BW_HOVER,20
FFT_ENABLE,1
FFT_FREQ_HOVER,80
FFT_HMNC_FIT,10
FFT_HMNC_PEAK,0
FFT_MAXHZ,200
FFT_MINHZ,0
FFT_SAMPLE_MODE,0
FFT_SNR_REF,25
FFT_THR_REF,0.35
FFT_WINDOW_OLAP,0.75
FFT_WINDOW_SIZE,64

INS_HNTCH_ATT,15
INS_HNTCH_BW,10
INS_HNTCH_ENABLE,1
INS_HNTCH_FREQ,40
INS_HNTCH_HMNCS,11
INS_HNTCH_MODE,3
INS_HNTCH_OPTS,0
INS_HNTCH_REF,1

Not able to get FFT analysis

2021-02-23 23-03-32.log.param (18.3 KB)

You need

INS_LOG_BAT_MASK,7
INS_LOG_BAT_OPT,0

Hi I am trying to learn and use Notch Filters but I can’t even display my log. Can we try to do step by step guide ? I would like to use Harmonic Notch Filter in my octocopter with 16" propellers, 6s, weight with camera around 12kg. I am flying without gimbal and camera for this test.

  1. I checked and set parameters:
    INS_LOG_BAT_MASK = 1
    LOG_BITMASK without RAW IMU
    INS_LOG_BAT_OPT= 0
  2. I would like to do throttle based setup but I didn’t found “INS_HNTCH_MODE” = 1 in my parameters list in Mission Planner???
  3. I did gentle hover flight for few minutes (Log here)
  4. I tried to load it in FFT filter but I get empty screen. What I am doing wrong ?

INS_HNTCH_MODE won’t appear until you have set INS_HNTCH_ENABLE

But the lack of batch sampler messages is a head scratcher. How many IMUs do you have and which is the primary?

I have Cube Orange so I think 3. I don’t know how to check which is primary ?

So I have to do:
INS_HNTCH_ENABLE:1
and fly again gentle hover for 30 seconds ?

Set set INS_LOG_BAT_MASK to 7 so that you get data for all the IMUs. Then hover again

Hi,
I’m also in the same situation as you,
although I have read the ardupailot wiki several times I do not know how to do several steps to find the values that need to activate the notch filter … get the FFT… how to determine the frequency to be taken as a reference etcc …
It would take some practical examples and described step by step on how to perform them … so that everyone can proceed on their own without always being asking …

1 Like

Ok so I did the test flight. This is a log from gentle hover (304
and I loaded log into FFT part of Mission Planner and I have peaks around 75 Hz, 150 Hz, 216 Hz and 286 Hz:

So as I understand I should start form creating Notch filter something like that:
INS_HNTCH_REF=0,2209552 (my MOT_THST_HOVER)
INS_HNTCH_FREQ=75
INS_HNTCH_BW=32
???

INS_HNTCH_FREQ is the noise frequency for the first hamornic so 70 in your case
INS_HNTCH_REF is the throttle scaling usually the same as MOT_THST_HOVER so 0.22… in your case
INS_HNTCH_BW is best set as half the frequency = 70/2 = 35 in your case

1 Like

Ok so next step is to change:
INS_LOG_BAT_OPT=2 and perform next gentle hover flight :slight_smile:

Thanks for the response! I just did a minute hover in alt hold. I am still getting the same issue with the fftui showing 24Hz after changing the suggested parameters.

Don’t do this. Needs to be something sensible for your aircraft - so 40Hz maybe to start.

Its possible that you are not able to log quickly enough or are running out of CPU. What board and are you using a fast sdcard?

I have a Cube Orange on the drone using the default SD card. The CPU load goes up to 35. Currently I am extracting the Acc and Gyr data from the logs and putting them into a fft script until we can figure this out. I will need to go out to buy a class 10 sd card and fly tomorrow

I would think the default SD card is ok - I doubt they ship with something that is not good enough. And CubeOrange has plenty of CPU so that’s not it.