Detection of Demagnetization Faults in Permanent-Magnet Synchronous Motors Under Nonstationary Conditions