Fuel cell residual life prediction method based on transfer learning
Through data smoothing, modal decomposition and transfer learning combined with LSTM and particle filtering, the problems of weak prediction and insufficient data within the long span of fuel cells are solved, and high-accurate fuel cell life prediction is achieved.
Patent Information
- Application Number
- CN202411078030.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-12-03
AI Technical Summary
The existing fuel cell residual life prediction method is weak in prediction within a long span, and is affected by data noise and insufficient data volume. The accumulation of errors in traditional LSTMs in long-term prediction leads to trend errors. The data-driven method requires a large amount of training data, and the cost is expensive.
Data smoothing and modal decomposition are used to remove noise, find source batteries with high similarity through DTW for transfer learning, combine LSTM and particle filtering for prediction, build an LSTM-PF model, use source domain data for pre-training and target battery data Perform fine-turning.
Effectively reduce noise interference, reduce LSTM prediction errors, improve the accuracy of fuel cell life prediction, solve the problems of data shortage and error accumulation, and improve the accuracy of long-term prediction.
Smart Images

Figure CN119066959A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of fuel cells, and in particular relates to a method for predicting the remaining life of a fuel cell based on transfer learning. Background Art
[0002] Proton Exchange Membrane Fuel Cells (PEMFC) stand out from many types of fuel cells due to their high energy density (>350wh / kg), high conversion efficiency (>40%), low operating temperature (-20~100℃), fast start-up and low noise. They have been successfully applied in transportation, distributed power generation, portable power sources and other fields, and have achieved early commercialization. However, compared with traditional energy conversion devices such as internal combustion engines, the durability of PEMFC is still poor, and its short service life seriously restricts its further large-scale industrial deployment. In addition to achieving material breakthroughs and structural optimization, prediction and health management are one of the effective ways to ensure the long-term safe and stable operation of PEMFC. Among them, accurate prediction of the remaining life of PEMFC can ensure that the stack is maintained in time, thereby extending its service life.
[0003] At present, the health prediction of fuel cells mainly includes model-based methods, data-driven methods and fusion methods. Model-based methods include mechanism-based aging models and experience-based aging models, and their prediction accuracy depends on the accuracy of the model. Data-driven methods use machine learning methods to achieve nonlinear mapping between external measurable features and internal aging states, and their accuracy depends on the quantity and quality of experimental data samples.
[0004] At present, PEMFC remaining life prediction methods can be divided into two categories: model-based methods and data-driven methods. [3] The model-based approach aims to predict the degradation behavior of PEMFC based on its degradation mechanism and failure mechanism, using physical models or empirical formulas. This type of method fully considers the impact of PEMFC internal aging factors (such as various activation losses) and external state variables (load current, operating temperature, gas pressure, etc.) on output performance. [4,5] . Therefore, this type of method can not only predict the degradation trend of PEMFC, but also estimate the physical parameter information inside the system. However, although this type of method has the advantages of small data requirements and high versatility, it also has the disadvantages of high model complexity and large amount of calculation. In addition, affected by prior knowledge reserves, mechanism modeling experience, data processing skills, etc., the prediction accuracy of this type of method is usually difficult to guarantee.
[0005] In order to make up for the shortcomings of model-based methods, data-driven PEMFC remaining life prediction methods have become the mainstream of research in recent years. Data-driven methods aim to learn the PEMFC aging law based on PEMFC performance monitoring data by using data mining to establish the intrinsic relationship between data and then predict PEMFC degradation behavior. [6-8] This type of method usually does not need to consider the electrochemical reaction mechanism and failure mechanism of PEMFC, and can provide more accurate prediction results compared to model-based methods. In addition, this type of method is not limited by application scenarios, and can still provide relatively accurate degradation trend estimation and reliable remaining life prediction even for PEMFC systems under complex working conditions or uncertain environments.
[0006] Currently, various data-driven PEMFC remaining life prediction methods have been developed. For example, Javed et al. [9] proposed a prediction method based on constrained summation wavelet-ultra-limited learning machine, which was then extended to leakage echo state network. Silva et al.
[10] proposed a prediction method based on a neural-fuzzy inference system, in which the output voltage signal was decomposed into normal operation and external disturbance parts to reduce the interference of random errors; in addition, Ma et al.
[11] It is recommended to use a long short-term memory (LSTM) recurrent neural network (RNN) to achieve the remaining life prediction of PEMFC. Compared with the general RNN algorithm, this method combines network storage units in parallel, improves the breadth and depth of the training network, and can effectively avoid the gradient explosion or disappearance problem in the prediction process.
[12] Various data-driven forecasting methods are reviewed in detail.
[0007] In general, the current data-driven methods can solve the problem of PEMFC remaining life prediction within a short time span, but they are still powerless for prediction problems within a long time span. In addition, the currently developed methods still have the following two shortcomings. First, the current methods mostly use degradation data at a single scale as input, and in the actual use of PEMFC, its capacity sometimes rebounds, and it is also susceptible to random interference from factors such as the environment and operating conditions, which will cause the degradation data to show obvious nonlinear and non-stationary fluctuations. Therefore, it will be difficult to reflect the complex degradation trend of PEMFC using only a single scale feature. Secondly, the current methods only perform end-to-end modeling for the PEMFC of interest, and their application is highly dependent on sufficient degradation data of the corresponding PEMFC, which makes these methods impossible to apply to new PEMFC systems, especially when the degradation data is insufficient.
[0008] In order to achieve accurate prediction of PEMFC remaining life over a long time span, this project attempts to build a new prediction method based on transfer learning and modal decomposition to address the shortcomings of current data-driven prediction methods. This method first uses modal decomposition to separate the global degradation trend and residual components at different scales from the original data. Then, based on transfer learning technology, the degradation data of the target PEMFC is fused with the degradation data in the source domain to achieve data enhancement. Finally, particle filtering and LSTM are used to predict the remaining life of PEMFC. This project can explore new development ideas for PEMFC remaining life modeling and provide useful references for PEMFC durability design, so it has practical research value and significance.
[0009] [3] Zhao J, Li
[0010] [4]Burlatsky SF,GummallaM,O'Neill J,et al.Amathematical model forpredicting the life of polymerelectrolyte fuel cell membranes subjected to tohydrationcycling[J].Journal ofPower Sources,2012,215(1):135-144.
[0011] [5]Chen H, Pei P, Song M. Lifetime prediction and the economic lifetime of proton exchange membrane fuel cells [J]. Applied Energy, 2015, 142: 154-163.
[0012] [6]Morando S,Jemei S,Hissel D,et al.Proton exchange membrane fuelcell ageing forecasting algorithmbased on Echo State Network[J].InternationalJournal ofHydrogen Energy,2017,42(2):1472-1480.
[0013] [7]WuY,Breaz E,Gao Fei,et al.Nonlinear performancedegradationprediction ofproton exchange membrane fuel cells using relevancevector machine[J].IEEE Transactions on Energy Conversion,2016,31(4):1570-1582.
[0014] [8]Zhu L,Chen J.Prognostics ofPEM fuel cells based on Gaussianprocess state space models[J].Energy,2018,149:63-73.
[0015] [9]Javed K,Gouriveau R,Zerhouni N,et al.Prognostics ofproton exchangemembrane fuel cells stackusing an ensemble ofconstraints-based connectionistnetworks[J].Journal ofPower Sources,2016,324:745-757.
[0016]
[10] SilvaR E,Gouriveau R, S, et al. Proton exchange membrane fuelcell degradation prediction based on Adaptive Neuro-Fuzzy Inference Systems [J]. International Journal of Hydrogen Energy, 2014, 39(21): 11128-11144.
[0017]
[11] Ma R, Yang T, Breaz E, et al. Data-driven proton exchange membranefuel cell degradation prediction through deep learning method [J]. AppliedEnergy, 2018, 231: 102-115.
[0018]
[12] HuaZ, Zheng Z, Pahon E, et al. Areview on lifetime prediction of proton exchange membrane fuel cells system [J]. Journal of Power Sources, 2022, 529: 231256. Summary of the invention
[0019] Technical issues solved:
[0020] The present application solves the problem that there are many noises in the battery data in the prior art that interfere with the prediction results, and it is necessary to select a suitable method to remove the noise from the data. The traditional LSTM will lose the prediction trend due to the continuous accumulation of errors in long-term predictions, and the data-driven method has attracted more and more attention, but its training data demand is large, and the current cost of fuel cells is expensive and the amount of data is insufficient. The present application uses DTW to find source batteries with high similarity, and removes noise from the data through data smoothing and modal decomposition, so that the subsequent model can learn the effective part of the battery life change. The source battery is used for pre-training to obtain the LSTM-PF model. This combination solves the problem that the prediction value error of the traditional LSTM in long-term prediction increases with the accumulation of time, resulting in an error in the prediction data trend. The pre-trained model is fine-turned using the target battery data to obtain the LSTM-PF model that predicts the target battery, which effectively solves the problem of shortage of target battery data.
[0021] Technical solution:
[0022] A method for predicting the remaining life of a fuel cell based on transfer learning uses a data smoothing method to remove sharp points from multiple sets of PEMFC degradation data collected, and uses a modal decomposition method to decompose the original data into multiple modes, each of which corresponds to different frequency or time domain features. After screening, noise is removed to provide high-quality data for training deep learning models or building prediction models. The specific steps are as follows:
[0023] The first step is data preprocessing:
[0024] The data smoothing algorithm is Gaussian smoothing, which uses the convolution method to smooth the data of each point to the average value of the data in a small neighborhood with a radius of R as the center.
[0025] The second step is modal decomposition: decompose the original data into multiple modes, each of which corresponds to different frequency or time domain characteristics. After screening, remove the noise to provide high-quality data for training deep learning models or building prediction models. First, based on Fourier fast transform and wavelet transform, the time-frequency domain conversion of data is realized to construct a health factor that can reflect the degradation of the PEMFC system. Then, modal analysis is used to decompose the degradation trend of the system, and the appropriate number of decomposed modes is obtained through research.
[0026] The third step is data modeling: Based on the enhanced degradation data, the remaining life modeling is carried out using the filtering method combined with the time series neural network;
[0027] The fourth step is transfer learning: After DTW is used to regularize the data, similarity measurement is performed to determine the source domain degradation data that is most similar to the target proton exchange membrane fuel cell PEMFC degradation data, and then a solution is provided for the target domain through the source domain data.
[0028] Furthermore, the convolution method is adopted to transform the data a of each point j Smoothing is the average value a of the data in a small neighborhood with a radius R centered on it. i ;
[0029]
[0030] Where i is the position of the data, R is the radius of the neighborhood centered on the data, j is the loop variable for enumerating the data in the neighborhood (from position ir to position i+r), a i is the processed data.
[0031] Furthermore, the algorithm calculation process in the second step is performed by iteration, and the steps are as follows:
[0032] a. Decompose the original signal into upper and lower envelopes, that is, find the local maximum and minimum values of the signal
[0033] y1(i)=max(x j ),ir≤j≤i+r,y2(i)=min(x j ),ir≤j≤i+r
[0034] where max(x j ), ir≤j≤i+r means in x i-r to x i+r Take the maximum value among these 2r+1 elements; min(x j ), ir≤j≤i+r means in x i-r to x i+r Take the minimum value among these 2r+1 elements, y1(i) is the local maximum value of the neighborhood with radius r at the i-th position, and y2(i) is the local minimum value of the neighborhood with radius r at the i-th position;
[0035] b. Take the average value of the upper and lower envelopes as the center line of the signal
[0036]
[0037] where y m (i) is the local center value of the neighborhood with radius r at the i-th position;
[0038] c. Subtract the center line from the signal to get a local oscillation IMF
[0039] IMF k (i) = x i -y m (i)
[0040] IMF k (i) is the i-th data after the k-th processing;
[0041] d. IMF k (i) As a new signal, repeat the above steps until the remaining term is a constant or a monotonic function
[0042] e. From the above, the data can be decomposed into
[0043]
[0044] Where N is the number of processing times, and R(N) is the remaining item after N processing times.
[0045] Furthermore, in the fourth step, DTW is first used to find source domain battery data with high similarity to the target battery data, and the data volume of the source domain battery data is required to be sufficient and valid; then the data is smoothed and processed by modal decomposition to obtain effective training data with high smoothness and noise reduction, and then the effective data is used for training to obtain the LSTM model and the PF model, and the predicted value obtained by LSTM is used as the observation value of the PF algorithm, and the PF algorithm is used to obtain the optimal estimate of the true state of the variable to update the modified LSTM predicted value, and then the corrected predicted value is used to perform a cyclic prediction to fuse the two algorithms to obtain the LSTM-PF fusion model, and this model is used as the pre-training model of the target battery, and then the pre-training model is fine-turned using the target battery data, and the target battery data features are integrated into the pre-training model to obtain the life prediction model of the target battery data.
[0046] Furthermore, the filtering method in the third step is particle filtering, the time series neural network is LSTM, and the data modeling includes LSTM modeling, particle filtering modeling, battery long-term remaining life prediction modeling, battery long-term remaining life prediction modeling, prediction improvement and result analysis, LSTM-PF cycle prediction, and battery life prediction modeling based on transfer learning.
[0047] Furthermore, the LSTM long short-term memory is a variant of the recurrent neural network (RNN), which solves the gradient vanishing and gradient exploding problems of the traditional RNN by introducing the internal memory unit of the "cell state". The cell state allows the LSTM to learn long-distance dependencies, thereby better capturing the contextual information in the voltage and life sequence data.
[0048] Furthermore, in the particle filter modeling, the prediction value obtained by LSTM is used as the observation value of the PF algorithm, and the PF algorithm is used to obtain the optimal estimate of the true state of the variable to update the modified LSTM prediction value, and then the two algorithms are fused in a cyclic prediction manner using the modified prediction value to obtain the LSTM-PF fusion model. The PF algorithm mechanism is as follows: Particle filter PF is an approximate Bayesian filtering method based on Monte Carlo simulation. It approximates the posterior probability distribution of the system state through a group of particle samples, and uses the sample mean instead of the integral operation to obtain the minimum variance estimate of the state. It is suitable for processing various nonlinear problems. PF is based on the DSS model and is modeled through the following steps:
[0049] The model consists of a set of unobservable state sequences x that change over time. k and a set of observation sequences z k The specific form is as follows:
[0050] State equation:x k =f(xk-1 ,Θ k-1 ,n k )
[0051] Observation equation: z k =h(x k ,v k )
[0052] In the formula
[0053] k——discrete time series; x——system state;
[0054] f——state transfer function;
[0055] Θ——model parameter vector; n——state noise; z——observation value;
[0056] h——observation function of the state; v——observation noise;
[0057] In the PF framework, the approximation of the probability distribution of the degradation state and the estimation of the degradation state itself are based on the generated particles and their associated weights; the unknown state and model parameters of the system are propagated through particles containing probability information. The method includes the following steps:
[0058] a. Particle initialization: Generate sampling particles from the prior probability distribution p(x0)
[0059] b. Importance sampling: By updating the state in the prediction process, according to Sampling the importance of each particle
[0060] c. Calculate weights: Assume that the measurement error is a Gaussian distribution with variance R, and calculate the importance weight of each particle Calculated as:
[0061] (In the formula is the actual measured value);
[0062] d. Weight normalization: Normalize the weights to form a probability distribution:
[0063]
[0064] e. Resampling: Record the number of effective particles Get the resampling threshold When N eff <N th When , the particles with low weights are deleted, and particles are regenerated around the particles with high weights, so that the particle distribution is close to the true value;
[0065] f. State estimation: Update the particle state of the weighted sample according to the number of valid particles:
[0066]
[0067] Furthermore, in the battery life prediction modeling based on transfer learning, the neural network method first randomly initializes the model parameters, and then uses the back propagation and gradient descent optimization algorithm to train the model parameters.
[0068] Furthermore, the battery life prediction modeling algorithm mechanism based on transfer learning: this part uses dynamic time warping Dynamic Time Warping. The DTW algorithm selects a group of data as the target battery from the existing battery voltage change data, and compares the similarity of the target battery with the remaining battery data. The battery with the highest similarity is selected as the source battery for pre-training, and then a small amount of target battery voltage data is used to fine-turn the pre-trained model. After integrating the target battery data features into the pre-trained model, a life prediction model of the target battery data is obtained, which is convenient for predicting subsequent voltage changes.
[0069] Principle explanation: RUL is an important indicator for evaluating battery performance, and voltage changes can greatly reflect RUL. Accurately predicting battery RUL and timely replacing batteries that have reached the end of their life are of great significance for ensuring the safety of fuel cell systems and have attracted widespread attention. In this project, a long-term remaining service life prediction framework for hydrogen fuel cells based on particle filtering was implemented. Based on the empirical voltage decay model of the battery, the optimal model parameters were estimated in the process of tracking the voltage, and the long-term prediction of PEMFC RUL was achieved. In addition, LSTM can effectively handle the problem of time series data prediction, and can quickly capture the trend of data changes in single-step predictions, and obtain good RUL prediction results, but the cumulative error in the long-term prediction process reduces the prediction accuracy. In order to reduce the impact of the error, this paper proposes to use the LSTM-PF method to correct the predicted value, use the state prediction ability of PF to provide calibration parameters for LSTM to correct the cumulative error, and organically integrate LSTM and PF to improve the accuracy of RUL prediction. In addition, in response to the most common data shortage problem in PEMFC prediction, this paper proposes to use DTW to find a source battery with sufficient and reliable data similarity to the target battery, and pre-train and migrate it to the target battery on this basis, providing a solution to the data shortage problem.
[0070] Beneficial Effects
[0071] Compared with the prior art, the method for predicting the remaining life of a fuel cell based on transfer learning described in the present invention adopts the above technical solution and has the following technical effects:
[0072] 1. This application uses modal decomposition technology to decompose the original voltage data into modal components of different frequencies. By screening the low-frequency part and synthesizing it, the key features of the voltage trend are obtained. This step helps to reduce noise interference and improve the interpretability of the data;
[0073] 2. As the number of prediction cycles increases, the number of real values in the prediction model input gradually decreases while the number of prediction values gradually increases, until all are prediction values, resulting in an increasing cumulative error. This paper proposes to use the state prediction capability of the PF algorithm to provide calibration parameters for LSTM to correct the prediction value to reduce the cumulative error and improve the accuracy of RUL prediction;
[0074] 3. In order to solve the problem of small amount of data faced by the target battery, this application uses DTW technology to measure the similarity of candidate batteries, and selects source batteries with large data volume and high similarity with the target battery for pre-training. The pre-trained model is fine-turned, and data enhancement methods such as time point cutting are used to make the training data as effective as possible. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] Figure 1 This is a flow chart of a method for predicting the remaining life of a fuel cell based on transfer learning in this application;
[0076] Figure 2 The left figure is the result diagram before and after the data smoothing process, and the right figure is the result diagram after the data smoothing process;
[0077] Figure 3 It is the 15 sets of EMD string diagrams in this application;
[0078] Figure 4 This is the basic structure diagram of LSTM in this application;
[0079] Figure 5 It is the forget gate in this application: decide to discard the information graph;
[0080] Figure 6 Enter the gate for this application: determine the retention information map;
[0081] Figure 7 For the state layer in this application: update the cell state map;
[0082] Figure 8 For the output gate in this application: determine the output information graph;
[0083] Fig. 9 This is a comparison chart of the data before and after processing in this application;
[0084] Fig.10This is a learning curve diagram of the training results in this application;
[0085] Fig.11 This is a graph of single-step prediction results of the model in this application;
[0086] Fig.12 This is a graph showing the update of particle clusters during the prediction phase (500-800) hours of the particle filter in this application;
[0087] Fig.13 This is the particle swarm iteration result diagram in this application;
[0088] Fig.14 This is a diagram of the cyclic iterative prediction method in this application;
[0089] Fig.15 This is a graph of long-term prediction results for the iterative sliding time window used in this application;
[0090] Fig.16 This is the first-order difference data diagram of the battery voltage in this application;
[0091] Fig.17 This is the differential long-term prediction result diagram in this application;
[0092] Fig.18 This is the LSTM-PF fusion prediction result diagram in this application;
[0093] Fig.19 This is the DTW calculation result diagram in this application;
[0094] Fig. 20 This is the single-step prediction result diagram after fine-tuning in this application;
[0095] Fig.21 This is a curve diagram of the cyclic predicted voltage change in this application. DETAILED DESCRIPTION
[0096] The present invention is further described below in conjunction with examples. The examples are only used to illustrate the present invention and do not constitute a limitation on the scope of the claims. Other alternative means that can be thought of by those skilled in the art are all within the scope of the claims of the present invention.
[0097] Embodiment 1:
[0098] A method for predicting the remaining life of a fuel cell based on transfer learning uses a data smoothing method to remove sharp points from multiple sets of PEMFC degradation data collected, and uses a modal decomposition method to decompose the original data into multiple modes, each of which corresponds to different frequency or time domain features. After screening, noise is removed to provide high-quality data for training deep learning models or building prediction models. The specific steps are as follows:
[0099] The first step is data preprocessing:
[0100] The data smoothing algorithm is Gaussian smoothing, which uses the convolution method to transform the data of each point a j Smoothing is the average value a of the data in a small neighborhood with a radius R centered on it. i ;
[0101]
[0102] Where i is the position of the data, R is the radius of the neighborhood centered on the data, j is the loop variable for enumerating the data in the neighborhood (from position ir to position i+r), a i is the processed data; when r is small, the smoothed data still conforms to the distribution of the original data, achieving the effect of removing sharp points in the data, which is convenient for subsequent machine learning;
[0103] Application results:
[0104] like Figure 2 As shown, Figure 2 This is the smoothing result of a group of fuel cell voltage output signals. Since the optimal value of the radius r is difficult to determine during the data smoothing process, it is planned to further analyze it through mathematical formulas.
[0105] The second step is modal decomposition: decompose the original data into multiple modes, each of which corresponds to different frequency or time domain characteristics. After screening, remove the noise to provide high-quality data for training deep learning models or building prediction models. First, based on Fourier fast transform and wavelet transform, the time-frequency domain conversion of data is realized to construct a health factor that can reflect the degradation of the PEMFC system. Then, modal analysis is used to decompose the degradation trend of the system, and the appropriate number of decomposed modes is obtained through research.
[0106] The algorithm calculation process is carried out through iteration, the steps are as follows:
[0107] a. Decompose the original signal into upper and lower envelopes, that is, find the local maximum and minimum values of the signal
[0108] y1(i)=max(x j ),ir≤j≤i+r,y2(i)=min(x j ),ir≤j≤i+r
[0109] where max(x j ), ir≤j≤i+r means in x i-r to x i+r Take the maximum value among these 2r+1 elements; min(x j ), ir≤j≤i+r means in x i-r to x i+rTake the minimum value among these 2r+1 elements, y1(i) is the local maximum value of the neighborhood with radius r at the i-th position, and y2(i) is the local minimum value of the neighborhood with radius r at the i-th position;
[0110] b. Take the average value of the upper and lower envelopes as the center line of the signal
[0111]
[0112] where y m (i) is the local center value of the neighborhood with radius r at the i-th position;
[0113] c. Subtract the center line from the signal to get a local oscillation IMF
[0114] IMF k (i) = x i -y m (i)
[0115] IMF k (i) is the i-th data after the k-th processing;
[0116] d. IMF k (i) As a new signal, repeat the above steps until the remaining term is a constant or a monotonic function
[0117] e. From the above, the data can be decomposed into
[0118]
[0119] Where N is the number of processing times, R(N) is the remaining items after N processing times
[0120] Application Results
[0121] One set of voltage-time data is modally decomposed, and the decomposition radius r is set to 0.2 until a monotonic function is obtained, and finally 15 EMD strings are obtained. These 15 EMD strings represent the properties of the data at different scales. The images of these 15 EMD strings are shown in Figure 1. Figure 3 As shown;
[0122] The third step is data modeling: Based on the enhanced degradation data, the remaining life modeling is carried out using the filtering method combined with the time series neural network;
[0123] Step 4: Transfer learning: After DTW is used to regularize the data, similarity measurement is performed to determine the source domain degradation data that is most similar to the target proton exchange membrane fuel cell (PEMFC) degradation data, and then a solution is provided for the target domain through the source domain data;
[0124] First, DTW is used to find source domain battery data with high similarity to the target battery data, and the data volume of the source domain battery data is required to be sufficient and valid; then the data is smoothed and processed by modal decomposition to obtain effective training data with high smoothness and noise reduction. Then, the effective data is used for training to obtain the LSTM model and PF model. The predicted value obtained by LSTM is used as the observation value of the PF algorithm, and the PF algorithm is used to obtain the optimal estimate of the true state of the variable to update the modified LSTM predicted value. The two algorithms are then fused in a cyclic prediction method using the corrected predicted value to obtain the LSTM-PF fusion model. This model is used as the pre-training model of the target battery, and the pre-training model is fine-turned using the target battery data. The target battery data features are integrated into the pre-training model to obtain the life prediction model of the target battery data.
[0125] Among them, the filtering method in the third step is particle filtering, the time series neural network is LSTM, and the data modeling includes LSTM modeling, particle filtering modeling, battery long-term remaining life prediction modeling, battery long-term remaining life prediction modeling, prediction improvement and result analysis, LSTM-PF cycle prediction, and battery life prediction modeling based on transfer learning.
[0126] LSTM modeling: LSTM (Long Short-Term Memory) is a variant of a recurrent neural network (RNN) that solves the gradient vanishing and gradient exploding problems of traditional RNNs by introducing an internal memory unit called “cell state”. The cell state allows LSTM to learn long-range dependencies, thereby better capturing contextual information in voltage and lifetime sequence data.
[0127] The structure and operation mechanism of LSTM are as follows Figure 4-Figure 8 Shown:
[0128] Application results: Before applying LSTM for life span, the data needs to be smoothed. This application uses linear interpolation, Gaussian kernel filtering and smoothing, and cubic spline interpolation to process the original irregular voltage data, reduce the high-frequency noise in the data, improve the signal-to-noise ratio of the data, but at the same time retain the overall characteristics of the data, and obtain a set of incremental data suitable for neural network learning.
[0129] After the data is smoothed, LSTM is used for modeling. In order to construct a suitable hidden layer module structure, the network structure is trained and tested many times. Although the more layers of LSTM modules, the deeper the constructed network is, the more complex time series can be learned. However, while deepening the network, the operation time will also be correspondingly longer, especially in training, it is easy to form overfitting of the training set. Although the occurrence of over-learning curve fitting can be prevented by adding a drop rate between layers or regularizing the weights, it is too complicated for one-dimensional data. After actual testing, a single-layer LSTM layer and a Dense layer are selected to form a training model. The nodes of the hidden layer are 128 and the output layer is 1. Since the PEMFC experiment is a continuous experiment, the experiment itself does not have periodicity. Although there is an operation of starting and stopping the stack, the time periodicity of starting and stopping is poor. After actual testing, setting the time window to 3 can obtain the best results. The number of training times and batch size are set to 100 and 1 respectively.
[0130] Depend on Fig.10 As shown in the figure, we can see from the learning curve that the loss value on the training set and the loss value on the validation set decrease synchronously, and there is no big gap between the two. From this, we can conclude that the training effect of the entire model is still good, and the final loss value is close to a value, and there is basically no overfitting.
[0131] Depend on Fig.11 As shown in the figure, part of the data is intercepted for prediction, and the overall single-step prediction is good. The final predicted voltage failure time is 806H, and the voltage failure time of the original data is 804H. At the same time, since the time of the prediction starting point is 690H, the predicted RUL is 116H, while the actual RUL is 114H. The calculated single-step prediction accuracy is 98.25%.
[0132] In particle filter modeling, the prediction value obtained by LSTM is used as the observation value of the PF algorithm, and the PF algorithm is used to obtain the optimal estimate of the true state of the variable to update the corrected LSTM prediction value. Then, the corrected prediction value is used for cyclic prediction to fuse the two algorithms and obtain the LSTM-PF fusion model.
[0133] Particle filter modeling, PF algorithm mechanism:
[0134] Particle filtering (PF) is an approximate Bayesian filtering method based on Monte Carlo simulation. It uses a group of particle samples to approximate the posterior probability distribution of the system state, and uses the sample mean instead of the integral operation to obtain the minimum variance estimate of the state. It is suitable for processing various nonlinear problems. PF is based on the DSS model and is modeled through the following steps:
[0135] The model consists of a set of unobservable state sequences x that change over time. kand a set of observation sequences z k The specific form is as follows:
[0136] State equation:x k =f(x k-1 ,Θ k-1 ,n k )
[0137] Observation equation: z k =h(x k ,v k )
[0138] In the formula
[0139] k——discrete time series; x——system state; f——state transfer function;
[0140] Θ——model parameter vector; n——state noise; z——observation value;
[0141] h——observation function of the state; v——observation noise.
[0142] In the PF framework, the approximation of the probability distribution of the degradation state and the estimation of the degradation state itself are based on the generated particles and their associated weights. The unknown state and model parameters of the system are propagated through particles containing probability information. The method includes the following steps:
[0143] a. Particle initialization: Generate sampling particles from the prior probability distribution p(x0)
[0144] b. Importance sampling: By updating the state in the prediction process, according to Sampling the importance of each particle
[0145] c. Calculate weights: Assume that the measurement error is a Gaussian distribution with variance R, and calculate the importance weight of each particle Calculated as:
[0146] (In the formula is the actual measured value)
[0147] d. Weight normalization: Normalize the weights to form a probability distribution:
[0148]
[0149] e. Resampling: Record the number of effective particles Get the resampling threshold When N eff <N thWhen , the particles with low weights are deleted and particles are regenerated around the particles with high weights, so that the particle distribution is close to the true value.
[0150] f. State estimation: Update the particle state of the weighted sample according to the number of valid particles:
[0151]
[0152] The update of particle clusters during the prediction phase (500-800) hours is shown below: Fig.12 shown.
[0153] like Fig.15 As shown in the figure, the independent variable is the number of update iterations of the particle swarm (recorded every 4 hours or so), and the dependent variable is the variance value of the particle cluster (in ‰). It can be seen from the update image that after about 10 hours of iteration, the variance of the particle swarm tends to a stable value, indicating that the particle filter gradually approaches the optimal solution and becomes stable through the survival of the fittest in the particle swarm during this process.
[0154] Long-term battery remaining life prediction modeling
[0155] Algorithm mechanism
[0156] In the previous step, the short-term prediction of the battery voltage time series was completed. Similar to most models, LSTM can perform well in the prediction task in a short period of time. In order to test the effect of the model in long-term prediction, the LSTM time window division method is changed above, and the prediction is performed through the loop iterative prediction method. The prediction method is as follows Fig.14 shown.
[0157] Compared with the single-step short-term prediction mentioned above, the long-term cycle prediction has no significant difference in the model training stage, and the main change is in the prediction stage. Considering that in the actual battery voltage time series prediction scenario, the data after the prediction starting point is unknown, this paper will add the predicted data back to the time sliding window in turn, and continuously iterate the prediction until the test set is finally predicted.
[0158] Application Results
[0159] In the task scenario of long-term cyclic prediction, it is necessary to capture the long-term trend of change. Therefore, in this scenario, the size of the sliding window is appropriately expanded, and the time window is set to 12 hours. At the same time, corresponding to the expansion of the time window, the model hyperparameters are adjusted and 300 epochs are trained. Finally, the error loss on the test set after model training is only 0.0036, and the model can fit the original data well. Then the iterative sliding time window is applied for cyclic prediction, and the prediction results are shown in the figure below. Fig.15 shown.
[0160] The results of the cyclic prediction show that the model can roughly fit the battery voltage change trend in long-term prediction. The prediction results change smoothly and have certain reference significance. At the same time, for the battery failure voltage mentioned above, the prediction accuracy of the calculated cyclic prediction is 88.01%. In summary, the LSTM model performs well in the long-term prediction scenario and can fit the overall trend, but the prediction accuracy still has room for improvement. At the same time, in the prediction process, the data of the prediction set is prioritized for normalization of the maximum value, but in actual application scenarios, it is difficult to obtain the maximum value, so there is still room for improvement.
[0161] Forecasting improvements and results analysis
[0162] Difference: The data is processed using the first-order difference method to eliminate the battery voltage's dependence on the time series and detrend it. This will help simplify data modeling and analysis and help the model better learn data features. At the same time, modeling based on differential data means that the prediction part on the test set only needs to give the starting point voltage, which is more in line with the actual processing situation than the original modeling method. The data after the first-order difference of the battery voltage is as follows Fig.16 As shown:
[0163] The voltage after differentiation is relatively stable as a whole, and except for a few outliers, it is roughly distributed between ±1.5. In order to normalize the data range and improve the efficiency of model training, this paper further standardizes the data to eliminate the influence of the dimension size.
[0164] After the data processing is completed, the model training part is consistent with the long-term cycle prediction part above, and the overall goodness of fit is high. Then the trained model is iterated and cycled predicted, and the final prediction result is as follows Fig.17 As shown:
[0165] It can be found that the prediction results show a periodic decline, and the overall trend fitting is relatively good. However, the curve frequency changes too quickly and periodically, which does not conform to the actual situation. It has little reference value for the actual battery voltage prediction, and the accuracy of the cycle prediction is lower than that of the original one.
[0166] Since the data after difference is relatively stable and has certain periodic changes, this feature is also captured by LSTM and reflected in the final prediction results. At the same time, the periodic decline in the prediction results may be caused by the fact that the original data has not been corrected during the iterative cycle prediction process, so the final prediction only presents a general trend, and the specific details are distorted.
[0167] LSTM-PF Cycle Prediction
[0168] In the above problem, the data outside the test set is only used for model training, while in this part, these data will be combined with the particle filter algorithm to correct the prediction results.
[0169] In actual problems, the predicted voltages before and after are not unrelated. Therefore, in the LSTM-PF cycle prediction, we first give the initial prediction results based on the LSTM model after the first-order difference, and use PF to calculate based on the training data 500 hours before the prediction point. In the particle filter correction, some parameters are as follows:
[0170]
[0171] 500 particles are used for particle filter correction. First, the particles are looped through the historical voltage data to perform prediction, update weights, and resample operations to ensure that particles with higher weights are retained more. Then the fit between the particle filter and the LSTM prediction value is calculated, and the LSTM prediction data is modified based on a set weight (lstm_weight). The final corrected voltage value is the weighted average of the particle set, which is obtained by multiplying the value of each particle by its corresponding weight and summing them. The modified value is then brought into the iterative loop prediction, and the subsequent steps are the same as the LSTM loop prediction. The final prediction result is as follows: Fig.18 shown.
[0172] The cyclic prediction after LSTM-PF correction can better fit the trend of the original voltage within 150 hours, and has higher accuracy in battery life prediction, with a prediction accuracy of 97.87%. It can well implement the prediction task and is more in line with the needs of actual scenarios.
[0173] Battery life prediction modeling based on transfer learning
[0174] The neural network method first randomly initializes the model parameters, and then uses the back-propagation and gradient descent optimization algorithms to train the model parameters; before the emergence of pre-training technology, deep learning applications based on neural networks faced the following problems: First, the deep learning models at that time were not complex enough, and simply stacking neural network layers did not bring more performance improvements; second, data-driven deep learning models lacked large-scale labeled data, and the cost of manual labeling was too high to drive complex models; therefore, pre-training technology has gradually been valued by more scholars; the advantage of pre-training is that by using large-scale data for training, the model can learn more generalized feature representations, thereby performing better on specific tasks; this is especially useful for tasks with less data or limited computing resources; pre-trained models are also often used for transfer learning, and part or all of the pre-trained model can be used for new tasks to improve the performance of the model.
[0175] Algorithm mechanism:
[0176] This part uses the Dynamic Time Warping (DTW) algorithm to select a group of data as the target battery from the existing battery voltage change data, compare the target battery with the remaining battery data for similarity, select the battery with the highest similarity as the source battery for pre-training, and then use a small amount of target battery voltage data to fine-turn the pre-trained model. After integrating the target battery data features into the pre-trained model, the life prediction model of the target battery data is obtained, which is convenient for predicting subsequent voltage changes.
[0177] (2) Application results:
[0178] Similarity measurement: Select V2 as the target battery. Use Dynamic Time Warping (DTW) to match the voltage change data trend and calculate the Euclidean distance between the target battery and the remaining batteries. The result is as follows: Fig.19 As shown. From the calculation results, we can see that v2 and v4 have the highest similarity, so v4 is selected as the source battery.
[0179] Single-step prediction: After pre-training with v4 data, the voltage change data of 80 hours in v2 is intercepted and fine-turned to the model. The voltage data change in the next 200 hours is predicted. The results are as follows Fig. 20 As shown in the figure, the single-step prediction is good, which can basically fit the original voltage data curve trend, and the maximum error of the voltage value is within 0.1, which can better reflect the voltage change trend.
[0180] Long-term prediction: After pre-training with v4 data, 80h of voltage change data from v2 is intercepted to fine-turn the model. The voltage change cycle prediction is performed using the differential-LSTM-PF long-term prediction algorithm on the fine-tuned model. The results are as follows: Fig.21 As shown in the figure, it can be seen that the cycle prediction curve fits the overall trend of voltage change well and can better reflect the change range of voltage drop. However, due to the limitation of LSTM, it will not reflect some small voltage changes.
[0181] The above description of the embodiments is to facilitate the understanding and use of the invention by those skilled in the art. It is obvious that those skilled in the art can easily make various modifications to these embodiments and apply the general principles described herein to other embodiments without creative work. Therefore, the present invention is not limited to the above embodiments, and improvements and modifications made by those skilled in the art based on the disclosure of the present invention without departing from the scope of the present invention should be within the scope of protection of the present invention.
Claims
1. A method for predicting the remaining life of a fuel cell based on transfer learning, characterized in that: The data smoothing method is used to remove the sharp points in the collected multiple sets of PEMFC degradation data. The modal decomposition method is used to decompose the original data into multiple modes. Each mode corresponds to different frequency or time domain characteristics. After screening, the noise is removed to provide high-quality data for training deep learning models or building prediction models. The specific steps are as follows: The first step is data preprocessing: The data smoothing algorithm is Gaussian smoothing, which uses the convolution method to smooth the data of each point to the average value of the data in a small neighborhood with a radius of R as the center. The second step is modal decomposition: decompose the original data into multiple modes, each of which corresponds to different frequency or time domain characteristics. After screening, remove the noise to provide high-quality data for training deep learning models or building prediction models. First, based on Fourier fast transform and wavelet transform, the time-frequency domain conversion of data is realized to construct a health factor that can reflect the degradation of the PEMFC system. Then, modal analysis is used to decompose the degradation trend of the system, and the appropriate number of decomposed modes is obtained through research. The third step is data modeling: Based on the enhanced degradation data, the remaining life modeling is carried out using the filtering method combined with the time series neural network; The fourth step is transfer learning: After DTW is used to regularize the data, similarity measurement is performed to determine the source domain degradation data that is most similar to the target proton exchange membrane fuel cell PEMFC degradation data, and then a solution is provided for the target domain through the source domain data.
2. A method for predicting the remaining life of a fuel cell based on transfer learning according to claim 1, characterized in that: Take the convolution method to transform the data of each point a j Smoothing is the average value a of the data in a small neighborhood with a radius R centered on it. i ; Where i is the position of the data, R is the radius of the neighborhood centered on the data, j is the loop variable for enumerating the data in the neighborhood (from position ir to position i+r), a i is the processed data.
3. The method for predicting the remaining life of a fuel cell based on transfer learning according to claim 1, characterized in that: The algorithm calculation process in the second step is performed by iteration, and the steps are as follows: a. Decompose the original signal into upper and lower envelopes, that is, find the local maximum and minimum values of the signal y1(i)=max(x j ),i-r≤j≤i+r,y2(i)=min(x j ),i-r≤j≤i+r where max(x j ), ir≤j≤i+r means in x i-r to x i+r Take the maximum value among these 2r+1 elements; min(x j ), ir≤j≤i+r means in x i-r to x i+r Take the minimum value among these 2r+1 elements, y1(i) is the local maximum value of the neighborhood with radius r at the i-th position, and y2(i) is the local minimum value of the neighborhood with radius r at the i-th position; b. Take the average value of the upper and lower envelopes as the center line of the signal where y m (i) is the local center value of the neighborhood with radius r at the i-th position; c. Subtract the center line from the signal to get a local oscillation IMF IMF k (i)=x i -y m (i) IMF k (i) is the i-th data after the k-th processing; d. IMF k (i) As a new signal, repeat the above steps until the remaining term is a constant or a monotonic function e. From the above, the data can be decomposed into Where N is the number of processing times, and R(N) is the remaining item after N processing times.
4. The method for predicting the remaining life of a fuel cell based on transfer learning according to claim 1, characterized in that: In the fourth step, DTW is first used to find source domain battery data with high similarity to the target battery data, and the data volume of the source domain battery data is required to be sufficient and valid; then the data is smoothed and processed by modal decomposition to obtain effective training data with high smoothness and noise reduction, and then the effective data is used for training to obtain the LSTM model and the PF model, and the predicted value obtained by LSTM is used as the observation value of the PF algorithm, and the PF algorithm is used to obtain the optimal estimate of the true state of the variable to update the corrected LSTM predicted value, and then the corrected predicted value is used to perform a cyclic prediction to fuse the two algorithms to obtain the LSTM-PF fusion model, and this model is used as the pre-training model of the target battery, and then the pre-training model is fine-turned using the target battery data, and the target battery data features are integrated into the pre-training model to obtain the life prediction model of the target battery data.
5. The method for predicting the remaining life of a fuel cell based on transfer learning according to claim 1, characterized in that: In the third step, the filtering method is particle filtering, the time series neural network is LSTM, and the data modeling includes LSTM modeling, particle filtering modeling, battery long-term remaining life prediction modeling, battery long-term remaining life prediction modeling, prediction improvement and result analysis, LSTM-PF cycle prediction, and battery life prediction modeling based on transfer learning.
6. A method for predicting the remaining life of a fuel cell based on transfer learning according to claim 5, characterized in that: The LSTM long short-term memory is a variant of the recurrent neural network (RNN). It solves the gradient vanishing and gradient exploding problems of the traditional RNN by introducing the internal memory unit of the "cell state". The cell state allows the LSTM to learn long-distance dependencies, thereby better capturing the contextual information in the voltage and life sequence data.
7. The method for predicting the remaining life of a fuel cell based on transfer learning according to claim 5, characterized in that: In the particle filter modeling, the prediction value obtained by LSTM is used as the observation value of the PF algorithm, and the PF algorithm is used to obtain the optimal estimate of the true state of the variable to update the modified LSTM prediction value, and then the two algorithms are fused in a cyclic prediction manner using the modified prediction value to obtain the LSTM-PF fusion model. The PF algorithm mechanism is as follows: Particle filter PF is an approximate Bayesian filtering method based on Monte Carlo simulation. It approximates the posterior probability distribution of the system state through a group of particle samples, and uses the sample mean instead of the integral operation to obtain the minimum variance estimate of the state. It is suitable for processing various nonlinear problems. PF is based on the DSS model and is modeled through the following steps: The model consists of a set of unobservable state sequences x that change over time. k and a set of observation sequences z k The specific form is as follows: State equation:x k =f(x k-1 ,Θ k-1 ,n k ) Observation equation: z k =h(x k ,v k ) In the formula k——discrete time series; x——system state; f——state transfer function; Θ——model parameter vector; n——state noise; z——observation value; h——observation function of the state; v——observation noise; In the PF framework, the approximation of the probability distribution of the degradation state and the estimation of the degradation state itself are based on the generated particles and their associated weights; the unknown state and model parameters of the system are propagated through particles containing probability information. The method includes the following steps: a. Particle initialization: Generate sampling particles from the prior probability distribution p(x0) b. Importance sampling: By updating the state in the prediction process, according to Sampling the importance of each particle c. Calculate weights: Assume that the measurement error is a Gaussian distribution with variance R, and calculate the importance weight of each particle Calculated as: (In the formula is the actual measured value); d. Weight normalization: Normalize the weights to form a probability distribution: e. Resampling: Record the number of effective particles Get the resampling threshold When N eff <N th When , the particles with low weights are deleted, and particles are regenerated around the particles with high weights, so that the particle distribution is close to the true value; f. State estimation: Update the particle state of the weighted sample according to the number of valid particles:
8. The method for predicting the remaining life of a fuel cell based on transfer learning according to claim 5, characterized in that: In the battery life prediction modeling based on transfer learning, the neural network method first randomly initializes the model parameters, and then uses the back propagation and gradient descent optimization algorithm to train the model parameters.
9. A method for predicting the remaining life of a fuel cell based on transfer learning according to claim 8, characterized in that: The battery life prediction modeling algorithm mechanism based on transfer learning: This part uses dynamic time warping Dynamic TimeWarping. The DTW algorithm selects a group of data as the target battery from the existing battery voltage change data, compares the target battery with the remaining battery data for similarity, selects the battery with the highest similarity as the source battery for pre-training, and then uses a small amount of target battery voltage data to fine-turn the pre-trained model. After integrating the target battery data features into the pre-trained model, a life prediction model for the target battery data is obtained, which is convenient for predicting subsequent voltage changes.
Citation Information
Cited By
Lithium battery early-stage RUL prediction method based on transfer learning and unscented particle filter (UPF) fusion model
CN119807954A
