Harmonic notch support (ESC, Throttle, FFT)

https://drive.google.com/file/d/1q6wJ8HgZ-fqn7jWqrci4giQkyGlFOJRb/view?usp=sharing

here it is.

Made some more flights today and tried to filter with throttle filtering. Things improved a bit, but I get the occasional vibrations.

One thing that I might be doing wrong is having the cube orange held by foam (the thick one that comes with the flight controller)

Definitely had moments that the drone was flying perfectly, but if I let it sit in a hover the vibrations will always come back.

If anyone could take a look at the log, I would really apreciate that. maybe I have some wrong setting.

motor/esc are Hobbywing X9.

Hereā€™s the log: https://drive.google.com/file/d/1oDMMFTvDYFPc2pi7QrztgGIvfi1GLWPT/view?usp=sharing

The notch filter at 29Hz is not a good idea (too low). You have this odd out of phase response which is likely caused by that:

And this is too low:
ATC_RAT_PIT_FLTT,5

And your overall vibration levels are too high with a few clipping events.

yes, I understand itā€™s too low, but honestly I tried every possible setting before going too low and the sympthoms are the same. Would you advice me not targeting that 29Hz peak?

ATC_RAT_PIT_FLTT,5 What should I aim for here?

As for the vibrations there is for sure clipping and high vibrations when the arms start vibrating like crazy. I believe without the motor stutering it would be pretty clean. The frame is really rigid by the way.

You can probably try 29 but the notch needs to be really narrow or you will mess with your control

Hi Andy, thanks for the reply.

I started with 5hz bandwidth up to 10 or 15, if I recall.

But, although the vibrations were reduced, they still came back. At one point I had it hovering for at least one minute without disturbances, but then the arms started shaking like crazy again.

One thing I didnā€™t mention is that itā€™s flying without any extra weight, but I had the same with 5kg payload before.

Also on hobbywing website is stated the pwm should be 1100 to 1940, but when I set mot_pwm_min and max they always go back to 1000 to 2000.

Well, Iā€™m doing something wrong, just cannot find what for now.

I recently setup what I thought was RPM filtering but I do not think I did it correctly as I do not see any of the same logging stuff as everyone else is. I followed these instructions and was doing a hover flight to see the frequency but I do not see RPM.rpm1 sensor data in my log anywhere. I also did not set INS_HNTCH_FREQ as I was waiting to do that after my hover flight. I then realized I forgot a cable to get logs and its really slow using mavlink so I just decided to run the battery down and did some flying and messing around. I am not sure if anyone can deduce what my INS_HNTCH_FREQ should be from this log or help point me in the correct direction of where to look or what I need to do. Again as I have mentioned I did not Set INS_HNTCH_FREQ or INS_HNTCH_BW as I was waiting to get data from log file.
Did I miss something in the instructions that I needed to turn on for logging?

bin file

@andyp1per
I was wondering if you could help me understand or where to locate the RPM(RPM.rpm1) sensor to tune my notch filter. I have been following the landing page here and the rpm sensor page here. I performed another small flight today in althold with the following settings that came up when I enabled the notch filter:
INS_HNTCH_ENABLE 1
INS_HNTCH_MODE 2
INS_HNTCH_REF 1
INS_HNTCH_FREQ 80
INS_HNTCH_BW 40
INS_HNTCH_ATT 40
There was a noticeable shutter with all this enabled flyable but could hear the noise from the motors.
pixracer210.param (16.9 KB)
bin file

Are you using bidirectional DShot or BLHeli32 ESC telemetry?

BLHeli32 esc with bidirectional dshot 300. I can see rpm data in status screen it seems valid and reasonable.

Ah, youā€™ll need to set it up to follow the RPMs reported by ESC Telemetry instead of a RPM sensor. KIndly refer to ESC Telemetry Based Harmonic Notch Setup ā€” Copter documentation. I think you just need to change INS_HNTCH_MODE to 3. What FC are you using? DShot600 might give you better performance as well if your FC can handle it.

@jc5116
so even if I am not using esc telem on a uart it would still be considered ESC telem hence the reasoning for setting it to 3 instead of 2?

Correct, thatā€™s how my copterā€™s setup (however running Bluejay instead of BL32) and works like a charm.

cool I will try that then, appreciate the help! Have you ran the new dev build of bluejay that also sends temp, current, rpm and a cpl other things?

Also straight from the wiki, ā€œIf ESCs with telemetry are used (either via a separate telemety wire or bi-directional dshot) then the harmonic notch reference frequency can be set dynamically using ESC telemetry.ā€ Maybe I should read all the options I just went straight for the rpm based notch filter because that is all mine reports :person_facepalming:

Mode 2 RPM Sensor is for a discreet RPM sensor as might be used on a Trade Heli. Mode 3 is for serial ESC telemetry or Bdshot RPM data.
Some sensors are shown here:
RPM sensors

1 Like

Nope, Iā€™m on the latest release version of Bluejay. The current feature sounds pretty useful!

can the pixracer handle dshot 600 or will that be to much for it. per the wiki, " It is recommended that this be set to below the hover frequency but above the INS_GYRO_FILTER frequency." My INS_GYRO_FILTER is set at 64 how would I tell the hover frequency.
I am using as mentioned a pixracer r15 running 4.2.2 stable on a 6in quad on 3S.

Have you got FFT logging turned on? If so do an alt hold hover for a minute or 2 and then examine the FFT plot, there should be a peak corresponding to your hover noise frequency. The Pixracer is a F4 board so Dshot300 might be on the safer side.

@jc5116
I have done a flight with fft_enabled set to 1. I did not change the defaults at all for what it logged. I came up with a 122 hz avg hover based on this bin file. So to start with I could set the INS_HNTCH_FREQ to say between 90-100hz and the INS_HNTCH_BW to say 45 or 50 hz?

Thatā€™s close to what the FFT graph shows (~118Hz) so confirmed. And 2 harmonics of that. The notch filter should work very well.
FFT

" The harmonic notch reference frequency parameter, INS_HNTCH_FREQ and/or INS_HNTC2_FREQ, is used to indicate the lowest motor speed for which the ESC telemetry should be used to dynamically set the harmonic notch reference frequency. It is recommended that this be set to below the hover frequency but above the INS_GYRO_FILTER frequency."

So considering my INS_GYRO_FILTER = 64 and the hover throttle that @dkemxr found to be 118hz. should I set my INS_HNTCH_FREQ to 100hz and the INS_HNTCH_BW to 50 hz?
When you speak of two harmonic are you speaking of this parameter INS_HNTCH_HMNCS and setting the bits 0 and 1? I am using esc telem mode 3 for filtering.