Tuning the Harmonic Notch

Sorry @andyp1per i don’t understand well when you say that the notch even if filter only gyro has effect also an accel, could you elaborate this?
Thanks

From the FFT’s its clear that a certain amount of accel noise is created by the copter itself reacting to gyro noise. So you can imagine each time you get some spurious gyro delta the controller will react to correct resulting in a twitch to the copter. This is the beehive noise that @winstonsaz is referring to. This twitch is an actual movement so reflected in the accels. If you cut out the gyro noise then all of this goes away.

2 Likes

Now i got it. Anyway not all accel noise is due to reaction to gyro noise.
If I have a frame resonance frequency to say 150Hz, I will see a peak even if I have applied the notch (attenuated by accel low pass filter).
I am trying to understand if it will be useful to add also the notch filter to accel as per @guglie PR.

It would be good to see more data here. The accel’s have a much more aggresive LPF but clearly @guglie filter has a postive effect on noise that gets though. The EKF does not use the filtered values so its really a case of what is benefited - if it’s only AltHold is the benefit enough?

A good AltHold is important. I think that in most cases it can be achieved with the correct damping of the FC and foam on the barometer. If there were cases in which this is not enough, the notch on the accel could be desirable.
As you say we will have to see more data.

@andyp1per can you add the information from post Tuning the Harmonic Notch in the wiki?

The recommendation to use ESC telemetry is already in there. Problem is I am referring to stuff (FFT) that is not yet in 4.0 or master - which bit do you want added?

The part about processor load

Right, but that’s specifically about FFT which is not yet in master.

Nope, no way :frowning:
I mounted rubber standoff with the rings below and above, but it didn’t work: one uncontrollable rocket roof (always in alt hold in stabilize only drift) and no autotune. Also in stabilize and alt hold (when worked) drift always in the same direction (acc calibrated and radio calibrated to 1500). I put double rubber rings again (without rubber standoff) and I moved the rx down to contact with the esc 4 in 1 to leave the FC free, but it got worse (rocket and drift).
I don’t know what to try, maybe I’ll leave the project :frowning:

Sorry to hear that. Can you post your latest parameters? It’s probably going to be difficult to make much progress without logs.

Yes, thanks Andy.
Often on HUD mission planner BAD AHRS appears, then disappears

last param.param (19.4 KB)

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