Intelligent Prediction Method for the Service Life of Vehicle Fuel Cells Based on Multi-Feature Index Fusion

Through the integration of multi-feature indexes and the combination of multiple prediction algorithms, the problem of large error in fuel cell life prediction in the prior art is solved, and life prediction with high accuracy and robustness is achieved, which improves the reliability and economic benefits of the system.

CN119414251BActive Publication Date: 2025-06-13HARBIN INST OF TECH AT WEIHAI
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510018219.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-07
Publication Date
2025-06-13
Estimated Expiration
2045-01-07

AI Technical Summary

Technical Problem

The existing PEMFC life intelligent prediction algorithm based on voltage as input indicators has large cumulative errors in long-term predictions, which cannot accurately reflect the true attenuation behavior of fuel cells, making it difficult to achieve accurate RUL evaluation.

Method used

The intelligent prediction method of automotive fuel cell life based on multi-feature index fusion is adopted, and the voltage data is decomposed into multiple IMFs through EMD empirical modal decomposition, and a weighted attention model is established to fusion and reorganize the IMFs. The Gray Wolf Optimization Algorithm is used to predict different attenuation components by combining GRU, SSA-LSTM and Transformer respectively.

Benefits of technology

It improves the accuracy and robustness of fuel cell life prediction, can accurately reflect the attenuation behavior of fuel cell under multiple operating conditions, extends the safe use cycle of the system, and improves the economic benefits and reliability of operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119414251B_ABST
    Figure CN119414251B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of fuel cells, specifically an intelligent prediction method for the life of vehicle fuel cells based on the fusion of multi-feature indicators, which can effectively improve the accuracy of predicting the service life of fuel cells, and thus is beneficial to improving the operation reliability and safety of fuel cells. Compared with the prior art, the fusion of multi-feature health indicators reconstructs the output voltage of the fuel cell into a new health indicator that characterizes the fluctuation term, periodic term and long-term attenuation component of the fuel cell. The proposed intelligent prediction method for the life of vehicle fuel cells integrates a variety of prediction algorithms and optimization algorithms, and can select a suitable prediction method according to the type of input data to improve the accuracy and robustness of life prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of fuel cell technology, and more specifically to an intelligent prediction method for the life of a vehicle fuel cell based on the fusion of multiple feature indicators, which can effectively improve the accuracy of prediction of the service life of a fuel cell, thereby facilitating improving the reliability and safety of fuel cell operation. Background Art

[0002] In recent years, energy issues have become increasingly important in environmental protection and economic development. On the one hand, fossil energy reserves are limited and cannot be regenerated; on the other hand, the demand for energy in industry and daily life is increasing. Proton Exchange Membrane Fuel Cell (PEMFC), as a highly regarded clean energy technology, has shown broad application prospects due to its advantages such as high energy conversion efficiency, no pollution, simple structural design, stable operation and low noise.

[0003] The PEMFC stack is composed of multiple single cells connected in series. Any degradation in the performance of a single cell will lead to a decrease in the efficiency of the entire stack and cause voltage decay, thus affecting the normal operation of the system. Directly testing the performance of the fuel cell may cause the stack to be damaged or even scrapped. During the long-term use of the fuel cell, the stress differences caused by humidity and temperature changes and insufficient gas supply often cause performance degradation and a decrease in output voltage. Once the proton exchange membrane is damaged, its performance cannot be restored by adjusting the operating conditions, which may cause irreversible damage and ultimately lead to significant economic losses. Therefore, it is crucial to ensure that the PEMFC system is in good condition for its continued operation. By monitoring the system operating parameters in real time and predicting the remaining useful life (RUL) of the fuel cell, preventive maintenance can be carried out before the stack fails completely. This can not only shorten downtime, but also extend the safe use cycle of the system and improve the economic benefits and reliability of operation.

[0004] The existing PEMFC life intelligent prediction algorithm based on voltage as input index has large cumulative errors in long-term prediction, and the deviation between the predicted value and the true value is large; the predicted value cannot reflect the actual attenuation behavior of PEMFC, making it difficult to achieve accurate PEMFC RUL evaluation. The operating data of fuel cells is nonlinear and multidimensional, containing important degradation information of fuel cells. Voltage as a health indicator contains the nonlinear attenuation characteristics and test noise of fuel cells, making it difficult to improve the accuracy of long-term life prediction. Summary of the invention

[0005] In view of the disadvantages and deficiencies existing in the prior art, the present invention proposes an intelligent prediction method for the life of vehicle fuel cells based on the fusion of multi-feature indicators, which can have a high prediction accuracy and strong robustness under multiple working conditions.

[0006] The present invention is achieved through the following measures:

[0007] An intelligent prediction method for the life of vehicle fuel cells based on the fusion of multi-feature indicators, characterized by comprising the following steps:

[0008] Step 1: Collect the voltage sampling data of the proton exchange membrane fuel cell at continuous moments, and preprocess the collected data to obtain the stack voltage of the proton exchange membrane fuel cell;

