Pmsm current sensor fault diagnosis method based on cross-phase mask self-supervision and fault mechanism prototype decoupling network

CN122926170APending Publication Date: 2026-10-16HEFEI UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611117137.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-27
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0006]本发明的目的是为了解决现有技术中PMSM电流传感器故障诊断方法在复杂工况下故障特征与工况扰动耦合严重、易混淆故障对区分能力不足、故障相位定位不准确以及诊断结果可解释性较差的缺陷,提供一种基于跨相掩码自监督与故障机理原型解耦网络的PMSM电流传感器故障诊断方法来解决上述问题

Benefits of technology

[0116]The present invention provides a PMSM current sensor fault diagnosis method based on cross-phase mask self-supervision and fault mechanism prototype decoupling network. Compared with the prior art, this method constructs multi-source time-series samples containing three-phase current, KCL physical residuals and phase current differences, and uses cross-phase mask self-supervision to reconstruct and learn the physical coupling relationship between the three-phase currents. Combined with multi-scale time-series coding, fault mechanism prototype decoupling, operating condition invariant adversarial constraints and confusion fault boundary enhancement mechanism, it realizes the joint output of PMSM current sensor fault category, fault phase, fault degree and diagnostic confidence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122926170A_ABST
    Figure CN122926170A_ABST
Patent Text Reader

Abstract

The present application relates to a PMSM current sensor fault diagnosis method based on cross-phase mask self-supervised and fault mechanism prototype decoupling network, which solves the defects of PMSM current sensor fault diagnosis method in complex working conditions, such as serious coupling of fault characteristics and working condition disturbance, insufficient ability to distinguish mixed faults, inaccurate fault phase positioning and poor interpretability of diagnosis results compared with the prior art. The present application comprises the following steps: data acquisition and multi-source time sequence sample construction; cross-phase mask self-supervised reconstruction; construction of fault diagnosis model; current sensor fault joint diagnosis. The present application learns the physical coupling relationship between three-phase currents by constructing multi-source time sequence samples containing three-phase currents, KCL physical residuals and phase current differences, and using cross-phase mask self-supervised reconstruction, combined with multi-scale time sequence coding, fault mechanism prototype decoupling, working condition invariant adversarial constraint and mixed fault boundary enhancement mechanism, realizing the joint output of PMSM current sensor fault category, fault phase, fault degree and diagnosis confidence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of PMSM current sensor technology, specifically to a fault diagnosis method for PMSM current sensors based on a cross-phase mask self-monitoring and fault mechanism prototype decoupling network. Background Technology

[0002] Permanent magnet synchronous motors (PMSMs), as high-efficiency, high-power-density power devices, are widely used in new energy vehicles, electric drive systems, industrial servos, and high-end equipment. Their vector control performance is highly dependent on the accurate measurement of three-phase stator current. Due to factors such as electromagnetic interference, temperature rise changes, mechanical vibration, and long-term aging, current sensors are prone to gain faults, bias faults, open-circuit faults, jamming faults, and intermittent faults, which can lead to torque pulsation, decreased control performance, and even system instability. Existing fault diagnosis methods for current sensors mainly include model-based methods, signal processing-based methods, and data-driven methods. Model-based methods rely on relatively accurate system parameter models, but are prone to residual drift due to parameter mismatch in wide speed ranges and dynamic operating conditions. Signal processing-based methods usually rely on manually constructed features, which are not adaptable to non-stationary operating conditions and high-noise environments. Although pure data-driven methods have strong automatic feature extraction capabilities, they still have feature aliasing problems in distinguishing easily confused fault pairs such as bias faults and jamming faults, and open-circuit faults and intermittent faults.

[0003] In recent years, various improvement schemes have been proposed for existing technologies, but limitations still exist. For example, patent CN118688629A uses multi-sensor data fusion and random forest voting mechanism for fault identification. Although this improves anti-interference capability, its multi-sensor configuration increases system complexity and cost, and its adaptability to unseen faults and variable operating conditions is limited. Patent CN117491866A identifies fault characteristic frequencies of current signals through third-order spectral analysis. Although this reduces the dependence on additional hardware, the computational complexity is high, and it is highly dependent on speed stability, making it prone to misjudgment under dynamic operating conditions.

[0004] In general, existing fault diagnosis methods for PMSM current sensors still have the following shortcomings: First, most methods directly input three-phase current, residual features, or frequency domain features into the classifier, failing to fully utilize the inherent cross-phase coupling relationship between the three-phase currents; second, data-driven models usually rely on labeled sample training, lacking a self-supervised learning process for the mutual reconstruction law of healthy three-phase currents, resulting in insufficient generalization ability when there are insufficient fault samples or changes in operating conditions; third, operating condition disturbances such as speed, load, and noise are easily coupled with fault features, causing the model to learn operating condition differences unrelated to the fault; fourth, easily confused fault pairs such as bias faults and jamming faults, open circuit faults and intermittent faults have unclear boundaries in the feature space, easily leading to misjudgments; fifth, most methods only output the fault category, making it difficult to simultaneously provide the fault phase, fault degree, and diagnostic confidence, resulting in insufficient interpretability and engineering usability of the diagnostic results.

[0005] Therefore, designing a PMSM current sensor fault diagnosis method that can fully utilize the physical coupling relationship of three-phase currents, enhance fault characterization capabilities through cross-phase mask self-supervised learning, decouple easily confused faults using fault mechanism prototypes, and simultaneously take into account diagnostic robustness, cross-condition generalization ability, and interpretability has become a technical problem to be solved in this field. Summary of the Invention

[0006] The purpose of this invention is to address the shortcomings of existing PMSM current sensor fault diagnosis methods, such as severe coupling between fault characteristics and operating disturbances under complex operating conditions, insufficient ability to distinguish easily confused fault pairs, inaccurate fault phase location, and poor interpretability of diagnostic results. This invention provides a PMSM current sensor fault diagnosis method based on cross-phase mask self-supervision and fault mechanism prototype decoupling network to solve the above problems.

[0007] To achieve the above objectives, the technical solution of the present invention is as follows:

[0008] A fault diagnosis method for PMSM current sensors based on cross-phase mask self-monitoring and fault mechanism prototype decoupling network includes the following steps:

[0009] Data acquisition and construction of multi-source time series samples: Acquire the three-phase stator current signals of permanent magnet synchronous motor under different operating conditions, perform sliding window segmentation on the three-phase stator current signals, and construct multi-source time series samples containing three-phase current, KCL physical residual and phase current difference;

