Method and device for predicting residual life of fuel cell stack

By fusing BP neural network and GRU neural network models, combining genetic algorithm optimization, configuring prediction weights, and forming a target prediction model, the problem of insufficient accuracy of fuel cell stack life prediction is solved and prediction accuracy is improved.

CN118938054AActive Publication Date: 2024-11-12DONGFENG MOTOR GRP
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202410927181.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-11-12
Estimated Expiration
2044-07-11

AI Technical Summary

Technical Problem

The existing fuel cell stack residual life prediction methods are noise-sensitive, have a tendency to overfit and lack physical significance, so they cannot accurately predict the service life of fuel cell stack.

Method used

A predictive sub-model that combines the BP neural network model and the GRU neural network model is adopted to optimize hyperparameters through genetic algorithms, combine target data for training and testing, configure prediction weights, and form a target prediction model to predict the remaining life of the fuel cell stack.

Benefits of technology

The accuracy of fuel cell stack residual life prediction is improved, and the advantages of different prediction sub-models are balanced through multi-model fusion and weight allocation, and data processing capabilities are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118938054A_ABST
    Figure CN118938054A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for predicting the residual life of a fuel cell stack, and relates to the technical field of battery life prediction. According to the technical scheme, the target data of the fuel cell stack is obtained, the preset initial prediction model is trained and tested through the target data, and the residual life of the fuel cell stack is predicted after the initial prediction model is trained and tested because the initial prediction model is a model which fuses at least two prediction sub-models and is used for predicting the residual life of the fuel cell stack. The prediction error of each prediction sub-model in the initial prediction model can be obtained; configuring a prediction weight of the corresponding prediction sub-model in the initial prediction model according to the prediction error of each prediction sub-model in order to enable each prediction sub-model to be accurately applied, so as to obtain a target prediction model; and predicting the residual life of the fuel cell stack according to the target prediction model. According to the scheme, the accuracy of predicting the residual life of the fuel cell stack is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of battery life prediction, and in particular to a method and device for predicting the remaining life of a fuel cell stack. Background Art

[0002] Fuel cells are widely used in various fields due to their pollution-free, stable performance, long service life, and high energy density. However, the fuel cell stack will naturally age with the use of time. When the service life of the fuel cell stack reaches the critical value of life, the probability of accidents will increase, thus affecting the normal operation of the equipment. Therefore, accurately predicting the remaining life of the fuel cell stack has high practical value. The current prediction method has the disadvantages of sensitivity to noise, strong overfitting tendency and lack of physical meaning. At the same time, due to the complexity of the fuel cell stack degradation mechanism, it cannot be fully expressed by formula, resulting in the inability to accurately predict the service life of the fuel cell stack.

[0003] Therefore, how to improve the accuracy of the prediction of the remaining life of a fuel cell stack is a technical problem that needs to be solved urgently. Summary of the invention

[0004] The present invention provides a method and device for predicting the remaining life of a fuel cell stack, which can improve the accuracy of predicting the remaining life of a fuel cell stack.

[0005] The embodiment of the present invention provides the following solution:

[0006] In a first aspect, an embodiment of the present invention provides a method for predicting the remaining life of a fuel cell stack, the method comprising:

[0007] Obtaining target data of the fuel cell stack, wherein the target data is data related to the service life of the fuel cell stack during its operation;

[0008] Training and testing a preset initial prediction model according to target data to obtain a prediction error of each prediction sub-model in the initial prediction model, wherein the initial prediction model is a model that integrates at least two prediction sub-models and is used for predicting the remaining life of a fuel cell stack;

[0009] According to the prediction error of each prediction sub-model, the prediction weight of the corresponding prediction sub-model in the initial prediction model is configured to obtain the target prediction model;

[0010] The remaining life of the fuel cell stack is predicted based on the target prediction model.

[0011] In an optional embodiment, obtaining target data of a fuel cell stack includes:

[0012] Obtain durability test data collected in real time during the durability test of the fuel cell stack;

[0013] Extracting polarization test data from the durability test data according to a preset interval period;

[0014] The test time, test current and output voltage represented by the polarization test data are determined as target data for the fuel cell stack.

[0015] In an optional embodiment, a preset initial prediction model is trained and tested according to target data to obtain a prediction error of each prediction sub-model in the initial prediction model, including:

[0016] Divide the target data into a training set and a test set for the initial prediction model;

[0017] According to the training set, the test set and the preset genetic algorithm model, each prediction sub-model in the initial prediction model is trained and tested respectively to obtain the test results of each prediction sub-model that has completed the training;

[0018] Determine whether each test result meets the preset target condition of the corresponding prediction sub-model;

[0019] If not, continue to train and test the prediction sub-models that do not meet the preset target conditions until the preset target conditions are met;

[0020] If so, the prediction error corresponding to each prediction sub-model is determined according to the voltage deviation between the predicted voltage of each prediction sub-model and the output voltage of the fuel cell stack.

[0021] In an optional embodiment, the initial prediction model is a prediction model that integrates the BP neural network model and the GRU neural network model; according to the training set, the test set and the preset genetic algorithm model, each prediction sub-model in the initial prediction model is trained and tested respectively to obtain the test results of each prediction sub-model that has completed the training, including:

[0022] According to the genetic algorithm model, the hyperparameters of the BP neural network model and the GRU neural network model are optimized respectively to obtain a first parameter set of the BP neural network model and a second parameter set of the GRU neural network model;

[0023] According to the first parameter set and the second parameter set, respectively configure the BP neural network model and the GRU neural network model;

