## 6 Experimental Procedure and Results  
The test bench that was used for the experimental procedure is shown in Figure 6. The test rig consists of a Nidec's (Sycracuse, NY, USA) PMSM and DC Generator, a resistive load, an Inverter, a Current Measurement Unit, a Data Acquisition Unit, and a PC. The PMSM is coupled to the DC Generator through a flexible coupling. The DC Generator with the resistive load is used as a load for the PMSM. The PMSM parameters are shown in Table 3.  
The acquisition of current measurements is performed with a sampling frequency of 5 kHz using an NI Daq and LABVIEW. The fault considered in this case is a misalignment between PMSM and the DC Generator, causing eccentricity effects in the PMSM's shaft. It was achieved by placing metal shims in the support base of the motor. Two levels of fault severity were considered by different shim widths. The collected data consist of three-phase current measurements for healthy and faulty operating conditions with increasing severity. In Figures 7 and 8, abc current time waveforms for healthy and faulty operating conditions are presented, respectively. The operating speed of the PMSM is 1400 rpm, with a load of 6 Nm. We can notice the deformation of the waveform's envelope in the faulty state due to the misalignment. To extract useful features of the faulty conditions, such as time and frequency domain features, d-q transformation and FFT analysis are employed. In Figures 9 and 10, the corresponding waveforms for q and d axis current in a rotating reference frame are presented. The d current waveform remains at zero, as Field Oriented Control (FOC) is used to drive the PMSM. We observe an increased ripple and distortion in q current signal over time, due to the additional harmonics caused by the misalignment condition. \begin{table}
\begin{tabular}{c c} \hline
**Parameters** & **Value** \\ \hline Rated Power & 6.16 kW \\ \hline Rated Voltage & 380 V \\ \hline Stall Current & 14 A \\ \hline Rated Speed & 2000 rpm \\ \hline Max Speed & 2685 rpm \\ \hline Number of Poles & 8 \\ \hline \end{tabular}
\end{table} 
Table 3: PMSM parameters. Figure 6: Configuration of the PMSM test bench for fault detection and severity estimation. Figure 8: Motor ABC current waveforms in faulty state. Figure 7: Motor ABC current waveforms in healthy state. Figure 9: 3 Motor d-q current waveforms in healthy state. To derive the frequency characteristics of the fault, analysis of the current in the frequency domain is required. For this reason, in Figures 11 and 12, Power Spectral Density is calculated. In Figure 11, the spectrum of the healthy state (blue color) and faulty state (red color) are placed together. The specific eccentricity-related fault harmonics are indicated with red circles. In Figure 11, the q-axis Power Spectral Density is shown for the same conditions. Due to design and operation parameters of the PMSM test bench, some harmonics that follow the eccentricity-related pattern are also evident in the healthy state. From the waveform of the current over time, the statistical features of standard deviation, variance, skewness, and kurtosis are calculated, and from the signal's power spectrum, spectral density, spectral centroid, spectral spread, spectral skewness, and spectral kurtosis indices are calculated. The above characteristics are calculated for four different speeds and four different load levels under a healthy and faulty (misalignment) condition. The overall dataset consists of the above features for different operating modes and with an increasing severity of the fault. Figure 11: A-phase current Power Spectral Density. Figure 10: Motor d-q current waveforms in faulty state. Initially, we investigate the three different methods separately and compare them. The implementation of all methods is performed using Python and Scikit-learn. First, the Isolation Forest is investigated.