Next Article in Journal
Novel Intelligent Traffic Light Controller Design
Previous Article in Journal
Efficiency Analysis of Die Attach Machines Using Overall Equipment Effectiveness Metrics and Failure Mode and Effects Analysis with an Ishikawa Diagram
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Detection of Demagnetization Faults in Electric Motors by Analyzing Inverter Based Current Data Using Machine Learning Techniques

by
Daniel Walch
*,
Christoph Blechinger
,
Martin Schellenberger
,
Maximilian Hofmann
,
Bernd Eckardt
and
Vincent R.H. Lorentz
Fraunhofer Institute IISB, 91058 Erlangen, Germany
*
Author to whom correspondence should be addressed.
Machines 2024, 12(7), 468; https://doi.org/10.3390/machines12070468
Submission received: 3 June 2024 / Revised: 28 June 2024 / Accepted: 10 July 2024 / Published: 11 July 2024
(This article belongs to the Section Electrical Machines and Drives)

Abstract

:
Demagnetization of the rotor magnets is a significant failure mode that can occur in permanent magnet synchronous machines (PMSMs). Early detection of demagnetization faults can help change system parameters to reduce power output or ensure safety. In this paper, the effects of demagnetization faults were analyzed both in simulation and experiments using the example of drone motors. An approach was investigated to detect even minor demagnetization faults that does not require any additional sensing effort. Machine learning (ML) techniques are used to analyze the phase current data directly received from the inverter to enable anomaly detection. For this purpose, the phase current is transformed by the Fast Fourier Transform (FFT), the spectral data is then reduced in dimensionality, followed by an anomaly detection algorithm using a one-class support vector machine (OC-SVM). To ensure simplified initialization of the ML model without the need for training sets of damaged drives, only data from magnetically undamaged motors was used to train the models for anomaly detection. Different selections of considered harmonics and different metrics were investigated using the experimental data, achieving a precision of up to 99%, a specificity of up to 98%, and an accuracy of up to 90%.

1. Introduction

Due to their advantages in terms of efficiency, power density, and controllability, PMSMs make up the majority of all traction drives in electric vehicles today and in many applications beyond [1]. The main disadvantages are the high cost of the rare earths (RE) in the permanent magnets and the oftentimes required safety management due to high induced voltages, especially in field-weakening operations. This results in a conflict of objectives in the proportion of RE: With regard to the high temperature stability of the magnets and, thus, their high robustness against demagnetization, a high proportion of RE is helpful, while for cost and environmental reasons, the proportion of RE is often minimized by OEMs and TIER-1 suppliers [2]. For this reason, demagnetization faults in PMSMs are the most common cause of failure, along with short-circuit faults and mechanical faults [3]. Especially in torque-controlled applications, demagnetization can lead to an increase in stator current for compensation, resulting in motor heating. This further exacerbates the demagnetization process. Early detection of demagnetization enables a suitable mitigation approach such as derating and can thus prevent a complete failure of the drive.
Various other approaches for motor fault detection have been published recently. Many of these rely on deep learning techniques [4], but their results are difficult to interpret because of the black-box nature of these models. In contrast, the approach presented in this paper, based on the spectral information, offers a good explanation of the classification results with the help of pre-simulated data. Furthermore, the methods in the literature often utilize a classification procedure [5], which, unlike the methodology described here, requires both healthy and damaged data. In addition, there are various methods based on analyzing current signatures, often using additional high-resolution sensors [6].
Instead, to avoid additional costs and the need for extra installation space, it is recommended to refrain from using additional sensors for fault detection in general, according to the Cognitive Power Electronics (CPE) concept [7]. For this reason, this paper focuses on investigating even minor cases of demagnetization of the permanent magnets in electric machines for use in drones, where the measured currents are obtained directly from the inverter itself. However, the proposed analysis algorithm can in principle also be transferred to any other permanent magnet motors, for example, machines in the automotive and aviation industries, robotics, and also servomotors in industry.
The article is structured as follows: Section 2 describes the basic process of demagnetization and provides an overview of the relevant literature in the field of demagnetization detection. In Section 3, the effects of partial and uniform demagnetization in PMSMs are presented using simulations based on a concrete motor design, while this design is experimentally investigated in the following Section 4, with seven motors with different damage patterns available for this purpose. In Section 5, a complete machine learning-based evaluation pipeline for the detection of demagnetization is presented. The experimental results of the individual steps are presented in Section 6.

2. Background to Demagnetization

2.1. Demagnetization Mechanism in PMSMs

During demagnetization, a permanent magnet loses its strength in the form of a lower flux density. This process is reversible if the knee point on the magnetization curve (magnetic flux density B over magnetic field strength H, BH-curve) is not exceeded. The BH-curve depends both on the material and the temperature. Typically, commercially available neodymium magnets are available with maximum operating temperatures ranging from 80 °C to 230 °C and are divided into various temperature classes based on material composition [8]. For a particular magnet material, the magnetization curve, including the knee point and the coercive field strength H c B - the field strength of the opposing field at which the flux density assumes the value of zero—is also temperature-dependent. At higher operating temperatures, the knee point occurs at a lower opposing field strength, which makes irreversible demagnetization more likely [9]. Neglecting any leakage flux, the calculation of the air gap flux density in PMSMs can be accomplished using the material law and the continuity condition through the ratio of the magnet height h M and the width of the air gap δ with the field strength of the magnets H M :
B δ = µ 0 H δ = µ 0   h M δ H M
The gray graphs in Figure 1 display this operating characteristic of an electric machine at open circuit (gray dashed) and an exemplary working condition (grey solid). It is evident that the flux density B(P) decreases with increasing temperatures (B( P 1 ) < B( P 0 ), where T 0 < T 1 ). At temperature T 1 , the operating point P 1 falls below the knee point, resulting in irreversible demagnetization. This is manifested by a recoil line (red) with a lower remanent flux density ( B r 1 , i r r < B r 1 ).
The cause of demagnetization typically arises from one of the three following reasons, and it is frequently a combination of multiple factors: changes in the material parameters due to mechanical stress, aging, or corrosion; thermal overload resulting from overloading or unfavorable ambient conditions; excessive opposing fields due to short circuits or overloading of the machine [3,10,11].
A differentiation is present in the literature between uniform and partial demagnetization of a PMSM [3,12,13]. With uniform demagnetization, all poles are affected equally in both pattern and strength throughout the entirety of the motor’s circumference. This gives a symmetrical damage pattern and can lead to a higher stator current and therefore an increase in copper losses for a given torque, which can lead to an increase in temperature and thus self-reinforce the demagnetization process. Partial demagnetization occurs when only some of the poles are affected, usually resulting in an asymmetrical fault that generates additional harmonics in the air gap flux. This, in turn, causes additional harmonics in the stator current and voltage and unbalanced magnetic forces that can lead to vibrations, noise, and torque ripple [3,11].
In the literature, the additional harmonics due to the demagnetization f d m g are described as [3,11,14]:
f d m g = 1   ± k p   · f s
with the fundamental frequency f s , the number of pole pairs p and the integer value k = 0, 1, 2, …. In this paper, motors with fractional slot winding are investigated. This is characterized by the fact that the number of slots per pole and per phase q is a rational number consisting of the numerator q Z and the denominator q N . The machine parameter q is defined by the number of slots Q, the number of phases m, and the number of pole pairs p to
q = Q 2 p m = q Z q N
Machines with fractional slot winding generate, even in undamaged operations, typical harmonics f f s w in air gap flux and thus also in induced voltage and phase current, which can be described by the denominator q N
f f s w = f s 1 ± 2 m k q N
When comparing (2) and (4), it can be observed that the harmonics of a fractional slot winding form a subset of the typical demagnetization harmonics.