[0024] The BP neural network model and the GRU neural network model with completed parameter configuration are trained according to the training set;

[0025] The trained BP neural network model and the GRU neural network model are tested according to the test set to obtain a first prediction error set of the trained BP neural network model and a second prediction error set of the trained GRU neural network model;

[0026] Determine the first mean square error of the first prediction error set as the first test result of the trained BP neural network model;

[0027] The second mean square error of the second prediction error set is determined as the second test result of the GRU neural network model that has completed training.

[0028] In an optional embodiment, configuring the prediction weight of the corresponding prediction sub-model in the initial prediction model according to the prediction error of each prediction sub-model to obtain the target prediction model includes:

[0029] The current prediction error is smoothed according to the historical prediction error of each prediction sub-model to obtain the target prediction error of each prediction sub-model; wherein the current prediction error is the prediction error obtained by the prediction sub-model based on the target data of the same current data collection period;

[0030] The target prediction error of each prediction sub-model is converted to obtain the target prediction weight corresponding to each prediction sub-model;

[0031] Each target prediction weight is assigned to the corresponding prediction sub-model to obtain the target prediction model.

[0032] In an optional embodiment, the current prediction error is smoothed according to the historical prediction error of each prediction sub-model to obtain the target prediction error of each prediction sub-model, including:

[0033] According to the formula Get the target prediction error ε of each prediction sub-model, where x i is the prediction error, ωi is the error weight corresponding to the prediction error, and n is a natural number greater than 1.

[0034] In an optional embodiment, predicting the remaining life of a fuel cell stack according to a target prediction model includes:

[0035] Obtaining the test time and test current of the polarization test for the fuel cell stack whose remaining life is to be predicted;

[0036] Inputting the test time and test current into the target prediction model to obtain the output voltage of the fuel cell stack whose remaining life is to be predicted;

[0037] The degradation rate of the fuel cell stack whose remaining life is to be predicted is determined according to the output voltage, and the remaining life of the fuel cell stack whose remaining life is to be predicted is characterized based on the degradation rate.

[0038] In a second aspect, an embodiment of the present invention further provides a device for predicting the remaining life of a fuel cell stack, the device comprising:

[0039] An acquisition module, used to acquire target data of a fuel cell stack, wherein the target data is data associated with the service life of the fuel cell stack during its operation;

[0040] A first acquisition module is used to train and test a preset initial prediction model according to target data to obtain a prediction error of each prediction sub-model in the initial prediction model, wherein the initial prediction model is a model that integrates at least two prediction sub-models and is used for predicting the remaining life of a fuel cell stack;

[0041] The second acquisition module is used to configure the prediction weight of the corresponding prediction sub-model in the initial prediction model according to the prediction error of each prediction sub-model to obtain the target prediction model;

[0042] The prediction module is used to predict the remaining life of the fuel cell stack according to the target prediction model.

[0043] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a processor and a memory, wherein the memory is coupled to the processor and stores instructions, and when the instructions are executed by the processor, the electronic device executes the steps of any one of the methods in the first aspect.

[0044] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the methods in the first aspect.

[0045] Compared with the prior art, the method and device for predicting the remaining life of a fuel cell stack of the present invention has the following advantages:

[0046] The technical solution of the present invention obtains the target data of the fuel cell stack, because the target data is the data related to the service life of the fuel cell stack during its operation; the preset initial prediction model is trained and tested through the target data, because the initial prediction model is a model that integrates at least two prediction sub-models and is used for the prediction of the remaining life of the fuel cell stack, after the initial prediction model is trained and tested, the prediction error of each prediction sub-model in the initial prediction model can be obtained; in order to make each prediction sub-model accurately applied, the prediction weight of the corresponding prediction sub-model in the initial prediction model is configured according to the prediction error of each prediction sub-model to obtain the target prediction model; the remaining life of the fuel cell stack is predicted according to the target prediction model. This solution combines multiple prediction sub-models to implement the prediction of the service life of the fuel cell stack, fully utilizes the data processing characteristics of each prediction sub-model through weight allocation, balances the application advantages of different prediction sub-models, and thus improves the accuracy of the prediction of the remaining life of the fuel cell stack. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0048] Figure 1 A flowchart of a method for predicting the remaining life of a fuel cell stack provided by an embodiment of the present invention;

[0049] Figure 2 A schematic diagram of the process of building a prediction model provided by an embodiment of the present invention;

[0050] Figure 3 A technical roadmap for the prediction method provided by the embodiment of the present invention;

[0051] Figure 4 A schematic diagram of the prediction principle of the BP neural network model provided in an embodiment of the present invention;

[0052] Figure 5 A training flow chart of the BP neural network model provided by an embodiment of the present invention;

[0053] Figure 6 A flow chart of implementing voltage prediction using a BP neural network model provided in an embodiment of the present invention;

[0054] Figure 7 A schematic diagram of the structure of a device for predicting the remaining life of a fuel cell stack provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0055] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention belong to the scope of protection of the embodiments of the present invention.

[0056] At present, the prediction of the remaining life of a fuel cell stack is mostly based on empirical or semi-empirical methods, which use ordinary mathematical models to learn the long-term decay law of the battery. However, their disadvantages include sensitivity to noise, strong overfitting tendency and lack of physical meaning. At the same time, due to the complexity of the decay mechanism of the fuel cell stack, it cannot be fully expressed by a formula, resulting in insufficient accuracy in the prediction of the remaining life of the fuel cell stack. The following embodiments of the present invention will specifically explain how to improve the accuracy of the prediction of the remaining life of the fuel cell stack.

