Battery fault diagnosis method based on data-knowledge driven spatio-temporal graph convolution network
By using a data- and knowledge-driven spatiotemporal graph convolutional network, the technical problems existing in the prior art are solved. Through a data- and knowledge-driven fusion strategy, a battery fault diagnosis model containing physical mechanism constraints is constructed, which realizes high-precision fault diagnosis and robustness improvement of the PEMFC system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING JIAOTONG UNIV
- Filing Date
- 2026-03-27
- Publication Date
- 2026-07-24
AI Technical Summary
Existing battery fault diagnosis methods are unable to effectively express the nonlinear characteristics of multi-physics coupling in PEMFC systems, lack mechanistic constraints, resulting in insufficient model robustness and interpretability, and an inability to accurately locate the source of the fault.
A data-knowledge-driven spatiotemporal graph convolutional network is adopted. Through multi-view hybrid data augmentation, transfer entropy quantification of causal strength, Chebyshev graph convolution and spatiotemporal joint graph convolution modules, causal feature vectors and correlation feature vectors containing physical mechanism constraints are constructed. Cross-scale convolution operations and node-level gating fusion are performed to output fault diagnosis results.
It improves the accuracy and robustness of PEMFC fault diagnosis, enhances the model's adaptability and interpretability under complex working conditions, and improves the ability to identify early faults.
Smart Images

