Control Algorithm Design for a High Power Electronic Speed Controller