Stator fault analysis of synchronous machines