[0010] Self-supervised reconstruction by cross-phase masking: Perform cross-phase masking on multi-source time series samples, randomly mask at least one phase current segment in phase A, phase B or phase C, reconstruct the masked phase current using the unmasked phase current and its physical coupling information, and form a self-supervised reconstruction task based on the reconstruction error and KCL consistency constraints.

[0011] Construction of fault diagnosis model: Establish a current sensor fault diagnosis model based on cross-phase mask self-supervision and fault mechanism prototype decoupling network;

[0012] Joint diagnosis of current sensor faults: Input multi-source time-series samples into the current sensor fault diagnosis model, and through multi-scale time-series feature extraction, fault mechanism prototype response calculation, decoupling of fault factors and operating condition factors, and enhanced processing of obfuscated fault boundaries, jointly output the current sensor fault category, fault phase, fault degree, and diagnostic confidence.

[0013] The data acquisition and multi-source time series sample construction includes the following steps:

[0014] Acquire the three-phase stator current signal during the operation of the permanent magnet synchronous motor. The three-phase stator current signal includes the A-phase current, B-phase current, and C-phase current.

[0015] The three-phase stator current signal is segmented using an overlapping sliding window to obtain the three-phase current sequence within the current sliding window;

[0016] Construct the KCL physical residual sequence based on the three-phase current sequence within the current sliding window:

[0017] ,

[0018] in, This represents the KCL physical residual corresponding to the i-th sampling point within the current sliding window. This represents the A-phase current value corresponding to the i-th sampling point within the current sliding window. This represents the B-phase current value corresponding to the i-th sampling point within the current sliding window. This represents the C-phase current value corresponding to the i-th sampling point within the current sliding window; i is the sampling point number within the current sliding window.

[0019] Construct a phase current difference sequence based on the three-phase current sequence within the current sliding window:

[0020] ,

[0021] in, This represents the phase current difference value of the i-th sampling point within the current sliding window; This represents the ph-th phase current value corresponding to the i-th sampling point within the current sliding window. ph is the phase current value corresponding to the i-1th sampling point in the current sliding window; ph is the phase sequence index, and ph∈{a,b,c}; i is the sampling point number in the current sliding window;

[0022] Multi-source time series samples were constructed based on three-phase current sequences, KCL physical residual sequences, and phase current difference sequences:

[0023] ,

[0024] in, This is the multi-source time-series sample vector corresponding to the i-th sampling point within the current sliding window; This represents the A-phase current value corresponding to the i-th sampling point within the current sliding window. This represents the B-phase current value corresponding to the i-th sampling point within the current sliding window. This represents the C-phase current value corresponding to the i-th sampling point within the current sliding window. This represents the KCL physical residual corresponding to the i-th sampling point within the current sliding window. This represents the A-phase current difference value corresponding to the i-th sampling point within the current sliding window; This represents the B-phase current difference value corresponding to the i-th sampling point within the current sliding window; is the C-phase current differential value corresponding to the i-th sampling point in the current sliding window; i is the sampling point number in the current sliding window.

[0025] The cross-phase mask self-supervised reconstruction includes the following steps:

[0026] Generate a phase-crossing mask matrix for the multi-source time series samples within the current sliding window, and then use the phase-crossing mask matrix to mask the multi-source time series samples:

[0027] ,

[0028] in, The sample consists of multi-source time series samples after masking; M is the phase masking matrix; X is the original multi-source time series sample within the current sliding window; ⊙ represents the Hadamard product;

[0029] The masked multi-source time series samples are input into the cross-phase reconstruction network to obtain the reconstructed multi-source time series samples:

[0030] ,

[0031] in, The reconstructed multi-source time series samples output by the cross-phase reconstruction network; For cross-phase reconstruction network mapping function; These are multi-source time-series samples after masking.

[0032] Construct the cross-phase mask reconstruction loss based on the reconstruction error of the masked region:

[0033] ,

[0034] in, M is the phase mask reconstruction loss; M is the phase mask matrix; X is the original multi-source time series sample within the current sliding window; The output of the cross-phase reconstruction network represents the reconstructed multi-source time series samples; ⊙ represents the Hadamard product; Represents the L2 norm; This represents the number of masked elements within the current sliding window.

[0035] Construct the KCL consistency loss based on the reconstructed three-phase currents:

[0036] ,

[0037] in, For KCL consistency loss; L is the total number of sampling points in the current sliding window; i is the sampling point number in the current sliding window; This is the reconstructed phase A current value corresponding to the i-th sampling point within the current sliding window; This represents the reconstructed phase B current value corresponding to the i-th sampling point within the current sliding window. This represents the reconstructed C-phase current value corresponding to the i-th sampling point within the current sliding window.

[0038] Construct a self-supervised reconstruction loss based on the phase mask reconstruction loss and the KCL consistency loss:

[0039] ,

[0040] in, For self-supervised reconstruction loss; For cross-phase mask reconstruction loss; This is due to KCL consistency loss; The weighting coefficients corresponding to the KCL consistency loss.

[0041] The construction of the fault diagnosis model includes the following steps:

[0042] The current sensor fault diagnosis model is designed to include a multi-scale timing coding module, a fault mechanism prototype decoupling module, an invariant operating condition constraint module, and a confused fault boundary enhancement module.

[0043] Set up a multi-scale timing coding module.

[0044] The multi-scale temporal coding module includes short-scale temporal coding paths, medium-scale temporal coding paths, and long-scale temporal coding paths.

[0045] The multi-source time-series samples within the current sliding window are input into the short-scale, medium-scale, and long-scale time-series coding pathways, respectively, to obtain short-scale, medium-scale, and long-scale features:

[0046] ,

[0047] in, It is a short-scale feature; This represents a short-scale temporal coding path; X represents multi-source temporal samples within the current sliding window.

[0048] ,

[0049] in, It is a mesoscale feature; This represents a mesoscale temporal coding path; X represents the multi-source temporal samples within the current sliding window.

[0050] ,

[0051] in, It is a long-scale feature; This represents a long-scale temporal coding path; X represents the multi-source temporal samples within the current sliding window.

[0052] ,

[0053] in, For multi-scale temporal features; Concat(⋅) is the feature concatenation operation; It is a short-scale feature; It is a mesoscale feature; For long-scale features; U(·) is the scale alignment function;

[0054] Define a prototype decoupling module for fault mechanisms.

[0055] Set up a learnable set of fault mechanism prototypes, including gain fault prototypes, bias fault prototypes, jam fault prototypes, disconnection fault prototypes, and intermittent fault prototypes:

[0056] ,

[0057] Where P is the set of fault mechanism prototypes; This is a prototype of a gain fault. This is a prototype of a bias fault. This is a prototype of a stuck fault; This is a prototype of a wire breakage fault. This is a prototype of an intermittent fault.

