Dtp-pmsm online open-circuit fault diagnosis method based on semi-supervised learning and lightweight neural network

CN122901726APending Publication Date: 2026-10-13HARBIN ENG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611052938.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-15
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0007]为解决背景技术存在的不足,本发明提供基于半监督学习与轻量化神经网络的DTP-PMSM在线开路故障诊断方法,其能够解决现有技术中故障样本标注成本高、未知故障易误判、深度模型难以在DSP端实时部署的问题,实现少标签条件下的高精度开路故障诊断、未知故障可靠拒识以及嵌入式边缘端实时运行

Benefits of technology

[0027]1、本发明采用TS-Match半监督学习框架,能够充分利用大量无标签样本辅助模型训练,降低了对大量带标签故障样本的依赖,在少量标签条件下仍能获得高精度的诊断模型;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122901726A_ABST
    Figure CN122901726A_ABST
Patent Text Reader

Abstract

The application relates to a DTP-PMSM online open-circuit fault diagnosis method based on semi-supervised learning and a lightweight neural network, and relates to the technical field of motor drive system fault diagnosis. Multi-condition six-phase current data are collected, characteristic vectors are obtained through sliding window segmentation and VSD transformation; a TS-Match semi-supervised framework is built to train a lightweight MLP network, and supervised loss and unsupervised consistency loss are fused; a two-stage OOD rejection mechanism is designed to identify unknown faults; after model pruning, fine-tuning and quantization, the model is deployed to a DSP; current is collected online periodically, VSD transformation, model reasoning and fault identification are sequentially completed, and health, known or unknown fault results are output. The application can solve the problems in the prior art, such as high fault sample labeling cost, easy misjudgment of unknown faults and difficulty in real-time deployment of deep models on a DSP end, and realizes high-precision open-circuit fault diagnosis under a few-label condition, reliable rejection of unknown faults and real-time operation of an embedded edge end.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fault diagnosis technology for motor drive systems, specifically to the DTP-PMSM online open-circuit fault diagnosis method based on semi-supervised learning and lightweight neural networks. Background Technology

[0002] Multiphase permanent magnet synchronous motors (PMSMs) are widely used in applications with high requirements for drive system safety, such as aerospace, marine propulsion, robotics, and electric vehicles, due to their high power density, high reliability, and low torque ripple. Among them, the dual three-phase PMSM (DTP-PMSM) consists of two sets of three-phase windings, spatially separated by 30° electrical angles, with their neutral points isolated from each other. It combines the structural similarity of traditional three-phase motors with the redundant operation advantages of multiphase motors.

[0003] Open-circuit faults are common electrical faults in DTP-PMSM drive systems, and can occur in the motor stator windings, power switching devices, etc. Because multiphase motors contain more power electronic switches, open-circuit faults are more likely to occur under harsh operating conditions, long-term operation, or insufficient maintenance. After a fault occurs, the system may experience problems such as current distortion, abnormal noise, increased vibration, and torque pulsation. In high-reliability applications, the drive system needs to continue operating after a fault, thus placing higher demands on the timeliness, accuracy, and robustness of online fault diagnosis.

[0004] Existing motor fault diagnosis methods can generally be categorized into analytical model-based methods, signal processing-based methods, and data-driven methods. Specifically: analytical model-based methods rely on precise mathematical models, identifying faults through the deviation between measured and estimated values; however, their effectiveness is significantly affected by model accuracy, parameter variations, and operating condition disturbances. Signal processing-based methods can extract fault features from signals such as voltage and current, offering fast processing speeds; however, feature design relies on expert experience, and their generalization ability is limited under dynamic operating conditions, multiple fault categories, and noise interference. Data-driven methods, especially deep learning methods, can automatically learn the mapping relationship between input signals and fault modes, achieving high diagnostic accuracy, but typically require a large number of labeled samples.

[0005] However, in real-world engineering scenarios, it is difficult to collect and label a large number of open-circuit fault samples. When training deep learning diagnostic models with only a small number of labeled samples, the models are prone to overfitting and struggle to maintain stable diagnostic performance under different speeds, loads, and complex disturbances. Furthermore, existing fault diagnosis methods often focus on known fault categories. For unknown faults not present in the training set, such as sensor bias, sensor zeroing, multiple switch faults, inter-turn short circuits, and coupling faults, there is a lack of reliable rejection mechanisms. This can easily lead to misclassifying unknown faults as known fault categories, resulting in inappropriate fault handling.

