A method includes receiving a torque limit for a motor, monitoring a torque output of the motor, determining an amplitude and a phase of a torque ripple of the torque output, and determining a compensated torque limit for the motor, the compensated torque limit including a first component at the torque limit and a second component at an adjusted torque limit.