A method of regulating the instantaneous electromagnetic torque of a polyphase rotating electrical machine equipped with stator and/or rotor windings supplied by a voltage and a current generated by an inverter formed of switches whose switching is controllable, said method comprising:
- a step of commanding the switching of said switches of said inverter using a pulse width modulation synchronous with the fundamental frequency of said voltage generated by said inverter, wherein the pulse width modulation is configured as a function of an input set point, and
- a step of calculating said input set point from an instantaneous torque set point at each regulation time, and
- a step of determining the time interval (T) between two successive regulation times so that, as long as said instantaneous torque set point is constant, that time interval corresponds to an integer multiple of the period of oscillation of said instantaneous torque of said machine caused by second order or higher harmonics of said voltage and/or said current generated by said inverter.