[0058] Using a set of fault mechanism prototypes as the query term and multi-scale temporal features as the key and value, perform prototype interaction attention computation:

[0059] ,

[0060] in, Interactive features of the fault mechanism prototype; Let be the attention calculation function; Q be the query term in the attention calculation; P be the set of fault mechanism prototypes; K be the key in the attention calculation; and V be the value in the attention calculation. It represents multi-scale temporal features;

[0061] Calculate the prototype response strength between the current sample and various fault mechanism prototypes:

[0062] ,

[0063] in, The prototype response strength between the current sample and the prototype of the j-th type of fault mechanism; This is the function for calculating cosine similarity. The prototype interaction features are the prototypes corresponding to the j-th type of fault mechanism prototype. Let be the prototype of the j-th type of fault mechanism; j is the index of the fault mechanism prototype, and j∈{G,B,C,O,I}, where G represents gain fault, B represents bias fault, C represents jam fault, O represents disconnection fault, and I represents intermittent fault.

[0064] The module for setting invariant operating conditions and counteracting constraints is configured.

[0065] The latent variables of the fault diagnosis model are decomposed into fault factors and operating condition factors:

[0066] ,

[0067] in, Fault factor; D is the operating condition factor. z (·) is the latent variable decoupling mapping function; It represents multi-scale temporal features; Interactive features of the fault mechanism prototype;

[0068] Fault factors are used to predict the fault type and fault phase of the current sensor, and the operating condition information in the fault factors is suppressed by a gradient inversion layer.

[0069] ,

[0070] in, The loss function is defined as the operating condition resistance loss; CE(·) is the cross-entropy loss function. For the operating condition discriminator; GRL(·) is the gradient inversion layer; d represents the fault factor; d represents the operating condition label corresponding to the current sample.

[0071] Predicting operating condition labels using operating condition factors allows operating condition information to be concentrated within these factors:

[0072] ,

[0073] in, The loss is the operating condition holding loss; CE(·) is the cross-entropy loss function; For operating condition classifier; d represents the operating condition factor; d represents the operating condition label corresponding to the current sample.

[0074] Configure a fault boundary enhancement module.

[0075] Construct a first confusing fault boundary enhancement loss for bias faults and jamming faults:

[0076] ,

[0077] in, The first confusing fault boundary enhancement loss is used between bias faults and jamming faults; max(·) is the maximum value function; The minimum characteristic interval between bias faults and jamming faults; The class center of the biased fault sample in the fault factor space; The class center of the stuck fault sample in the fault factor space; Represents the L2 norm;

[0078] A second confusion fault boundary enhancement loss is constructed for open-circuit faults and intermittent faults:

[0079] ,

[0080] in, The second confusing fault boundary enhancement loss is used to differentiate between open-circuit faults and intermittent faults. The minimum characteristic interval between open-circuit faults and intermittent faults; The class center of the disconnection fault sample in the fault factor space; The class center of the intermittent fault sample in the fault factor space;

[0081] Construct the total confusion fault boundary enhancement loss based on the first confusion fault boundary enhancement loss and the second confusion fault boundary enhancement loss:

[0082] ,

[0083] in, To obfuscate fault boundaries and increase total loss; Enhanced loss for the first confusing fault boundary between bias faults and jamming faults; The second confusing fault boundary enhancement loss is used to distinguish between open-circuit faults and intermittent faults.

[0084] The joint diagnosis of current sensor faults includes the following steps:

[0085] Multi-source time-series samples are input into a multi-scale time-series coding module. Short-scale features, medium-scale features, and long-scale features are extracted through short-scale time-series coding pathways, medium-scale time-series coding pathways, and long-scale time-series coding pathways, respectively. After scale alignment and feature concatenation, multi-scale time-series features are obtained.

[0086] The multi-scale temporal features are input into the fault mechanism prototype decoupling module. The fault mechanism prototype set is used as the query term, and the multi-scale temporal features are used as the key and value. The prototype interaction attention calculation is performed to obtain the fault mechanism prototype response intensity vector.

[0087] ,

[0088] Where s is the fault mechanism prototype response intensity vector; sG is the gain fault prototype response intensity; sB is the bias fault prototype response intensity; sC is the jam fault prototype response intensity; sO is the open circuit fault prototype response intensity; and sI is the intermittent fault prototype response intensity.

[0089] The multi-scale temporal features and the prototype response intensity vector of the fault mechanism are input into the condition invariant adversarial constraint module to obtain the fault factor and the condition factor. The fault factor is then used as the main discriminant feature for subsequent fault category identification and fault phase localization.

[0090] The fault factors are input into the obfuscated fault boundary enhancement module. Based on the first obfuscated fault boundary enhancement loss between bias faults and stuck faults, and the second obfuscated fault boundary enhancement loss between open-circuit faults and intermittent faults, the feature distribution of the fault factors is subjected to boundary enhancement processing to obtain the enhanced fault factors:

[0091] ,

[0092] in, The enhanced fault factor; Bconf(⋅) is the enhanced mapping function for obfuscating fault boundaries; Fault factors; Enhanced loss for the first confusing fault boundary between bias faults and jamming faults; The second confusing fault boundary enhancement loss is used to differentiate between open-circuit faults and intermittent faults.

[0093] Joint discriminant features are generated based on the enhanced fault factor, the fault mechanism prototype response intensity vector, and the cross-phase reconstruction residual features:

[0094] ,

[0095] Where v represents the joint discriminant feature; Concat(⋅) is the feature concatenation operation; The enhanced fault factor; s is the fault mechanism prototype response intensity vector; For cross-phase reconstruction residual characteristics;

[0096] The joint discriminative features are input into the classification output layer to obtain the probability distribution of fault categories:

[0097] ,

[0098] Where ρ is the probability distribution vector of the fault category; Softmax(⋅) is the normalized exponential classification function; W y b is the weight matrix of the fault category classification layer; v is the joint discriminant feature; b y The bias vector for the fault category classification layer;

[0099] Determine the fault category prediction result based on the fault category probability distribution:

[0100] ,

[0101] Where y is the fault category prediction result; To obtain Category indexing operations that reach their maximum value; Let ρ be the probability value corresponding to the k-th type of fault in the fault category probability distribution vector ρ; k is the fault category index.

[0102] Determine the fault phase based on the cross-phase reconstruction residual:

[0103] ,

[0104] in, The result is the fault phase prediction. To obtain Phase indexing operation that reaches its maximum value; ph is the cross-phase reconstruction residual corresponding to the ph-th phase; ph is the phase sequence index, and ph∈{a,b,c};

