Tuning the Harmonic Notch

You don’t have this:

Doubt it will make any difference as I am sure its vibration related, but who knows.

I tried both values: 0 and 40 but nothing happening

Thanks good ida, i will try soon

@anbello @andyp1per
I can update my PR with the (super!) harmonic notch so we can test it.
I also would like to see more data, let’s say accelerometer data without filtering (no LPF) but with gyro harmonic notch enabled, maybe with aggressive maneuvers and also static loiter. I didn’t have chance to test it yet unfortunately.

By the way if it can improve AltHold I think it would also improve Loiter, Guided, Auto, Circle, RTL…
But I suppose that the improvement will be minor, now that the harmonic notch made so much!

1 Like

I would like to test it but, in this period, only indoor testing, so althold with tiny maneuvers and static loiter.

@andyp1per

I’m taking the “violent takeoff” discussion here. You said notch filtering based on ESC telemetry would help stability very close to ground. I don’t quite fathom it :slight_smile:
Fluid physics close to a hard surface boundary have little infuence on IMU readings - where the filters improve. The main effect is related to motor/propeller efficiency, or impact, and that’s what is confusing the PID loops very close to ground. And that’s why we clear it ASAP.
And I’m not that excited about ESC telemetry filtering, 'cause these BlHeli_32 ESCs are geared towards tiny 5-inch copters. already covered by Betaflight, Butterflight and Whatnotflight. ArduCopter usually gets differnt tasks and uses.

You are, of course, right. Ground effect is a thing and it pays to takeoff sharply. That said I have also found that ground effect and propwash from the ground inject a lot of physical noise into the PID loops that requires tight control. That coupled with the general need to have precise control near the ground - twitching or changing altitude by 30cm near the ground is very different to twitching at 30m - means that in theory good control has a beneficial effect near the ground. In practice I have found this to be true - before the harmonic notch I struggled to control my copters near the ground and like you took off sharply to avoid the risk. Now I find that I have such precise control and the loss of control near the ground is so minimal that I have much greater confidence. So much so that I can make my copter bounce in and out of the ground effect with minimal adjustment, before the harmonic notch I could not do this.

Yes, BLHeli ESC’s are geared towards tiny copters, that’s one reason I did https://github.com/ArduPilot/ardupilot/pull/11886

@andyp1per, I’m finishing up my new copter build… For some reason only ESC’s 1-3 show telemetry… regardless of if I have it set to auto, or set the mask to 15.

Will that cause any problems with the ESC Telemetry/RPM based notch? ESC’s 1-3 show data. #4 does not.
I’m assuming it’s a hardware issue… ESC is of course at the bottom of my stack. I’d rather not rebuild my copter if I don’t absolutely need it working.

1 Like

The rpm value used is the average of the ones delivering telemetry - so it should be fine.

Will it be able to tell number 4 is not working, even though it is enabled?
(I don’t know the details about how it functions… So maybe it could see I have all four enabled, and try averaging over 4, even though the data is only there for 3 of them…)

I guess I could disable auto, and just set the mask for 1, 2 and 3. I think that will disable passthrough for #4, but that’s probably OK. I already connected an configured them, so don’t really need that anymore.

You can probably tell if its working ok by looking at the CTUN->N and see if its tracking rpm as you expect.

OK thanks a lot.
I’m not quite to flying yet, but will check the logs once I get there.

It looks like “active” means that a telemetry packet was read in the last second. So as long as blheli is not sending zeros you should be ok. You can probably tell by switching on blheli debug.

If blheli is sending you zeros you can use REF to adjust - for instance setting it to 4/3 will compensate for one ESC being bad.

It appears to be working fine w/out any special configuration.
Only 3 esc’s show up in the logs. I think only 3 are connected together on the ESC… Maybe a missing resistor or diode or something…

Anyway, only a short hover inside last night, but the logs look good. Slightly higher than I expected @ 260hz, but I’m using lower pitch props than I usually do, so that’s probably right. (My other slightly heavier copter hovers around 240hz with 3x3 props. This new one has 3x2 props.)

@andyp1per

When I went over my test bird, the graphs were clear. 55Hz main spike, 110Hz first harmonic, then 2nd and 3rd fading out. Set the notch filter and it became smooth as knife going through butter.

Yesterday I was able to recover my training quad from post, happily upgraded to -rc5 and do a FFT analysis flight:

They share the same props, this has a bit beefier motors, and round carbon tubes instead of square aluminium profiles.

This?


It looks like a main peak at about 67Hz and then harmonics at 135Hz, 200Hz, 267Hz, but it’s pretty noisy. Is this pre-filter or post-filter?

It’s pre-filter, because I can’t really figure out what to filter. I’ll try a shorter flight, maybe I get less noise.

Do you have a notch already configured?

Notch was disabled. I just logged the IMU.

I’ve tried another flight, with just IMU1