Fuel cell fault diagnosis method based on ensemble learning

Through the integrated learning method, combined with the CNN-BiLSTM model and the Stacking integrated learning model, the problem of insufficient robustness and generalization capabilities in fuel cell fault diagnosis is solved, and the accurate distinction between normal, dry membrane and hydrogen leakage state of fuel cell is achieved. , improves the accuracy of fault diagnosis.

CN119046794APending Publication Date: 2024-11-29WUHAN UNIV OF TECH
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411133934.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

When existing fuel cell fault diagnosis algorithms expand the types of faults, the robustness and generalization capabilities are difficult to ensure, and it is especially difficult to effectively distinguish between the three operating states of fuel cell: normal, membrane dry and hydrogen leakage.

Method used

Using a fault diagnosis method based on integrated learning, the spatial and temporal features of data are extracted through the CNN-BiLSTM model, and a Stacking integrated learning model is built, combining multiple base classifiers and metaclassifiers to optimize parameters and feature expansion to improve diagnosis Accuracy.

Benefits of technology

It has achieved effective distinction between normal fuel cell, dry membrane and hydrogen leakage state, overcomes the problems of insufficient robustness and weak generalization capabilities of a single model, and improves the accuracy and reliability of fault diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119046794A_ABST
    Figure CN119046794A_ABST
Patent Text Reader

Abstract

The invention discloses a fuel cell fault diagnosis method based on integrated learning. The method comprises the following steps: collecting original data which are state variables about time characteristics in a fuel cell operation process; performing data preprocessing on the original data; dividing the data into a training set and a test set; respectively inputting the training set and the test set into a CNN-BiLSTM model for feature extraction to obtain a new training set and a new test set; a Stacking ensemble learning model is constructed; the Stacking integrated learning model is optimized; and substituting the new training set into the optimized Stacking integrated model for training, then substituting the new test set into the trained Stacking integrated learning model, and outputting a fault diagnosis result. According to the method, the normal operation state, the membrane drying operation state and the hydrogen leakage operation state of the fuel cell can be better distinguished, and the problems that a single model is insufficient in robustness and poor in generalization ability are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fuel cell fault diagnosis, and in particular to a fuel cell fault diagnosis method based on integrated learning. Background Art

[0002] As the world pays more attention to environmental protection and sustainable development, fuel cells, as a green and efficient energy conversion technology, are gradually becoming a hot spot for research and application. Fuel cells, especially proton exchange membrane fuel cells (PEMFC), have great application potential in transportation, energy storage and supply, aerospace and military fields due to their high energy density, strong power performance and zero emissions.

[0003] However, as a nonlinear complex system with multiple physical fields coupled, the operation process of fuel cells involves multiple physical coupling phenomena such as heat, electricity, and fluid. Component aging, environmental changes, and improper control may all lead to system failures. If the faults cannot be discovered and cleared in time, it will further lead to system performance degradation, shortened service life, and even cause serious safety accidents. Fault diagnosis can accurately and quickly identify faults, playing an important role in preventing the spread of faults and alleviating the impact of faults.

[0004] In current data-driven fault diagnosis research, most algorithms have shown good diagnostic effects on the single fault being studied. However, when the types of faults are expanded for research, the robustness and generalization ability of a single algorithm are difficult to guarantee. Summary of the invention

[0005] In view of the shortcomings of the prior art, the present invention proposes a fuel cell fault diagnosis method based on ensemble learning, which not only overcomes the problems of insufficient robustness and poor generalization ability of a single model, but also can better distinguish the three operating states of the fuel cell: normal, membrane dry and hydrogen leakage.

[0006] To achieve the above object, the present invention designs a fuel cell fault diagnosis method based on ensemble learning, which is particularly characterized by comprising the following steps:

[0007] S1) collecting raw data, wherein the raw data is a state variable with respect to time characteristics during the operation of the fuel cell;

[0008] S2) performing data preprocessing on the original data, wherein the data preprocessing includes normalizing the original data and performing importance evaluation and selection on the normalized data, and selecting important characteristic variables as fuel cell fault diagnosis variables;

[0009] S3) dividing the normalized data and the selected important feature variables into a training set and a test set according to a set ratio;

[0010] S4) inputting the training set and the test set into the CNN-BiLSTM model for feature extraction respectively, the CNN model extracts local feature information of the data through the CNN channel layer, the BiLSTM model performs time expansion on the data through the BiLSTM channel layer to extract feature information in the time dimension, and the feature fusion layer fuses the features extracted by the CNN channel and the BiLSTM channel to obtain a new training set and a new test set;

