Parametric thermal modeling of switched reluctance and induction machines