Improved models of electric machines for real-time digital simulation