Method and device for predicting remaining service life of proton exchange membrane fuel cell

Through i Transformer time series model and variational modal decomposition technology, the problems of complexity and large calculation amount of fuel cell life prediction are solved, and accurate life prediction is achieved without fully understanding the aging mechanism, simplifying the calculation process.

CN119128432APending Publication Date: 2024-12-13FUJIAN INST OF RES ON THE STRUCTURE OF MATTER CHINESE ACAD OF SCI
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411165561.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The existing fuel cell life prediction methods are complex and have a large amount of calculation, making it difficult to accurately predict the fuel cell aging mechanism without fully understanding the fuel cell aging mechanism.

Method used

Using the i Transformer time series model, the noise reduction filtering process and variational modal decomposition are obtained by acquiring the fuel cell data set, and the modal decomposition parameters are optimized using evolutionary algorithms to build a multi-head attention layer and feedforward network for life prediction.

Benefits of technology

It is realized that the time series characteristics are accurately captured without fully understanding the aging mechanism of fuel cell, reducing the calculation amount and improving the accuracy and simplicity of life prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128432A_ABST
    Figure CN119128432A_ABST
Patent Text Reader

Abstract

The invention provides a method and device for predicting the remaining service life of a proton exchange membrane fuel cell, and belongs to the technical field of fuel cell service life prediction.The method comprises the steps that a training set and a test set are obtained; the method comprises the following steps: obtaining an effective data set, decomposing the effective data set by adopting variational mode decomposition, and optimizing mode decomposition parameters by utilizing an evolutionary algorithm in the process so as to obtain a plurality of sub-data sets with different frequencies; constructing an i Transform time sequence model, and training the model by using a plurality of sub-data sets as input to obtain an optimal model; and S3, testing the optimal model obtained in the step S3 by using a test set, and taking RMSE and MAPE as indexes of the evaluation model. According to the invention, the residual service life of the fuel cell can be accurately predicted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the rapid increase in population and the growth in energy demand, renewable energy as one of the important sources of clean energy has attracted more and more attention. Proton Exchange Membrane Fuel Cell (PEMFC) is a clean, efficient and fast-responding and start-up energy conversion device with broad application prospects in many fields such as new energy vehicles, mobile devices and military research.

[0003] However, long-term operation of PEMFC will cause the performance of the cell stack to decay and the voltage to drop, which will cause temporary or permanent degradation of the fuel cell. Moreover, the degradation of the fuel cell is irreversible, so the fuel cell that drops to a certain standard will be scrapped. Therefore, life prediction is very important. The remaining useful life prediction (RUL) of PEMFC is conducive to optimizing performance, reducing operating costs and risks. By accurately predicting the life of PEMFC, the system degradation trend can be discovered early, and corresponding maintenance and management strategies can be formulated to improve the reliability and stability of the system. According to the annual progress report on fuel cells published by the U.S. Department of Energy, the performance degradation of commercial fuel cells cannot exceed 10%, which is used to evaluate the durability of fuel cells.

[0004] Usually the RUL of a fuel cell is defined as: RUL(t) = t EoL -t pre , where t EoL represents the time when the signal first reaches the EoL threshold, t preRepresents the time when the prediction starts. At present, there are three types of methods widely used for fuel cell life prediction. The first type is the model-driven method. This method requires familiarity with the internal structure and degradation principle of the fuel cell system, the establishment of mathematical models and state equations, and the established model needs to be able to describe the internal composition of the fuel cell system, the energy conversion process and the related issues of reaction kinetics. Combined with the monitoring data of the fuel cell system, the remaining service life of the system is inferred through mathematical models. Although this type of method can better understand the working principle and degradation law of the system, it is very difficult to establish a suitable mathematical model because the internal structure of the fuel cell is extremely complex and has complex characteristics of multiple physical fields and multiple scales. The second type is the data-driven method. This type of method does not require understanding of the complex mechanism relationship inside the fuel cell. It mainly relies on statistical analysis, machine learning or deep learning technologies to directly learn the performance degradation law and trend of the system from the aging data to achieve the purpose of prediction. Data-driven methods mainly include artificial neural networks (ANN), recursive neural networks (RNN), support vector machines (SVM) and echo state networks (ESN). However, the collection of fuel cell aging data is an extremely difficult process, and these data are difficult to obtain, while data-based methods require a large amount of data. The third category is the hybrid drive method, which combines the advantages of model-driven and data-driven methods, can balance the complexity of the model and the calculation accuracy, and the method is highly robust. However, the increase in algorithms will increase the amount of calculation and the complexity of the model will increase accordingly. Summary of the invention