[0009] Step 2: Use the EMD empirical mode decomposition method to decompose the stack voltage representing the attenuation of the proton exchange membrane fuel cell (PEMFC) into multiple intrinsic mode functions (IMFs) with different characteristic scales;

[0010] Step 3: Establish a weighted attention model to fuse and reconstruct the IMFs. The weighted attention model reconstructs the IMFs into an attenuation component one for characterizing the volatility and noise of the fuel cell, an attenuation component two for characterizing the periodic changes of the fuel cell, and an attenuation component three for characterizing the long-term aging trend of the fuel cell;

[0011] Step 4: Through the intelligent prediction method for the life of vehicle fuel cells based on the fusion of multi-feature health indicators, predict the attenuation component one, the attenuation component two, and the attenuation component three respectively. Among them, the grey wolf optimization algorithm (GWO) combined with the gated recurrent unit (GRU) is used to predict the attenuation component one, the SSA-LSTM prediction method is used to predict the attenuation component two, and the sequence model Transformer based on the attention mechanism is used to predict the attenuation component three.

[0012] The preprocessing in step 1 of the present invention includes:

[0013] Step 1-1: Perform Gaussian filtering on the sampling data to filter noise and abnormal peaks, where the Gaussian filtering is represented by the following formula:

[0014] (1),

[0015] (2),

[0016] (3),

[0017] In the formula, K(t) represents the standard normal distribution of the parameter data at time t, f(t j ) represents the filtered data, u(t j) represents parameter data, n represents the number of parameter data, and H represents the bandwidth;

[0018] Step 1-2: Use the cubic spline method for interpolation to obtain sampled data with a uniform time interval.

[0019] In step 2 of the present invention, the voltage is selected as the health indicator. The EMD empirical mode decomposition method decomposes the voltage data into several IMFs and one residual according to the time scale of the voltage itself. Among them, the IMF must satisfy two constraint conditions: Constraint condition 1, in the entire data segment, the number of extreme points and the number of zero-crossing points need to be equal or differ by at most 1. Constraint condition 2, at any given moment, the upper envelope formed by the local maximum and the lower envelope formed by the local minimum are averaged at 0. Let the PEMFC voltage be , where is the voltage in the r-th time period. The EMD empirical mode decomposition method includes the following steps:

[0020] Step 2-1: Find all the extreme points of the voltage , and respectively use cubic spline interpolation to draw the upper and lower envelope lines, denoted as and respectively;

[0021] Step 2-2: The average envelope is extracted from the average of the upper envelope and the lower envelope, denoted as ,

[0022] (4);

[0023] Step 2-3: Subtract the mean value from the original data to obtain the data ;

[0024] Step 2-4: Judge whether meets the two constraint conditions of the IMF. If it meets, then is the decomposed IMF, denoted as w(r). If it does not meet, then according to re-execute steps 2-1 to 2-4. The residual term R(r) is shown in the following formula:

[0025] (5);

[0026] Step 2-5: Repeat steps 2-1 to 2-4 until the residual becomes a monotonic function, and the EEMD empirical mode decomposition method ends. The voltage data is finally decomposed into k IMFs and one residual, as shown in the following formula:

[0027] (6).

[0028] In step 3 of the present invention, the core of the attention mechanism of the weighted attention model is to calculate the correlation between each pair of data, and the weight is calculated in the form of dot product for correlation:

[0029] (7),

[0030] In the formula is a learnable weight matrix, is the query vector, is the key vector, represents the transpose of the query vector , and the above is normalized through a function, as shown below:

[0031] (8),

[0032] Specifically, it includes the following steps:

[0033] Step 3-1: Based on the attention weights, perform weighted summation on the second group of data to obtain the fused data of each sample in the first group of data, as shown in the following formula:

[0034] (9), where each z i is fused based on and the correlation of the second group of data;

[0035] Step 3-2: Concatenate or weight the first group of data and its corresponding fused representation to generate new data : (10), where ReLu is a non-linear activation function;

[0036] Step 3-3: The finally output fused data representation is shown in the following formula:

[0037] (11),

[0038] H is the new data set obtained by fusing the two groups of data through the attention mechanism.

[0039] In step 4 of the present invention, when predicting the attenuation component one, the Grey Wolf Optimization Algorithm GWO is combined with the Gated Recurrent Unit GRU for prediction. Among them, the gating mechanism of GRU is good at modeling medium- and long-term dependencies, while the global search of GWO avoids local optima and enhances the adaptability to periodic data. The GRU model described in step 4 is composed of an update gate and a reset gate, and the calculation formula of the GRU model is:

[0040] (12),

[0041] (13),

[0042] In z t is the output of the update gate, h t-1 is the hidden state of the previous time step, is the current input data, W z and b z are the weight matrix and bias respectively. The reset gate controls the degree of influence of the previous hidden state on the current calculation. r t is the output of the reset gate, W r and b r are the weight matrix and bias respectively. The current candidate hidden state is calculated based on the hidden state adjusted by the reset gate; GWO realizes global optimization by simulating the hunting behavior of a group of grey wolves. The core of GWO lies in the balance between the global search and local exploitation of the solution space. The current position of each grey wolf in GWO represents a solution (representing a set of hyperparameters in GRU optimization). The position update formula is as follows:

