Analysis of Electrical Machines