[0011] S5) constructing a Stacking ensemble learning model, wherein the Stacking ensemble learning model includes a base model of the first layer and a meta-model of the second layer, wherein the base model is a different base classifier with good classification effect, high accuracy and difference, and the meta-model is a simple and stable meta-classifier;

[0012] S6) Optimizing the Stacking ensemble learning model, including optimizing the parameters of the base model with accuracy as the optimization target, and using the important feature variables in step S2) to perform feature expansion on the output data of the base model to expand the input features of the meta-model;

[0013] S7) Substitute the new training set into the optimized Stacking ensemble model for training, then substitute the new test set into the trained Stacking ensemble learning model, output the fault diagnosis results, and perform performance verification.

[0014] Further, in S2), the raw data normalization process is performed using the following formula:

[0015]

[0016] In the formula,

[0017] x i * is the value of the data sample after normalization.

[0018] x i is the data sample value,

[0019] x imax is the sample value x i The maximum value of

[0020] x imin is the sample value x i The minimum value of .

[0021] Furthermore, in S2), the importance of the original data is evaluated by using the Gini coefficient in the random forest algorithm as an evaluation index. The Gini coefficient calculation formula is as follows:

[0022]

[0023] In the formula,

[0024] G m is the Gini coefficient,

[0025] K is the number of categories contained in the data sample.

[0026] p m,k is the probability that the data sample at node m belongs to the kth class.

[0027] Furthermore, in S3), the division ratio of the training set and the test set is set to 7:3.

[0028] Furthermore, in S4), the CNN model includes 2 convolutional layers, 2 pooling layers and 1 fully connected layer, and the BiLSTM model includes a BiLSTM layer and 1 fully connected layer.

[0029] Furthermore, in S5), the base model is a base classifier of support vector machine, RF, K-nearest neighbor, and adaptive boosting algorithm, and the meta-model is a meta-classifier of logistic regression.

[0030] Furthermore, in S6), a grid search algorithm is used to optimize the parameters of the base model, and by traversing different parameter combinations of the model, a group with the best effect is selected as the parameters of the base model.

[0031] Furthermore, in S7), the fault diagnosis result includes three operating states of the fuel cell: normal, membrane dry and hydrogen leakage.

[0032] The advantages of the present invention are:

[0033] 1. The present invention introduces the time state variables in the operation process of the fuel cell into the data-driven fault diagnosis research, and realizes the fusion of the spatial characteristics and time characteristics of the fault data through the CNN-BiLSTM algorithm. The data after feature fusion can better distinguish the three operating states of PEMFC: normal, membrane dry and hydrogen leakage;

[0034] 2. The Stacking ensemble learning model constructed by the present invention combines multiple algorithms, which can overcome the problems of insufficient robustness and weak generalization ability of a single model, and achieve the purpose of effectively judging fuel cell faults;

[0035] The fuel cell fault diagnosis method based on ensemble learning in the present invention introduces the time state variables in the fuel cell operation process into the data-driven fault diagnosis research, which can not only better distinguish the three operating states of the fuel cell, namely normal, membrane dry and hydrogen leakage, but also overcome the problems of insufficient robustness and poor generalization ability of a single model. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is a flow chart of the fuel cell fault diagnosis method based on ensemble learning of the present invention;

[0037] Figure 2 is a feature importance evaluation result in an embodiment of the present invention;

[0038] Figure 3 It is the structural diagram of the CNN-BiLSTM model in the present invention;

[0039] Figure 4 is a fault classification result in an embodiment of the present invention;

[0040] Figure 5 is the confusion matrix in the embodiment of the present invention. DETAILED DESCRIPTION

[0041] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0042] like Figure 1 As shown, the present invention provides a fuel cell fault diagnosis method based on ensemble learning, comprising the following steps:

[0043] S1) collecting raw data, wherein the raw data is state variables with respect to time characteristics during the operation of the fuel cell.

[0044] In this embodiment, the collected raw data originates from a dual-stack structure fuel cell system, and the collected raw data includes 20 state variables in total, as shown in Table 1.

[0045] Table 1 PEMFC sensor monitoring variables

[0046]

[0047]

[0048] S2) performing data preprocessing on the original data, wherein the data preprocessing includes normalizing the original data and performing importance evaluation and selection on the normalized data, and selecting important characteristic variables as fuel cell fault diagnosis variables.

[0049] Data normalization is used to convert fault characteristic components of different units into dimensionless values, and the data are normalized to the same interval to speed up the model convergence. Specifically, the original data normalization process is performed using the following formula:

[0050]

[0051] In the formula,

[0052] x i * is the value of the data sample after normalization.

[0053] x i is the data sample value,

