Computational Algorithms for Induction-Motor Equivalent Circuit Parameter Determination - Part I: Resistances and Leakage Reactances