1. A system comprising: a proportional-integral-derivative (PID) regulator circuit configured to regulate a permanent magnet motor; a fault detection circuit coupled to receive at least first and second rotor reference frame currents from the PID regulator circuit; a threshold detector circuit configured to determine magnitudes of amplitudes for the first and second rotor reference frame currents; a signal detector configured to generate a detection signal based on the magnitudes of the amplitudes for the first and second rotor reference frame currents; and a comparator configured to compare the detection signal and an amplitude threshold value to identify a faulty stator winding; wherein the first rotor reference frame current is a D-axis current, and the second rotor reference frame current is a Q-axis current, and wherein the detection signal is equal to a magnitude of the D-axis current divided by a sum of magnitudes of the D-axis current and the Q-axis current.