Motor control for battery powered applications