From Wikipedia: A proportional-integral-derivative controller (PID controller) is a control loop feedback mechanism (controller) widely used inindustrial control systems (Programmable Logic Controllers, SCADA systems, RTU's etc). A PID controller calculates an "error" value as the difference between a measured process variable and a desired setpoint. The controller attempts to minimize the error in outputs by adjusting the process control inputs.
A quadcopter uses a PID mechanism to stabilize itself. It measures the inclination angle with an IMU (Inertial measurement unit) and the corrects the error applying power to each motor.
This is our first low budget test we made with a PID model using a Servo, a sonar to measure distance, a potentiometer to establish the desired set point, and a piece of paper :-)
Then, it got more complex. Same test but using a real motor, ESC and IMU:
In order to do this test, we had to create a plotting library for Processing. You can download it for free.