[0006] Furthermore, if deep learning diagnostic models are directly deployed into motor controllers, they are easily limited by the computing power, storage space, and real-time task scheduling of edge controllers such as DSPs. When the model size is too large, it increases online inference time, consumes a large amount of control resources, and affects the coordinated operation of fault diagnosis and motor control tasks. Therefore, there is an urgent need for a DTP-PMSM online open-circuit fault diagnosis method that can make full use of a small number of labeled samples and a large number of unlabeled samples, has the ability to reject unknown faults, and can run in real time on a DSP controller. Summary of the Invention

[0007] To address the shortcomings of the existing technologies, this invention provides an online open-circuit fault diagnosis method based on semi-supervised learning and lightweight neural networks, namely DTP-PMSM. This method can solve the problems of high cost of fault sample labeling, easy misjudgment of unknown faults, and difficulty in deploying deep models in real time on DSPs in the existing technologies. It can achieve high-precision open-circuit fault diagnosis under conditions of few labels, reliable rejection of unknown faults, and real-time operation on embedded edge devices.

[0008] To achieve the above objectives, the present invention adopts the following technical solution: a DTP-PMSM online open-circuit fault diagnosis method based on semi-supervised learning and lightweight neural networks, comprising the following steps:

[0009] Step S1, Multi-condition data acquisition and preprocessing: Construct a DTP-PMSM test system to collect six-phase stator current and rotor position data under different speeds and loads. The data covers healthy conditions, various known fault conditions and several unknown fault conditions. After dividing the six-phase currents according to the equal-interval sliding window method, VSD transformation is performed. The α-β and z1-z2 subspace current flattening is selected as feature vectors as network input.

[0010] Step S2, TS-Match semi-supervised model training: Construct the TS-Match semi-supervised learning framework, use a lightweight MLP as the diagnostic network, adopt a total loss function consisting of supervised cross-entropy loss and unsupervised consistency loss, and train the diagnostic network using both labeled and unlabeled samples.

[0011] Step S3: Construct a two-stage OOD rejection mechanism: Extract feature embeddings of known categories based on the trained diagnostic network, calculate class prototypes for each category, and establish a two-stage OOD rejection mechanism consisting of initial screening with classification confidence in the first stage and feature space distance verification in the second stage.

[0012] Step S4, Model Compression and DSP Adaptation: The trained diagnostic network is pruned, fine-tuned, and quantized and compressed sequentially to obtain a lightweight diagnostic model adapted to the DSP controller.

[0013] Step S5, Real-time Diagnosis and Scheduling on the DSP: The DSP controller collects six-phase stator current signals in real time, updates the samples to be diagnosed according to a fixed sliding window, and when diagnosis is triggered, performs VSD transformation, lightweight MLP model inference and two-stage OOD rejection judgment on the data in the current window in sequence, and outputs the health status, known open circuit fault category or unknown fault flag.

[0014] Furthermore, in step S1, the VSD transformation maps the current in the six-phase stationary coordinate system to three subspaces: α-β, z1-z2, and o1-o2. The fundamental wave and the 12n±1st harmonic are distributed in the α-β subspace, and the 6n±1st harmonic is distributed in the z1-z2 subspace. The current components in the α-β subspace and the z1-z2 subspace are selected, and the corresponding components in each window are flattened into 128-dimensional feature vectors.

[0015] Furthermore, in step S2, each training batch contains both labeled and unlabeled samples, and the total loss function is expressed as follows:

[0016]

[0017] In the formula, Supervised cross-entropy loss for labeled samples, For unlabeled samples, the consistency regularization loss is... This represents the unsupervised loss weight.

[0018] Furthermore, the calculation process of the unsupervised consistency loss is as follows: weak enhancement is applied to the unlabeled sample to generate pseudo-labels, and strong enhancement is applied to the same unlabeled sample to make the prediction result of the strongly enhanced sample consistent with the pseudo-label. The weak enhancement includes random translation and random noise, and the strong enhancement includes enhanced random translation, enhanced random noise, random amplitude scaling and random temporal masking.

