Method for controlling an electric motor associated with a servo-pump of an industrial machine to modify a hydraulic pressure applied by the servo-pump to a load, wherein said electric motor can be moved based on actuation electric signals generated by an electronic control unit, the method comprising the steps of: - providing, the electronic control unit, with a first signal (Pfed) indicative of a current pressure value detected in a hydraulic circuit of the servo-pump; - providing, the electronic control unit, with a second signal (Pref) indicative of a reference pressure value; - providing, the electronic control unit, with a third signal (Sfed) indicative of a displacement angle (θ) of a rotor of the electric motor detected on a plane orthogonal to the rotation axis starting from a reference position; - generating, based on said first (Pfed), second (Pref) and third (Sfed) signal, a fourth signal (BTref) indicative of a driving torque value that can be applied to the motor and associated to a torque control signal (Tref) configured to control the movement of the motor of the servo-pump, the method further comprising the following steps carried out by the electronic control unit: - comparing the first (Pfed) and the second (Pref) signal to generate a pressure error signal; - multiplying said pressure error signal by a trigonometric function calculated in relation to said displacement angle (θ) obtained from the third signal (Sfed) to generate a first transformed signal (PEt); - integrating over time said first transformed signal (PEt) to generate a first integrated signal (PEint); - multiplying said first integrated signal (PEint) by said trigonometric function calculated in relation to the sum of said displacement angle (θ) and an offset angle (θ off) to generate a second transformed signal (Tff), said second transformed signal (Tff) being representative of a compensation driving torque value; - adding said second transformed signal (Tff) to the fourth signal (BTref) to generate said control signal (Tref), characterized in that said trigonometric function is calculated in a first displacement angle (Nθ) obtained by multiplying said displacement angle (θ) by an integer indicative of the number of internal teeth of the pump of the servo-pump. - providing, the electronic control unit, with a first signal (Pfed) indicative of a current pressure value detected in a hydraulic circuit of the servo-pump; - providing, the electronic control unit, with a second signal (Pref) indicative of a reference pressure value; - providing, the electronic control unit, with a third signal (Sfed) indicative of a displacement angle (θ) of a rotor of the electric motor detected on a plane orthogonal to the rotation axis starting from a reference position; - generating, based on said first (Pfed), second (Pref) and third (Sfed) signal, a fourth signal (BTref) indicative of a driving torque value that can be applied to the motor and associated to a torque control signal (Tref) configured to control the movement of the motor of the servo-pump, the method further comprising the following steps carried out by the electronic control unit: - comparing the first (Pfed) and the second (Pref) signal to generate a pressure error signal; - multiplying said pressure error signal by a trigonometric function calculated in relation to said displacement angle (θ) obtained from the third signal (Sfed) to generate a first transformed signal (PEt); - integrating over time said first transformed signal (PEt) to generate a first integrated signal (PEint); - multiplying said first integrated signal (PEint) by said trigonometric function calculated in relation to the sum of said displacement angle (θ) and an offset angle (θ off) to generate a second transformed signal (Tff), said second transformed signal (Tff) being representative of a compensation driving torque value; - adding said second transformed signal (Tff) to the fourth signal (BTref) to generate said control signal (Tref), characterized in that said trigonometric function is calculated in a first displacement angle (Nθ) obtained by multiplying said displacement angle (θ) by an integer indicative of the number of internal teeth of the pump of the servo-pump.