Limon, I can't exactly answer your PI equation, that part of the project is my group members' responsibility.
Our instructor has told us to use a PI controller for each motor independently.
If you look at a lot of the open source quadcopter projects, they implement a PID for roll/pitch/yaw and these correction values get put into a motor control loop. The idea that our instructor wants us to implement is take the new motor values, as inputs to a motor PI loop using an RPM detection algorithm that we came up with.
Basically the following is comprised of PID for r p and y. Our goal is to add a PI at the end of the set of equations below to improve reaction time of the motors.
motorCommand[FRONT_LEFT] = throttle - motorAxisCommandPitch + motorAxisCommandRoll - (YAW_DIRECTION * motorAxisCommandYaw);
motorCommand[FRONT_RIGHT] = throttle - motorAxisCommandPitch - motorAxisCommandRoll + (YAW_DIRECTION * motorAxisCommandYaw);
motorCommand[REAR_RIGHT] = throttle + motorAxisCommandPitch - motorAxisCommandRoll - (YAW_DIRECTION * motorAxisCommandYaw);
motorCommand[REAR_LEFT] = throttle + motorAxisCommandPitch + motorAxisCommandRoll + (YAW_DIRECTION * motorAxisCommandYaw);
This code was adapted from aeroquad code.