[0019] Furthermore, the pseudo-label generation employs an adaptive confidence threshold. Its dynamic adjustment strategy is as follows: the initial value is set to 0.95, and if the pseudo-label utilization rate is less than 30% during the training period, then... The reduction is 1.5%, and if it reaches 70%, then... Increased by 1.5%, and The constraint is in the range of 0.9 to 0.995.

[0020] Furthermore, in step S2, the lightweight MLP network structure includes an input layer, a single hidden layer, and an output layer. The input layer receives the feature vector after VSD transformation and flattening. The single hidden layer is a fully connected layer containing 32 neurons and uses the ReLU activation function to complete feature extraction. The output layer is a fully connected classification layer that outputs the health status and the probability of each known fault category after Softmax activation.

[0021] Furthermore, in step S3, the judgment rule of the two-stage OOD rejection mechanism is as follows:

[0022] The first stage is the initial screening of classification confidence: the input sample is processed by the diagnostic model to obtain the Softmax classification probability. If the maximum classification probability is greater than or equal to the confidence threshold... If the maximum classification probability is lower than the confidence threshold, then the sample is classified as a known distribution sample and the corresponding fault category is output. Then proceed to the second stage;

[0023] The second stage is feature distance verification: Calculate the Euclidean distance between the embedding vector of the sample and the prototype of each known class. If the minimum distance is greater than the distance threshold... If the minimum distance is less than or equal to the distance threshold, then the sample is determined to be an out-of-distribution sample, i.e., an unknown fault. If so, it will be classified into the nearest known category.

[0024] Furthermore, in step S4, the model compression process specifically includes: first, performing L1 unstructured pruning on the weights of the fully connected layer to achieve model sparsity, with a pruning ratio of 40%; second, fine-tuning the pruned sparse model using a low learning rate of 0.0001 to adapt the model to the sparse weight structure, restoring and maintaining diagnostic performance; and third, quantizing the fine-tuned model parameters and deploying them to the DSP controller without increasing additional hardware resources.

[0025] Furthermore, in step S5, the diagnostic triggering mechanism triggers a diagnosis once every two electrical cycles at the zero-phase point. When the diagnosis is triggered, the update of the sample array to be diagnosed is paused, and the array update is resumed after the diagnosis is completed.

[0026] Compared with the prior art, the beneficial effects of the present invention are:

[0027] 1. This invention adopts the TS-Match semi-supervised learning framework, which can make full use of a large number of unlabeled samples to assist model training, reduce the dependence on a large number of labeled fault samples, and still obtain a high-precision diagnostic model under the condition of a small number of labels.

[0028] 2. This invention performs physical feature preprocessing through VSD vector space decomposition, separating fault-related signals into subspaces with clear physical meaning, thereby improving the feature separability between different fault categories;

[0029] 3. This invention can effectively identify unknown faults outside the training set through a two-stage confidence-distance rejection mechanism, reducing the risk of unknown faults being misclassified as known categories. At the same time, it has low computational complexity and is suitable for embedded deployment.

[0030] 4. This invention uses a lightweight MLP network combined with model pruning, fine-tuning and compression technology, which can be deployed in real time on the DSP controller, reducing online inference latency and storage space occupation, and ensuring that diagnostic tasks and motor control tasks run in tandem.

[0031] 5. This invention can maintain good online diagnostic stability under dynamic speed and load changes, and has strong engineering applicability. Attached Figure Description

[0032] Figure 1 This is a diagram illustrating the overall technical architecture of the method of this invention;

[0033] Figure 2 This is a schematic diagram of the lightweight MLP diagnostic network in this invention;

[0034] Figure 3 This is a schematic diagram of the TS-Match semi-supervised learning training mechanism in this invention;

[0035] Figure 4 This is a waveform diagram of the online diagnostic timing scheduling in a healthy state in this invention;

[0036] Figure 5 This is a diagnostic waveform diagram under an open-circuit fault in phase A of the embodiment;

[0037] Figure 6 This is a diagnostic waveform diagram of an open-circuit fault in the switching transistor of phase A in the embodiment. Detailed Implementation

[0038] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the invention, not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0039] The DTP-PMSM online open-circuit fault diagnosis method based on semi-supervised learning and lightweight neural networks consists of two stages: offline training and online diagnosis. The overall process combines... Figure 1 As shown, the specific steps include:

[0040] (a) Offline training phase

