FSW lap joint resistance optimization through gradient techniques