[0005] The purpose of the present invention is to provide a method and device for predicting the remaining service life of a proton exchange membrane fuel cell. The model adopted is simpler and the calculation amount is smaller, but the remaining service life of the fuel cell can still be accurately predicted.

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

[0007] A method for predicting the remaining service life of a proton exchange membrane fuel cell comprises the following steps:

[0008] Step S1, obtaining a fuel cell data set, and obtaining a feature data set from the data set, and dividing the feature data set into a training set and a test set;

[0009] Step S2, performing denoising and filtering on the training set to obtain a valid data set, and using variational mode decomposition to decompose the valid data set. In the process, an evolutionary algorithm is used to optimize the mode decomposition parameters to obtain multiple sub-data sets with different frequencies;

[0010] Step S3, constructing an i Transformer time series model, and using multiple sub-datasets as input to train the model, the model includes an embedding layer, multiple blocks and a linear projection layer, the block includes a multi-head attention layer, a normalization layer, and a feedforward network, each sub-dataset is stacked to form a multi-dimensional array, the multi-dimensional array is tokenized and input into the input embedding layer of each block respectively, the output of the embedding layer is input into the multi-layer attention layer, the output of the multi-head attention layer is input into the normalization layer, the output of the normalization layer is input into the feedforward network, the feedforward network of each block passes through the linear projection layer to obtain the final prediction result, and the parameters of the model are optimized by the loss function of the predicted value and the true value to obtain the optimal model;

[0011] Step S4: Use the test set to test the optimal model obtained in step S3, and use RMSE and MAPE as indicators for evaluating the model.

[0012] Furthermore, in step S1, the fuel cell data set is a fuel cell data set released by the French Fuel Cell Laboratory in 2014. Multiple features are extracted from the data set, and relationship models between features and time are established respectively. The voltage that has an irreversible downward trend over time and is highly nonlinear is extracted as a feature, that is, the feature data set is the voltage data set in the fuel cell data set.

[0013] Furthermore, in step S2, performing noise reduction filtering on the training set to obtain a valid data set specifically includes the following steps:

[0014] Step S21, using a wavelet function to perform noise reduction on the training set, the wavelet function adopts the db4 wavelet type, and the decomposition layer number is 1;

[0015] Step S22, processing the data processed in step S21 by moving average filtering to remove abnormal values;

[0016] Step S23, resampling the data processed in step S22.

[0017] Furthermore, in step S2, the modal decomposition parameters include a penalty factor α and a decomposition number k.

[0018] Furthermore, the optimization of modal decomposition parameters using an evolutionary algorithm specifically includes the following steps:

[0019] Step S241, creating an initial population including N individuals, each individual representing a set of modal decomposition parameters, namely, a penalty factor α and a decomposition number k;

[0020] Step S242, using the vmd_decomposition function to perform variational mode decomposition and return a reconstruction error, the inverse of which is used as a fitness value;

[0021] Step S243: Use the roulette wheel selection method to randomly select individuals according to their fitness values ​​to enter the next generation, wherein individuals with higher fitness values ​​have a greater probability of being selected;

[0022] Step S244, randomly select two individuals from the selected individuals as parents, exchange part of their genes to generate new individuals, the part of the genes is the penalty factor α and the decomposition number k;

[0023] Step S245: randomly change a parameter value in the new individual with a set probability to increase the diversity of the population and avoid falling into the local optimum, and finely adjust the individual parameter value through local search, and the adjustment process is to optimize near the current parameter value;

