Acceleration sensor allows robot to find his start-point angle, meanwhile gyro sensor takes part in all further calculations of angle change that occur after robort begins to balance. Calculated this way angle is taken as variable to the PD regulator, that returns required acceleration signal that goes on the motors.