3.1.1. Overview of Datasets
Three distinct datasets representing various PMSM electrical fault scenarios with differences in fault mechanism, feature composition, and classification complexity were created in order to thoroughly assess the robustness of the suggested XGBoost-based fault detection methodology. The raw sensor data are first subjected to signal preprocessing, as shown in
Figure 2, which includes segmentation into appropriate analysis windows, normalization to guarantee equivalent numerical scales, and the removal of invalid or inconsistent samples as needed. The most informative features are then fed into the XGBoost classifier to determine whether the machine is healthy, demagnetized, ITSC-faulted, or open-phase faulted, along with the associated fault severity levels. The processed signals are then used for feature extraction and feature selection. The demagnetization (Demag) dataset, which has about 400,000 samples and uses eight electrical variables to solve a multi-class severity classification issue, is presented in
Table 2. This dataset is especially useful for assessing XGBoost’s discriminative capacity in high-resolution fault severity assessment since it captures minute changes in current behavior and magnetic deterioration.
There are about 500,000 valid observations with five extracted characteristics in the ITSC dataset. It is framed as a four-class classification issue, with each class denoting a distinct degree of insulation breakdown, much like the demagnetization situation. The model’s capacity to identify fault patterns from sparse but extremely informative signals is highlighted by the decreased feature set.
Lastly, the open/short-circuit dataset is a binary classification issue with more than 600,000 samples. This scenario serves as a benchmark for assessing XGBoost performance under clearly separable fault circumstances and focuses on recognizing sudden and severe faults by using eight characteristics and a totally genuine dataset.
Overall, a fair and realistic evaluation of the suggested diagnostic method across both progressive and sudden fault situations is ensured by the variation in dataset size, feature dimensionality, and fault complexity.
- 1.
The diagnostic output is defined over the following machine conditions:
Healthy machine operation.
- 2.
Demagnetization fault, examined at three severity levels:
(a) 25%, (b) 50%, and (c) 75%.
In the case of demagnetization, the fault percentage indicates the decrease in the effective permanent magnet flux linkage in comparison to the healthy state, which is indicative of the rotor magnets’ diminished magnetization strength. Therefore, successive reductions in the magnet flux contribution and consequently more severe fault conditions are associated with demagnetization levels of 25%, 50%, and 75%.
- 3.
Inter-Turn Short-Circuit (ITSC) fault, considered at increasing fault levels:
(a) 5%, (b) 10%, and (c) 15%.
The percentage of stator winding turns in the impacted phase that are short-circuited is known as the fault percentage for ITSC. In this instance, increasing amounts of the phase winding involved in the short circuit are indicated by 5%, 10%, and 15% ITSC. This results in stronger circulating fault currents, increased local electromagnetic asymmetry, and ultimately higher fault severity.
- 4.
Open-phase fault, corresponding to the loss of one stator phase and its direct effect on machine performance.
By combining this clear classification structure with the learning capability of XGBoost, the proposed method provides an intuitive and efficient tool for fault prediction, making it well-suited for real-world PMSM monitoring and decision-support applications.
The results clearly show that the proposed XGBoost-based approach is highly effective for diagnosing different fault types in PMSMs, including demagnetization, ITSC, and open-phase faults. The dataset was carefully constructed to include healthy operation as well as multiple-fault severity levels, allowing the model to learn not only the presence of a fault but also its progression [
19].
Three degrees of demagnetization fault severity (25%, 50%, and 75%) were taken into account.
Figure 3 shows how magnet deterioration gradually affects the machine’s electromagnetic behavior and performance metrics. As the level of demagnetization increases, noticeable changes appear in the machine’s electrical behavior, particularly in the dq-axis currents and phase angles. These variations reflect the gradual reduction in the magnetic flux and its direct impact on torque production. The XGBoost classifier successfully captures these trends, leading to reliable separation between healthy and faulty conditions, as well as between different levels of magnetic degradation.
As illustrated in
Figure 4, which amply illustrates the progressive distortion and imbalance brought about by the fault severity, increasing the percentage of shorted turns (5%, 10%, and 15%) in the case of ITSC faults leads to increasing asymmetry among stator phase currents and higher dispersion in current-related features. This behavior is physically consistent with the presence of circulating fault currents and localized magnetic saturation in the affected stator slots. The extracted features clearly reflect these effects, enabling accurate fault identification and severity estimation by the classifier.
As can be seen in
Figure 5, open-phase failures result in even more recognizable signs since the sudden phase discontinuity causes noticeable torque pulsations, current imbalance, and significant changes in the machine’s electromagnetic response. The complete loss of one phase leads to abrupt changes in current waveforms and a strong imbalance in the remaining phases. These characteristics are easily distinguishable from both healthy operation and other fault types, allowing the model to detect open-phase conditions with high confidence.
Overall, the balanced dataset and the use of physically meaningful features allow the XGBoost model to focus on fault-related patterns rather than being influenced by data imbalance or noise. The obtained results confirm that the proposed method provides a robust and versatile solution for PMSM fault diagnosis. Its ability to handle multiple fault types and severity levels highlights its suitability for practical condition monitoring and predictive maintenance applications in electric drive systems.
For most of the retrieved characteristics, the boxplot analysis shows a clear division across groups, as shown in
Figure 6. As the degree of demagnetization increases, the median shifts and statistical dispersion steadily change, suggesting that features are highly sensitive to magnetic weakening. Specifically, each fault level shows unique and organized distribution patterns for the flux linkage (Φa, Φb, and Φc). Their remarkable discriminative power and considerable significance for classification tasks are confirmed by the little overlap across classes. The predictive robustness of the chosen feature set is increased by the obvious separability, which implies that demagnetization flaws produce consistent and more distinct signs.
However, as shown in
Figure 7, the ITSC situation results in greater class-to-class overlapping feature distributions. Class borders are less clearly defined than in the demagnetization example, but the boxplots show that statistical dispersion grows as the fraction of shorted turns climbs. This partial overlap points to a more difficult and intricate categorization challenge. Because of their greater sensitivity to winding asymmetry, Isa and Isb exhibit somewhat better separation among the examined variables. However, the overall distribution patterns verify that ITSC defects cause more subtle fluctuations, necessitating sophisticated learning algorithms or more precise feature selection to guarantee accurate identification.
Highly distinct statistical fingerprints are produced under open-phase and short-circuit circumstances, as seen in
Figure 8. The boxplot distributions corroborate good separability by displaying little class overlap across the majority of retrieved features. The flux linkage (Φa, Φb, and Φc) exhibits a notable difference between open- and short-circuit conditions. The distinct clusters formed by their distribution ranges and median displacements demonstrate how well they capture sudden electrical discontinuities and imbalance effects. Due to their fundamentally unique and dominating electromagnetic responses, open and short faults are relatively easy to classify, as seen by this considerable class distinction.
Figure 9 presents the correlation matrix, which provides further information. The balanced three-phase system’s inherent electrical connection is supported by the significant positive correlations between phase currents (Isa − Isb = 0.95 and Isb − Isc ≈ 0.95). The physical coherence of the dataset under demagnetization circumstances is confirmed by this behavior. Meanwhile, there are moderate correlations between the dq-axis components and the phase currents, indicating that they offer complementing data instead of redundant measurements. Demagnetization effects have an impact on the system globally while maintaining informational variation among specific aspects, according to this correlation structure.
Strong dependency among phase currents is one of the patterns that are largely comparable to those seen after demagnetization in the correlation matrix displayed in
Figure 10. The overall inter-feature connections, however, seem some what weaker than in the demagnetization dataset because of the smaller feature collection (particularly the lack of phase-angle variables). Since the current auxiliary variables already supplied enough information, the problem was handled without the need to add new supplemental material. This decreased structural richness implies that current-based interactions are the primary means by which ITSC-related signatures are collected. As a result, the dataset shows a more compact correlation structure, which might affect the sensitivity of categorization.
The correlation properties of the open- and short-circuit dataset are similar to the demagnetization situation in terms of substantial phase-current coupling, as shown in
Figure 11. Furthermore, the phase-angle variables show modest correlations with each other, suggesting that they convey information that is related but distinct. In order to differentiate between open- and short-circuit faults, phase angles provide complementing discriminating properties, as confirmed by this balanced degree of dependency. Therefore, the overall correlation structure shows the presence of several fault-sensitive indicators as well as the physical connections of the electrical system.
The
Figure 12 feature distribution analysis demonstrates that every extracted variable stays within ranges that are both physically consistent and well-regulated. There are not many outliers, and they do not substantially alter the dataset’s general statistical structure, which suggests strong numerical stability. Interestingly, the stator phase currents (Isa, Isb, and Isc) have distributions that are almost symmetric and centered around zero, which is consistent with how balanced alternating current signals should behave. The demagnetization dataset’s usefulness for predictive modeling is supported by its symmetry and controlled dispersion, which also confirm its dependability.
The distribution patterns under ITSC circumstances show less clear class separation than in the demagnetization situation, as seen in
Figure 13. There is a discernible overlap in the pairwise correlations across fault severity levels, especially among current-based characteristics. The increasing difficulty of the classification problem may be explained by this statistical closeness, which also supports the use of techniques like class grouping and rounding to improve model stability. The overlapping areas show that increasingly subtle feature changes are produced by ITSC errors, necessitating more sophisticated learning techniques to identify the underlying differences.
For the majority of attributes, the boxplot distributions in
Figure 14 show a clear distinction between the open- and short-circuit classes. High data quality and a positive signal-to-noise ratio are demonstrated by the low amount of category overlap and the few outliers that are seen. Clearly distinct electrical fingerprints are produced by open and short faults, according to the compact and well-differentiated distributions. The robustness of the derived feature set for defect diagnosis is confirmed by this structured separability, which also improves classification reliability.
There is evident linear separability between the demagnetization classes in the pairwise feature correlations shown in
Figure 15. With little inter-class overlap, the four severity levels create distinct, well-organized clusters in the multidimensional feature space. The borders of the distribution are still clearly visible, even when concentrating on the five most representative classes. As seen by this well-organized clustering, the chosen characteristics successfully capture the gradual effects of magnetic deterioration, fostering ideal circumstances for trustworthy multi-class classification.
In comparison, there is a much smaller gap across ITSC classes in the paired image displayed in
Figure 16. Inter-turn short-circuit defects have a more subtle and progressive impact on electrical behavior, as seen by the clusters’ partial overlap over a number of feature combinations. The considerably weaker discriminating power in comparison to the demagnetization situation is explained by this overlap, which also makes categorization more complicated. The distribution patterns that have been found support the use of techniques like class grouping and rounding to improve the stability and robustness of the model during training.
The pairplot depiction of open- and short-circuit circumstances shows high class separability, as shown in
Figure 17. In feature space, the two fault types are located in very different areas, with little overlap in the majority of variable combinations. These flaws produce sudden and dominating electrical imbalances, which are reflected in this substantial structural differentiation. A clear explanation for the dataset’s near-perfect classification performance may be found in the prominent clustering characteristic.
3.1.2. Methods
Exploratory Data Analysis (EDA)
For the PMSM fault datasets, the visualization system that was built offers a thorough exploratory data analysis. There is a clear class imbalance in the target distribution charts, especially for the open/short task with a roughly 2:1 ratio and the ITSC scenario, where the highest severity level is underrepresented. It is confirmed by boxplot analysis that a number of electrical variables show discriminative behavior across fault circumstances, highlighting significant feature–class interactions. In accordance with the three-phase machine structure, the Pearson lower-triangle correlation heatmap shows a moderate coupling between the phase currents (Isa, Isb, and Isc).
Even if there are a few outliers in the Id and Iq components, their magnitudes are still within acceptable technical bounds and do not jeopardize the integrity of the data. Moreover, the pairwise scatter analysis (top five features, 5000-sample subset) supports the dataset’s applicability for reliable supervised learning applications by clearly displaying cluster formation in the feature space, especially for the binary open/short classification.
Demagnetization Dataset Results
Under GPU acceleration, complete convergence is reached in less than two minutes, demonstrating the very effective and stable training behavior of the suggested learning framework. Smooth error reduction is exhibited by the boosting process, which stabilizes toward near-optimal performance after 500 boosting rounds and achieves low validation loss after around 300 iterations.
Testing on a large test dataset with 79,778 samples (out of 398,889 occurrences) demonstrates the model’s resilience, producing macro and weighted F1-scores over 0.95 and near-perfect accuracy (≈0.9999). All fault severity levels show continuously high predictive power, with no discernible decrease for minority classes, according to the per-class assessment for demagnetization fault in
Table 3. Limited overfitting and good generalization are confirmed by the little difference between training and test measures. The exceptional classification performance is justified by the exploratory analysis, which showed significant feature separability in the created feature space, which is totally consistent with these results.
ITSC Dataset Results
A total of 499,903 samples, divided into 399,922 training and 99,981 testing instances, were used to assess the ITSC classification model’s performance. High computational efficiency was demonstrated by the training procedure being finished in just 6.9 s, thanks to GPU acceleration. The model achieved 99.94% accuracy on the original test set, with weighted F1-scores of 98.16% and macro-scores of 96.78%. Although significantly less than in the demagnetization situation,
Table 4 presents the per-class detailed results, which show good multi-class discrimination despite the higher feature overlap within ITSC severity levels.
A class grouping and rounding step was used to transfer each model output to the closest legitimate severity level in order to further enhance prediction resilience for the ITSC dataset. This operation is defined as follows since the permissible ITSC classes are restricted to [0, 5, 10, 15].
where
is the predicted class value and
is the rounded prediction assigned to the nearest valid ITSC severity class. The class grouping and rounding step applied to the ITSC dataset is explicitly defined by this equation. Following this post-processing phase, the overall accuracy improved to 0.991, representing a 3.3% gain, while the macro and weighted F1-scores rose to 0.982 and 0.978, respectively. Strong separability from problematic states was confirmed by the exceptional precision (0.99) and recall (0.973) of the normal operating condition (Class 0). The underrepresented Class 5, on the other hand, had a high recall (0.98) but somewhat lower precision, indicating a purposeful trade-off that is meant to lower false negatives at the expense of more false positives. Overall, minority-class performance was stabilized, and generalization was enhanced by the combination of class weighting, ITSC-specific hyperparameter adjustment, and the suggested rounding step.
Open/Short Circuit Dataset Results
Using a dataset of 600,001 samples, 480,000 for training and 120,001 for testing, the binary fault classification model was developed. By utilizing GPU acceleration, the training procedure took only 2.4 s, demonstrating the selected architecture’s computational efficiency. With weighted precision, recall, and F1-score all hitting 0.9955 on the independent test set, the model’s accuracy was 99.55%. Both numerical stability and high predictive dependability are confirmed by such consistent measurements.
The method’s resilience is further demonstrated by the thorough per-class performance analysis of the open-phase fault presented in
Table 5. Class 0 (open-circuit state) had complete recall, meaning that no defective occurrences were missed, and Class 1 (short-circuit condition) had perfect accuracy, meaning that there were no false alarms. With very little overfitting, this sensitivity-specificity balance shows outstanding generalization. The binary formulation has better feature separability than multi-class fault situations, as seen in exploratory pairplot visualizations as well. By providing highly discriminative signatures, the phase-angle components (Φa, Φb, and Φc), in particular, greatly improve the model’s capacity to differentiate between open- and short-circuit faults, with performance that is almost optimal.
Model Architecture: XGBoost Classifier and Comparative Summary
The XGBoost classifier used as the model architecture for the suggested fault diagnosis system is described in this subsection. The diagnostic performance of the suggested XGBoost model for the three fault scenarios examined in this study, demagnetization, inter-turn short-circuit (ITSC), and open-phase fault, is summarized in
Table 6, below. With short training times ranging from 2.4 s to less than 2 min, the results demonstrate very high accuracy in all cases, reaching 0.9999+ for demagnetization, 0.9994 for ITSC, and 0.9955 for the open/short-circuit dataset. This confirms the efficacy and computational efficiency of the suggested framework.
Model Architecture: XGBoost Classifier
The XGBoost-based framework with GPU acceleration used in this study is presented in this section. It provides a quick overview of the model architecture and emphasizes how it facilitates accurate and efficient fault categorization.
Hyperparameters (Demag Dataset):
“objective”: “multi:softprob”,
“num_class”: 4,
“eval_metric”: [“mlogloss”, “merror”],
“max_depth”: 8,
“learning_rate”: 0.05,
“subsample”: 0.8,
“colsample_bytree”: 0.8,
“n_estimators”: 500,
“tree_method”: “hist”,
“predictor”: “gpu_predictor”,
“device”: “cuda”,
“random_state”: 42
Hyperparameters (ITSC Dataset—Tuned):
“objective”: “multi:softprob”,
“num_class”: 4,
“max_depth”: 10,
“learning_rate”: 0.05,
“subsample”: 0.85,
“colsample_bytree”: 0.85,
“reg_alpha”: 0.01,
“reg_lambda”: 0.5,
“n_estimators”: 400,
“device”: “cuda”
Hyperparameters (Open/Short—Binary Classification):
“objective”: “binary:logistic”,
“eval_metric”: [“logloss”, “error”],
“max_depth”: 8,
“learning_rate”: 0.05,
“subsample”: 0.8,
“colsample_bytree”: 0.8,
“n_estimators”: 300,
“tree_method”: “hist”,
“device”: “cuda”.
Feature Importance Analysis
The three fault situations’ feature significance comparisons show different physical fingerprints controlling classification performance. Rotor magnetic weakening directly affects current amplitude symmetry, as evidenced by the three-phase stator currents (Isa, Isb, and Isc) emerging as the dominating predictors in the demagnetization dataset. Phase angle variables provide a negligible contribution to discriminating, but the dq-axis components (Id, Iq) offer complementing capabilities. On the other hand, the ITSC dataset shows a more dispersed significance profile, with the most significant characteristic being phase a current (Isa), which is followed by the other phase currents. The necessity for more sophisticated optimization techniques can be explained by the dq components’ significant contribution to capturing small severity fluctuations. For the open/short-circuit binary task, the hierarchy changes significantly: current magnitudes, which serve as secondary descriptors, are surpassed by the phase angle Φa as the primary discriminative indication. This situation’s near-ideal classification performance is supported by the distinct structural separation between angular features.
All datasets show good predictive power when viewed globally, with accuracies over 89% and an open/short-circuit model reaching 99.55%. The binary open/short problem is the most tractable due to its strong feature separability; the demagnetization case is still very accurate with balanced classes, and the ITSC scenario is moderately difficult due to feature overlap and class imbalance. This clearly shows the hierarchy of relative task complexity. With a 3.3% increase in accuracy and improved practical consistency, the use of balanced sample weighting and prediction rounding significantly improves ITSC resilience.
By cutting processing times to a few seconds, GPU-accelerated training further guarantees computational efficiency, even for datasets with close to 600,000 samples. The consistency between statistical structure and learning performance across the whole analytical workflow is confirmed by the significant alignment between exploratory data analysis and model outcomes: datasets with clearer pairwise separation correlate to greater classification accuracy and higher classification accuracy.