[0105] The fault severity and diagnostic confidence are calculated based on the fault category probability distribution, the fault mechanism prototype response intensity vector, and the cross-phase reconstruction residual.

[0106] ,

[0107] in, The degree of failure; These are the weighting coefficients corresponding to the prototype response intensity of the fault mechanism; These are the weighting coefficients corresponding to the cross-phase reconstruction residuals; These are the weighting coefficients corresponding to the probabilities of different fault categories. The prototype response intensity of the j-th type of fault mechanism; For the fault phase prediction result ph ∗ The corresponding cross-phase reconstruction residual; This represents the probability value corresponding to the k-th type of fault.

[0108] ,

[0109] in, For diagnostic confidence; This is an operation that retrieves the maximum probability value from the probability distribution of fault categories; Let be the probability value corresponding to the k-th type of fault; Sigmoid(⋅) is the Sigmoid activation function; Fault phase prediction results The corresponding cross-phase reconstruction residual;

[0110] The total loss function during fault diagnosis model training is:

[0111] ,

[0112] in, This is the total loss function used during the training of the fault diagnosis model. Classify losses by fault type; For self-supervised reconstruction loss; To mitigate losses during operation; To maintain operating conditions and prevent losses; To obfuscate fault boundaries and increase total loss; Loss due to fault phase location; These are the weighting coefficients corresponding to the self-supervised reconstruction loss; The weighting coefficients corresponding to the loss mitigation under the working condition; The weighting coefficients corresponding to the operating condition holding losses; To obfuscate the fault boundaries, the weighting coefficients corresponding to the total loss are increased; The weighting coefficients corresponding to the fault phase location loss.

[0113] A computer-readable storage medium storing a computer program, which, when executed by a processor, enables a fault diagnosis method for a PMSM current sensor based on a cross-phase mask self-monitoring and fault mechanism prototype decoupling network.

[0114] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When executed by the processor, the program enables a fault diagnosis method for a PMSM current sensor based on a cross-phase mask self-monitoring and fault mechanism prototype decoupling network.

[0115] Beneficial effects

[0116] The present invention provides a PMSM current sensor fault diagnosis method based on cross-phase mask self-supervision and fault mechanism prototype decoupling network. Compared with the prior art, this method constructs multi-source time-series samples containing three-phase current, KCL physical residuals and phase current differences, and uses cross-phase mask self-supervision to reconstruct and learn the physical coupling relationship between the three-phase currents. Combined with multi-scale time-series coding, fault mechanism prototype decoupling, operating condition invariant adversarial constraints and confusion fault boundary enhancement mechanism, it realizes the joint output of PMSM current sensor fault category, fault phase, fault degree and diagnostic confidence.

[0117] This invention effectively overcomes the shortcomings of existing technologies, such as severe coupling between fault characteristics and operating disturbances under complex working conditions, insufficient ability to distinguish easily confused fault pairs, and poor interpretability of diagnostic results. It improves the accuracy, robustness, and cross-condition generalization ability of current sensor fault diagnosis under variable speed, variable load, and noise disturbance conditions.

[0118] The present invention has the following advantages:

[0119] (1) This invention proposes a cross-phase mask self-supervised reconstruction mechanism. By randomly masking current segments of phase A, phase B, or phase C, and reconstructing the masked phase current using the unmasked phase current and KCL physical consistency constraints, the model can learn the intrinsic coupling relationship between the three-phase currents outside of labeled fault samples. Compared with traditional direct classification methods, this mechanism can enhance the model's ability to perceive fault phase anomalies and improve the accuracy of fault phase localization.

[0120] (2) This invention designs a fault mechanism prototype decoupling module, which maps gain faults, bias faults, jamming faults, disconnection faults, and intermittent faults to learnable fault mechanism prototypes, and calculates the response intensity between the current sample and each type of fault mechanism prototype through prototype interactive attention. This design can enhance the correspondence between fault categories and fault formation mechanisms, and improve the model's ability to interpret diagnostic results.

[0121] (3) This invention introduces a condition-invariant adversarial constraint module, which decomposes the network latent variables into fault factors and condition factors, and suppresses the operating condition information such as speed and load in the fault factors through a gradient inversion layer, so as to effectively separate fault features from operating condition disturbances. This design can improve the generalization ability of the model under variable speed, variable load and unseen operating conditions.

[0122] (4) This invention constructs a fault boundary enhancement module for confusing faults, and designs inter-class interval constraints for bias faults and jamming faults, as well as open circuit faults and intermittent faults, so that easily confused fault pairs form clearer discrimination boundaries in the fault factor space. This design can reduce the misjudgment rate of easily confused faults and improve the reliability of current sensor fault diagnosis under complex operating conditions.

[0123] (5) This invention not only outputs the fault category, but also outputs the fault phase, fault degree and diagnostic confidence, which overcomes the problem that traditional fault diagnosis methods only output the fault category and lack engineering interpretability, which is beneficial to subsequent fault alarm, fault-tolerant control and operation and maintenance decision-making. Attached Figure Description

[0124] Figure 1 This is a schematic diagram of the method flow of the present invention;

[0125] Figure 2 The figure shows the comparison results of the fault diagnosis accuracy of the method proposed in this invention and the comparative method under two transient conditions. Detailed Implementation

[0126] To provide a better understanding of the structural features and effects achieved by the present invention, a detailed description is provided below, accompanied by preferred embodiments and accompanying drawings:

[0127] This embodiment was conducted on a permanent magnet synchronous motor drive system experimental platform, which includes a surface-mount permanent magnet synchronous motor, a three-phase voltage source inverter, current sensors, a rotor position detection unit, a DC power supply, and a loading device. The three-phase stator current of the permanent magnet synchronous motor is acquired by A-phase, B-phase, and C-phase current sensors. The current signals are used for subsequent sliding window segmentation, multi-source time-series sample construction, cross-phase mask self-supervised reconstruction, and fault diagnosis model training.

[0128] This embodiment sets up steady-state operating conditions, speed step operating conditions, and load change operating conditions to verify the fault diagnosis capability of the method of the present invention under different operating conditions. Specifically, the speed step operating condition is set to 150 r / min to 350 r / min with a load torque of 5 N·m; the load change operating condition is set to a speed of 300 r / min with the load torque abruptly changing from 5 N·m to 10 N·m. The sampling frequency is 20 kHz, and an overlapping sliding window is used to divide the three-phase stator current. The window length is set to 1000 sampling points, and the sliding step size is set to 250 sampling points.

