Simulation of Stator Winding Faults with an Analytical Model of a PMSM