[0024] Step S46, replacing the individual with the worst fitness value in the population with a new individual to form a new generation population;

[0025] Step S47, executing steps S28 to S30 in each generation population until a preset number of iterations or other termination conditions are reached, and finally returning the individual with the highest fitness value, which is the optimal modal decomposition parameter.

[0026] Furthermore, in step S1, the first 60% of the feature data set is used as a training set, and the last 40% is used as a test set, wherein the training set also includes a validation set.

[0027] The present invention is also achieved through the following technical solutions:

[0028] A device for predicting the remaining service life of a proton exchange membrane fuel cell, comprising:

[0029] Data acquisition module: used to acquire a fuel cell data set, obtain a feature data set from the data set, and divide the feature data set into a training set and a test set;

[0030] Data decomposition module: used to perform noise reduction and filtering on the training set to obtain a valid data set, and use variational mode decomposition to decompose the valid data set. In the process, the evolutionary algorithm is used to optimize the mode decomposition parameters to obtain multiple sub-data sets with different frequencies;

[0031] Model building and training module: construct the i Transformer time series model and use multiple sub-datasets as input to train the model. The model includes an embedding layer, multiple blocks and a linear projection layer. The blocks include a multi-head attention layer, a normalization layer and a feedforward network. Each sub-dataset is stacked to form a multi-dimensional array. The multi-dimensional array is tokenized and input into the input embedding layer of each block. The output of the embedding layer is input into the multi-layer attention layer. The output of the multi-head attention layer is input into the normalization layer. The output of the normalization layer is input into the feedforward network. The feedforward network of each block passes through the linear projection layer to obtain the final prediction result. The parameters of the model are optimized through the loss function of the predicted value and the true value to obtain the optimal model.

[0032] Testing module: Use the test set to test the optimal model, and use RMSE and MAPE as indicators to evaluate the model.

[0033] The present invention has the following beneficial effects:

[0034] 1. The present invention first obtains a training set and a test set based on a fuel cell data set, then performs noise reduction filtering on the training set and then uses variational mode decomposition to obtain multiple sub-data sets of different frequencies. In the process, an evolutionary algorithm is used to optimize the mode decomposition parameters to obtain modal components that are easier to process, and then an i Transformer time series model is constructed. The model is trained with multiple sub-data sets as input to obtain an optimal model, and finally the optimal model is tested with a test set. In this way, even if the aging mechanism of the fuel cell is not fully understood, local and global features can be effectively captured from the nonlinear features of the aging series data, and the correlation of multivariate data can be learned, thereby capturing the characteristics of the time series, thereby achieving accurate remaining life prediction. The constructed i Transformer time series model can better capture the characteristics of the time series, and the model is simpler and has a smaller amount of calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The present invention is further described in detail below with reference to the accompanying drawings.

[0036] Figure 1 It is a flow chart of the present invention.

[0037] Figure 2 This is a schematic diagram of the feature data set after noise reduction and filtering processing of the present invention.

[0038] Figure 3 This is a schematic diagram of the results of variational mode decomposition performed in the present invention.

[0039] Figure 4 It is a structural schematic diagram of the i Transformer model of the present invention.

[0040] Figure 5 It is a curve comparison diagram of the predicted voltage and the actual voltage obtained by the present invention. DETAILED DESCRIPTION

[0041] like Figure 1 As shown, the remaining service life prediction method of a proton exchange membrane fuel cell comprises the following steps:

[0042] Step S1, obtaining a fuel cell data set, and obtaining a feature data set from the data set, and dividing the feature data set into a training set and a test set;

[0043] Specifically, Figure 2 As shown in the figure, the fuel cell data set is a fuel cell data set released by the French Fuel Cell Laboratory in 2014. Multiple features are extracted from the data set, and the relationship models between the features and time are established respectively. It is found that the voltage shows an irreversible downward trend and is highly nonlinear, which is consistent with the attenuation trend of the fuel cell. Therefore, it is determined to use the voltage as a health indicator for evaluating the health status of the fuel cell, that is, the voltage is used as a feature, that is, the feature data set is the voltage data set in the fuel cell data set.