[0043] (14),

[0044] where X i t+1 is the t+1 th iteration of the i th wolf's position vector; X leader t is the position vector of the leading wolf at the t-th iteration, that is, the current optimal solution. A is the control factor for adjusting the step size, and C is the coefficient for adjusting the position of the target prey. A and C are defined as follows: A = 2·a·r 1 -a (15), C = 2·r 2 (16), where a is a factor that decreases with each iteration over time, r 1 and r 2 are random numbers between 0 and 1. a, β, and δ are respectively X leader tThe optimal solution, sub-optimal solution, and third-optimal solution. The wolf pack updates its position according to the positions of the three leaders a, β, and δ. By continuously approaching the optimal value, each wolf gradually finds the global optimal value. During the process of GWO optimizing the hyperparameters of the GRU model, the position of each wolf represents a set of GRU hyperparameters. For each position, the corresponding GRU model is trained and the fitness function (MSE) is calculated.

[0045] In step 4 of the present invention, when predicting the second attenuation component, the SSA-LSTM prediction method is adopted. The LSTM model consists of an input gate, a forget gate, and an output gate. The calculation formula of the LSTM model is represented by the following formula:

[0046] (17),

[0047] (18),

[0048] (19),

[0049] In the formula, represents the input data, h t-1 represents the state of the hidden layer at time t-1, , and respectively represent the calculation result of the input gate, the weight matrix, and the bias term. , and respectively represent the calculation result of the output gate, the weight matrix, and the bias term. , and respectively represent the calculation result of the forget gate, the weight matrix, and the bias term. σ represents the activation function; SSA is a swarm intelligence optimization algorithm based on the foraging behavior of sparrows, which optimizes the objective function by simulating the foraging behavior of sparrows. The optimization objective of the LSTM model is to minimize the prediction error, and the mean square error MSE is used as the objective function. SSA constructs the initial solution space population by randomly generating the initial positions of sparrows. Each position represents the potential combination of the hyperparameters of the LSTM in dimension d, expressed as formula (20):

[0050] (20),

[0051] In the formula X t is randomly distributed in the solution space X to cover a wide range of hyperparameters. For each sparrow position X t the corresponding LSTM model is trained and its fitness value is calculated Xi , this value is related to the value of the objective function. The lower the fitness value, the better the effect of the hyperparameter combination on improving the performance of the LSTM model. SSA simulates the behavior of sparrows foraging, including foragers (exploration behavior) and predators (exploitation behavior). The position update rule is based on the following formula:

[0052] (21),

[0053] In the formula X i t represents the position of the t th sparrow in the i th iteration, X j t and X k t are the positions of the best solution and the worst solution in the current population respectively. α and β are adjustment factors. SSA optimizes the current solution by performing local search near the current solution, which is to update the parameters by adjusting the positions of the parameters in the formula. The local search is represented by the following formula:

[0054] (22), where X best t is the current best solution, γ is the local search factor, rand is a random number. SSA explores other regions of the solution space through random perturbation and global update strategies to avoid falling into local optima. The specific formula is as follows:

[0055] (23),

[0056] In the formula X global t is the global best solution, δ is the global search factor. SSA gradually converges during multiple iterations. By continuously updating the positions of the solutions, the population gradually approaches the global best solution. The convergence condition is usually based on the stability of the fitness value or the preset number of iterations. Finally, the optimized LSTM model is superior to the unoptimized model in terms of the objective function. Based on the above mathematical principles, SSA can efficiently optimize the hyperparameters of the LSTM model and improve its prediction performance for the PEMFC fluctuation term.

[0057] In step 4 of the present invention, when predicting the decay component three, a sequence model Transformer based on the attention mechanism is used for prediction.

[0058] The positional encoding vectors added to the inputs of encoding and decoding in the Transformer can represent the position of the current data and the distance between different data. The positional encoding formula is denoted as CPE:

[0059] (24),

[0060] where C pos represents the position of the current data in the sample, and d represents the dimension of the positional encoding vector. i represents the position index of each value. The even positions use sine encoding, and the odd positions use cosine encoding. The attention mechanism receives the input or output of the previous encoder and multiplies the received data by different weights to obtain the Q, K, V matrices. The similarity between data is shown by the following formula: (25),

[0061] where Q is the query matrix, K is the key matrix, and QK T calculates the attention weights of Q on V. d k is the dimension of the K matrix, which is used to normalize the attention mechanism. softmax is the normalized exponential function;

[0062] Let P(X) be the label sequence, Q(X) be the output sequence predicted by the Transformer. The KL divergence is an index to measure the similarity between two probability distributions, and its calculation formula is as follows:

[0063] (26),

