The presence of parasitic torque ripples is characteristic of a synchronous machine with permanent magnets (PMSM). Nonsinusoidal magnetic flux distribution in the air gap and the variable magnetic resistance of the stator slots are the reasons for these ripples. As a result, speed ripples and angular position ripples exist. This paper proposes an adaptive controller that solves this problem. Basis of adaptive compensator for periodic disturbances is periodic change of control parameters through measuring parameters of error harmonics with frequency of disturbance. Adaptation to changing parameters of the periodic disturbance is the feature of adaptive controller. Simulation results in MATLAB/Simulink show that the use of the adaptive compensation system greatly reduces the influence of torque ripple.