Harmonic notch support (ESC, Throttle, FFT)

FFT Based Harmonic Notch Test Flight Crash

Can I please ask for some help working out what went wrong with this??

I have a 9 kg quad with T-Motor U8II KV190 motors and 2815 props which I test flew after setting up the FFT Based Harmonic Notch. The take Off was in position Hold and it got airborne to about 9 m and the quad started to twitch in pitch and roll and the oscillations quickly got bigger. I switched to Loiter which made it worse and I managed to get it back on the ground, but it suffered a damaged prop.
Here are the settings I used.

image

image

Here is a link to the logs and Parameter files

https://drive.google.com/drive/folders/1WenGcU7oMJiXkZm2IqhtWgmRdflIioWS?usp=sharing

‘00000013 FFT Notch Hover Presetup Test.BIN’ which I used to find the INS_HNTCH_BW = bandwidth estimate, and ‘00000016 FFT Notch Post Setup Crash.BIN’, which is the test crash flight.
Included is the parameter file as well.
The only other parameter change was LOIT_BRK_DELAY: from 2 to 1.

If anyone can help working out this one, I would appreciate it!!

You basically have a poor tune - disturbance caused runaway pitch and roll oscillation. You don’t have PID logging turned on so I can’t tell which part of the tune is at fault. It’s possible that the very low filter settings mean that the copter is unable to react in time.

The FFT itself appears to be working ok. You have a cube orange, so on such a big copter you can afford to push the window size higher - to 256 say - which should track the low frequency noise better. But you need to fix the tune first.

Thanks for the quick reply! The PID logging was an oversight which has been corrected. When you say ‘push the window size higher - to 256’, could you please expand on this a bit more?
I originally configured a Throttle Based Dynamic Notch which seemed to work OK?

https://drive.google.com/drive/folders/1DqyIUb1UXsjXwofaikuVWzZ45hPOzh9T?usp=sharing

Concerning the tune, I have done a couple of autotunes with AUTOTUNE_AGGR at 0.1 and also 0.007 and both times I initially got the ‘cannot level’ msg but both times the tune completes. I’m not sure where to go with this and ask for suggestions? It could be my frame design?

So FFT_WINDOW_SIZE=256

Did you autotune with the throttle based notch on? It’s possible that the FFT is not doing a good enough job and the tune is too sharp.

To the best of my knowledge the Autotune was done with the throttle based notch on. Just to clarify, the Autotune resulted in a stable quad after which I successfully flew some photographic flights . It was only when I enabled the FFT Notch did the instability appear.

Yeah, so I think what is happening is that the FFT notch is not doing as good a job as the throttle notch and your tune is overcooked on that basis. Best thing to do is switch back to throttle notch but keep the FFT on so that we can tune that first.

Thanks.
So
INS_HNTCH_ENABLE = 1
FFT_ENABLE = 1
FFT_WINDOW_SIZE=256.
And do a Confirmation Flight and Post-Flight Analysis then another autotune?

Yes, but you will need to set INS_HNTCH_REF/FREQ/BW back to whatever you had them set to.

In an ideal world PkAvg (the FFT determined frequency) will track DnF (the throttle determined frequency) quite closely

Got it and thanks. I’ll report back later.

Hi @Peterarnold , I looked over the logs, I just finished a heavy build tune quad 6kg AUG thou not as big as this one. However from your logs (the hover logs with the static notch) , you can see that the default config for for the harmonic notch needs tuning.

The bandwidth in Hz in the logs start at 20 hz and end at aprox 330 hz with 3 peaks for X,Y,Z axis, Tuning a big build like this one that has more than 1 peak (3 peaks) helps a lot; as the default is just setup for 1 peak.
Also maybe adjusting the max Hz also helps as the logs show it ends at around 330hz. And last the Autotune, the Aggressiveness’ is set to 0.07 try the min 0.05 this might result in a better autotune, also IMO just do one axis at a time this works better for big builds (pitch-> roll → yaw).

  1. INS_HNTCH_OPT = 3 (this enables double notch it)
  2. INS_HNTCH_HMNC = 7 (for 3 peaks)
  3. INS_HNTCH_FREQ = half your base freq in hz per the wiki, 165 hz (165*2=330)

Hope that helps,
Lautaro

Thanks @lautaro, but I’m a bit confused?
I am still finding my way with this and found the wiki a bit vague, but my reading is that the ‘Harmonic notch reference frequency or Hover_freq or INS_HNTCH_FREQ ‘ is the same thing??
To find the above
• Open Mission Planner, press Ctrl-F, press the FFT button, press “IMU Batch Sample” and select the .bin log file downloaded from above flight
• In the FFT ACCO graph, identify the significant peak in noise or Freq Hz that corresponds to the motor rotational frequency. This is the harmonic ‘notch reference frequency’.
• Set INS_HNTCH_FREQ to this value

Harmonic notch bandwidth is INS_HNTCH_BW = INS_HNTCH_FREQ / 2

So I get
INS_HNTCH_FREQ = 128
INS_HNTCH_BW = 64.

Also ‘CTUN ThH’ gives Hover Thrust or INS_HNTCH_REF.

Any help would be appreciated!!!

You are doing the right thing, except it’s clear that the fundamental is at a lower frequency - maybe 35Hz?

It’s a really interesting trace - is this an X8 or something?

You should be referencing the Gyro graph.

1 Like

You mentioned ‘it’s clear that the fundamental is at a lower frequency - maybe 35Hz?’. Can you please explain that a bit further?
It’s a 9 kg quad with T-Motor U8II KV190 motors and 2815 props.

Dave. Thanks for that!

Made some good progress after setting up the Throttle Based Dynamic Notch and here are some before and after graphs. Good stable test flight. Still got a spike at 31hz and wonder if this something to do with the folding props straightening out as the motors spool up??

Here is a link to the log and parameter file.
https://drive.google.com/drive/folders/1QD2v_3s908vUgZEeLyX7RG_vF96Tja7T?usp=sharing

Thanks for all the help!

Hello! 5’’ 4S quad. Try to setup notch filters. Here log file and FFT analysis of hover in home
before filtering in home.bin (776 KB)


Should i setup frequency 174Hz

or 488Hz?

also second gyro not have peak at 488hz only 160hz

or better to disable first gyro as it more noisy?

On those small quads you really want to use ESC telemetry if you can. Are you using BLHeli32? If so you can use bi-directional dshot.

Disabling the noisy gyro on a small quad is recommended.

You should go for 174Hz - the other harmonics will get sorted by the filter.

1 Like

thanks for explanation Andy. I use bluejay firmware on bhleli_s esc (racerstar rev35) and bi-directional dshot to receive RPM data.

Ok so you don’t need to do FFT’s or anything at all:

INS_HNTCH_MODE = 3
INS_HNTCH_REF = 1
INS_HNTCH_OPTS = 2
1 Like