[0044] The first 60% of the feature data set is used as the training set and validation set, and the last 40% is used as the test set. Among them, the first 60% of the feature data set is divided into the training set and the validation set in a ratio of 7:3.

[0045] Step S2: Perform denoising and filtering on the training set to obtain a valid data set, and use variational mode decomposition to decompose the valid data set. In the process, the evolutionary algorithm is used to optimize the mode decomposition parameters to obtain multiple sub-data sets with different frequencies, such as Figure 3 As shown;

[0046] The specific steps include:

[0047] Step S21, using a wavelet function to perform noise reduction processing on the training set, the wavelet function adopts the wavelet type of db4, the decomposition layer number is 1, and the detail coefficient is thresholded, and this processing process is the existing technology;

[0048] Step S22: The data processed by step S22 still has some abnormal values, so the data processed by step S21 is processed by moving average filtering to remove the abnormal values. Figure 2 As shown, the window size of the moving average filter in this embodiment is 25;

[0049] Step S23: To reduce the amount of calculation, resample the data processed in step S22. In this embodiment, the sampling interval is 1 hour.

[0050] Step S24, using variational mode decomposition to decompose the effective data set, so as to decompose the complex time series signal into several modal components, that is, to obtain multiple sub-data sets with different frequencies. The performance of variational mode decomposition is determined by the penalty factor α and the decomposition number k. Therefore, the evolutionary algorithm is used to optimize these two parameters to obtain the best parameter combination, so that the sub-data set obtained by variational mode decomposition is the optimal decomposition result;

[0051] Among them, using evolutionary algorithm to optimize the penalty factor α and the decomposition number k specifically includes:

[0052] Step S241, creating an initial population including N individuals, each individual represents a set of modal decomposition parameters, namely, penalty factor α and decomposition number k, these parameters are randomly generated within a reasonable range to ensure the diversity of the initial population;

[0053] Step S242, using the vmd_decomposition function to perform variational mode decomposition and return the reconstruction error, the inverse of the error is used as the fitness value, the smaller the error, the higher the fitness value;

[0054] Step S243: Use the roulette wheel selection method to randomly select individuals according to their fitness values ​​to enter the next generation, wherein individuals with higher fitness values ​​have a greater probability of being selected;

[0055] Step S244, randomly select two individuals from the selected individuals as parents, exchange part of their genes to generate new individuals, the part of the genes is the penalty factor α and the decomposition number k;

[0056] Step S245: randomly change a parameter value in the new individual with a set probability to increase the diversity of the population and avoid falling into the local optimum, and finely adjust the individual parameter value through local search to further improve the individual fitness. The adjustment process is to optimize near the current parameter value;

[0057] Step S46, replacing the individual with the worst fitness value in the population with a new individual to form a new generation population;

[0058] Step S47, executing steps S28 to S30 in each generation of the population until a preset number of iterations or other termination conditions are reached, and finally returning the individual with the highest fitness value, which is the optimal modal decomposition parameter.

[0059] Step S3: construct an i Transformer time series model and train the model using multiple sub-datasets as input, such as Figure 4As shown, the model includes an embedding layer, N blocks and a linear projection layer. The block includes a multi-head attention layer, a normalization layer, and a feedforward network. Each sub-dataset is stacked to form a multi-dimensional array, which is the model input. The multi-dimensional array is tokenized and input into the input embedding layer of each block respectively. The output of the embedding layer is input into the multi-layer attention layer to learn the mapping of multivariate correlations. Since the i Transformer time series model regards each feature as an independent process, the multi-head attention mechanism can more effectively learn the correlation between feature pairs. The output of the multi-head attention layer is input into the normalization layer. Normalization is performed between timestamps, which helps the model to better handle non-stationary sequences such as fuel cells and reduce noise in the sequence. The output of the normalization layer is input into the feedforward network to learn the deep representation of the incoming token. Finally, each block will learn different representations of the input sequence. The feedforward network of each block obtains the final prediction result after passing through the linear projection layer. The parameters of the model are optimized by the loss function of the predicted value and the true value to obtain the optimal model. In this embodiment, the parameters are set as follows: the width-size is set to 10, the epoch is set to 150, and the learning rate I r is set to 0.001 and d_attn is set to 20.