2.2. State of the Art for Detection of Demagnetization

In the literature, there are a variety of different methods and investigations for the detection of demagnetization in PMSMs. These differ due to the approaches used for the individual steps of the detection process (Table 1). First, a physical parameter must be found that changes due to demagnetization compared to an undamaged motor. For this purpose, the magnetic flux, influenced electrical quantities such as the induced voltage, the back electromotive force (EMF), or the current, or derived mechanical quantities such as torque, vibration, or acoustics can be used directly [3]. Based on these variables, an expert is basically able to distinguish a demagnetized motor from others. If the detection is to be carried out automatically with the help of machine learning algorithms, features that are characteristic of demagnetization must be extracted from the physical quantities. These can be calculated from the time domain, e.g., the mean, median, standard deviation, root mean square (RMS), clearance factor, shape factor, kurtosis, skewness, impulse factor, or crest factor [15]. As shown in (2), demagnetization causes additional harmonics, which is why features from the frequency domain are often evaluated. Here, the FFT is the most common spectral analysis method. Further possibilities include the analysis of the cepstrum or the envelope. In the time-frequency domain, the applications of the Short-Time Fourier Transform (STFT), the Continuous and Discrete Wavelet Transform (CWT and DWT), the Hilbert-Huang Transform (HHT), the Wigner-Ville Transformation (WVT), and the Choi-Wiliams Distribution (CWD) are proposed [3]. For the classification of the features, neural networks [3] such as convolutional neural networks, Bayesian neural networks, probabilistic neural networks, or random forests [16], and support vector machine [17] methods are used.

3. Simulative Investigations

As described above, the literature distinguishes between two demagnetization faults: At uniform demagnetization, all poles are affected by the same ratio of reduction in magnetic flux density. Partial demagnetization characterizes these faults, where only some poles have reduced remnant flux density [13].
Within the scope of this work, a distinction is made between two aspects of demagnetization: the degree of demagnetization level, which is defined as the ratio of remnant flux density after demagnetization to the initial remanence, and the number of magnets affected by demagnetization (Table 2). If all magnets are affected, it can also be labeled as uniform demagnetization. With less-affected magnets, it is considered partial demagnetization. In the state of complete demagnetization of all magnets (CD-AM), the motor has no magnetic excitation and can no longer generate magnetic torque. Therefore, all states in Table 2, except for this one, are analyzed in the subsequent investigation.

3.1. Partial Demagnetization

The motors of an unmanned drone are analyzed as part of this work. Their main parameters are listed in Table 3. In the previous work, the complete demagnetization of individual magnets, thus a case of partial demagnetization, was investigated [18]. In the simulation, the magnetic flux density of individual magnets was manually set to zero by changing the material parameters, while the other magnets retained their original material properties. This resulted in an asymmetrical pattern of damage, which varied in severity depending on the number of completely demagnetized magnets.
According to Faraday’s law of induction, changes in the magnetic flux affect the voltage induced in the stator coils (5). To quantify the effects of the various demagnetization scenarios, the total harmonic distortion (THD) of the induced voltage at no-load was calculated, which includes the Pythagorean sum of all harmonics u i divided by the fundamental wave u1.
u i = d d t Ψ
T H D U = i u i 2 u 1
The induced voltage’s harmonic content is dependent on the pole-slot combination and winding scheme. The motor being researched and simulated covers 6 slots with 7 magnets, and if 7 magnets are demagnetized, all phases are affected equally, resulting in a very low THD value. The maximum harmonic content results in 4 (10% total demagnetization) or 11 (26% total demagnetization) demagnetized magnets. As discussed previously, not all demagnetization harmonics, according to (2), experience an increase in amplitudes, but specifically the subset that is typical for motors with fractional slot windings [18].
In addition, the present research examines the behavior of moderately demagnetized individual magnets. The magnetic flux density of each magnet was reduced to an average flux density that was dependent on the degree of damage (Figure 2b), as opposed to being completely reduced to zero (Figure 2a). As in the experiments, two magnets were demagnetized by 35% each, resulting in a flux density of 65% of the initial flux density. In relation to the entire rotor, this results in a total demagnetization of
2 × 0.35/42 = 1.67%.
As depicted in Figure 3, moderately demagnetized motors (blue color) generate identical harmonics to those produced when magnets are completely demagnetized (red color). However, the amplitude of the corresponding fault frequencies is lower.

3.2. Uniform Demagnetization