[0041] Step S1: Multi-condition data acquisition and preprocessing;

[0042] First, a DTP-PMSM test system was constructed, including two sets of three-phase windings ABC and A1B1C1 with a spatial phase difference of 30° electrical angle, two sets of three-phase inverters, a DSP controller, a six-phase current sampling unit, and a rotor position sampling unit. Six-phase stator current and rotor position data were acquired via UART or other data interfaces to form raw samples.

[0043] Data acquisition covers health status, various known fault statuses, and several unknown fault statuses. Among them, known faults may include single-phase open circuit faults of phases A, B, C, A1, B1, and C1, as well as corresponding upper and lower bridge arm open circuit faults. Unknown faults may include current sensor bias, sensor zeroing, multiple switch faults, inter-turn short circuits, and compound faults.

[0044] During the data processing phase, this invention collects six-phase stator current and rotor position data under different speeds, loads, and fault conditions. For each known fault condition, data from multiple operating conditions, including both under load and no-load conditions, are collected; for healthy conditions, data from a wider speed range are collected to cover normal operating conditions.

[0045] The collected data is preprocessed, and the six-phase current is divided into equal-interval sliding windows. In one embodiment, the window length and step size are both set to 32.

[0046] Subsequently, a vector space decomposition (VSD) transformation is performed on the six-phase currents within each window, mapping the currents in the six-phase stationary coordinate system to three subspaces: α-β, z1-z2, and o1-o2. The transformation relationship is expressed as follows:

[0047]

[0048] The transformation matrix is ​​written as:

[0049]

[0050] After VSD transformation, the fundamental frequency and the 12n±1st harmonic are mainly distributed in the α-β subspace, reflecting the main energy conversion information of the motor; the 6n±1st harmonic is mainly distributed in the z1-z2 subspace, which can centrally reflect the current distortion and harmonic characteristics caused by open circuit faults; the 6n±3rd harmonic is mainly distributed in the o1-o2 subspace. Since the neutral points of the two windings in the DTP-PMSM are isolated from each other, the current in the o1-o2 subspace is not used as the main input in the diagnosis. This invention selects the currents in the α-β and z1-z2 subspaces as diagnostic features, so that the current distortion and harmonic characteristics caused by open circuit faults are reflected in a space with clear physical meaning, thereby improving the separability between fault categories. The corresponding components within each window are flattened into a 128-dimensional feature vector, which serves as the input to the subsequent diagnostic network.

[0051] Step S2: Training the TS-Match semi-supervised model;

[0052] This invention constructs the TS-Match semi-supervised learning framework to train a fault diagnosis model under conditions where a small number of labeled samples and a large number of unlabeled samples coexist. The training mechanism combines... Figure 3 As shown.

[0053] This invention employs a lightweight multilayer perceptron (MLP) as the diagnostic network, and the network structure combines... Figure 2 As shown, the network includes an input layer, a single hidden layer, and an output layer. The input layer receives a 128-dimensional feature vector after VSD transformation and flattening; the single hidden layer is a fully connected layer containing 32 neurons and uses the ReLU activation function to extract features; the output layer is a fully connected classification layer that outputs the probabilities of the health status and each known fault category after Softmax activation. In one implementation, the known categories include 1 category of health status and 18 categories of open-circuit fault status, i.e., the number of output categories K=19. This network structure ensures feature extraction capability while avoiding excessive model parameters that would hinder real-time deployment of the DSP.

[0054] During training, each training batch contains both labeled and unlabeled samples.

[0055] Let the batch of labeled samples be:

[0056]

[0057] In the formula, For labeled samples, To give it its true label, This refers to the batch size of the labeled samples.

[0058] Let the batch of unlabeled samples be:

[0059]

[0060] In the formula, These are unlabeled samples. This represents the proportion of unlabeled samples relative to labeled samples.

[0061] The model's total loss function consists of both supervised loss and unsupervised consistency loss:

[0062]

[0063] In the formula, Supervised cross-entropy loss for labeled samples, For unlabeled samples, the consistency regularization loss is... This represents the unsupervised loss weight.

[0064] For labeled samples, the formula for calculating supervised cross-entropy loss is:

[0065]

[0066] In the formula, Represents the cross-entropy function. This represents the prediction function of the diagnostic model.