[0060] Step S4: Use the test set to test the optimal model obtained in step S3, and use RMSE (root mean square error) and MAPE (mean absolute percentage error) as indicators for evaluating the model.

[0061] Correspondingly, the remaining service life prediction device of the proton exchange membrane fuel cell includes the following modules:

[0062] Data acquisition module: used to acquire a fuel cell data set, obtain a feature data set from the data set, and divide the feature data set into a training set and a test set;

[0063] Data decomposition module: used to perform noise reduction and filtering on the training set to obtain a valid data set, and use variational mode decomposition to decompose the valid data set. In the process, the evolutionary algorithm is used to optimize the mode decomposition parameters to obtain multiple sub-data sets with different frequencies;

[0064] Model building and training module: construct the i Transformer time series model and use multiple sub-datasets as input to train the model. The model includes an embedding layer, multiple blocks and a linear projection layer. The blocks include a multi-head attention layer, a normalization layer and a feedforward network. Each sub-dataset is stacked to form a multi-dimensional array. The multi-dimensional array is tokenized and input into the input embedding layer of each block. The output of the embedding layer is input into the multi-layer attention layer. The output of the multi-head attention layer is input into the normalization layer. The output of the normalization layer is input into the feedforward network. The feedforward network of each block passes through the linear projection layer to obtain the final prediction result. The parameters of the model are optimized through the loss function of the predicted value and the true value to obtain the optimal model.

[0065] Testing module: Use the test set to test the optimal model, and use RMSE and MAPE as indicators to evaluate the model.

[0066] The model is trained and tested on the Python platform, and the curve comparison between the predicted voltage and the actual voltage is as follows: Figure 5 As shown in the figure, the RMSE is 0.0030 and the MAPE is 0.0785%. The error is within a small range, which shows that the prediction accuracy is high.

[0067] The above description is only a preferred embodiment of the present invention, and therefore cannot be used to limit the scope of implementation of the present invention. That is, equivalent changes and modifications made according to the scope of the patent application of the present invention and the contents of the specification should still fall within the scope covered by the patent of the present invention.

Claims

1. A method for predicting the remaining service life of a proton exchange membrane fuel cell, characterized in that: The steps include: Step S1, obtaining a fuel cell data set, and obtaining a feature data set from the data set, and dividing the feature data set into a training set and a test set; Step S2, performing denoising and filtering on the training set to obtain a valid data set, and using variational mode decomposition to decompose the valid data set. In the process, an evolutionary algorithm is used to optimize the mode decomposition parameters to obtain multiple sub-data sets with different frequencies; Step S3, constructing an iTransformer time series model, and using multiple sub-datasets as input to train the model, the model includes an embedding layer, multiple blocks and a linear projection layer, the block includes a multi-head attention layer, a normalization layer, and a feedforward network, each sub-dataset is stacked to form a multi-dimensional array, the multi-dimensional array is tokenized and input into the input embedding layer of each block respectively, the output of the embedding layer is input into the multi-layer attention layer, the output of the multi-head attention layer is input into the normalization layer, the output of the normalization layer is input into the feedforward network, the feedforward network of each block passes through the linear projection layer to obtain the final prediction result, and the parameters of the model are optimized by the loss function of the predicted value and the true value to obtain the optimal model; Step S4: Use the test set to test the optimal model obtained in step S3, and use RMSE and MAPE as indicators for evaluating the model.