To simulate symmetrical demagnetization, the active short circuit (ASC) was analyzed at different temperatures. This is a typical reaction strategy to bring the drive into a safe state and, for example, to prevent damage to the DC link due to unacceptably high induced voltages [19]. The inverter is used to short-circuit all three motor phases. Transient high-phase currents may occur, resulting in high opposing fields in the machine. The current will predominantly or completely lie on the flux axis (referred to as the d-axis in the context of the Park transform) of the motor, depending on the rotor position at the time of the ASC. In the worst case, with pure d-current, the opposing field for the magnets and thus demagnetization is at its strongest [19,20]. Therefore, the highest temporary phase current at ASC was extracted and impressed fully onto the d-axis for the demagnetization simulation. Accordingly, the magnetic material parameters were modified to consider the impact of magnet temperature T m a g . To measure the level of demagnetization, the coefficient D e m a g C o e f , which is the ratio of the remanence flux density after ASC B r 1 , i r r to the initial remanence flux density before demagnetization B r 0 , can be used:
D e m a g C o e f = B r , i r r B r 0
The demagnetization simulation findings are presented in Figure 4, plotted for a magnet temperature of 80 °C. It is evident that a significant portion of the volume remains unaffected by demagnetization, while primarily the magnetic edges in proximity to the air gap exhibit high susceptibility to the demagnetization process. The pattern of damage remains almost constant throughout the machine’s circumference. This leads to the demagnetization being uniform resp. symmetrical.
To approximate this damage pattern with defined dimensions, a piece of the magnet was removed in the FEM model at the magnetic edge near the air gap and replaced by non-magnetic material (i.e., B r 0 = 0) (Figure 4b). The model can be simplified for uniform demagnetization by only simulating one motor segment, as opposed to simulating asymmetrical demagnetization. The induced open-circuit voltage was then calculated in the same way as for partial demagnetization.
In Figure 5, it can be observed that both uniform and partial demagnetization lead to an increase in the same harmonics. However, the amplitudes of these harmonics are significantly lower in the case of uniform demagnetization. The overall harmonic content behaves in a fundamentally different way (Figure 6): in the case of partial demagnetization, the THD tends to increase due to the asymmetry of the air gap flux and also depends strongly on the coils affected. Especially when dealing with seven demagnetized magnets (corresponding to 16.7% total demagnetization), all motor phases are equally affected, resulting in a THD that is almost the same as that of an undamaged motor [18].
In the case of uniform demagnetization, all coils are affected symmetrically, and the THD even decreases with greater damage compared to the undamaged case since the air gap flux is less rectangular and more sinusoidal.
In the subsequent course of this study, the focus will be on partial demagnetization (CD-SM and MD-SM), as they hold greater significance in the literature, are more easily reproducible under defined conditions, and are easier to identify due to their stronger effects.

4. Experimental Investigations

4.1. Experimental Setup for the Investigation of Electric Drives

The results of the simulative investigations already show that the detection of demagnetizations based on frequency information is possible. In practical applications, however, effects often occur that can only be mapped to a limited extent in simulations but can have an impact on the findings and, in the present case, on the detectability of demagnetization damages. For this reason, motors were used that were manually prepared for partial demagnetization damage. The explored drives are motors with fractional slot winding (Table 3) and were tested on an experimental test bench. The structure of the test bench was designed in such a way that the motors and their associated propellers can be easily mounted and dismantled from a drone arm replica to minimize interference during operation (see Figure 7). It is important that the motor and the propeller are mounted with a defined torque to ensure that the experiments are carried out as accurately as possible. Furthermore, the motors are powered by a 24 V power supply, which provides a maximum current of 3 A. A motor control unit controls the operation of the motors. In the tests under consideration, the rotation speed of the motor is constant at 900 rpm. The load on drone motors is self-regulated through the propeller. To enable data recording without additional sensors and thus do justice to the basic ideas behind CPE [4], the phase current data is read directly from the inverter. J-Link was used as a transfer tool for the data from the motor control unit to an edge device. This device reads a two-phase current signal as well as information about the time of the measuring points in binary data with a sampling frequency equal to the frequency of the current control. An exemplary excerpt of the recorded phase currents is depicted in Figure 8.
The frequency for the current control amounts to 20 kHz for the motors investigated, which equals the data acquisition frequency. The recording of the data was carried out over a period of 220 s. To be able to use the binary data later for the data analysis, it was converted into unitless values.

4.2. Explored Demagnetization Faults

The motors with fractional slot winding used were characterized by a high number of polar pairs. For this reason, the extent of damage caused by the investigated demagnetization can be reproduced relatively finely. The most relevant properties of the examined motors can be found in Table 3. Figure 9 shows a section of one of the investigated drone motors.
The focus of the investigations is on partial and asymmetrical demagnetization. A compilation of the motors examined can be found in Table 4. A total of three healthy motors were measured and analyzed, hereinafter referred to as H1–H3. As already described in Section 3, for the damaged motors, a distinction must be made between two types of faults and the severity of the artificially damaged magnets. The designation CD (complete demagnetization) is used for motors where a specific number of adjacent magnets of the 42 permanent magnets were completely demagnetized. In this instance, two (CD1) and seven (CD2) magnets were completely demagnetized, resulting in a total demagnetization of 4.8% and 16.7%, respectively. To enable this, the magnets were removed and prepared with an intense heat load above the magnet’s Curie temperature. This led to a loss of the entire magnetization. For the remaining motors, two adjacent permanent magnets were selectively heated with a soldering tip for a specific period. Due to the resulting partial demagnetization of the magnets, they will henceforth be referred to as MD (moderate demagnetization). In this case, the severity of these demagnetizations, which corresponds to a demagnetization of the single magnets of approx. 35% (see Section 3.1), was also verified after the process by measuring the magnetic field strength. The demagnetization scenarios for the experiments thus correspond to those that were also analyzed by simulation (Section 3).

5. Machine Learning Pipeline

5.1. Analysis Approach

The current data collected during the experiments is fed into a machine learning pipeline. The pipeline described in detail below consists of multiple individual steps. A schematic overview of the training-pipeline is shown in Figure 10. The first steps involve data pre-processing, in which each recorded test run is broken down into multiple frames. Subsequently, an FFT of the individual frames is performed, whereby various modifications of the FFT results are examined. The features or frequency bins from the FFT are then reduced by means of dimension reduction using Kernel Principal Component Analysis (kPCA). To determine the hyperparameters of the kPCA, an appropriate optimization was performed, which is illustrated by the dashed path in the Figure 10. Finally, an anomaly detection algorithm, one-class support vector machine (OC-SVM), was trained after its hyperparameters were optimized using synthetic data. A more detailed description and evaluation of each step will be provided in the following sections.
Once the training pipeline has been executed and the corresponding models have been extracted, the models can be evaluated using the test pipeline depicted in Figure 11. This pipeline will also be executed in the final implementation of the models.

