Explainable bearing fault diagnosis method based on causal graph embedding, terminal and medium
Patent Information
- Application Number
- CN202611518750.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-29
- Publication Date
- 2026-10-30
AI Technical Summary
该类方法能够在一定程度上利用指标之间的关联,但多数方法将不同时间上的传播影响与同一时刻的同步变化统一表示,难以反映轴承故障演化中的真实作用顺序
1、本发明针对现有技术中轴承故障诊断可靠性和可解释性有待提高的问题,构建了时滞因果图和瞬时因果图。通过分别提取机械健康因子在历史时间窗口内的延时传递效应与在同一时间窗口内的同步耦合作用,并在特征提取时仅沿父节点向子节点的方向传递消息,从而保留了真实的因果作用方向。该方案将复杂的轴承振动信号转化为两类图结构表征,使最终的故障分类结果能够直接回溯至具体的设备健康指标及其传递关系,解决了诊断输出难以被维护人员理解和追溯的实际工程问题。
Smart Images

Figure CN123012738A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of bearing fault diagnosis technology, specifically to an interpretable bearing fault diagnosis method, terminal, and medium based on cause-effect graph embedding. Background Technology
[0002] Rolling bearings are critical support components in rotating equipment such as motors, reducers, fans, pumps, and machine tools. When a failure occurs in the inner ring, outer ring, rolling elements, or cage, the vibration signal typically contains multiple information simultaneously, including periodic impacts, structural resonance, modulation components, random noise, and operating condition fluctuations. To achieve condition monitoring and fault diagnosis, existing technologies usually extract features from multi-channel vibration signals in the time domain, frequency domain, envelope spectrum domain, or time-frequency domain, and then use a classification model to output the fault category.
[0003] With the development of graph neural networks and causal discovery methods, some technologies have begun to use sensor channels, health indicators, or feature variables as graph nodes, and to pass messages based on correlation, spatial connectivity, or single causal relationships. These methods can utilize the correlations between indicators to some extent, but most methods unify the propagation effects at different times with synchronous changes at the same moment, making it difficult to reflect the true sequence of actions in the evolution of bearing failures.
[0004] In actual operation, changes in one health indicator in the past window may affect the state of another health indicator in the current window through mechanical transmission, impact excitation, or energy diffusion. Simultaneously, multiple health indicators may also change synchronously within the same window due to shared rotational speed, load, structural coupling, or fault excitation. The former represents a time-delay propagation relationship, while the latter represents an instantaneous coupling relationship. Identifying these two types of relationships and transforming them into structured representations that can serve diagnostic decision-making is crucial for improving the reliability and interpretability of fault diagnosis. Summary of the Invention
[0005] To address the technical problem that the reliability and interpretability of bearing fault diagnosis in the prior art need to be improved, this invention provides an interpretable bearing fault diagnosis method, terminal, and medium based on causal graph embedding.
[0006] To achieve the above objectives, the present invention provides the following technical solution: This invention discloses an interpretable bearing fault diagnosis method based on causal graph embedding, comprising: S1. The collected multi-channel vibration signal of the bearing is segmented and preprocessed to extract mechanical health factors and construct a health factor time series; the mechanical health factors are time-domain characteristic variables, frequency-domain characteristic variables or envelope spectrum domain characteristic variables that characterize the bearing's operating state; S2. For the health factor time series, conditional independence is tested layer by layer in order from long time lag to short time lag. The parent nodes identified under the longer time lag are inherited into the condition set of the candidate edges under the shorter time lag. The conditional dependency strength of the candidate edges under the shorter time lag is calculated based on the condition set. The causal edge weight is calculated accordingly to obtain the time-lag causal graph. S3. Use the parent nodes in the time-delay causal graph to predict and remove the historical effects of mechanical health factors to obtain the residual sequence. Establish two prediction models in opposite directions for the variables in the residual sequence. Based on the difference in prediction gain between the two prediction models and the difference in independence between the causal variables and the prediction error, determine the instantaneous causal direction and obtain the instantaneous causal graph through global acyclic optimization. S4. In time-delay causal graphs and instantaneous causal graphs, messages are passed only along the parent-to-child direction to obtain node representations. The node representations are decomposed into cross-graph common representations and graph-specific representations. An adaptive causal fusion gate is set to dynamically determine the fusion ratio of graph-specific representations of the two types of causal graphs, and aggregated with cross-graph common representations into sample-level diagnostic representations. S5. Input the sample-level diagnostic representation into the fault classifier to obtain the classification result of the fault category. Combine the classification result to calculate the contribution of each candidate directed path, thereby selecting several candidate directed paths as the structured interpretation result.
[0007] As a further improvement to the above scheme, step S1 specifically includes: The multi-channel vibration signal of the bearing is segmented by a sliding window, and each signal segment is processed by a robust normalization method based on the median and interquartile range to suppress interference. Mechanical health factors are extracted from each signal segment; wherein the categories of mechanical health factors include root mean square, kurtosis, peak factor, impulse factor, envelope spectrum characteristic frequency energy, resonant band energy, and band energy entropy. Mechanical health factors are arranged in chronological order to form a health factor time series.
[0008] As a further improvement to the above scheme, step S2, which involves calculating the conditional dependency strength of short-delay candidate edges based on the condition set, and calculating the causal edge weights accordingly to obtain a time-delay causal graph, specifically includes: The time series of health factors is divided into multiple sub-windows; In each sub-window, the statistic of the short-delay candidate edge is calculated by the kernel conditional independence test, and the conditional dependence strength is calculated based on the relative relationship between the statistic and the critical value corresponding to the significance level. Based on the standard deviation and average value of the conditional dependence strength in multiple sub-windows, the cross-window stability coefficient is calculated to characterize the stability of the repeated occurrence of short-delay candidate edges in different sub-windows. The causal edge weights are obtained by multiplying the average value of the conditional dependency strength in each sub-window, the cross-window stability coefficient, and the time delay decay term. The time delay decay term is calculated based on the time delay order and a preset time delay decay coefficient, and the time delay decay term decreases as the time delay order increases. When the weight of the causal edge exceeds a preset threshold, it is determined that there is a corresponding time-delayed causal edge, and thus the time-delayed causal graph is obtained.
[0009] As a further improvement to the above scheme, step S3 specifically includes: For each mechanical health factor, a regression model is established using its parent node in the time-delay causal graph. The historical propagation components predicted by the regression model are then separated from the mechanical health factors at the current moment to obtain the residual sequence. For any two residual variables in the residual sequence, two nonlinear prediction models with opposite directions are established to obtain the prediction error generated by using the cause variable to predict the target variable. The variance ratio term, composed of the prediction error and the target variable, and the independence penalty term, composed of the causal variable and the prediction error, are weighted and combined to calculate the asymmetric direction score for each direction; when the difference in asymmetric direction scores in opposite directions is greater than a preset threshold, candidate instantaneous causal edges in the corresponding direction are determined. By globally optimizing the acyclic objective function, which includes the asymmetric direction score and the sparse regularization term, redundant edges are suppressed and an instantaneous causal graph that satisfies the acyclic constraint is output.
[0010] As a further improvement to the above scheme, in step S4, a loss function is also used to keep the cross-graph common representations of the two types of causal graphs consistent and to reduce the redundancy between the graph-specific representations of the two types of causal graphs. Specifically, by concatenating the cross-graph common representations, the graph-specific representations and the numerical features of the mechanical health factor at the current moment, the node-level adaptive causal fusion gate coefficients are obtained through an activation function, thereby obtaining the fused node representation of each node. Attention pooling is performed on the fused node representations of all nodes to aggregate and obtain the sample-level diagnostic representation.
[0011] As a further improvement to the above scheme, in step S5, the overall objective function for training the fault classifier is: ; In the formula, For the overall goal; Cross-entropy loss for fault categories; Cross-graph common representation consistency loss is used to ensure that the cross-graph common representations of two types of causal graphs remain consistent. The orthogonal constraint loss is used to reduce the degree of redundancy between the graph-specific representations of the two types of causal graphs. The loss is used to preserve the causal edge structure and to constrain the representation of the parent node of the causal edge in the causal graph to be close to the representation of the child node after the direction mapping, and the representation distance of the node pair without causal edge is greater than a preset interval. and This is a sparsity constraint used to suppress unnecessary causal edges; where The adjacency matrix represents the time-delay causal graph. Represents the adjacency matrix of an instantaneous cause-effect graph. It is an L1 norm; , , and These are the weighting coefficients for each type of loss.
[0012] As a further improvement to the above scheme, cross-graph common representation consistency loss Orthogonal constraint loss and causal edge structure preservation loss The calculation formulas are as follows: ; ; ; In the formula, The number of samples; The quantity of mechanical health factors; and Represent the time-delay causality graph and the instantaneous causality graph, respectively. Cross-graph common representation of nodes; and Represent the time-delay causality graph and the instantaneous causality graph, respectively. The graph-specific representation of each node, with superscript It is the transpose symbol; To prevent constants with a denominator of zero; Let be the set of causal edges existing in the two types of causal graphs; For nodes Pointing to node Causal boundary weight; , , They are nodes ,node and nodes Node representation; A direction mapping function set for time-delay causal graphs or instantaneous causal graphs; The preset distance interval between non-causal node pairs; It is an L2 norm.
[0013] As a further improvement to the above scheme, step S5, the method for calculating the contribution of candidate directed paths specifically includes: The local contribution of the mechanical health factor corresponding to the target fault category is calculated by differentiating the node representation based on the classification output value of the fault classifier; the contribution of a candidate directed path is defined as the product of the local contribution of the end node of the path and the product of the causal edge weights of each segment on the path and the fusion gate coefficients of the corresponding nodes. Among them, the top few candidate directed paths are output as the structured interpretation results, arranged from high to low according to their path contribution.
[0014] The present invention also discloses a computer terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the interpretable bearing fault diagnosis method based on causal graph embedding as described above.
[0015] The present invention also discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the interpretable bearing fault diagnosis method based on causal graph embedding as described above.
[0016] Compared with the prior art, the beneficial effects of the present invention are: 1. This invention addresses the issue of insufficient reliability and interpretability in existing bearing fault diagnosis technologies by constructing time-delay causal graphs and instantaneous causal graphs. By extracting the delayed propagation effect of mechanical health factors within a historical time window and the synchronous coupling effect within the same time window, and by propagating messages only along the direction from parent node to child node during feature extraction, the true causal direction is preserved. This scheme transforms complex bearing vibration signals into two types of graph structures, enabling the final fault classification result to be directly traced back to specific equipment health indicators and their propagation relationships, thus solving the practical engineering problem of diagnostic outputs being difficult for maintenance personnel to understand and trace.
[0017] 2. This invention employs robust normalization based on the median and interquartile range for each signal segment, reducing the interference of random shocks and anomalous sampling points on the health factor construction process. When constructing the time-delay causal graph, causal edge weights are determined by jointly calculating the conditional dependency strength, cross-window stability coefficient, and time-delay decay term. This weighting mechanism filters out pseudo-connections caused by local noise in the generated graph structure, preserving physical propagation paths that can stably repeat across multiple time windows and have short effective propagation distances.
[0018] 3. Before identifying the instantaneous causal direction, this invention uses time-delayed parent nodes to predict and remove the historical propagation components of the current health factor, avoiding misjudging common historical variables as current instantaneous coupling relationships. Simultaneously, by defining asymmetric direction scores and introducing a global acyclic optimization model, contradictory redundant edges are eliminated, ensuring that the output instantaneous causal graph has consistent directions, conforming to the actual mechanical action sequence during bearing operation.
[0019] 4. This invention decomposes node representation into cross-graph common representation and graph-specific representation, enabling the model to retain both shared fault features and unique propagation semantics of the two graphs. In the diagnostic result output stage, the contribution of candidate directed paths is calculated by combining node gradient sensitivity, causal edge weights, and fusion gate coefficients. Ultimately, a structured chain of "health factor change - causal relationship - fault category" is output to the user, directly providing specific path guidance for equipment maintenance and troubleshooting. Attached Figure Description
[0020] Figure 1 This is a flowchart of the interpretable bearing fault diagnosis method based on causal graph embedding in Embodiment 1 of the present invention.
[0021] Figure 2 This is a schematic diagram of the structure of the computer terminal in Embodiment 3 of the present invention. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] Example 1 This embodiment provides an interpretable bearing fault diagnosis method based on causal graph embedding. The method takes multi-channel vibration signals collected during bearing operation as input and sequentially performs health factor construction, time-delay causal graph identification, instantaneous causal graph identification, direction-aware dual-graph embedding, cross-graph collaborative fusion, and fault classification and causal path interpretation.
[0024] Please see Figure 1 The diagnostic method includes steps S1 to S5.
[0025] S1. The acquired multi-channel vibration signals of the bearing are segmented and preprocessed to extract mechanical health factors and construct a time series of health factors. Step S1 specifically includes: Multi-channel vibration signals from different measuring points or directions are collected during bearing operation. The original signal of the c-th channel is denoted as... .
[0026] Use a length of The sliding window segments each channel of the bearing's multi-channel vibration signal, with an overlap rate of η between adjacent windows. The nth signal segment is represented as: ; For each signal segment, detrending, outlier suppression, and robust normalization are performed. The robust normalization expression is: ; Where Median(·) represents the median, IQR(·) represents the interquartile range, and ε is a small constant to prevent the denominator from being zero. Using the median and interquartile range for scaling can reduce the interference of accidental shocks and anomalous sampling points on the health factor construction process.
[0027] Mechanical health factors are extracted from each signal segment; wherein, the categories of mechanical health factors include root mean square, kurtosis, peak factor, impulse factor, envelope spectrum characteristic frequency energy, resonant band energy, and band energy entropy; for the q-th type of bearing fault characteristic frequency, its normalized envelope spectrum energy is defined as: ; in, Let n be the envelope spectrum of the nth signal segment. It is a set of frequency bands constructed centered on the corresponding fault characteristic frequency and its harmonics. To analyze the frequency range.
[0028] The health factors in the time domain, frequency domain, and envelope spectrum are arranged in chronological order to form a time series of health factors: ; in, The health factor time series (vector) formed for the nth signal segment; For the first The values of each health factor at time n; The total number of health factors; the superscript T is the transpose symbol. In some optional embodiments, in addition to being composed of the aforementioned artificial time-domain, frequency-domain, envelope spectral-domain, or time-frequency-domain features, health factors can also be generated by autoencoders, variational autoencoders, contrastive learning encoders, or physically constrained encoders, but the interpretable correspondence between health factors and bearing operating states should be maintained. Unlike directly using the original vibration signal or latent variables without physical meaning as graph nodes, this invention uses health factors with clear mechanical meaning as causal graph nodes, enabling subsequent causal structures and diagnostic results to correspond to specific impacts, modulations, energy, and statistical characteristics. In some embodiments, the sliding window length... The sampling points are set to 2048, and the overlap rate η between adjacent windows is set to 50%. The above parameters can be adjusted according to the sampling frequency and bearing speed.
[0029] S2. For the health factor time series, conditional independence is tested layer by layer in order from long time lag to short time lag. The parent nodes identified under the longer time lag are inherited into the condition set of the candidate edges under the shorter time lag. The conditional dependency strength of the candidate edges under the shorter time lag is calculated based on the condition set. The causal edge weight is calculated accordingly to obtain the time-lag causal graph.
[0030] Let the maximum time delay order be health factors In the Candidate time delay variables during layer search are represented as follows: ; This invention does not search all time-delay relationships simultaneously, but instead identifies candidate causal edges layer by layer in the order of "long time delay - short time delay". For candidate relationships... From the maximum time delay order Begin performing conditional independence tests sequentially for smaller time delay orders. During layer search, target health factors The corresponding condition set is defined as follows: ; In the formula, Target health factors In the The set of conditions for layer search; This is the set of parent nodes that have been determined in a longer time delay order; This is the set of other candidate variables adjacent to the target node at the current time delay order. By inheriting the identified long-delay parent nodes into the condition set of short-delay relationships, pseudo-short-delay correlations caused by long-delay propagation paths can be excluded.
[0031] For candidate edges The conditional kernel dependency statistic is calculated using the kernel conditional independence test: ; In the formula, Candidate edges Conditional kernel dependency statistic; This is the function for the kernel conditional independence test. The test is performed when the result rejects the conditional independence hypothesis and the statistic exceeds the significance level. Corresponding critical value If necessary, the candidate edge will be temporarily retained.
[0032] In other alternative implementations, the kernel conditional independence test can be replaced by a partial correlation test, a conditional mutual information test, an independence test based on regression residuals, or other statistical methods that can determine conditional dependencies.
[0033] To avoid instability of causal edges due to single sample partitioning or local noise, this invention employs a multi-window repeated testing mechanism. The health factor time series is divided into B sub-windows, and the conditional dependency strength of candidate edges is calculated in the b-th sub-window: ; in, Candidate edges in the b-th sub-window The strength of conditional dependence; Candidate edges in the b-th sub-window Conditional kernel dependency statistic; To obtain the maximum value.
[0034] Further define the cross-window stability coefficient of candidate causal edges: ; In the formula, is the cross-window stability coefficient of the candidate edge; The function to calculate the standard deviation in the b-th sub-window; This is a function to calculate the average value in the b-th sub-window.
[0035] It should be noted that the cross-window stability coefficient can also be calculated using occurrence frequency, Bootstrap confidence interval, or Bayesian posterior probability in other implementations.
[0036] This invention proposes a causal edge weighting mechanism that simultaneously considers conditional dependency strength, cross-window stability, and propagation delay length, defining the delay causal edge weight as: ; In the formula, Candidate edges Time-delay causal edge weights; This represents the average value of the conditional dependency strength across the B sub-windows. The time-delay decay coefficient; This is the natural exponential function. The above formula assigns higher weights to candidate edges that have strong conditional dependencies, can recur stably across multiple time windows, and have short effective propagation distances, unlike graphing methods that only use binary adjacency relations or single-test statistics. When Greater than the preset threshold At that time, it is determined that a causal edge exists. and will Add the target node to the set of its parent nodes. After completing the search for all time delay orders, the time-delay causal graph is obtained. : ; In the formula, A set of nodes; It is a set of time-delayed causal edges; It is the set of time-delayed causal edge weights.
[0037] In some embodiments, the maximum time delay order Set the significance level to 3. Set to 0.05, time delay decay coefficient Set it to 0.3, and set the cross-window stability coefficient threshold to 0.6.
[0038] S3. Use the parent nodes in the time-delay causal graph to predict and remove the historical effects of mechanical health factors to obtain the residual sequence. Establish two prediction models in opposite directions for the variables in the residual sequence. Based on the difference in prediction gain between the two prediction models and the difference in independence between the causal variables and the prediction error, determine the instantaneous causal direction and obtain the instantaneous causal graph through global acyclic optimization.
[0039] Since the correlation between health factors at the current moment may be caused by a common historical parent node, this invention first uses the time-delayed parent nodes obtained in step S2 to explain the historical changes of each health factor. For the j-th health factor, a kernel ridge regression model is established based on its set of time-delayed parent nodes: ; In the formula, In order to target the The optimal kernel ridge regression model (function) obtained by solving for each health factor is used to predict and remove historical effects; For the regenerated nucleus Hippospace; The nonlinear prediction mapping function to be optimized; For the target node The input vector consisting of all time-delayed parent nodes; To use the kernel ridge regression model and historical time-lag parent nodes to predict the historical propagation components of health factors at the current moment; is the regularization coefficient for the kernel ridge regression model; For function In the regenerating nucleus Hilbert space The square of the norm in the model is used as a regularization term to constrain the model complexity.
[0040] In other implementations, the historical effect prediction model may employ not only kernel ridge regression, but also Gaussian process regression, generalized additive model, neural network regression, or other nonlinear regression models.
[0041] By separating historical transmission components from current health factors, the residual sequence is obtained: ; In the formula, The residual sequence variables are obtained after removing the historical propagation components; To utilize the optimal kernel ridge regression model And the historical time lag parent node, predicting the historical propagation components of the health factor at the current moment.
[0042] Subsequently, for any two residual variables and Two nonlinear prediction models in opposite directions are established respectively: ; ; In the formula, Indicates the direction The established nonlinear prediction model function; Indicates the use of causal variables predict The resulting prediction residuals.
[0043] Target direction This invention defines an asymmetric direction score that simultaneously considers prediction gain and cause-noise independence: ; In the formula, For direction Asymmetric direction score; This is the variance operation function; This is the independence penalty coefficient; This is the Hilbert-Schmidt Independence Criterion.
[0044] In other implementations, HSIC in instantaneous orientation determination can be replaced by distance covariance, mutual information, or other independence measures.
[0045] When the true direction is At that time, utilize predict A higher predictive gain should be obtained, while the causal variable Compared with the predicted residual It should have low statistical dependence. The direction discrimination rule is:
[0046] When the score difference in opposite directions is greater than γ, a reverse causal edge is determined; when the score difference between the two directions does not exceed γ, an instantaneous directed edge is not established to reduce incorrect orientation under uncertain directional conditions.
[0047] To avoid the formation of contradictory directed cycles in the instantaneous causal graph, this invention performs global acyclic optimization on the initial direction score matrix D, and the instantaneous adjacency matrix... We obtain the following by solving the equation: ; ; In the formula, Represents the Hadamard product; The sparse constraint coefficient; It is an L1 norm; is the acyclic constraint function for the adjacency matrix; The trace operation is performed on the matrix. In some alternative implementations, the above global acyclic optimization, in addition to solving the continuous constraint model, can also employ augmented Lagrange multiplication, projected gradient, greedy edge-removal, or discrete optimization methods based on topological sorting. The above equation, while retaining high-direction causal edges and suppressing redundant edges, ensures that the instantaneous causal graph satisfies the acyclic constraint, ultimately yielding the instantaneous causal graph: ; In the formula, It is a set of instantaneous causal edges; It is the instantaneous set of causal edge weights.
[0048] In some alternative implementations, in addition to solving the continuous constraint model, the above-mentioned global acyclic optimization can also employ augmented Lagrange method, projected gradient method, greedy edge deletion method, or discrete optimization method based on topological sorting.
[0049] The above process first strips away the influence of historical transmission, and then identifies the directional relationships at the same moment, which can reduce the possibility of misidentifying common historical causes as instantaneous causal relationships.
[0050] S4. In both time-delay causal graphs and instantaneous causal graphs, messages are passed only from parent to child to obtain node representations. The node representations are decomposed into cross-graph common representations and graph-specific representations. An adaptive causal fusion gate is set to dynamically determine the fusion ratio of graph-specific representations of the two types of causal graphs, and then aggregated with the cross-graph common representations into a sample-level diagnostic representation.
[0051] For the A health factor, extracting its most recent... The sequence of local changes at each time step: ; In the formula, For the first A health factor recently A sequence of local changes at each time point.
[0052] Initial node representations are obtained using a one-dimensional temporal convolutional encoder: ; In the formula, For the first Initial representation of each node; This represents a one-dimensional temporal convolutional encoder function.
[0053] For time-delayed cause-effect graphs, message passing follows the direction from parent node to child node. The time-delayed causal messages received by each node are: ; in, For the first Time-delayed causal messages received by each node; The time-delayed causal edge weights are normalized to in-degree. For the first Learnable time delay codes corresponding to each time delay order; This is a vector feature concatenation operator.
[0054] For instantaneous causal graphs, the first The instantaneous causal messages received by each node are: ; In the formula, For the first The instantaneous causal messages received by each node; The instantaneous causal boundary weights are normalized by in-degree.
[0055] The node representations of the time-delay graph branch and the instantaneous graph branch are as follows: ; ; In the formula, In the time-delay plot branch, the first The representation of each node; It is a non-linear activation function; and These are the learnable weight matrices corresponding to the node feature maps in the time-delay graph branch and the instantaneous graph branch, respectively. In the instantaneous graph branch, the first The representation of each node.
[0056] In other implementations, the model that implements the above dual-graph embedding network structure can be replaced by a directed graph convolutional network, a graph attention network, a message-passing neural network, or a graph Transformer.
[0057] This invention does not undirect the directed causal graph, nor does it allow child nodes to pass messages back to their parent nodes, thus avoiding the loss of causal direction information caused by the symmetry of the adjacency matrix in traditional graph convolution. Furthermore, the node representations of the two graph branches are decomposed into common representations and graph-specific representations, respectively: ; In the formula, Variables referring to two categories of cause-effect graphs; For nodes in the graph The common representation in the graph represents the common fault information that should be retained in both types of causal graphs; For nodes in the graph The unique characteristics of the diagram in the text; and These are the mapping matrices used to extract common and unique representations, respectively.
[0058] In optional implementations, the public-private representation decomposition can be achieved not only through the above-described mapping decomposition, but also through orthogonal constraints, mutual information constraints, adversarial decoupling, or subspace projection.
[0059] Employing cross-graph common representation consistency loss: ; In the formula, For cross-graph common representation consistency loss, this formula enables two graph branches to form a consistent common description of the same fault state; Divide the time window into corresponding total number of samples; It is the square of the L2 norm.
[0060] Simultaneously, graph-specific representations of orthogonal constraints are employed: ; In the formula, For graph-specific representation orthogonal constraint loss, this formula reduces the degree of redundancy between the two types of graph-specific information; superscript This is the transpose symbol.
[0061] This invention further includes a node-level adaptive causal fusion gate: ; In the formula, For the first Node-level adaptive causal fusion gate coefficients for each node; For activation functions; and These are the fusion gate mapping weight matrix and the bias term, respectively.
[0062] In other alternative implementations, the node-level adaptive fusion gate can be replaced with scalar gating, vector gating, cross-attention, or a hybrid expert mechanism.
[0063] The final fusion node representation is defined as: ; In the formula, To fuse the features of the two branches, the first The final node representation of each node; For element-wise product; This is the weight matrix for mapping health factors. The above formula does not simply add the time-delay graph and the instantaneous graph at a fixed ratio, but rather adaptively determines the fusion ratio of historical propagation information and instantaneous coupling information based on different nodes, samples, and fault states. Attention pooling is performed on all node representations, thereby obtaining sample-level diagnostic representations. : ; ; In the formula, For the first Attention pooling weights for each node; and These are the learnable parameter vector and mapping matrix of the attention pooling layer, respectively; It is the hyperbolic tangent activation function.
[0064] S5. Input the sample-level diagnostic representation into the fault classifier to obtain the classification result of the fault category. Combine the classification result to calculate the contribution of each candidate directed path, thereby selecting several candidate directed paths as the structured interpretation result.
[0065] Inputting the sample-level diagnostic representation into the fault classifier yields the predicted probability for each fault category: ; In the formula, Output variables for the predicted probability of each fault category; and These are the learnable weight matrix and bias term of the fault classification output layer, respectively.
[0066] To ensure that the learned node representations are consistent with the identified causal structures, this invention employs a causal edge structure preservation loss. For causal edges present in the graph, the representation of the parent node after direction mapping is required to be close to the representation of its child node; for node pairs not present in the graph, their representation distance is required to be greater than a preset interval. ; In the formula, To preserve the loss in the causal edge structure; Let be the set of causal edges existing in the graph; A direction mapping function set for time-delay plots or instantaneous plots; The preset representation distance interval constant for non-causal node pairs.
[0067] The overall training objective function of the model is: ; In the formula, For the overall goal; , , and These are the weighting coefficients for each type of loss; and As a sparsity constraint, it is used to suppress unnecessary causal edges and improve the simplicity of causal structure and diagnostic interpretation results.
[0068] After completing the fault classification, the node contribution is calculated based on the gradient sensitivity of the classification output to the representation of each node. For the c-th fault category, the... The local contribution of a health factor is defined as follows: ; in, In order to target the The fault category, the first The local contribution of each health factor; For the first The classification output values corresponding to each fault category; This is the partial derivative operator. For nodes... Reaching a node via several causal edges causal path Define the path for the first Contribution of each fault category for: ; in, Representing causal paths The first The node and the first One node; causal path The number of hops in a node; For nodes on the path The corresponding fusion gate influence coefficient. The above formula simultaneously considers the sensitivity of the classification model to the target node, the structural weight of each causal edge, and the actual adoption degree of the two-graph fusion gate for the two types of causal information. Arranged from high to low according to the path contribution, the top K key causal paths are output, forming a structured interpretation result of "health factor change - time-delay or instantaneous causal relationship - fault category".
[0069] In other implementations, the contribution of a causal path can be estimated not only by the gradient calculation described above, but also by integral gradient, feature masking, or counterfactual perturbation methods.
[0070] Example 2 The method proposed in Example 1 will be explained below with reference to the data from the rolling bearing test bench.
[0071] 1. Data Collection and Health Factor Construction Vibration acceleration sensors are arranged horizontally, vertically, and axially in the bearing housing, and can simultaneously acquire vibration velocity, vibration displacement, or current signals. The sampling frequency is set to 51.2 kHz, and the continuous signal is divided into analysis windows of 2048 sampling points, with an overlap rate of 50% between adjacent windows. Detrending and robust normalization are performed on each window.
[0072] From each window, the root mean square, kurtosis, peak factor, impulse factor, spectral kurtosis, energy of the inner ring fault characteristic frequency of the envelope spectrum, energy of the outer ring fault characteristic frequency, energy of the rolling element fault characteristic frequency, energy of the resonance band, and the band energy entropy are extracted to form a 10-dimensional health factor vector. Each characteristic frequency considers its first three harmonics, and the integration band is defined by one revolution frequency on each side of the center frequency.
[0073] 2. Time-delay causal graph identification and stable edge weight calculation Maximum time delay order The threshold was set to 3, dividing the complete health factor time series into 10 continuous sub-windows. The conditional independence test used a Gaussian radial basis function kernel, with the kernel width determined by the median pairwise distance between samples. The significance level α was set to 0.05. The candidate edges are checked in order, and the following is used: Inherit the parent node that has been determined under a longer time lag into the subsequent condition set.
[0074] Calculate the conditional dependency strength in 10 sub-windows for each candidate edge. and stability coefficient Then calculate the final edge weights. The time-delay decay coefficient Set to 0.3. When a candidate edge passes the significance test in at least 6 sub-windows, and the final edge weight... If the value is not less than 0.15, the edge is retained in the time-delay causal graph.
[0075] 3. Instantaneous causal direction determination and acyclic optimization For each health factor, a kernel ridge regression model is trained using its pre-determined time-delay parent node, with regularization coefficients... Set to 10 -3 And obtain the residual sequence after removing historical effects. For any pair of residual variables, establish Gaussian kernel regression models in two directions respectively, based on... Calculate the score for the asymmetric direction, where the independence penalty coefficient is... Set to 0.5, directional difference threshold Set it to 0.05.
[0076] Input the candidate edges that satisfy the direction difference threshold. The acyclic optimization model shown has sparse coefficients. Set to 10 -2 The augmented Lagrange method is used to iteratively update the instantaneous adjacency matrix until the acyclic constraint function is obtained. Less than 10 -8 Or, by reaching the preset maximum number of iterations, an instantaneous causal graph can be obtained.
[0077] 4. Dual-graph embedding network and joint training For each health factor, the most recent 32 time windows constitute a local sequence. The node encoder sequentially uses two layers of one-dimensional convolution: the first convolution has 16 channels, a kernel length of 9, and a stride of 2; the second convolution has 32 channels, a kernel length of 9, and a stride of 2. Subsequently, an initial 128-dimensional node representation is obtained through adaptive average pooling and a fully connected layer.
[0078] The time-delay graph branch and the instantaneous graph branch each have two layers of direction-aware graph message passing layers. Introducing learnable time-delay coding, the instantaneous graph branches according to Aggregate the parent node information at the current moment. The two branches generate a 64-dimensional common representation and a 64-dimensional graph-specific representation, respectively, and then... and The node-level adaptive fusion gate obtains the final node representation.
[0079] The Adam optimizer was used for training, with an initial learning rate set to 10. -3 The batch size is set to 64. The total loss function is adopted. ,in , , and Set them to 0.1, 0.05, 0.1 and 10 respectively. -4During training, the optimal model is saved based on the fault classification accuracy on the validation set. The dimensions, learning rate, and weight coefficients mentioned above can all be adjusted according to the device type and data size.
[0080] 5. Fault Output and Path Explanation The fused graph-level representation is input into a Softmax classifier, which outputs the probabilities of normal operation, inner race fault, outer race fault, and rolling element fault. For the fault category with the highest predicted probability, the following steps are performed: Calculate the local contribution of each health factor and enumerate candidate directed paths of length no more than 4, according to... Calculate path contribution. The system outputs the 5 paths with the highest contribution, along with their corresponding node contributions, edge weights, time delay orders, and fusion gate coefficients.
[0081] For example, when the system determines that the fault is an inner circle fault, it can output the critical path of "inner circle fault characteristic frequency energy increases → impact factor with lag of 1 window increases → current kurtosis increases → inner circle fault", so that maintenance personnel can simultaneously view the fault category, critical health factors and their historical propagation or instantaneous coupling relationship.
[0082] Example 3 This embodiment provides a computer terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the interpretable bearing fault diagnosis method based on causal graph embedding as described in Embodiment 1.
[0083] like Figure 2 As shown, the computer terminal provided in this embodiment includes: at least one processor 101, and a memory 102 connected to at least one processor 101. This embodiment does not limit the specific connection medium between the processor 101 and the memory 102. Figure 2 The example shown is the connection between processor 101 and memory 102 via bus 100. Bus 100 is... Figure 2 The connections between other components are shown in thick lines and are for illustrative purposes only, not as limiting information. Bus 100 can be divided into address bus, data bus, control bus, etc., for ease of representation. Figure 2 The bus is represented by a single thick line, but this does not indicate that there is only one bus or one type of bus. Alternatively, the processor 101 may also be called a controller; there is no restriction on the name.
[0084] In this embodiment, the memory 102 stores instructions that can be executed by at least one processor 101. The at least one processor 101 can execute the aforementioned method by executing the instructions stored in the memory 102.
[0085] The processor 101 is the control center of the device. It can connect to various parts of the control device through various interfaces and lines. By running or executing instructions stored in memory 102 and calling data stored in memory 102, the processor can perform various functions and process data, thereby monitoring the device as a whole.
[0086] In one possible design, processor 101 may include one or more processing units. Processor 101 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into processor 101. In some embodiments, processor 101 and memory 102 may be implemented on the same chip; in some embodiments, they may also be implemented on separate chips.
[0087] Processor 101 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the interpretable bearing fault diagnosis method based on causal graph embedding disclosed in Embodiment 1 can be directly manifested as execution by a hardware processor, or executed by a combination of hardware and software modules in processor 101.
[0088] Memory 102, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 102 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. Memory 102 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In this embodiment, memory 102 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.
[0089] By designing and programming the processor 101, the code corresponding to the interpretable bearing fault diagnosis method based on causal graph embedding described in the foregoing embodiments can be embedded into the chip, thereby enabling the chip to execute the code during runtime. Figure 1 The steps of the interpretable bearing fault diagnosis method based on causal graph embedding are shown. How to design and program the processor 101 is a technique well-known to those skilled in the art and will not be described further here.
[0090] Example 4 This embodiment provides a computer-readable storage medium storing a computer program thereon. When the program is executed by a processor, it implements the steps of the interpretable bearing fault diagnosis method based on causal graph embedding as described in Embodiment 1.
[0091] The computer-readable storage medium may include flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the storage medium may be an internal storage unit of a computer device, such as the hard disk or memory of the computer device. In other embodiments, the storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, smart memory card, secure digital card, flash memory card, etc., provided on the computer device. Of course, the storage medium may include both internal storage units and external storage devices of the computer device. In this embodiment, the memory is typically used to store the operating system and various application software installed on the computer device. In addition, the memory can also be used to temporarily store various types of data that have been output or will be output.
[0092] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. An interpretable bearing fault diagnosis method based on causal graph embedding, characterized in that, include: S1. The collected multi-channel vibration signals of the bearing are segmented and preprocessed to extract mechanical health factors and construct a health factor time series; the mechanical health factors are time-domain characteristic variables, frequency-domain characteristic variables or envelope spectrum domain characteristic variables that characterize the bearing's operating state; S2. For the health factor time series, conditional independence is tested layer by layer in order from long time lag to short time lag. The parent nodes identified under the longer time lag are inherited into the condition set of the candidate edges under the shorter time lag. The conditional dependency strength of the candidate edges under the shorter time lag is calculated based on the condition set. The causal edge weight is calculated accordingly to obtain the time-lag causal graph. S3. Use the parent nodes in the time-delay causal graph to predict and remove the historical effects of mechanical health factors to obtain the residual sequence. Establish two prediction models in opposite directions for the variables in the residual sequence. Based on the difference in prediction gain between the two prediction models and the difference in independence between the causal variables and the prediction error, determine the instantaneous causal direction and obtain the instantaneous causal graph through global acyclic optimization. S4. In time-delay causal graphs and instantaneous causal graphs, messages are passed only along the parent-to-child direction to obtain node representations. The node representations are decomposed into cross-graph common representations and graph-specific representations. An adaptive causal fusion gate is set to dynamically determine the fusion ratio of graph-specific representations of the two types of causal graphs, and aggregated with cross-graph common representations into sample-level diagnostic representations. S5. Input the sample-level diagnostic representation into the fault classifier to obtain the classification result of the fault category. Combine the classification result to calculate the contribution of each candidate directed path, thereby selecting several candidate directed paths as the structured interpretation result.
2. The interpretable bearing fault diagnosis method based on causal graph embedding according to claim 1, characterized in that, Step S1 specifically includes: The multi-channel vibration signal of the bearing is segmented by a sliding window, and each signal segment is processed by a robust normalization method based on the median and interquartile range to suppress interference. Mechanical health factors are extracted from each signal segment; wherein the categories of mechanical health factors include root mean square, kurtosis, peak factor, impulse factor, envelope spectrum characteristic frequency energy, resonant band energy, and band energy entropy. Mechanical health factors are arranged in chronological order to form a health factor time series.
3. The interpretable bearing fault diagnosis method based on causal graph embedding according to claim 1, characterized in that, In step S2, the calculation of the conditional dependency strength of short-delay candidate edges based on the condition set, and the calculation of causal edge weights accordingly to obtain the time-delay causal graph, specifically includes: The time series of health factors is divided into multiple sub-windows; In each sub-window, the statistic of the short-delay candidate edge is calculated by the kernel conditional independence test, and the conditional dependence strength is calculated based on the relative relationship between the statistic and the critical value corresponding to the significance level. Based on the standard deviation and average value of the conditional dependence strength in multiple sub-windows, the cross-window stability coefficient is calculated to characterize the stability of the repeated occurrence of short-delay candidate edges in different sub-windows. The causal edge weights are obtained by multiplying the average value of the conditional dependency strength in each sub-window, the cross-window stability coefficient, and the time delay decay term. The time delay decay term is calculated based on the time delay order and a preset time delay decay coefficient, and the time delay decay term decreases as the time delay order increases. When the weight of the causal edge exceeds a preset threshold, it is determined that there is a corresponding time-delayed causal edge, and thus the time-delayed causal graph is obtained.
4. The interpretable bearing fault diagnosis method based on causal graph embedding according to claim 1, characterized in that, Step S3 specifically includes: For each mechanical health factor, a regression model is established using its parent node in the time-delay causal graph. The historical propagation components predicted by the regression model are then separated from the mechanical health factors at the current moment to obtain the residual sequence. For any two residual variables in the residual sequence, two nonlinear prediction models with opposite directions are established to obtain the prediction error generated by using the cause variable to predict the target variable. The variance ratio term, composed of the prediction error and the target variable, and the independence penalty term, composed of the causal variable and the prediction error, are weighted and combined to calculate the asymmetric direction score for each direction; when the difference in asymmetric direction scores in opposite directions is greater than a preset threshold, candidate instantaneous causal edges in the corresponding direction are determined. By globally optimizing the acyclic objective function, which includes the asymmetric direction score and the sparse regularization term, redundant edges are suppressed and an instantaneous causal graph that satisfies the acyclic constraint is output.
5. The interpretable bearing fault diagnosis method based on causal graph embedding according to claim 1, characterized in that, In step S4, a loss function is also used to ensure that the cross-graph common representations of the two types of causal graphs remain consistent and to reduce the redundancy between the graph-specific representations of the two types of causal graphs. Specifically, by concatenating the cross-graph common representations, the graph-specific representations, and the numerical features of the mechanical health factor at the current moment, an activation function is used to obtain the node-level adaptive causal fusion gate coefficients, thereby obtaining the fused node representation of each node. Attention pooling is then performed on the fused node representations of all nodes to aggregate and obtain the sample-level diagnostic representation.
6. The interpretable bearing fault diagnosis method based on causal graph embedding according to claim 1, characterized in that, In step S5, the overall objective function for training the fault classifier is: In the formula, For the overall goal; Cross-entropy loss for fault categories; Cross-graph common representation consistency loss is used to ensure that the cross-graph common representations of two types of causal graphs remain consistent. The orthogonal constraint loss is used to reduce the degree of redundancy between the graph-specific representations of the two types of causal graphs. The loss is used to preserve the causal edge structure and to constrain the representation of the parent node of the causal edge in the causal graph to be close to the representation of the child node after the direction mapping, and the representation distance of the node pair without causal edge is greater than a preset interval. and This is a sparsity constraint used to suppress unnecessary causal edges; where The adjacency matrix represents the time-delay causal graph. Represents the adjacency matrix of the instantaneous cause-effect graph. It is an L1 norm; , , and These are the weighting coefficients for each type of loss.
7. The interpretable bearing fault diagnosis method based on causal graph embedding according to claim 6, characterized in that, Cross-graph common representation consistency loss Orthogonal constraint loss and causal edge structure preservation loss The calculation formulas are as follows: In the formula, The number of samples; The quantity of mechanical health factors; and Represent the time-delay causality graph and the instantaneous causality graph, respectively. Cross-graph common representation of nodes; and Represent the time-delay causality graph and the instantaneous causality graph, respectively. The graph-specific representation of each node, with superscript It is the transpose symbol; To prevent constants with a denominator of zero; Let be the set of causal edges existing in the two types of causal graphs; For nodes Pointing to node Causal boundary weight; , , They are nodes ,node and nodes Node representation; A direction mapping function set for time-delay causal graphs or instantaneous causal graphs; The preset distance interval between non-causal node pairs; It is an L2 norm.
8. The interpretable bearing fault diagnosis method based on causal graph embedding according to claim 1, characterized in that, In step S5, the method for calculating the contribution of candidate directed paths specifically includes: The local contribution of the mechanical health factor corresponding to the target fault category is calculated by differentiating the node representation based on the classification output value of the fault classifier; the contribution of a candidate directed path is defined as the product of the local contribution of the end node of the path and the product of the causal edge weights of each segment on the path and the fusion gate coefficients of the corresponding nodes. Among them, the top few candidate directed paths are output as the structured interpretation results, arranged from high to low according to their path contribution.
9. A computer terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the interpretable bearing fault diagnosis method based on causal graph embedding as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the interpretable bearing fault diagnosis method based on causal graph embedding as described in any one of claims 1 to 8.