[0129] This embodiment diagnoses five typical faults of the current sensor for permanent magnet synchronous motors, including gain fault, bias fault, open circuit fault, jamming fault, and intermittent fault.

[0130] Gain faults manifest as a proportional deviation of the current sensor output amplitude from the actual current; bias faults manifest as a constant offset superimposed on the current sensor output; open-circuit faults manifest as the current sensor output approaching zero; jamming faults manifest as the current sensor output remaining at an abnormal constant value; intermittent faults manifest as the current sensor output alternating between normal and abnormal states. These faults are injected into the current channels of phase A, phase B, or phase C, respectively, to verify the method's ability to jointly output fault type, fault phase, fault severity, and diagnostic confidence.

[0131] like Figure 1 As shown, the fault diagnosis method for PMSM current sensors based on cross-phase mask self-supervision and fault mechanism prototype decoupling network includes the following steps:

[0132] (1) Data acquisition and construction of multi-source time series samples

[0133] The stator current signals of phases A, B, and C during the operation of a permanent magnet synchronous motor are acquired and segmented using an overlapping sliding window. Let the current values ​​of phase A, phase B, and phase C corresponding to the i-th sampling point in the current sliding window be respectively... , and , where i is the sampling point number within the current sliding window.

[0134] Constructing the KCL physical residual sequence based on the three-phase current conservation relationship:

[0135] ,

[0136] in, This represents the KCL physical residual corresponding to the i-th sampling point within the current sliding window. This represents the A-phase current value corresponding to the i-th sampling point within the current sliding window. This represents the B-phase current value corresponding to the i-th sampling point within the current sliding window. This represents the C-phase current value corresponding to the i-th sampling point within the current sliding window; i is the sampling point number within the current sliding window.

[0137] Construct a phase current difference sequence based on the three-phase current sequence within the current sliding window:

[0138] ,

[0139] in, This represents the phase current difference value of the i-th sampling point within the current sliding window; This represents the ph-th phase current value corresponding to the i-th sampling point within the current sliding window. ph is the phase current value corresponding to the i-1th sampling point in the current sliding window; ph is the phase sequence index, and ph∈{a,b,c}; i is the sampling point number in the current sliding window;

[0140] Multi-source time series samples are constructed from three-phase currents, KCL physical residuals, and phase current differences:

[0141] ,

[0142] in, This is the multi-source time-series sample vector corresponding to the i-th sampling point within the current sliding window; This represents the A-phase current value corresponding to the i-th sampling point within the current sliding window. This represents the B-phase current value corresponding to the i-th sampling point within the current sliding window. This represents the C-phase current value corresponding to the i-th sampling point within the current sliding window. This represents the KCL physical residual corresponding to the i-th sampling point within the current sliding window. This represents the A-phase current difference value corresponding to the i-th sampling point within the current sliding window; This represents the B-phase current difference value corresponding to the i-th sampling point within the current sliding window; is the C-phase current differential value corresponding to the i-th sampling point in the current sliding window; i is the sampling point number in the current sliding window.

[0143] (2) Self-supervised reconstruction of phase mask

[0144] A phase-crossing mask is performed on the multi-source time-series samples within the current sliding window, randomly masking at least one phase current segment from phases A, B, or C, and reconstructing the masked phase current using the unmasked phase current and its physical coupling information. The phase-crossing masking process satisfies:

[0145] ,

[0146] in, The sample consists of multi-source time series samples after masking; M is the phase masking matrix; X is the original multi-source time series sample within the current sliding window; ⊙ represents the Hadamard product;

[0147] The masked multi-source time series samples are input into the cross-phase reconstruction network to obtain the reconstructed multi-source time series samples:

[0148] ,

[0149] in, The reconstructed multi-source time series samples output by the cross-phase reconstruction network; For cross-phase reconstruction network mapping function; These are multi-source time-series samples after masking.

[0150] The training constraints for cross-phase mask self-supervised reconstruction consist of the reconstruction error and KCL consistency:

[0151] ,

[0152] in, For self-supervised reconstruction loss; For cross-phase mask reconstruction loss; This is due to KCL consistency loss; These are the weighting coefficients corresponding to the KCL consistency loss. Through this process, the model can learn the mutual reconstruction law between the three-phase currents. When a sensor in a certain phase fails, its cross-phase reconstruction residual will increase, thus providing a basis for fault phase location.

[0153] (3) Construction of fault diagnosis model

[0154] The current sensor fault diagnosis model in this embodiment includes a multi-scale timing coding module, a fault mechanism prototype decoupling module, an invariant operating condition countermeasure constraint module, and a confused fault boundary enhancement module.

[0155] First, the multi-source time-series samples within the current sliding window are input into short-scale, medium-scale, and long-scale time-series coding pathways respectively to obtain multi-scale time-series features:

[0156] ,

[0157] in, It represents multi-scale temporal features; For feature splicing operation; F s For short-scale features; F m Mesoscale features; F l is a long-scale feature; U is the scale alignment function.

[0158] Then, set up a set of fault mechanism prototypes:

[0159] ,

[0160] Where P is the set of fault mechanism prototypes; This is a prototype of a gain fault. This is a prototype of a bias fault. This is a prototype of a stuck fault; This is a prototype of a wire breakage fault; This is a prototype of an intermittent fault.

[0161] Using the aforementioned set of fault mechanism prototypes as the query term and multi-scale temporal features as the key and value, prototype interaction attention calculation is performed:

[0162] ,

[0163] in, The interaction features represent the fault mechanism prototypes; Attention is the attention calculation function; Q is the query term in the attention calculation; P is the set of fault mechanism prototypes; K is the key in the attention calculation; and V is the value in the attention calculation. It represents multi-scale temporal features;

[0164] The latent variables are further decomposed into failure factors and operating condition factors:

[0165] ,

[0166] in, Fault factors; D is the operating condition factor. z For decoupling mapping functions of latent variables; It represents multi-scale temporal features; Interactive features of the fault mechanism prototype;

[0167] During model training, invariant operating condition constraints and obfuscated fault boundary enhancement constraints are introduced to minimize the removal of operating condition information such as speed and load from fault factors, and to enhance the feature intervals between bias faults and jamming faults, and between open circuit faults and intermittent faults. The total loss function during fault diagnosis model training is:

[0168] ,

[0169] in, This is the total loss function used during the training of the fault diagnosis model. Classify losses by fault type; For self-supervised reconstruction loss; To mitigate losses during operation; To maintain the loss in operating conditions; To obfuscate fault boundaries and increase total loss; Loss due to fault phase location; These are the weighting coefficients corresponding to the self-supervised reconstruction loss; The weighting coefficients corresponding to the loss mitigation under the working condition; The weighting coefficients corresponding to the operating condition holding losses; To obfuscate the fault boundaries, the weighting coefficients corresponding to the total loss are increased; The weighting coefficients corresponding to the fault phase location loss.

