Learn to Tune
After we have built a new drone the real work begins to get it flying great! You are likely starting off learning about PIDs. We are too so I seemed nice to provide some reference information. When folks talk about tuning their drone. They are often configuring settings within a PID controller. This system helps you achieve the desired results by adjusting the input you have applied to the sticks. If the drone then senses there has been an error, it will adjust the input again. and again. The PID 'loop'!
There are countless Blog Articles and YouTube Videos on PID tuning and how all this works. This project is designed to help index and organize some of the popular content out there we enjoy.
So what is a PID Controller?
Control systems are used to get your drone to react the way you want given the change in it's position. Based on the gyro and other sensors the programming re-defines your input.
proportional = Current ERROR
integral = PAST ERROR
The integral term is the accumulation of past errors over time (t). For example, your robot continually is on average off by a certain amount all the time, the I term will catch it. Lets say at t1 the error was A, at t2 it was B, and at t3 it was C. The integral term would be A/t1 + B/t2 + C/t3.
derivative = PREDICTION OF ERROR (BASED ON CHANGE)
The derivative term is the change of error over time (t). For example, the error was C before and now its D, and t time has passed, then the derivative term is (C-D)/t. Use the timer on your microcontroller to determine the time passed.
The error is the amount at which your device is not doing something right. For example, if your robot is going 3 mph but you want it to go 2 mph, the error is 3 mph-2 mph = 1 mph. Or suppose your robot is located at x=5 but you want it at x=7, then the error is 2. A control system cannot do anything if there is no error – think about it, if your robot is doing what you want, it would not need control!
Each term (P, I, D) will need to be tweaked in your configuration.
Setting Up Your Radio
When you are planning to tune your drone. It can be helpful to set you radio to be able to modify settings on the fly. You can even update them mid-air!
Understand the Fundamentals
Joshua Bardwell is a very knowledge pilot and technologist. This video is the conclusion of his PID Tuning Masterclass series. In the other videos in the playlist, he explores what low and high PIDs do to let you recognize what might need to be correct a particular problem. In this presentation, he will go over how the PID controller works internally, and sum it all up with some specific recommendations for how to solve certain problems.