Title: Motor Controller and Method for Controlling Motor