Fault Detection Method for Complex Electromechanical Systems Based on Causal Graph Attention Neural Network
By constructing a causal relationship graph and a causal graph attention neural network, adaptively calculating the weight of the parent node, and generating the child node embedding representation, the problem of difficulty in mining causal relationships in complex electromechanical systems is solved, and the accuracy and performance of fault detection are improved.
Patent Information
- Application Number
- CN202210975693.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-15
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2042-08-15
AI Technical Summary
Existing data-driven fault detection methods for complex electromechanical systems neglect the causal relationships and spatial structure between variables, resulting in limited detection performance. Furthermore, graph neural networks are prone to node feature convergence and over-smoothing.
By combining known causal relationships and constraint-based causal discovery methods, a causal relationship graph of monitoring variables for complex electromechanical systems is constructed. The parent node weights are adaptively calculated using a causal graph attention neural network to generate child node embedding representations. The node features are constrained by independent support scores, and the fault detection results are output using a fully connected neural network.
It improves the accuracy and performance of fault detection in complex electromechanical systems, enhances the efficiency of node feature extraction, and overcomes the shortcomings of relying solely on expert experience and data-driven causal discovery methods.
Smart Images

Figure CN115310837B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fault prediction and health management of complex electromechanical systems, and in particular to a fault detection method for complex electromechanical systems based on causal graph attention neural networks. Background Technology
[0002] As representatives of modern advanced technology, various complex electromechanical systems are constantly evolving. These systems are based on the comprehensive integration of various mechanical, electronic, and hydraulic (pneumatic) subsystems to ultimately achieve complex system functions. Compared to traditional mechanical or electronic systems, the structural and functional complexity of complex electromechanical systems is significantly increased: the coupling relationships between modules are more complex, and the boundaries between subsystems are increasingly blurred. Due to these factors, complex electromechanical systems are also more sensitive to their operating conditions. Minor anomalies or faults can trigger chain reactions through cascading and propagation, jeopardizing the operation of the entire system. Therefore, timely and effective fault detection and the discovery of abnormal operating conditions are key to ensuring the healthy operation of such systems and improving their safety and availability.
[0003] Current data-driven fault detection methods typically model the correlation between input variables and faults directly, neglecting the causal and spatial structural relationships between variables. Graph Neural Networks (GNNs) have demonstrated remarkable effectiveness in processing spatially structured data. GNNs utilize the non-Euclidean features provided by graph structures to extract information from nodes (feature variables) and their edges (relationships). GNNs have achieved significant breakthroughs in image and video classification tasks, inspiring their application in fault detection. However, while GNN-based methods have improved fault detection performance to some extent, current methods apply the same weights to all neighboring nodes, ignoring the differentiated contributions of different nodes. Furthermore, most current GNNs utilize graphs constructed using domain-specific knowledge, which struggle to capture the spatial structure of complex electromechanical systems with intricate fault mechanisms and numerous monitoring variables. Moreover, most GNN-based fault detection methods assume correlations between variables, resulting in limited performance and interpretability. Additionally, as the number of GNN layers increases, the features of each node tend to become similar, leading to over-smoothing.
[0004] Causal discovery can uncover causal relationships between events. In the field of fault detection, it can analyze complex causal mechanisms between monitored variables and understand the fault propagation process, thereby helping to improve the performance of fault detection models. However, for complex electromechanical systems, expert experience alone is often insufficient to fully uncover the causal relationships between variables in complex systems, while simply using data-driven methods to construct causal graphs can easily lead to problems such as unstable graph structures and obvious errors in the results. Summary of the Invention
[0005] To overcome the shortcomings of existing data-driven fault detection techniques for complex electromechanical systems, this invention provides a fault detection method for complex electromechanical systems based on a causal graph attention neural network. This method constructs a causal relationship graph of monitoring variables in complex electromechanical systems by combining known causal relationships with a constraint-based causal discovery method. This overcomes the problems that relying solely on expert experience is insufficient for analyzing complex systems, and that constraint-based causal discovery results may contain obvious errors. Then, using the proposed causal graph attention neural network, a multi-head causal attention mechanism is employed to adaptively calculate the weights of parent nodes and generate embedded representations of child nodes. Furthermore, the features extracted from each node are used to calculate independent support scores, which are then used as constraints in the loss function to extract node representations with causal separation properties. Finally, the representations of all nodes are mapped through a flat layer and a fully connected neural network to output the fault detection results of the target system. The fault detection method proposed in this invention can mine the complex relationships of high-dimensional monitoring variables in complex electromechanical systems from the perspective of causality, and overcomes the drawbacks of relying solely on expert experience and data-driven causal discovery methods. By utilizing a causal-based multi-head attention mechanism, it can adaptively calculate the weights of parent nodes (causal variables) and generate embedded representations of child nodes (outcome variables). It also calculates independent support scores for the features extracted from each node to constrain the causal separation characteristics of the node representations. Finally, the representations of all nodes are mapped through a flat layer and a fully connected neural network to output the fault detection results of the target system, effectively improving the performance of fault detection in complex electromechanical systems.
[0006] Specifically, the present invention provides a fault detection method for complex electromechanical systems based on a causal graph attention neural network, which includes the following steps:
[0007] S1: Combining known causal relationships with constraint-based causal discovery methods, and using monitoring variable data of complex electromechanical systems as input, construct a causal relationship graph of the system's monitoring variables. This specifically includes the following sub-steps:
[0008] S11: Determine causal path constraints and causal direction constraints based on existing knowledge;
[0009] S12: Generate the skeleton of the cause-effect graph and add or delete the corresponding edges according to the cause-effect path constraints;
[0010] S13: Perform data preprocessing to convert all data into numerical types, then use a constraint-based causal discovery algorithm to continue searching and constructing a causal graph, and add corresponding edges according to the causal direction constraints;
[0011] S14: Verify whether the causal discovery results satisfy the known relation constraints. If they do, output the causal graph. If they do not, adjust the parameter threshold of the PC algorithm and return to step S12. The PC algorithm is a classic constraint-based causal discovery algorithm.
[0012] S2: The proposed causal graph attention neural network is used to extract and learn the node representations of the causal graph, which specifically includes the following sub-steps:
[0013] S21: Calculate the attention coefficient based on causality. Input features for each node. Through trainable parameters WeR M×F Transform to a higher dimension, then apply an attention mechanism to each causal node pair (parent-child node pair, or cause-effect variable pair), and obtain the attention coefficients between causal pairs through a nonlinear activation function and standardization, as shown in Equation (1), where X j ∈X Pa(i) Represents child node X i The parent node, || represents the feature concatenation operation, and LeakyReLU is a non-linear activation function; for nodes without a parent node (let's assume it's X). i ), and its attention coefficient is defined as a. ij =0 (j≠i) and a ii =1;
[0014]
[0015] In the formula, W a These are trainable parameters; Representing node X respectively i X j The input features, and variable X j It is X i Cause variables; This indicates that node X i X j Input features After transforming to M dimensions using trainable parameters W and concatenating the results, the trainable parameters W are used. a Transform to 1 dimension;
[0016] S22: Node representations are generated using a multi-head causal attention mechanism. The representation of each node is a linear weighted sum of the features of all its parent nodes (causal variables), and a multi-head attention mechanism is employed to fully extract the features as shown in Equation (2), where... Represents node X i The newly generated representation; σ represents the activation function, and W k These represent the child node (outcome variable) X in the k-th head attention. i With one of its parent nodes (cause variable) X j The attention coefficients between nodes, and the trainable transformation parameters in the k-th head attention; K represents the total number of heads in the attention mechanism; thus, the new representation generated by each node includes a total of M×K dimensions;
[0017]
[0018] S3: Sum the features extracted from each causal graph attention neural network layer in step S2, and calculate the Independent Support Score (IOSS) for each node representation under different attention mechanisms, as shown in Equation (3), where N represents the total number of nodes. Represents node X i The representation, The β quantile for variable i in the calculation results:
[0019]
[0020] In the formula, U s Let be an M×K dimensional vector, representing the s-th random sample of the S-th random sampling of the joint distribution of independent support theory features of the nodes. This joint distribution is calculated by... The joint distribution is obtained, where This represents node X after maximum-minimum normalization. i The m-th dimension is represented by β; β′ and β″ represent the specific values of β; Represents node X i The newly generated representation includes M×K dimensions;
[0021] S4: The features extracted from all nodes are input into a flat layer and concatenated. The concatenated features are then input into a fully connected neural network containing a hidden layer and a single output layer. The activation function in the fully connected neural network performs non-linear processing on the features. The output layer is responsible for outputting the fault detection results of the complex electromechanical system.
[0022] Preferably, the causal path constraint in step S11 refers to determining variable X using existing knowledge. i and X j Whether a direct causal relationship exists or not, i.e., whether the constraint causal graph node X is present. i and X j The existence or non-existence of an edge; causal direction constraint refers to determining the variable X based on existing knowledge. i It is the causal variable X j The reason is the constraint on node X in the cause-effect graph. i It is X j Ancestor node;
[0023] Preferably, step S13 uses the PC algorithm as a constraint-based causal discovery algorithm;
[0024] Preferably, in step S4 during model training, the loss function includes two parts: the cross-entropy (CE) loss between the model output fault detection result and the true result, and the independent support score (IOSS) loss calculated by the model extracting node features. The calculation formula for cross-entropy is shown in equation (4), and the total loss of model training is shown in equation (5). By calculating the independent support score as a constraint, the causal separation property of the extracted features of each node can be constrained, which helps to alleviate the over-smoothing problem and improve the performance of feature extraction of each node. Here, n represents the number of input data samples, m represents the number of system feature categories, and y ij and p ij These represent the actual system state and the predicted system state, respectively, and α is the balance coefficient between the two losses.
[0025]
[0026] L = L CE +αIOSS (5)
[0027] Preferably, the causal graph attention neural network proposed in this invention is optimized using the Adam algorithm. The hyperparameters such as the high-dimensional space dimension M in step S21, the number of heads K in the causal attention mechanism in step S22, the quantile β in step S3, and the number of hidden layers and neurons in step S4 are determined by the grid search method.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] (1) This invention provides a fault detection method for complex electromechanical systems based on causal graph attention neural network. This method combines known causal relationships and constraint-based causal discovery methods to construct a causal graph reflecting the causal relationships between monitoring variables of complex electromechanical systems. Then, through the causal graph attention neural network, the features of parent nodes (causal variables) are adaptively aggregated to generate embedded representations of child nodes (outcome variables). The features extracted from each node are used as constraint terms in the loss function by calculating independent support scores and constraining the causal separability of the node representations. Finally, the representations of all nodes are mapped through a flat layer and a fully connected neural network to output the fault detection of complex electromechanical systems. This method can effectively improve the performance of current fault detection of complex electromechanical systems.
[0030] (2) This invention utilizes the characteristic that child nodes in a causal graph are influenced by their parent nodes to propose a causal graph attention neural network, which can adaptively calculate the weight of the parent node through the attention mechanism to generate the embedded representation of the child node, thereby realizing the aggregation of causal variables and the generation of embedded representation of the result variables based on their importance, which can improve the performance of fault feature extraction in complex electromechanical systems.
[0031] (3) This invention considers the problem that as the number of layers in a graph neural network increases, node features may converge and excessive smoothing may occur. It proposes to calculate an independent support score for the representation of each node and use it as a constraint term in the loss function. This will make the extracted node representations have causal separation properties, which will help improve the efficiency of node feature extraction.
[0032] (4) This invention utilizes known causal relationships and monitoring data to construct a causal graph of monitoring variables for complex electromechanical systems. Based on the causal information related to the occurrence and propagation of system faults, it combines the causal influence mechanism and considers the different importance of causal variables to extract features and ultimately achieve fault detection. This improves the accuracy and performance of fault detection in complex electromechanical systems and has extremely high economic and social benefits. Attached Figure Description
[0033] Figure 1 This is a schematic diagram of the steps of the fault detection method for complex electromechanical systems based on causal graph attention neural network proposed in this invention;
[0034] Figure 2 This is an exemplary step framework diagram of the fault detection method for complex electromechanical systems based on causal graph attention neural network proposed in this invention;
[0035] Figure 3 This is a simplified structural diagram of a high-speed rail braking system in an embodiment of the present invention;
[0036] Figure 4 This is a causal graph constructed in this embodiment of the invention by combining known causal relationships and a constraint-based causal discovery method. Detailed Implementation
[0037] Exemplary embodiments, features, and aspects of the present invention will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0038] Specifically, this invention provides a fault detection method for complex electromechanical systems based on a causal graph attention neural network, such as... Figure 1 As shown, it includes the following steps:
[0039] S1: Combining known causal relationships with constraint-based causal discovery methods, and using monitoring variable data of complex electromechanical systems as input, construct a causal relationship graph of the system's monitoring variables. This specifically includes the following sub-steps:
[0040] S11: Determine causal path constraints and causal direction constraints based on existing knowledge;
[0041] S12: Generate the skeleton of the cause-effect graph and add or delete the corresponding edges according to the cause-effect path constraints;
[0042] S13: Perform data preprocessing to convert all data into numerical types, then use a constraint-based causal discovery algorithm to continue searching and constructing a causal graph, and add corresponding edges according to the causal direction constraints;
[0043] S14: Verify whether the causal discovery results satisfy the known relation constraints. If they do, output the causal graph. If they do not, adjust the parameter threshold of the PC algorithm and return to step S12.
[0044] S2: The proposed causal graph attention neural network is used to extract and learn the node representations of the causal graph, which specifically includes the following sub-steps:
[0045] S21: Calculate the attention coefficient based on causality. Input features for each node. Through trainable parameters W∈R M×F Transform to M dimensions, where M≥2, and F represents the dimension of the original features. Then, apply an attention mechanism to each causal node pair (parent-child node pair, or cause-effect variable pair), and obtain the attention coefficients between causal pairs through a nonlinear activation function and standardization, as shown in Equation (1), where X j ∈X Pa(i) Represents node X j It is node X i The parent node, i.e., node X j It is node X i The causal variable is defined by ||, which represents the feature concatenation operation, and LeakyReLU is a non-linear activation function. For nodes without parent nodes, their attention coefficient is defined as a. ij =0 (j≠i) and a ii =1.
[0046]
[0047] In the formula, W a W are trainable parameters; Representing node X respectively i X j The input features, and node X j It is X i Cause variables; This indicates that node X i X j Input features After transforming to M dimensions using trainable parameters W and concatenating the results, the trainable parameters W are used. a Transform to 1 dimension;
[0048] S22: Node representations are generated using a multi-head causal attention mechanism. The representation of each node is a linear weighted sum of the features of all its parent nodes (causal variables), and a multi-head attention mechanism is employed to fully extract the features as shown in Equation (2), where... Represents node X i The newly generated representation; σ represents the activation function, and W k These represent the child node (outcome variable) X in the k-th head attention. i With one of its parent nodes (cause variable) X j The attention coefficients between nodes, and the trainable transformation parameters in the k-th head attention; K represents the total number of heads in the attention mechanism; thus, the new representation generated by each node includes a total of M×K dimensions.
[0049]
[0050] S3: Sum the features extracted from each causal graph attention neural network layer in step S2, and calculate the Independent Support Score (IOSS) for each node representation under different attention mechanisms, as shown in Equation (3), where N represents the total number of nodes. Represents node X i The j-th dimension representation, The β quantile for variable i in the calculation results:
[0051]
[0052] In the formula, U s Let be an M×K dimensional vector, representing the s-th random sample of the S-th random sampling of the joint distribution of independent support theory features of the nodes. This joint distribution is calculated by... The joint distribution is obtained, where This represents node X after maximum-minimum normalization. i The m-th dimension is represented by β; β′ and β″ represent the specific values of β. Represents node X i The newly generated representation includes M×K dimensions.
[0053] Quantiles, also known as quantile points, are numerical points that divide the probability distribution range of a random variable into several equal parts. Commonly used quantiles include the median (i.e., quartiles), quartiles, and percentiles. Here, it refers to the quantile for each U... s First, calculate its relationship with each The square of the distance is Please note that since there are N nodes in total, for each U... s We can obtain a series of N one-dimensional real values. Taking the β′ quantile of these N numbers, i.e., each U...s Each value will have a quantile, and all Us will eventually have a total of S 1-dimensional real values. Then, the quantile of β″ is taken from these S numbers as the final calculation result. The final calculation result is a 1-dimensional real number, i.e., the value of IOSS, which is used to represent the causal coupling loss represented by each dimension of the node.
[0054] S4: The features extracted from all nodes are input into a flat layer and concatenated. The concatenated features are then input into a fully connected neural network containing a hidden layer and a single output layer. The activation function in the fully connected neural network performs non-linear processing on the features. The output layer is responsible for outputting the fault detection results of the complex electromechanical system.
[0055] Preferably, the causal path constraint in step S11 refers to determining variable X using existing knowledge. i and X j Whether a direct causal relationship exists or not, i.e., whether the constraint causal graph node X is present. i and X j The existence or non-existence of an edge; causal direction constraint refers to determining the variable X based on existing knowledge. i It is the causal variable X j The reason is the constraint on node X in the cause-effect graph. i It is X j Ancestor node;
[0056] Preferably, step S13 uses the PC algorithm as a constraint-based causal discovery algorithm;
[0057] Preferably, in step S4 during model training, the loss function includes two parts: the cross-entropy (CE) loss between the model output fault detection result and the true result, and the independent support score (IOSS) loss calculated by the model extracting node features. The calculation formula for cross-entropy is shown in equation (4), and the total loss of model training is shown in equation (5). By calculating the independent support score as a constraint, the causal separation property of the extracted features of each node can be constrained, which helps to alleviate the over-smoothing problem and improve the performance of feature extraction of each node. Here, n represents the number of input data samples, m represents the number of system feature categories, and y ij and p ij These represent the actual system state and the predicted system state, respectively, and α is the balance coefficient between the two losses.
[0058]
[0059] L = L CE +αIOSS (5)
[0060] Preferably, the causal graph attention neural network proposed in this invention is optimized using the Adam algorithm. The hyperparameters such as the high-dimensional space dimension M in step S21, the number of heads K in the causal attention mechanism in step S22, the quantile β in step S3, and the number of hidden layers and neurons in step S4 are determined by the grid search method.
[0061] The following will provide a more detailed explanation of the fault detection process of this invention, based on operational status monitoring data collected from a high-speed railway braking system. Figure 3 This is a simplified structural diagram of a high-speed rail braking system. The system contains 39 monitored variables (including brake valve status, line voltage, line current, etc., referred to as X1, X2, ..., X39, respectively). The fault detection method for complex electromechanical systems based on multi-source causal graph path convolution proposed in this invention is employed, such as... Figure 2 As shown, the specific implementation steps are as follows:
[0062] S1: Combining known causal relationships with constraint-based causal discovery methods, and using data from 39 monitoring variables as input, a causal relationship diagram of the monitoring variables of the high-speed rail braking system is constructed. This specifically includes the following sub-steps:
[0063] S11: Based on existing knowledge, the causal path constraints and causal direction constraints of the monitoring variables in the high-speed rail braking system are determined as shown in Table 1.
[0064] S12: Generate the skeleton of the cause-effect graph and add or delete the corresponding edges according to the cause-effect path constraints;
[0065] S13: Data preprocessing is performed to convert all data into numerical types. Specifically, label encoding, dummy variable encoding, and other encoding methods are used to convert each category variable into a numerical type. The max-min method is used to normalize the data. For example, the train operation mode is a category variable, and its value does not show a numerical state. After label encoding, it is converted into a numerical code representing the corresponding state, such as 0, 1, 2. Then, a constraint-based causal discovery algorithm is used to continue searching and constructing a causal graph, and corresponding edges are added according to the causal direction constraints. The constraint-based causal discovery algorithm uses the PC algorithm.
[0066] S14: Verify whether the causal discovery results satisfy the known relation constraints. If they do, output the causal graph. If they do not, adjust the parameter threshold of the PC algorithm and return to S12.
[0067] Preferably, the causal path constraint in step S11 refers to determining variable X using existing knowledge. i and X j Whether a direct causal relationship exists or not, i.e., whether the constraint causal graph node X is present. i and X jThe existence or non-existence of an edge; causal direction constraint refers to determining the variable X based on existing knowledge. i It is the causal variable X j The reason is the constraint on node X in the cause-effect graph. i It is X j Ancestor nodes; the addition of known causal relationships can suppress errors generated by data-driven causal discovery algorithms and improve the reliability of results.
[0068] Preferably, step S13 uses the PC algorithm as a constraint-based causal discovery algorithm, and finally obtains the causal relationship diagram of the monitoring variables of the high-speed rail braking system, as shown below. Figure 4 As shown.
[0069] Table 1 establishes causal path constraints and causal direction constraints using known causal relationships.
[0070]
[0071] S2: Utilizing the proposed causal graph attention neural network to... Figure 4 The obtained causal graph node features are extracted and learned, which specifically includes the following sub-steps:
[0072] S21: Calculate the attention coefficient based on causality. Input features for each node. Through trainable parameters W∈R 2×1 The vector is transformed into a 2D vector, and then an attention mechanism is applied to each causal node pair (parent-child node pair, or cause-effect variable pair). The attention coefficients between causal pairs are obtained through a nonlinear activation function and standardization, as shown in Equation (1), where X j ∈X Pa(i) Represents child node X i The parent node, || represents the feature concatenation operation, LeakyReLU is a non-linear activation function, its calculation is shown in equation (2); for a node without a parent node, i.e. X36, its attention coefficient is defined as a 36,j =0 (j≠36) and a 36,36 =1.
[0073]
[0074]
[0075] S22: Node representations are generated using a multi-head causal attention mechanism. The representation of each node is a linear weighted sum of the features of all its parent nodes (causal variables), and a multi-head attention mechanism is employed to fully extract the features as shown in equation (3), where... Represents node X i The newly generated representation; using ELU as the activation function, the calculation formula is shown in equation (4), and W k These represent the child node (outcome variable) X in the k-th head attention. i With one of its parent nodes (cause variable) X j The attention coefficients between nodes, and the trainable transformation parameters in the k-th attention; a total of K=8 attention mechanisms are used; the new representation generated by each node includes 2×8 dimensions.
[0076]
[0077]
[0078] S3: The features extracted by the three-layer causal graph attention neural network are superimposed, and the Independent Support Score (IOSS) of each node under different attention mechanisms is calculated, as shown in Equation (5), where N represents the total number of nodes. Represents node X i The representation, The β quantile for variable i in the calculation results:
[0079]
[0080] In the formula, U s The s-th random sampling of S random samples represents the joint distribution of independent support theory features of nodes. This joint distribution is calculated by... Received, among which This represents node X after maximum-minimum normalization. i The m-th dimension is represented by β; β′ and β″ represent the specific values of β. Represents node X i The newly generated representation includes 2×8 dimensions.
[0081] S4: The features extracted from all nodes are input into a flat layer for concatenation. The concatenation result is input into a two-layer fully connected neural network containing 8 and 2 neurons respectively. Finally, the fault detection result of the high-speed rail braking system is output after passing through the sigmoid activation function: 0 indicates normal and 1 indicates fault.
[0082] Preferably, in step S4 during model training, the loss function includes two parts: the cross-entropy (CE) loss between the model output fault detection result and the true result, and the independent support score (IOSS) loss calculated by the model extracting node features. The calculation formula for cross-entropy is shown in equation (6), and the total loss of model training is shown in equation (7). By calculating the independent support score as a constraint, the causal separation of the extracted features of each node can be improved, which helps to alleviate the over-smoothing problem and improve the performance of feature extraction of each node. Here, n represents the number of input data samples, m = 2 represents the number of categories of system features, and yij and p ij These represent the actual system state and the predicted system state, respectively, and α = 1e-4 is the balance coefficient of the two losses.
[0083]
[0084] L = L CE +αIOSS (7)
[0085] Among them, L CE Let L be the cross-entropy loss function, and L be the loss function for model training.
[0086] Preferably, the causal graph attention neural network proposed in this invention is optimized using the Adam algorithm. The hyperparameters such as the high-dimensional space dimension M in step S21, the number of heads K of the causal attention mechanism in step S22, the quantile β in step S3, and the number of neurons in the hidden layer in step S4 are determined by the grid search method.
[0087] To further verify the effectiveness of the present invention and highlight its performance, the method of the present invention is compared with Support Vector Machine (SVM), Artificial Neural Network (ANN), Convolutional Neural Network (CNN), Traditional Graph Convolutional Neural Network (GCN), and Traditional Graph Attention Neural Network (GAT). Two common performance evaluation metrics for imbalanced data fault detection, F1 score and G-mean score, are selected as standards for method performance comparison. The calculation formulas for the scores are shown in equations (8) and (9).
[0088]
[0089]
[0090] Where precision = TP / (TP+FP), recall = TPR = TP / (TP+FN), TNR = TN / (TN+FP); TP, FP, TN and FN represent the number of samples correctly classified as faults, the number of samples incorrectly classified as faults, the number of samples correctly classified as normal, and the number of samples incorrectly classified as normal, respectively; F1 and G-mean are both in the range [0, 1] and the higher the value, the better the performance of the method.
[0091] The results obtained are shown in Table 2 below. The results show that the fault detection method for complex electromechanical systems proposed in this invention has excellent fault detection capabilities. The proposed method, which combines existing knowledge with a constraint-based causal discovery approach, can effectively extract the causal relationships of high-dimensional monitoring variables in complex electromechanical systems, thereby enabling fault detection modeling based on the causal influence of each component of the system. The proposed causal graph attention neural network can combine the properties of causal relationships and attention mechanisms to adaptively aggregate the features of parent nodes (causal variables) according to their different importance to generate embedded representations of child nodes (outcome variables), thus improving the performance of node feature extraction. In addition, this method uses independent support scores as constraints for node extraction representations, which can promote the causal separation properties of features under different attention mechanisms, thereby greatly improving the performance of the fault detection model.
[0092] Table 2 Evaluation of Fault Detection Results Indicators of the Invention Method and Comparative Methods
[0093] method F1 ratings G-mean score Method of the present invention 0.8473 0.9634 Traditional graph attention neural networks 0.7974 0.9574 Traditional graph convolutional neural networks 0.7951 0.8396 Support Vector Machine 0.6892 0.7451 Artificial Neural Networks 0.5454 0.6849 Convolutional Neural Networks 0.7470 0.7952
[0094] Finally, it should be noted that the above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A fault detection method for complex electromechanical systems based on causal graph attention neural networks, characterized in that: It includes the following step; S1: Combining known causal relationships with constraint-based causal discovery methods, and using monitoring variable data of complex electromechanical systems as input, construct a causal relationship graph of the system's monitoring variables. This specifically includes the following sub-steps: S11: Determine causal path constraints and causal direction constraints based on existing knowledge; S12: Generate the skeleton of the cause-effect graph and add or delete the corresponding edges according to the cause-effect path constraints; S13: Perform data preprocessing to convert all data into numerical types, then use a constraint-based causal discovery algorithm to continue searching and constructing a causal graph, and add corresponding edges according to the causal direction constraints; S14: Verify whether the causal discovery results satisfy the known relation constraints. If they do, output the causal graph. If they do not, adjust the parameter thresholds of the constraint-based causal discovery algorithm and return to step S12. S2: Extract and learn the node representations of the causal graph using a causal graph attention neural network, which specifically includes the following sub-steps: S21: Calculate the attention coefficient based on causality: input features of each node. Through trainable parameters Transform to dimension, And is a positive integer, F represents the dimension of the original feature, then applies a causal attention mechanism to each cause-effect node pair under each causal mechanism, and obtains the attention coefficients between causal pairs through a nonlinear activation function and standardization, as shown in Equation (1), where Represents a node It is a node The parent node, i.e., the node It is a node Cause variables, This represents the feature concatenation operation, with LeakyReLU being a non-linear activation function; for nodes without parent nodes, its attention coefficient is defined as... and , ; (1); In the formula, , These are trainable parameters; , Representing nodes respectively , The input features, and the nodes yes Cause variables; Indicates the node , Input features , Through trainable parameters After transforming to M dimensions and concatenating the data, trainable parameters are then used. Transform to 1 dimension; S22: Node representations are generated using a multi-head causal attention mechanism: the representation of each node is a linear weighted sum of the features of all its parent nodes, i.e., the causal variable features, and a multi-head attention mechanism is used to fully extract the features as shown in equation (2), where Represents a node The newly generated representation; Represents the activation function. and They represent the first time in the second month. In the head attention, child nodes With one of its parent nodes Attention coefficient between, and the first Trainable transformation parameters in head attention; This represents the total number of heads in the attention mechanism; thus, the new representations generated by each node include a total of [number missing]. One dimension; (2) ; S3: Sum the node representations extracted from each causal graph attention neural network layer in step S2, and calculate the Independent Support Score (IOSS) for each node representation under different attention mechanisms, as shown in equation (3), where This represents the total number of nodes. Represents a node The representation, The result represents the variables in the calculation. of The corresponding numerical value of the quantile: (3) ; In the formula, for A dimensional vector representing the joint distribution of independent support theory features of the nodes. The first random sampling Next, the theoretical joint distribution is calculated through... The joint distribution is obtained, where This represents the node after maximum-minimum normalization. The 3D characterization; and express The specific value; Represents a node The newly generated representations, including One dimension; S4: The features extracted from all nodes are input into a flat layer and concatenated. The concatenated features are then input into a fully connected neural network containing a hidden layer and a single output layer. The activation function in the fully connected neural network performs non-linear processing on the features. The output layer is responsible for outputting the fault detection results of the complex electromechanical system.
2. The fault detection method for complex electromechanical systems based on causal graph attention neural networks according to claim 1, characterized in that: In step S11, causal path constraint refers to determining variables based on existing knowledge. and Whether a direct causal relationship exists or not, i.e., whether the nodes in the constraint causal graph are constrained. and Does an edge exist between them? Causal direction constraints refer to determining variables based on existing knowledge. It is the causal variable Cause, i.e., constraint cause-effect graph nodes yes Ancestor node.
3. The fault detection method for complex electromechanical systems based on causal graph attention neural networks according to claim 1, characterized in that: The constraint-based causal discovery algorithm in step S13 is specifically the PC algorithm.
4. The fault detection method for complex electromechanical systems based on causal graph attention neural networks according to claim 1, characterized in that: In step S4, during model training, the loss function consists of two parts: the cross-entropy (CE) loss between the model's output fault detection result and the true result, and the independent support score (IOSS) loss calculated from the node features extracted by the model. The formula for calculating the cross-entropy is shown in equation (4), and the total loss of model training is shown in equation (5). By calculating the independent support score as a constraint, the causal separation of the extracted features of each node can be improved, which helps to alleviate the over-smoothing problem and improve the performance of feature extraction of each node. This indicates the number of input data samples. The number of categories representing system features. and These represent the actual system state and the predicted system state, respectively. It is the balance coefficient between the two losses; ; ; in, Let L be the cross-entropy loss function, and L be the loss function for model training.
5. The fault detection method for complex electromechanical systems based on causal graph attention neural networks according to claim 1, characterized in that: Based on the causal graph attention neural network and optimized using the Adam algorithm, the dimension in step S21 is... The number of heads in the causal attention mechanism in step S22 Quantities in step S3 The number of hidden layers and neurons in S4 were determined using a grid search method.
Citation Information
Patent Citations
Fault detection system based on Modelica model and method
CN105445581A
Motor fault diagnosis method for deep learning network of data fusion
CN110376522A