Research on Fault Diagnosis of Electric Car IPMSM Based on Multi-Weight Reputation Mechanism and Federated Learning

In the era of big data and artificial intelligence, the intelligence level of electric cars has significantly increased, leading to a growing demand for motor fault diagnosis, particularly in ensuring the safety and reliability of motor operation. This study focuses on the diagnosis of rotor demagnetization and eccentricity faults in Interior Permanent Magnet Synchronous Motors (IPMSM) used in electric cars. By employing federated learning, we achieve distributed data training and privacy protection, avoiding centralized data storage and processing while safeguarding data privacy. Additionally, we design a multi-weight reputation mechanism based on Exponential Moving Average (EMA) dynamic updates and diversity factors. This mechanism comprehensively considers multiple dimensions, including time decay, historical stability, and collaborative feature contribution, to dynamically assess the reliability of participating nodes. As a result, it enhances defense against malicious attacks while reducing the likelihood of incorrectly excluding honest nodes, thereby improving model-training performance. Our experimental results demonstrate that this method exhibits excellent robustness and security across various malicious attack scenarios, effectively eliminating malicious nodes while avoiding inadvertent deletion of honest nodes. Compared to traditional reputation mechanisms, the proposed method shows significant improvements in diagnostic accuracy, highlighting its potential for real-world applications in electric car networks.

The rapid adoption of electric cars has underscored the critical need for reliable motor fault diagnosis systems. IPMSMs, as key components in electric car propulsion, are prone to faults such as rotor demagnetization and eccentricity, which can compromise vehicle performance and safety. Traditional fault diagnosis methods often rely on centralized data processing, which poses privacy risks and scalability challenges in the interconnected environment of electric cars. Federated learning offers a promising solution by enabling collaborative model training without sharing raw data. However, the distributed nature of federated learning in electric car networks makes it vulnerable to malicious attacks, such as data poisoning and gradient manipulation. To address this, we integrate a reputation mechanism that dynamically evaluates node trustworthiness. Our novel multi-weight reputation mechanism leverages EMA for adaptive updates and incorporates diversity factors to ensure accurate and resilient fault diagnosis for electric cars.

In this context, we first outline the fault types relevant to IPMSM in electric cars. Rotor demagnetization occurs due to factors like high temperatures or mechanical stress, reducing magnetic flux density and motor output. Static eccentricity involves misalignment between rotor and stator centers, leading to uneven air-gap magnetic fields. These faults can be modeled using electromagnetic equations. For instance, the magnetic circuit equation for demagnetization is given by:

$$ \nabla \cdot \left( \frac{1}{\mu} \nabla A \right) = -J + M_{\text{demag}} $$

where \( A \) is the vector magnetic potential, \( \mu \) is the material permeability, \( J \) is the current density, and \( M_{\text{demag}} \) represents the equivalent magnetization change due to demagnetization. For static eccentricity, the air-gap magnetic flux density can be expressed as:

$$ B = \frac{\mu_0 N I}{2\pi r_{\text{gap}}} \left(1 + \epsilon \cos(\theta – \omega t) \right) $$

where \( B \) is the magnetic flux density, \( r_{\text{gap}} \) is the air-gap length, \( \epsilon \) denotes the eccentricity degree, and \( \theta \) and \( \omega \) are angle and angular velocity, respectively. The eccentricity level \( \delta_s \) is defined as:

$$ \delta_s = \frac{\| O_s O_r \|}{g_0} $$

with \( O_s \) and \( O_r \) as stator and rotor center positions, and \( g_0 \) as the normal air-gap length. These models form the basis for generating fault data through finite element method (FEM) simulations, which we use in our federated learning framework for electric car motor diagnosis.

Our multi-weight reputation mechanism is designed to enhance the security of federated learning in electric car networks. It builds upon a subjective logic model, where the reputation of a node \( v_j \) from an evaluator \( R_i \) is represented by a triplet \( w_{R_i \to v_j} = (b_{R_i \to v_j}, d_{R_i \to v_j}, u_{R_i \to v_j}) \), denoting belief, disbelief, and uncertainty, respectively. These parameters satisfy:

