A method of controlling a polyphase, reversible, rotary electrical machine of the kind called an alternator-starter for a motor vehicle with a heat engine, the said machine being adapted to work either as an electrical generator—in an alternator mode—or as an electric motor, the said machine comprising a rotor (4), a polyphase stator (8) carrying a plurality of windings, a command and control unit, which includes a rectifying and control bridge (201) associated with the rotary electrical machine and connected to the windings of the stator of the said machine, and means for following the angular position of the rotor, the said means including a target and sensors (52) for detecting the passage of the target and for transmitting items of information to the command and control unit, characterised in that, starting from sensors of the linear type delivering signals of a sinusoidal type after reading the target, a summation of the signals delivered by the sensors is performed in a processing unit (300), by applying a coefficient to the sensors to create signals which are out of phase with each other and the number of which is equal to the number of sensors.