[0170] (4) Joint diagnosis of current sensor faults

[0171] Based on the joint discrimination characteristics of fault factors, fault mechanism prototype response intensity, and cross-phase reconstruction residual generation:

[0172] ,

[0173] in, For joint discriminant features; For feature splicing operations; s is the fault factor; s is the response intensity vector composed of the prototype response intensities of various fault mechanisms; For cross-phase reconstruction residual characteristics;

[0174] The joint discriminative features are input into the classification output layer to obtain the probability distribution of fault categories:

[0175] ,

[0176] Where ρ is the probability distribution vector of the fault category; Softmax is the normalized exponential classification function; The weight matrix for the fault category classification layer; For joint discriminant features; The bias vector for the fault category classification layer;

[0177] The fault category prediction results are as follows:

[0178] ,

[0179] Where y is the fault category prediction result; To obtain Category indexing operations that reach their maximum value; Let ρ be the probability value corresponding to the k-th type of fault in the fault category probability distribution vector ρ; k is the fault category index.

[0180] The fault phase prediction results are as follows:

[0181] ,

[0182] in, The result is the fault phase prediction. To obtain Phase indexing operation that reaches its maximum value; ph is the cross-phase reconstruction residual corresponding to the ph-th phase; ph is the phase sequence index, and ph∈{a,b,c}.

[0183] Therefore, the model ultimately outputs the current sensor fault category, fault phase, fault severity, and diagnostic confidence level.

[0184] 4. Experimental results, such as Figure 2 As shown.

[0185] This embodiment compares the method proposed in this invention with methods such as AMFCN, CNN-LSTM, 1D-LSTM, MSCNN, and LTFAFormer. The test conditions include speed step change conditions and load change conditions. The comparison results are shown in Table 1.

[0186] Table 1. Comparison of fault diagnosis accuracy between the method of this invention and the comparative method under two transient conditions.

[0187]

[0188] As shown in Table 1, the current sensor fault diagnosis model proposed in this invention achieves the best fault diagnosis accuracy under typical transient speed and transient load conditions.

[0189] from Figure 2 As shown in Table 1, under step speed conditions, the fault diagnosis accuracy of the proposed method is 98.92%, higher than AMFCN, CNN-LSTM, 1D-LSTM, MSCNN, and LTFAFormer; under sudden load conditions, the fault diagnosis accuracy of the proposed method is 98.77%, also higher than the aforementioned comparative methods. Experimental results demonstrate that the proposed method effectively improves the accuracy and robustness of PMSM current sensor fault diagnosis under complex transient conditions through cross-phase mask self-supervised reconstruction, fault mechanism prototype decoupling, condition-invariant adversarial constraints, and obfuscated fault boundary enhancement mechanisms.

[0190] In practical PMSM drive systems, there are clear electromagnetic coupling and current conservation relationships among the three-phase stator currents. When a current sensor in one phase fails, the current signal of that phase deviates from the normal coupling mode characterized by the other two phase currents. This invention learns the mutual reconstruction rules between the three-phase currents through cross-phase mask self-supervised reconstruction, enabling the model to identify abnormal phases that "cannot be reasonably reconstructed from the other phases," thereby improving the fault phase location capability.

[0191] Meanwhile, gain faults, bias faults, open-circuit faults, jamming faults, and intermittent faults have different fault formation mechanisms. This invention establishes fault mechanism prototypes, enabling clear correspondences between different fault categories in the prototype response space; and by obfuscating the fault boundary enhancement module, it creates clearer distinctions between bias faults and jamming faults, and between open-circuit faults and intermittent faults. Therefore, the diagnostic results of this invention are consistent with the actual fault type, fault phase, and fault severity.

[0192] This invention constructs multi-source time-series samples containing three-phase current, KCL physical residuals, and phase current differences, enabling the input data to simultaneously include amplitude information, physical residual information, and dynamic change information. Through a cross-phase mask self-supervised reconstruction mechanism, the model can learn the inherent physical coupling relationship between the three-phase currents. A multi-scale time-series coding module allows the model to simultaneously extract transient fault features, persistent fault features, and intermittent switching features. A fault mechanism prototype decoupling module establishes a correspondence between fault categories and fault formation mechanisms. An invariant operating condition constraint module separates fault factors from operating condition information such as speed and load. A fault boundary obfuscation enhancement module improves the ability to distinguish easily confused fault pairs. Therefore, this invention can achieve joint output of fault category, fault phase, fault severity, and diagnostic confidence of a PMSM current sensor under varying speed, varying load, and noise disturbance conditions.

[0193] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.

Claims

1. A fault diagnosis method for PMSM current sensors based on cross-phase mask self-monitoring and fault mechanism prototype decoupling network, characterized in that, Includes the following steps: 11) Data acquisition and construction of multi-source time series samples: Acquire the three-phase stator current signals of permanent magnet synchronous motor under different operating conditions, perform sliding window segmentation on the three-phase stator current signals, and construct multi-source time series samples containing three-phase current, KCL physical residual and phase current difference. 12) Cross-phase mask self-supervised reconstruction: Perform cross-phase masking on multi-source time series samples, randomly mask at least one phase current segment in phase A, phase B or phase C, reconstruct the masked phase current using the unmasked phase current and its physical coupling information, and form a self-supervised reconstruction task based on the reconstruction error and KCL consistency constraints. 13) Construction of fault diagnosis model: Establish a current sensor fault diagnosis model based on cross-phase mask self-supervision and fault mechanism prototype decoupling network; 14) Joint diagnosis of current sensor faults: Input multi-source time-series samples into the current sensor fault diagnosis model, and through multi-scale time-series feature extraction, fault mechanism prototype response calculation, decoupling of fault factors and operating condition factors, and enhanced processing of obfuscated fault boundaries, jointly output the current sensor fault category, fault phase, fault degree and diagnostic confidence.