[0064] where q(x i ) is the i-th predicted value in the output sequence predicted by the Transformer, p(x i ) is the predicted value at the corresponding moment in the label sequence for q(x i ), l is the sequence length, is the KL divergence loss function of the two sequences P(X) and Q(X), The smaller it is, the closer the two data distributions are. By repeatedly training the neural network, the distribution of Q(X) can be approximated as P(X).

[0065] Compared with the prior art, the multi - feature health index fusion reconstructs the output voltage of the fuel cell to form a new health index that characterizes the fluctuation term, periodic term, and long - term attenuation component of the fuel cell. The proposed intelligent prediction method for the service life of vehicle fuel cells integrates multiple prediction algorithms and optimization algorithms, which can select appropriate prediction methods according to the input data type to improve the accuracy and robustness of life prediction. Through verification using real fuel cell aging data, the results prove that the method proposed in this invention has a high prediction accuracy and strong robustness for the remaining service life under multiple working conditions, and its predicted value can reflect the true attenuation behavior of the fuel cell. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Attached Figure 1 is the flowchart of the present invention.

[0067] Attached Figure 2 is the flowchart of the embodiment of the present invention.

[0068] Attached Figure 3 is the prediction result graph under static working conditions in the embodiment of the present invention.

[0069] Attached Figure 4 is the prediction result graph under quasi - dynamic working conditions in the embodiment of the present invention.

[0070] Attached Figure 5 is the flowchart of the third attenuation component in the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0071] The present invention will be further described below with reference to the drawings and embodiments.

[0072] Embodiment: This embodiment proposes a method for intelligent prediction of the service life of vehicle fuel cells based on multi - feature index fusion as shown in Attached Figure 2 and Attached Figure 5 , including the following steps:

[0073] Step S1: Normalize the voltage of the fuel cell collected at continuous moments and map it to the interval [0, 1]. To reduce the interference of clutter data, pre - process the sampling data through Gaussian filtering, including the following steps:

[0074] Step S11: Perform Gaussian filtering on the sampling data to filter out noise and abnormal peaks;

[0075] Step S12: Use the cubic spline method for interpolation to obtain sampling data with a uniform time interval. The formula for the Gaussian filtering is:

[0076] (1),

[0077] (2),

[0078] (3),

[0079] where K(t) represents the standard normal distribution of the parameter data at time t, f(t j ) represents the filtered data, u(t j ) represents the parameter data, n represents the number of parameter data, and H represents the bandwidth;

[0080] Step S2: Use Empirical Mode Decomposition (EMD) to decompose the stack voltage decay characteristics into multiple Intrinsic Mode Functions (IMFs) with different characteristic scales. Among them, the fuel cell prediction algorithm selects voltage as the health indicator. The EMD decomposition algorithm decomposes the voltage data into several IMFs and 1 residual according to the time scale of the voltage itself. The IMFs must satisfy two constraints: (1) In the entire data segment, the number of extreme points and the number of zero-crossing points need to be equal or differ by at most 1. (2) At any given moment, the upper envelope formed by the local maximum and the lower envelope formed by the local minimum are averaged at 0. In this example, let the PEMFC voltage be , where is the voltage in the r-th time period. The EMD decomposition process is as follows:

[0081] Step S21: Find all the extreme points of the voltage and use cubic spline interpolation to draw the upper and lower envelope lines, denoted as and respectively;

[0082] Step S22: The average envelope is extracted from the average of the upper and lower envelopes, denoted as ,

[0083] (4);

[0084] Step 2 - 3: Subtract the mean from the original data to obtain the data ;

[0085] Step 2 - 4: Determine whether satisfies the two constraints of the IMF. If it satisfies, then is the decomposed IMF, denoted as w(r). If it does not satisfy, then re - execute Steps 2 - 1 to 2 - 4 according to . The residual term R(r) is shown in the following formula: (5),

[0086] Step 2-5: Repeat Steps 2-1 to 2-4 until the residual becomes a monotonic function, and the EEMD empirical mode decomposition method ends. The voltage data is finally decomposed into k IMF components and a residual, as shown in the following equation:

[0087] (6) In step 3 of the present invention, the core of the attention mechanism of the weighted attention model is to calculate the correlation between each pair of data, and the weight is calculated in the form of a dot product to calculate the correlation:

[0088] (7)

[0089] In the formula is a learnable weight matrix, is the query vector, is the key vector, represents the transpose of the query vector is normalized through a function, as shown specifically below:

[0090] (8)

[0091] Specifically, it includes the following steps:

[0092] Step S31: Based on the attention weights, perform weighted summation on the second group of data to obtain the fused data representation of each sample in the first group of data:

[0093] (9)

[0094] In the formula, each is fused based on the correlation between and the second group of data;

[0095] Step S32: Concatenate or weight the first group of data and its corresponding fused representation to generate new data as shown below:

[0096] (10)

[0097] In the formula, ReLu is a non-linear activation function;

[0098] Step S33: The finally output fused data representation is as shown below;

