Fuel cell residual life prediction method and device based on hybrid model, equipment and storage medium
By constructing a hybrid model of data-driven prediction model and semi-mechanical prediction model based on Transformer algorithm, the problems of complex model and data dependence in fuel cell residual life prediction are solved, and efficient and accurate life prediction is achieved.
Patent Information
- Application Number
- CN202510140145.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2025-06-10
AI Technical Summary
The prior art has problems in the prediction of fuel cell residual lifespans, with complex models, large amounts of calculations and dependence on a large number of experimental data, making it difficult to achieve accurate and efficient predictions.
Using a data-driven prediction model based on Transformer algorithm and a semi-mechanical prediction model including decay factor, a hybrid model is constructed, and the mixed model prediction voltage is calculated by dynamic allocation of weights, and the difference between the cutoff voltage is judged to determine the remaining life of the fuel cell.
The accurate prediction of the remaining service life of the fuel cell is achieved, the error superposition phenomenon of data-driven model is avoided, the prediction accuracy is improved, and the decline trend of fuel cell performance is accurately reflected.
Smart Images

Figure CN120121983A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fuel cells, and particularly relates to a method, device, equipment and storage medium for predicting the remaining life of a fuel cell based on a hybrid model. Background Art
[0002] The durability problem of fuel cells is the main factor restricting their large-scale commercialization. Therefore, the correct assessment of the operating state and remaining service life of fuel cells is crucial for extending the life of fuel cells, enhancing the durability and reliability of fuel cells.
[0003] The prediction of the remaining service life of fuel cells mainly includes three methods: mechanism model-based method, data-driven method, and hybrid prediction method. The mechanism model-based life prediction method realizes prediction by analyzing the degradation mechanism of each component inside the fuel cell and constructing a physical model of fuel cell degradation. This method does not require a large amount of experimental data. However, the internal process of fuel cells involves complex multi-scale and multi-physical field couplings, and it is difficult to construct a complete mechanism model. The data-driven method realizes the prediction process by inputting a large amount of experimental data and combining machine learning methods to find the non-linear mapping relationship between input and output variables. The data-driven method does not need to understand the complex degradation mechanism inside the fuel cell, but requires a large amount of experimental data of historical operation. The hybrid prediction method combines the advantages of the mechanism model method and the data-driven method, but still has problems such as complex models, large computational amounts, and the requirement for a large amount of experimental data. Therefore, there is an urgent need for an accurate and efficient method for predicting the remaining life of fuel cells.
[0004] The information disclosed in this background art section is only intended to enhance the overall understanding of the present invention and should not be regarded as an admission or any form of suggestion that this information constitutes prior art already known to those of ordinary skill in the art. Summary of the Invention
[0005] The purpose of the present invention is to accurately predict the operating state and remaining service life of fuel cells, improve the durability and reliability of fuel cells, and reduce their maintenance and use costs.
[0006] The present invention provides a method for predicting the remaining life of a fuel cell based on a hybrid model, including the steps of:
[0007] S11. Obtain the experimental data of the fuel cell, define the cut-off voltage of the fuel cell as the failure threshold point; and preprocess the experimental data to obtain a fuel cell experimental data set;
[0008] S12. Respectively construct a data-driven prediction model based on the Transformer algorithm and a semi-mechanism prediction model including a degradation factor according to the experimental data set;
[0009] S13. Obtain the first predicted voltage of the fuel cell according to the data-driven prediction model; obtain the second predicted voltage of the fuel cell according to the semi-mechanistic prediction model;
[0010] S14. Dynamically allocate weights to the first predicted voltage and the second predicted voltage according to the prediction accuracy; and calculate the hybrid model predicted voltage according to the weighted first predicted voltage and the weighted second predicted voltage;
[0011] S15. Judge the hybrid model predicted voltage and the cut-off voltage to obtain the remaining life of the fuel cell;
[0012] When the hybrid model predicted voltage is less than or equal to the cut-off voltage, take the difference between the current time step and the prediction start time as the remaining life of the fuel cell;
[0013] When the hybrid model predicted voltage is greater than the cut-off voltage, take the hybrid model predicted voltage as the input data for the next time step prediction of the data-driven prediction model and the semi-mechanistic prediction model respectively, and execute steps S12 to S14.
[0014] Preferably, in the embodiment of the present invention, constructing the data-driven prediction model includes the steps of:
[0015] S211. Divide the experimental data set into a training set and a validation set;
[0016] S212. Construct a data-driven initial model; including: setting the number of encoder layers, decoder layers, number of attention heads and hidden layer dimension parameters of the data-driven initial model;
[0017] S213. Input the training set experimental data into the data-driven initial model, construct the non-linear mapping relationship between the training set experimental data and the first predicted voltage, and obtain the trained data-driven initial model;
[0018] S214. Verify the trained data-driven initial model according to the validation set experimental data to obtain the data-driven prediction model.
[0019] Preferably, in the embodiment of the present invention, constructing the semi-mechanistic prediction model includes the steps of:
[0020] S221. Based on the electrochemical model of the fuel cell, utilize the relationship between the output voltage and the Nernst voltage, ohmic loss, activation loss and concentration loss, and construct the semi-mechanistic degradation model of the fuel cell through the following formula:
[0021]
[0022] In the formula, Vcell is the output voltage of the fuel cell; V nernst is the Nernst voltage; R is the ideal gas constant; T is the cell temperature; F is the Faraday constant; α c is the cathode exchange coefficient; i is the current density; i leak is the leakage current density; i c is the cathode exchange current density; R ele is the electronic resistance; R ion is the ionic resistance; i lim is the limiting current density; K c is the concentration loss coefficient;
[0023] S222. According to the degradation mechanisms of the components of the fuel cell, degradation factors are added to characterize the fuel cell, and the law of the output voltage degradation over time is calculated by the following formula;
[0024]
[0025] In the formula, V cell (i, t) is the fuel cell voltage at the current time step; b ECSA is the effective reaction area degradation factor; b leak is the leakage current density degradation factor; b ion is the ionic impedance degradation factor; b ele is the electronic impedance degradation factor; b B is the concentration loss coefficient degradation factor; b D is the oxygen diffusivity degradation factor;
[0026] S223. Combining the initial polarization curve experimental data of the fuel cell, the cathode exchange coefficient α c , the cathode exchange current density i c , the initial leakage current density i leak,0 , the initial ionic resistance R ion,0 , the initial electronic resistance R ele,0 , the initial concentration loss coefficient K c,0 are identified through the first fitness function of the genetic algorithm; the first fitness function is calculated by the following formula:
[0027]
[0028] In the formula, n is the number of experimental data points of the polarization curve at the initial moment; V c,n is the experimental value corresponding to the experimental data point of the polarization curve at the initial moment; is the simulation result of the experimental data point of the polarization curve at the initial moment;
[0029] S224. Combine the experimental data of the fuel cell degradation process, and identify the effective reaction area degradation factor b ECSA , the leakage current density degradation factor b leak , the ionic impedance degradation factor b ion , the electronic impedance degradation factor b ele , the concentration loss coefficient degradation factor b B and the oxygen diffusion rate degradation factor b D based on the second fitness function of the genetic algorithm; the first fitness function is calculated by the following formula:
[0030]
[0031] In the formula, m is the experimental data point of the fuel cell degradation process; V x,n is the experimental value corresponding to the experimental data point of the fuel cell degradation process; is the simulation result of the experimental data point of the fuel cell degradation process.
[0032] Preferably, in the embodiment of the present invention, calculating the hybrid model prediction voltage according to the weighted first prediction voltage and the weighted second prediction voltage includes the following formula:
[0033]
[0034] In the formula, V HM is the hybrid model prediction voltage; V DDM is the first prediction voltage; V SEM is the second prediction voltage; r 1 is the prediction deviation of the data-driven prediction model; r 2 is the prediction deviation of the semi-mechanistic prediction model.
[0035] Preferably, in the embodiment of the present invention, the prediction deviation of the data-driven prediction model and the prediction deviation of the semi-mechanistic prediction model include:
[0036] The prediction deviation of the data-driven prediction model and the prediction deviation of the semi-mechanistic prediction model are respectively calculated by the following formula:
[0037] r 1 = |V sim - V DDM |
[0038] r 2 = |V sim - V SEM |
[0039] In the formula, V sim is the hybrid model prediction voltage at the previous time step.
[0040] Preferably, in the embodiments of the present invention, the preprocessing of the experimental data includes:
[0041] Performing filtering processing on the experimental data and removing interference signals in the experimental data.
[0042] On the other hand of the present invention, there is also provided a fuel cell remaining life prediction device based on a hybrid model, including:
[0043] An experimental data set construction unit, configured to obtain experimental data of a fuel cell, define the failure threshold point of the fuel cell as the cut-off voltage; and preprocess the experimental data to obtain a fuel cell experimental data set;
[0044] A data-driven prediction model and a semi-mechanistic prediction model construction unit, configured to respectively construct a data-driven prediction model based on the Transformer algorithm and a semi-mechanistic prediction model including a degradation factor according to the experimental data set;
[0045] A first predicted voltage and a second predicted voltage output unit, configured to obtain a first predicted voltage of the fuel cell according to the data-driven prediction model; and obtain a second predicted voltage of the fuel cell according to the semi-mechanistic prediction model;
[0046] A hybrid model predicted voltage calculation unit, configured to dynamically allocate weights to the first predicted voltage and the second predicted voltage according to the prediction accuracy; and calculate a hybrid model predicted voltage according to the weighted first predicted voltage and the weighted second predicted voltage;
[0047] A remaining life calculation unit of the fuel cell, configured to judge the hybrid model predicted voltage and the cut-off voltage to obtain the remaining life of the fuel cell;
[0048] When the hybrid model predicted voltage is less than or equal to the cut-off voltage, the difference between the current time step and the prediction start time is used as the remaining life of the fuel cell;
[0049] When the hybrid model predicted voltage is greater than the cut-off voltage, the hybrid model predicted voltage is respectively used as the input data for the next time step prediction of the data-driven prediction model and the semi-mechanistic prediction model, and steps S12 to S14 are executed.
[0050] Preferably, in the embodiments of the present invention, the calculation of the hybrid model predicted voltage according to the weighted first predicted voltage and the weighted second predicted voltage includes the following formula:
[0051]
[0052] In the formula, V HM is the hybrid model predicted voltage; VDDM is the first predicted voltage; V SEM is the second predicted voltage; r 1 is the prediction deviation of the data-driven prediction model; r 2 is the prediction deviation of the semi-mechanistic prediction model.
[0053] On the other hand of the embodiments of the present invention, there is also provided a fuel cell remaining life prediction device based on a hybrid model; the fuel cell remaining life prediction device based on the hybrid model includes a computer program stored on a medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer is made to execute the methods described in the above aspects and achieve the same technical effects.
[0054] On the other hand of the embodiments of the present invention, there is also provided a storage medium, on which a computer program is stored. When the computer program is executed by a processor, each step of the fuel cell remaining life prediction method based on the hybrid model described in any one of the above is implemented.
[0055] Compared with the prior art, the present invention has the following beneficial effects:
[0056] In the present invention, a hybrid model is constructed by combining a data-driven prediction model based on the Transformer algorithm and a semi-mechanistic prediction model including a degradation factor to achieve accurate prediction of the remaining service life of the fuel cell; by judging the difference between the predicted voltage of the hybrid model and the cut-off voltage for cyclic iteration, and using the output result of the hybrid model as the input of the data-driven prediction model in the next iteration, a multi-step prediction process is realized, thereby avoiding the error superposition phenomenon of the data-driven model, and further avoiding the divergence problem, and further improving the prediction accuracy.
[0057] In addition, based on the degradation mechanism of the internal components of the fuel cell, the present invention introduces degradation factors such as the effective reaction area and the limiting current density to characterize the degradation process of the fuel cell, and constructs a semi-mechanistic degradation model of the fuel cell, which can accurately reflect the degradation trend of the fuel cell performance.
[0058] The above description is only an overview of the technical solution of the present invention. In order to be able to more clearly understand the technical means of the present invention and implement it according to the content of the specification, and in order to make the above and other purposes, technical features and advantages of the present invention more understandable, one or more preferred embodiments are listed below and described in detail in conjunction with the drawings as follows. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] To more clearly illustrate the technical solutions of the present invention, the accompanying drawings required for the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0060] Figure 1 It is a step diagram of the fuel cell remaining life prediction method based on the hybrid model described in the present invention;
[0061] Figure 2 It is a flowchart of the fuel cell remaining life prediction method based on the hybrid model described in the present invention;
[0062] Figure 3 It is the voltage change data of the fuel cell over time during the degradation process and the experimental data after filtering processing described in the present invention;
[0063] Figure 4 It is a schematic diagram of the structure of the Transformer algorithm model described in the present invention;
[0064] Figure 5 It is a schematic diagram of the fuel cell degradation mechanism analysis described in the present invention;
[0065] Figure 6 It is a schematic diagram of the structure of the fitting result of the fuel cell initial polarization curve described in the present invention;
[0066] Figure 7 It is a schematic diagram of the prediction result structure of the fuel cell remaining life prediction method based on the hybrid model described in the present invention;
[0067] Figure 8 It is a schematic diagram of the structure of the fuel cell remaining life prediction device based on the hybrid model described in the present invention;
[0068] Figure 9 It is a schematic diagram of the structure of the fuel cell remaining life prediction device based on the hybrid model described in the present invention. Specific Embodiments
[0069] The following will describe the specific embodiments of the present invention in detail with reference to the accompanying drawings. However, it should be understood that the protection scope of the present invention is not limited by the specific embodiments.
[0070] Unless otherwise clearly stated, in the entire specification and claims, the term "comprising"
[0071] or its variants such as "including" or "comprising" etc. will be understood to include the stated elements or components, without excluding other elements or other components.
[0072] In this text, the terms "first", "second", etc. are used to distinguish two different components or parts, rather than to limit a specific position or relative relationship. In other words, in some embodiments, the terms "first", "second", etc. can also be interchanged with each other.
[0073] Embodiment 1
[0074] In order to achieve accurate prediction of the operating state and remaining service life of a fuel cell and improve the durability and reliability of the fuel cell, as Figure 1 and Figure 2 shown, in an embodiment of the present invention, a method for predicting the remaining life of a fuel cell based on a hybrid model is provided, including the steps of:
[0075] S11. Obtain the experimental data of the fuel cell, define the failure threshold point of the fuel cell as the cut-off voltage; and preprocess the experimental data to obtain a fuel cell experimental data set;
[0076] In an embodiment of the present invention, the experimental data can be obtained according to the open-source fuel cell monitoring operation data of the French Fuel Cell Laboratory (FCLAB). The obtained experimental data is filtered by a Savizky-Golay filter to remove interference signals such as spikes and noise in the original experimental data; in a specific application, the width of the moving window can be determined to be 20, and the data of the voltage change with time during the degradation process of the fuel cell and the filtered experimental data are obtained, as Figure 3 shown.
[0077] At the same time, determine the failure threshold point of the fuel cell as the cut-off voltage.
[0078] S12. Respectively construct a data-driven prediction model based on the Transformer algorithm and a semi-mechanistic prediction model including a degradation factor according to the experimental data set;
[0079] In an embodiment of the present invention, constructing a data-driven prediction model includes the steps of:
[0080] S211. Divide the experimental data set into a training set and a validation set;
[0081] S212. Construct a data-driven initial model; including: setting the number of encoder layers, the number of decoder layers, the number of attention heads, and the hidden layer dimension parameters of the data-driven initial model;
[0082] S213. Input the training set experimental data into the data-driven initial model, construct a non-linear mapping relationship between the training set experimental data and the first predicted voltage, and obtain the trained data-driven initial model;
[0083] S214. Validate the trained data-driven initial model based on the experimental data of the validation set to obtain a data-driven prediction model.
[0084] In the embodiments of the present invention, the Transformer algorithm model is as Figure 4 shown. In practical applications, 6 layers of encoders and 6 layers of decoders can be set, the number of attention heads is 8, and the hidden layer dimension is 512; use the Transformer model to extract features from the input data and construct a non-linear mapping relationship between the input data and the predicted voltage data; use the experimental data with a running time t < 550h as the training set to train the data-driven initial model and construct a non-linear mapping relationship between the input data and the predicted data; use the experimental data with a running time t > 550h as the validation set to validate the trained data-driven initial model; if the accuracy of the data-driven prediction model is lower than the preset accuracy, adjust the parameters of the Transformer algorithm model and repeat S212 - S214.
[0085] Combined with Figure 5 the fuel cell degradation mechanism analysis shown, construct the semi-mechanistic prediction model, including the steps:
[0086] S221. Based on the electrochemical model of the fuel cell, use the relationship between the output voltage and the Nernst voltage, ohmic loss, activation loss, and concentration loss to construct the semi-mechanistic degradation model of the fuel cell through the following formula:
[0087]
[0088] In the formula, V cell is the output voltage of the fuel cell; V nernst is the Nernst voltage; R is the ideal gas constant; T is the battery temperature; F is the Faraday constant; α c is the cathode exchange coefficient; i is the current density; i leak is the leakage current density; i c is the cathode exchange current density; R ele is the electron resistance; R ion is the ionic resistance; i lim is the limiting current density; K c is the concentration loss coefficient.
[0089] S222. According to the degradation mechanism of each component of the fuel cell, add a degradation factor to characterize the fuel cell, and calculate the law of the output voltage decaying with time through the following formula;
[0090]
[0091] In the formula, V cell(i, t) is the fuel cell voltage at the current time step; b ECSA is the effective reaction area decay factor; b leak is the leakage current density decay factor; b ion is the ionic impedance decay factor; b ele is the electronic impedance decay factor; b B is the concentration loss coefficient decay factor; b D is the oxygen diffusivity decay factor.
[0092] S223. Combine the experimental data of the initial polarization curve of the fuel cell, and identify the cathode exchange coefficient α c , the cathode exchange current density i c , the initial leakage current density i leak,0 , the initial ionic resistance R ion,0 , the initial electronic resistance R ele,0 , the initial concentration loss coefficient K c,0 through the first fitness function of the genetic algorithm; the first fitness function is calculated by the following formula:
[0093]
[0094] In the formula, n is the experimental data points of the polarization curve at the initial moment; V c,n is the experimental value corresponding to the experimental data points of the polarization curve at the initial moment; is the simulation result of the experimental data points of the polarization curve at the initial moment; the fitting result of the initial polarization curve of the fuel cell, as Figure 6 shown, it can be seen from the figure that the output result of the semi-mechanistic prediction model has good consistency with the experimental data.
[0095] S224. Combine the experimental data of the fuel cell degradation process, and identify the effective reaction area decay factor b ECSA , the leakage current density decay factor b leak , the ionic impedance decay factor b ion , the electronic impedance decay factor b ele , the concentration loss coefficient decay factor b B and the oxygen diffusivity decay factor b D through the second fitness function of the genetic algorithm; the first fitness function is calculated by the following formula:
[0096]
[0097] In the formula, m is the experimental data points of the fuel cell degradation process; V x,n is the experimental value corresponding to the experimental data points of the fuel cell degradation process; is the simulation result of the experimental data points of the fuel cell degradation process.
[0098] S13. Obtain the first predicted voltage of the fuel cell according to the data-driven prediction model; obtain the second predicted voltage of the fuel cell according to the semi-mechanistic prediction model;
[0099] In the embodiment of the present invention, the data-driven prediction model and the semi-mechanistic prediction model are respectively used to predict the fuel cell voltage, and the first predicted voltage and the second predicted voltage are obtained; let the obtained first predicted voltage be V DDM ; the second predicted voltage be V SEM .
[0100] S14. Assign weights to the first predicted voltage and the second predicted voltage; and calculate the hybrid model predicted voltage according to the weighted first predicted voltage and the weighted second predicted voltage;
[0101] In the embodiment of the present invention, weights are dynamically assigned to the first predicted voltage and the second predicted voltage, and the hybrid model predicted voltage is calculated according to the weighted first predicted voltage and the weighted second predicted voltage, including the following formula:
[0102]
[0103] In the formula, V HM is the hybrid model predicted voltage; V DDM is the first predicted voltage; V SEM is the second predicted voltage; r 1 is the prediction deviation of the data-driven prediction model; r 2 is the prediction deviation of the semi-mechanistic prediction model. Among them, the model with higher prediction accuracy has a higher weight. The hybrid model predicted voltage dynamically couples the prediction results of the data-driven prediction model and the semi-mechanistic degradation prediction model.
[0104] Among them, the prediction deviation of the data-driven prediction model and the prediction deviation of the semi-mechanistic prediction model are calculated respectively through the following formulas:
[0105] r 1 =|V sim -V DDM |
[0106] r 2 =|V sim -V SEM |
[0107] In the formula, V sim is the hybrid model predicted voltage of the previous time step.
[0108] S15. Judge the hybrid model predicted voltage and the cut-off voltage to obtain the remaining life of the fuel cell;
[0109] When the predicted voltage of the hybrid model is less than or equal to the cut-off voltage, the difference between the current time step and the prediction start time is taken as the remaining life of the fuel cell;
[0110] When the predicted voltage of the hybrid model is greater than the cut-off voltage, the predicted voltage of the hybrid model is used as the input data for the next time step prediction of the data-driven prediction model and the semi-mechanistic prediction model respectively, and steps S12 to S14 are executed.
[0111] In the embodiments of the present invention, the current time step refers to the current time point being evaluated by the hybrid model. In a discrete-time system, time is divided into multiple time steps, and each time step represents a time unit (such as seconds, minutes). The prediction start time refers to the time point when the hybrid model starts to make predictions.
[0112] When the voltage predicted by the hybrid model is less than or equal to the cut-off voltage, it indicates that the fuel cell is about to reach the failure state. At this time, the difference between the current time step and the prediction start time (i.e., the elapsed time) is taken as the remaining life of the fuel cell.
[0113] If a 3.5% initial voltage loss at the same current is defined as the end of life, the cut-off voltage is 96.5% of the initial voltage. When the voltage prediction result V HM is lower than the cut-off voltage, the prediction ends, marking the end point of the fuel cell life.
[0114] The prediction result graph of the fuel cell remaining life prediction method based on the hybrid model is as Figure 7 shown. The predicted voltage can maintain the fuel cell voltage decline trend, and the difference from the actual voltage is small. The predicted mean absolute percentage error is 0.0018V, and the goodness of fit of the two curves in the prediction stage is 0.8057. Taking a 3.5% initial voltage loss at the same current as the life threshold, the prediction error of this method is 17h, and the relative error is 2.15%, verifying the accuracy of the fuel cell remaining life prediction method based on the hybrid model.
[0115] In summary, in the embodiments of the present invention, a hybrid model is constructed by combining a data-driven prediction model based on the Transformer algorithm and a semi-mechanistic prediction model including a decay factor to achieve accurate prediction of the remaining service life of the fuel cell; by judging the difference between the predicted voltage of the hybrid model and the cut-off voltage for cyclic iteration, and using the output result of the hybrid model as the input for the next data-driven prediction model during the iteration process, a multi-step prediction process is realized, thereby avoiding the error superposition phenomenon of the data-driven model and further avoiding the divergence problem, and further improving the prediction accuracy.
[0116] In addition, based on the degradation mechanism of the internal components of the fuel cell, the present invention introduces degradation factors such as effective reaction area and limiting current density to characterize the degradation process of the fuel cell, and constructs a semi-mechanistic degradation model of the fuel cell, which can accurately reflect the degradation trend of the fuel cell performance.
[0117] Embodiment 2
[0118] Corresponding to the method embodiment, on the other hand of the embodiment of the present invention, a fuel cell remaining life prediction device based on a hybrid model is further provided. Figure 8 The structure diagram of the fuel cell remaining life prediction device based on the hybrid model provided by the embodiment of the present invention is shown. The fuel cell remaining life prediction device based on the hybrid model is Figure 1 The device corresponding to the fuel cell remaining life prediction method based on the hybrid model in the corresponding embodiment, that is, it is implemented in the form of a virtual device. Figure 1 The fuel cell remaining life prediction method based on the hybrid model in the corresponding embodiment is implemented. Each virtual module constituting the fuel cell remaining life prediction device based on the hybrid model can be executed by an electronic device, such as a network device, a terminal device or a server. Specifically, the fuel cell remaining life prediction device based on the hybrid model in the embodiment of the present invention includes:
[0119] An experimental data set construction unit 01, configured to obtain experimental data of the fuel cell, define the failure threshold point of the fuel cell as the cut-off voltage; and preprocess the experimental data to obtain a fuel cell experimental data set.
[0120] In the embodiment of the present invention, the experimental data can be obtained according to the open-source fuel cell monitoring operation data of the French Fuel Cell Laboratory (FCLAB). The obtained experimental data is filtered by using a Savizky-Golay filter to remove interference signals such as spikes and noises in the original experimental data; at the same time, the failure threshold point of the fuel cell is determined as the cut-off voltage.
[0121] A data-driven prediction model and semi-mechanistic prediction model construction unit 02, configured to respectively construct a data-driven prediction model based on the Transformer algorithm and a semi-mechanistic prediction model including degradation factors according to the experimental data set.
[0122] In the embodiment of the present invention, constructing the data-driven prediction model includes the steps of:
[0123] S211. Divide the experimental data set into a training set and a validation set;
[0124] S212. Construct a data-driven initial model; including: setting the number of encoder layers, the number of decoder layers, the number of attention heads and the hidden layer dimension parameters of the data-driven initial model.
[0125] S213. Input the experimental data of the training set into the initial data-driven model, construct a non-linear mapping relationship between the experimental data of the training set and the first predicted voltage, and obtain the trained initial data-driven model.
[0126] S214. Verify the trained initial data-driven model according to the experimental data of the validation set to obtain a data-driven prediction model.
[0127] Constructing the semi-mechanistic prediction model includes the steps of:
[0128] S221. Based on the electrochemical model of the fuel cell, utilize the relationship between the output voltage and the Nernst voltage, ohmic loss, activation loss, and concentration loss, and construct the semi-mechanistic degradation model of the fuel cell through the following formula:
[0129]
[0130] In the formula, V cell is the output voltage of the fuel cell; V nernst is the Nernst voltage; R is the ideal gas constant; T is the cell temperature; F is the Faraday constant; α c is the cathode exchange coefficient; i is the current density; i leak is the leakage current density; i c is the cathode exchange current density; R ele is the electronic resistance; R ion is the ionic resistance; i lim is the limiting current density; K c is the concentration loss coefficient;
[0131] S222. According to the degradation mechanism of each component of the fuel cell, add degradation factors to characterize the fuel cell, and calculate the law of the output voltage decaying with time through the following formula;
[0132]
[0133] In the formula, V cell (i, t) is the fuel cell voltage at the current time step; b ECSA is the effective reaction area degradation factor; b leak is the leakage current density degradation factor; b ion is the ionic impedance degradation factor; b ele is the electronic impedance degradation factor; b B is the concentration loss coefficient degradation factor; b D is the oxygen diffusion rate degradation factor;
[0134] S223. Combine the experimental data of the initial polarization curve of the fuel cell, and use the first fitness function of the genetic algorithm for the cathode exchange coefficient αc and the cathode exchange current density i c and the initial leakage current density i leak,0 and the initial ionic resistance R ion,0 and the initial electronic resistance R ele,0 and the initial concentration difference loss coefficient K c,0 are identified; the first fitness function is calculated by the following formula:
[0135]
[0136] In the formula, n is the experimental data points of the polarization curve at the initial moment; V c,n is the experimental value corresponding to the experimental data points of the polarization curve at the initial moment; is the simulation result of the experimental data points of the polarization curve at the initial moment; the fitting result of the initial polarization curve of the fuel cell, as Figure 6 shown, it can be seen from the figure that the output result of the semi-mechanistic prediction model has good consistency with the experimental data.
[0137] S224. Combining the experimental data of the fuel cell degradation process, the second fitness function based on the genetic algorithm is used to identify the effective reaction area degradation factor b ECSA and the leakage current density degradation factor b leak and the ionic impedance degradation factor b ion and the electronic impedance degradation factor b ele and the concentration difference loss coefficient degradation factor b B and the oxygen diffusion rate degradation factor b D are identified; the first fitness function is calculated by the following formula:
[0138]
[0139] In the formula, m is the experimental data points of the fuel cell degradation process; V x,n is the experimental value corresponding to the experimental data points of the fuel cell degradation process; is the simulation result of the experimental data points of the fuel cell degradation process.
[0140] The first prediction voltage and second prediction voltage output unit 03 is used to obtain the first prediction voltage of the fuel cell according to the data-driven prediction model; and obtain the second prediction voltage of the fuel cell according to the semi-mechanistic prediction model;
[0141] The hybrid model prediction voltage calculation unit 04 is used to dynamically allocate weights to the first prediction voltage and the second prediction voltage according to the prediction accuracy; and calculate the hybrid model prediction voltage according to the weighted first prediction voltage and the weighted second prediction voltage;
[0142] In the embodiments of the present invention, calculating the hybrid model prediction voltage based on the weighted first prediction voltage and the weighted second prediction voltage includes the following formula:
[0143]
[0144] In the formula, V HM is the hybrid model prediction voltage; V DDM is the first prediction voltage; V SEM is the second prediction voltage; r 1 is the prediction deviation of the data-driven prediction model; r 2 is the prediction deviation of the semi-mechanistic prediction model.
[0145] Among them, the prediction deviation of the data-driven prediction model and the prediction deviation of the semi-mechanistic prediction model are calculated through the following formulas respectively:
[0146] r 1 =|V sim -V DDM |
[0147] r 2 =|V sim -V SEM |
[0148] In the formula, V sim is the hybrid model prediction voltage of the previous time step.
[0149] The remaining life calculation unit 05 of the fuel cell is used to judge the hybrid model prediction voltage and the cut-off voltage to obtain the remaining life of the fuel cell;
[0150] When the hybrid model prediction voltage is less than or equal to the cut-off voltage, the difference between the current time step and the prediction start time is used as the remaining life of the fuel cell;
[0151] When the hybrid model prediction voltage is greater than the cut-off voltage, the hybrid model prediction voltage is used as the input data for the next time step prediction of the data-driven prediction model and the semi-mechanistic prediction model respectively, and steps S12 to S14 are executed.
[0152] It should be noted that the specific implementation manner and technical effect of the fuel cell remaining life prediction device based on the hybrid model in the embodiments of the present invention can refer to Figure 1 the corresponding fuel cell remaining life prediction method based on the hybrid model, which will not be elaborated here.
[0153] Embodiment III
[0154] Corresponding to the method embodiments, in the embodiments of the present invention, a fuel cell remaining life prediction device based on a hybrid model is further provided, such as a terminal, a server, etc. Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc., but is not limited thereto.
[0155] An example diagram of the hardware structure block diagram of the fuel cell remaining life prediction device based on the hybrid model provided by the embodiments of the present invention is as Figure 9 shown, and may include:
[0156] Processor 1, communication interface 2, memory 3, and communication bus 4;
[0157] Among them, the processor 1, the communication interface 2, and the memory 3 complete mutual communication through the communication bus 4;
[0158] Optionally, the communication interface 2 can be an interface of a communication module, such as an interface of a GSM module;
[0159] The processor 1 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.
[0160] The memory 3 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory.
[0161] Among them, the processor 1 is specifically configured to execute the computer program stored in the memory 3 to perform the following steps:
[0162] S11. Obtain the experimental data of the fuel cell, define the failure threshold point of the fuel cell as the cut-off voltage; and preprocess the experimental data to obtain a fuel cell experimental data set;
[0163] S12. Respectively construct a data-driven prediction model based on the Transformer algorithm and a semi-mechanistic prediction model including a decay factor according to the experimental data set;
[0164] S13. Obtain the first predicted voltage of the fuel cell according to the data-driven prediction model; obtain the second predicted voltage of the fuel cell according to the semi-mechanistic prediction model;
[0165] S14. Dynamically allocate weights to the first predicted voltage and the second predicted voltage according to the prediction accuracy; and calculate the hybrid model predicted voltage based on the weighted first predicted voltage and the weighted second predicted voltage.
[0166] S15. Determine the hybrid model predicted voltage and the cut-off voltage to obtain the remaining life of the fuel cell.
[0167] When the hybrid model predicted voltage is less than or equal to the cut-off voltage, take the difference between the current time step and the prediction start time as the remaining life of the fuel cell.
[0168] When the hybrid model predicted voltage is greater than the cut-off voltage, take the hybrid model predicted voltage as the input data for the next time step prediction of the data-driven prediction model and the semi-mechanistic prediction model respectively, and execute steps S12 to S14.
[0169] The above product can execute the method provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. For the technical details not described in detail in this embodiment, reference can be made to the method for predicting the remaining life of a fuel cell based on a hybrid model provided by the embodiment of the present invention.
[0170] Embodiment 4
[0171] In the embodiment of the present invention, a storage medium is further provided. The storage medium can store a program suitable for being executed by a processor, and the program is used for:
[0172] S11. Obtain the experimental data of the fuel cell, define the failure threshold point of the fuel cell as the cut-off voltage; and preprocess the experimental data to obtain the fuel cell experimental data set.
[0173] S12. Respectively construct a data-driven prediction model based on the Transformer algorithm and a semi-mechanistic prediction model including a degradation factor according to the experimental data set.
[0174] S13. Obtain the first predicted voltage of the fuel cell according to the data-driven prediction model; obtain the second predicted voltage of the fuel cell according to the semi-mechanistic prediction model.
[0175] S14. Dynamically allocate weights to the first predicted voltage and the second predicted voltage according to the prediction accuracy; and calculate the hybrid model predicted voltage based on the weighted first predicted voltage and the weighted second predicted voltage.
[0176] S15. Determine the hybrid model predicted voltage and the cut-off voltage to obtain the remaining life of the fuel cell.
[0177] When the predicted voltage of the hybrid model is less than or equal to the cut-off voltage, the difference between the current time step and the prediction start time is used as the remaining life of the fuel cell;
[0178] When the predicted voltage of the hybrid model is greater than the cut-off voltage, the predicted voltage of the hybrid model is used as the input data for the next time step prediction of the data-driven prediction model and the semi-mechanistic prediction model respectively, and steps S12 to S14 are executed.
[0179] Optionally, the refinement function and the extension function of the program can be referred to the above description.
[0180] The above product can execute the method provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. For the technical details not described in detail in this embodiment, reference can be made to the method provided by other embodiments of the present invention.
[0181] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of this application.
[0182] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. Another point, the couplings, direct couplings or communication connections shown or discussed with each other can be through some interfaces, and the indirect couplings or communication connections of devices or units can be in electrical, mechanical or other forms.
[0183] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0184] In addition, in each embodiment of the present application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0185] It should be understood that in the embodiments of the present application, the dependent claims, each embodiment, and the features can be combined with each other to achieve the solution of the foregoing technical problems.
[0186] When the above-mentioned functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, RandomAccess Memory), magnetic disks, or optical discs that can store program codes.
[0187] The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use this application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application will not be limited to the embodiments shown herein, but rather will be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for predicting the remaining life of a fuel cell based on a hybrid model, characterized in that: Includes steps: S11, acquiring experimental data of a fuel cell, defining a failure threshold point of the fuel cell as a cut-off voltage; and preprocessing the experimental data to obtain a fuel cell experimental data set; S12, constructing a data-driven prediction model based on the Transformer algorithm and a semi-mechanistic prediction model including a decay factor according to the experimental data set; S13, obtaining a first predicted voltage of the fuel cell according to the data-driven prediction model; obtaining a second predicted voltage of the fuel cell according to the semi-mechanism prediction model; S14, dynamically assigning weights to the first predicted voltage and the second predicted voltage according to prediction accuracy; and calculating a hybrid model predicted voltage according to the first predicted voltage with weight and the second predicted voltage with weight; S15, judging the voltage predicted by the hybrid model and the cut-off voltage to obtain the remaining life of the fuel cell; When the voltage predicted by the hybrid model is less than or equal to the cut-off voltage, the difference between the current time step and the predicted start time is used as the remaining life of the fuel cell; When the voltage predicted by the hybrid model is greater than the cut-off voltage, the voltage predicted by the hybrid model is used as input data for the next time step prediction of the data-driven prediction model and the semi-mechanism prediction model, respectively, and steps S12 to S14 are executed.
2. The method for predicting the remaining life of a fuel cell based on a hybrid model according to claim 1, characterized in that: Constructing the data-driven prediction model includes the following steps: S211, dividing the experimental data set into a training set and a validation set; S212, constructing a data-driven initial model; including: setting the number of encoder layers, the number of decoder layers, the number of attention heads, and the hidden layer dimension parameters of the data-driven initial model; S213, inputting the training set experimental data into the data-driven initial model, constructing a nonlinear mapping relationship between the training set experimental data and the first predicted voltage, and obtaining the trained data-driven initial model; S214. Verify the trained data-driven initial model according to the verification set experimental data to obtain a data-driven prediction model.
3. The method for predicting the remaining life of a fuel cell based on a hybrid model according to claim 2, characterized in that: Constructing the semi-mechanistic prediction model comprises the following steps: S221. Based on the electrochemical model of the fuel cell, the relationship between the output voltage and the Nernst voltage, ohmic loss, activation loss and concentration loss is used to construct the semi-mechanism degradation model of the fuel cell through the following formula: In the formula, V cell is the fuel cell output voltage; V nernst is the Nernst voltage; R is the ideal gas constant; T is the battery temperature; F is the Faraday constant; α c is the cathode exchange coefficient; i is the current density; i leak is the leakage current density; i c is the cathode exchange current density; R ele is the electronic resistance; R ion is the ionic resistance; i lim is the limiting current density; K c is the concentration loss coefficient; S222. According to the degradation mechanism of each component of the fuel cell, a degradation factor is added to characterize the fuel cell, and the decay law of the output voltage over time is calculated by the following formula; V cell (i,t)=V nernst -i(t)(R ion,0 exp(b ion t)+R ele +b ele t) In the formula, V cell (i, t) is the fuel cell voltage at the current time step; b ECSA is the effective reaction area decay factor; b leak is the leakage density decay factor; b ion is the ionic impedance decay factor; b ele is the electronic impedance decay factor; b B is the concentration loss coefficient decay factor; b D is the oxygen diffusion rate decay factor; S223, combining the experimental data of the initial polarization curve of the fuel cell, and using the first fitness function of the genetic algorithm to calculate the cathode exchange coefficient α c , the cathode exchange current density i c , initial leakage current density i leak,0 、Initial ionic resistance R ion,0 , initial electronic resistance R ele,0 , initial concentration loss coefficient K c,0 Identify; the first fitness function is calculated by the following formula: In the formula, n is the experimental data point of the polarization curve at the initial moment; V c,n is the experimental value corresponding to the experimental data point of the polarization curve at the initial moment; is the simulation result of the experimental data point of the polarization curve at the initial moment; S224, combining the experimental data of the fuel cell degradation process, and calculating the effective reaction area degradation factor b based on the second fitness function of the genetic algorithm ECSA , the leakage density decay factor b leak , the ionic impedance decay factor b ion , the electronic impedance decay factor b ele , the concentration loss coefficient decay factor b B and the oxygen diffusion rate decay factor b D Identify; the first fitness function is calculated by the following formula: In the formula, m is the experimental data point of the fuel cell degradation process; V x,n The experimental data points corresponding to the experimental values of the fuel cell degradation process; The simulation results of experimental data points of fuel cell degradation process.
4. The method for predicting the remaining life of a fuel cell based on a hybrid model according to claim 1, characterized in that: The step of calculating the hybrid model predicted voltage according to the first predicted voltage with weight and the second predicted voltage with weight comprises the following formula: In the formula, V HM Predict voltage for the hybrid model; V DDM is the first predicted voltage; V SEM is the second predicted voltage; r1 is the prediction deviation of the data-driven prediction model; r2 is the prediction deviation of the semi-mechanism prediction model.
5. The method for predicting the remaining life of a fuel cell based on a hybrid model according to claim 4, characterized in that: Prediction bias of data-driven prediction models and prediction bias of semi-mechanistic prediction models, including: The prediction deviation of the data-driven prediction model and the prediction deviation of the semi-mechanistic prediction model are calculated by the following formulas: r1=|V sim -V DDM | r2=|V sim -V SEM | In the formula, V sim Predict the voltage for the hybrid model at the previous time step.
6. The method for predicting the remaining life of a fuel cell based on a hybrid model according to claim 1, characterized in that: The preprocessing of the experimental data comprises: The experimental data are filtered to remove interference signals in the experimental data.
7. A fuel cell remaining life prediction device based on a hybrid model, characterized in that: include: An experimental data set construction unit is used to obtain experimental data of a fuel cell, define a failure threshold point of the fuel cell as a cut-off voltage, and pre-process the experimental data to obtain an experimental data set of the fuel cell; A data-driven prediction model and a semi-mechanistic prediction model construction unit, used to respectively construct a data-driven prediction model based on a Transformer algorithm and a semi-mechanistic prediction model including a decay factor according to the experimental data set; A first predicted voltage and a second predicted voltage output unit, used to obtain a first predicted voltage of the fuel cell according to the data-driven prediction model; and to obtain a second predicted voltage of the fuel cell according to the semi-mechanism prediction model; A hybrid model predicted voltage calculation unit, used for dynamically assigning weights to the first predicted voltage and the second predicted voltage according to the prediction accuracy; and calculating a hybrid model predicted voltage according to the first predicted voltage with weight and the second predicted voltage with weight; A fuel cell remaining life calculation unit, used to determine the hybrid model predicted voltage and the cut-off voltage to obtain the remaining life of the fuel cell; When the voltage predicted by the hybrid model is less than or equal to the cut-off voltage, the difference between the current time step and the predicted start time is used as the remaining life of the fuel cell; When the voltage predicted by the hybrid model is greater than the cut-off voltage, the voltage predicted by the hybrid model is used as input data for the next time step prediction of the data-driven prediction model and the semi-mechanism prediction model, respectively, and steps S12 to S14 are executed.
8. The fuel cell remaining life prediction device based on the hybrid model according to claim 7, characterized in that: The step of calculating the hybrid model predicted voltage according to the first predicted voltage with weight and the second predicted voltage with weight comprises the following formula: In the formula, V HM Predict voltage for the hybrid model; V DDM is the first predicted voltage; V SEM is the second predicted voltage; r1 is the prediction deviation of the data-driven prediction model; r2 is the prediction deviation of the semi-mechanism prediction model.
9. A fuel cell remaining life prediction device based on a hybrid model, characterized in that: include: Memory for storing computer programs; A processor is used to call and execute the computer program to implement the steps of the fuel cell remaining life prediction method based on the hybrid model as described in any one of claims 1 to 6.
10. A storage medium, characterized in that: The method comprises a software program, wherein the software program is suitable for executing, by a processor, the steps of the method for predicting the remaining life of a fuel cell based on a hybrid model as claimed in any one of claims 1 to 6.
Citation Information
Cited By
Fuel cell life prediction method combining mechanism and data driving
CN120999054A