2. A method for predicting the remaining useful life of a proton exchange membrane fuel cell according to claim 1, characterized in that: In step S1, the fuel cell data set is a fuel cell data set released by the French Fuel Cell Laboratory in 2014. Multiple features are extracted from the data set, and relationship models between features and time are established respectively. The voltage that has an irreversible downward trend over time and is highly nonlinear is extracted as a feature, that is, the feature data set is the voltage data set in the fuel cell data set.

3. The method for predicting the remaining service life of a proton exchange membrane fuel cell according to claim 1, characterized in that: In step S2, performing noise reduction filtering on the training set to obtain a valid data set specifically includes the following steps: Step S21, using a wavelet function to perform noise reduction on the training set, the wavelet function adopts the db4 wavelet type, and the decomposition layer number is 1; Step S22, processing the data processed in step S21 by moving average filtering to remove abnormal values; Step S23, resampling the data processed in step S22.

4. A method for predicting the remaining service life of a proton exchange membrane fuel cell according to claim 3, characterized in that: In step S2, the modal decomposition parameters include a penalty factor α and a decomposition number k.

5. A method for predicting the remaining useful life of a proton exchange membrane fuel cell according to claim 4, characterized in that: The method of optimizing the modal decomposition parameters by using an evolutionary algorithm specifically comprises the following steps: Step S241, creating an initial population including N individuals, each individual representing a set of modal decomposition parameters, namely, a penalty factor α and a decomposition number k; Step S242, using the vmd_decomposition function to perform variational mode decomposition and return a reconstruction error, the inverse of which is used as a fitness value; Step S243: Use the roulette wheel selection method to randomly select individuals according to their fitness values ​​to enter the next generation, wherein individuals with higher fitness values ​​have a greater probability of being selected; Step S244, randomly select two individuals from the selected individuals as parents, exchange part of their genes to generate new individuals, the part of the genes is the penalty factor α and the decomposition number k; Step S245: randomly change a parameter value in the new individual with a set probability to increase the diversity of the population and avoid falling into the local optimum, and finely adjust the individual parameter value through local search, and the adjustment process is to optimize near the current parameter value; Step S46, replacing the individual with the worst fitness value in the population with a new individual to form a new generation population; Step S47, executing steps S28 to S30 in each generation population until a preset number of iterations or other termination conditions are reached, and finally returning the individual with the highest fitness value, which is the optimal modal decomposition parameter.

6. A method for predicting the remaining useful life of a proton exchange membrane fuel cell according to any one of claims 1 to 5, characterized in that: In step S1, the first 60% of the feature data set is used as a training set, and the last 40% is used as a test set, wherein the training set also includes a verification set.

7. A device for predicting the remaining useful life of a proton exchange membrane fuel cell, characterized in that: include: Data acquisition module: used to acquire a fuel cell data set, obtain a feature data set from the data set, and divide the feature data set into a training set and a test set; Data decomposition module: used to perform noise reduction and filtering on the training set to obtain a valid data set, and use variational mode decomposition to decompose the valid data set. In the process, the evolutionary algorithm is used to optimize the mode decomposition parameters to obtain multiple sub-data sets with different frequencies; Model building and training module: construct an iTransformer time series model and use multiple sub-datasets as input to train the model. The model includes an embedding layer, multiple blocks and a linear projection layer. The blocks include a multi-head attention layer, a normalization layer and a feedforward network. Each sub-dataset is stacked to form a multi-dimensional array. The multi-dimensional array is tokenized and input into the input embedding layer of each block. The output of the embedding layer is input into the multi-layer attention layer. The output of the multi-head attention layer is input into the normalization layer. The output of the normalization layer is input into the feedforward network. The feedforward network of each block passes through the linear projection layer to obtain the final prediction result. The parameters of the model are optimized through the loss function of the predicted value and the true value to obtain the optimal model. Testing module: Use the test set to test the optimal model, and use RMSE and MAPE as indicators to evaluate the model.

Citation Information

Cited By

  • Method and system for predicting remaining service life of fuel cell based on long-term operation data

    CN119829996A

  • PEMFC degradation prediction method and system based on spatial dynamic non-stationary reconstruction attention

    CN120048947A