[0099] (11)

[0100] H is the new data set obtained by fusing the two groups of data through the attention mechanism;

[0101] ​Step S4: The weighted attention model reorganizes the IMFs into attenuation component 1 that represents the volatility and noise of the fuel cell, attenuation component 2 that represents the periodic changes of the fuel cell, and attenuation component 3 that represents the long-term aging trend of the fuel cell.

[0102] Among them, the intelligent prediction method for the life of vehicle fuel cells includes Gated Recurrent Unit (GRU), Long Short-Term Memory (LSTM), and Transformer. The optimization algorithms are Sparrow Search Algorithm (SSA) and Grey Wolf Optimizer (GWO).

[0103] Step S41: Since the SSA-LSTM prediction method can effectively capture short-term fluctuations and non-linear high-frequency information, SSA-LSTM is used to predict attenuation component 1 of the PEMFC.

[0104] Among them, the LSTM model consists of an input gate, a forget gate, and an output gate, and its calculation formula is:

[0105] (17),

[0106] (18),

[0107] (19),

[0108] In the formula, represents the input data, represents the state of the hidden layer at time t-1, , and respectively represent the calculation result, weight matrix, and bias term of the input gate, , and respectively represent the calculation result, weight matrix, and bias term of the output gate, , and respectively represent the calculation result, weight matrix, and bias term of the forget gate, and σ represents the activation function;

[0109] Step S42: SSA is a swarm intelligence optimization algorithm based on the foraging behavior of sparrows. Its mathematical principle is to optimize the objective function by simulating the foraging behavior of sparrows. The optimization objective of the LSTM model is to minimize the prediction error, and the mean square error (MSE) is usually used as the objective function.

[0110] The SSA constructs the initial solution space population by randomly generating the initial positions of sparrows. Each position X t represents a potential combination of the hyperparameters of the LSTM in dimension d,

[0111] (20),

[0112] where X t is randomly distributed in the solution space X to cover a wide range of hyperparameters. For each sparrow position X t the corresponding LSTM model is trained and its fitness value is calculated X i , which is related to the value of the objective function. The lower the fitness value, the better the hyperparameter combination is for improving the performance of the LSTM model. The SSA simulates the behavior of sparrows during foraging, including foragers (exploration behavior) and predators (exploitation behavior). The position update rule is based on the following formula:

[0113] (21),

[0114] where X i t represents the position of the t th sparrow in the i th iteration, X j t and X k t are the positions of the best and worst solutions in the current population respectively, and α and β are adjustment factors.

[0115] The SSA optimizes the current solution by performing local search near the current solution, which is achieved by updating the parameters by adjusting their positions in the formula. The local search can be represented by the following formula:

[0116] (22),

[0117] where X best t is the current best solution, γ is the local search factor, rand is a random number. The SSA explores other regions of the solution space through random perturbation and global update strategies to avoid falling into local optima. The specific formula is as follows:

[0118] (23),

[0119] whereX global t is the global optimal solution, and δ is the global search factor. SSA gradually converges during multiple iterations. By continuously updating the position of the solution, the population gradually approaches the global optimal solution. The convergence condition is usually based on the stability of the fitness value or a preset number of iterations. Eventually, the optimized LSTM model is superior to the unoptimized model in terms of the objective function. Based on the above mathematical principles, SSA can efficiently optimize the hyperparameters of the LSTM model and improve its prediction performance for the fluctuating terms of PEMFC.

[0120] Step S43: The gating mechanism of GRU is good at modeling medium- and long-term dependencies, while the global search of GWO avoids local optima and enhances the adaptability to periodic data. GWO-GRU is very suitable for predicting the decay component 2 of the periodic terms of PEMFC.

[0121] Preferably, the LSTM model described in step S4 is composed of an update gate and a reset gate, and its calculation formula is:

[0122] (12),

[0123] (13),

[0124] where z t is the output of the update gate, h t-1 is the hidden state of the previous time step, is the current input data, W z and b z are the weight matrix and bias respectively. The reset gate controls the degree of influence of the previous hidden state on the current calculation. r t is the output of the reset gate, W r and b r are the weight matrix and bias respectively. The current candidate hidden state is calculated based on the hidden state adjusted by the reset gate.

[0125] Step S44: GWO achieves global optimization by simulating the hunting behavior of a group of grey wolves. The core of GWO lies in the balance between global search and local exploitation in the solution space. The current position of each grey wolf in GWO represents a solution (a set of hyperparameters in GRU optimization). The position update formula is as follows:

[0126] (14),

[0127] where X t+1 iFor the t+1 th iteration, the position vector of the i only wolf; X leader t is the position vector of the leading wolf at the t-th iteration, that is, the current optimal solution. A is the control factor for adjusting the step size, and C is the coefficient for adjusting the position of the target prey. A and C are defined as follows:

[0128] (15),

[0129] (16),