5.2. Data Preprocessing

To perform the evaluation of the experiments, the first step is the creation of non-overlapping data frames. For this purpose, the two-phase current signal of each test run is divided into data frames with a length of 2 14 = 16,384 data points. At a switching frequency of 20 kHz, this results in a time duration of 0.8192 s per frame. Again, it should be noted that the current signal is a unitless signal, as the recorded signals had to be converted from a binary file beforehand.

5.3. Spectral Analysis

For a spectral analysis, the phase currents must be transformed from time to frequency domain. The calculation of the FFT is carried out individually for each current phase and each data sample. Subsequently, the frequency data of each phase is averaged, so that each sample contains only one averaged FFT spectrum. The averaged FFT spectra are also normalized to the amplitude of the fundamental frequency in a further step. To avoid the aliasing effect, the calculated and normalized FFT spectrum per sample contains half of the data points used for the original sample creation.
In the context of spectral analysis, different approaches were chosen to investigate the FFT spectra. In addition to analyzing the entire FFT spectrum, two other approaches are pursued, in which only certain frequencies and bandwidths are further processed. One of these restricts the harmonics to be considered to the frequencies calculable with Equation (2), which are special for demagnetization damage. In the second approach, the characteristic frequencies of fractional slot winding motors are analyzed instead of the demagnetization harmonics. These can be calculated using (4). When analyzing certain harmonics, constraints regarding the length of the spectra and, respectively, the frequency range are also examined, which are listed in Figure 12.
Figure 13 shows the averaged and normalized FFTs across all samples per motor on a dB scale. In the case of currents read from the MCU, no conspicuous features are apparent in the higher frequency ranges of the FFT spectrum. Therefore, the frequency range can be reduced, as depicted in the diagram, to observe the differences between the different motors. Here, the harmonics up to the 16th harmonic are shown, zoomed in on the frequency range between the 2nd and 3rd harmonics. In addition, the characteristic error frequencies for demagnetization damage were highlighted in the zoomed-in plot by means of dashed lines. In the present plot, it is already clear that the peaks in the FFT spectrum, which correspond to the damaged motors, deviate significantly from the healthy H1–H3 motors. Above all, the CD1 motor clearly stands out. Of greater importance, however, are the motors MD1 and MD2, which testify to a first indication of demagnetization damage and also show abnormalities. This becomes clearer in the consideration of the special harmonics, which will be clarified in the following.
As already discussed in detail in Section 2.1, certain harmonics are particularly conspicuous in demagnetization damage. These frequencies can be calculated using (2) and are also considered conspicuous in the plots in Figure 13 and Figure 14.
By means of this calculation, the FFT spectrum can be broken down to typical harmonics of demagnetization damage, and the focus can be on relevant frequency bins. This will also result in a reduction in the number of data points required for the later ML algorithms and a smaller model size. As with the consideration of the entire frequency spectrum, the averaged FFTs of the demagnetization harmonics over all samples per motor are shown in dB scale in Figure 14. Based on the analysis of the entire frequency range, which is subject to considerable low-pass filtering, the focus here was directly on the first 16 harmonics. Compared to the entire frequency spectrum, the deviations from the good motors H1, H2, and H3 are even more visible in the amplitude spectrum, especially in the lower frequency range.
Since effects such as inverter-based frequencies, an increased noise component, and the multiplication of spectral scattering occur, especially at higher frequencies, different bandwidths were also investigated. Figure 14 therefore also shows three boundaries that are drawn in to illustrate different limitations and bandwidths of the demagnetization harmonics. It becomes clear that a large part of the relevant information in the form of harmonics that are conspicuous during demagnetization already occurs in the range up to the fifth harmonic. Three bandwidths are distinguished here for the calculated partial demagnetization damage:
  • Up to the 11th harmonic
  • Up to the 7th harmonic
  • Up to the 5th harmonic
In addition to considering the entire range, these three approaches will be investigated for further analysis. As described in Section 2.1, a motor with fractional slot winding generates typical harmonics, which can be calculated using (4).
Accordingly, Figure 15 lists the averaged motor harmonics per motor. The number of frequency bins has been reduced again. It is still possible to differentiate between the damaged motors, but the influence of motors with moderately damaged magnets decreases significantly. It is therefore to be expected that the ML algorithms used in the following chapter will be less well received by the motor-related frequencies of motors MD1 and MD2 than by the demagnetization harmonics.

5.4. General Machine Learning Approach

Following the analysis of FFT spectra and the insights obtained therefrom, the individual frequency spectra are utilized for the training of ML algorithms. In accordance with the described pipeline, dimensionality reduction is initially performed using kPCA, followed by training an anomaly detection model based on the calculated principal components (PCs). In this instance, the OC-SVM is employed as the algorithm.

5.4.1. Dimensionality Reduction

Given the extensive array of frequency bins, the FFT data undergoes a compression of dimensions in a subsequent phase. Within this process, kPCA is employed to distill the multifaceted data structures. This method reconfigures the high-dimensional FFT space to enhance the discernibility of non-linear correlations, thereby facilitating a more refined comprehension of the data. When applied to FFT analyses, it isolates the most significant patterns, interrelations, and vectors within the amplitude and frequency data, creating new indicators known as principal components [21]. Moreover, this phase acts as a foundational step towards the deployment of a machine learning algorithm designed for the autonomous detection of anomalies and also prevents the curse of dimensionality.
To train the kPCA, datasets from only the damage-free motors are employed to facilitate the detection of anomalies in subsequent stages of the pipeline. Consequently, data from motors H1 and H2 were selected for the training process and the adjustment of hyperparameters. The optimization of the kPCA’s hyperparameters follows the methodology outlined in [22], resulting in the selection of the sigmoid kernel function. The efficacy of the dimensionality reduction technique developed through training is subsequently assessed using data from the intact motor H3 and the defective motors CD1, CD2, MD1, and MD2. The relationships among the calculated three principal components extracted by the model are visually depicted for each investigated frequency case in Figure 16 as three-dimensional plots.
It becomes evident that when utilizing the entire frequency spectrum, the distinction between healthy and damaged motors is scarcely feasible (see Figure 16a). If limiting the analysis to specific demagnetization or motor-specific frequencies, the distinction is easier to make. Only the severe fault condition of motors CD1 and CD2, in which individual magnets were completely demagnetized, can be differentiated from the healthy machines. Additionally, it becomes apparent that constraining the frequency range due to the presence of spectral scatterings, inverter-based components, and high-noise components in higher frequency ranges results in a significant enhancement of the discriminatory power between healthy and demagnetized motors. Overall, this bandwidth restriction and focusing on fault frequencies caused by demagnetization allow a good visual separation of the data transformed by kPCA for the motors CD1, MD1, and MD2 from the healthy motors. Despite CD2 having the most significant damage overall, it shares similarities with healthy motors because of its low THD, as referenced in Section 3.2. A notable aspect is the examination of motor-specific frequencies that occur in motors with fractional slot winding in Figure 16f. The damages from demagnetization are markedly reflected in the significantly reduced number of frequency bins. For this reason, the individual damages and motors can be quite clearly distinguished in the transformed data (except for motor CD2).
From the explanations, it can be inferred that reliable detection of anomalous motor conditions, which are caused by demagnetizations, is feasible. This will become apparent during the actual anomaly detection, as discussed in the next section.

