Mathematical models of electric machines