Tuning the Harmonic Notch

It is a PR (Pull Request), until it get merged you will not see new value for parameter in the wiki.

Ah ok good, thanks!!

It looks ok, you could set INS_HNTCH_BW to 50 say I think.

When you get a rocket, what mode are you in? Is it AltHold? If so do you have foam over your baro?

can we discuss in a bit more details the factual differences between “3 ESC Telemetry” and “4” modes values for INS_HNTCH_MODE?
is there any benefit at all to use 4 instead of 3? i would presume 4 instead of 1 - throttle driven - is probably a valid idea, but, why would it (i mean mode 4) be better than an RPM driven model?
after that effort done yesterday, i could see in the end the complete absence of gyro vibrations in both 4" and 3" models, with 3" going automatically to 200hz area and 4" in 130hz area, using mode 3. it seemed to work very well.
took some time to find - here is the 3" FFT after filter.

the PSC_ filters - what do you have them on? try that - set them to 80 as below.

PSC_ACC_XY_FILT,2 PSC_ACCZ_D,0 PSC_ACCZ_FF,0 PSC_ACCZ_FLTD,0 PSC_ACCZ_FLTE,80 PSC_ACCZ_FLTT,0 PSC_ACCZ_I,1 PSC_ACCZ_IMAX,800 PSC_ACCZ_P,0.5 PSC_ANGLE_MAX,0 PSC_POSXY_P,0.25 PSC_POSZ_P,1 PSC_VELXY_D,0.5 PSC_VELXY_D_FILT,80 PSC_VELXY_FILT,80 PSC_VELXY_I,1 PSC_VELXY_IMAX,3000 PSC_VELXY_P,2 PSC_VELZ_P,5

If you have ESC telemetry then you definitely want to use mode 3 - it will give you the best result by far. Mode 4 is only for when you don’t have ESC telemetry, which is quite common in older ESC’s and larger copters. Mode 4 is CPU intensive however, so mode 1 is better if you don’t care so much about the accuracy and CPU is a concern (but it is significantly more complicated to set up and needs setting up all over again if you change any of the thrust control parameters). On smaller copters I have also seen mode 1 diverge significantly at high throttle, you can reduce this by changing the thrust linearization but that can also lead to control problems at higher throttle. Finally mode 1 is immediate, there is no latency in the calculation whereas mode 4 has delay which gets more significant the longer the FFT you run, mode 3 also has some delay but is probably not that significant.

i presumed the same. i would only suggest adding that as a general comment to wiki, so it would be clear for users - but, i think, in the current reality total majority of ESCs are blheli32 with support for telemetry, so, it should be easy enough to follow with mode 3 as a generic rule of thumb.
all in all it seems to work pretty darn well.

an other thing you can do - wrap electrical tape around the drone body to reduce amount of propwash into the controller area. just leave a small gap to connect the cord to the usb. it actually helps quite a bit.

1 Like

I decided to do a sanity check to make sure I’m not just seeing what I want to see with this. Since I was able to get all my PIDs turned up way higher and tighter, I wanted to prove that the notch filters actually allowed that to happen. Not just me doing a better job than all the previous times I’ve re-turned it.

So I flew it with the filters enabled and took a video. Flies great, love it, super smooth, more responsive and locked in than ever.

Then I flew with the filters disabled but the same PID tuning. It was completely unflyable! Major case of the shakes and shutters. Altitude hold just all over the place randomly climbing or dropping hard. Drifting around all over the place. I couldn’t even take a video of it because I couldn’t let go of the sticks long enough to hold the camera without it trying to kill me. In fact at one point it just randomly descended to the ground (not hard enough to break anything) and I couldn’t even disarm it. I had to use the kill switch.

So anyway, I was definitely not seeing what I wanted to see. This works, fantastic. I’d say this is one of the best control and stability improvements to hit ArduCopter in a long long time. Well done @andyp1per and @Leonardthall.

4 Likes

In alt hold, as always when rocket happens. I have a thin foam (1 max 2 mm) on the barometer, better bigger?
I try INS_HNTCH_BW to 50 asap, thanks Andy

Thanks Paul, i try asap!

2mm is not enough and on a small copter like that the baro is probably getting a lot of propwash. Try thicker and fuller foam.

1 Like

The harmonic notch filter is really magical for me, today I made three test flights with a new tuning,
the results!:

1.- The noise similar to a bee hive has disappeared.
2.- The abrupt drainage in battery power consumption has disappeared.
3.- More flight time (about 2 more minutes).
4.- Smoother control on all axes.
5.- More precise vertical and horinzontal displacement.

I get all these advantages, no matter that my flight controller is fixed to the frame without damping foams.

The problem related to altitude retention has improved a lot and now I am sure that this is due to the fixed mount of the flight controller.

1 Like

just use those for fixed mount - those rubber posts work very well.
https://www.amazon.com/uxcell-Thread-Vibration-Isolators-Absorber/dp/B07KT3QRX5/ref=sr_1_1?keywords=5mm%2Brubber%2Bmounts%2Bm4&qid=1573566475&sr=8-1&th=1

Thank you very much Paul Atkin,

I have a custom frame with little space and I can’t use that mount.

those mounts exist in different form factors, including M3 as well, you just need to search for one that fits. there is no other good solution to mount small FC, really.
this one below is the same rubber post in M4 8mm height. works fine in a standard 20mm stack format with ESC below.

I’ve used M3 of these but found them a little too solid, I currently have some customized lumiere silicon mounts (https://www.getfpv.com/orange-rc-bobbins.html) but its not ideal. It’s one reason I wrote the harmonic notch as vibration isolation on these small copters is just too hard :smiley:

true, very true. now with this great new filter the firmer ones actually should be benefitial for racing models, as you ideally want FC to wobble the least amount possible in sharp turns, while still isolating from motor noise. so it is always a difficult task, i also used similar ones, and sometimes in a combination of 2 softer ones and 2 firmer ones. still, it is a same approach, to use a rubber bobbin in a usual mounting hole. in the gecko i actually used both the combination of those bobbins and the rubber insert into the hole the kakute f7 mini came with. seems to be ok.

Like I mentioned in the microarducopter thread, I still use tape for my FC… Like the old original pixhawk, heh… Usually little gel pads and very strong double sided tape. Can make them thin, so the FC is just barely above the ESC. The FC’s are so light I’ve never had the tape come loose, and I fly daily for years now on these copters.

Although like Paul mentioned, hard mounting might be better now with the filter… I think I’ll try hard mounting this winters project.

double side foam tape works in some scenarios, as long as you do not tape to the surface of the ARM processor chip as in this case it may overheat.
i used to do that, but, i also found that after some series of good smacks FC sometimes comes off that tape, well, if you hit frame hard enough at a tree or something - those armattans can survive pretty much anything… rubber posts have never failed me yet.