A rotating electric machine comprising: a motor shaft configured to rotate with rotational movement; a controller; and a magnetic sensor that is solidly mounted on said rotating shaft; wherein said magnetic sensor is configured to send an output signal relating to identification parameters identifying the rotating electric machine to said controller for feedback synchronization of the rotating electric machine; the magnetic sensor comprising: - a rotary portion, fixed to a lateral surface of an intermediate point of the shaft in a given axial position of the shaft and suitable for producing a magnetic flux radially from an external lateral surface of the rotary portion; and - a stator portion, fixed to a frame of the electric machine, and comprising means for radially detecting variations in the magnetic flux during rotation of the shaft, said rotary portion comprises: -- a bushing suitable for being fitted in a radially external position on the shaft and comprising fastening means; -- at least two magnets (9a, 9b) inserted in said bushing and arranged so as to create a magnetic field having discontinuities of the field itself resulting in a variation of the magnetic flux during rotation of the shaft; wherein said means for detecting variations in the magnetic flux comprises at least two devices (11a, 11b); characterized in that said two devices are analog Hall sensors (11c, 11d), arranged angularly, at 90° with respect to each other, with respect to the shaft, in order to continuously detect the magnets (9a, 9b) so as to constantly detect a magnetic flux variation on said external lateral surface of the rotary portion during the rotation of the shaft, thereby generating two sinusoidal waveforms always with positive polarity staggered by 90° with one turn of the rotary axis; wherein said Hall sensors (11c, 11d) are arranged on the stator portion so as to be positioned in a radially external position with respect to the rotor portion; and wherein said controller is designed to receive analog sinusoidal signals. a motor shaft configured to rotate with rotational movement; a controller; and a magnetic sensor that is solidly mounted on said rotating shaft; wherein said magnetic sensor is configured to send an output signal relating to identification parameters identifying the rotating electric machine to said controller for feedback synchronization of the rotating electric machine; the magnetic sensor comprising: - a rotary portion, fixed to a lateral surface of an intermediate point of the shaft in a given axial position of the shaft and suitable for producing a magnetic flux radially from an external lateral surface of the rotary portion; and - a stator portion, fixed to a frame of the electric machine, and comprising means for radially detecting variations in the magnetic flux during rotation of the shaft, - a rotary portion, fixed to a lateral surface of an intermediate point of the shaft in a given axial position of the shaft and suitable for producing a magnetic flux radially from an external lateral surface of the rotary portion; and - a stator portion, fixed to a frame of the electric machine, and comprising means for radially detecting variations in the magnetic flux during rotation of the shaft, said rotary portion comprises: -- a bushing suitable for being fitted in a radially external position on the shaft and comprising fastening means; -- at least two magnets (9a, 9b) inserted in said bushing and arranged so as to create a magnetic field having discontinuities of the field itself resulting in a variation of the magnetic flux during rotation of the shaft; -- a bushing suitable for being fitted in a radially external position on the shaft and comprising fastening means; -- at least two magnets (9a, 9b) inserted in said bushing and arranged so as to create a magnetic field having discontinuities of the field itself resulting in a variation of the magnetic flux during rotation of the shaft; wherein said means for detecting variations in the magnetic flux comprises at least two devices (11a, 11b); characterized in that said two devices are analog Hall sensors (11c, 11d), arranged angularly, at 90° with respect to each other, with respect to the shaft, in order to continuously detect the magnets (9a, 9b) so as to constantly detect a magnetic flux variation on said external lateral surface of the rotary portion during the rotation of the shaft, thereby generating two sinusoidal waveforms always with positive polarity staggered by 90° with one turn of the rotary axis; wherein said Hall sensors (11c, 11d) are arranged on the stator portion so as to be positioned in a radially external position with respect to the rotor portion; and wherein said controller is designed to receive analog sinusoidal signals.