[0067] For unlabeled samples, this invention applies two data augmentation operations: weak augmentation and strong augmentation. Weakly augmented samples are used to generate pseudo-labels, while strongly augmented samples are used to calculate consistency loss.

[0068] Weak enhancement: Used to simulate small measurement offsets and noise disturbances during actual sampling, including random translations and random noise.

[0069] Random translation can be represented as:

[0070]

[0071] In the formula, This is the original time-series current signal. This is a random offset.

[0072] Random noise can be expressed as:

[0073]

[0074] In the formula, To follow the pattern with a mean of 0 and a variance of Gaussian noise.

[0075] Enhanced: Used to simulate more complex operating condition changes and signal disturbances, including enhanced random translation, enhanced random noise, random amplitude scaling, and random time masking.

[0076] Random amplitude scaling can be expressed as:

[0077]

[0078] In the formula, This is a random scaling factor used to simulate current amplitude changes caused by load fluctuations or speed variations.

[0079] Random temporal occlusion can be represented as:

[0080]

[0081] In the formula, The occlusion start time is randomly selected. For the shielding length, this enhancement method can simulate transient interference, short-term signal loss, or sampling anomalies in the sensor.

[0082] The calculation process for unsupervised loss is as follows: for unlabeled samples... Apply weak enhancement Then, the model outputs the predicted distribution: ,in This represents the conditional probability output function of a lightweight MLP diagnostic model. Represents a random variable indicating the fault category. Represents the set of all trainable parameters of the diagnostic model; when the maximum probability of the prediction distribution satisfies At that time, then As a pseudo-label for this unlabeled sample, This is an adaptive confidence threshold.

[0083] Subsequently, the same unlabeled sample was analyzed. Strengthen and enhance This ensures that the prediction results of strongly augmented samples are consistent with those of pseudo-labels. The unsupervised loss can be expressed as:

[0084]

[0085] In the formula, For indicator functions, when The value is 1 if the confidence level is high, and 0 otherwise. This mechanism ensures that only unlabeled samples with high confidence participate in pseudo-label training, thereby reducing the impact of erroneous pseudo-labels on model training.

[0086] Adaptive confidence threshold A dynamic adjustment strategy is adopted: the initial value is set to 0.95, and if the pseudo-label utilization rate is lower than 30% within a certain number of training cycles, then... Reduce by 1.5%; if the utilization rate of pseudo-labels is higher than 70%, then... Increase by 1.5%; at the same time The constraint is within the range of 0.9 to 0.995. This strategy can ensure the reliability of pseudo-labels in the early stages of training, improve the utilization of unlabeled data in the later stages of training, and balance model stability and diagnostic performance.

[0087] In one implementation, the training batch size is set to 32, the initial learning rate is set to 0.005, and a cosine annealing strategy is used to adjust the learning rate. After training, the feature extractors of the classification output layer and hidden layer are retained for subsequent online inference and unknown fault rejection.

[0088] Step S3: Construct a two-stage OOD rejection mechanism;

[0089] To enable the model to identify unknown faults, this invention constructs a two-stage OOD rejection strategy. The first stage performs preliminary screening based on classification confidence, and the second stage performs final rejection based on feature space distance.

[0090] First, class prototypes for each category are constructed based on the training set data: Let the trained feature extractor be... Input Sample Mapped to embedding vectors by the feature extractor For the first Given a class, the class prototype is obtained by averaging the embedding vectors of all training samples for that class.

[0091]

[0092] In the formula, For the first A set of samples of known categories, Indicates the first Cluster centers of known categories in feature space.

[0093] The two-stage rejection criteria are as follows during online inference:

[0094] Phase 1: Initial screening using classification confidence levels.

[0095] Input Sample The softmax classification probability is obtained from the diagnostic model:

[0096]

[0097] If the maximum classification probability satisfies:

[0098]

[0099] Then, the sample is classified as a known distribution (ID) sample, and the fault category corresponding to the highest probability is output, where This is the confidence threshold for the first stage.

[0100] If the maximum classification probability is lower than Then proceed to the second stage of distance judgment.

[0101] Second stage, feature distance verification:

[0102] Calculate the embedding vector of the sample With each known category prototype Euclidean distance between If the minimum distance satisfies:

[0103]

[0104] The sample is then determined to be an out-of-distribution (OOD) sample, i.e., an unknown fault. This is the distance threshold for the second stage.

