## 6 Experimental Procedure and Results
The training of the model is performed with healthy data, while the test is performed with a dataset of healthy data and faulty data with increasing severity of the misalignment fault. The model's performance is investigated for different contamination parameter values and number of trees. As the number of samples and features is small in this dataset, the number of maximum features and maximum samples that can be adjusted as parameters are kept to the default values. However, it is important to note that in larger datasets and features, the above two parameters are important, as they can reduce computational complexity and indicate redundant features. Below, in Figure 13 are the evaluation metrics for different values of the contamination parameter and different number of trees. We observe that in all cases (50, 100, 150, 200 iTrees), better evaluation metric values appear in the range of 0.4-0.5 for the contamination parameter. The best evaluation metric values for 100 Isolation Trees and contamination parameter in the range of 0.4-0.5 are shown in Table 4. \begin{table}
\begin{tabular}{c c} \hline
**Evaluation Metrics** & **Value** \\ \hline Accuracy & 0.82 \\ \hline Precision & 0.81 \\ \hline Recall & 0.95 \\ \hline F1-Score & 0.88 \\ \hline ROC AUC & 0.75 \\ \hline \end{tabular}
\end{table} 
Table 4: Isolation Forest evaluation metrics for 100 Isolation Trees and contamination parameter in the range of 0.4–0.5. Figure 12: q-axis current Power Spectral Density. Lastly, Robust Covariance Elliptic Envelope was assessed for the same dataset. The influence of different contamination parameters is shown in Figure 15. We can observe that the best values of the evaluation metrics arise for a contamination parameter equal to 0.2 or 0.3. The evaluation metrics for the above parameters are shown in Table 6. The main difference lies in the decrease in precision and ROC AUC and the increase in Recall and F1-score for contamination parameter equal to 0.2 and 0.3, respectively. Figure 14: One Class SVM evaluation metrics for gamma equal to 0.01 (**a**), 0.02 (**b**), 0.03 (**c**), 0.04 (**d**) and fraction parameter in the range 0.1-0.9. Figure 15: Robust Covariance Ellipse evaluation metrics for contamination parameter 0.1–0.5. The above models can be combined through different ensemble techniques, as discussed in Section 5. More specifically, Majority Voting Ensemble can be used, where the majority of predictions are selected, and the Average Ensemble, where the average of the predicted values is calculated. Note that in the case of Averaging, rounding of the predicted values is required. The evaluation metrics for the above cases are shown in Table 7.  
To estimate the severity of the fault, the anomaly scores generated by each model are employed. Based on how anomaly scores are generated, each of the above methods generates a different range of values. For this reason, the values are normalized. Higher anomaly scores indicate faulty operating conditions in the PMSM. In the test dataset, the first 11 samples respond to a healthy working state, while the following 11 respond to a faulty state with a low fault severity, and then the last 11 respond to an increased fault severity. In the case of the One Class SVM, in Figure 16, we can see that healthy samples are distinguished from faulty samples, and especially the latest samples of increased severity. However, the difference between each sample for the latest samples and the increased severity is not clear. In the case of the Isolation Forest, in Figure 17, we see that we have increased anomaly scores for faulty cases that can be used as indicators of fault occurrence and increase in severity. In the case of the Elliptic Envelope, in Figure 18, we have the clearest picture, as we observe that anomaly scores are low for healthy samples while increasing with the appearance of the fault and especially at higher severity.