Thrust ripple optimization and experiment for a permanent magnet linear synchronous motor