[0057] See also Figure 1 , Figure 1 A flowchart of a method for predicting the remaining life of a fuel cell stack provided in an embodiment of the present invention. The method can be applied to a computer or server device to implement the remaining life prediction of a fuel cell stack. The method includes:

[0058] S11. Obtain target data of the fuel cell stack, wherein the target data is data related to the service life of the fuel cell stack during its operation.

[0059] Specifically, the data items of the target data can be configured in multiple ways according to actual needs, such as the cumulative usage time of the fuel cell stack, load current, operating temperature, etc. The corresponding target data can be stored accordingly based on the cumulative usage time of the fuel cell stack.

[0060] It should be noted that the fuel cell stack for collecting target data can be a fuel cell stack that is mounted on a load and running, such as a fuel cell stack installed on a hydrogen fuel vehicle; it can also be a fuel cell stack for testing, such as a fuel cell stack for aging testing or endurance testing on a test stand, and no specific restrictions are made here. The target data can include multiple fuel cell stacks, which are encoded and stored based on different fuel cell stacks.

[0061] In practical applications, since the data of the fuel cell stack is affected by various factors after being put into operation, the target data collected on the vehicle may be inaccurate. Based on this, in a specific implementation, step S11 includes sub-steps S11-1 to S11-3, specifically:

[0062] S11-1. Obtain the durability test data collected in real time during the durability test of the fuel cell stack. The main purpose of the durability test is to evaluate the performance degradation of the fuel cell stack during long-term operation, including changes in key indicators such as voltage stability, current output capacity, electrochemical impedance, and power transmittance. The test can be used to understand the life expectancy of the fuel cell stack and provide an important reference for the design, manufacture, and application of the fuel cell stack. The durability test can be carried out on the fuel cell stack based on the current test specifications, and the test data can be collected in real time during the test and used as the durability test data.

[0063] S11-2, extracting polarization test data from the durability test data according to a preset interval period. The interval period can be determined based on the polarization test requirements or the data volume extraction requirements. For example, the interval period is set to 100 hours, and a polarization curve is extracted from the durability test data every 100 hours. The polarization curve is a curve that characterizes the relationship between the test time, test current and output voltage of the fuel cell stack in the durability test.

[0064] S11-3. Determine the test time, test current and output voltage represented by the polarization test data as the target data of the fuel cell stack. The target data can store the corresponding test current and output voltage based on the test time. It should be noted that the test current can be represented by current density. In the polarization test, it is necessary to implement a load test based on the current density after the fuel cell stack reaches the test time to obtain the corresponding output voltage. The current density can be accumulated sequentially based on a preset step size, for example 0.1A / cm 2 , 0.2A / cm 2 , 0.3A / cm 2 , 0.4A / cm 2 Up to a maximum value, the maximum value can be set as the current density corresponding to the rated current of the fuel cell stack.

[0065] It can be understood that the above method can group and store the test time, test current and output voltage to construct the target data. Since the test current and test time have a greater impact on the fuel cell stack, using them as target data can take into account the time for data processing and the accuracy of the subsequent remaining life prediction. After obtaining the target data of the fuel cell stack, step S12 is entered.

[0066] S12. Train and test a preset initial prediction model according to target data to obtain a prediction error of each prediction sub-model in the initial prediction model, wherein the initial prediction model is a model that integrates at least two prediction sub-models and is used to predict the remaining life of a fuel cell stack.

[0067] Specifically, the initial prediction model can be built based on actual needs, please refer to Figure 2 , Figure 2 The figure is a flow chart of the prediction model construction process. n prediction sub-models are selected, where n is a natural number greater than or equal to 2, including prediction sub-model 1, prediction sub-model 2, prediction sub-model n, etc. All prediction sub-models are fused into a prediction model based on the model fusion strategy. The model fusion strategy can be to use multiple prediction sub-models in parallel, or to use the output of one or more prediction sub-models as the input of other prediction sub-models. The model fusion strategy is not specifically limited here. The target data can be used as a data sample to train the initial prediction model, and after the training is completed, it is tested, and the prediction error of each prediction sub-model is determined based on the test results.

[0068] In practical applications, since the prediction sub-model may involve multiple hyperparameters, it will take a lot of effort and time to adjust it based on the experience of technicians or trial and error. Based on this, in a specific implementation, step S12 includes sub-steps S12-1 to S12-5, specifically:

[0069] S12-1, dividing the target data into a training set and a test set of the initial prediction model. The division ratio of the training set and the test set can be determined based on the total data volume of the target data. For example, when the total data volume is less than a preset interval, the division ratio of the training set to the test set is set to 7:3; when the total data volume is within the preset interval, the division ratio of the training set to the test set is set to 8:2; when the total data volume is greater than the preset interval, the division ratio of the training set to the test set is set to 9:1.

[0070] S12-2, according to the training set, the test set and the preset genetic algorithm model, each prediction sub-model in the initial prediction model is trained and tested respectively to obtain the test results of each prediction sub-model that has completed the training. The prediction sub-model can select the BP neural network model and the LSTM model. The BP neural network model has high accuracy in processing large amounts of data; the LSTM model has good applicability when processing data related to associated time series. However, both of the above models have a large number of hyperparameters. The genetic algorithm model can be used to implement rapid iteration to determine the parameters with greater importance in each model. Then, training and parameter adjustment are performed based on the training set. After the training is completed, the accuracy test of the model is implemented through the test set to obtain the test results of each prediction sub-model. The test results can be characterized as the accuracy of the prediction or the prediction error, which is not specifically limited here.

