Analytical Solution for Cogging Torque in Surface Permanent-Magnet Motors Using Conformal Mapping