2. The PMSM current sensor fault diagnosis method based on cross-phase mask self-monitoring and fault mechanism prototype decoupling network as described in claim 1, characterized in that, The data acquisition and multi-source time series sample construction includes the following steps: 21) Obtain the three-phase stator current signal during the operation of the permanent magnet synchronous motor. The three-phase stator current signal includes the A-phase current, B-phase current and C-phase current. 22) The three-phase stator current signal is segmented using an overlapping sliding window to obtain the three-phase current sequence within the current sliding window; 23) Construct the KCL physical residual sequence based on the three-phase current sequence within the current sliding window: , in, This represents the KCL physical residual corresponding to the i-th sampling point within the current sliding window. This represents the A-phase current value corresponding to the i-th sampling point within the current sliding window. This represents the B-phase current value corresponding to the i-th sampling point within the current sliding window. This represents the C-phase current value corresponding to the i-th sampling point within the current sliding window; i is the sampling point number within the current sliding window. 24) Construct a phase current differential sequence based on the three-phase current sequence within the current sliding window: , in, This represents the phase current difference value of the i-th sampling point within the current sliding window; This represents the ph-th phase current value corresponding to the i-th sampling point within the current sliding window. ph is the phase current value corresponding to the i-1th sampling point in the current sliding window; ph is the phase sequence index, and ph∈{a,b,c}; i is the sampling point number in the current sliding window; 25) Construct multi-source time series samples based on three-phase current sequences, KCL physical residual sequences, and phase current difference sequences: , in, This is the multi-source time-series sample vector corresponding to the i-th sampling point within the current sliding window; This represents the A-phase current value corresponding to the i-th sampling point within the current sliding window. This represents the B-phase current value corresponding to the i-th sampling point within the current sliding window. This represents the C-phase current value corresponding to the i-th sampling point within the current sliding window. This represents the KCL physical residual corresponding to the i-th sampling point within the current sliding window. This represents the A-phase current difference value corresponding to the i-th sampling point within the current sliding window; This represents the B-phase current difference value corresponding to the i-th sampling point within the current sliding window; is the C-phase current differential value corresponding to the i-th sampling point in the current sliding window; i is the sampling point number in the current sliding window.

3. The PMSM current sensor fault diagnosis method based on cross-phase mask self-monitoring and fault mechanism prototype decoupling network as described in claim 1, characterized in that, The cross-phase mask self-supervised reconstruction includes the following steps: 31) Generate a phase-crossing mask matrix for the multi-source time-series samples within the current sliding window, and use the phase-crossing mask matrix to mask the multi-source time-series samples: , in, The sample consists of multi-source time series samples after masking; M is the phase masking matrix; X is the original multi-source time series sample within the current sliding window; ⊙ represents the Hadamard product; 32) Input the masked multi-source time series samples into the cross-phase reconstruction network to obtain the reconstructed multi-source time series samples: , in, The reconstructed multi-source time series samples output by the cross-phase reconstruction network; For cross-phase reconstruction network mapping function; These are multi-source time-series samples after masking. 33) Construct the cross-phase mask reconstruction loss based on the reconstruction error of the masked region: , in, M is the phase mask reconstruction loss; M is the phase mask matrix; X is the original multi-source time series sample within the current sliding window; The output of the cross-phase reconstruction network represents the reconstructed multi-source time-series samples; ⊙ represents the Hadamard product; Represents the L2 norm; This represents the number of masked elements within the current sliding window. 34) Construct the KCL consistency loss based on the reconstructed three-phase currents: , in, For KCL consistency loss; L is the total number of sampling points in the current sliding window; i is the sampling point number in the current sliding window; This is the reconstructed phase A current value corresponding to the i-th sampling point within the current sliding window; This represents the reconstructed B-phase current value corresponding to the i-th sampling point within the current sliding window. This represents the reconstructed C-phase current value corresponding to the i-th sampling point within the current sliding window. 35) Construct a self-supervised reconstruction loss based on the phase mask reconstruction loss and the KCL consistency loss: , in, For self-supervised reconstruction loss; For cross-phase mask reconstruction loss; This is due to KCL consistency loss; The weighting coefficients corresponding to the KCL consistency loss.

4. The PMSM current sensor fault diagnosis method based on cross-phase mask self-monitoring and fault mechanism prototype decoupling network as described in claim 1, characterized in that, The construction of the fault diagnosis model includes the following steps: 41) The fault diagnosis model for the current sensor is defined as including a multi-scale timing coding module, a fault mechanism prototype decoupling module, an invariant operating condition countermeasure constraint module, and a confused fault boundary enhancement module. 42) Set up a multi-scale timing coding module, The multi-scale temporal coding module includes short-scale temporal coding paths, medium-scale temporal coding paths, and long-scale temporal coding paths. The multi-source time-series samples within the current sliding window are input into the short-scale, medium-scale, and long-scale time-series coding pathways, respectively, to obtain short-scale, medium-scale, and long-scale features: , in, It is a short-scale feature; This represents a short-scale temporal coding path; X represents multi-source temporal samples within the current sliding window. , in, It is a mesoscale feature; This is a mesoscale temporal coding path; , in, It is a long-scale feature; It is a long-scale temporal coding path; , in, For multi-scale temporal features; Concat(⋅) is the feature concatenation operation; It is a short-scale feature; It is a mesoscale feature; For long-scale features; U(·) is the scale alignment function; 43) Set up a prototype decoupling module for the fault mechanism. Set up a learnable set of fault mechanism prototypes, including gain fault prototypes, bias fault prototypes, jam fault prototypes, disconnection fault prototypes, and intermittent fault prototypes: , Where P is the set of fault mechanism prototypes; This is a prototype of a gain fault. This is a prototype of a bias fault. This is a prototype of a stuck fault; This is a prototype of a wire breakage fault. This is a prototype of an intermittent fault. Using a set of fault mechanism prototypes as the query term and multi-scale temporal features as the key and value, perform prototype interaction attention computation: , in, Interactive features of the fault mechanism prototype; Let be the attention calculation function; Q be the query term in the attention calculation; P be the set of fault mechanism prototypes; K be the key in the attention calculation; and V be the value in the attention calculation. It represents multi-scale temporal features; Calculate the prototype response strength between the current sample and various fault mechanism prototypes: , in, The prototype response strength between the current sample and the prototype of the j-th type of fault mechanism; This is the function for calculating cosine similarity. The prototype interaction features are the prototypes corresponding to the j-th type of fault mechanism prototype. Let be the prototype of the j-th type of fault mechanism; j is the index of the fault mechanism prototype, and j∈{G,B,C,O,I}, where G represents gain fault, B represents bias fault, C represents jam fault, O represents disconnection fault, and I represents intermittent fault. 44) Set up a module for invariant operating conditions and counteracting constraints. The latent variables of the fault diagnosis model are decomposed into fault factors and operating condition factors: , in, Fault factor; D is the operating condition factor. z (·) is the latent variable decoupling mapping function; It represents multi-scale temporal features; Interactive features of the fault mechanism prototype; Fault factors are used to predict the fault type and fault phase of the current sensor, and the operating condition information in the fault factors is suppressed by a gradient inversion layer. , in, The loss function is defined as the operating condition resistance loss; CE(·) is the cross-entropy loss function. For the operating condition discriminator; GRL(·) is the gradient inversion layer; d represents the fault factor; d represents the operating condition label corresponding to the current sample. Predicting operating condition labels using operating condition factors allows operating condition information to be concentrated within these factors: , in, To maintain the loss in operating conditions; For operating condition classifier; d represents the operating condition factor; d represents the operating condition label corresponding to the current sample. 45) Configure the obfuscated fault boundary enhancement module. Construct a first confusing fault boundary enhancement loss for bias faults and jamming faults: , in, The first confusing fault boundary enhancement loss is used between bias faults and jamming faults; max(·) is the maximum value function; The minimum characteristic interval between bias faults and jamming faults; The class center of the biased fault sample in the fault factor space; The class center of the stuck fault sample in the fault factor space; Represents the L2 norm; A second confusion fault boundary enhancement loss is constructed for open-circuit faults and intermittent faults: , in, The second confusing fault boundary enhancement loss is used to differentiate between open-circuit faults and intermittent faults. The minimum characteristic interval between open-circuit faults and intermittent faults; The class center of the disconnection fault sample in the fault factor space; The class center of the intermittent fault sample in the fault factor space; Construct the total confusion fault boundary enhancement loss based on the first confusion fault boundary enhancement loss and the second confusion fault boundary enhancement loss: , in, To obfuscate fault boundaries and increase total loss; Enhanced loss for the first confusing fault boundary between bias faults and jamming faults; The second confusing fault boundary enhancement loss is used to distinguish between open-circuit faults and intermittent faults.