[0071] The following will take the prediction model that integrates the BP neural network model and the GRU neural network model as an example to explain in detail how to obtain the test results of each prediction sub-model that has completed training, including:

[0072] The first step is to optimize the hyperparameters of the BP neural network model and the GRU neural network model respectively according to the genetic algorithm model to obtain the first parameter set of the BP neural network model and the second parameter set of the GRU neural network model. Taking the BP neural network model as an example, it is a very difficult task to optimize its parameters. The reason is that there are many hyperparameters in the BP neural network model, such as learning rate, number of neurons, activation function, etc. These parameters constitute an infinite number of hyperparameter combinations, so it is impossible to exhaust all possibilities. Then it is necessary to find an effective optimization algorithm to optimize the parameters.

[0073] Due to its own characteristics, the genetic algorithm can effectively perform global optimization of parameters and can be easily combined with various algorithms. Therefore, the embodiment of the present invention combines the genetic algorithm model with the BP neural network model to improve the prediction effect of the BP neural network model. The improved BP neural network model can effectively converge to the global optimum. The key steps of using the genetic algorithm to improve the BP neural network model are as follows: the initial weights and threshold parameters of the BP neural network model are encoded and the population is initialized. Each individual in the population is a feasible solution for the weights and threshold parameters of the BP neural network model. Please refer to Table 1, which shows the relevant parameters determined by the BP neural network model based on the genetic algorithm model.

[0074] Table 1:

[0075]

[0076] Based on the above method, the first parameter set of the BP neural network model can be obtained; similarly, the hyperparameters of the GRU neural network model can be optimized based on the genetic algorithm model to obtain the second parameter set of the GRU neural network model.

[0077] In the second step, the BP neural network model and the GRU neural network model are configured according to the first parameter set and the second parameter set. The first parameter set represents the characteristics of the remaining life prediction based on the fuel cell stack, and the parameters that need to be configured for the BP neural network model; the second parameter set represents the parameters that need to be configured for the GRU neural network model. After completing the parameter configuration of the BP neural network model and the GRU neural network model based on the first parameter set and the second parameter set, proceed to the next step.

[0078] The third step is to train the BP neural network model and GRU neural network model with completed parameter configuration according to the training set. During the training process of each model, the fitness is calculated according to the training error fitness function, and it is judged whether the fitness meets the requirements. If it meets the requirements, it is decoded to obtain the optimal BP neural network weight threshold. Otherwise, it continues to select, cross, and mutate, then update the population and repeat the iteration until the final fitness meets the specified requirements or the specified number of iterations is reached.

[0079] Substitute the optimal weights and thresholds obtained by decoding into the BP neural network model, and perform model training until the training error reaches the preset target value, or the training of the BP neural network model ends when the specified number of training rounds is reached, and finally obtain the trained BP neural network model. Although the BP neural network model has many advantages, it is often difficult to obtain the optimal results when applied to time series data due to its lack of temporal sequence. Therefore, it is considered to combine the GRU neural network model to implement the remaining life prediction of the fuel cell stack. The GRU neural network model is a variant of RNN (Recurrent Neural Network) used to process data with a time series structure. The GRU neural network model solves the gradient vanishing and gradient exploding problems of traditional RNN when processing long-term dependencies by introducing a gating mechanism. However, GRU also has the problem of lack of physical meaning, so the fusion of the BP neural network model and the GRU neural network model can obtain better results.

[0080] The fourth step is to test the trained BP neural network model and GRU neural network model according to the test set to obtain the first prediction error set of the trained BP neural network model and the second prediction error set of the trained GRU neural network model. The BP neural network model and the GRU neural network model can be tested by the test set to obtain the predicted voltage of the fuel cell stack, and the prediction error of each time is obtained based on the difference between the predicted voltage and the actual output voltage of the fuel cell stack, and the set constructed by all the prediction errors of the BP neural network model is determined as the first prediction error set, and the set constructed by all the prediction errors of the GRU neural network model is determined as the second prediction error set.

[0081] The fifth step is to determine the first mean square error of the first prediction error set as the first test result of the trained BP neural network model. The prediction accuracy of the evaluation model can be characterized by the mean absolute error MAE, mean square error MSE and mean absolute percentage error MAPE.

[0082] The average of the absolute values ​​of the difference between the predicted voltage and the actual output voltage of the fuel cell stack is the mean absolute error MAE, which is calculated as follows:

[0083]

[0084] The average of the square of the difference between the predicted voltage and the actual output voltage of the fuel cell stack is the mean square error MSE, which is calculated as follows:

[0085]

[0086] The average of the absolute value of the difference between the predicted voltage and the actual output voltage of the fuel cell stack divided by the output voltage is the mean absolute percentage error MAPE, which is calculated as follows:

[0087]

[0088] In the above formula, f(xi) is the predicted voltage, i is a natural number greater than 1, and yi is the actual output voltage of the fuel cell stack. The smaller the above three errors are, to a certain extent, the better the performance of the model is. Therefore, looking for a better model means looking for a model with smaller errors, but at the same time, we must also pay attention to avoiding overfitting problems. Through the above formula, it can be concluded that the mean square error MSE has higher accuracy after square processing. Therefore, the first mean square error of the first prediction error set is determined as the first test result of the BP neural network model that has completed training.

