A self-commissioning algorithm for VSI-fed induction motors