5.4.2. Anomaly Detection

In the final step of the analysis pipeline, the transformed data are employed to train and subsequently evaluate the ML algorithm for anomaly detection. A semi-supervised approach is utilized for this purpose. Initially, the labeled data (in the present case, the data from the healthy motors H1 and H2) are used to train a model. Following this, the unlabeled data can be used to detect anomalies that the model identifies as deviations from the normal patterns. This approach enables the detection of anomalies without the need for a large amount of labeled data on normally non-existent defective motors. However, to effectively train the OC-SVM and optimize the hyperparameters accordingly, artificially generated anomaly data is necessary. These are created using the procedure described in [23], based on the existing principal components of the training data from healthy motors. For an initial examination of the results from the OC-SVM, confusion matrices were utilized. These facilitate the identification of specific types of errors (e.g., false positives, false negatives), the recognition of class imbalances, and the derivation of areas for improvement, as well as the execution of quantitative measures such as the computation of certain metrics [24]. For the desired anomaly detection in the present case, the focus is on reducing false positives (real condition “normal”, predicted condition “defect”) and false negatives (real condition “defect”, predicted condition “normal”). The reason why the proportion of false positives must be kept to a minimum is that in real-world applications, maintenance workers or machine operators may lose confidence in the motor’s condition monitoring system if it frequently indicates a defect when there is none. This can lead to a situation where the operator tends to ignore the warning, even though a fault might be present. To ensure this, the focus in evaluating the models was placed on the metric of precision and specificity (SPC). These two metrics can be calculated using the following equation, resulting from the true positives (TP), the predicted positives (PP), the true negatives (TN), and the total negatives (N):
P r e c i s i o n = T P P P
S P C = T N N
Since both metrics must be considered for the assessment of false positives, the mean value of the two metrics, called precision-SPC mean, is used for further consideration.
P r e c i s i o n S P C   M e a n = P r e c i s i o n + S P C 2

6. Results and Discussion

To evaluate the different models, the corresponding confusion matrices in Figure 17 and, most importantly, the resulting metrics from Table 5 are used. Overall, the models are characterized by a consistently high precision of >93% and a similarly good SPC of >83%. This is also available in Table 5. In addition to the mean of precision and SPC, accuracy plays a decisive role in the evaluation of the models. This differs significantly and is primarily influenced by the false negatives, i.e., the data samples that indicate damaged motors but are still detected as normal. Due to the similar behavior of motor CD2 compared to the healthy motors in the THD (Figure 6) and in the transformed data by kPCA, the majority of false negatives result from this particular motor in some cases. For this reason, the table additionally specifies the proportion of motor CD2 in the false-negative predictions.
When examining the results as depicted in Figure 17a of the model that was trained with the entire frequency spectrum, the high proportion of false negatives becomes evident. This negatively impacts accuracy and cannot be explained by the inclusion of motor CD2 alone. However, it was already clear from the kPCA plots that only motor CD1 is distinctly separable. The accuracy of the model trained with the demagnetization-relevant frequencies of the FFT spectrum already shows a marked increase in accuracy as well as a slight improvement in precision and SPC. If the FFT spectrum is restricted to the 11th or 7th integral demagnetization-relevant frequency, a significant leap in accuracy as well as in precision and SPC can be achieved. Furthermore, it should be clarified that in this case, the share of motor CD2 in the false negatives is extremely high, thus the minor damages to motors MD1 and MD2 can be reliably detected. If the bandwidth of the demagnetization-relevant frequencies is overly restricted (in the case of five integral harmonics), although excellent precision and SPC are consistently possible, the accuracy decreases again and the false negatives increase. For the model trained with motor-specific harmonics, the best precision of >99% and the best SPC of >98% are delivered. Although the accuracy is lower than in (c), the proportion of motor CD2 in the false negatives is at 100%. This result confirms the assumption previously made after examining the kPCA outcomes that motor CD2 is difficult to distinguish from healthy motors.

7. Conclusions

In this investigation, the impact of demagnetization in PMSM with fractional slot winding was analyzed both in simulation and experiment. For this reason, symmetrical patterns like uniform demagnetization and asymmetrical ones like complete demagnetization of single magnets and moderately demagnetized magnets were simulated and their spectral information analyzed. It is noticeable that all investigated demagnetization patterns cause an increase in amplitude in the same harmonics, with a higher level for partial demagnetization. In this case, there is a strong dependence on the number of affected magnets and the specific machine design for asymmetric demagnetization. In this motor design, the demagnetization of seven magnets (CD2) results in a spectral behavior of the investigated voltages and currents that closely resembles that of an undamaged motor, leading to poor anomaly detection performance. Analyzing the EMF amplitude could be a more effective approach for identifying this specific fault pattern. However, this method would require the use of additional sensors. For symmetric demagnetization, the harmonic content decreases even with an increasing affected volume fraction.
To support the findings from the simulation, seven motors with different health conditions were investigated in experiments. A ML approach for detecting even very small demagnetization damages has been presented and validated using these motors. One specialty is that the evaluated data was collected directly from the inverter, eliminating the need for additional sensors. The detection algorithm allows for spectral analysis using FFT and utilizes kPCA for dimensionality reduction. Different subsets of the frequency spectrum are compared using analytically calculable equations. Subsequently, an OC-SVM is used for anomaly detection of the current data to determine a deviation from normal machine behavior. Since in practical applications there is often a lack of data from demagnetized motors during the initialization of the detection algorithm, the OC-SVM is trained with current data from healthy motors only and optimized using pseudo-anomalies. A metric combining precision and specificity, called Precision-SPC Mean, is introduced for evaluating the quality of the analysis, achieving values of >98%. The accuracy reaches up to >90%, with the caveat that the examined damages, with partial demagnetization of <2%, are very small and exhibit spectral behavior similar to undamaged motors due to the specific machine design.
The approach presented here for detecting demagnetization damages can be applied to other machine designs and applications, enabling early and reliable damage detection without the need for additional sensors. In the future, the algorithm can also be implemented directly on the inverter hardware.

