PID Tuning?

ItMightFly

Active member
Hello! I have been in the RC world for over 11 years (14 years old now), recently introduced to Multi Rotors, I own a Eachine Wizard x220 (I recommend it), what is PID? I have programmed my quad with BetaFlight 3.1.1 and it flies great. But I keep hearing stuff on YT, "I had to up the 'D' for less jello in flight' I WANT TO KNOW! My quad has serious jello. How to fix? Can somebody please define what PID tuning is, I might be going on about nothing, I don't know. Thanks for the help! Hope to learn from you all!
 

Snarls

Gravity Tester
Mentor
PIDs, or Proportional, Integral, and Derivative, are a concept in control theory. Basically any system has an input and an output. In many systems, particularly inherently unstable systems such as a multirotors, the input does not naturally give us the desired output. So a compensator has to be added to modify the signal into what we desire. One of the most popular ways to do this is to use PIDs.

So PIDs are parameters or gains that we 'tune' to get the best output (flight performance) out of our multirotors. Each term generally has it's own effect on the performance of the system. Proportional gain is used to define how aggressively the system will try to reach a target value. For multirotors this is often described with how 'locked in' a multirotor feels. Less proportional gain and the multirotor will feel 'loose' and slow to react. Too much proportional gain and a multirotor will start acting like a rabid animal, quick sharp movements, but with a terrible rapid shake or oscillation.

Integral gain is used to remove steady state error from a system. In the case of multirotors steady state error is mainly caused by wind or imbalance on the airframe. With no integral gain a multirotor will react to your input appropriately, but then it will slowly drift out of position. Proper integral gain has the multirotor reach its target attitude and then hold it (assuming acro mode), with neither wind nor imbalance affecting the attitude over time. Too much integral gain is harder to describe, but generally it is manifested in slow oscillations, 'bumpy' flying, and worse overshoot with you do flips or rolls.

Derivative gain is used to modify the transient response of a system. For multirotors a desired transient response is to have no 'bounce backs' or overshoot when doing hard movements or flips/rolls. Increasing the derivative gain helps remove these negative characteristics. Too much derivative and the multirotor won't overshoot, but it will also take a long time to reach it's target attitude. This means the controls will feel sluggish and irresponsible as if the proportional gain is low.

When tuning multirotors it is often desired to tune to get the highest proportional gain, and lowest integral and derivative gain possible. Each axis of control has it's own set of PIDs.

You say you quad has serious jello, but you may mean oscillations because jello is often referred to when describing an undesirable fluid like wobble in recorded video. Regardless, jello is caused by vibrations and high frequency oscillations. To reduce the vibrations you can add some dampening between your camera and the frame. To reduce high frequency oscillations reduce your proportional gain.

Hope this helps. PIDs and control theory are quite complicated but that was a general what does what explanation. And if you are too lazy to read or want to understand further, I find this video to be a very good visual explanation:

 

PsyBorg

Wake up! Time to fly!
Keep in mind before you tune there are some detrimental things that can happen as well as making the quad more stable. Its finding a happy balance that eludes most people.

Too much P gain can inject oscillations but at a different speed. Too low I gains you get drift.. too high I gains and the quad becomes stiff and feel like you have to force it to move. To low D gains and and you get wobbles and over shoots. Too much D gains and you could be over working the motors and physically burn them out.

Watch those two videos and try to under stand them best you can. Then after that watch these two on the tuning process without the droll techno speak and see how changes effect the quad and what to look for as well as what to aim for. This way there is less a chance you burn things out or simply get frustrated chasing a good tune. When you decide which video suits your thought process it is better to take the time and try to do them STEP by STEP in the order they go other wise you are just wasting time and effort.

I have tuned using both methods and each one results in a decent tune in a simple manor. Fine tweaks will always be needed as things like temperature and humidity and altitude will effect over all performance to be "Perfect".