Figure CN122451682A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of battery fault diagnosis technology, and in particular to a battery fault diagnosis method based on a data-knowledge driven spatiotemporal graph convolutional network. Background Technology
[0002] PEMFC (proton exchange membrane fuel cell) is a clean and efficient electrochemical energy conversion device that can directly convert hydrogen energy into electrical energy, and it is widely used in transportation, stationary systems, and portable devices. The operation of PEMFC involves strong coupling of multiple physical fields, including electrochemical reactions, heat and mass transfer, and fluid dynamics. During long-term service, it is prone to various failures such as membrane drying, hydrogen leakage, catalyst poisoning, flooding, and localized hot spots. These not only lead to insufficient system traction power, increased energy consumption, and performance degradation, but in severe cases, they can also cause safety accidents such as explosions and fires, significantly reducing the reliability and service life of the PEMFC system. Furthermore, the fuel cell stack is a nonlinear system with random and variable operating conditions, making feature extraction complex and greatly increasing the challenges of hydrogen fuel cell feature extraction and diagnosis.
[0003] One existing battery fault diagnosis method includes:
[0004] I. Early Statistical Learning and Shallow Machine Learning Methods
[0005] These methods are based on historical monitoring datasets from multiple sensors. The core of their approach is fault identification by extracting statistical features from the data, allowing direct processing of multi-sensor monitoring data. Specifically, they employ statistical learning methods such as PCA (principal components analysis) and PLS (partial least squares), as well as shallow machine learning methods such as SVM (Support Vector Machine) and RF (Random Forest) to conduct research related to fault diagnosis. Simultaneously, shallow neural network models are also applied to fault diagnosis in this field, relying on these shallow models to complete multi-sensor data processing and fault feature identification.
[0006] II. Deep learning methods based on RNN (Recurrent Neural Network) and CNN (Convolutional Neural Network)
[0007] This type of method is the mainstream architecture for current data-driven fault diagnosis. Based on its own characteristics in spatiotemporal feature extraction, it conducts specific research from three dimensions: time dimension, space dimension, and adaptation to complex working conditions.
[0008] III. GCN (Graph Convolutional Network) Related Methods
[0009] By converting multi-sensor monitoring data in Euclidean form into graph-structured data, the interdependencies between data can be captured, and the fault propagation mechanism in sensor networks can be modeled.
[0010] The disadvantages of the battery fault diagnosis method in the prior art mentioned above include:
[0011] (1) The construction of dynamic graphs relies heavily on expert experience, Pearson correlation coefficient, Granger causality and other statistical measures. These methods are all based on linear assumptions and cannot effectively characterize the strong nonlinear interaction relationship under PEMFC variable working conditions.
[0012] (2) It is difficult to distinguish between statistical correlation and physical causal dependence between data, and the spatiotemporal characteristics are not effectively decoupled, which makes it impossible for the model to accurately locate the source of the fault during the non-stationary fault propagation process;
[0013] (3) The existing model lacks physical mechanism constraints, which ultimately makes it difficult to guarantee the reliability of the fault diagnosis results. Summary of the Invention
[0014] This invention provides a battery fault diagnosis method based on data-knowledge driven spatiotemporal graph convolutional networks, aiming to solve the following problems:
[0015] The PEMFC system is characterized by multi-physics coupling, strong nonlinearity, and complex dependencies. Existing methods struggle to effectively express the complex relationships between features and extract key fault features. Furthermore, existing data-driven methods lack mechanistic constraints and cannot dynamically perceive changes in the topology between sensors, resulting in insufficient model robustness and interpretability.
[0016] To achieve the above objectives, the present invention adopts the following technical solution.
[0017] A battery fault diagnosis method based on data-knowledge driven spatiotemporal graph convolutional networks, specifically including:
[0018] The system acquires raw data from multiple sensors to monitor the operating status of a PEMFC (proton exchange membrane fuel cell). After preprocessing the raw data, it performs data augmentation processing based on multi-view hybridization to reconstruct the sample space from three dimensions: physical characteristics, frequency domain distribution, and topology. The system outputs a structured data matrix containing the evolution characteristics of multiple sensors.
[0019] By utilizing the statistical dependencies between variables in the structured data matrix, the nonlinear causal intensity is quantified by transfer entropy, and a causal relationship graph is constructed by combining the inter-class separation degree. The causal relationship graph is then processed using the Chebyshev graph convolution operator to output a causal feature vector containing physical mechanism constraints.
[0020] Using the structured data matrix as the initial node features, the dynamic dependencies between sensors are reconstructed in real time using learnable node embedding vectors to construct a dynamic correlation graph. The dynamic correlation graph is then processed by a spatiotemporal joint graph convolution module to extract features and output a correlation feature vector containing time-varying topological characteristics.
[0021] The causal feature vector and the associated feature vector are respectively input into the multi-scale gated convolution module to perform cross-scale convolution operation and output the decoupled multi-scale spatial feature flow.
[0022] A node-level gating fusion mechanism is adopted. The confidence weights of each sensor node in different branches are calculated based on the multi-scale spatial feature flow. Weighted fusion processing is performed to obtain a fused feature vector. The fused feature vector is input into a Softmax classifier to output the fault diagnosis result of the PEMFC.
[0023] Preferably, the process of acquiring multi-sensor monitoring raw data for monitoring the PEMFC's operating status, preprocessing the raw data, and then performing multi-view hybrid data augmentation processing to reconstruct the sample space from three dimensions: physical characteristics, frequency domain distribution, and topology, outputting a structured data matrix containing the evolutionary features of multiple sensors, including:
[0024] Raw monitoring data from multiple sensors used to monitor the operating status of the PEMFC are acquired. These sensors include pressure sensors, flow sensors, temperature sensors, and current sensors. The sensor locations and monitoring parameters cover the anode side, cathode side, cooling circuit, and output terminal of the fuel cell stack. The raw monitoring data is preprocessed by cleaning, denoising, and normalization. The preprocessed raw monitoring data is then used as a reference sample.
[0025] The benchmark sample data is used as input data for the multi-view hybrid data augmentation strategy. The benchmark sample data is expanded, reconstructed and augmented from three dimensions: physical characteristics, frequency domain distribution and topology. Time warp and CutMix hybrid sampling technology are introduced to perform nonlinear dynamic transformation simulation and sample boundary expansion to generate augmented samples. The augmented samples are robustly normalized to output a structured data matrix containing the evolution characteristics of multi-source sensors.
[0026] Preferably, the step of utilizing the statistical dependencies between variables in the structured data matrix, quantifying the nonlinear causal strength through transfer entropy, and constructing a causal relationship graph by combining inter-class separation degree specifically includes:
[0027] Based on the discretized parameter sequence, the transfer entropy and inter-class separation degree between different sensor features in the structured data matrix are calculated, and the Shannon entropy is calculated as the basis for quantifying uncertainty.
[0028] (1)
[0029] in, Represents random variables Shannon entropy, It is a probability mass function;
[0030] Calculate the source variable based on historical information of the target variable and source variables. To target variable The transfer entropy :
[0031] (2)
[0032] in, Indicates the current moment; and These represent the embedding dimension and time lag, respectively, used to characterize the time span and lag relationship of historical information;
[0033] Calculate the inter-class separation degree:
[0034] (3)
[0035] in, For inter-class dispersion, Intra-class dispersion:
[0036] (4)
[0037] (5)
[0038] in, For category The number of samples, For category variance For category The mean, The overall mean of all categories. This represents the total number of samples.
[0039] Calculate the comprehensive score fusion :
[0040] (6)
[0041] in, The average transfer entropy intensity of this feature pair across all sample categories is determined by different feature pairs. Form a causal relationship matrix.
[0042] Nonlinear logarithmic enhancement: Introducing an amplification factor to the above Perform a logarithmic transformation to generate the enhanced weight distribution. :
[0043] (7)
[0044] Filter those that meet the preset ratio threshold Construct a causal relationship graph based on corresponding feature pairs. .
[0045] Preferably, the process of using the structured data matrix as initial node features, reconstructing the dynamic dependencies between sensors in real time using learnable node embedding vectors to build a dynamic correlation graph, and extracting features from the dynamic correlation graph using a spatiotemporal joint graph convolution module to output a correlation feature vector containing time-varying topological characteristics specifically includes:
[0046] Using the structured data matrix as the initial node features, an asymmetric adaptive graph learning mechanism based on dual-node embedding projection is employed to reconstruct the dynamic dependencies between sensors and construct a dynamic correlation graph.
[0047] The spatiotemporal joint convolution module captures the dynamic time-varying characteristics and non-Euclidean spatial dependencies in dynamic association graphs, utilizing the fundamental causal relationship matrix. Constructing a symmetric normalized Laplace matrix :
[0048] (8)
[0049] in, It is the identity matrix. For degree matrix, .
[0050] The symmetric normalized Laplace matrix Scaling to the interval [-1, 1] yields the scaled Laplace matrix. :
[0051] (9)
[0052] in, for The largest eigenvalue;
[0053] use The Chebyshev polynomial is used to parameterize the graph convolution filter. The convolution calculation process is as follows:
[0054] (10)
[0055] in, Features of the input nodes For output features, It is the first Chebyshev polynomials, by recursive formula Calculation yields ( ), and The first Learnable weight parameters and bias terms of order.
[0056] Preferably, the step of using the structured data matrix as initial node features and employing an asymmetric adaptive graph learning mechanism based on dual-node embedding projection to reconstruct the dynamic dependencies between sensors and construct a dynamic association graph includes:
[0057] Calculate the current time window The time-series mean of each sensor node is used to generate a static feature snapshot. :
[0058] (11)
[0059] Using trainable weight matrices , With bias , , will the Projected onto the source space and target space respectively, to generate source features. With target features :
[0060] (12)
[0061] in, Scaling factor For activation functions;
[0062] The original adjacency matrix is calculated using batch matrix multiplication. :
[0063] (13)
[0064] Introducing saturation parameter right A nonlinear mapping is performed, and a Top-k sparsity strategy is used to preserve the correlation strength of each node. The dependencies between the elements are used to obtain the sparse adjacency matrix. :
[0065] (14)
[0066] For sparse adjacency matrix Adding self-loops and performing symmetric normalization yields the output dynamic correlation graph. :
[0067] (15)
[0068] in It is the identity matrix. It is a degree matrix.
[0069] Preferably, the method of using the structured data matrix as initial node features, reconstructing the dynamic dependencies between sensors in real time using learnable node embedding vectors to construct a dynamic correlation graph, and extracting features from the dynamic correlation graph through a spatiotemporal joint graph convolution module to output a correlation feature vector containing time-varying topological characteristics, further includes:
[0070] The spatiotemporal joint convolution module uses a dual-channel convolution structure to process the original time series signals. Using convolution kernels through the main feature channels Capturing temporal evolution information, gated channels utilize convolutional kernels Adaptive weights are generated using the sigmoid activation function to obtain the gated convolution output. :
[0071] (16)
[0072] in, The original temporal feature signal is input to the gated convolution module. , It is a learnable convolutional kernel. , It's a bias. It is the sigmoid function. This indicates element-wise multiplication;
[0073] Will Input graph convolutional layer, combined with the dynamic correlation graph By aggregating neighbor node information, the feature output matrix is obtained. :
[0074] (17)
[0075] in, It is the input to the graph convolutional layer, and the output from the gated temporal convolutional module in the previous layer. It is the trainable weight matrix of the current graph convolutional layer. For activation function, This is the output feature matrix.
[0076] After spatial feature extraction, gated temporal convolution further refines the temporal representation, yielding the output of the second-layer gated convolution. The spatial features extracted by graph convolution are superimposed with the gated temporal features using residuals to obtain a spatiotemporal coupled tensor. :
[0077] (18)
[0078] in, It is the output of the second gated temporal convolutional layer;
[0079] calculate In the time window dimension Number of sensor nodes With the time dimension mean and variance Performing standardized mapping yields :
[0080] (19)
[0081] (20)
[0082] (twenty one)
[0083] in, For numerical smoothing terms;
[0084] Utilizing learnable parameters and right Perform a linear transformation to output the associated feature vector containing time-varying topological properties. :
[0085] (twenty two).
[0087] Preferably, the step of inputting the causal feature vector and the associated feature vector into a multi-scale gated convolution module respectively, performing cross-scale convolution operations, and outputting a decoupled multi-scale spatial feature flow includes:
[0088] The causal feature vector and the correlation feature vector are respectively input into three parallel convolution branches with different one-dimensional convolution kernel sizes to extract temporal features of different granularities. Output features of each scale branch The calculation is as follows:
[0089] (twenty three)
[0090] in, Indicates the kernel size as One-dimensional convolution operation, and These represent batch normalization and nonlinear activation functions, respectively.
[0091] The output features of the three convolutional branches are concatenated along the channel dimension to obtain the feature tensor. :
[0092] (twenty four)
[0093] In the formula, This represents a tensor splicing operation performed along the channel dimension;
[0094] Using 1×1 convolutional layers Perform convolution calculations and output aggregated features. :
[0095] (25)
[0096] Will Divide the main information paths equally along the channel dimension. and gated paths :
[0097] (26)
[0098] (27)
[0099] in, The number of output channels for a single scale branch;
[0100] Using the Sigmoid activation function to process gated paths and the main information path tensor Perform element-wise multiplication to output a multi-scale spatial feature flow. :
[0101] (28)
[0102] in, For the final output, It is the Sigmoid function.
[0103] Preferably, the node-level gating fusion mechanism calculates the confidence weights of each sensor node in different branches based on the multi-scale spatial feature flow, performs weighted fusion processing, and obtains a fused feature vector; the fused feature vector is then input into a Softmax classifier to output the fault diagnosis result of the PEMFC, including:
[0104] Obtain the output feature tensors of the multi-scale gated convolutional module in the knowledge-driven branch and the data-driven branch. , respectively denoted as In the channel dimension and By concatenating the components, we obtain the joint feature tensor. :
[0105] (29)
[0106] Joint feature tensor Input the first convolutional layer sequentially Batch normalization layer , Activation layer and second convolutional layer The unnormalized weight coefficients of each node are calculated. :
[0107] (30)
[0108] Using the Sigmoid activation function to Mapping to the (0, 1) interval yields the gating coefficient vector. :
[0109] (31)
[0110] Based on the learned gating coefficient For the output feature tensor and Perform a weighted summation to obtain the fused feature vector. :
[0111] (32)
[0112] Will The vector is flattened along the channel and node dimensions to form a one-dimensional vector, which is then input into a fully connected network. The PEMFC's fault prediction probability distribution is then output through a Softmax activation function. :
[0113] (33)
[0114] in, Perform a flattening operation on multidimensional features. It is a uniform exponential function. , These are the weight parameters of the fully connected layer. , This is a bias term.
[0115] As can be seen from the technical solutions provided by the embodiments of the present invention above, the present invention adopts a data and knowledge dual-driven fusion strategy to solve the problems of insufficient reliability of pure data-driven models and poor adaptability of pure knowledge-driven models. The core process is as follows: First, the sample space is reconstructed by multi-view hybrid enhancement to cope with the nonlinearity and sparsity of the data; then, an asymmetric dual-stream architecture is constructed, and physical prior flow is used in parallel to embed electrochemical mechanism constraints to ensure the physical consistency of features, and adaptive spatial flow is used to capture dynamic correlations in the data to improve adaptability to working condition drift; finally, the complementary advantages and adaptive fusion of dual-stream features are realized through a node-level gating mechanism, thereby significantly enhancing the robustness of the model under complex working conditions while ensuring high accuracy.
[0116] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and will become apparent from the description or may be learned by practice of the invention. Attached Figure Description
[0117] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0118] Figure 1 A flowchart illustrating a battery fault diagnosis method based on a data-knowledge-driven spatiotemporal graph convolutional network, provided as an embodiment of the present invention;
[0119] Figure 2 A flowchart illustrating a battery fault diagnosis method based on a data-knowledge-driven spatiotemporal graph convolutional network, provided in an embodiment of the present invention.
[0120] Figure 3 The flowchart of the spatiotemporal graph convolution module of a battery fault diagnosis method based on a data-knowledge driven spatiotemporal graph convolutional network is provided in an embodiment of the present invention.
[0121] Figure 4 The flowchart of a multi-scale parallel convolution module for a battery fault diagnosis method based on a data-knowledge driven spatiotemporal graph convolutional network is provided in this embodiment of the invention. Detailed Implementation
[0122] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0123] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or couplings. The term “and / or” as used herein includes any and all combinations of one or more of the associated listed items.
[0124] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless defined as herein.
[0125] To facilitate understanding of the embodiments of the present invention, the following will provide further explanation and description with reference to the accompanying drawings and several specific embodiments. These embodiments do not constitute a limitation on the embodiments of the present invention.
[0126] This invention provides a fault diagnosis paradigm driven by both data and knowledge, deeply integrating data-driven adaptive feature learning with knowledge-driven physical causal constraints to improve the reliability and interpretability of model diagnosis. Specifically, it constructs a dual-view topology generation mechanism, balancing physical rationality and data adaptability. Transfer entropy and inter-class separation are used to screen key feature pairs with high fault discriminative power, while an adaptive correlation graph learning algorithm mines non-Euclidean dynamic spatial correlation graphs to comprehensively characterize fault features. To address the heterogeneity of the two topologies, STGCM and Chebyshev spectral graph convolution are used to collaboratively process the dynamic correlation graph and static causal graph, respectively, and a multi-scale temporal convolution module is combined to capture fault features at different frequencies, improving the ability to identify early and subtle faults. To address the spatial heterogeneity of fault features in multi-dimensional sensor networks, the confidence weights of each node are adaptively learned to achieve complementary fusion of dual-stream features.
[0127] The implementation principle of a battery fault diagnosis method based on a data-knowledge-driven spatiotemporal graph convolutional network provided in this invention is as follows: Figure 1 As shown, the specific processing flow is as follows: Figure 2 As shown, the processing steps include the following:
[0128] Step S10: Data Acquisition and Input Basis Construction. Monitoring sample data from multiple sensors monitoring the PEMFC's operating status is acquired. Using this monitoring sample data as input, after conventional preprocessing such as data cleaning, this invention introduces a multi-view hybrid data augmentation strategy to output a structured data matrix containing the evolutionary features of multiple sensor sources. This structured data matrix will serve as the common input basis for subsequent dual-stream architecture collaborative processing.
[0129] Step S20: Feature extraction driven by the physical prior knowledge flow of the hydrogen fuel cell operating state. Using the structured data matrix output from step S10 as input, this invention proposes to construct a causal relationship graph reflecting physical mechanism constraints by combining transfer entropy with inter-class separation quantification of causal logic between sensor features; then, the existing Chebyshev graph convolution technique is used to process the topological graph, outputting a causal feature vector containing physical mechanism constraints.
[0130] Step S30: Data stream-driven feature extraction of the hydrogen fuel cell's operating state. Using the structured data matrix output from step S10 as input, this invention proposes an asymmetric adaptive graph learning mechanism based on dual-node embedded projection. This step constructs a dynamic association graph by learning the source and target vectors of the nodes, and extracts spatiotemporal features through spatiotemporal joint modeling, outputting an association feature vector containing time-varying topological characteristics.
[0131] Step S40: Decoupling of cross-scale feature relationships and feature extraction from multi-source information flow. The associated feature vector output from step S20 and the causal feature vector output from step S30 are used as inputs and fed into parallel multi-scale gated convolutional modules, respectively. This invention introduces an improved gated linear unit mechanism to refine the multi-scale concatenated features and outputs a decoupled multi-scale spatial feature flow.
[0132] Step S50: Node-level adaptive feature fusion. Using the multi-scale spatial feature streams of the knowledge branch and data branch output from step S40 as input, this invention proposes a node-level gated fusion mechanism. A lightweight convolutional network adaptively learns the confidence weights of each sensor node in different branches, performs weighted fusion, and outputs a complementary fused feature vector.
[0133] Step S60: PEMFC Fault Status Diagnosis. The fused feature vector obtained in step S50 is used as input, flattened, and then fed into the existing fully connected network and Softmax classifier. The final output is the fault classification result and predicted probability distribution of PEMFC.
[0134] The above step S1 specifically includes:
[0135] The input data for this step is the raw monitoring data from multiple sensors used to monitor the operating status of the PEMFC. These multiple sensors include, but are not limited to, pressure sensors, flow sensors, temperature sensors, and current sensors, and their locations and monitoring parameters cover the anode side, cathode side, cooling circuit, and output terminal of the fuel cell stack.
[0136] After obtaining the aforementioned raw monitoring data, conventional data processing methods in the prior art are first executed, namely, preprocessing operations such as cleaning, denoising, and normalization are performed on the raw data. The intermediate output data obtained is the benchmark sample data after conventional preprocessing. Based on this, this embodiment creatively proposes a multi-view hybrid data augmentation strategy. The preprocessed benchmark sample data is used as input to perform augmentation processing that breaks through the limitations of traditional noise addition. Specifically, the sample data is expanded and reconstructed from three dimensions: physical characteristics, frequency domain distribution, and topology structure. This eliminates the model's local dependence on specific frequency bands and single nodes, and extracts more generalizable global robust features.
[0137] Following the innovative processing steps described above, the final output data of step S1 is a structured data matrix containing evolutionary features from multiple sensor sources. Through the synergy of the preprocessing and innovation enhancement strategies, this step provides a high-quality data foundation, enhancing the model's generalization ability in small-sample scenarios. As the output of step S10, the "structured data matrix" will directly serve as the common input basis for subsequent steps S20 (knowledge flow-driven feature extraction step) and S30 (data flow-driven feature extraction step).
[0138] Step S20: Knowledge-driven feature extraction of the working state of the hydrogen fuel cell—spectral convolution based on transfer entropy.
[0139] The technical essence of this step is to transform prior physical knowledge into graph structure constraints. Using the structured data matrix output from step S10 as input, causal relationship learning based on transfer entropy and spectral convolution operations are performed, ultimately outputting a causal feature vector containing physical mechanism constraints. The specific implementation process is divided into the following two key stages:
[0140] Step S21: Learning and constructing physical cause-effect graphs
[0141] To extract a graph structure that conforms to the evolution of the actual physical state in PEMFC, this embodiment reconstructs the nonlinear causal relationships between variables based on a structured data matrix:
[0142] First, an adaptive data discretization strategy is implemented to automatically determine the number of discretization bins based on the statistical characteristics of the PEMFC state monitoring data. Based on the parameter sequence after discretization, the transfer entropy between the characteristics of the monitoring data series is calculated to obtain the basic causal relationship matrix that initially characterizes the directional causal strength between sensor variables.
[0143] Based on the discretized parameter sequence, the transfer entropy and inter-class separation degree between different sensor features in the structured data matrix are calculated, and the Shannon entropy is calculated as the basis for quantifying uncertainty.
[0144] (1)
[0145] in, Represents random variables Shannon entropy, It is a probability mass function;
[0146] Calculate the source variable based on historical information of the target variable and source variables. To target variable The transfer entropy :
[0147] (2)
[0148] Subsequently, to eliminate redundant feature connections that do not significantly contribute to fault diagnosis, this embodiment of the invention introduces inter-class separation as a weight correction factor to measure the distribution differences of features across different fault categories. Inter-class separation The calculation formula is as follows:
[0149] Calculate the inter-class separation degree:
[0150] (3)
[0151] in, For inter-class dispersion, Intra-class dispersion:
[0152] (4)
[0153] (5)
[0154] in, For category The number of samples, For category variance For category The mean, The overall mean of all categories. This represents the total number of samples.
[0155] Finally, the causal strength and separation degree are fused using a comprehensive scoring index to calculate feature pairs. The overall score is calculated using the following formula:
[0156] (6)
[0157] in, For feature pairs Inter-class separation degree, This represents the average transfer entropy intensity of the feature across all sample categories.
[0158] Because the original score distribution exhibits a significant long-tail effect, this invention introduces an amplification factor to the... Perform a logarithmic transformation to generate the enhanced weight distribution. :
[0159] (7)
[0160] Filter those that meet the preset ratio threshold Construct the causal relationship graph based on the corresponding feature pairs. .
[0161] Step S22: Spectral graph convolution feature extraction based on Chebyshev polynomials
[0162] The physical prior knowledge implied in the aforementioned causal relationship matrix is extracted using a spectral graph convolutional network. To avoid the high computational cost of eigenvalue decomposition of the Laplace matrix in industrial deployments, this invention employs a Chebyshev polynomial approximation spectral domain filter.
[0163] First, the causal relationship diagram calculated based on S21. Constructing a symmetric normalized Laplace matrix :
[0164] (8)
[0165] in, It is the identity matrix. For degree matrix, To satisfy the orthogonality requirement of Chebyshev polynomials, the following will be used: Scaling to the range [-1, 1] yields the scaled Laplacian matrix:
[0166] (9)
[0167] in for The largest eigenvalue.
[0168] Subsequently, the structured data matrix output in step S10 is used as a graph signal. ,use The filter is parameterized using a Chebyshev polynomial, and convolutional feature extraction is performed. The convolution calculation process is as follows:
[0169] (10)
[0170] in, Features of the input nodes For output features, It is the first Chebyshev polynomials, by recursive formula Calculation yields ( ), and The first Learnable weight parameters and bias terms of order.
[0171] Through the Chebyshev spectral convolution operation described above, this step effectively captures the spatial local coupling characteristics of the PEMFC sensor signal on the physical causal topology while maintaining linear computational complexity, and finally outputs the causal feature vector. This vector will serve as one of the core inputs for the subsequent two-stream fusion step.
[0172] Step S30: Data stream-driven feature extraction of the hydrogen fuel cell operating status.
[0173] The technical essence of this step is: taking into account the physical characteristics of the sensor topology dependence of PEMFC drifting drastically over time under varying operating conditions, the structured data matrix output in step S10 is used as input, and adaptive graph learning and spatiotemporal joint convolutional network are used to extract the associated feature vector containing dynamic topology characteristics. Figure 3 The flowchart of the spatiotemporal graph convolution module of a battery fault diagnosis method based on a data-knowledge driven spatiotemporal graph convolutional network is provided in an embodiment of the present invention.
[0174] Specifically, it is divided into the following two stages:
[0175] Step S31: Adaptive Graph Learning
[0176] To address the limitation of static topologies in capturing time-varying associations, this invention proposes an asymmetric adaptive graph learning mechanism based on two-node embedding. This mechanism comprises three key stages: embedding projection, association computation, and structural sparsification, ensuring the dynamic adaptability of the graph structure and computational efficiency. The structured data matrix output from step S10 is used as input.
[0177] First, calculate the node's static snapshot: calculate the current time window. The time-series mean of each sensor node is used to generate a static feature snapshot. :
[0178] (11)
[0179] Using trainable weight matrices , With bias , , will the Projected onto the source space and target space respectively, to generate source features. With target features :
[0180] (12)
[0181] in, Scaling factor This is the activation function.
[0182] Based on the generated dual-view features, the original adjacency matrix is calculated using matrix multiplication. :
[0183] (13)
[0184] Here, Indicates from node To the node The intensity of the unidirectional influence.
[0185] To address the issue of significant high-frequency environmental noise in PEMFC industrial monitoring data, this embodiment employs a nonlinear saturation mapping to the correlation intensity, introducing a saturation parameter. right A nonlinear mapping is performed, and a Top-k sparsity strategy is used to preserve the correlation strength of each node. The dependencies between the elements are used to obtain the sparse adjacency matrix. :
[0186] (14)
[0187] in, For saturation parameters, For activation function, For nodes With nodes The strength of the correlation between them The original correlation strength, In order to be in Select the nodes corresponding to the k largest values from the list. The number of neighbors retained for each node.
[0188] For sparse adjacency matrix Add self-loops and perform symmetric normalization to output a dynamic relationship graph. :
[0189] (15)
[0190] in It is the identity matrix. This is the degree matrix. This graph reconstructs the significant dynamic physical dependency paths in the sensor network within the current time window.
[0191] S32: Spatiotemporal Joint Modeling (STGCM) Feature Extraction.
[0192] The dynamic relationship diagram generated above The structured data matrix is input into the spatiotemporal joint graph convolution module.
[0193] First, temporal features are extracted using gated convolutional layers, followed by convolutional kernels in the main channels. Capture temporal evolution and use gated channel convolution kernels Adaptive weights are generated using the Sigmoid activation function, and element-wise multiplication is performed to extract the effective time-series signal.
[0194] (16)
[0195] in, , It is a convolution kernel. , It's a bias. It is the sigmoid function. This indicates element-wise multiplication.
[0196] Subsequently, temporal features are extracted and input into the convolutional layer of the graph. This is then combined with the dynamic correlation graph. Perform graph signal aggregation in non-Euclidean space to capture spatial topological dependencies:
[0197] (17)
[0198] in, It is the input to the graph convolutional layer, and the output from the gated temporal convolutional module in the previous layer. It is the trainable weight matrix of the current graph convolutional layer. For activation function, This is the output feature matrix.
[0199] After spatial feature extraction, gated temporal convolution further refines the temporal representation, yielding the output of the second-layer gated convolution. .
[0200] To prevent gradient decay when processing long-term degradation data of fuel cells, the output of the deep network is added to the original input of the module using residuals:
[0201] (18)
[0202] in, It is the output of the second gated temporal convolutional layer. It is the raw input of the STGCM module.
[0203] Batch normalization processing: calculation In the time window dimension Number of sensor nodes With the time dimension mean and variance Performing standardized mapping yields :
[0204] (19)
[0205] (20)
[0206] (twenty one)
[0207] in, For numerical smoothing terms (such as...) ).
[0208] Affine transformation output: utilizing learnable parameters and right Perform a linear transformation to output the associated feature vector containing time-varying topological properties. :
[0209] (twenty two)
[0210] After the above cascaded stacking process, the associated feature vector reflecting the dynamic time-varying characteristics of PEMFC is extracted.
[0211] Step S40: Decoupling of cross-scale feature relationships and feature extraction from multi-source information flow.
[0212] The technical essence of this step is: given the significant differences in the failure evolution rate of PEMFCs (e.g., hydrogen leakage is a high-frequency abrupt change, while membrane drying is a low-frequency gradual change), this step uses the causal feature vector output from step S22 and the correlation feature vector output from step S32 as input tensors, respectively. They are fed into the multi-scale temporal convolution module for independent processing in parallel. Figure 4 The flowchart of a multi-scale parallel convolution module for a battery fault diagnosis method based on a data-knowledge driven spatiotemporal graph convolutional network is provided in this embodiment of the invention.
[0213] Taking the processing of any branch as an example, it includes the following stages:
[0214] S41: Multi-scale parallel convolution
[0215] Two sets of input features The input consists of three parallel convolutional branches. These branches use one-dimensional convolutional kernels of different sizes, i.e. Extracting temporal features at different granularities, the first Output features at each scale The calculation is as follows:
[0216] (twenty three)
[0217] in, Indicates the kernel size as One-dimensional convolution operation, and These represent batch normalization and nonlinear activation functions, respectively.
[0218] Concatenate the outputs of the three branches along the channel dimension to obtain a feature tensor containing multi-scale information. :
[0219] (twenty four)
[0220] This represents a tensor splicing operation performed along the channel dimension.
[0221] S42: Feature Refinement Decoupling Based on Gated Linear Units
[0222] To address the redundant information generated after splicing, a 1×1 convolutional layer is used. Cross-channel information fusion and dimensionality reduction are performed to obtain aggregated features. :
[0223] (25)
[0224] Gated path segmentation: Divide the main information paths equally along the channel dimension. and gated paths :
[0225] (26)
[0226] (27)
[0227] in, The number of output channels for a single scale branch;
[0228] The gated path generates a soft mask with values between (0, 1) using the Sigmoid activation function, which is then used to weight the main information paths element by element.
[0229] (28)
[0230] in, For the final output, It is the Sigmoid function.
[0231] Through the above processing, high-frequency environmental noise is effectively filtered out, and a refined and decoupled multi-scale spatial feature flow (corresponding to the knowledge branch feature flow) is output. With data branch feature flow ).
[0232] Step S50: Node-level adaptive gating fusion mechanism
[0233] The technical essence of this step is to overcome the shortcomings of global average pooling in adapting to the differences in monitoring accuracy and fault sensitivity of individual cells / sensors at different locations in PEMFC, using the two multi-scale spatial feature streams output in step S42 ( , As input, the confidence weights are adaptively configured and fusion is performed.
[0234] First, the time-compressed data will be processed at the channel dimension. Perform splicing to construct a joint feature space :
[0235] (29)
[0236] These are the output feature tensors of the two channels after time compression; It is an operation that performs feature stitching at the channel dimension; These are node-level joint features used in the subsequent weight generation network.
[0237] Subsequently, a lightweight network consisting of convolutions, batch normalization, and activation functions is used to map the channel dimension to 1, generating unnormalized weight coefficients. :
[0238] (30)
[0239] The final generated gating weights; and These are the first and second convolutional layers, respectively. This is a batch normalization function; This is the activation function.
[0240] The output is mapped to the (0, 1) interval using the Sigmoid activation function to obtain the gating coefficient vector. :
[0241] (31)
[0242] Finally, based on this coefficient vector, an element-wise weighted sum is performed on the features of the two channels to output a fused feature vector. :
[0243] (32)
[0244] Step S60: PEMFC fault status diagnosis and classification.
[0245] The fused feature vector obtained in step S50 After flattening and concatenating to form one-dimensional vector features, the vectors are fed into a two-layer fully connected network for high-dimensional feature space mapping. Finally, the softmax activation function maps the vectors to the probability space, outputting a predicted probability distribution with physical discriminative significance. :
[0246] (33)
[0247] in, This represents the predicted probability for each category. The flattening operation represents multidimensional features. For normalized exponential functions, , The weight matrix of the fully connected layer, , For bias terms, This is the activation function.
[0248] In summary, the embodiments of the present invention address the problems of strong physical causal constraints, rapid dynamic correlation evolution, and difficulty in heterogeneous topology coordination in multivariable monitoring data under PEMFC variable operating conditions, and achieve the following technical effects:
[0249] (1) By constructing an asymmetric “causal-correlation” dual-flow architecture, the knowledge-driven flow embeds robust physical priors into the graph structure to ensure model robustness, while the data-driven flow reconstructs transient condition associations through adaptive graph learning to improve model flexibility.
[0250] (2) By using parallel multi-scale temporal convolution and gating refinement mechanism, the problem of extremely large differences in the evolution rate of different faults in PEMFC is effectively overcome, and the coordinated characterization of local instantaneous fluctuations and global long-term decay trends is realized.
[0251] (3) Through the original node-level gating fusion mechanism, the homogeneous allocation limitation of traditional feature fusion is broken, enabling the model to adaptively learn the confidence between physical constraints and real-time data for the characteristics of individual sensors, and achieving a high degree of consistency between the diagnostic results and the underlying physical logic.
[0252] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of one embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing the present invention.
[0253] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of the present invention.
[0254] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for apparatus or system embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. The apparatus and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0255] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A battery fault diagnosis method based on data-knowledge driven spatiotemporal graph convolutional networks, characterized in that, Specifically, it includes: The system acquires raw data from multiple sensors to monitor the operating status of a PEMFC (proton exchange membrane fuel cell). After preprocessing the raw data, it performs data augmentation processing based on multi-view hybridization to reconstruct the sample space from three dimensions: physical characteristics, frequency domain distribution, and topology. The system outputs a structured data matrix containing the evolution characteristics of multiple sensors. By utilizing the statistical dependencies between variables in the structured data matrix, the nonlinear causal intensity is quantified by transfer entropy, and a causal relationship graph is constructed by combining the inter-class separation degree. The causal relationship graph is then processed using the Chebyshev graph convolution operator to output a causal feature vector containing physical mechanism constraints. Using the structured data matrix as the initial node features, the dynamic dependencies between sensors are reconstructed in real time using learnable node embedding vectors to construct a dynamic correlation graph. The dynamic correlation graph is then processed by a spatiotemporal joint graph convolution module to extract features and output a correlation feature vector containing time-varying topological characteristics. The causal feature vector and the associated feature vector are respectively input into the multi-scale gated convolution module to perform cross-scale convolution operation and output the decoupled multi-scale spatial feature flow. A node-level gating fusion mechanism is adopted. The confidence weights of each sensor node in different branches are calculated based on the multi-scale spatial feature flow. Weighted fusion processing is performed to obtain a fused feature vector. The fused feature vector is input into a Softmax classifier to output the fault diagnosis result of the PEMFC.
2. The method according to claim 1, characterized in that, The process involves acquiring raw multi-sensor monitoring data to monitor the PEMFC's operating status. After preprocessing the raw data, data augmentation based on multi-view hybridization is performed to reconstruct the sample space from three dimensions: physical characteristics, frequency domain distribution, and topology. The output is a structured data matrix containing the evolutionary features of multiple sensor sources, including: Raw monitoring data from multiple sensors used to monitor the operating status of the PEMFC are acquired. These sensors include pressure sensors, flow sensors, temperature sensors, and current sensors. The sensor locations and monitoring parameters cover the anode side, cathode side, cooling circuit, and output terminal of the fuel cell stack. The raw monitoring data is preprocessed by cleaning, denoising, and normalization. The preprocessed raw monitoring data is then used as a reference sample. The benchmark sample data is used as input data for the multi-view hybrid data augmentation strategy. The benchmark sample data is expanded, reconstructed and augmented from three dimensions: physical characteristics, frequency domain distribution and topology. Time warp and CutMix hybrid sampling technology are introduced to perform nonlinear dynamic transformation simulation and sample boundary expansion to generate augmented samples. The augmented samples are robustly normalized to output a structured data matrix containing the evolution characteristics of multi-source sensors.
3. The method according to claim 1, characterized in that, The method of utilizing the statistical dependencies between variables in the structured data matrix, quantifying the nonlinear causal strength through transfer entropy, and constructing a causal relationship graph by combining inter-class separation degree specifically includes: Based on the discretized parameter sequence, the transfer entropy and inter-class separation degree between different sensor features in the structured data matrix are calculated, and the Shannon entropy is calculated as the basis for quantifying uncertainty. (1) in, Represents random variables Shannon entropy, It is a probability mass function; Calculate the source variable based on historical information of the target variable and source variables. To target variable The transfer entropy : (2) in, Indicates the current moment; and These represent the embedding dimension and time lag, respectively, used to characterize the time span and lag relationship of historical information; Calculate the inter-class separation degree: (3) in, For inter-class dispersion, Intra-class dispersion: (4) (5) in, For category The number of samples, For category variance For category The mean, The overall mean of all categories. This represents the total number of samples; Calculate the comprehensive score fusion : (6) in, The average transfer entropy intensity of this feature pair across all sample categories is determined by different feature pairs. Form a causal relationship matrix; Nonlinear logarithmic enhancement: Introducing an amplification factor to the above Perform a logarithmic transformation to generate the enhanced weight distribution. : (7) Filter those that meet the preset ratio threshold Construct a causal relationship graph based on corresponding feature pairs. .
4. The method according to claim 3, characterized in that, The process of using the structured data matrix as initial node features, reconstructing the dynamic dependencies between sensors in real time using learnable node embedding vectors to build a dynamic correlation graph, and extracting features from the dynamic correlation graph through a spatiotemporal joint graph convolution module to output a correlation feature vector containing time-varying topological characteristics specifically includes: Using the structured data matrix as initial node features, an asymmetric adaptive graph learning mechanism based on dual-node embedding projection is employed to reconstruct the dynamic dependencies between sensors and construct a dynamic correlation graph. The spatiotemporal joint convolution module captures the dynamic time-varying characteristics and non-Euclidean spatial dependencies in dynamic association graphs, utilizing the fundamental causal relationship matrix. Constructing a symmetric normalized Laplace matrix : (8) in, It is the identity matrix. For degree matrix, ; The symmetric normalized Laplace matrix Scaling to the interval [-1, 1] yields the scaled Laplace matrix. : (9) in, for The largest eigenvalue; use The Chebyshev polynomial is used to parameterize the graph convolution filter. The convolution calculation process is as follows: (10) in, Features of the input nodes For output features, It is the first Chebyshev polynomials, by recursive formula Calculation yields ( ), and The first Learnable weight parameters and bias terms of order.
5. The method according to claim 4, characterized in that, The process of using the structured data matrix as initial node features and employing an asymmetric adaptive graph learning mechanism based on dual-node embedding projection to reconstruct the dynamic dependencies between sensors and construct a dynamic association graph includes: Calculate the current time window The time-series mean of each sensor node is used to generate a static feature snapshot. : (11) Using trainable weight matrices , With bias , , will the Projected onto the source space and target space respectively, to generate source features. With target features : (12) in, Scaling factor For activation functions; The original adjacency matrix is calculated using batch matrix multiplication. : (13) Introducing saturation parameter right A nonlinear mapping is performed, and a Top-k sparsity strategy is used to preserve the correlation strength of each node. The dependencies between the elements are used to obtain the sparse adjacency matrix. : (14) For sparse adjacency matrix Adding self-loops and performing symmetric normalization yields the output dynamic correlation graph. : (15) in It is the identity matrix. It is a degree matrix.
6. The method according to claim 5, characterized in that, The method of using the structured data matrix as initial node features, reconstructing the dynamic dependencies between sensors in real time using learnable node embedding vectors to build a dynamic correlation graph, extracting features from the dynamic correlation graph through a spatiotemporal joint graph convolution module, and outputting correlation feature vectors containing time-varying topological characteristics, further includes: The spatiotemporal joint convolution module uses a dual-channel convolution structure to process the original time series signals. Using convolution kernels through the main feature channels Capturing temporal evolution information, gated channels utilize convolutional kernels Adaptive weights are generated using the sigmoid activation function to obtain the gated convolution output. : (16) in, The original temporal feature signal is input to the gated convolution module. , It is a learnable convolutional kernel. , It's a bias. It is the sigmoid function. This indicates element-wise multiplication; Will Input graph convolutional layer, combined with the dynamic correlation graph By aggregating neighbor node information, the feature output matrix is obtained. : (17) in, It is the input to the graph convolutional layer, and the output comes from the gated temporal convolutional module in the previous layer. It is the trainable weight matrix of the current graph convolutional layer. For activation function, To output the feature matrix; After spatial feature extraction, gated temporal convolution further refines the temporal representation, yielding the output of the second-layer gated convolution. The spatial features extracted by graph convolution are superimposed with the gated temporal features using residuals to obtain a spatiotemporal coupled tensor. : (18) in, It is the output of the second gated temporal convolutional layer; calculate In the time window dimension Number of sensor nodes With the time dimension mean and variance Performing standardized mapping yields : (19) (20) (21) in, For numerical smoothing terms; Utilizing learnable parameters and right Perform a linear transformation to output the associated feature vector containing time-varying topological properties. : (22)。 7. The method according to claim 1, characterized in that, The process of inputting the causal feature vector and the associated feature vector into a multi-scale gated convolution module, performing cross-scale convolution operations, and outputting a decoupled multi-scale spatial feature flow includes: The causal feature vector and the correlation feature vector are respectively input into three parallel convolution branches with different one-dimensional convolution kernel sizes to extract temporal features of different granularities. Output features of each scale branch The calculation is as follows: (23) in, Indicates the kernel size as One-dimensional convolution operation, and These represent batch normalization and nonlinear activation functions, respectively. The output features of the three convolutional branches are concatenated along the channel dimension to obtain the feature tensor. : (24) In the formula, This represents a tensor splicing operation performed along the channel dimension; Using 1×1 convolutional layers Perform convolution calculations and output aggregated features. : (25) Will Divide the main information paths equally along the channel dimension. and gated paths : (26) (27) in, The number of output channels for a single scale branch; Using the Sigmoid activation function to process gated paths and the main information path tensor Perform element-wise multiplication to output a multi-scale spatial feature flow. : (28) in, For the final output, It is the Sigmoid function.
8. The method according to claim 7, characterized in that, The node-level gating fusion mechanism is adopted to calculate the confidence weight of each sensor node in different branches based on the multi-scale spatial feature flow, and perform weighted fusion processing to obtain the fused feature vector. The fused feature vector is input into a Softmax classifier, which outputs the fault diagnosis results of the PEMFC, including: Obtain the output feature tensors of the multi-scale gated convolutional module in the knowledge-driven branch and the data-driven branch. , respectively denoted as In the channel dimension and By concatenating the components, we obtain the joint feature tensor. : (29) Joint feature tensor Input the first convolutional layer sequentially Batch normalization layer , Activation layer and second convolutional layer The unnormalized weight coefficients of each node are calculated. : (30) Using the Sigmoid activation function to Mapping to the (0, 1) interval yields the gating coefficient vector. : (31) Based on the learned gating coefficient For the output feature tensor and Perform a weighted summation to obtain the fused feature vector. : (32) Will The vector is flattened along the channel and node dimensions to form a one-dimensional vector, which is then input into a fully connected network. The PEMFC's fault prediction probability distribution is then output through a Softmax activation function. : (33) in, Perform a flattening operation on multidimensional features. It is a uniform exponential function. , These are the weight parameters of the fully connected layer. , This is a bias term.