[0105] If the minimum distance satisfies:

[0106]

[0107] If the sample has a low classification confidence, it is considered to fall near the known category feature space and is therefore classified into the nearest known category.

[0108] In one implementation, the first-stage confidence threshold Set to 0.95, second-stage distance threshold Set to 0.40. In practical applications, the above threshold can be recalibrated according to the motor platform, sampling system, and operating condition complexity. Compared with methods that rely solely on the maximum probability of Softmax, this two-stage strategy can reduce the risk of unknown faults being forcibly classified into known categories; compared with methods such as Mahalanobis distance, it avoids the inversion of high-dimensional covariance matrices, reducing the computational burden in embedded deployments.

[0109] Step S4: Model compression and DSP adaptation;

[0110] To meet the real-time deployment requirements of the DSP controller, this invention performs sequential compression processing on the MLP diagnostic model after training. The specific process is as follows:

[0111] The first step is L1 unstructured pruning: L1 unstructured pruning is performed on the weight parameters of the fully connected layer, and the weights with small absolute values ​​(values ​​less than 0.001) are reset to zero to achieve model sparsity. The pruning ratio is set to 40%.

[0112] The second step is model fine-tuning: a low learning rate (0.0001) is used to fine-tune the pruned sparse model so that it adapts to the sparse weight structure and restores and maintains diagnostic performance.

[0113] The third step is deployment and adaptation: the fine-tuned model parameters are quantized and deployed to DSP controllers such as TMS320F28075 without adding extra hardware resources.

[0114] (II) Online Diagnosis Phase

[0115] Step S5: Real-time diagnostic scheduling on the DSP side;

[0116] Online diagnostic process combined Figure 4 As shown, during motor operation, the DSP controller continuously collects six-phase stator current and rotor position signals, and updates the sample array to be diagnosed according to a fixed sliding window length.

[0117] Diagnostic triggering mechanism: The diagnostic process can be triggered once every two electrical cycles at the zero-phase point to balance real-time diagnostics with the computational resource consumption of the control task. When the diagnostic trigger flag is set, the controller pauses the updating of the diagnostic input array to avoid the sampling data refresh interfering with the current inference process.

[0118] The controller then sequentially performs VSD transformation, lightweight MLP model inference, and two-stage OOD rejection judgment on the data in the current window; after the diagnosis is completed, it restores the update of the input array and outputs the diagnosis results: health status, known open circuit fault category, or unknown fault flag.

[0119] If the output is a known fault, an alarm can be triggered or a fault-tolerant control strategy can be activated; if the output is an unknown fault, the process can enter protection, derating operation, or manual maintenance.

[0120] Example

[0121] To verify the effectiveness of the method of the present invention, a DTP-PMSM test platform was built for testing and verification. The test platform uses a TMS320F28075 DSP controller, two sets of IGBT-based three-phase drive boards, and a permanent magnet synchronous motor as the load.

[0122] The training data includes six-phase stator current and rotor position signals, covering healthy states, 18 known open-circuit fault states, and several unknown fault states. Known faults include open-circuit faults related to the six-phase windings and corresponding switches; unknown faults include current sensor bias, current sensor zeroing, multiple switch faults, inter-turn short circuits, and coupled multiple faults. The dataset is divided into training and test sets after being processed by equally spaced sliding windows, with the vast majority of training samples being unlabeled.

[0123] 1. Known fault diagnosis performance

[0124] In offline diagnostic experiments, the TS-Match method and its compressed version of this invention achieved an overall accuracy of 100.00% and an F1 score of 100.00% on the known fault test set. Compared with methods such as Average Current Detection (ACD), Harmonic Subspace Current Comparison (HSCC), Support Vector Machine (SVM), K-Nearest Neighbors (KNN), XGBoost, Random Forest (RF), Fully Supervised MLP, and FreeMatch, this invention exhibits higher diagnostic accuracy under conditions with a small number of labels. Specific comparison results are shown in Table 1.

[0125] Table 1 Test performance of different methods

[0126]

[0127] 2. Unknown fault detection performance

[0128] In the unknown fault detection experiment, the two-stage OOD strategy adopted in this invention achieved a 100% rejection accuracy rate on the constructed unknown fault test set. Compared with the maximum softmax probability method, energy-based methods, Euclidean distance method, and Mahalanobis distance method, this invention balances recognition accuracy and embedded computational burden. Specific comparison results are shown in Table 2.

[0129] Table 2 Diagnostic results of different OOD detection methods

[0130]

[0131] 3. Model compression and online deployment performance

[0132] In the model compression and online deployment experiments, the number of parameters in the original TS-Match model was reduced from 4755 to 2845, a reduction of approximately 39.6%. After 40% L1 unstructured pruning, fine-tuning, and quantization, the online diagnosis time per sample decreased from 3.72ms to 3.02ms, and the inference time decreased by approximately 18.82%, while maintaining 100% offline accuracy and 0 online misdiagnoses under the experimental conditions. The diagnosis results under different pruning ratios are shown in Table 3.

[0133] Table 3 Diagnostic results under different pruning ratios

[0134]

[0135] For two typical open-circuit faults—single-phase winding open circuit and single-switch open circuit—the online measured diagnostic waveforms are combined with… Figure 5 and Figure 6 As shown.

[0136] Combination Figure 5 It is evident that after an open-circuit fault occurs in phase A, the phase current waveform exhibits significant distortion. After diagnostic triggering, the corresponding fault type can be identified within one diagnostic cycle. Combined with… Figure 6 As can be seen, after an open-circuit fault occurs in the switching transistor of phase A, the phase current exhibits half-wave distortion characteristics. The system can also complete fault identification within the first diagnostic cycle after the fault occurs, verifying the online real-time diagnostic capability of the method.

[0137] 4. Dynamic operating condition online diagnostic performance

[0138] During real-time online diagnostics, the system initiates a diagnostic process every two electrical cycles at the zero-phase point, releasing computational resources and preventing sampled data updates from interfering with the diagnostic results by pausing array updates. After 50 online tests with random faults, under conditions of mixed switching between known and unknown faults, the diagnostic system can accurately output the corresponding operating status.

[0139] Under dynamic operating conditions of 400-600 rpm and 0-1.5 N·m load, the method of the present invention still maintains accurate diagnosis, indicating that the method has good engineering applicability.

[0140] It should be noted that the 100% accuracy rate mentioned above is the experimental result obtained in this embodiment within a specific dataset, fault category, and operating condition range. It does not guarantee that the same value will be achieved in any unverified system or under any complex operating condition. In practical applications, the confidence threshold can be recalibrated based on motor parameters, sampling system, fault category, and operating environment. Distance threshold And the model compression ratio.

[0141] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of the equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

[0142] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A method for online open-circuit fault diagnosis of DTP-PMSM based on semi-supervised learning and lightweight neural networks, characterized in that: Includes the following steps: Step S1, Multi-condition data acquisition and preprocessing: Construct a DTP-PMSM test system to collect six-phase stator current and rotor position data under different speeds and loads. The data covers healthy conditions, various known fault conditions and several unknown fault conditions. After dividing the six-phase currents according to the equal-interval sliding window method, VSD transformation is performed. The α-β and z1-z2 subspace current flattening is selected as feature vectors as network input. Step S2, TS-Match semi-supervised model training: Construct the TS-Match semi-supervised learning framework, use a lightweight MLP as the diagnostic network, adopt a total loss function consisting of supervised cross-entropy loss and unsupervised consistency loss, and train the diagnostic network using both labeled and unlabeled samples. Step S3: Construct a two-stage OOD rejection mechanism: Extract feature embeddings of known categories based on the trained diagnostic network, calculate class prototypes for each category, and establish a two-stage OOD rejection mechanism consisting of initial screening with classification confidence in the first stage and feature space distance verification in the second stage. Step S4, Model Compression and DSP Adaptation: The trained diagnostic network is pruned, fine-tuned, and quantized and compressed sequentially to obtain a lightweight diagnostic model adapted to the DSP controller. Step S5, Real-time Diagnosis and Scheduling on the DSP: The DSP controller collects six-phase stator current signals in real time, updates the samples to be diagnosed according to a fixed sliding window, and when diagnosis is triggered, performs VSD transformation, lightweight MLP model inference and two-stage OOD rejection judgment on the data in the current window in sequence, and outputs the health status, known open circuit fault category or unknown fault flag.

2. The online open-circuit fault diagnosis method for DTP-PMSM based on semi-supervised learning and lightweight neural networks according to claim 1, characterized in that: In step S1, the VSD transformation maps the current in the six-phase stationary coordinate system to three subspaces: α-β, z1-z2, and o1-o2. The fundamental wave and the 12n±1st harmonic are distributed in the α-β subspace, and the 6n±1st harmonic is distributed in the z1-z2 subspace. The current components in the α-β subspace and the z1-z2 subspace are selected, and the corresponding components in each window are flattened into 128-dimensional feature vectors.

3. The online open-circuit fault diagnosis method for DTP-PMSM based on semi-supervised learning and lightweight neural networks according to claim 1, characterized in that: In step S2, each training batch contains both labeled and unlabeled samples, and the total loss function is expressed as follows: In the formula, Supervised cross-entropy loss for labeled samples, For unlabeled samples, the consistency regularization loss is... This represents the unsupervised loss weight.

4. The online open-circuit fault diagnosis method for DTP-PMSM based on semi-supervised learning and lightweight neural networks according to claim 3, characterized in that: The calculation process of the unsupervised consistency loss is as follows: weak enhancement is applied to unlabeled samples to generate pseudo-labels, and strong enhancement is applied to the same unlabeled sample to make the prediction results of the strongly enhanced sample consistent with the pseudo-labels. The weak enhancement includes random translation and random noise, and the strong enhancement includes enhanced random translation, enhanced random noise, random amplitude scaling and random temporal occlusion.

5. The online open-circuit fault diagnosis method for DTP-PMSM based on semi-supervised learning and lightweight neural networks according to claim 4, characterized in that: The pseudo-label generation uses an adaptive confidence threshold. Its dynamic adjustment strategy is as follows: the initial value is set to 0.95, and if the pseudo-label utilization rate is less than 30% during the training period, then... The reduction is 1.5%, and if it reaches 70%, then... Increased by 1.5%, and The constraint is in the range of 0.9 to 0.

995.

6. The online open-circuit fault diagnosis method for DTP-PMSM based on semi-supervised learning and lightweight neural networks according to claim 1, characterized in that: In step S2, the lightweight MLP network structure includes an input layer, a single hidden layer, and an output layer. The input layer receives the feature vector after VSD transformation and flattening. The single hidden layer is a fully connected layer containing 32 neurons and uses the ReLU activation function to complete feature extraction. The output layer is a fully connected classification layer that outputs the health status and the probability of each known fault category after Softmax activation.

7. The online open-circuit fault diagnosis method for DTP-PMSM based on semi-supervised learning and lightweight neural networks according to claim 1, characterized in that: In step S3, the judgment rule of the two-stage OOD rejection mechanism is as follows: The first stage is the initial screening of classification confidence: the input sample is processed by the diagnostic model to obtain the Softmax classification probability. If the maximum classification probability is greater than or equal to the confidence threshold... If the maximum classification probability is lower than the confidence threshold, then the sample is classified as a known distribution sample and the corresponding fault category is output. Then proceed to the second stage; The second stage is feature distance verification: Calculate the Euclidean distance between the embedding vector of the sample and the prototype of each known class. If the minimum distance is greater than the distance threshold... If the minimum distance is less than or equal to the distance threshold, then the sample is determined to be an out-of-distribution sample, i.e., an unknown fault. If so, it will be classified into the nearest known category.

8. The online open-circuit fault diagnosis method for DTP-PMSM based on semi-supervised learning and lightweight neural networks according to claim 1, characterized in that: In step S4, the model compression process is as follows: First, L1 unstructured pruning is performed on the weights of the fully connected layer to achieve model sparsity, with a pruning ratio of 40%; Second, the pruned sparse model is fine-tuned using a low learning rate of 0.0001 to adapt the model to the sparse weight structure and restore and maintain diagnostic performance; Third, the fine-tuned model parameters are quantized and deployed to the DSP controller without adding additional hardware resources.

9. The online open-circuit fault diagnosis method for DTP-PMSM based on semi-supervised learning and lightweight neural networks according to claim 1, characterized in that: In step S5, the diagnostic triggering mechanism triggers a diagnosis once every two electrical cycles at the zero-phase point. When the diagnosis is triggered, the update of the sample array to be diagnosed is paused, and the array update is resumed after the diagnosis is completed.