Since Betaflight 3.1, subsequent releases of the popular firmware have a feature called “anti_gravity” which can be enabled from the “Configuration” tab.
Have the Betaflight devs finally found the holy grail to keep your quad in the air forever for unlimited flight time, COMPLETELY destroying the force of gravity?
Not quite.
However, anti_gravity is very useful and helps overcome or at the very least strongly mitigate a major issue with tuning.
What the I gain is for (and how that’s connected to anti_gravity)
Tuning a copter(Betaflight or otherwise) involves changing three gains on the three axes of the quadcopter: P, I, and D.
The I gain is the “memory” gain – it “remembers” the orientation of the copter and helps to keep it that way. The I gain is why your quadcopter can maintain whatever attitude it is at.
A perfectly or ideally tuned I gain means your quadcopter will remain in the same attitude it is at even if you apply or suddenly cut the throttle(which would cause a jerk and sudden change in movement).
However, there’s a certain window for how high the I gain can go.
If you push it up too far, then the quadcopter starts getting really sloppy and can even spiral out of control.
On most copters with powerful motors, even an I gain on the higher side doesn’t always completely eliminate slight nose dips/rolls on sudden punchouts or throttle cuts because the I gain works in the past – i.e. it uses previous data, and a sudden throttle jump is too fast for the I gain to factor the change in and maintain the orientation.
That’s where anti_gravity comes in.
What anti_gravity does
Anti_gravity basically multiplies the I gain by a certain number(the default is 2 or so, but you can change that) the moment throttle changes very quickly, and it immediately reduces it once the quadcopter has maintained the attitude correctly so it doesn’t then spiral out.
It’s a way to give your miniquad a “boost” of I gain for a split second when it needs it.
When should you use anti_gravity?
According to Joshua Bardwell, you can pretty much always use it.
I’ll tell you a story of how I destroyed one of my earlier quads in a futile attempt to tune it(this was before Betaflight 3.0, and this particular quad was using KISS).
No matter how much I tried, I just could not eliminate the slight nose dip/roll on punchouts – I ended up pushing the I gain up VERY VERY high – and when I took off again, the quadcopter spiraled out of control, crashed, and there was a giant mess of carbon fiber everywhere.
Ouch.
You can pretty much turn anti_gravity on from the Configuration screen by default and leave it be, and that should take care of it for you on most builds.
You should always do a test flight before trying something too risky, though, to make sure everything is working fine. If it seems like the quadcopter is wobbling out of control, you can try turning anti_gravity back off to see if that eliminates the issue, or lower your I gains.
If anti_gravity doesn’t have much affect on the dip/rolls, then you can try adjusting the parameters.
By default, anti_gravity will double the I gain if the throttle goes higher than 35% in a set number of milliseconds.
You can change this to multiply by 2.5 or 3 instead of 2 – I think 2.5 or 3 is really the highest you need to go, considering that a close-to-stock I gain on a Betaflight copter is around 45ish and 3 times 45 is 135, which is ridiculously excessive for a normal I gain(though not necessarily for an I gain on anti_gravity). But 4 times is now 180, and that’s really pushing it.
If 3 or even 3.5 doesn’t fix it, try rebalancing the weight around to get a better center of gravity.
Conclusion
That’s really all there is to it. Anti_gravity is a really simple but ingenious solution to a problem that plagued many pilots(myself included) for the longest time.
Leave a Reply
You must be logged in to post a comment.