A method and system for predicting performance degradation of a dynamically operating proton exchange membrane fuel cell
By combining the weighted random forest fusion method of LSTM and Transformer, and using the relative voltage decay rate as a health indicator to screen important aging parameters, the accuracy and stability problems of single data-driven models in fuel cell degradation prediction are solved, and accurate prediction under dynamic operating conditions is achieved.
Patent Information
- Application Number
- CN202411888257.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2044-12-20
AI Technical Summary
Existing single-data-driven models have limitations in predicting fuel cell degradation, including limited accuracy and poor generalization. In particular, under dynamic operating conditions, the voltage and power health indicators caused by load current changes cannot intuitively reflect the degradation of the fuel cell.
A weighted-random forest fusion method is adopted, which combines the ability of LSTM to process long-term dependencies in time series and the ability of Transformer to capture global information. The relative voltage decay rate is used as a health indicator to screen important aging parameters, and a weighted average and random forest fusion model is constructed to predict the performance degradation of fuel cells.
It improves the accuracy and stability of fuel cell degradation prediction, is suitable for accurate prediction under dynamic operation, reduces prediction fluctuations, and enhances the ability to model fuel cell performance degradation.
Smart Images

Figure CN119936662B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of proton exchange membrane fuel cell degradation prediction, specifically relating to a method and system for predicting the performance degradation of dynamically operating proton exchange membrane fuel cells. Background Technology
[0002] Proton exchange membrane fuel cells (PEMFCs), as efficient and clean energy conversion devices, have attracted widespread attention in recent years, especially in electric vehicles and distributed power generation, demonstrating enormous application potential. Among these, hydrogen fuel cell vehicles represent the most efficient way to utilize hydrogen energy, achieving an energy conversion efficiency of up to 60%. However, automotive fuel cell stacks experience performance degradation during long-term operation, manifested as decreased output power and reduced efficiency. This is mainly related to internal electrochemical reactions and material aging. Therefore, accurately predicting the Health Indicator (HI) of automotive fuel cell stacks is crucial for extending their lifespan, improving system reliability, and reducing maintenance costs.
[0003] In recent years, data-driven degradation prediction methods have gradually become a research hotspot. By utilizing historical data from fuel cell operation, machine learning algorithms can build effective prediction models without requiring in-depth understanding of the system's internal mechanisms. Among numerous data-driven prediction methods, time series models such as Long Short-Term Memory (LSTM) networks and attention-based Transformer models have shown outstanding performance.
[0004] LSTM models are effective at capturing long-term dependencies in time series, but they perform poorly with longer sequences that have distant dependencies. Transformers, with their self-attention mechanism, excel at capturing global information and have the ability to process data in parallel; however, unlike LSTMs, Transformers do not directly embed temporal information, resulting in weaker time series modeling capabilities. Single-data-driven models for fuel cell degradation prediction often suffer from limited prediction accuracy and poor generalization. Summary of the Invention
[0005] The purpose of this invention is to provide a dynamic proton exchange membrane fuel cell performance degradation prediction method, which is based on a fusion data-driven model. By combining the advantages of LSTM in processing long-term dependencies in time series and the excellent ability of Transformer in capturing global information and complex nonlinear relationships, it can accurately capture the degradation trend of fuel cells while reducing prediction fluctuations and improving prediction stability. It is also suitable for accurate prediction of fuel cell degradation under dynamic operation.
[0006] The objective of this invention is achieved through the following technical solution:
[0007] A method for predicting the performance degradation of a dynamically operating proton exchange membrane fuel cell includes the following steps:
[0008] Step S1: Obtain aging parameter data of the fuel cell stack during operation; the aging parameters include at least stack temperature, cathode inlet pressure, anode inlet pressure, voltage, cathode inlet flow rate, and anode inlet flow rate.
[0009] Step S2: Obtain the relative voltage decay rate as a health indicator value based on the aging parameter data;
[0010] Step S3: Using health index values as target values and aging parameters as input values, calculate the SHAP (SHapley Additive exPlanation) value of each aging parameter and rank the aging parameter features by importance; select the aging parameters that have a significant impact on fuel cell performance degradation as input to the data-driven model based on the importance ranking.
[0011] Step S4: Train a single data-driven LSTM model and a Transformer model based on the health indicator values and the selected aging parameters, and predict the health indicator values based on the LSTM model and the Transformer model.
[0012] Step S5: Input the observed values and predicted health indicator values into the weighted average fusion model and the random forest fusion model to obtain the predicted values;
[0013] Step S6: Select a suitable fusion model based on the prediction error of the random forest model. If the error of the random forest model is greater than the deviation threshold, select the weighted average fusion model; otherwise, select the random forest model for fusion to obtain the final fuel cell degradation prediction result.
[0014] As a preferred technical solution of the present invention, the calculation steps for the relative voltage attenuation rate in step S2 are as follows:
[0015] Step S2.1: Fit the fuel cell degradation semi-empirical equation using the initial polarization curve data measured in step S1;
[0016] Step S2.2: Calculate the initial voltage under different current values using the fitted polarization curve equation;
[0017] Step S2.3: For H time steps, use the voltage E at the current time step t. t The RVLR is obtained by calculating the initial voltage E0 using formula (2).
[0018] RVLR=(E t -E0) / E0 (15)
[0019] As a preferred technical solution of the present invention: the calculation of the SHAP value of each aging parameter and the ranking of the importance of the aging parameter features in step S3 are as follows:
[0020] Step S3.1: Using the HI value calculated in step S2 as the target value, and each aging feature i parameter as input, calculate the incremental contribution after adding feature i;
[0021] Step S3.2: Calculate the corresponding weight for each feature subset S;
[0022] Step S3.3: Calculate the SHAP value φ of feature i by summing the weighted incremental contributions of all subsets S that do not contain i. i ;
[0023] Step S3.4: Sort the various aging characteristic parameters according to the SHAP values calculated above, and select the parameters that have a significant impact on fuel cell performance degradation as inputs to the data-driven model.
[0024] As a more preferred technical solution of the present invention: the calculation formula of the LSTM model used in step S4 is as follows:
[0025]
[0026] Where f t This is the output of the forget gate, i t It is the output of the input gate. It is to estimate the cell state. t It is the output of the output gate;
[0027] As a more preferred technical solution of the present invention: the self-attention mechanism of the Transformer model used in step S4 calculates the query, key, and value at each position in the input sequence:
[0028] Q = XW Q K = XW K V = XW V (17)
[0029] In the formula, X is the input matrix, W Q W K W V It is a weight matrix; the softmax function ensures that the scores are normalized to a probability distribution; then, the weighted values are calculated using the attention weights to obtain the final output:
[0030]
[0031] Where d k It is the dimension of the key; the Transformer uses a multi-head attention mechanism, which computes multiple attention heads in parallel, and the result is:
[0032]
[0033] Among them W O W i Q W i K and W i V It is a parameter matrix.
[0034] As a preferred technical solution of the present invention, step S5 includes the following steps:
[0035] Step S5.1: The prediction results of LSTM and Transformer are used as input X = {x1, x2}. θ is defined as a random variable to determine the structure and splitting method of the decision tree. X is the input vector of the random forest model, and its domain is T. For each x∈T, there is only one leaf node l that satisfies x∈T.
[0036] Step S5.2: Resample using the bootstrap method to generate corresponding decision trees from m random training sets.
[0037] Step S5.3: For the new data X i ={x1,x2}, the predicted value of a single decision tree T(θ) can be obtained by averaging the observations of the leaf nodes l(x,θ). Assuming the observed value X... i It belongs to the leaf node l(x,θ) and is not zero, so its weight is,
[0038]
[0039] Where R l (x,θ) represents the rectangular subspace corresponding to each leaf node l = 1, 2, ..., M in the domain T, where the observed values y i The predicted value of a single decision tree can be calculated by weighting the values of (i = 1, 2, ..., n).
[0040]
[0041] Step S5.4: Use formula (12) to adjust the weights w of the decision tree. i Calculate the average of (h,θr) (r=1,2,...,m) to obtain the weight w for each observation. i (h),
[0042]
[0043] Step S5.5: The predicted value of the random forest fusion method is:
[0044]
[0045] Step S5.6: Let the root mean square error (RMSE) of the prediction results of the Transformer and LSTM models be R1 and R2, respectively. The weights ω1 and ω2 in formula (12) can be expressed as follows:
[0046]
[0047] The predictions from each model are weighted according to their respective weights, and these weighted results are then summed. The weighted average prediction value can be expressed as follows:
[0048]
[0049] As a preferred technical solution of the present invention, step S6 includes the following steps:
[0050] Step S6.1: Input the prediction results X = {x1, x2} from LSTM and Transformer into the two fusion methods to obtain the predicted value of the RFR fusion model. Weighted average fusion prediction
[0051] Step S6.2: Replace the disordered predicted values with the predicted values obtained using a weighted average fusion method. The formula for calculating the average predicted value of the single data-driven model is as follows:
[0052]
[0053] The error threshold is defined as follows:
[0054]
[0055] Step S6.3: The prediction error of the random forest fusion model is defined as follows:
[0056]
[0057] With the error coefficient set at 2.5, the final fuel cell degradation prediction result is:
[0058]
[0059] Another object of the present invention is to provide a dynamic proton exchange membrane fuel cell performance degradation prediction system, comprising:
[0060] The parameter acquisition module is used to acquire aging parameter data of the fuel cell stack during operation.
[0061] The data calculation module is used to obtain the relative voltage decay rate as a health indicator value based on the aging parameter data;
[0062] The data filtering module is used to calculate the SHAP value of each aging parameter and sort the aging parameter features by importance; the aging parameters with the greatest impact on fuel cell performance degradation are selected as inputs for the data-driven model after the importance ranking.
[0063] The model training module is used to train a single data-driven LSTM model and a Transformer model based on the health indicator values and the selected aging parameters, and to predict the health indicator values based on the LSTM model and the Transformer model.
[0064] The result prediction module is used to input the observed values and predicted health index values into the weighted average fusion model and the random forest fusion model to obtain the predicted values; the predicted values of the weighted average fusion model are used to replace the disordered predicted values of the random forest fusion model to obtain the final fuel cell degradation prediction results.
[0065] The beneficial effects are as follows:
[0066] Existing research on fuel cell degradation prediction mainly focuses on single data-driven models or their improvements. However, single data-driven models often suffer from limited prediction accuracy and poor generalization. This invention proposes a multi-model joint prediction method based on a weighted-random forest fusion approach. By combining the advantages of LSTM in handling long-term dependencies in time series data with the excellent ability of Transformer in capturing global information and complex nonlinear relationships, this method effectively enhances the ability to model fuel cell performance degradation and improves the accuracy of fuel cell degradation prediction.
[0067] To address the issue of disordered early predictions in the random forest fusion method caused by the initial prediction drift of a single data-driven model under a multi-input multi-output prediction strategy, a weighted average fusion method is used to replace the disordered predictions in the random forest method. Since the weighted average method directly assigns weights based on the model's performance on the training set, it does not cause significant fluctuations when the predictions of a single data-driven model drift.
[0068] Under dynamic operating conditions, due to the uncertainty of load current changes, voltage and power, as health indicators, cannot directly reflect the degradation of fuel cells. Extracting the relative voltage decay rate as a health indicator of fuel cell performance degradation allows for direct comparison of degradation under different operating conditions, thus enabling a more accurate assessment of degradation trends.
[0069] The multi-model joint prediction method using weighted-random forest fusion proposed in this invention can accurately capture the degradation trend of fuel cells while reducing prediction fluctuations and improving prediction stability. It is also suitable for accurate prediction of fuel cell degradation under dynamic operation. Attached Figure Description
[0070] Figure 1 This is a flowchart of the process for extracting the relative voltage decay rate according to the present invention;
[0071] Figure 2 This is a block diagram of the fusion data-driven model method of the present invention;
[0072] Figure 3 This is a schematic diagram of the multi-input multi-output prediction strategy of the present invention.
[0073] Figure 4 This is a comparison chart of the prediction results of the fusion model and the single data-driven model of the present invention (TP=100, m=80);
[0074] Figure 5 This is a comparison chart of the evaluation metrics of the fusion model and the single data-driven model of the present invention. Detailed Implementation
[0075] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be fully described below with reference to the accompanying drawings in the embodiments of this invention, through specific implementation methods. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort fall within the protection scope of this invention.
[0076] Combined with the present invention Figure 1 and Figure 2This embodiment provides a dynamic fuel cell degradation prediction method based on a fusion data-driven model. First, fuel cell aging data is obtained through sensor measurement devices and subjected to noise removal and downsampling processing. Then, a semi-empirical equation for the fuel cell is fitted using polarization curve data, and the relative voltage decay rate is calculated as a health indicator for the dynamically operating fuel cell. Using the relative voltage decay rate as the target value, the SHAP values of various degradation parameters are calculated, and these parameters are selected as input parameters for the data model. A weighted-random forest fusion model is constructed using a single data-driven model (LSTM) and a Transformer model. Finally, the predicted values from the LSTM and Transformer models are input into the weighted-random forest fusion model to obtain the final fuel cell degradation prediction result.
[0077] The weighted-random forest fusion multi-model joint prediction method proposed in this invention can accurately capture the degradation trend of fuel cells while reducing prediction volatility and improving prediction stability. It is also suitable for accurate prediction of fuel cell degradation under dynamic operation. The specific steps are as follows:
[0078] Step S1: Acquire actual aging data of the fuel cell stack during the durability test using a sensor measurement device. The collected aging parameters include stack temperature, anode and cathode inlet pressure, voltage, and anode and cathode flow rates. The acquired raw fuel cell aging data is then processed to remove noise and undergoes downsampling.
[0079] Step S2: Calculate the relative voltage-loss rate (RVLR) as a health indicator of fuel cell performance degradation.
[0080] Step S2.1: Fit the fuel cell degradation semi-empirical equation using the initial polarization curve data measured in step S1. The fuel cell degradation semi-empirical equation is defined as follows:
[0081]
[0082] Where E OCV Let b and i be the open-circuit voltages. loss R, m, and n are five fitting parameters.
[0083] Step S2.2: Calculate the initial voltage E0 under different current values using the fitted polarization curve equation.
[0084] Step S2.3: For H time steps (H being the total number of data points), use the voltage E at the current time step t. t The RVLR is obtained by calculating the starting voltage E0 using formula (2). RVLR is defined as follows:
[0085] RVLR=(Et -E0) / E0 (31)
[0086] Step S3: Using the RVLR calculated in Step 2 as the target value, the values of various aging parameters of the fuel cell measured by the sensor measurement device in Step 1 are used as input values. The SHAP value of each aging parameter is calculated, and the aging parameters are sorted by feature importance to select the aging parameters that have a greater impact on the performance degradation of the fuel cell as inputs to the data-driven model.
[0087] Step S3 ranks the aging parameters by calculating their SHAP values, and includes the following steps:
[0088] Step S3.1: Using the HI value calculated in step S2 as the target value, and the parameters of each aging feature i as input, calculate the incremental contribution after adding feature i.
[0089] Δf(S,i)=f(S∪{i})-f(S) (32)
[0090] Where f(S) represents the model output using only the feature subset S, and f(S∪{i}) represents the model output after adding feature i to S.
[0091] Step S3.2: Calculate the corresponding weight for each feature subset S. For each subset S, the weight of feature i added to the subset can be calculated as follows:
[0092]
[0093] Where |S| is the number of features in subset S, and |N| is the size of the entire feature set.
[0094] Step S3.3: Calculate the SHAP value φ of feature i by summing the weighted incremental contributions of all subsets S that do not contain i. i ,
[0095]
[0096] Step S3.4: Sort the various aging characteristic parameters according to the SHAP values calculated above, and select the parameters that have a greater impact on fuel cell performance degradation as inputs to the data-driven model.
[0097] Step S4: Combine the HI values calculated in Step 2 and the aging parameter values selected in Step 3 to form a fuel cell degradation dataset. Divide the dataset into a training set, a validation set, and a test set in a 6:1:3 ratio. Train a single data-driven model, LSTM, and a Transformer model using the training and validation sets.
[0098] The calculation formula for the LSTM model used in step S4 is as follows:
[0099]
[0100] Where f t This is the output of the forget gate, i t It is the output of the input gate. It is to estimate the cell state. t It is the output of the output gate.
[0101] The Transformer model's self-attention mechanism computes the query, key, and value at each position in the input sequence:
[0102] Q = XW Q K = XW K V = XW V (36)
[0103] In the formula, X is the input matrix, W Q W K W V This is the weight matrix. The softmax function ensures that the scores are normalized to a probability distribution. Then, the weighted values are calculated using the attention weights to obtain the final output:
[0104]
[0105] Where d k This is the dimension of the key. The Transformer uses a multi-head attention mechanism, computing multiple attention heads in parallel, resulting in:
[0106]
[0107] Among them W O W i Q W i K and W i V It is a parameter matrix.
[0108] Step S5: Construct a weighted-random forest fusion model and test the performance of the LSTM and Transformer models on the training and validation sets. Obtain the weighting factors for the weighted average fusion method and the random forest fusion model using the true HI values and the predicted HI values from the LSTM and Transformer models.
[0109] The construction of the weighted-random forest fusion model includes the following steps:
[0110] Step S5.1: The prediction results of LSTM and Transformer are used as input X = {x1, x2}. Define θ as a random variable to determine the structure and splitting method of the decision tree. X is the input vector of the random forest model, and its domain is T. For each x∈T, there is only one leaf node l that satisfies x∈T.
[0111] Step S5.2: Resample using the bootstrap method. Generate the corresponding decision tree from the m random training sets.
[0112] Step S5.3: For the new data X i ={x1,x2}, a single decision tree T(θ) can be obtained by averaging the observations of the leaf nodes l(x,θ).
[0113] The predicted value. Assume the observed value X... i It belongs to the leaf node l(x,θ) and is not zero. Therefore, the weight is...
[0114]
[0115] Where R l (x,θ) represents the rectangular subspace corresponding to each leaf node l = 1, 2, ..., M in the domain T.
[0116] The observed value y i The predicted value of a single decision tree can be calculated by weighting the values of (i = 1, 2, ..., n).
[0117]
[0118] Step S5.4: Use formula (12) to adjust the weights w of the decision tree. i Calculate the average of (h,θr) (r=1,2,...,m) to obtain the weight w for each observation. i (h).
[0119]
[0120] Step S5.5: The predicted value of the random forest fusion method is:
[0121]
[0122] Step S5.6: Let the root mean square error (RMSE) of the prediction results of the Transformer and LSTM models be R1 and R2, respectively. The weights ω1 and ω2 in formula (12) can be expressed as follows:
[0123]
[0124] The predictions from each model are weighted according to their respective weights, and these weighted results are then summed. The weighted average prediction value can be expressed as follows:
[0125]
[0126] Step S6: Input the predictions from the LSTM and Transformer models on the test set into the weighted random forest fusion model to obtain the final fuel cell degradation prediction results. The weighted random forest fusion model testing phase includes the following steps:
[0127] Step S6.1: Input the prediction results X = {x1, x2} from LSTM and Transformer into the two fusion methods to obtain the predicted value of the RFR fusion model. Weighted average fusion prediction
[0128] Because the initial predictions in a single-data-driven model exhibit drift in a multi-input multi-output (MIMO) prediction strategy, the random forest fusion method introduces disordered predictions, leading to prediction instability and reduced overall accuracy. A weighted average fusion method is used to replace these disordered values, improving the model's stability and accuracy. The formula for calculating the average prediction value of the single-data-driven model is as follows:
[0129]
[0130] The error threshold is defined as follows:
[0131]
[0132] Step S6.3: The prediction error of the random forest fusion model is defined as follows:
[0133]
[0134] With the error coefficient set at 2.5, the final fuel cell degradation prediction result is:
[0135]
[0136] The effectiveness of this invention is further illustrated below through simulation results on PyTorch 1.13.1. To verify the effectiveness of the proposed fusion model, a fuel cell aging dataset provided by Xiangyang Da'an Testing Center was used, and this experiment was designed for verification. The multi-input multi-output prediction strategy used in this experiment, such as... Figure 3As shown. By changing the input vector TP of different lengths, the RVLR of multiple future time steps m is predicted to verify the effectiveness of the proposed fusion data-driven model and make it more suitable for practical applications. The results of the fusion model are compared and analyzed with those of the single data-driven model, as shown. Figure 4 As shown in the enlarged graph, when both LSTM and Transformer predictions deviate from the true values to varying degrees, the prediction result of the fusion method is closer to the true value. This is because the fusion model "learns" from the errors of the single data-driven model in the early stages, and can obtain more accurate predictions in later predictions. The comparison of the prediction results of the fusion model and the single data-driven model of this invention is shown in Table 1 (the best result is indicated in bold). Under different sliding window lengths and prediction lengths, the fusion method shows a significant advantage in predicting the degradation trend of fuel cells, and has better prediction accuracy than the single Transformer and LSTM models.
[0137] Table 1
[0138]
[0139] In all experimental configurations, the fusion method showed significantly lower RMSE and average MAE than the individual Transformer and LSTM models, indicating that the fusion method can more accurately capture degradation trends. Figure 5 As shown, the fusion model achieves an average RMSE of 0.088% and an average MAE of 0.058% at different prediction durations, representing improvements of 8% and 13% respectively compared to the single model. Based on the above information, this invention proposes a dynamic fuel cell degradation prediction method based on a fusion data-driven model. This method can accurately capture fuel cell degradation trends while reducing prediction fluctuations and improving prediction stability, making it suitable for accurate fuel cell degradation prediction under dynamic operation.
[0140] Based on the same idea, this invention provides a dynamic proton exchange membrane fuel cell performance degradation prediction system in other embodiments, comprising: a parameter acquisition module for acquiring aging parameter data of the fuel cell stack during operation; a data calculation module for acquiring the relative voltage decay rate as a health indicator value based on the aging parameter data; a data filtering module for calculating the SHAP value of each aging parameter and ranking the aging parameter features by importance; filtering out aging parameters with a significant impact on fuel cell performance degradation as input to a data-driven model; a model training module for training a single data-driven LSTM model and a Transformer model based on the health indicator value and the filtered aging parameters, and predicting the health indicator value based on the LSTM model and the Transformer model; and a result prediction module for inputting the observed value and the predicted health indicator value into a weighted average fusion model and a random forest fusion model to obtain the predicted value; replacing the disordered predicted value of the random forest fusion model with the predicted value of the weighted average fusion model to obtain the final fuel cell degradation prediction result.
[0141] The above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A method of predicting performance degradation of a dynamically operating proton exchange membrane fuel cell, characterized by, Comprising the following steps: Step S1, obtaining the aging parameter data of the fuel cell stack during the operating condition; the aging parameters include stack temperature, cathode inlet pressure, anode inlet pressure, voltage, and cathode and anode inlet gas flow rate, etc.; Step S2, obtaining the relative voltage attenuation rate as the health index value according to the aging parameter data; Step S3, taking the health index value as the target value, and each aging parameter as the input value, calculating the SHAP (SHapley Additive exPlanation) value of each aging parameter, and performing aging parameter feature importance sorting; The important sorting is performed to screen out the aging parameters that have a great influence on the performance degradation of the fuel cell as the input of the data-driven model; Step S4, training a single data-driven LSTM model and a Transformer model according to the health index value and the screened aging parameters, and predicting the health index value according to the LSTM model and the Transformer model; Step S5, inputting the observed value and the predicted health index value into a weighted average fusion model and a random forest fusion model to obtain the predicted value; The prediction results of LSTM and Transformer are used as input X = {x1, x2}, define θ as a random variable to determine the structure and splitting of the decision tree, X is the input vector of the random forest model, and its domain is T, then For each x e T, only one leaf node l satisfies x e T, Using the bootstrap method to resample, generating the corresponding decision tree from m random training sets, For new data X i The prediction of a single decision tree T(0) is obtained by averaging the observations of leaf nodes l(x, 0), assuming that the observation X i belongs to a leaf node l(x, 0) and is non-zero, the weight is where R l (x, θ) represents the rectangular subspace corresponding to each leaf node l = 1, 2, …, M in the definition domain T, and the observed value y i (i = 1, 2, …, n) weighted average can be calculated to calculate the prediction value of a single decision tree. Using equation (3) to calculate the weight w of the decision tree i (h, θr) (r = 1, 2,..., m) to obtain the weight w of each observation value i (h), The predicted value of the random forest fusion method is: Let the root mean square errors of the prediction results of the Transformer and the LSTM model be R1 and R2 respectively, and the weights ω1 and ω2 in formula (3) be The prediction results of each model are weighted according to their weights, and finally these weighted results are added, and the predicted value after weighted average fusion is as follows Step S6, selecting a suitable fusion model according to the prediction error of the random forest model, if the error of the random forest model is greater than the deviation threshold, selecting the weighted average fusion model, otherwise, selecting the random forest model for fusion to obtain the final fuel cell degradation prediction result.
2. The method of claim 1, wherein the degradation of the performance of the dynamic operating proton exchange membrane fuel cell is predicted by: The step S2 is as follows: The initial polarization curve data measured by step S1 is fitted to a semi-empirical equation of fuel cell degradation; The initial voltage under different current values is calculated by the fitted polarization curve equation; The RVLR is obtained from the voltage E at the current time step t t and the starting voltage E0 calculated by equation (2) RVLR= (E t -E0) / E0 (7).
3. The method for predicting the performance degradation of a dynamically operating proton exchange membrane fuel cell as described in claim 1, characterized in that, The step S3 is as follows: Taking the HI value calculated in step S2 as the target value, and each aging feature i parameter as the input, the incremental contribution after adding the feature i is calculated; The corresponding weight of each feature subset S is calculated; The SHAP value φ for feature i is calculated by summing the weighted incremental contributions of all subsets S that do not contain i i ; Each aging feature parameter is sorted according to the SHAP value calculated above, and the parameters that have a great influence on the performance degradation of the fuel cell are screened out as the input of the data-driven model.
4. The method for predicting the performance degradation of a dynamically operating proton exchange membrane fuel cell as described in claim 1, characterized in that, The calculation formula of the LSTM model used in step S4 is where f t is the output of the forget gate, i t is the output of the input gate, is the estimated cell state, o t is the output of the output gate.
5. The method for predicting the performance degradation of a dynamically operating proton exchange membrane fuel cell as described in claim 1, characterized in that, The self-attention mechanism of the Transformer model used in step S4 is calculated by calculating the query (Query), key (Key) and value (Value) of each position in the input sequence: Q = XW Q K = XW K V = XW V (9) where X is the input matrix, W Q , W K , and W V are weight matrices; the softmax function ensures that the scores are normalized into a probability distribution; then, the weighted values are computed by the attention weights to get the final output: where d k is the dimension of the key; the Transformer uses a multi-head attention mechanism, which computes multiple attention heads in parallel, resulting in: where W O , W i Q , W i K and W i V are parameter matrices.
6. The method of claim 1, wherein the degradation of the performance of the dynamic operating proton exchange membrane fuel cell is predicted by: The step S6 includes the following steps: The prediction results X = {x1, x2} of LSTM and Transformer are input into two fusion methods to obtain the prediction value of the RFR fusion model and the weighted average fusion prediction value The predicted value of the weighted average fusion method is used to replace the disorderly predicted value, and the average value calculation formula of the single data-driven model prediction is The error threshold is defined as The prediction error of the random forest fusion model is defined as The error coefficient is set to 2.5, and the final fuel cell degradation prediction result is 。 7. A dynamic operating proton exchange membrane fuel cell performance degradation prediction system, characterized by, The method comprises the following steps: a parameter acquisition module is configured to acquire aging parameter data of a fuel cell stack during an operating condition; a data calculation module is configured to obtain a relative voltage attenuation rate as a health index value according to the aging parameter data; a data screening module is configured to calculate SHAP values of each aging parameter and perform aging parameter feature importance sorting; an importance sorting module is configured to screen out aging parameters that have a great influence on the performance degradation of the fuel cell as inputs of a data-driven model; a model training module is configured to train a single data-driven LSTM model and a Transformer model according to the health index value and the screened aging parameters, and to predict the health index value according to the LSTM model and the Transformer model; a performance degradation prediction module is configured to input an observation value and a predicted health index value into a weighted average fusion model and a random forest fusion model to obtain a predicted value; the predicted value of the weighted average fusion model is used to replace a disturbed predicted value of the random forest fusion model, and a final fuel cell degradation prediction result is obtained.
Citation Information
Patent Citations
New energy automobile power supply safety detection method
CN116881701A
Nickel-cadmium storage battery health state prediction method, apparatus and device, and storage medium
CN117930055A