A method for digital measurement of speed and torque of electric motors