Let's Talk About Gains

Joined
Mar 15, 2014
Messages
177
Reaction score
3
Location
Austin, TX
I'll preface this with i'm a noob to the phantom and RC/quadcopters in general, but I have learned a few things out of necessity. Feel free to take all this with a grain of salt and correct me. I don't know ****, but I was surprised info about gains wasn't easily available and discussed constantly here.

I was experiencing poor stability when in yaw and I wanted to fix it so I thought I might be able to help it by adjusting the motor gains. You can read all about that here:

viewtopic.php?f=7&t=10116

What do gains do?
There are two sets of gains. Basic and Attitude. Basic gains are power levels the naza uses in GPS and ATTI mode to hover, stabilize, maintain altitude, fight wind etc... Attitude gains are power levels as a result of your controller stick movements. If your phantom is blown by a gust the basic gains are how much power is available to the motor to get back to horizontal, maintain altitude and position.

If you're in a full throttle pitch, higher gains will also mean your phantom will go back to horizontal quicker because it has more power available to do so. Naturally, going horizontal quicker means you don't drift as far. I suppose you can think of it as breaking speed. Also, like flying on rails rather than floating around in a boat.

Why would I adjust the gains?
Because you want to make the gains either higher or lower :D You want to lower them if your phantom is oscillating. You want to increase the gains to increase stability. Every phantom has a different signature, i.e. different weight, different props so your should adjust your gains accordingly. If the point of the basic gains is to provide enough power for the naza to get back to level then it should be obvious that adding more weight would take more power to get back to level efficiently. Different props provide different lift and different RPS at different power. (motors too) If you added a gimbal you need to adjust your gains. I think a big reason aftermarket props have been such a bust is because a lot of people are not adjusting the gains accordingly. DJI says you want your gains as high as you can get them without oscillation.

How do I adjust the gains?
The quick and dirty is you increase them until you notice the phantom oscillating and then move them back down 10%. Start with the roll and the pitch. They should be set pretty much the same. Increase both by 10-15% and fly a bit, pitching and rolling hard. If you don't have any oscillation, increase 10-15% again. You'll first notice the oscillation when you're moving in the direction of the gain you're adjusting. When adjusting the roll gain pay attention for oscillation when you're in a hard roll. Do Basic Yaw then Basic Vertical.

You maybe have some subtle oscillations difficult to observer to the naked eye. You might be able to hear the difference. You should hear a constant buzz like a bee. A choppy buzz is an indication that you've got some subtle oscillation that might show up in your video.

Attitude gains are a personal preference IMO. How quickly do you want your phantom to react to your stick movements. The attitude gains should be adjusted last because they are relative to the basic gains.

Why might the optimized gain settings NOT be ideal?
You use more power. I'm not sure what the impact is on flying time. The movements might be more abrupt and less fluid. You'll have to take into account video quality.

I sill don't understand the yaw gain.
Me neither, at least not completely. The obvious one is when you're in a yaw, when you release the stick how quickly does the phantom stop yawing? Do you motors have enough power to stop the yaw? It's more complicated when it comes to moving all over he place when in a yaw. I think it has something to do with having no spare thrust because you have to create so much angular momentum to rotate and the naza automatically prioritizes altitude over maintaining position and some thrust is taken away from keeping position and applied to maintaining altitude.

What are the P2V's default gain settings?
The P2V comes from the factory with different gain settings than the "defaults" in DJI's assistant software. Thanks to xgeek later in the thread we got to the bottom of this. This is very important because if you hit defaults the flying characteristics will be different.

From the Factory
Basic Gains:
Roll/Pitch/Yaw 120%
Vertical 120%

Attitude Gains:
Roll/Pitch 200%

Defaults in DJI's assistant software
Basic Gains:
Roll/Pitch 125%
Yaw/Vertical 100%

Attitude Gains:
Roll/Pitch 125%

What are your settings?
Basic Gains:
Roll/Pitch 165%
Yaw 185%
Vertical 125%

Attitude Gain:
Roll/Pitch 125%

I am very happy with my new settings. The difference in stability in hover , predictability in movement, resistance to wind are night and day. I'm not anxious the phantom is going to do something stupid anymore, it does exactly what I want it to.
 
SlackerATX said:
What are your settings?
Basic Gains:
Roll/Pitch 165%
Yaw 185%

Attitude Gain:
No change - Roll/Pitch 125%

I am very happy with my new settings. The difference in stability in hover , predictability in movement, resistance to wind are night and day. I'm not anxious the phantom is going to do something stupid anymore, it does exactly what I want it to.

Slacker - this is good stuff. How close to stock is your P2V (the aircraft)? Have you added or removed any weight? Or shifted the center of gravity? I'm still at stock, but about to add a gimbal, so I would like to learn as much about this topic as possible. It makes sense that even prop changes could require gain changes.

It would be interesting to find out if matching our props to our motor arms consistently, once we have fine tuned our gains would have any impact on perfectly tuned flying characteristics...
 
SlackerATX said:
I'll preface this with i'm a noob to the phantom and RC/quadcopters in general, but I have learned a few things out of necessity. Feel free to take all this with a grain of salt and correct me. I don't know ****, but I was surprised info about gains wasn't easily available and discussed constantly here.

I was experiencing poor stability when in yaw and I wanted to fix it so I thought I might be able to help it by adjusting the motor gains. You can read all about that here:

http://phantompilots.com/viewtopic.php?f=7&t=10116

What do gains do?
There are two sets of gains. Basic and Attitude. Basic gains are power levels the naza uses in GPS and ATTI mode to hover, stabilize, maintain altitude, fight wind etc... Attitude gains are power levels as a result of your controller stick movements. If your phantom is blown by a gust the basic gains are how much power is available to the motor to get back to horizontal, maintain altitude and position.

If you're in a full throttle pitch, higher gains will also mean your phantom will go back to horizontal quicker because it has more power available to do so. Naturally, going horizontal quicker means you don't drift as far. I suppose you can think of it as breaking speed. Also, like flying on rails rather than floating around in a boat.

Why would I adjust the gains?
Because you want to make the gains either higher or lower :D You want to lower them if your phantom is oscillating. You want to increase the gains to increase stability. Every phantom has a different signature, i.e. different weight, different props so your should adjust your gains accordingly. If the point of the basic gains is to provide enough power for the naza to get back to level then it should be obvious that adding more weight would take more power to get back to level efficiently. Different props provide different lift and different RPS at different power. (motors too) If you added a gimbal you need to adjust your gains. I think a big reason aftermarket props have been such a bust is because a lot of people are not adjusting the gains accordingly. DJI says you want your gains as high as you can get them without oscillation.

How do I adjust the gains?
The quick and dirty is you increase them until you notice the phantom oscillating and then move them back down 10%. Start with the roll and the pitch. They should be set pretty much the same. Increase both by 10-15% and fly a bit, pitching and rolling hard. If you don't have any oscillation, increase 10-15% again. You'll first notice the oscillation when you're moving in the direction of the gain you're adjusting. When adjusting the roll gain pay attention for oscillation when you're in a hard roll. Do Basic Yaw then Basic Vertical.

Attitude gains are a personal preference IMO. How quickly do you want your phantom to react to your stick movements. The attitude gains should be adjusted last because they are relative to the basic gains.

Why might the optimized gain settings NOT be ideal?
You use more power. I'm not sure what the impact is on flying time. The movements might be more abrupt and less fluid. You'll have to take into account video quality.

I sill don't understand the yaw gain.
Me neither, at least not completely. The obvious one is when you're in a yaw, when you release the stick how quickly does the phantom stop yawing? Do you motors have enough power to stop the yaw? It's more complicated when it comes to moving all over he place when in a yaw. I think it has something to do with having no spare thrust because you have to create so much angular momentum to rotate and the naza automatically prioritizes altitude over maintaining position and some thrust is taken away from keeping position and applied to maintaining altitude.

What are your settings?
Basic Gains:
Roll/Pitch 165%
Yaw 185%

Attitude Gain:
No change - Roll/Pitch 125%

I am very happy with my new settings. The difference in stability in hover , predictability in movement, resistance to wind are night and day. I'm not anxious the phantom is going to do something stupid anymore, it does exactly what I want it to.

good post, slacker. i was planning on playing with the gain settings this weekend because i want to slow down the yaw rate to slower than what i have now..i aim to have it rotate the yaw slowly and smoothly. do you remember what your gain percentages were before you changed them?
 
excellent post...
 
Well here's another great post that I've got to mark for retention in my newbie knowledge base!
Thanks!
 
great post...I put up something about yaw a while ago...if I recall (and my tests seem to bear this out) is that now matter what you put in the yaw rate will still be the same. the only way to "slow" yaw speed is to be very delicate on the control stick.

that's what I remember, anyway
 
SlackerATX said:
I am very happy with my new settings. The difference in stability in hover , predictability in movement, resistance to wind are night and day. I'm not anxious the phantom is going to do something stupid anymore, it does exactly what I want it to.


Nice post...although I disagree with that last line. I'm still worried about mine doing something stupid because it flies exactly where I tell it to:)
 
  • Like
Reactions: JohnK
A topic I have been meaning to parse out the misinfo from... and you have saved me the hassle.

Feckin too cool for school!
 
Well this is a very timely post, and very welcome. I am about to add a gimbal and tracker to my bird and was worried about the gain settings. Great info here, My fine motor skills are for ****, and the yaw requires a very light touch as it is, I was hoping to kind of 'soften' up that control movement.
 
outlaw704 said:
SlackerATX said:
What are your settings?
Basic Gains:
Roll/Pitch 165%
Yaw 185%

Attitude Gain:
No change - Roll/Pitch 125%

I am very happy with my new settings. The difference in stability in hover , predictability in movement, resistance to wind are night and day. I'm not anxious the phantom is going to do something stupid anymore, it does exactly what I want it to.

Slacker - this is good stuff. How close to stock is your P2V (the aircraft)? Have you added or removed any weight? Or shifted the center of gravity? I'm still at stock, but about to add a gimbal, so I would like to learn as much about this topic as possible. It makes sense that even prop changes could require gain changes.

