Permanent magnet synchronous motors (PMSMs) are widely used as high-performance variablespeed drives. Ripple in the electric torque of such motors is often a source of vibration and tracking errors, especially at low speeds. In this paper we study the torque characteristics of PMSMs and propose a method to minimize the torque ripple. First, we establish a model for the motor to cover all dynamics without any assumptions on the signals. Next, we present a Fourier analysis of the torque ripple, caused by non-sinusoidal EMF and cogging torque. We propose a controller based on the internal model principle, and we prove the stability of the (non-linear) closed-loop, based on the passivity of the motor model. Finally, simulation results are given to verify the concept.