Fault detection of a five-phase permanent-magnet motor