Author Contributions

Conceptualization, D.W. and C.B.; methodology, D.W. and C.B.; software, D.W. and C.B.; validation, D.W. and C.B.; formal analysis, D.W.; investigation, D.W. and C.B.; resources, M.S. and M.H.; writing—original draft preparation, D.W. and C.B.; writing—review and editing, D.W., C.B., M.S., M.H., B.E. and V.R.H.L.; visualization, D.W. and C.B.; supervision, M.S. and M.H.; project administration, M.S. and M.H.; funding acquisition, M.S., M.H., B.E. and V.R.H.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Electronic Components and Systems for European Leadership Joint Undertaking (ECSEL JU) in collaboration with the European Union’s Horizon 2020 Framework Programme and National Authorities in the project AI4CSM, grant number 101007326.

Data Availability Statement

The datasets presented in this article are not readily available as the motors used belong to external partners. Requests to access the datasets should be directed to the corresponding author.

Acknowledgments

The authors would like to thank Harm-Friedrich Steinmetz for the valuable discussions.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. El Hadraoui, H.; Zegrari, M.; Chebak, A.; Laayati, O.; Guennouni, N. A Multi-Criteria Analysis and Trends of Electric Motors for Electric Vehicles. World Electr. Veh. J. 2022, 13, 65. [Google Scholar] [CrossRef]
  2. Constantinides, S. The Important Role of Dysprosium in Modern Permanent Magnets. 2017. Available online: https://www.arnoldmagnetics.com/wp-content/uploads/2017/10/Important-Role-of-Dysprosium-in-Modern-Permanent-Magnets-150906.pdf (accessed on 13 May 2024).
  3. Orlowska-Kowalska, T.; Wolkiewicz, M.; Pietrzak, P.; Skowron, M.; Ewert, P.; Tarchala, G.; Krzysztofiak, M.; Kowalski, C.T. Fault Diagnosis and Fault-Tolerant Control of PMSM Drives–State of the Art and Future Challenges. IEEE Access 2022, 10, 59979–60024. [Google Scholar] [CrossRef]
  4. Lang, W.; Hu, Y.; Gong, C.; Zhang, X.; Xu, H.; Deng, J. Artificial Intelligence-Based Technique for Fault Detection and Diagnosis of EV Motors: A Review. IEEE Trans. Transp. Electrif. 2022, 8, 384–406. [Google Scholar] [CrossRef]
  5. Chen, Y.; Liang, S.; Li, W.; Liang, H.; Wang, C. Faults and Diagnosis Methods of Permanent Magnet Synchronous Motors: A Review. Appl. Sci. 2019, 9, 2116. [Google Scholar] [CrossRef]
  6. Niu, G.; Dong, X.; Chen, Y. Motor Fault Diagnostics Based on Current Signatures: A Review. IEEE Trans. Instrum. Meas. 2023, 72, 3520919. [Google Scholar] [CrossRef]
  7. Schellenberger, M.; Lorentz, V.; Eckardt, B. Cognitive Power Electronics—An Enabler for Smart Systems. In PCIM Europe 2022; International Exhibition and Conference for Power Electronics, Intelligent Motion, Renewable Energy and Energy Management; VDE: Nuremberg, Germany, 2022. [Google Scholar]
  8. Rao, D.; Bagianathan, M. Selection of Optimal Magnets for Traction Motors to Prevent Demagnetization. Machines 2021, 9, 124. [Google Scholar] [CrossRef]
  9. Aguilar-Zamorate, I.S.; Galluzzi, R.; Ibarra, L.; Amati, N. A Method to Compute the Irreversible Demagnetization Temperature in Permanent Magnets. In Proceedings of the 2023 International Symposium on Electromobility (ISEM), Monterrey, Mexico, 26–28 October 2023; pp. 1–7. [Google Scholar] [CrossRef]
  10. Choi, S.; Haque, M.S.; Bin Tarek, T.; Mulpuri, V.; Duan, Y.; Das, S.; Garg, V.; Ionel, D.M.; Masrur, M.A.; Mirafzal, B.; et al. Fault Diagnosis Techniques for Permanent Magnet AC Machine and Drives—A Review of Current State of the Art. IEEE Trans. Transp. Electrif. 2018, 4, 444–463. [Google Scholar] [CrossRef]
  11. Navarro-Navarro, A.; Ruiz-Sarrio, J.E.; Biot-Monterde, V.; Antonino-Daviu, J.A.; Becker, V.; Urschel, S. Application of Transient Analysis Techniques to Fault Diagnosis in Low- and Medium-Power Synchronous Machines. Machines 2023, 11, 288. [Google Scholar] [CrossRef]
  12. Nejadi-Koti, H.; Faiz, J.; Demerdash, N.A.O. Uniform demagnetization fault diagnosis in permanent magnet synchronous motors by means of cogging torque analysis. In Proceedings of the 2017 IEEE International Electric Machines and Drives Conference (IEMDC), Miami, FL, USA, 21–24 May 2017; pp. 1–7. [Google Scholar] [CrossRef]
  13. Ullah, Z.; Lee, S.-T.; Siddiqi, M.R.; Hur, J. Online Diagnosis and Severity Estimation of Partial and Uniform Irreversible Demagnetization Fault in Interior Permanent Magnet Synchronous Motor. In Proceedings of the 2019 IEEE Energy Conversion Congress and Exposition (ECCE), Baltimore, MD, USA, 29 September–3 October 2019; pp. 1682–1686. [Google Scholar] [CrossRef]
  14. Rafaq, M.S.; Lee, H.; Park, Y.; Bin Lee, S.; Fernandez, D.; Diaz-Reigosa, D.; Briz, F. A Simple Method for Identifying Mass Unbalance Using Vibration Measurement in Permanent Magnet Synchronous Motors. IEEE Trans. Ind. Electron. 2021, 69, 6441–6444. [Google Scholar] [CrossRef]
  15. Mahmoud, M.S.; Khang, H.V.; Senanayaka, J.; Robbersmyr, K.G.; Panadero, R. A two-stage Fault Diagnosis Scheme of Partial Demagnetization Faults in PMSMs with Low Labelled Rates. In Proceedings of the 2023 IEEE International Electric Machines & Drives Conference (IEMDC), San Francisco, CA, USA, 15–18 May 2023; pp. 1–7. [Google Scholar] [CrossRef]
  16. Du, B.; Huang, W.; Cheng, Y.; Chen, J.; Tao, R.; Cui, S. Fault Diagnosis and Separation of PMSM Rotor Faults Using Search Coil Based on MVSA and Random Forests. IEEE Trans. Ind. Electron. 2024, 1–11. [Google Scholar] [CrossRef]
  17. Mohammad-Alikhani, A.; Vahedi, A.; Mahmouditabar, F.; Rahnama, M. Demagnetization Fault Diagnosis of FSPM Motor Based on ReliefF and SVM. In Proceedings of the 2019 International Power System Conference (PSC), Tehran, Iran, 9–11 December 2019; pp. 95–99. [Google Scholar] [CrossRef]
  18. Blechinger, C.; Hofmann, M.; Walch, D.; Steinmetz, H.-F.; Schellenberger, M. Cognitive Power Electronics for Detection of Demagnetization in Electric Drives. In Proceedings of the 2023 13th International Electric Drives Production Conference (EDPC), Regensburg, Germany, 29–30 November 2023; pp. 1–7. [Google Scholar] [CrossRef]
  19. Peng, W.; Kun, W.; Meng, F. Demagnetization Study of Permanent Magnet Machine Under Three Phase Short Circuit. In Proceedings of the 2023 IEEE 6th International Electrical and Energy Conference (CIEEC), Hefei, China, 12–14 May 2023; pp. 2705–2710. [Google Scholar] [CrossRef]
  20. Chen, S.; Hsiao, C.-Y.; Yao, L.; Yu, F.; Wang, Y.; Shen, J.-X. Comparative Analysis of Magnet Demagnetization in FSCW and ISDW IPM Machines with Various Rotor Topologies. In Proceedings of the 2020 23rd International Conference on Electrical Machines and Systems (ICEMS), Hamamatsu, Japan, 24–27 November 2020. [Google Scholar] [CrossRef]
  21. Schölkopf, B.; Smola, A.; Müller, K.-R. Nonlinear Component Analysis as a Kernel Eigenvalue Problem. Neural Comput. 1998, 10, 1299–1319. [Google Scholar] [CrossRef]
  22. Alam, M.A.; Fukumizu, K. Hyperparameter selection in kernel principal component analysis. J. Comput. Sci. 2014, 10, 1139–1150. [Google Scholar] [CrossRef]
  23. Wang, S.; Liu, Q.; Zhu, E.; Porikli, F.; Yin, J. Hyperparameter selection of one-class support vector machine by self-adaptive data shifting. Pattern Recognit. 2018, 74, 198–211. [Google Scholar] [CrossRef]
  24. Powers, D.M. Evaluation: From precision, recall and F-measure to ROC, informedness, markedness and correlation. arXiv 2020, arXiv:2010.16061. [Google Scholar] [CrossRef]