[0130] where a is a factor that decreases with each iteration over time, r 1 and r 2 are random numbers between 0 and 1. a, β, and δ are the X leader t optimal solution, sub-optimal solution, and third-optimal solution in , respectively. The wolves update their positions according to the positions of the three leaders a, β, and δ, and each wolf gradually finds the global optimal value by continuously approaching the optimal value. During the process of GWO optimizing the hyperparameters of the GRU model, the position of each wolf represents a set of GRU hyperparameters. For each position, the corresponding GRU model is trained and the fitness function (MSE) is calculated.

[0131] Step S45: The Transformer has good feature extraction ability and is very suitable for predicting the decay component 3 representing the long-term decay of PEMFC.

[0132] Preferably, the position encoding vector added to the input by the encoder and decoder in the Transformer described in step S4 can represent the position of the current data and the distance between different data. The position encoding formula is represented by CPE:

[0133] (24),

[0134] where C pos represents the position of the current data in the sample, and d represents the dimension of the position encoding vector. i represents the position index of each value. The even positions use sine encoding, and the odd positions use cosine encoding. The attention mechanism receives the input or output of the previous encoder and multiplies the received data by different weights to obtain the Q, K, V matrices. The similarity between the data is shown by the following formula:

[0135] (25),

[0136] where Q is the query matrix, K is the key matrix, QK TCalculate the attention weights of Q on V. d k is the dimension of the K matrix, which is used to normalize the attention mechanism. Softmax is the normalized exponential function.

[0137] Let P(X) be the label sequence, and Q(X) be the output sequence predicted by the Transformer. The KL divergence is an index to measure the similarity between two probability distributions, and its calculation formula is as follows:

[0138] (26),

[0139] In the formula is the i-th predicted value in the output sequence predicted by the Transformer, is in the label sequence The predicted value at the corresponding time. l is the sequence length. is the KL divergence loss function of the two sequences P(X) and Q(X). The smaller it is, the closer the two data distributions are. By repeatedly training the neural network, the distribution of Q(X) can be approximated as P(X).

[0140] To further reflect the prediction accuracy of the PEMFC decay trend under different test conditions in this example, calculations are performed using a real PEMFC aging dataset. EMD adaptively decomposes the voltage of the PEMFC into 5 IMFs and a residual value step by step according to the frequency components of the signal. These 5 IMFs represent different frequency bands, and usually these frequency bands gradually decrease from high frequency to low frequency. The first IMF usually represents the high-frequency component in the signal, that is, the part that changes most rapidly. It usually contains the fast oscillations or noise of the signal. The second IMF represents the lower-frequency component in the signal, that is, the part that changes more slowly, but still contains some higher-frequency dynamic features. The third IMF further represents the lower-frequency oscillation component. Usually, these components are the slower-changing parts in the signal, and may be related to some periodic changes or trends. The fourth IMF represents the even lower-frequency component, which may be the slow-changing trend, periodic change or amplitude change in the signal. The fifth IMF: usually represents the low-frequency component of the signal, which may be related to the overall trend or baseline drift of the signal. If the signal contains large periodic trends or low-frequency changes, the last IMF will contain these components. The residual term is usually the low-frequency trend component or the average value of the signal. This residual term has no obvious high-frequency components, and it usually represents the long-term trend or slow-changing part of the signal.

[0141] SSA-LST, GWO-GRU, and Echo State Network (ESN) are selected as the comparison methods. The four methods conduct comparative experiments using the first 20% of the training data of the real fuel cell data, and two indicators, the root mean square error RMSE and the mean absolute percentage error MAPE, within the full life cycle of the fuel cell are selected for analysis. Their calculation formulas are as follows:

[0142] (27),

[0143] (28),

[0144] In the formula, is the predicted value, y i represents the real data value, n is the number of tests, and N is a natural number.

[0145] The comparative experimental results under the static and dynamic conditions of the PEMFC are shown in Table 1:

[0146] Table 1

[0147]

[0148] It can be seen from the experimental results in Table 1 that the RMSE and MAE in this example under the same data set and prediction step are smaller than those of the comparison methods. The experimental results in Table 1 prove that an intelligent prediction method for the life of vehicle fuel cells based on the fusion of multi-feature health indicators proposed by the present invention has high prediction accuracy and robustness under different working conditions.

[0149] In order to further reflect the prediction accuracy of the remaining useful life of the PEMFC in this example under different test conditions, performance verification is carried out through a real PEMFC aging data set. The output of the prediction method proposed by the present invention is the time T and the PEMFC voltage value at that moment. The calculation formula for the prediction error of the remaining useful life (RUL) of the PEMFC is defined as follows:

[0150] (29),

[0151] In the formula is the real RUL, is the predicted RUL.

[0152] The prediction results are shown in Table 2:

[0153] Table 2

[0154]

[0155] As shown in Table 2 and Appendix Figure 3 ,Figure 4 As shown, the predicted values of methods such as ESN, LSTM, and BiLSTM under static conditions cannot decay to the fault voltage, and the predicted values of the three prediction methods are significantly distorted. Therefore, the three methods cannot predict the decay of PEMFC under static conditions with limited data. The method proposed in the present invention can accurately predict the RUL of PEMFC under both static and quasi-dynamic conditions, proving the effectiveness of the method proposed in the present invention.

