Sinusoidal commutation motor control software