[0054] x imax is the sample value x i The maximum value of

[0055] x imin is the sample value x i The minimum value of .

[0056] Preferably, the Gini coefficient in the random forest algorithm (RF) is used as an evaluation index to evaluate the importance of the original data. The calculation formula of the Gini coefficient is as follows:

[0057]

[0058] In the formula,

[0059] G m is the Gini coefficient,

[0060] K is the number of categories contained in the data sample.

[0061] p m,k is the probability that the data sample at node m belongs to the kth class.

[0062] The selection criterion of the Gini coefficient is that each child node reaches the highest purity. If the Gini coefficient after feature partitioning is smaller, the purity of the feature set after partitioning is greater, indicating that the feature set is more important. Conversely, the larger the Gini coefficient, the greater the uncertainty, indicating that the feature set is less important. Therefore, the Gini coefficient can be used to evaluate the importance of features and thus perform feature selection.

[0063] The feature importance evaluation results in this example are as follows: Figure 2 As shown in the figure, the higher the feature importance, the richer the information contained in the feature and the greater the impact on the diagnosis result.

[0064] In order to select the optimal input feature dimensions for the CNN (Convolutional neural network) model and BiLSTM (Bi-directional long short-term memory) model below, different data dimensions are selected as the input of the feature extraction model according to the feature importance. The final feature selection is shown in Table 2.

[0065] Table 2 Feature selection results

[0066] Input Model Feature number CNN 5,6,7,8,9,11,12,13,14,15,16,17,18,20 BiLSTM 5,6,7,8,11,12,14,17,18,20

[0067] S3) The normalized data and the selected important feature variables are divided into a training set and a test set according to a set ratio.

[0068] Preferably, the ratio of the training set to the test set is 7:3.

[0069] S4) The training set and the test set are respectively input into the CNN-BiLSTM model for feature extraction. The CNN model extracts local feature information of the data through the CNN channel layer. The BiLSTM model performs time expansion on the data through the BiLSTM channel layer to extract feature information in the time dimension. The feature fusion layer fuses the features extracted by the CNN channel and the BiLSTM channel to obtain a new training set and a new test set.

[0070] Specifically, the CNN model includes 2 convolutional layers, 2 pooling layers, and 1 fully connected layer. The CNN model can extract local feature information of the data through convolution and pooling. The BiLSTM model includes a BiLSTM layer and a fully connected layer. The BiLSTM model can perform time expansion on the data to extract feature information in the time dimension. The combination of the two can further enhance the expressiveness of data features.

[0071] The CNN-BiLSTM model structure is as follows Figure 3 As shown in the figure, the CNN layer consists of 2 convolutional layers, 2 pooling layers and 1 fully connected layer. The BiLSTM channel layer consists of a BiLSTM layer and 1 fully connected layer.

[0072] S5) constructing a Stacking ensemble learning model, wherein the Stacking ensemble learning model includes a base model of the first layer and a meta-model of the second layer, wherein the base model is a different base classifier with good classification effect, high accuracy and differences, and the meta-model is a simple and stable meta-classifier.

[0073] According to the principle of Stacking ensemble learning algorithm, the principle of selecting base models is "excellent and different". "Excellent" means that all selected base classifiers must have good enough classification effects to ensure the accuracy of the overall model, and "different" means that there must be differences between the selected base classifiers, so that the Stacking model can more comprehensively mine and learn the potential information of the data, thereby improving the robustness and generalization ability of the model. The meta-model needs to integrate the results of the first-layer model, and generally requires a simple and stable learning algorithm.

[0074] Preferably, the base model is a base classifier of a support vector machine (SVM), RF, K-nearest neighbor (KNN), and an adaptive boosting (AdaBoost) algorithm, and the meta-model is a meta-classifier of logistic regression.

[0075] S6) Optimizing the Stacking ensemble learning model, including optimizing the parameters of the base model with accuracy as the optimization target, and using the important feature variables in step S2) to perform feature expansion on the output data of the base model to expand the input features of the meta-model.

[0076] Preferably, a grid search (GS) algorithm is used to optimize the parameters of the base model, and the best combination of model parameters is selected as the parameters of the base model by traversing different combinations of model parameters.

[0077] In addition, since the number of input vectors of the metamodel depends on the number of base models, and the input vectors of the metamodel are relatively small, the original feature information may be lost. In view of the problem of the small number of input features of the metamodel, the present invention expands the output data of the base model according to the random forest feature importance evaluation results. In the embodiment, the input features of the metamodel are expanded from 4 dimensions to 7 dimensions by selecting the features of sequence numbers 6 to 8 in Table 2 as supplements.

