It is not uncommon to see people asking about how to balance a quadricopter using MPU-6050. It's also common to see people answering that a PID controller is needed. However, people doesn't say how.
In my case, I've already managed to combine data of accelerometer and gyroscope with a complementary filter. Also, I've already studied about PID in college. What I don't get is:
The input is voltage signal to the motors, the output is quadricopter's tilt angle and the setpoint is 0 (no tilt angle), right? The error operated by the PID is the difference between setpoint and output. So, how will my system know how to operate in the motor in order to make tilt angle closer to zero? I guess I have to implement my own logic to speed up some motors and slow down others, according to the error. But, if I have to do so, I don't see why PID is necessary. If I haven't, I don't get how motor is balanced according to the error. Could someone clarify how PID could work or share another solutions?