[0089] In the sixth step, similarly, the second mean square error of the second prediction error set is determined as the second test result of the GRU neural network model that has completed training.

[0090] See also Figure 3 , Figure 3 The technical roadmap of the prediction method. The training process of the initial prediction model composed of the BP neural network model and the GRU neural network model is as follows: first, build a data set and predictive modeling; then use the genetic algorithm model to optimize the parameters of the BP neural network model and the GRU neural network model respectively; finally, determine the test results through the mean square error MSE of each model. Still taking the prediction of the BP neural network model as an example, please refer to Figure 4 For the prediction of the remaining life of the fuel cell stack, the test time and test current can be used to predict the corresponding predicted voltage. Based on the difference between the predicted voltage and the actual output voltage, the mean square error (MSE) of each model is calculated.

[0091] S12-3, determine whether each test result meets the preset target condition of the corresponding prediction sub-model. The preset target condition can be set based on actual needs, and is not specifically limited here. For example, for the BP neural network model, the corresponding preset target condition can be set to a mean square error less than or equal to 0.01.

[0092] S12-4. Each test result represents the prediction accuracy of the corresponding prediction sub-model. When the test result does not meet the preset target conditions of the corresponding prediction sub-model, it means that the prediction sub-model still needs to be trained. Then, the prediction sub-model that does not meet the preset target conditions will continue to be trained and tested until the preset target conditions are met.

[0093] S12-5. When the test results meet the preset target conditions of the corresponding prediction sub-model, it means that the prediction sub-model is able to implement accurate data prediction. Then, the prediction error corresponding to each prediction sub-model is determined based on the voltage deviation between the predicted voltage of each prediction sub-model and the output voltage of the fuel cell stack.

[0094] The following embodiment of the present invention will take the BP neural network model as an example to specifically explain its training process. Figure 5 , Figure 5 This is the training flow chart of the BP neural network model. Specifically includes:

[0095] S501. Design a BP neural network model structure.

[0096] S502: Obtain initial weights and thresholds of the BP neural network model.

[0097] S503: Encode the initial weights and thresholds of the BP neural network model.

[0098] S504: Initialize the population according to the encoding result of step S503.

[0099] S505: Obtain a fitness value according to the training error of the BP neural network model.

[0100] S506, implementing selection and inheritance of corresponding parameters of the BP neural network model according to selection, crossover and mutation.

[0101] S507. Update the population according to the selection and genetic results of step S506.

[0102] S508: Determine whether the updated population meets the preset conditions.

[0103] S509: When the preset conditions are met, decode the updated population.

[0104] S510. Obtain the optimal weights and thresholds of the BP neural network model according to the decoding result of step S509.

[0105] S511, forward propagation of information, and calculation of the prediction error after BP neural network model training.

[0106] S512: Determine whether the prediction error meets the preset target condition.

[0107] S513: When the preset target condition is not met, the error is back-propagated and the weight and threshold are adjusted.

[0108] S514: Determine whether the training times of the BP neural network model reaches a times threshold, and stop when the times threshold is reached.

[0109] Similarly, the GRU neural network model can be trained and tested using the parameters described above. Specifically:

[0110] The first step is data collection and preparation. The data set is constructed to separate the polarization curve test results from the endurance test data of the fuel cell stack. The endurance test tests the polarization curve every 100 hours, and the variables are: time, current, and voltage. After that, the data set is divided into a training set and a test set in a ratio of 9:1.

[0111] The second step is to build a GRU neural network model. Use a deep learning framework (such as TensorFlow, Keras, or PyTorch) to build a GRU neural network model. The GRU neural network model consists of one or more GRU layers and can contain other common deep learning layers, such as fully connected layers and dropout layers.

[0112] The third step is model training. Use the training set to train the GRU neural network model. During the training process, the model parameters are optimized by minimizing the loss function. You can use the corresponding optimization algorithm, such as stochastic gradient descent (SGD) or Adam.

[0113] The fourth step is model evaluation and tuning. Use the test set to evaluate the prediction accuracy of the trained GRU neural network model. Evaluation indicators can include root mean square error RMSE, mean absolute error MAE, etc. If the model performance is not ideal, you can try to adjust the model architecture, hyperparameters, or add more training data.

[0114] Step 5: Model application and prediction: Apply the trained GRU neural network model to the test set to predict the remaining life of the fuel cell stack. The GRU neural network model also has the problem of difficulty in finding the optimal parameters. Therefore, the genetic algorithm model is combined with the GRU neural network model to find the optimal parameters. After the optimization is completed, the prediction is carried out based on the time and current data to obtain the corresponding prediction error.

[0115] At this point, each prediction sub-model has completed training, and the prediction error of each prediction sub-model has been obtained.

[0116] S13. According to the prediction error of each prediction sub-model, the prediction weight of the corresponding prediction sub-model in the initial prediction model is configured to obtain the target prediction model.

[0117] Specifically, the prediction weight represents the importance of the corresponding prediction sub-model in implementing the prediction of the remaining life of the fuel cell stack. The greater the prediction weight, the greater the percentage of importance, and vice versa. The prediction weight can be configured based on different prediction errors. The larger the prediction error, the smaller the prediction weight configured for the corresponding prediction sub-model; the smaller the prediction error, the larger the prediction weight configured for the corresponding prediction sub-model. The target prediction model is obtained based on all prediction sub-models that have completed the prediction weight.