Claims

1. An intelligent prediction method for vehicle fuel cell life based on multi-feature index fusion, characterized in that: The following steps are involved: Step 1: Collecting continuous voltage sampling data of the proton exchange membrane fuel cell, and preprocessing the collected data to obtain the stack voltage of the proton exchange membrane fuel cell; Step 2: Use the EMD empirical mode decomposition method to decompose the stack voltage that characterizes the attenuation of the proton exchange membrane fuel cell PEMFC into multiple intrinsic mode functions IMFs of different characteristic scales; Step 3: Establish a weighted attention model to fuse and reorganize the IMF. The weighted attention model reorganizes the IMF into an attenuation component 1 for characterizing the volatility and noise of the fuel cell, an attenuation component 2 for characterizing the periodic change of the fuel cell, and an attenuation component 3 for characterizing the long-term aging trend of the fuel cell; Step 4: The attenuation component 1, attenuation component 2, and attenuation component 3 are predicted respectively by using the intelligent prediction method of vehicle fuel cell life based on the fusion of multi-feature health indicators. The attenuation component 1 is predicted by using the gray wolf optimization algorithm GWO combined with the gated recurrent unit GRU, the attenuation component 2 is predicted by using the SSA-LSTM prediction method, and the attenuation component 3 is predicted by using the sequence model Transformer based on the attention mechanism; In step 3, the core of the attention mechanism of the weighted attention model is to calculate the correlation between each pair of data, where the weights are calculated in the form of dot products: (7), In the formula is a learnable weight matrix, is the query vector, is the key vector, Represents the query vector The transpose of Normalization is performed through the function, as shown below: (8) specifically comprises the following steps: Step 3-1: Based on the attention weight, perform weighted summation on the second set of data to obtain the fused data of each sample in the first set of data, as expressed in the following formula: (9), In the formula, each All based on The result obtained by correlation fusion with the second set of data; Step 3-2: Concatenate or weight the first set of data and its corresponding fusion representation to generate new data : (10), where ReLu is a nonlinear activation function; Step 3-3: The final output fusion data is expressed as follows: (11), It is a new data set after fusing two sets of data through the attention mechanism; In step 4, when predicting the attenuation component 1, the Grey Wolf Optimization Algorithm GWO combined with the gated recurrent unit GRU is used for prediction. The gating mechanism of GRU is good at modeling medium- and long-term dependencies, while the global search of GWO avoids local optimality and enhances adaptability to periodic data. The GRU model in step 4 consists of an update gate and a reset gate. The calculation formula of the GRU model is: (12), (13), In the formula is the output of the update gate, is the hidden state at the previous time step, is the current input data, and They are the weight matrix and bias respectively. The reset gate controls the influence of the previous hidden state on the current calculation. To reset the gate output, and are the weight matrix and bias respectively, the current candidate hidden state It is calculated based on the hidden state adjusted by the reset gate; GWO achieves global optimization by simulating the hunting behavior of a group of gray wolves. The core of GWO lies in the balance between global search and local utilization of the solution space. The current position of each gray wolf in GWO represents a solution, and the position update formula is as follows: (14), In the formula For the t+1 The first iteration i The wolf's position vector; is the position vector of the leading wolf at the tth iteration, that is, the current optimal solution, A is the control factor for adjusting the step size, and C is the coefficient for adjusting the position of the target prey. A and C are defined as follows: A=2·a·r1-a(15), C=2·r2(16), Where a is a factor that decreases with each iteration over time, r1 and r2 are random numbers between 0 and 1, and α, β, and δ are The optimal solution, suboptimal solution and third optimal solution in the , the wolf pack updates its position according to the positions of the three leaders α, β and δ. By constantly approaching the optimal value, each wolf gradually finds the global optimal value. In the process of GWO optimizing the hyperparameters of the GRU model, the position of each wolf represents a set of GRU hyperparameters. For each position, the corresponding GRU model is trained and the fitness function MSE is calculated; In step 4, when predicting the attenuation component 2, the SSA-LSTM prediction method is used, where the LSTM model consists of an input gate, a forget gate, and an output gate. The calculation formula of the LSTM model is expressed as follows: (17), (18), (19), In the formula, Represents input data, represents the state of the hidden layer at time t-1, , and Represent the calculation results of the input gate, the weight matrix and the bias term respectively, , and Represent the calculation results of the output gate, the weight matrix and the bias term respectively, , and Respectively represent the calculation results of the forget gate, the weight matrix and the bias term, represents the activation function; SSA is a swarm intelligence optimization algorithm based on the foraging behavior of sparrows. It optimizes the objective function by simulating the foraging behavior of sparrows. The optimization goal of the LSTM model is to minimize the prediction error. The mean square error MSE is used as the objective function. SSA constructs the initial solution space population by randomly generating the initial sparrow position. Each position Represents LSTM in dimension The potential combination of hyperparameters is expressed as formula (20): (20), In the formula Randomly distributed in the solution space In order to cover a wide range of hyperparameters, for each sparrow position Train the corresponding LSTM model and calculate its fitness value , which is related to the value of the objective function. The lower the fitness value, the better the hyperparameter combination is in improving the performance of the LSTM model. SSA simulates the behavior of sparrows when foraging, including foragers and predators. The position update rule is based on the following formula: (21), In the formula Indicates t In the iteration i The position of a sparrow, and are the positions of the best and worst solutions in the current population, α and β are adjustment factors, SSA optimizes the current solution by performing a local search near the current solution. This is done by updating the parameters by adjusting the position of the parameters in the formula. The local search is expressed by the following formula: (22), in, X best t is the current optimal solution, γ is the local search factor, rand is a random number. SSA explores other areas of the solution space through random perturbations and global update strategies to avoid falling into local optimality. The specific formula is as follows: (23), In the formula X global t is the global optimal solution, δ As the global search factor, SSA gradually converges during multiple iterations, and by continuously updating the position of the solution, the group gradually approaches the global optimal solution.

