Fault detection and identification in Permanent Magnet Synchronous Machines