[0118] In practical applications, since the predicted voltage is closely related to the input time data and current data, if the data collection is wrong, the prediction accuracy will be insufficient. Based on this, in a specific implementation, step S13 includes sub-steps S13-1 to S13-3, specifically:

[0119] S13-1. Smoothing the current prediction error according to the historical prediction error of each prediction sub-model to obtain the target prediction error of each prediction sub-model; wherein the current prediction error is the prediction error obtained by the prediction sub-model based on the target data of the same current data collection period. The historical prediction error can be the prediction error of the previous period of the current prediction error, or the prediction error of the previous n periods of the current prediction error. The prediction error of each period can be configured with a corresponding weight, and the target prediction error of each prediction sub-model is obtained by the cumulative sum of the product of the prediction error and the corresponding weight.

[0120] For example, the formula Get the target prediction error ε of each prediction sub-model, where x i is the prediction error, ωi is the error weight corresponding to the prediction error, and n is a natural number greater than 1. Taking the historical prediction error as an example, the prediction error of the previous period only includes the current prediction error, the above summation formula can be represented as ε=x1×ω1+x2×ω2, x1 is the prediction error of the previous period, x2 is the current prediction error, and ω1+ω2=1.

[0121] S13-2, convert the target prediction error of each prediction sub-model to obtain the target prediction weight corresponding to each prediction sub-model. Still taking the prediction sub-models including the BP neural network model and the GRU neural network model as an example, the target prediction weights of the two are calculated by the following formula:

[0122]

[0123] Among them, W 1t is the target prediction weight of the BP neural network model, ε1 is the target prediction error of the BP neural network model, W 2t is the target prediction weight of the GRU neural network model, and ε2 is the target prediction error of the GRU neural network model.

[0124] S13-3, configure each target prediction weight to the corresponding prediction sub-model to obtain the target prediction model. After completing the configuration of each target prediction weight, the following prediction formula exists:

[0125] yt=W 1t ×f(x 1t )+W 2t ×f(x 2t )

[0126] Among them, f(x 1t ) is the predicted voltage of the BP neural network model at time t, f(x 2t ) is the predicted voltage of the GRU neural network model at time t, and yt is the predicted voltage of the target prediction model.

[0127] At this point, the prediction weight configuration of each prediction sub-model has been completed, and the target prediction model has been obtained.

[0128] S14. Predicting the remaining life of the fuel cell stack according to the target prediction model.

[0129] Specifically, since the target prediction model can accurately predict the voltage data of the fuel cell stack, the remaining life of the fuel cell stack can be obtained based on the voltage change of the fuel cell stack as the usage time increases.

[0130] Exemplarily, step S14 includes sub-steps S14-1 to S14-3, specifically:

[0131] S14-1. Obtain the test time and test current of the polarization test of the fuel cell stack whose remaining life is to be predicted. The test time and test current can be set based on the polarization test requirements of the fuel cell stack, and can fully characterize the life change of the fuel cell stack through voltage data.

[0132] S14-2, input the test time and test current into the target prediction model to obtain the output voltage of the fuel cell stack whose remaining life is to be predicted. The target prediction model has been trained and tested, and the corresponding output voltage can be predicted by the test time and test current. The following still takes the BP neural network model as an example to specifically explain the voltage prediction process of a single prediction sub-model, please refer to Figure 6 , specifically including:

[0133] S601. Separate polarization curve test results from raw data of durability test of a fuel cell stack.

[0134] S602: Construct a data set including test time, test current and output voltage.

[0135] S603: Data preprocessing, dividing into training set and test set.

[0136] S604. Design hyperparameters and train the BP neural network model.

[0137] S605 . The trained BP neural network model predicts the corresponding output voltage in the above test set.

[0138] S606: Calculate the mean square error (MSE) between the predicted result and the true result.

[0139] S607: Determine whether the mean square error MSE is less than or equal to 0.01.

[0140] S608. When the mean square error (MSE) is less than or equal to 0.01, calculate the output voltage of the fuel cell stack extrapolated for 20,000 hours.

[0141] S14-3. Determine the decay rate of the fuel cell stack whose remaining life is to be predicted based on the output voltage, and characterize the remaining life of the fuel cell stack whose remaining life is to be predicted based on the decay rate. The decay rate can measure the decay change of the output voltage of the fuel cell stack over time after use. The decay rate is based on the formula:

[0142] Where η is the decay rate, V0 is the initial output voltage of the fuel cell stack, V t is the output voltage predicted by the target prediction model at time t.

[0143] It should be noted that the method for predicting the remaining life of a fuel cell stack according to an embodiment of the present invention may be implemented for the remaining life prediction of the entire fuel cell stack or for a single fuel cell, and no specific limitation is made herein.

[0144] Based on the same technical concept as the prediction method, the embodiment of the present invention also provides a prediction device for the remaining life of a fuel cell stack, see Figure 7 , Figure 7 The schematic diagram of the structure of the prediction device is as follows:

[0145] An acquisition module 701 is used to acquire target data of a fuel cell stack, wherein the target data is data associated with the service life of the fuel cell stack during its operation;

[0146] A first obtaining module 702 is used to train and test a preset initial prediction model according to target data to obtain a prediction error of each prediction sub-model in the initial prediction model, wherein the initial prediction model is a model that integrates at least two prediction sub-models and is used for predicting the remaining life of a fuel cell stack;

[0147] The second obtaining module 703 is used to configure the prediction weight of the corresponding prediction sub-model in the initial prediction model according to the prediction error of each prediction sub-model to obtain the target prediction model;

