Permanent magnet synchronous machines (PMSM) are appealing candidates for many high-performance applications such as robotics, machine tools and other electrical propulsion system because of their attractive characteristics. PMSM have advantages of high power density, high torque-to-inertia ratio, and high electrical efficiency. However, the main disadvantage of PMSM is the torque ripples. Therefore, the study of how to compensate the torque ripples so as to improve the tracking performance of PMSM is very meaningful and necessary. In this paper, we focus on the control of a non-sinusoidal permanent magnet synchronous machine. First, we compare the various methods which to reduce the torque ripple. Then, we built a basic PMSM model. After that the Iterative Learning Control (ILC) algorithm is applied to compensate the torque ripple, and improve the tracking performance of the PMSM. The effectiveness of using ILC method to reduce torque ripple is demonstrated by simulink results.