5. The PMSM current sensor fault diagnosis method based on cross-phase mask self-monitoring and fault mechanism prototype decoupling network as described in claim 1, characterized in that, The joint diagnosis of current sensor faults includes the following steps: 51) Input multi-source time-series samples into the multi-scale time-series coding module, extract short-scale features, medium-scale features, and long-scale features through short-scale time-series coding pathways, medium-scale time-series coding pathways, and long-scale time-series coding pathways respectively, and obtain multi-scale time-series features through scale alignment and feature concatenation: 52) Input the multi-scale temporal features into the fault mechanism prototype decoupling module, use the fault mechanism prototype set as the query term, use the multi-scale temporal features as the key and value, perform prototype interaction attention calculation, and obtain the fault mechanism prototype response intensity vector. , Where s is the fault mechanism prototype response intensity vector; sG is the gain fault prototype response intensity; sB is the bias fault prototype response intensity; sC is the jam fault prototype response intensity; sO is the open circuit fault prototype response intensity; and sI is the intermittent fault prototype response intensity. 53) Input the multi-scale time series features and the fault mechanism prototype response intensity vector into the working condition invariant adversarial constraint module to obtain the fault factor and working condition factor, and use the fault factor as the main discriminant feature for subsequent fault category identification and fault phase localization. 54) Input the fault factor into the confusion fault boundary enhancement module. Based on the first confusion fault boundary enhancement loss between bias faults and jammed faults, and the second confusion fault boundary enhancement loss between open circuit faults and intermittent faults, perform boundary enhancement processing on the feature distribution of the fault factor to obtain the enhanced fault factor: , in, The enhanced fault factor; Bconf(⋅) is the enhanced mapping function for obfuscating fault boundaries; Fault factor; Enhanced loss for the first confusing fault boundary between bias faults and jamming faults; The second confusing fault boundary enhancement loss is used to differentiate between open-circuit faults and intermittent faults. 55) Generate joint discriminant features based on the enhanced fault factor, the fault mechanism prototype response intensity vector, and the cross-phase reconstruction residual features: , Where v represents the joint discriminant feature; Concat(⋅) is the feature concatenation operation; The enhanced fault factor; s is the fault mechanism prototype response intensity vector; For cross-phase reconstruction residual characteristics; 56) Input the joint discriminative features into the classification output layer to obtain the fault category probability distribution: , Where ρ is the probability distribution vector of the fault category; Softmax(⋅) is the normalized exponential classification function; W y b is the weight matrix of the fault category classification layer; v is the joint discriminant feature; b y The bias vector for the fault category classification layer; 57) Determine the fault category prediction result based on the fault category probability distribution: , Where y is the fault category prediction result; To obtain Category indexing operations that reach their maximum value; Let ρ be the probability value corresponding to the k-th type of fault in the fault category probability distribution vector ρ; k is the fault category index. 58) Determine the fault phase based on the cross-phase reconstruction residual: , in, The result is the fault phase prediction. To obtain Phase indexing operation that reaches its maximum value; ph is the cross-phase reconstruction residual corresponding to the ph-th phase; ph is the phase sequence index, and ph∈{a,b,c}; 59) Calculate the fault severity and diagnostic confidence based on the fault category probability distribution, the fault mechanism prototype response intensity vector, and the cross-phase reconstruction residual: , in, The degree of failure; These are the weighting coefficients corresponding to the prototype response intensity of the fault mechanism; These are the weighting coefficients corresponding to the cross-phase reconstruction residuals; These are the weighting coefficients corresponding to the probabilities of different fault categories. The prototype response intensity of the j-th type of fault mechanism; For the fault phase prediction result ph ∗ The corresponding cross-phase reconstruction residual; This represents the probability value corresponding to the k-th type of fault. , in, For diagnostic confidence; This is an operation that retrieves the maximum probability value from the probability distribution of fault categories; Let be the probability value corresponding to the k-th type of fault; Sigmoid(⋅) is the Sigmoid activation function; Fault phase prediction results The corresponding cross-phase reconstruction residual; The total loss function during fault diagnosis model training is: , in, This is the total loss function used during the training of the fault diagnosis model. Classify losses by fault type; For self-supervised reconstruction loss; To mitigate losses during operation; To maintain the loss in operating conditions; To obfuscate fault boundaries and increase total loss; Loss due to fault phase location; These are the weighting coefficients corresponding to the self-supervised reconstruction loss; The weighting coefficients corresponding to the loss mitigation under the working condition; The weighting coefficients corresponding to the operating condition holding losses; To obfuscate the fault boundaries, the weighting coefficients corresponding to the total loss are increased; The weighting coefficients corresponding to the fault phase location loss.

6. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, enables the PMSM current sensor fault diagnosis method based on a cross-phase mask self-supervision and fault mechanism prototype decoupling network as described in any one of claims 1-5.

7. A computer device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it can implement the PMSM current sensor fault diagnosis method based on cross-phase mask self-supervision and fault mechanism prototype decoupling network as described in any one of claims 1-5.