[0148] The prediction module 704 is used to predict the remaining life of the fuel cell stack according to the target prediction model.

[0149] In an optional embodiment, the acquisition module includes:

[0150] The first acquisition submodule is used to acquire durability test data collected in real time during the durability test of the fuel cell stack;

[0151] An extraction submodule, used for extracting polarization test data from the durability test data according to a preset interval period;

[0152] The first determination submodule is used to determine the test time, test current and output voltage represented by the polarization test data as target data of the fuel cell stack.

[0153] In an optional embodiment, the first obtaining module includes:

[0154] A partitioning submodule is used to divide the target data into a training set and a test set for the initial prediction model;

[0155] The first acquisition submodule is used to train and test each prediction submodel in the initial prediction model according to the training set, the test set and the preset genetic algorithm model, so as to obtain the test result of each prediction submodel that has completed the training;

[0156] A judgment submodule is used to judge whether each test result meets the preset target condition of the corresponding prediction submodel;

[0157] The processing submodule is used to continue training and testing the prediction submodel that does not meet the preset target condition when the test result does not meet the preset target condition until the preset target condition is met;

[0158] The second determination submodule is used to determine the prediction error corresponding to each prediction submodel based on the voltage deviation between the predicted voltage of each prediction submodel and the output voltage of the fuel cell stack when the test result meets the preset target condition.

[0159] In an optional embodiment, the initial prediction model is a prediction model that integrates the BP neural network model and the GRU neural network model; the first acquisition submodule includes:

[0160] A processing unit, used to optimize the hyperparameters of the BP neural network model and the GRU neural network model respectively according to the genetic algorithm model to obtain a first parameter set of the BP neural network model and a second parameter set of the GRU neural network model;

[0161] A configuration unit, configured to configure the BP neural network model and the GRU neural network model respectively according to the first parameter set and the second parameter set;

[0162] A training unit, used for training the BP neural network model and the GRU neural network model with completed parameter configuration according to the training set;

[0163] A first obtaining unit is used to test the trained BP neural network model and the GRU neural network model according to the test set to obtain a first prediction error set of the trained BP neural network model and a second prediction error set of the trained GRU neural network model;

[0164] A first determining unit, used for determining a first mean square error of a first prediction error set as a first test result of a trained BP neural network model;

[0165] The second determining unit is used to determine the second mean square error of the second prediction error set as the second test result of the GRU neural network model that has completed training.

[0166] In an optional embodiment, the second obtaining module includes:

[0167] The second acquisition submodule is used to smooth the current prediction error according to the historical prediction error of each prediction submodel to obtain the target prediction error of each prediction submodel; wherein the current prediction error is the prediction error obtained by the prediction submodel based on the target data of the same current data collection period;

[0168] The third acquisition submodule is used to convert the target prediction error of each prediction submodel to obtain the target prediction weight corresponding to each prediction submodel;

[0169] The fourth acquisition submodule is used to configure each target prediction weight to the corresponding prediction submodel to obtain the target prediction model.

[0170] In an optional embodiment, the second obtaining submodule includes:

[0171] The second acquisition unit is used to obtain the Get the target prediction error ε of each prediction sub-model, where x i is the prediction error, ω i is the error weight corresponding to the prediction error, and n is a natural number greater than 1.

[0172] In an optional embodiment, the prediction module includes:

[0173] A second acquisition submodule is used to obtain the test time and test current of the polarization test of the fuel cell stack whose remaining life is to be predicted;

[0174] A fifth obtaining submodule is used to input the test time and the test current into the target prediction model to obtain the output voltage of the fuel cell stack whose remaining life is to be predicted;

[0175] The third determination submodule is used to determine the decay rate of the fuel cell stack whose remaining life is to be predicted according to the output voltage, and characterize the remaining life of the fuel cell stack whose remaining life is to be predicted based on the decay rate.

[0176] Based on the same technical concept as the prediction method, an embodiment of the present invention also provides an electronic device, including a processor and a memory, wherein the memory is coupled to the processor and stores instructions, and when the instructions are executed by the processor, the electronic device executes the steps of any one of the prediction methods.

[0177] Based on the same technical concept as the prediction method, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of any one of the prediction methods are implemented.

[0178] The technical solution provided in the embodiments of the present invention has at least the following technical effects or advantages:

[0179] By acquiring the target data of the fuel cell stack, since the target data is the data related to the service life of the fuel cell stack during its operation; the preset initial prediction model is trained and tested through the target data, since the initial prediction model is a model that integrates at least two prediction sub-models and is used to predict the remaining life of the fuel cell stack, after training and testing the initial prediction model, the prediction error of each prediction sub-model in the initial prediction model can be obtained; in order to make each prediction sub-model accurately applied, the prediction weight of the corresponding prediction sub-model in the initial prediction model is configured according to the prediction error of each prediction sub-model to obtain the target prediction model; the remaining life of the fuel cell stack is predicted according to the target prediction model. This scheme combines multiple prediction sub-models to implement the service life prediction of the fuel cell stack, and fully utilizes the data processing characteristics of each prediction sub-model through weight allocation, balances the application advantages of different prediction sub-models, and thus improves the accuracy of the remaining life prediction of the fuel cell stack.