$$ b_{R_i \to v_j} + d_{R_i \to v_j} + u_{R_i \to v_j} = 1, \quad b_{R_i \to v_j} \geq 0, \quad d_{R_i \to v_j} \geq 0, \quad u_{R_i \to v_j} \geq 0 $$

We introduce several weights to refine this model. First, positive and negative interactions are defined based on successful or failed data exchanges between nodes. The belief, disbelief, and uncertainty are calculated as:

$$ b_{R_i \to v_j} = (1 – u_{R_i \to v_j}) \frac{\alpha}{\alpha + \beta}, \quad d_{R_i \to v_j} = (1 – u_{R_i \to v_j}) \frac{\beta}{\alpha + \beta}, \quad u_{R_i \to v_j} = 1 – p_{R_i \to v_j} $$

where \( \alpha \) and \( \beta \) are counts of positive and negative interactions, and \( p_{R_i \to v_j} \) is the probability of successful model transmission. To account for interaction freshness, a decay function \( \varsigma(t) \) is applied:

$$ \varsigma(t) = \frac{Z^{T-t}}{1 + e^{-k(t – T/2)}} $$

with \( Z \in (0,1) \) as a time decay coefficient, \( t \) as the time interval, \( T \) as the total time window, and \( k \) controlling weight growth. An EMA dynamic update mechanism is then used to adaptively adjust reputation values, emphasizing recent behavior. The EMA-updated belief is:

$$ b^{\text{EMA}}_{R_i \to v_j} = \varepsilon \cdot b^{\text{current}}_{R_i \to v_j} + (1 – \varepsilon) \cdot b^{\text{previous}}_{R_i \to v_j} $$

Similarly, for disbelief and uncertainty:

$$ d^{\text{EMA}}_{R_i \to v_j} = \varepsilon \cdot d^{\text{current}}_{R_i \to v_j} + (1 – \varepsilon) \cdot d^{\text{previous}}_{R_i \to v_j}, \quad u^{\text{EMA}}_{R_i \to v_j} = \varepsilon \cdot u^{\text{current}}_{R_i \to v_j} + (1 – \varepsilon) \cdot u^{\text{previous}}_{R_i \to v_j} $$

where \( \varepsilon \) is a smoothing factor. Historical stability is incorporated via a coefficient \( \mathcal{M}(t) \), defined as the ratio of stable interaction rounds to total rounds over time \( t \). Interaction frequency weight \( \gamma(t) \) amplifies the influence of frequently interacting nodes:

$$ \gamma(t) = \log(1 + f^t_{R_i \to v_j}) $$

with \( f^t_{R_i \to v_j} \) as the interaction frequency. Additionally, a collaborative feature contribution coefficient \( C(t) \) measures a node’s impact on model performance:

$$ C(t) = \frac{\Delta \text{loss}_{\text{baseline}} – \Delta \text{loss}_{v_j}}{\Delta \text{loss}_{\text{baseline}}} $$

where \( \Delta \text{loss}_{\text{baseline}} \) is the loss change without node \( v_j \), and \( \Delta \text{loss}_{v_j} \) is with it. For server-to-vehicle (S-V) reputation assessment, these weights are combined to compute final values. The trust entropy \( \mathcal{H}_{R_i \to v_j} \) quantifies diversity in trust scores over past rounds:

$$ \mathcal{H}_{R_i \to v_j} = -\sum_{k=1}^{R} P_k \cdot \log P_k $$

where \( P_k \) is the proportion of belief (or disbelief/uncertainty) in round \( k \). The trust diversity factor (TDF) is derived as:

$$ \text{TDF}_{R_i \to v_j} = \exp\left( -\frac{\mathcal{H}_{R_i \to v_j}}{\mathcal{H}_{\text{max}}} \right) $$

