Why Does Excessive D Gain Cause Oscillations and Motor Overheating?

by Oscar

Too much D gain can cause trilling oscillations in an FPV drone, giving you hot motors, and sometimes even burn your motors. In this article, I will explain why excessive D term can lead to motor overheat in the simplest way possible.

Some of the links on this page are affiliate links. I receive a commission (at no extra cost to you) if you make a purchase after clicking on one of these affiliate links. This helps support the free content for the community on this website. Please read our Affiliate Link Policy for more information.

Understanding Set-Point, Measurement, and Error

As mentioned in my PID tutorial, a PID controller works by adjusting the speed of the motors to move the quadcopter to the desired rotation speed.

In technical terms, this desired rotation speed is called the “set-point.” The actual rotation speed of the quad, measured by the gyro sensor, is called the “measurement.”

An “error” is simply the difference between the set-point and the measurement. The job of a PID controller is to minimize this error, and when the error is zero, the measurement equals the set-point, meaning the quad is spinning at the exact speed we want it to.

What Happens in Real Life?

When we move our sticks, it changes the set-point and causes the error to grow.

For example, if I move the roll stick, I am telling the quad to spin around the roll axis faster, which changes the set-point and causes the error to rise. The flight controller then looks at the gyro, which reports what the quad is actually doing, and calculates the error.

The flight controller will then command the quad to spin the motors faster or slower until the quad reaches the desired rotational speed, and the error becomes smaller, eventually back to zero.

However, it takes time for the motors to speed up and slow down until they reach the intended speed. If there’s an overshoot, the error will grow in the opposite direction, causing the quad to spin up motors on the opposite side to counteract.

What is D Term & Derivative of Error?

The role of the D term is to minimize the “derivative of error.”

The derivative of error is the rate at which the error is changing. What the heck is derivative? It might sound confusing, but it’s not. For example, the derivative of speed is acceleration.

The derivative of error peaks when the error is increasing the fastest and goes back down to zero when the value of the error is not changing anymore, even if it’s at its maximum amplitude.

So, the D term looks at the derivative of error and aims to keep it as close to zero as possible. How does it do this? By changing your motors’ speed!

Unlike the P term, which is directly proportional to the error and changes exactly as fast as the error changes, the D term is based on how quickly the error is changing, regardless of how big or small the error is. So, even if the error is small but changing fast, the D term will be large. If the error is huge but not changing, the D term will still be zero.

The Relationship Between D Term, Oscillations, and Overheating

As you can see, we might have only moved our stick once, but the D term can potentially command our motors to change speed multiple times! That’s because every time the derivative of error is not zero, the D term changes motors speed trying to minimize it.

Higher D gain will push the motors even harder, and when they are unable to handle the rapid change of RPM, it will cause them to stutter, making your quad oscillate, which can eventually lead to motor overheating. The oscillations will feed back into the gyro, exacerbating the problem.

This is a simplified explanation, but I hope this gives you some understanding of why too much D gain is not a good thing.

Leave a Comment

By using this form, you agree with the storage and handling of your data by this website. Note that all comments are held for moderation before appearing.

6 comments

julien 7th September 2022 - 11:10 pm

P is always pushing in the direction of the target, but never braking before the target. So P alone is always overshooting because of inertia.

D is always pushing in the direction to avoid increasing or decreasing of the error = D is pushing when the error increases, and is braking against P when error decreases. So D allow a “soft landing” on the target, without overshooting.

If D is too high compared to P, D wins over P and go in the other direction instead of just braking before the target.

Waaooww. Totally new understanding for me, thanks to you.

Going further :
If we see overshooting, D is not big enough compared to P.
If we see that the target is not reached and the error re-increase, then D is too high compared to P.
Easy way to adjust P to D balance.
Totally make sense to me now.

Reply
daro 6th May 2023 - 3:10 am

summarized perfectly

Reply
Nilesh 7th September 2022 - 6:03 am

Your explanation is simple to understand and intuitive. All your articles are really good. Every aspect of quad is explained in detail and most importantly in the way it could be understood without straining the brain. I am building the quad using ESP32 and developing my own flight controller. I struggled a lot to tune the gains. It was very difficult to fly and control my quad. Finally i zeroed down that only D gain was creating the problem. I was trying to tune D gain but it was very difficult to sense oscillations created by D gain at lower or lift off RPM. Finally when I increased RPM to level 1.3 to 1.5 times lift off I felt the oscillation of D gain. Then I tuned D value. I found my previous D value was 4 times higher than what required. Now flight is smooth.
Thanks.

Reply
Andy 11th July 2021 - 1:52 pm

Oscar, you are a pimp. Your writing has gotten me through my first build, all kinds of troubleshooting and repairs, and now PID tuning on my new 7″ build. You’re welcome at my house any time.

Reply
Tunez 13th June 2021 - 9:45 pm

Thank you Oscar, your write ups about PID’s are the best out there. Your desire to teach us is truly a blessing

Reply
Mehmet ORHAN 26th June 2020 - 11:37 am

Your blog is a nice library about the hobby. Thank you very very much.

Reply