Topsis-based fuel cell voltage consistency classification prediction method
By using Topsis-based classification prediction method and multiple prediction models of GRU neural network in fuel cell data prediction, the problem of low accuracy of prediction results in the prior art is solved, and accurate prediction and evaluation of the voltage properties of fuel cell single cells is achieved.
Patent Information
- Application Number
- CN202411995330.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-02
AI Technical Summary
In the fuel cell data prediction, the prediction results are not accurate and lack effective evaluation indicators, making it difficult to accurately predict the state of a single cell with different performance performance at each time node.
The Topsis-based fuel cell voltage consistency classification prediction method is used, combined with multiple prediction models of GRU neural network, and by calculating the F1 score, weighted accuracy and Kappa consistency coefficient of the poor battery, the Topsis method is used for comprehensive evaluation, and the model with the best prediction effect is screened for actual prediction.
The accuracy of prediction results of fuel cell data prediction model is improved, and the deep correlation between time series, current density and cell properties can be efficiently mined, accurately reflect the gaps in multiple sets of prediction results, and directly and efficiently predict the properties of specific cell.
Smart Images

Figure CN119920932A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of fuel cell data prediction, and in particular to a fuel cell voltage consistency classification prediction method based on Topsis. Background Art
[0002] The consistency of each single cell in a fuel cell stack directly affects the performance output and safety of the entire stack. If the voltage difference between the single cells is too large, the performance of the stack will be restricted by the single cell in the worst condition, resulting in a "barrel effect", which will affect the stability and life of the entire stack. By predicting the voltage consistency of the fuel cell, the problem of voltage inconsistency can be discovered in time, and corresponding measures can be taken to adjust and optimize, thereby improving the overall performance and stability of the fuel cell system. At present, most fuel cell durability research uses machine learning and neural networks for prediction. There is almost no research on the use of deep learning methods to predict single voltage consistency. The prediction of the state of single cells with different performance at each time node does not use appropriate evaluation indicators, resulting in the prediction results of the trained fuel cell data prediction model are not accurate. Summary of the invention
[0003] The purpose of the present invention is to provide a fuel cell voltage consistency classification prediction method based on Topsis in order to improve the prediction result accuracy of the fuel cell data prediction model.
[0004] The purpose of the present invention can be achieved by the following technical solutions:
[0005] A fuel cell voltage consistency classification prediction method based on Topsis, the method comprising:
[0006] S1. Obtaining fuel cell voltage data, calculating the voltage relative deviation and relative deviation limit, dividing the battery into single cell performances based on the voltage relative deviation and relative deviation limit, and obtaining the divided fuel cell voltage data;
[0007] S2, the divided fuel cell voltage data is input into multiple fuel cell voltage prediction models based on GRU to obtain battery performance prediction results;
[0008] S3, respectively comparing the battery performance prediction results with the actual voltage properties of each single battery to obtain a confusion matrix, calculating the F1 score and weighted accuracy of the poor battery in the battery performance prediction results, and calculating the Kappa consistency coefficient based on the confusion matrix, the F1 score and weighted accuracy of the poor battery to obtain a decision matrix;
[0009] S4. Apply the TOPSIS method to perform weighted standardization on the decision matrix, determine the maximum and minimum values of each column of the weighted standardized decision matrix, calculate the distance to the optimal solution and the distance to the worst solution, and obtain the proximity. Based on the proximity, screen the performance prediction results of each battery to obtain the optimal battery performance prediction result, and select the fuel cell voltage prediction model corresponding to the optimal battery performance prediction result to perform actual battery voltage performance prediction.
[0010] Furthermore, the F1 score of the poor battery is:
[0011]
[0012] Among them, P -1 It represents the proportion of samples whose battery performance prediction result is poor battery and actually is poor battery in all samples whose prediction result is poor battery, R -1 It indicates the proportion of samples that are predicted to be bad batteries and are actually bad batteries among all samples that are actually bad batteries.
[0013] Furthermore, the weighted accuracy is:
[0014]
[0015] Among them, N i represents the number of samples of category i, P i represents the accuracy of category i, and N represents the total number of samples.
[0016] Furthermore, each column of the confusion matrix represents the predicted category of the battery performance prediction result, and each row of the confusion matrix represents the true attribute performance category of the data.
[0017] Furthermore, the Kappa consistency coefficient is:
[0018]
[0019]
[0020] Among them, p o is the observation consistency ratio, p e is the accidental agreement proportion, x ij Represents the confusion matrix element, and N represents the total number of samples.
[0021] Furthermore, the optimal solution distance and the worst solution distance are:
[0022]
[0023]
[0024] in, is the optimal solution distance, is the worst solution distance, z j represents the jth column of the weighted normalized decision matrix, z ij Represents the data in the i-th row and j-th column of the weighted and standardized decision matrix.
[0025] Furthermore, the decision matrix has three columns, representing the weighted accuracy, the Kappa consistency coefficient and the F1 score of the poor battery respectively, and the rows of the decision matrix are the mean of the weighted accuracy of each battery performance prediction result on the validation set, the mean of the Kappa consistency coefficient on the validation set and the mean of the F1 score of the poor battery on the validation set.
[0026] Furthermore, the proximity is:
[0027]
[0028] Among them, C i Indicates proximity.
[0029] Furthermore, the deviation is:
[0030]
[0031] Among them, V i is the single cell voltage in the fuel cell voltage data, is the average value difference of the single battery voltage, V min is the minimum voltage of a single battery.
[0032] Furthermore, the relative deviation limit is:
[0033]
[0034] Among them, Δ i Indicates the degree of deviation.
[0035] Compared with the prior art, the present invention has the following beneficial effects:
[0036] The present invention combines the GRU neural network and the Topsis method, summarizes multiple prediction results of the GRU neural network, and uses the Topsis method to comprehensively evaluate the summarized differential single cell F1 scores, Kappa consistency coefficients, and the average values of weighted accuracy at each time point, and selects the model corresponding to the final prediction result with the best prediction effect for actual prediction. It can efficiently mine the potential deep correlation between time series, current density and single cell properties, accurately reflect the gap between multiple groups of prediction results, and can directly and efficiently predict the properties of a specific single cell. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1It is a schematic diagram of the GRU neural network structure of the present invention;
[0038] Figure 2 This is a graph showing the F1 score of a single cell with poor performance at a 70% training ratio over time;
[0039] Figure 3 This is a graph showing the weighted accuracy over time for a 70% training ratio;
[0040] Figure 4 This is a graph showing the Kappa consistency coefficient of 70% training ratio changing over time;
[0041] Figure 5 This is a graph showing the F1 score of a single cell with poor performance at a 75% training ratio over time;
[0042] Figure 6 This is a graph showing the weighted accuracy over time for a 75% training ratio;
[0043] Figure 7 This is a graph showing the Kappa consistency coefficient for the 75% training ratio changing over time. DETAILED DESCRIPTION
[0044] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0045] The present invention proposes a fuel cell voltage consistency classification prediction method based on Topsis, the method comprising:
[0046] S1. Obtaining fuel cell voltage data, calculating the voltage relative deviation and relative deviation limit, dividing the battery into single cell performances based on the voltage relative deviation and relative deviation limit, and obtaining the divided fuel cell voltage data;
[0047] S2, the divided fuel cell voltage data is input into multiple fuel cell voltage prediction models based on GRU to obtain battery performance prediction results;
[0048] S3, respectively comparing the battery performance prediction results with the actual voltage properties of each single battery to obtain a confusion matrix, calculating the F1 score and weighted accuracy of the poor battery in the battery performance prediction results, and calculating the Kappa consistency coefficient based on the confusion matrix, the F1 score and weighted accuracy of the poor battery to obtain a decision matrix;
[0049] S4. Apply the TOPSIS method to perform weighted standardization on the decision matrix, determine the maximum and minimum values of each column of the weighted standardized decision matrix, calculate the distance to the optimal solution and the distance to the worst solution, and obtain the proximity. Based on the proximity, screen the performance prediction results of each battery to obtain the optimal battery performance prediction result, and select the fuel cell voltage prediction model corresponding to the optimal battery performance prediction result to perform actual battery voltage performance prediction.
[0050] The present invention can more accurately predict the state of single cells with different performance at each time point through the consistency prediction method, especially for those single cells with relatively poor performance. In addition, the use of appropriate evaluation indicators can comprehensively and systematically measure the effectiveness of the prediction effect.
[0051] In terms of prediction methods, a consistent classification prediction method is adopted. The data features cover two aspects: time series characteristics and current density distribution. The labels are based on the original voltage data of multiple single cells, and the actual properties are determined by strict consistency classification indicators. In order to deeply explore and accurately predict the complex dynamic process of the evolution of the properties of single-chip single cells over time, the present invention uses a gated recurrent neural network (GRU network) as the main model training architecture. Through a series of precisely designed nonlinear transformation steps and iterative learning mechanisms, this model can efficiently explore the potential deep correlation between time series, current density and single cell properties. After the training phase is successfully completed, the model has a relatively strong generalization ability, and can directly and efficiently predict the properties of a specific single cell based solely on the input feature data, that is, time series and current density information, without the need for complex data preprocessing or analysis steps.
[0052] In order to improve the accuracy and stability of prediction, a common strategy is to use multiple neural network models for prediction, and then select the best prediction from the prediction results of these models in a specific way. This approach has the advantages of improving prediction accuracy, enhancing model robustness, and avoiding overfitting. The Topsis method is a commonly used comprehensive evaluation method that can make full use of the information of the prediction data, and its results can accurately reflect the gap between multiple groups of prediction results. The present invention summarizes the difference single cell F1 score, Kappa consistency coefficient and weighted accuracy of the verification set segment at a fixed current density for multiple prediction results at each time point, and selects the one with the best prediction effect through the Topsis method as the final output result.
[0053] This paper proposes an innovative technology in the field of fuel cell data processing, focusing on the data prediction and analysis of fuel cell data. It is mainly based on the application of Topsis multi-attribute decision analysis technology and gated recurrent unit neural network prediction model, aiming to accurately predict the voltage properties of each single cell.
[0054] The following are the detailed steps of the present invention:
[0055] 1. Classification of fuel cell single cell voltage properties:
[0056] 1. Relative deviation and relative deviation limit
[0057] The relative deviation and relative deviation limit can be used to classify the performance of a single cell in a fuel cell stack in real time online. i Defined as the ratio of the difference between the single cell voltage and its average value to the difference between the single cell voltage average value and the minimum value (i.e. the maximum deviation), relative deviation limit Δ mean Defined as the relative deviation Δ i The average of the absolute values is given by the following formula:
[0058]
[0059]
[0060] 2. Classification of single cell voltage properties
[0061] Calculate the relative deviation Δ i and relative deviation limit Δ mean , relative deviation Δ i ≤-Δ mean , the performance evaluation is poor, the digital label is -1, although this type of single battery accounts for a small proportion, it has a greater impact on the overall battery stack and requires special attention; relative deviation -Δ mean <Δ i ≤Δ mean , the performance evaluation is good, the digital label is 0, and most of the single cells have this property; the relative deviation Δ mean <Δ i , the performance evaluation is good, the digital label is 1, and this type of single battery accounts for a small proportion in the battery stack. The specific classification of the properties of each single battery is as follows in Table 1:
[0062] Table 1 Classification of fuel cell stack single cell performance
[0063] Relative deviation range <![CDATA[Δ i ≤-D mean ]]> <![CDATA[-Δ mean <D i ≤Δ mean ]]> <![CDATA[Δ mean <D i ]]> Performance Evaluation Difference good better Digital Marking -1 0 1
[0064] 2. Prediction of voltage properties of fuel cell single cell:
[0065] The prediction model uses a gated recurrent unit network (GRU), which solves the problems of the inability to retain long-term memory and gradients in back propagation in traditional RNNs through gated units. The GRU network contains two gates, an update gate and a reset gate. The reset gate determines the combination of input information and stored memory, and the update gate defines the amount of previous memory stored to the current time step. These two gating mechanisms can preserve information in long-term sequences and will not be cleared over time or removed because they are irrelevant to predictions, which determines which information can ultimately be used as the output of the gated recurrent unit. The GRU gating structure is as follows: Figure 1 shown.
[0066] The gated recurrent unit works according to the following formula:
[0067] Z t =σ(W z [X t ,h t-1 ]+b z )
[0068] r t =σ(W r [X t ,h t-1 ]+b r )
[0069]
[0070]
[0071] Through the above formula, the GRU network can effectively extract and utilize the features in time series data to achieve accurate prediction of the performance of each fuel cell.
[0072] 3. Comprehensive evaluation of the prediction effect of fuel cell single cell voltage properties:
[0073] 1. Confusion Matrix
[0074] By comparing the predicted and actual voltage properties of each single battery, a confusion matrix can be obtained, and subsequent evaluation indicators can be obtained through the confusion matrix. Each column of the confusion matrix represents the predicted category, and the total number of each column represents the number of data predicted to be in that category; each row represents the true category of the data, and the total number of data in each row represents the number of data instances in that category.
[0075] 2. Poor performance F1 score
[0076] The F1 score is an indicator used in statistics to measure the accuracy of a binary classification model. It takes into account both the precision and recall of the classification model and can be seen as a harmonic average of the two. The calculation formula for the F1 score is:
[0077]
[0078] In the F1 score of a single cell with poor performance, P_1 (precision) represents the proportion of samples predicted to be poor cells and actually poor cells among all samples predicted to be poor cells; R -1 (Recall rate) indicates the proportion of samples predicted to be bad cells and actually bad cells in all samples that are actually bad cells. Poor performance F1 score is the harmonic mean of precision and recall, ranging from 0 to 1. A higher F1 score indicates that the model has achieved a good balance between precision and recall, indicating that the model can more accurately identify bad cells in the fuel cell stack under the specified features, and will not mistakenly identify the other two performance cells as bad cells too often.
[0079] 3. Weighted Accuracy
[0080] Weighted accuracy takes into account the difference between the number of samples in different categories, and gives different weights to the accuracy of each category (usually the proportion of the number of samples in that category to the total number of samples), thereby more comprehensively evaluating the overall performance of the model. This evaluation method is particularly important when dealing with unbalanced data sets, because unbalanced data sets may cause the model to perform well on the majority class but poorly on the minority class. The weighted accuracy can more accurately reflect the comprehensive performance of the model on all categories. The calculation formula is:
[0081]
[0082] Where: N i P represents the number of samples of category i. i Represents the accuracy of category i. N represents the total number of samples.
[0083] 4. Kappa Coefficient of Consistency
[0084] The Kappa consistency coefficient is a statistical indicator for measuring classification accuracy, especially when dealing with classification problems, used to evaluate the consistency between the classification results and the actual situation. Its calculation formula is:
[0085]
[0086]
[0087]
[0088] Where: x is the confusion matrix element;
[0089] p ois the observed consistency ratio, that is, the ratio of the actual classification to the predicted classification. The calculation formula is: the sum of the diagonal elements / the sum of the elements of the entire matrix, p e is the accidental consistency ratio, that is, the consistency ratio predicted by random distribution. The calculation formula is: Σ(sum of elements in row i × sum of elements in column i) / (sum of all elements in the matrix)^2. N represents the total number of samples.
[0090] The value range of Kappa coefficient is -1 to 1. Generally, the Kappa coefficient is greater than 0, and the closer it is to 1, the better the classification performance; close to 0, the classification effect is close to random guessing. Specifically, the Kappa coefficient can be divided into the following five levels to represent different levels of consistency:
[0091] 0.0~0.20: Very low consistency (slight);
[0092] 0.21~0.40: general consistency (fair);
[0093] 0.41~0.60: moderate consistency;
[0094] 0.61~0.80: high consistency (substantial);
[0095] 0.81~1: Almost perfect.
[0096] 4. Topsis screens multiple network prediction results:
[0097] 1. Extract evaluation indicators: Extract the required evaluation indicators from the confusion matrix, calculate the F1 score of the property difference battery, weighted accuracy, and the mean of the Kappa consistency coefficient in the validation set segment.
[0098] 2. Construct a decision matrix: The extracted evaluation indicators are used as the columns of the decision matrix, and the three means of each prediction are used as the rows of the decision matrix to construct a complete decision matrix, as shown in Table 2.
[0099] Table 2 Decision matrix example
[0100] Model sequence Accuracy Koppa F1 1 0.7586 0.5639 0.8184 2 0.7499 0.5501 0.8108 3 0.7396 0.5305 0.8256 …
[0101] 3. Apply TOPSIS method:
[0102] Standardize each column, taking the first column as an example, for i=1~n:
[0103]
[0104] The three columns are multiplied by the corresponding weighted values. All three indicators are efficiency indicators, the larger the better.
[0105] Determine the maximum and minimum values in each column of the weighted standardized decision matrix.
[0106] Calculate proximity: Calculate the distance from each prediction model to the maximum and minimum values (usually using Euclidean distance) to obtain the optimal solution distance and the worst solution distance. The formula is as follows:
[0107]
[0108]
[0109] Calculate the proximity, which is the distance of the worst solution divided by the sum of its distances to the ideal optimal solution and the worst solution:
[0110]
[0111] Sorting and selection: Sort the prediction results of each network according to the proximity. The higher the proximity, the closer the solution is to the ideal solution, so it is a better choice.
[0112] The F1 score, weighted accuracy, and Kappa consistency coefficient of the property difference battery can be plotted over time at the prediction moment.
[0113] The present invention not only provides a simple and effective voltage performance classification method suitable for fuel cell data, but also accurately predicts the voltage properties of each single cell by combining the GRU neural network and the Topsis method, and observes the change of evaluation indicators over time to ensure the high accuracy and reliability of the prediction results. It has extremely high application potential in the field of fuel cell performance prediction.
[0114] The present invention is further described in detail by way of examples. Three sets of demonstration test data are derived from a 1044h durability test conducted on a fuel cell stack. The current density is fixed at 0.7, the training set ratio is 70% and 75%, the number of training times is 100, and the F1 score, weighted accuracy, and Kappa consistency coefficient of the battery with poor properties are plotted over time at the prediction moment. The results of the 70% training set are as follows: Figure 2 , Figure 3 , Figure 4 The mean prediction time of each evaluation index with 70% training ratio is shown in Table 3.
[0115] Table 3. Mean prediction time of each evaluation index for 70% training ratio
[0116]
[0117] The results of 75% training set are as follows Figure 5 , Figure 6 , Figure 7 The mean prediction time of each evaluation index with 75% training ratio is shown in Table 4.
[0118] Table 4. Mean prediction time of each evaluation index for 75% training ratio
[0119]
[0120] Under the 70% training ratio, the F1 score of the poor battery is above 0.8 most of the time, the overall prediction time mean is around 0.85, the weighted accuracy is above 0.75 most of the time, the overall mean is close to 0.78, and the Kappa consistency coefficient is above 0.6 most of the time, and the overall mean is around 0.6, showing that the prediction is highly consistent with the actual; under the 75% training ratio, the three indicators increase significantly, the poor battery F1 score prediction time mean is around 0.88, the weighted accuracy mean is close to 0.8, and the Kappa consistency coefficient mean is above 0.62. This shows that the prediction results of this method perform well in the poor battery F1 score, weighted accuracy, and Kappa consistency coefficient, and have high accuracy in predicting the voltage properties of fuel cell cells.
[0121] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A fuel cell voltage consistency classification prediction method based on Topsis, characterized in that the method include: S1. Obtaining fuel cell voltage data, calculating the voltage relative deviation and relative deviation limit, dividing the battery into single cell performances based on the voltage relative deviation and relative deviation limit, and obtaining the divided fuel cell voltage data; S2, the divided fuel cell voltage data is input into multiple fuel cell voltage prediction models based on GRU to obtain battery performance prediction results; S3, respectively comparing the battery performance prediction results with the actual voltage properties of each single battery to obtain a confusion matrix, calculating the F1 score and weighted accuracy of the poor battery in the battery performance prediction results, and calculating the Kappa consistency coefficient based on the confusion matrix, the F1 score and weighted accuracy of the poor battery to obtain a decision matrix; S4. Apply the TOPSIS method to perform weighted standardization on the decision matrix, determine the maximum and minimum values of each column of the weighted standardized decision matrix, calculate the distance to the optimal solution and the distance to the worst solution, and obtain the proximity. Based on the proximity, screen the performance prediction results of each battery to obtain the optimal battery performance prediction result, and select the fuel cell voltage prediction model corresponding to the optimal battery performance prediction result to perform actual battery voltage performance prediction.
2. A fuel cell voltage consistency classification prediction method based on Topsis according to claim 1, characterized in that: The F1 score of the poor battery is: Among them, P -1 It represents the proportion of samples whose battery performance prediction result is poor battery and actually is poor battery in all samples whose prediction result is poor battery, R -1 It indicates the proportion of samples that are predicted to be bad batteries and are actually bad batteries among all samples that are actually bad batteries.
3. A fuel cell voltage consistency classification prediction method based on Topsis according to claim 2, characterized in that: The weighted accuracy is: Among them, N i represents the number of samples of category i, P i represents the accuracy of category i, and N represents the total number of samples.
4. A fuel cell voltage consistency classification prediction method based on Topsis according to claim 3, characterized in that: Each column of the confusion matrix represents the predicted category of the battery performance prediction results, and each row of the confusion matrix represents the true attribute performance category of the data.
5. A fuel cell voltage consistency classification prediction method based on Topsis according to claim 4, characterized in that: The Kappa consistency coefficient is: Among them, p o is the observation consistency ratio, p e is the accidental agreement proportion, x ij Represents the confusion matrix element, and N represents the total number of samples.
6. A fuel cell voltage consistency classification prediction method based on Topsis according to claim 1, characterized in that: The distance between the best solution and the worst solution is: in, is the optimal solution distance, is the worst solution distance, z j represents the jth column of the weighted normalized decision matrix, z ij Represents the data in the i-th row and j-th column of the weighted and standardized decision matrix.
7. A fuel cell voltage consistency classification prediction method based on Topsis according to claim 6, characterized in that: The decision matrix consists of three columns, representing the weighted accuracy, Kappa consistency coefficient and F1 score of poor batteries respectively. The rows of the decision matrix are the mean of the weighted accuracy of each battery performance prediction result on the validation set, the mean of the Kappa consistency coefficient on the validation set and the mean of the F1 score of the poor battery on the validation set.
8. A fuel cell voltage consistency classification prediction method based on Topsis according to claim 7, characterized in that: The proximity is: Among them, C i Indicates proximity.
9. The method for classifying and predicting fuel cell voltage consistency based on Topsis according to claim 1, characterized in that: The deviation is: Among them, V i is the single cell voltage in the fuel cell voltage data, is the average value difference of the single battery voltage, V min is the minimum voltage of a single battery.
10. A fuel cell voltage consistency classification prediction method based on Topsis according to claim 9, characterized in that: The relative deviation limits are: Among them, Δ i Indicates the degree of deviation.
Citation Information
Patent Citations
Cell voltage consistency and fault intervention system of fuel cell system
CN114019392A
Parameter optimization method of proton exchange membrane fuel cell
CN114447378A
Power quality comprehensive evaluation method and system based on IFAHP-CRITIC and TOPSIS
CN114971233A
Design method of proton exchange membrane fuel cell runner baffle structure
CN116822093A
Method and device for evaluating voltage consistency of single cells of fuel cell stack and medium
CN118393352A