Tuning the Harmonic Notch

@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

Can you get a rough idea of the motor rpm based on kv and voltage? If you put a notch on the correct motor peak you will find all the others are significantly reduced. I would say 67Hz but that seems too low, so 135Hz maybe?

It’s a 15 inch 390 kV 6S bird. And it’s actually equipped with Wraith_32 ESCs, but the dumbass at the keyboard didn’t wire the telemetry. And the frame is designed for minimal weight, not for ease of maintenance.
Anyway, it’s sister with the Orange Cube, while using the same props and LiPo, and being 6-700g lighter, exhibits a clean 50Hz peak, with 100, 150 and barely visible 200Hz harmonics.
With this one, I see both 50-100 and 67-133-200Hz. I’ll try to center it on 67Hz.

What BW would you suggest ?

Ok so 67Hz is probably not a million miles off. BW 1/2 the frequency is a reasonable pick - so 35Hz.
I would try with a single harmonic before adding more - you may find that you actually don’t need them. I’m assuming that the noise is because the frame is not so rigid.

The frame is as rigid as I can make it. 14mm carbon tubes, 2mm carbon plates, bolted together with no folding mechanism. The only iffy part in the build are the props. Cheap chinese copies of the original 1st version of DJI S800. But they’re the only proper-pitch 15-inchers I know of for BlHeli ESCs.

But enough offtopic. You can add a 2nd filter ? :slight_smile: How !?

https://ardupilot.org/copter/docs/parameters.html#ins-hntch-hmncs-harmonic-notch-filter-harmonics

It’s a bitmask. Each harmonic is a filter.

Oh, I misread. I was thinking of two different filters, one on the 50Hz peak, the 2nd on the 67Hz peak, with their respective harmonics. And a smaller BW, like 10 or 8Hz.

The Q factor is constant across the harmonics, so if you double the frequency the bandwidth is also doubled. as long as you get the right first harmonic you will be golden. You can then use the regular notch to take out any frame resonance.

Hi Andy-A question for you. I had great success with the notch filter on my 5" quad and I’m playing around with it on the 13" quad. I’ll say that the craft is flying very well post notch filter configuration but I’m not totally clear on the best choice here.

This is the pre-notch filter reference data:

And here is post notch config at 112Hz, BW 60, default harmonic (3)

So it’s working well but the question is should I target the smaller 55Hz peak with one harmonic to pick up the larger 112Hz peak or go with the 112Hz as I have it?