2. The intelligent prediction method for vehicle fuel cell life based on multi-feature index fusion according to claim 1 is characterized in that: The pretreatment in step 1 includes: Step 1-1: Perform Gaussian filtering on the sampled data to filter out noise and abnormal peaks. The Gaussian filtering is expressed by the following formula: (1), (2), (3), In the formula, K(t) represents the standard normal distribution of parameter data at time t, f(t j ) represents the filtered data, u(t j ) represents parameter data, n represents the number of parameter data, and H represents bandwidth; Step 1-2: Use the cubic spline method to perform interpolation to obtain sampling data with uniform time intervals.

3. The intelligent prediction method for vehicle fuel cell life based on multi-feature index fusion according to claim 1 is characterized in that: In step 2, voltage is selected as the health indicator. The EMD empirical mode decomposition method decomposes the voltage data into several IMFs and 1 residual according to the time scale of the voltage itself. The IMF must meet two constraints: Constraint 1: In the entire data segment, the number of extreme points and the number of zero-crossing points need to be equal or differ by at most 1; Constraint 2: At any given moment, the upper envelope formed by the local maximum and the lower envelope formed by the local minimum are averaged at 0. Assume that the PEMFC voltage is ,in is the voltage in the rth time period, the EMD empirical mode decomposition method includes the following steps: Step 2-1: Find the voltage All extreme points of , and are drawn using cubic spline interpolation The upper and lower envelopes of and ; Step 2-2: The average envelope is extracted from the average of the upper envelope and the lower envelope, expressed as , (4); Step 2-3: Using the original data Subtract the mean Get the data ; Step 2-4: Judgment Does it meet the two constraints of the IMF? If so, is the decomposed IMF, denoted as w(r). If it does not meet the requirement, then according to Re-execute steps 2-1 to 2-4, where the residual term R(r) is as follows: (5); Step 2-5: Repeat steps 2-1 to 2-4 until the residual becomes a monotonic function, the EEMD empirical mode decomposition method ends, and the voltage data is finally decomposed into k An IMF and a residual, as shown below: (6)。 4. The intelligent prediction method for vehicle fuel cell life based on multi-feature index fusion according to claim 1 is characterized in that: In step 4, when predicting the attenuation component three, the sequence model Transformer based on the attention mechanism is used for prediction. The position encoding vector added to the input of encoding and decoding in the Transformer indicates the position of the current data and the distance between different data. The position encoding formula is expressed by CPE: (24), In the formula C pos represents the position of the current data in the sample, d represents the dimension of the position encoding vector, i Represents the position index of each value. Even positions are encoded by sine and odd positions are encoded by cosine. The attention mechanism receives the input or output of the previous encoder and multiplies the received data by different weights to obtain the Q, K, and V matrices. The similarity between the data is shown in the following formula: (25), Where Q is the query matrix, K is the key matrix, QK T Calculate the attention weight of Q on V, d k is the dimension of the K matrix, which is used to normalize the attention mechanism, and softmax is the normalized exponential function; set up P(X) is the label sequence, Q(X) is the output sequence predicted by Transformer, and KL divergence is an indicator to measure the similarity of two probability distributions. Its calculation formula is as follows: (26), In the formula For Transformer, predict the i-th predicted value in the output sequence. For the label sequence The predicted value at the corresponding moment, l is the sequence length, is the KL divergence loss function of two sequences P(X) and Q(X), The smaller it is, the closer the two data distributions are. By repeatedly training the neural network, the distribution of Q(X) is approximated to P(X).

Citation Information

Patent Citations

  • Fuel cell life prediction method

    CN111310387A

  • Multi-modal fusion fuel cell system performance degradation prediction method

    CN115098999A

  • Method for predicting residual life of battery

    CN116643174A