I am currently working on a Drone that navigates to different points that it detects on the ground. To go from one point to another in a smooth manner, I am employing a PID looks at the error between the current and the desired location of the drone. Currently this is a two dimensional problem. Soon enough, it is going to be a three dimensional problem as I will try and have the drone navigate three dimensional spaces. Now I am unsure as to how to program a PID that can take in more than one input and give an two outputs (which are x and y in this case for the Cartesian geometry the drone is trying to navigate).

Can someone take me through the exact theory behind a PID that approaches the 2D problem and different solutions that are possible. I also want to know about any solutions that are present in C++ that can help me speed up creating this program (other languages are also okay, but I am mostly building this project in C++).


If you require two outputs, which belong to a movement in x and the other in y direction, you could start with the assumption, that both movements are independent an simply implement two PID controller, each caring for one direction.

It gets interesting at the point where you translate the output of these two controller to signals to the actuators. Here it may be wrong to assume that both movements are independent. If you give more insight on that, we can give better ideas for control algorithms

(more a comment then an answer, but I cant comment)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.