with \( \mathcal{H}_{\text{max}} \) as the maximum entropy. The overall reputation function integrates S-V and vehicle-to-vehicle (V-V) assessments, yielding final belief, disbelief, and uncertainty. The reputation score \( T_{R_i \to v_j} \) is:

$$ T_{R_i \to v_j} = b_{R_i \to v_j} + \delta \cdot u_{R_i \to v_j} $$

where \( \delta \) is a tuning parameter. This multi-weight approach ensures robust node evaluation in federated learning for electric car fault diagnosis.

The system model for our federated learning framework involves multiple electric car nodes participating in collaborative training. Each node performs local model updates using its IPMSM fault data, applies gradient sparsification to reduce communication overhead, exchanges intermediate results and reputation values with other nodes and a central server, and integrates global model updates. This process enhances privacy and efficiency in electric car networks. The attack model considers various threats, such as free rider (FR), label flipping (LF), deep leakage from gradients (DLG), and improved deep leakage from gradients (IDLG) attacks. These attacks aim to poison data, manipulate gradients, or leak sensitive information, compromising the fault diagnosis system for electric cars. Our reputation mechanism mitigates these risks by dynamically identifying and isolating malicious nodes based on their behavior patterns.

For experimental validation, we simulated IPMSM fault data using MATLAB and Flux software, covering eight fault types: 25% demagnetization (De25), 50% demagnetization (De50), 10% static eccentricity (Se10), and combined faults like De25_Se20. Data was transformed into grayscale images via Fourier transforms and autocorrelation matrix methods for convolutional neural network processing. The federated learning setup included 40 honest participants and 4 malicious attackers, with parameters as summarized in Table 1.

Table 1: Experimental Parameter Settings for Electric Car Motor Fault Diagnosis
Parameter Setting
Total Data Size 8,000
Learning Rate 0.001
Global Rounds 80
Local Rounds 10
Learning Decay Rate 0.977
Split Ratio 0.9
Split Method Random
Loss Function CrossEntropyLoss
Honest Participants 40
Malicious Attackers 4
Reputation Threshold 0.3333
TDF History 10
Batch Size 32
Optimizer Adam

We compared our improved reputation mechanism with a traditional one under four attack scenarios. The reputation values were normalized, with a threshold of 0.3333 for node elimination after 10 global rounds. The results, as shown in Table 2, indicate that our mechanism consistently outperforms the traditional one by accurately剔除 malicious nodes while preserving honest ones, leading to higher diagnostic accuracy for electric car motors.

Table 2: Performance Comparison Under Different Attacks for Electric Car Motor Fault Diagnosis
Attack Type Improved Mechanism Accuracy Gain Traditional Mechanism Honest Nodes Removed Improved Mechanism Honest Nodes Removed
Free Rider (FR) 8.937% 3 0
Label Flipping (LF) 5.146% 2 0
Deep Leakage from Gradients (DLG) 9.868% 4 0
Improved Deep Leakage from Gradients (IDLG) 5.675% 1 0

The enhanced accuracy stems from the multi-weight design, which reduces fluctuations in reputation scores and avoids premature elimination of nodes due to transient issues. For instance, the EMA update smooths out anomalies, while the diversity factor accounts for historical consistency. This is crucial in electric car networks, where nodes may experience intermittent connectivity or data variations. The overall accuracy and loss curves demonstrate that our method achieves stable convergence with minimal performance degradation under attacks, validating its robustness for real-time fault diagnosis in electric cars.

In conclusion, this study presents a novel approach to IPMSM fault diagnosis for electric cars by integrating federated learning with a multi-weight reputation mechanism. Our method effectively addresses privacy concerns and security threats in distributed electric car networks, ensuring reliable motor operation. The proposed mechanism, based on EMA dynamic updates and diversity factors, offers superior defense against malicious attacks while maintaining high diagnostic accuracy. Future work could explore multi-modal data fusion and real-time optimization techniques to further enhance fault diagnosis in complex electric car environments. As the adoption of electric cars continues to grow, such advanced diagnostic systems will play a pivotal role in ensuring vehicle safety and efficiency.

Scroll to Top