PID Control Design

Why doesn't a P controller work in a drone?

To hover, the drone needs a propeller speed that is enough to counter gravity. In a P controller system, the control action is proportional to the error. As the drone gets closer to the target height, the error decreases, which causes the actual propeller speed to drop below what's needed to stay airborne, so the drone begins to fall.

The controller never manages to reduce the error below the error that gives the drone the speed enough for staying in the air. If the drone goes up a little bit, the error decreases, the propeller speed decreases, and the drone goes down. This is why you always get stuck with that offset error below the target.

Key takeaway: if the system needs action at steady state, P controller will not be enough because there should be no error at steady state so the P controller will produce no action. You need an I controller then, and might need a D controller to cure oscillations, just like adding a damper.

Resources