[0078] S7) Substitute the new training set into the optimized Stacking ensemble model for training, then substitute the new test set into the trained Stacking ensemble learning model, output the fault diagnosis results, and perform performance verification.

[0079] Specifically, the fault diagnosis results include three operating states of the fuel cell: normal, membrane dry, and hydrogen leakage.

[0080] like Figure 4 As shown, the fault diagnosis accuracy and confusion matrix of a specific embodiment of the present invention are shown, and the overall classification accuracy of the three types of data including normal, membrane dry and hydrogen leakage is 99.22%.

[0081] The fuel cell fault diagnosis method based on ensemble learning in the present invention introduces the time state variables in the fuel cell operation process into the data-driven fault diagnosis research, which can not only better distinguish the three operating states of the fuel cell, namely normal, membrane dry and hydrogen leakage, but also overcome the problems of insufficient robustness and poor generalization ability of a single model.

[0082] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. A fuel cell fault diagnosis method based on ensemble learning, characterized in that: The steps include: S1) collecting raw data, wherein the raw data is a state variable with respect to time characteristics during the operation of the fuel cell; S2) performing data preprocessing on the original data, wherein the data preprocessing includes normalizing the original data and performing importance evaluation and selection on the normalized data, and selecting important characteristic variables as fuel cell fault diagnosis variables; S3) dividing the normalized data and the selected important feature variables into a training set and a test set according to a set ratio; S4) inputting the training set and the test set into the CNN-BiLSTM model for feature extraction respectively, the CNN model extracts local feature information of the data through the CNN channel layer, the BiLSTM model performs time expansion on the data through the BiLSTM channel layer to extract feature information in the time dimension, and the feature fusion layer fuses the features extracted by the CNN channel and the BiLSTM channel to obtain a new training set and a new test set; S5) constructing a Stacking ensemble learning model, wherein the Stacking ensemble learning model includes a base model of the first layer and a meta-model of the second layer, wherein the base model is a different base classifier with good classification effect, high accuracy and difference, and the meta-model is a simple and stable meta-classifier; S6) Optimizing the Stacking ensemble learning model, including optimizing the parameters of the base model with accuracy as the optimization target, and using the important feature variables in step S2) to perform feature expansion on the output data of the base model to expand the input features of the meta-model; S7) Substitute the new training set into the optimized Stacking ensemble model for training, then substitute the new test set into the trained Stacking ensemble learning model, output the fault diagnosis results, and perform performance verification.

2. The fuel cell fault diagnosis method based on ensemble learning according to claim 1 is characterized in that: S2), the original data normalization process is performed using the following formula In the formula, x i * is the value of the data sample after normalization. x i is the data sample value, x imax is the sample value x i The maximum value of x imin is the sample value x i The minimum value of .

3. The fuel cell fault diagnosis method based on ensemble learning according to claim 2 is characterized in that: In S2), the importance of the original data is evaluated by using the Gini coefficient in the random forest algorithm as an evaluation index. The Gini coefficient calculation formula is as follows In the formula, G m is the Gini coefficient, K is the number of categories contained in the data sample. p m,k is the probability that the data sample at node m belongs to the kth class.

4. The fuel cell fault diagnosis method based on ensemble learning according to claim 1 is characterized in that: In S3), the division ratio of the training set and the test set is set to 7:

3.

5. The fuel cell fault diagnosis method based on ensemble learning according to claim 4 is characterized in that: In S4), the CNN model includes 2 convolutional layers, 2 pooling layers and 1 fully connected layer, and the BiLSTM model includes a BiLSTM layer and 1 fully connected layer.

6. The fuel cell fault diagnosis method based on ensemble learning according to claim 5 is characterized in that: In S5), the base model is a base classifier of support vector machine, RF, K-nearest neighbor, and adaptive boosting algorithm, and the meta-model is a meta-classifier of logistic regression.

7. The fuel cell fault diagnosis method based on ensemble learning according to claim 1, characterized in that: In S6), a grid search algorithm is used to optimize the parameters of the base model. By traversing different parameter combinations of the model, the best combination is selected as the parameters of the base model.

8. The fuel cell fault diagnosis method based on ensemble learning according to claim 7 is characterized in that: In S7), the fault diagnosis results include three operating states of the fuel cell: normal, membrane dry and hydrogen leakage.

Citation Information

Cited By

  • Fault diagnosis method and system of fuel cell, electronic equipment and storage medium

    CN119812397A

  • Fault diagnosis method and system of fuel cell, electronic equipment and storage medium

    CN119812397B

  • Nuclear energy system fault diagnosis method and system based on multi-model fusion ensemble learning

    CN120705739A