It would be interesting to find out if matching our props to our motor arms consistently, once we have fine tuned our gains would have any impact on perfectly tuned flying characteristics...

All I have is is the lens kit and a CP filter. The COG shouldn't have changed that much.
 
Do you bring a laptop to the field for this adjustment? Seems like this requires a lot of back and forth incremental adjustment to get to the optimal setting.
 
happydogs said:
great post...I put up something about yaw a while ago...if I recall (and my tests seem to bear this out) is that now matter what you put in the yaw rate will still be the same. the only way to "slow" yaw speed is to be very delicate on the control stick.

that's what I remember, anyway

Yeah that's my take as well. The attitude gains are the inputs for stick responsiveness. This is no yaw nor vertical attitude gain, just poll and pitch.
 
tizzl10 said:
good post, slacker. i was planning on playing with the gain settings this weekend because i want to slow down the yaw rate to slower than what i have now..i aim to have it rotate the yaw slowly and smoothly. do you remember what your gain percentages were before you changed them?

I'm not sure there is an effective way to slow the yaw, as in make the stick less responsive. (see previous post) If you lower the yaw It will drift after you've released the stick in the direction you were yawing, so that might be what you're looking for. I'd prefer it to be more precise in GPS mode and be able to switch to ATTI mode if I'm looking for more loosy goosy. I just need some time to switch between the two and get a better feel for what to expect.

I set the "defaults" in the gain tab without paying much attention when I first got it. That set the gains to this.

Basic
Roll 125%
Pitch 125%
Yaw 100%
Vertical 100%

Attitude
Roll 125%
Pitch 125%

Based on some things I've read around this may not be what the phantom was shipped, but I don't remember if it changed when I hit defaults. I've also read that these defaults might change from firmware to firmware, so it might be a moving target. It might be that what the values mean changes. WTF does 125% mean anyway?! 125% of what?

I have a feeling that after a firmware upgrade or after hitting defaults on the gain tab my phantom was less stable, I just didn't pay enough attention to correlate the two.

I'd be really interested in know what someone has who hasn't hit the "defaults".
 
I have a P2Z and as shipped from the factory mine was set to:-


If I press the default button they reset to:


I have not tried the defaults as it flys perfect with the first settings.
 

Attachments

  • Shipped.png
    Shipped.png
    22 KB · Views: 1,582
  • Defaults.png
    Defaults.png
    21.3 KB · Views: 1,494
yawnalot29 said:
Do you bring a laptop to the field for this adjustment? Seems like this requires a lot of back and forth incremental adjustment to get to the optimal setting.

Yeah it's a lot of back and forth for sure. I brought my laptop with me and set it on the back of my truck. It's a two battery sorta task.

Some of dji's quad copters allow you to assign gains to controller channels and adjust the gains mid flight via a knob on your controller. Would save a lot of time. I probably have some more tweaking to do once I get some time.
 
xgeek said:
I have a P2Z and as shipped from the factory mine was set to:-


If I press the default button they reset to:


I have not tried the defaults as it flys perfect with the first settings.


I knew it! Thanks a lot. That explains a lot about why I started having stability problems at one point. Why the heck are the defaults so different that what the factory settings are!?!

PS what version of the firmware are you running. If you upgraded did you happen to notice a change?
 
I am now on version 2.0 and the gains did not change when I did the update last Saturday.

BTW my P2Z is only a few weeks old and came shipped with 1.8.
 
SlackerATX said:
tizzl10 said:
good post, slacker. i was planning on playing with the gain settings this weekend because i want to slow down the yaw rate to slower than what i have now..i aim to have it rotate the yaw slowly and smoothly. do you remember what your gain percentages were before you changed them?

I'm not sure there is an effective way to slow the yaw, as in make the stick less responsive. (see previous post) If you lower the yaw It will drift after you've released the stick in the direction you were yawing, so that might be what you're looking for. I'd prefer it to be more precise in GPS mode and be able to switch to ATTI mode if I'm looking for more loosy goosy. I just need some time to switch between the two and get a better feel for what to expect.

I set the "defaults" in the gain tab without paying much attention when I first got it. That set the gains to this.

Basic
Roll 125%
Pitch 125%
Yaw 100%
Vertical 100%

Attitude
Roll 125%
Pitch 125%

Based on some things I've read around this may not be what the phantom was shipped, but I don't remember if it changed when I hit defaults. I've also read that these defaults might change from firmware to firmware, so it might be a moving target. It might be that what the values mean changes. WTF does 125% mean anyway?! 125% of what?

I have a feeling that after a firmware upgrade or after hitting defaults on the gain tab my phantom was less stable, I just didn't pay enough attention to correlate the two.

I'd be really interested in know what someone has who hasn't hit the "defaults".

Here are my stock gain settings after the 2.0 update. Haven't had a need to make any adjustments since it flys and hovers nicely. Even with 15mph winds.
Sorry for the bad pic.
asy8ahyp.jpg


Sent from my XT1080 using Tapatalk
 

Recent Posts

Members online

No members online now.

Forum statistics

Threads
143,066
Messages
1,467,352
Members
104,933
Latest member
mactechnic