[0180] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0181] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (modules, systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0182] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0183] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0184] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0185] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for predicting the remaining life of a fuel cell stack, characterized in that: The method comprises: Acquiring target data of a fuel cell stack, wherein the target data is data associated with the service life of the fuel cell stack during operation; Training and testing a preset initial prediction model according to the target data to obtain a prediction error of each prediction sub-model in the initial prediction model, wherein the initial prediction model is a model that integrates at least two prediction sub-models and is used for predicting the remaining life of a fuel cell stack; According to the prediction error of each prediction sub-model, the prediction weight of the corresponding prediction sub-model in the initial prediction model is configured to obtain the target prediction model; The remaining life of the fuel cell stack is predicted according to the target prediction model.

2. The method for predicting the remaining life of a fuel cell stack according to claim 1, characterized in that: The obtaining of target data of the fuel cell stack includes: Acquiring durability test data collected in real time during the durability test of the fuel cell stack; Extracting polarization test data from the durability test data according to a preset interval period; The test time, test current and output voltage represented by the polarization test data are determined as target data of the fuel cell stack.

3. The method for predicting the remaining life of a fuel cell stack according to claim 1, characterized in that: The step of training and testing a preset initial prediction model according to the target data to obtain a prediction error of each prediction sub-model in the initial prediction model includes: Dividing the target data into a training set and a test set of the initial prediction model; According to the training set, the test set and the preset genetic algorithm model, each prediction sub-model in the initial prediction model is trained and tested respectively to obtain a test result of each prediction sub-model that has completed training; Determine whether each test result meets the preset target condition of the corresponding prediction sub-model; If not, continue to train and test the prediction sub-models that do not meet the preset target conditions until the preset target conditions are met; If so, the prediction error corresponding to each prediction sub-model is determined according to the voltage deviation between the predicted voltage of each prediction sub-model and the output voltage of the fuel cell stack.

4. The method for predicting the remaining life of a fuel cell stack according to claim 3, characterized in that: The initial prediction model is a prediction model integrating a BP neural network model and a GRU neural network model; the training and testing of each prediction sub-model in the initial prediction model are performed according to the training set, the test set and the preset genetic algorithm model to obtain the test results of each prediction sub-model that has completed the training, including: According to the genetic algorithm model, the hyperparameters of the BP neural network model and the GRU neural network model are optimized respectively to obtain a first parameter set of the BP neural network model and a second parameter set of the GRU neural network model; According to the first parameter set and the second parameter set, respectively configure the BP neural network model and the GRU neural network model; Training the BP neural network model and the GRU neural network model with completed parameter configuration according to the training set; The trained BP neural network model and the GRU neural network model are tested according to the test set to obtain a first prediction error set of the trained BP neural network model and a second prediction error set of the trained GRU neural network model; Determine the first mean square error of the first prediction error set as the first test result of the trained BP neural network model; The second mean square error of the second prediction error set is determined as the second test result of the GRU neural network model that has completed training.

5. The method for predicting the remaining life of a fuel cell stack according to claim 1, characterized in that: The configuring the prediction weight of the corresponding prediction sub-model in the initial prediction model according to the prediction error of each prediction sub-model to obtain the target prediction model includes: Smoothing the current prediction error according to the historical prediction error of each prediction sub-model to obtain the target prediction error of each prediction sub-model; wherein the current prediction error is the prediction error obtained by the prediction sub-model based on the target data of the same current data collection period; The target prediction error of each prediction sub-model is converted to obtain the target prediction weight corresponding to each prediction sub-model; Each target prediction weight is configured to the corresponding prediction sub-model to obtain the target prediction model.

6. The method for predicting the remaining life of a fuel cell stack according to claim 5, characterized in that: The current prediction error is smoothed according to the historical prediction error of each prediction sub-model to obtain the target prediction error of each prediction sub-model, including: According to the formula The target prediction error ε of each prediction sub-model is obtained, where xi is the prediction error, ωi is the error weight corresponding to the prediction error, and n is a natural number greater than 1.

7. The method for predicting the remaining life of a fuel cell stack according to claim 1, characterized in that: The predicting the remaining life of the fuel cell stack according to the target prediction model includes: Obtaining the test time and test current of the polarization test for the fuel cell stack whose remaining life is to be predicted; Inputting the test time and the test current into the target prediction model to obtain the output voltage of the fuel cell stack whose remaining life is to be predicted; The degradation rate of the fuel cell stack whose remaining life is to be predicted is determined according to the output voltage, and the remaining life of the fuel cell stack whose remaining life is to be predicted is characterized based on the degradation rate.

8. A device for predicting the remaining life of a fuel cell stack, characterized in that: The device comprises: An acquisition module, used for acquiring target data of a fuel cell stack, wherein the target data is data associated with the service life of the fuel cell stack during its operation; A first acquisition module is used to train and test a preset initial prediction model according to the target data to obtain a prediction error of each prediction sub-model in the initial prediction model, wherein the initial prediction model is a model that integrates at least two prediction sub-models and is used for predicting the remaining life of a fuel cell stack; A second acquisition module is used to configure the prediction weight of the corresponding prediction sub-model in the initial prediction model according to the prediction error of each prediction sub-model to obtain a target prediction model; A prediction module is used to predict the remaining life of the fuel cell stack according to the target prediction model.

9. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory is coupled to the processor and stores instructions, and when the instructions are executed by the processor, the electronic device executes the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Threshold setting method for parameter identification of power simulation model

    CN112436527A

  • Lithium ion battery residual life integrated prediction method considering uncertainty

    CN113504483A

  • Fuel cell life prediction method and system

    CN113589175A

  • Contactor residual life prediction method based on performance degradation analysis and deep learning

    CN114529079A

  • Prediction control weight factor dynamic optimization method based on deep residual network

    CN116954072A