Figure 1. Typical shape of magnetization curve of neodymium magnetic material for two different temperatures (green T0 < blue T1) and operating characteristics of an electric machine (gray) and recoil line (red) because of irreversible demagnetization.
Figure 1. Typical shape of magnetization curve of neodymium magnetic material for two different temperatures (green T0 < blue T1) and operating characteristics of an electric machine (gray) and recoil line (red) because of irreversible demagnetization.
Machines 12 00468 g001
Figure 2. Finite-element-method (FEM) model with healthy magnets (dark green) and (a) two magnets completely demagnetized (red) and (b) two magnets moderately demagnetized (blue).
Figure 2. Finite-element-method (FEM) model with healthy magnets (dark green) and (a) two magnets completely demagnetized (red) and (b) two magnets moderately demagnetized (blue).
Machines 12 00468 g002
Figure 3. Simulated FFT of the induced voltage of undamaged, complete, and moderately demagnetized magnets.
Figure 3. Simulated FFT of the induced voltage of undamaged, complete, and moderately demagnetized magnets.
Machines 12 00468 g003
Figure 4. (a) Result of the demagnetization simulation with visible demagnetization of magnetic edges when Id = 25 A and Tmag = 80 °C; (b) Modeling the demagnetized edges in FEM with area of Br = 0 (pink color) and Br = 100% Br0 (dark green color).
Figure 4. (a) Result of the demagnetization simulation with visible demagnetization of magnetic edges when Id = 25 A and Tmag = 80 °C; (b) Modeling the demagnetized edges in FEM with area of Br = 0 (pink color) and Br = 100% Br0 (dark green color).
Machines 12 00468 g004
Figure 5. Simulated FFT of the induced voltage of undamaged, complete demagnetization of some magnets and all-moderate demagnetized magnets.
Figure 5. Simulated FFT of the induced voltage of undamaged, complete demagnetization of some magnets and all-moderate demagnetized magnets.
Machines 12 00468 g005
Figure 6. Simulated THD of the induced voltage at no-load for different degrees of partial (CD-SM and MD-SM) and uniform (MD-AM) demagnetization.
Figure 6. Simulated THD of the induced voltage at no-load for different degrees of partial (CD-SM and MD-SM) and uniform (MD-AM) demagnetization.
Machines 12 00468 g006
Figure 7. Laboratory setup of the performed experiments.
Figure 7. Laboratory setup of the performed experiments.
Machines 12 00468 g007
Figure 8. Exemplary section of the recorded phase currents.
Figure 8. Exemplary section of the recorded phase currents.
Machines 12 00468 g008
Figure 9. Section of one investigated drone motor.
Figure 9. Section of one investigated drone motor.
Machines 12 00468 g009
Figure 10. Detailed process of the model training, including hyperparameter optimization with data from damage-free motors.
Figure 10. Detailed process of the model training, including hyperparameter optimization with data from damage-free motors.
Machines 12 00468 g010
Figure 11. Testing the pre-trained models with previously unseen data from healthy and damaged motors.
Figure 11. Testing the pre-trained models with previously unseen data from healthy and damaged motors.
Machines 12 00468 g011
Figure 12. Investigated frequency spectra and their restrictions.
Figure 12. Investigated frequency spectra and their restrictions.
Machines 12 00468 g012
Figure 13. Averaged and normalized FFT spectrum of the measured data with marked demagnetization frequencies.
Figure 13. Averaged and normalized FFT spectrum of the measured data with marked demagnetization frequencies.
Machines 12 00468 g013
Figure 14. FFT spectrum limited to demagnetization harmonics.
Figure 14. FFT spectrum limited to demagnetization harmonics.
Machines 12 00468 g014
Figure 15. FFT spectrum limited to motor-related frequencies up to the 16th harmonic.
Figure 15. FFT spectrum limited to motor-related frequencies up to the 16th harmonic.
Machines 12 00468 g015
Figure 16. Dependencies between the three main PCs of the kPCA for the different approaches: (a) entire FFT spectrum; (b) all demagnetization-related frequencies; (c) up to the 11th demagnetization harmonic; (d) up to the 7th demagnetization harmonic; (e) up to the 5th demagnetization harmonic; (f) all motor harmonics.
Figure 16. Dependencies between the three main PCs of the kPCA for the different approaches: (a) entire FFT spectrum; (b) all demagnetization-related frequencies; (c) up to the 11th demagnetization harmonic; (d) up to the 7th demagnetization harmonic; (e) up to the 5th demagnetization harmonic; (f) all motor harmonics.
Machines 12 00468 g016aMachines 12 00468 g016b
Figure 17. Confusion matrices for the different approaches: entire FFT spectrum (a), demagnetization harmonics (b), up to the 11th demagnetization harmonic (c), up to the 7th demagnetization harmonic (d), up to the 5th demagnetization harmonic (e), motor harmonics (f).
Figure 17. Confusion matrices for the different approaches: entire FFT spectrum (a), demagnetization harmonics (b), up to the 11th demagnetization harmonic (c), up to the 7th demagnetization harmonic (d), up to the 5th demagnetization harmonic (e), motor harmonics (f).
Machines 12 00468 g017
Table 1. Overview of different approaches for demagnetization detection in literature [3,15,16,17].
Table 1. Overview of different approaches for demagnetization detection in literature [3,15,16,17].
Physical ParameterDemagnetization FeaturesClassification Algorithm
Time DomainFrequency DomainTime-Frequency Domain
magnetic fluxmeanFFTSTFTconvolutional neural network
induced voltage/EMFmediancepstrumCWTBayesian neural network
currentstandard deviationenvelopeDWTprobabilistic neural network
torqueRMS HHTrandom forest
vibrationclearance factor WVTsupport vector machine
acousticsshape factor CWD
kurtosis
skewness
impulse factor
crest factor
Table 2. Structure of demagnetization fault pattern.
Table 2. Structure of demagnetization fault pattern.
Degree of Demagnetization Level
Total (Br/Br0 = 0)Variable (0 < Br/Br0 < 1)
number of affected magnetsall magnetscomplete demagnetization of all magnets (CD-AM)moderate demagnetization of all magnets (MD-AM)
some magnetscomplete demagnetization of some magnets (CD-SM)moderate demagnetization of some magnets (MD-SM)
Table 3. Main parameters of the electric motor.
Table 3. Main parameters of the electric motor.
ParameterValue
TopologyPMSM with external rotor
Rated output power (W)320
Nominal voltage (V)24
Outer diameter (mm)86
Number of phases m3
Number of slots Q36
Number of pole pairs p21
Magnet materialN45
Table 4. Investigated drone motors and their condition.
Table 4. Investigated drone motors and their condition.
MotorDamaged MagnetsExtend of DamageTotal Demagnetization
H10-0%
H20-0%
H30-0%
CD12Complete demagnetization4.8%
CD27Complete demagnetization16.7%
MD12Moderate demagnetization~1.67%
MD22Moderate demagnetization~1.67%
Table 5. Results and metrics of the analyzed models.
Table 5. Results and metrics of the analyzed models.
ApproachPrecisionSPCPrecision-SPC MeanAccuracyShare of CD2 in False Negatives
Entire spectrum93.4%83.8%88.6%62.3%10.8%
All demagnetization harmonics95.2%85.1%90.1%75.8%33.2%
Up to the 11th demagnetization harmonic98.1%93.1%95.6%90.1%98.8%
Up to the 7th demagnetization harmonic97.7%91.8%94.7%88.6%99.7%
Up to the 5th demagnetization harmonic98.6%95.9%97.2%75.4%64.1%
All motor harmonics99.4%98.1%98.8%86.6%100.0%
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Walch, D.; Blechinger, C.; Schellenberger, M.; Hofmann, M.; Eckardt, B.; Lorentz, V.R.H. Detection of Demagnetization Faults in Electric Motors by Analyzing Inverter Based Current Data Using Machine Learning Techniques. Machines 2024, 12, 468. https://doi.org/10.3390/machines12070468

AMA Style

Walch D, Blechinger C, Schellenberger M, Hofmann M, Eckardt B, Lorentz VRH. Detection of Demagnetization Faults in Electric Motors by Analyzing Inverter Based Current Data Using Machine Learning Techniques. Machines. 2024; 12(7):468. https://doi.org/10.3390/machines12070468

Chicago/Turabian Style

Walch, Daniel, Christoph Blechinger, Martin Schellenberger, Maximilian Hofmann, Bernd Eckardt, and Vincent R.H. Lorentz. 2024. "Detection of Demagnetization Faults in Electric Motors by Analyzing Inverter Based Current Data Using Machine Learning Techniques" Machines 12, no. 7: 468. https://doi.org/10.3390/machines12070468

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop