Motor cross-domain demagnetization fault diagnosis method and system based on graph attention network
Patent Information
- Application Number
- CN202512019426.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2045-12-30
AI Technical Summary
[0006]本发明的目的在于克服现有PMSM退磁故障诊断方法在变工况条件下存在的域偏移问题,提出了一种基于图注意力网络的电机跨域退磁故障诊断方法及系统
[0048]本发明通过“节点级-图级”双对抗训练可以学习到更准确的域不变特征,节点级对抗为图级对抗提供了更鲁棒的基础特征,而图级对抗为节点级对抗提供了全局优化目标。相较于单级域对抗训练,“节点级-图级”双对抗训练可以学习到更准确的域不变特征,更有效解决了因工况差异导致的域偏移问题,显著提升了诊断模型在未知目标域上的泛化能力和实用性。
Smart Images

Figure CN121808559B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of permanent magnet synchronous motors, specifically to a method and system for diagnosing cross-domain demagnetization faults in motors based on graph attention networks. Background Technology
[0002] Permanent magnet synchronous motors (PMSMs) have been widely used in new energy vehicles, aerospace, high-end manufacturing, and industrial automation due to their superior performance, including high power density and high operating efficiency. However, the complex and variable working environment and harsh operating conditions inevitably expose PMSMs to various failure risks, among which permanent magnet demagnetization is one of the most common and damaging types of failure. As a key component of the PMSM, the decay of the permanent magnet's magnetic properties can directly lead to a decrease in motor efficiency and an increase in temperature, and may even cause the failure of the entire drive system, resulting in serious safety accidents and economic losses. Therefore, accurate diagnosis of PMSM demagnetization faults is of great significance for ensuring the reliable operation of the system.
[0003] In recent years, with the development of artificial intelligence technology, data-driven fault diagnosis methods have become a research hotspot, especially deep learning technologies represented by convolutional neural networks. These methods can automatically learn deep fault characteristics from massive amounts of monitoring data, avoiding complex modeling and manual feature extraction, and demonstrating excellent diagnostic performance. However, in scenarios with varying operating conditions, existing data-driven diagnostic methods face a serious domain shift problem. Specifically, a high-precision diagnostic model trained under specific operating conditions may experience a sharp decline in diagnostic performance or even fail when applied to scenarios where operating conditions change, due to the inconsistent probability distributions of the training data (source domain) and the test data (target domain). The root cause of the domain shift problem lies in the significant differences in the distribution of monitoring signal data under different operating conditions, and the inability of the model to adapt to these distribution changes.
[0004] To address the domain offset problem, researchers have explored domain adaptation techniques in transfer learning. However, existing methods are mostly based on shallow feature alignment, which has limited ability to align features for complex nonlinear signals. Furthermore, traditional deep networks struggle to effectively capture the complex spatiotemporal relationships between segments within a signal, limiting the stability of their fault feature extraction capabilities under varying operating conditions.
[0005] In conclusion, developing an intelligent diagnostic method that can adapt to changes in operating conditions and effectively uncover the intrinsic correlations of signals is key to overcoming the current bottlenecks in PMSM demagnetization fault diagnosis technology. Summary of the Invention
[0006] The purpose of this invention is to overcome the domain offset problem in existing PMSM demagnetization fault diagnosis methods under varying operating conditions. A method and system for diagnosing cross-domain demagnetization faults in motors based on graph attention networks is proposed. This method effectively solves the problem of poor model generalization ability caused by changes in operating conditions, achieves stable knowledge transfer from known to unknown operating conditions, and improves the practicality and reliability of the diagnostic system in real industrial environments.
[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0008] A method for diagnosing cross-domain demagnetization faults in motors based on graph attention networks includes the following steps:
[0009] Step 1: Collect the original leakage flux signal sequence of the permanent magnet synchronous motor (PMSM) under different operating conditions;
[0010] Step 2: Divide the leakage magnetic signal sequence into several equal parts, and use each part of the leakage magnetic signal to construct graph structure data;
[0011] Step 3: Input the graph structure data into the cross-domain graph attention diagnostic model and train the model. That is, the cross-domain graph attention diagnostic model consists of a graph attention neural network, a classifier, and a domain discriminator.
[0012] During the training phase, the global graph representation vector of the graph attention neural network corresponding to the source domain samples and the sample labels are input into the classifier for classification training; the global graph representation vectors and node feature vectors of the graph attention neural networks corresponding to the source domain samples and the target domain samples are input into the domain discriminator for node-level and graph-level two-level domain adversarial training.
[0013] Step 4: The magnetic flux leakage signal sequence to be diagnosed in the target domain is generated into graph structure data after step 2, and then input into the graph attention neural network and classifier of the cross-domain graph attention diagnostic model to obtain the final diagnostic result.
[0014] Optionally, the backpropagation during training employs an alternating optimization strategy to optimize the parameters of the classifier, domain discriminator, and graph attention neural network, specifically:
[0015] First, with the parameters of the graph attention neural network fixed, the corresponding classifier and discriminator parameters are dynamically updated based on the classification loss of the classifier and the domain adversarial loss of the domain discriminator.
[0016] Then, a gradient reversal layer mechanism is introduced to dynamically update the parameters of the graph attention neural network by co-polling the classification loss and the domain adversarial loss. That is, during backpropagation, the gradient of the domain discriminator is multiplied by a factor when propagating back to the graph attention neural network. The corresponding updated model is:
[0017]
[0018]
[0019] In the formula, the overall optimization objective is... , To balance hyperparameters, For learning rate, For the weights of the graph attention network, For classifying losses, For domain confrontation losses, This represents the learning rate. To avoid missing the optimal value and redundant calculations, and The values of are determined using a hybrid strategy, preferably by first determining the approximate range using a grid search method, and then performing local grid optimization to obtain the optimal value. The values of both are generally between 0.0001 and 0.1.
[0020] Optionally, the domain discriminator consists of a node domain discriminator and a graph domain discriminator, and the domain adversarial loss of the domain discriminator includes node domain adversarial loss and graph domain adversarial loss, specifically:
[0021]
[0022]
[0023] In the formula, This represents the number of nodes in a graph. This represents the number of samples in the source domain. Indicates the number of samples in the target domain. and These represent the outputs of the node domain discriminators for the source and target domains, respectively. and These represent the outputs of the graph discriminator in the source and target domains, respectively. and These are the node domain adversarial loss and the graph domain adversarial loss, respectively.
[0024] Optionally, the node domain discriminator and the graph domain discriminator in the domain discriminator have the same structure, both being a two-layer multilayer perceptron connected to a sigmoid function; the classifier is a two-layer multilayer perceptron connected to a softmax function.
[0025] Optionally, the graph structure data includes graph nodes, node feature vectors of graph nodes, and adjacency relationships between graph nodes. The graph attention neural network in step 3 is composed of several graph attention layers connected in series. The processing procedure of each graph attention layer is as follows:
[0026] First, a linear transformation is performed on the node feature vectors of the input graph attention layer. Then, attention weights are obtained by transforming each graph node using a self-attention mechanism. , Represents graph nodes For graph nodes Importance, i.e. attention weight, graph node For graph nodes neighbor node set The nodes in ;
[0027] Then, the Softmax function is introduced for all graph nodes. Adjacent graph nodes Standardization is performed to obtain standardized attention weights for graph nodes. Standardized attention weights satisfy:
[0028] , ;
[0029] Finally, a new node feature vector for each graph node is generated by weighted summation, thus obtaining the node feature vectors of all graph nodes output by the graph attention layer:
[0030]
[0031]
[0032] In the formula, It is the new node feature vector of node i in the graph. It is a random weight. It is a non-linear activation function; It is the feature vector dimension of the new node's feature vector. Represents the set of real numbers;
[0033] Specifically, the node feature vectors of all graph nodes in the last graph attention layer of the graph attention neural network are averaged and pooled to obtain the global graph representation vector output by the graph attention neural network.
[0034] Optionally, in step 2, each leakage magnetic signal corresponds to a graph node, and the generated node feature vector is derived from the average value of the leakage magnetic signal sequence. Standard deviation Root mean square value Peak Peak-to-peak value Average absolute value and variance constitute.
[0035] Optionally, in step 2, each leakage magnetic signal corresponds to a graph node. The adjacency relationship between graph nodes is determined by the Pearson correlation coefficient of the corresponding two leakage magnetic signal sequences. If the corresponding Pearson correlation coefficient is greater than or equal to a preset threshold, the two graph nodes are adjacent; otherwise, the two graph nodes are not adjacent.
[0036] Furthermore, the present invention also provides a diagnostic system based on the above method, comprising:
[0037] The leakage flux signal acquisition module is used to acquire the original leakage flux signal sequence of a permanent magnet synchronous motor (PMSM) under different operating conditions.
[0038] The graphing module is used to divide the leakage magnetic signal sequence into several equal parts and use each part of the leakage magnetic signal to construct graph structure data;
[0039] The diagnostic module construction and training module is used to build a cross-domain graph attention diagnostic model consisting of a graph attention neural network, a classifier, and a domain discriminator, and to train the model.
[0040] During the training phase, the global graph representation vector of the graph attention neural network corresponding to the source domain samples and the sample labels are input into the classifier for classification training; the global graph representation vectors and node feature vectors of the graph attention neural networks corresponding to the source domain samples and the target domain samples are input into the domain discriminator for node-level and graph-level two-level domain adversarial training.
[0041] The diagnostic module is used to generate graph structure data from the target domain's magnetic flux leakage signal sequence after passing it through the graph construction module. This data is then input into the graph attention neural network and classifier of the cross-domain graph attention diagnostic model to obtain the final diagnostic result.
[0042] The present invention also provides a computer terminal, comprising:
[0043] One or more processors;
[0044] A memory that stores one or more computer programs;
[0045] The processor invokes a computer program to implement the steps of a method for diagnosing cross-domain demagnetization faults in motors based on graph attention networks.
[0046] The present invention also provides a computer storage medium storing a computer program, which is called by a processor to implement the steps of a method for diagnosing cross-domain demagnetization faults of motors based on graph attention networks.
[0047] The above technical solution has the following advantages and beneficial effects:
[0048] This invention employs a dual-adversarial training approach—"node-level-graph-level"—to learn more accurate domain-invariant features. Node-level adversarial training provides more robust foundational features for graph-level adversarial training, while graph-level adversarial training provides a global optimization objective for node-level adversarial training. Compared to single-level domain adversarial training, this dual-adversarial training learns more accurate domain-invariant features, more effectively addresses the domain shift problem caused by differences in operating conditions, and significantly improves the generalization ability and practicality of the diagnostic model in unknown target domains.
[0049] This invention proposes a new loss function and training strategy. Backpropagation uses an alternating optimization strategy to optimize the parameters of the classifier, domain discriminator, and graph attention neural network. In particular, a gradient reversal layer mechanism is introduced in the parameter update process of the graph attention neural network.
[0050] This invention introduces graph attention networks into the field of demagnetization fault diagnosis, representing another application of neural networks in this area. Particularly for leakage magnetic field signal sequences, the introduction of graph attention networks fully considers the temporal correlations of the leakage magnetic field signals, providing a more advanced and targeted representation method for the original data. Specifically, by dynamically learning the complex correlations within the signal using graph attention networks, and efficiently mining the structured semantic relationships within the signal through the attention mechanism, it can adaptively focus on the key features most relevant to the fault, resulting in higher diagnostic accuracy and robustness compared to traditional methods.
[0051] The method of this invention is an end-to-end intelligent diagnostic solution that does not require complex feature engineering and can be easily integrated into industrial predictive maintenance systems, reducing the cost of deploying diagnostic models under new operating conditions. Attached Figure Description
[0052] To more clearly illustrate the technical solutions in the embodiments of this application or the conventional technology, the drawings used in the description of the embodiments or the conventional technology will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0053] Figure 1 This is a flowchart illustrating a method for diagnosing cross-domain demagnetization faults in motors based on graph attention networks in one embodiment.
[0054] Figure 2 This is a schematic diagram of the process of constructing graph data in one embodiment;
[0055] Figure 3 This is the network structure of a motor cross-domain demagnetization fault diagnosis method based on graph attention network in one embodiment;
[0056] Figure 4This is a schematic diagram of the attention layer feature extraction process in one embodiment. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0058] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
[0059] It should be noted that, in this document, the reference to "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The presentation of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will understand that the embodiments described herein can be combined with other embodiments. The term "and / or" as used herein refers to any combination of one or more of the associated listed items, and all possible combinations, including such combinations.
[0060] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0061] In one embodiment, such as Figure 1 As shown, a method for diagnosing cross-domain demagnetization faults in motors based on graph attention networks is provided, which may include the following processing steps 1 to 4:
[0062] Step 1: Collect the original leakage magnetic field signal sequence of PMSM under different operating conditions using an electromagnetic sensor;
[0063] Step 2: Divide the leakage magnetic signal sequence into several equal parts, and construct a graph structure data for each part;
[0064] Step 3: Input the graph structure data into the graph attention neural network, output the global graph representation vector, and further input it into the classifier and domain discriminator for classification and domain adversarial training. The domain discriminator includes a node domain discriminator and a graph domain discriminator. For the domain discriminator, input the node features into the node domain discriminator and input the global graph representation vector into the graph domain discriminator.
[0065] Step 4: Input the target domain samples into the trained graph attention neural network to obtain the final diagnostic result.
[0066] In some embodiments, in step 1, the electromagnetic sensor collects the external leakage magnetic field signal of the PMSM under different operating conditions. The external leakage magnetic field signal is a one-dimensional time sequence. Using the electromagnetic sensor to collect the external leakage magnetic field signal of the PMSM enables non-invasive monitoring of the PMSM, reducing interference and damage to the motor. In other feasible embodiments, other types of leakage magnetic field signals in the art also satisfy the technical solution of the present invention, and the present invention does not specifically limit them.
[0067] In some embodiments, the permanent magnet synchronous motor states used include five categories: normal motor, 10% partial demagnetization, 10% uniform demagnetization, 30% partial demagnetization, and 100% partial demagnetization. Speeds include 1000 r / min and 1500 r / min, and loads include no-load, half-load, and full-load. Speed and load are combined in pairs to form six operating condition combinations. The combination of 1000 r / min and half-load is used as the source domain operating condition, and the other combinations are used as the target domain operating conditions. In other feasible embodiments, the operating condition types can be adaptively adjusted according to application requirements.
[0068] Furthermore, it is preferable to perform signal standardization on the acquired leakage magnetic field signal. The standardization formula is as follows:
[0069]
[0070] in, This is the original leakage magnetic signal. The mean, denoted as the standard deviation, and X represents the standardized leakage magnetic signal.
[0071] In some embodiments, the execution process of step 2 includes the following steps:
[0072] Step 2.1: Divide the leakage flux signals under different motor conditions into equal parts. Each serving contains Each sample contains complete runtime information, with L and N being positive integers, and their specific values being empirical or preset values.
[0073] Step 2.2: Construct graph-structured data from each leakage magnetic signal obtained in Step 2.1. .
[0074] like Figure 2 As shown, first construct the nodes. The leakage magnetic signal is segmented using the sliding window method. Subsequences:
[0075]
[0076] in, For window length, This is the sliding step size.
[0077] calculate The average of the subsequences Standard deviation Root mean square value Peak Peak-to-peak value (Peak-to-peak value refers to the difference between the highest and lowest values of a signal within one period), average absolute value and variance The calculation formula is:
[0078]
[0079]
[0080]
[0081]
[0082]
[0083]
[0084]
[0085] in, The average value of the subsequence. Let i be a data point in the subsequence. This is how it is generated. There are nodes in the graph, and the feature vector of each node is . .
[0086] Next, construct the edges. In some embodiments, the Pearson correlation coefficient is introduced to calculate the linear correlation of the original data, and then the edges between nodes are constructed. The formula for calculating the Pearson correlation coefficient is as follows:
[0087]
[0088] in, , This represents the original data sequence corresponding to the two nodes. , express , The corresponding average value, , express , The corresponding standard deviation This represents the Pearson correlation coefficient between two nodes. It should be understood that this invention focuses on the strength of the correlation between multidimensional data, rather than its positive or negative direction. Therefore, in this embodiment, the absolute value of all Pearson correlation coefficients is taken, with values between 0 and 1. The Pearson correlation coefficient reflects the linear correlation between nodes. The closer the value is to 1, the stronger the linear correlation between the two nodes; the closer the value is to 0, the weaker the linear correlation between the two nodes. In one embodiment, if the Pearson correlation coefficient between two nodes is greater than 0.8, the linear correlation between the two nodes is considered sufficiently strong, and an edge is further created between the two nodes. Therefore, the Pearson correlation coefficients between all pairs of nodes are calculated, ultimately yielding the complete set of edges. In other feasible embodiments, other similarity indicators can be selected to measure the correlation between the original data, and the correlation coefficient threshold can be adaptively adjusted according to the application accuracy requirements.
[0089] It should be understood that the preferred method in the embodiments of the present invention is to use the average value, standard deviation, root mean square value, peak value, peak-to-peak value, mean absolute value and variance as node features, which is a better feasible approach based on the characteristics of the leakage magnetic signal of the application object.
[0090] Specifically, step 3 includes the following steps:
[0091] Step 3.1: Input the graph structure data into the graph attention neural network. This graph structure data is generated in step 2.
[0092] In one embodiment, such as Figure 3 As shown, a graph attention neural network consists of multiple graph attention layers connected in series. Except for the first graph attention layer, which is composed of the original node feature vectors as input vectors, the input of other graph attention layers is the output of the previous graph attention layer.
[0093] The input to each graph attention layer is defined as the set of node features:
[0094]
[0095] in, This represents the dimension of the node's feature vector. In this embodiment, the node's feature vector is... Therefore, in the first layer of graph attention layer It is 7. The size is This represents the characteristics of all nodes. It represents the set of real numbers.
[0096] like Figure 4As shown, the input node features are then subjected to a linear transformation, followed by a self-attention mechanism transformation for each node. The resulting attention weights can be expressed as:
[0097]
[0098] In the formula, It is a random weight. Represents the attention function. , These are graph nodes of the input graph attention layer. Graph Nodes The node feature vectors, Represents graph nodes For graph nodes Importance, i.e. attention weight, graph node For graph nodes neighbor node set The nodes in edge set The edges are used to determine neighboring nodes.
[0099] In a preferred embodiment of the present invention, attention weights are converted into the following processing:
[0100]
[0101] in, For learnable weight vectors, This indicates a concatenation operation, and LeakyReLU is the activation function.
[0102] To make attention weights easier to calculate and compare, a Softmax function is introduced for all nodes. neighboring nodes Standardization is performed as shown in the following formula:
[0103]
[0104] in .
[0105] After obtaining the standardized attention weights, the output features of each node are generated by weighted summation:
[0106]
[0107] in, It is a random weight. This is a non-linear activation function. As shown in the equation above, the output characteristics of this node are related to all its neighboring nodes.
[0108] This yields the final output features of the attention layer in the graph:
[0109]
[0110] in, It is the new feature vector dimension of the output node.
[0111] In one embodiment, the graph attention neural network consists of multiple graph attention layers as described above. For example... Figure 3 As shown, this embodiment consists of three graph attention layers. In other feasible embodiments, the number of graph attention layers can be adaptively adjusted according to the application environment and accuracy. After passing through three graph attention layers, this embodiment outputs node features:
[0112]
[0113] In the formula, It is the dimension of the feature vector of the output node.
[0114] Then, average pooling of the node features yields the global graph representation vector:
[0115]
[0116] Step 3.2: As Figure 3 As shown, the global graph representation vector The data is input into the classifier and domain discriminator for classification and domain adversarial training, where only the source domain data is input into the classifier.
[0117] In one embodiment, the classifier structure is a two-layer multilayer perceptron, followed by a softmax function to obtain the final classification probability, which can be expressed as:
[0118]
[0119] in, , This represents the weight parameters of the fully connected layer. , This represents the bias of the fully connected layer. The final classification result is the category with the highest probability.
[0120] The classification loss can be calculated from the classifier's output:
[0121]
[0122] in, This represents the number of samples in the source domain. This represents the total number of fault categories. and These represent the true label and the predicted label (demagnetization diagnostic label) of the source domain, respectively. It should be understood that the above classifier structure is not the only option for the technical solution of this invention; other classifiers capable of achieving the classification objective also meet the requirements of the technical solution of this invention, the only difference being the model accuracy.
[0123] On the other hand, regarding the domain discriminator, the preferred domain discriminator of the present invention consists of a node domain discriminator and a graph domain discriminator. Specifically, the node feature vectors of the source domain and the target domain are input into the node domain discriminator, and the global graph representation vector is input into the graph domain discriminator for adversarial training.
[0124] In one embodiment, the node domain discriminator and the graph domain discriminator have the same structure, both being a two-layer multilayer perceptron, which is then connected to a sigmoid function to obtain the domain discriminator output, which can be represented as:
[0125]
[0126] in, , This represents the weight parameters of the fully connected layer. , This indicates the bias of the fully connected layer.
[0127] Therefore, the corresponding node domain adversarial loss and graph domain adversarial loss are calculated as follows:
[0128]
[0129]
[0130] In the formula, This represents the number of nodes in a graph. This represents the number of samples in the source domain. Indicates the number of samples in the target domain. and These represent the outputs of the node domain discriminators for the source and target domains, respectively. and These represent the outputs of the graph discriminator for the source and target domains, respectively.
[0131] This invention proposes a deep fusion architecture of node-level and graph-level dual adversarial training. Node-level adversarial training provides more robust basic features for graph-level adversarial training, while graph-level adversarial training provides a global optimization objective for node-level adversarial training. Compared to single-level domain adversarial training, "node-level-graph-level" dual adversarial training can learn more accurate domain-invariant features.
[0132] Therefore, the overall optimization objective is:
[0133]
[0134] in, and This is the loss balance coefficient.
[0135] In one embodiment, backpropagation employs an alternating optimization strategy. When updating the parameters of the classifier and domain discriminator, with the parameters of the graph attention network fixed, gradient descent can be used, which can be expressed as:
[0136]
[0137]
[0138]
[0139] in, Indicates the learning rate. Represents the parameters of the classifier. and These represent the parameters of the node domain discriminator and the graph domain discriminator, respectively.
[0140] The goal of this invention is to achieve the most accurate classification possible, while simultaneously making it as indistinguishable as possible between the source and target domains by the domain discriminator. Therefore, a gradient reversal layer mechanism is incorporated while updating the graph attention network parameters. During forward propagation, the gradient reversal layer performs an identity mapping, while during backward propagation, the gradient of the domain discriminator is multiplied by a negative number when passed back to the feature extractor, which can be expressed as:
[0141]
[0142]
[0143] in, This training method yields a graph attention network that cannot determine the domain from which sample features originate, but it can generate domain-invariant features, enabling accurate fault identification under different operating conditions.
[0144] Optionally, in step 4:
[0145] The samples from other operating conditions are input into the trained graph attention neural network and classifier to obtain the final diagnostic results.
[0146] It should be understood that, although the above Figure 1 The steps are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise explicitly stated in this document, there is no strict order in which these steps are executed; they can be performed in other orders. Furthermore, the above... Figure 1At least some of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0147] In some embodiments, the present invention also provides a diagnostic system based on the above-described diagnostic method, comprising:
[0148] The leakage flux signal acquisition module is used to acquire the original leakage flux signal sequence of a permanent magnet synchronous motor (PMSM) under different operating conditions.
[0149] The graphing module is used to divide the leakage magnetic signal sequence into several equal parts and use each part of the leakage magnetic signal to construct graph structure data;
[0150] The diagnostic module construction and training module is used to build a cross-domain graph attention diagnostic model consisting of a graph attention neural network, a classifier, and a domain discriminator, and to train the model.
[0151] During the training phase, the global graph representation vector of the graph attention neural network corresponding to the source domain samples and the sample labels are input into the classifier for classification training; the global graph representation vectors and node feature vectors of the graph attention neural networks corresponding to the source domain samples and the target domain samples are input into the domain discriminator for node-level and graph-level two-level domain adversarial training.
[0152] The diagnostic module is used to generate graph structure data from the target domain's magnetic flux leakage signal sequence after passing it through the graph construction module. This data is then input into the graph attention neural network and classifier of the cross-domain graph attention diagnostic model to obtain the final diagnostic result.
[0153] It should also be understood that the specific implementation process of each module is described in the above method. This invention will not repeat it here. The above division of functional modules is only for illustrative purposes. In some embodiments, some functional modules can be combined and some functional modules can be separated. Each functional module can be implemented in software, hardware, or a combination of software and hardware. The software and hardware devices include, but are not limited to, general-purpose computer equipment, programmable gate arrays, digital signal processors, microprocessors and their corresponding programming or burning software.
[0154] In some embodiments, the present invention also provides a computer terminal, comprising: one or more processors; and a memory storing one or more computer programs;
[0155] The processor invokes a computer program to implement the following steps in a method for diagnosing cross-domain demagnetization faults in motors based on graph attention networks. Specifically, the execution includes:
[0156] Step 1: Collect the original leakage magnetic field signal sequence of PMSM under different operating conditions using an electromagnetic sensor;
[0157] Step 2: Divide the leakage magnetic signal sequence into several equal parts, and construct a graph structure data for each part;
[0158] Step 3: Input the graph structure data into the graph attention neural network, output the global graph representation vector, and further input it into the classifier and domain discriminator for classification and domain adversarial training. The domain discriminator includes a node domain discriminator and a graph domain discriminator. For the domain discriminator, input the node features into the node domain discriminator and input the global graph representation vector into the graph domain discriminator.
[0159] Step 4: Input the target domain samples into the trained graph attention neural network to obtain the final diagnostic result.
[0160] For details on the implementation of each step, please refer to the description of the control method embodiment above.
[0161] The processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.
[0162] The memory can be implemented in the form of read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory and the processor calls and executes the algorithm program of the motor fault diagnosis method of the embodiments of this invention.
[0163] This invention also provides a computer storage medium storing a computer program, which is called by a processor to implement the steps of a method for diagnosing cross-domain demagnetization faults in motors based on graph attention networks. Specifically, the implementation is as follows:
[0164] Step 1: Collect the original leakage magnetic field signal sequence of PMSM under different operating conditions using an electromagnetic sensor;
[0165] Step 2: Divide the leakage magnetic signal sequence into several equal parts, and construct a graph structure data for each part;
[0166] Step 3: Input the graph structure data into the graph attention neural network, output the global graph representation vector, and further input it into the classifier and domain discriminator for classification and domain adversarial training. The domain discriminator includes a node domain discriminator and a graph domain discriminator. For the domain discriminator, input the node features into the node domain discriminator and input the global graph representation vector into the graph domain discriminator.
[0167] Step 4: Input the target domain samples into the trained graph attention neural network to obtain the final diagnostic result.
[0168] For details on the implementation of each step, please refer to the description of the control method embodiment above.
[0169] The readable storage medium is a computer-readable storage medium, which can be an internal storage unit of the hardware and software device described in any of the foregoing embodiments, such as the hard drive or memory of the controller. The readable storage medium can also be an external storage device of the controller, such as a plug-in hard drive, Smart MediaCard (SMC), Secure Digital (SD) card, or Flash Card equipped on the controller. Further, the readable storage medium can include both internal storage units and external storage devices of the controller. The readable storage medium is used to store the computer program and other programs and data required by the controller. The readable storage medium can also be used to temporarily store data that has been output or will be output.
[0170] Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned readable storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0171] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. This application refers to flowchart illustrations and / or instructions executed by a processor of a method, apparatus (system), and computer program product according to embodiments of this application to create means for implementing the functions specified in one or more flowchart illustrations and / or one or more block diagrams. These computer program instructions may also be stored in a computer-readable storage medium capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowchart illustrations and / or one or more block diagrams. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more blocks of a block diagram.
[0172] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
Claims
1. A method for diagnosing cross-domain demagnetization faults in motors based on graph attention networks, characterized in that: Includes the following steps: Step 1: Collect the original leakage flux signal sequence of the permanent magnet synchronous motor (PMSM) under different operating conditions; Step 2: Divide the leakage magnetic signal sequence into several equal parts, and use each part of the leakage magnetic signal to construct graph structure data; Step 3: Input the graph structure data into the cross-domain graph attention diagnostic model and train the model. That is, the cross-domain graph attention diagnostic model consists of a graph attention neural network, a classifier, and a domain discriminator. During the training phase, the global graph representation vector of the graph attention neural network corresponding to the source domain samples and the sample labels are input into the classifier for classification training; the global graph representation vectors and node feature vectors of the graph attention neural networks corresponding to the source domain samples and the target domain samples are input into the domain discriminator for node-level and graph-level two-level domain adversarial training. The domain discriminator consists of a node domain discriminator and a graph domain discriminator. The domain adversarial loss of the domain discriminator includes node domain adversarial loss and graph domain adversarial loss, specifically: ; ; In the formula, This represents the number of nodes in a graph. This represents the number of samples in the source domain. Indicates the number of samples in the target domain. and These represent the outputs of the node domain discriminators for the source and target domains, respectively. and These represent the outputs of the graph discriminator in the source and target domains, respectively. and These are node-domain adversarial loss and graph-domain adversarial loss, respectively. Step 4: The magnetic flux leakage signal sequence to be diagnosed in the target domain is generated into graph structure data after step 2, and then input into the graph attention neural network and classifier of the cross-domain graph attention diagnostic model to obtain the final diagnostic result.
2. The method according to claim 1, characterized in that: Backpropagation during training involves using an alternating optimization strategy to optimize the parameters of the classifier, domain discriminator, and graph attention neural network. Specifically: First, the parameters of the graph attention neural network are fixed, and the corresponding classifier and discriminator parameters are dynamically updated based on the classification loss of the classifier and the domain adversarial loss of the domain discriminator. Then, a gradient reversal layer mechanism is introduced to dynamically update the parameters of the graph attention neural network in conjunction with the classification loss and the domain adversarial loss. That is, during backpropagation, the gradient of the domain discriminator is multiplied by a factor when propagated back to the graph attention neural network. The corresponding updated model is: ; ; In the formula, the overall optimization objective is... , To balance hyperparameters, For learning rate, For the weights of the graph attention network, For classifying losses, Losses due to domain confrontation.
3. The method according to claim 1, characterized in that: The node domain discriminator and the graph domain discriminator have the same structure, both being a two-layer multilayer perceptron connected to a sigmoid function; the classifier is a two-layer multilayer perceptron connected to a softmax function.
4. The method according to claim 1, characterized in that: The graph structure data includes graph nodes, node feature vectors of graph nodes, and adjacency relationships between graph nodes. The graph attention neural network in step 3 is composed of several graph attention layers connected in series. The processing procedure of each graph attention layer is as follows: First, a linear transformation is performed on the node feature vectors of the input graph attention layer. Then, attention weights are obtained by transforming each graph node using a self-attention mechanism. , Represents graph nodes For graph nodes Importance, i.e. attention weight, graph node For graph nodes neighbor node set The nodes in ; Then, the Softmax function is introduced for all graph nodes. Adjacent graph nodes Standardization is performed to obtain standardized attention weights for graph nodes. Standardized attention weights satisfy: , ; Finally, a new node feature vector for each graph node is generated by weighted summation, thus obtaining the node feature vectors of all graph nodes output by the graph attention layer: ; ; In the formula, It is the new node feature vector of node i in the graph. It is a random weight. It is a non-linear activation function; It is the feature vector dimension of the new node's feature vector. Represents the set of real numbers; Specifically, the node feature vectors of all graph nodes in the last graph attention layer of the graph attention neural network are averaged and pooled to obtain the global graph representation vector output by the graph attention neural network.
5. The method according to claim 1, characterized in that: In step 2, each leakage magnetic signal corresponds to a graph node, and the generated node feature vector is derived from the average value of the leakage magnetic signal sequence. Standard deviation Root mean square value Peak Peak-to-peak value Average absolute value and variance constitute.
6. The method according to claim 5, characterized in that: In step 2, each leakage magnetic signal corresponds to a graph node. The adjacency relationship between graph nodes is determined by the Pearson correlation coefficient of the corresponding two leakage magnetic signal sequences. If the corresponding Pearson correlation coefficient is greater than or equal to a preset threshold, the two graph nodes are adjacent; otherwise, the two graph nodes are not adjacent.
7. A diagnostic system based on the method of any one of claims 1-6, characterized in that, include: The leakage flux signal acquisition module is used to acquire the original leakage flux signal sequence of a permanent magnet synchronous motor (PMSM) under different operating conditions. The graphing module is used to divide the leakage magnetic signal sequence into several equal parts and use each part of the leakage magnetic signal to construct graph structure data. The diagnostic module construction and training module is used to build a cross-domain graph attention diagnostic model consisting of a graph attention neural network, a classifier, and a domain discriminator, and to train the model. During the training phase, the global graph representation vector of the graph attention neural network corresponding to the source domain samples and the sample labels are input into the classifier for classification training; the global graph representation vectors and node feature vectors of the graph attention neural networks corresponding to the source domain samples and the target domain samples are input into the domain discriminator for node-level and graph-level two-level domain adversarial training. The diagnostic module is used to generate graph structure data from the target domain's magnetic flux leakage signal sequence after passing it through the graph construction module. This data is then input into the graph attention neural network and classifier of the cross-domain graph attention diagnostic model to obtain the final diagnostic result.
8. A computer terminal, characterized in that: include: One or more processors; A memory that stores one or more computer programs; The processor invokes a computer program to achieve the following: The steps of the method according to any one of claims 1-6.
9. A computer storage medium, characterized in that: The computer program is stored and is invoked by the processor to implement: The steps of the method according to any one of claims 1-6.
Citation Information
Patent Citations
Bearing cross-domain fault diagnosis system and method based on meta-learning domain adversarial graph convolutional network
CN120670920A
Intelligent fault diagnosis method for acoustic gear under variable working conditions
CN121145000A