PEM water electrolyzer life prediction method
Patent Information
- Application Number
- CN202510496480.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2026-10-23
AI Technical Summary
然而,目前的机理模型尚未完善,不易通过机理模型得到较为精确的寿命预测数据,经验模型、半经验模型也面临同样的问题
[0034]本发明公开一种PEM水电解槽寿命预测方法,该方法包括:获取PEM水电解槽的运行数据;运行数据包括:电压、电流、氢气产生速率、氧气产生速率、进水口流速、氢气温度、氧气温度等参数;对运行数据进行数据处理,得到处理数据;对所述处理后的数据进行数据降维,使用LightGBM进行特征重要度筛取,删除重要度较低得到参数;将处理数据输入至LSTM-iTransformer混合模型中,得到预测数据;预测数据用于表征PEM水电解槽寿命的时序变化;LSTM-iTransformer混合模型是采用贝叶斯优化方法,其结构包括:相互连接的LSTM Layer、Embedding Layer、Multi-Head Self-Attention、Feed-Forward Networks、Mapping Layer、Layer Normalization以及全连接层;根据预测数据确定PEM水电解槽的使用寿命;本发明能够提高水电解槽寿命预测精度。
Smart Images

Figure CN122965252A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of electrolyzer life prediction, and in particular to a method for predicting the life of a PEM water electrolyzer. Background Technology
[0002] A PEM water electrolyzer is an energy storage device that converts electrical energy into hydrogen and oxygen. It mainly consists of an anode plate, a cathode plate, a terminal block, a titanium mesh, titanium felt, a sealing ring, and a membrane electrode assembly. By applying current, water is decomposed into hydrogen at the anode and into oxygen at the cathode. During operation, the PEM water electrolyzer is affected by various factors such as oxidation, corrosion, and mechanical stress, inevitably leading to performance degradation over long-term operation, thus affecting the device's performance and lifespan. During operation, parameters such as voltage, temperature, and gas production dynamically change over time. The hydrogen production per unit time shows a decreasing trend over time. The hydrogen production per unit time can be set as an indicator of performance degradation; changes in this indicator can effectively reflect the degradation status of the electrolyzer. By setting a threshold for hydrogen production per unit time, the lifespan of the PEM water electrolyzer can be measured. Therefore, accurate lifespan prediction is crucial for optimizing operating conditions and improving system reliability.
[0003] PEM electrolyzer lifetime prediction methods are typically based on model-driven and data-driven approaches. Model-driven methods include mechanistic models, empirical models, and semi-empirical models. However, current mechanistic models are not yet perfect and it is difficult to obtain accurate lifetime prediction data using them. Empirical and semi-empirical models face the same problem. Data-driven methods are better at capturing data features when dealing with nonlinear dynamic data in time series. Deep learning achieves prediction results by learning the inherent operational rules of interactions between data. This ability makes deep learning highly robust in PEM electrolyzer lifetime prediction. However, how to improve the accuracy of PEM electrolyzer lifetime prediction based on deep learning is particularly important. Summary of the Invention
[0004] The purpose of this invention is to provide a method for predicting the lifespan of a PEM electrolyzer, so as to improve the accuracy of lifespan prediction for water electrolyzers.
[0005] To achieve the above objectives, the present invention provides the following solution:
[0006] A method for predicting the lifespan of a PEM water electrolyzer, the method comprising:
[0007] Obtain the operating data of the PEM water electrolyzer; the operating data includes parameters such as voltage, current, hydrogen production rate, oxygen production rate, inlet flow rate, hydrogen temperature, and oxygen temperature;
[0008] The time series operating parameters are collected and processed.
[0009] The processed data is then subjected to dimensionality reduction; the dimensionality-reduced data is filtered by feature importance using LightGBM, retaining parameters with higher importance and deleting those with lower importance to obtain the parameters.
[0010] The data with low-importance parameters removed is imported into the LSTM-iTransformer model to obtain prediction data; the predicted time series data is used to characterize the lifespan of the PEM water electrolyzer. The LSTM-iTransformer hybrid model is a hybrid of an improved Transformer model and LSTM, and is obtained by hyperparameter optimization using a Bayesian model. After data is processed by the LSTM layer, it enters the improved Transformer model through the Embedding layer, and then outputs the prediction results through the Mapping Layer. The iTransformer model includes: Embedding Layer, Multi-Head Self-Attention, Feed-Forward Networks, Mapping Layer, LayerNormalization, and a fully connected layer.
[0011] The predicted data is linearly fitted and compared with a set threshold. If it is below the threshold, it indicates that the end of life has been reached.
[0012] Optionally, the service life of the PEM water electrolyzer can be determined based on the predicted data.
[0013] The operational data is preprocessed to obtain processed data, specifically including:
[0014] The running data is subjected to outlier and missing value detection, and outliers are removed and missing values are added. Processed data is obtained.
[0015] The SG (Savitzky-Golay) model was used to filter the monitoring data to obtain smooth, denoised data.
[0016] The processed data is subjected to dimensionality reduction in order to reduce input costs and computational workload. LightGBM is used to screen the vital signs by importance, retaining parameters with higher importance and deleting parameters with lower importance to obtain the parameters.
[0017] Optionally, the data from which parameters with lower importance have been removed can be imported into the LSTM-iTransformer model, specifically including:
[0018] The time series data is normalized.
[0019] The normalized data is processed by setting a time window, with the data within the window used as input samples and the data after the window used as labels;
[0020] The training dataset is divided into a training set and a test set according to a set ratio;
[0021] Construct an LSTM-iTransfformer model; the LSTM-iTransfformer model includes: LSTM Layer, Embedding Layer, Multi-Head Self-Attention, Feed-Forward Networks, MappingLayer, Layer Normalization, and a fully connected layer.
[0022] The training set is input into the LSTM layer, and the update data is obtained by performing forgetting retention update processing based on the activation function;
[0023] The data is input into an embedding layer to convert the time series data into a format suitable for model processing.
[0024] The above output data is processed through an encoder-decoder architecture, where the encoder processes the input sequence and the decoder generates the prediction result.
[0025] The encoder consists of multiple identical layers stacked together, each layer containing the following sub-layers: Multi-Head Self-Attention, Add & Norm, and Feed-Forward Neural Network (FFNN);
[0026] The decoder consists of multiple identical layers stacked together, each layer containing the following sub-layers: Masked Multi-Head Attention, Encoder-Decoder Attention, Feedforward Neural Network, and Residual Connections;
[0027] The prediction results are output through a fully connected layer;
[0028] The interconnected LSTM layer, Embedding layer, Multi-Head Self-Attention, Feed-Forward Networks, Mapping Layer, Layer Normalization, and fully connected layer are used as the trained LSTM-iTransformer.
[0029] The test set is input into the LSTM-iTransformer for verification, and then determined to be the LSTM-iTransformer hybrid model.
[0030] Optionally, the objective function may include: coefficient of determination, mean square error, root mean square error, mean absolute error, and absolute percentage error.
[0031] Optionally, the expression for the objective function is: ; ; ; ; ;
[0032] Among them, R 2 The coefficient of determination is denoted by: MSE (mean squared error); RMSE (root mean squared error); MAE (mean absolute error); RMSE (percentage absolute error); N is the number of data points in the training set; and i is the index. For label data; This is the output data of the LSTM-iTransformer.
[0033] The predicted data is linearly fitted, and the fitted value is compared with the defined threshold. If the value remains below the defined threshold for a predicted period of time, the difference between the time point corresponding to that threshold and the predicted time point is the remaining lifespan of the PEM water electrolyzer. It should be noted that under steady-state current conditions, direct fitting is sufficient; however, under dynamic current conditions, only the hydrogen production rate corresponding to a specific current value is fitted.
[0034] This invention discloses a method for predicting the lifespan of a PEM water electrolyzer. The method includes: acquiring operational data of the PEM water electrolyzer; the operational data includes parameters such as voltage, current, hydrogen production rate, oxygen production rate, inlet flow rate, hydrogen temperature, and oxygen temperature; processing the operational data to obtain processed data; performing dimensionality reduction on the processed data, using LightGBM for feature importance filtering, and removing parameters with low importance; inputting the processed data into an LSTM-iTransformer hybrid model to obtain predicted data; the predicted data is used to characterize the temporal variation of the PEM water electrolyzer's lifespan; the LSTM-iTransformer hybrid model employs a Bayesian optimization method, and its structure includes interconnected LSTM layers, an Embedding layer, a Multi-Head Self-Attention layer, Feed-Forward Networks, a Mapping layer, Layer Normalization, and a fully connected layer; and determining the lifespan of the PEM water electrolyzer based on the predicted data. This invention can improve the accuracy of water electrolyzer lifespan prediction. Attached Figure Description
[0035] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments will be briefly introduced below. The drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 This is a schematic diagram of the PEM water electrolyzer life prediction method provided in an embodiment of the present invention;
[0037] Figure 2 A schematic diagram of the process for predicting the lifespan of a PEM water electrolyzer provided in an embodiment of the present invention;
[0038] Figure 3 The waveform diagram of the original hydrogen flow rate after processing by the SG model is provided in the embodiment of the present invention. Figure 3 Figure a is a comparison of waveforms before and after noise reduction under static current conditions. Figure 3 b is a comparison of waveforms before and after noise reduction under dynamic current conditions;
[0039] Figure 4 This is a schematic diagram illustrating the lifespan prediction results of the PEM water electrolyzer provided in an embodiment of the present invention. Figure 3 Figure a shows the predicted lifespan of the PEM water electrolyzer under static current conditions. Figure 3 Figure b shows the predicted lifespan of the PEM water electrolyzer under dynamic current conditions. Detailed Implementation
[0040] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.
[0041] The purpose of this invention is to provide a method for predicting the lifespan of a PEM water electrolyzer, aiming to improve the accuracy of PEM water electrolyzer lifespan prediction.
[0042] To make the above-mentioned objectives, features and advantages of the present invention clear, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0043] like Figure 1 As shown in this embodiment, the method for predicting the lifespan of a PEM water electrolyzer includes:
[0044] Step 100: Monitor the operating data of the PEM water electrolyzer, including parameters such as voltage, current, hydrogen production rate, oxygen production rate, inlet flow rate, hydrogen temperature, and oxygen temperature.
[0045] Step 200: Process the monitoring data.
[0046] Data processing is performed on the monitored operational data, specifically including:
[0047] The running data is subjected to outlier and missing value detection, and outliers are removed and missing values are filled. Then, the preprocessed data is denoised using the Savitzky-Golay (SG) model to obtain smooth, denoised data.
[0048] Step 300: Perform dimensionality reduction on the pre-filtered data, specifically including;
[0049] The preprocessed data is subjected to dimensionality reduction, and LightGBM is used to screen for the importance of vital signs, retaining parameters with higher importance and deleting those with lower importance to obtain the final parameters.
[0050] Step 400: Input the processed data into the LSTM-iTransformer hybrid model to obtain prediction data. The prediction data is used to characterize the temporal variation of the lifespan of the PEM water electrolyzer. The LSTM-iTransformer hybrid model includes: LSTMLayer, Embedding Layer, Multi-Head Self-Attention, Feed-Forward Networks, MappingLayer, Layer Normalization, and a fully connected layer.
[0051] Step 500: Perform linear fitting on the predicted data. Linear fitting means that under steady-state current conditions, a direct fit can be performed; however, under dynamic current conditions, only the hydrogen production rate corresponding to a specific current value is fitted.
[0052] Step 600: Determine the service life of the PEM water electrolyzer based on the predicted data.
[0053] The method for determining the LSTM-iTransformer hybrid model specifically includes:
[0054] Obtain time-series training data for a PEM water electrolyzer; the training data includes label data and operational data, and the label data is the prediction data corresponding to the training data.
[0055] The training data is processed to obtain the processed training data.
[0056] The time series data is normalized.
[0057] The training dataset is divided into a training set and a test set according to a set ratio.
[0058] The training set is input into the LSTM layer, and the update data is obtained by performing forgetting retention update processing based on the activation function;
[0059] The Dropout layer performs probabilistic selection and scaling on the updated data, and iteratively processes the weight data of the retained neurons based on forward and backward propagation to obtain iteratively processed data.
[0060] The data is input into an embedding layer to convert the time series data into a format suitable for model processing; the output data is then processed through an encoder-decoder architecture, where the encoder processes the input sequence and the decoder generates the prediction results.
[0061] The objective function includes: coefficient of determination, mean squared error, root mean square error, mean absolute error, and absolute percentage error. The expression for the objective function is:
[0062]
[0063]
[0064]
[0065]
[0066] Among them, R 2 The coefficient of determination is denoted by: MSE (mean squared error); RMSE (root mean squared error); MAE (mean absolute error); RMSE (percentage absolute error); N is the number of data points in the training set; and i is the index. For label data; This is the output data of the LSTM-iTransformer.
[0067] The fully connected output layer is used to output the trained data;
[0068] The interconnected LSTM layer, Embedding layer, Multi-Head Self-Attention, Feed-Forward Networks, Mapping Layer, Layer Normalization, and fully connected layer are used as the trained model.
[0069] The test set is input into the trained model for validation, resulting in a validated model.
[0070] The validated model was determined to be a hybrid LSTM-iTransformer model.
[0071] In practical applications, the method provided by this invention includes the following steps:
[0072] 1) Obtain the operating data of the PEM water electrolyzer, that is, monitor parameters such as voltage, temperature, flow rate, and pressure during the operation of the PEM water electrolyzer, and process the data.
[0073] 2) The SG algorithm is used to reduce noise in the data.
[0074] In other words, the collected data is smoothed using the Savitzky-Golay (SG) model to remove noise. SG filtering involves setting the filter window width to n = 2m + 1, and the measurement points to x = (-m, -m + 1, 0, 1…m - 1, m). A k-1 degree polynomial is used to fit the data points y within the window, resulting in n equations that form a system of k linear equations. The fitting parameters a are then determined using the least squares method, thus obtaining the filtered data, which clearly shows the data's regularity and characteristics.
[0075]
[0076] 3) In order to reduce unnecessary data monitoring, LightGBM is used to sort the multidimensional data by feature importance with hydrogen production rate as the target variable. Parameters with less impact on hydrogen production are removed and parameters with greater impact are retained. This achieves the effect of data dimensionality reduction, while also reducing monitoring costs and computer workload.
[0077] LightGBM is a machine learning method using a gradient boosting framework. A key function of its approach is feature importance ranking, which evaluates the contribution of each feature to the model's predictions. It aims to calculate the information gain each feature brings during splitting; the greater the information gain, the more important the feature. The importance is calculated based on LightGBM, where T is the total number of tree splits. It is an indicator function that takes a value of 1 when feature j is used to split t, and 0 otherwise. It is the information gain brought about by splitting t.
[0078]
[0079] 4) The training set and test set obtained after step 3) are normalized respectively, and the data are reconstructed using the sliding window technique.
[0080] 5) Divide the training dataset into a training set and a test set according to a set ratio.
[0081] 6) Input the training set processed in step 5) into the LSTM-iTransformer hybrid model for training. During training, use the first m data points to predict the data of the next point or n points, and use MSE as the loss function to optimize the model.
[0082] That is, the reconstructed data is input into the LSTM-iTransformer hybrid model for training, the previous prediction step is integrated into the original data, and the tail data is selected as the input for the next prediction. This process is repeated to perform iterative prediction.
[0083] By presetting the number of neurons in each layer, time window, batch size, prediction step size, number of iterations, initial learning rate, number of hidden layer nodes, regularization parameters, and upper and lower limits of the dropout rate, and listing each regularization parameter and optimizer, the MSE and R of hybrid models trained with different combinations of hyperparameters are compared on the test set. 2 The method is used to optimize parameters.
[0084] 7) Determine the optimal values of each hyperparameter of the LSTM-iTransformer hybrid model based on the optimization results.
[0085] To optimize the hyperparameters of the LSTM-iTransformer hybrid model, we set the number of neurons in each layer, time window, batch size, prediction stride, number of iterations, initial learning rate, number of hidden layer nodes, regularization parameters, and upper and lower limits for the dropout rate. We also listed the regularization parameters and optimizers. The objective function was to minimize the mean squared error (MSE) of the model's predictions on the test set. Multiple training rounds were used to find the optimal solution for the hyperparameters. MSE, or mean squared error, is used to evaluate the difference between the model's predictions and the true values. A smaller MSE value indicates that the model's predictions are closer to the true values.
[0086]
[0087] 8) In step 4), the data preprocessing method is as follows:
[0088] Convert the time series data to corresponding timestamps; normalize the data; convert the training data shape to (Nan, time window, number of features) to meet the input requirements of the model; train the model based on the training set data, and provide the accuracy of the trained model based on the test set.
[0089] 9) In step 6), the LSTM-RNN hybrid model includes: LSTM Layer, Embedding Layer, Multi-HeadSelf-Attention, Feed-Forward Networks, Mapping Layer, Layer Normalization, and fully connected layer.
[0090] The operation process of the LSTM neural network is as follows:
[0091]
[0092]
[0093]
[0094]
[0095]
[0096]
[0097] in, , and These represent the current input, cell state, and output vector, respectively. and It consists of the previous cell state and output vector. The input, forget, and output gates generate the output that regulates the information flow. , and The weight matrices corresponding to the gates and memory cells are: , , and and their related biases 𝑖 , 𝑓 , 𝑜 and 𝑏 𝑐 𝜎(⋅) is the Sigmoid activation function, and ⊙ represents element-wise multiplication.
[0098] The Dropout process works as follows: some neurons in the network are randomly "dropped" during each training iteration, meaning they are temporarily removed from the network and do not participate in the forward and backward propagation of the current iteration. Specifically, when input data passes through the network, the Dropout layer randomly selects a subset of neurons with a certain probability and sets the output of these neurons to zero. The purpose of this is to prevent the network from over-relying on certain specific neurons during training, thereby enhancing the model's generalization ability. During the testing phase, Dropout is usually turned off, and all neurons participate in the computation. However, to maintain consistency between the outputs during training and testing, the neuron outputs are typically scaled according to the Dropout probability. In this way, Dropout introduces randomness during training, making the model more robust and reducing the risk of overfitting to some extent.
[0099] The iTransformer operation process is as follows:
[0100]
[0101]
[0102]
[0103]
[0104]
[0105] in, This represents the time series of the i-th variable. It is the corresponding embedding vector, each It is a separate self-attention calculation. Represents a feedforward network. It is a weight matrix used to integrate multi-head outputs. These are features processed by the L-layer Transformer module. Projection is a multilayer perceptron (MLP) that outputs data to the model. and These are the mean and standard deviation, respectively. and These are learnable parameters.
[0106] When the model makes predictions, it needs to input the same m data points as during training. The model then predicts the next n+m data points, adds the predicted results to the original data, and then makes predictions based on that data. This process is repeated iteratively.
[0107] The model predicts whether the PEM electrolyzer will reach the end of its life by predicting the hydrogen production rate.
[0108] In practical applications, the hydrogen production rate of the PEM water electrolyzer is recorded when the current density is constant at 20A or fluctuates between 15 and 25A. The initial hydrogen production rate is recorded as follows: Figure 2 , Figure 3 As shown.
[0109] Based on the collected data, the process for predicting the lifespan of a PEM water electrolyzer is as follows: Figure 4 As shown.
[0110] To remove outliers and noise from the collected data, the SG filtering method is used to reduce their impact on the model. SG filtering involves setting the filter window width to n = 2m + 1, and the measurement points to x = (-m, -m + 1, 0, 1…m - 1, m). A k-1 degree polynomial is used to fit the data points within the window to y, resulting in n equations. These form a system of k linear equations, and the fitting parameters 'a' are determined using the least squares method, thus obtaining the filtered data.
[0111]
[0112] LightGBM is a machine learning method using a gradient boosting framework. A key function of its approach is feature importance ranking, which evaluates the contribution of each feature to the model's predictions. It aims to calculate the information gain each feature brings during splitting; the greater the information gain, the more important the feature. The importance is calculated based on LightGBM, where T is the total number of tree splits. It is an indicator function that takes a value of 1 when feature j is used to split t, and 0 otherwise. It is the information gain brought about by splitting t.
[0113]
[0114] The preprocessed data is then normalized to convert it into a standard normal distribution. The normalization method is as follows:
[0115]
[0116] Where x is the original data. It is the minimum value of the data. It is the maximum value of the data.
[0117] The normalized data is divided into a training set and a test set, with a ratio of 7:3.
[0118] A sliding window technique is used to reconstruct the training and test sets, with a window size of 80 and a target step size of 1. The resulting input sequence has a shape of (number of samples, 80), and the target sequence has a shape of (number of samples, 1). A multi-step prediction method is used as an example to illustrate that during model training, the model learns the relationships between the first 80 data points to predict the trend of the next data point.
[0119] The reconstructed data is input into the LSTM-iTransformer hybrid model for training. During model training, hyperparameter optimization is used to improve model accuracy. The steps for optimizing hyperparameters are as follows:
[0120] (1) Based on the data structure and data volume, set the time window, model dimension, number of multi-head attention heads, learning rate, dropout rate, and upper and lower limits of the fully connected layer for each layer.
[0121] (2) Taking the minimization of the MSE predicted by the model on the test set as the objective function, the Bayesian optimization method is used to iterate and make the objective function smaller, and to seek the optimal solution of the hyperparameters, so that the model has higher prediction accuracy.
[0122] (3) Determine the optimal values of hyperparameters such as time window, model dimension, number of multi-head attention heads, learning rate, dropout rate, and fully connected layer of the LSTM-iTransformer hybrid model based on the optimization results.
[0123] The optimized hybrid model has the following hyperparameter values under static current conditions: model dimension 32, number of multi-head attention heads 8, learning rate 0.00198, dropout rate 0.15614, and fully connected layer dimension 29; the optimized hybrid model has the following hyperparameter values under dynamic current conditions: dimension 48, number of multi-head attention heads 7, learning rate 0.00146, dropout rate 0.14236, and fully connected layer dimension 19.
[0124] After the LSTM-iTransformer hybrid model is trained, the iterative prediction method is as follows: The last 80 points of the test set are input into the model, which predicts the next 20 points. These 20 predicted points are then integrated with the previous 80 points. The next 80 points from the integrated data are then input into the model to predict the next 20 points. This iterative prediction process yields long-term prediction data. Linear fitting is then performed on the predicted data. Under a steady-state current of 20A, direct fitting is sufficient; however, under dynamic current conditions of 15-25A, only the hydrogen production rate corresponding to a current of 20A is fitted. Finally, the remaining lifespan of the PEM water electrolyzer is calculated based on the time it takes for the predicted hydrogen production rate to reach the failure voltage threshold. The calculation method is as follows:
[0125]
[0126] RUL stands for Remaining Service Life. It is the predicted time when the hydrogen production rate of the PEM water electrolyzer reaches the voltage threshold point of failure. This is the start time of the prediction. Based on the data in this example, the lifespan prediction results for the PEM water electrolyzer are as follows: Figure 4 As shown.
[0127] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for predicting the lifespan of a PEM water electrolyzer, characterized in that, The method includes: Acquire multidimensional time series data of the PEM electrolyzer, including parameters such as voltage, current, hydrogen production rate, oxygen production rate, inlet flow rate, hydrogen temperature, and oxygen temperature; The running data is processed to obtain processed data; The multidimensional parameters after processing the data are input into the LightGBM model. The hydrogen production rate is used as the target parameter. The features are ranked by importance, and parameters with low importance are removed to achieve the effect of data dimensionality reduction. The dimensionality-reduced data is imported into the LSTM-iTransformer model, and the hydrogen production rate is set as the target variable to obtain the prediction data. The prediction data is used to characterize the temporal variation of the PEM water electrolyzer's lifespan. The LSTM-iTransformer hybrid model includes: LSTM Layer, Embedding Layer, Multi-Head Self-Attention, Feed-Forward Networks, Mapping Layer, Layer Normalization, and a fully connected layer. The service life of the PEM water electrolyzer is determined based on the predicted data.
2. The method for predicting the lifespan of a PEM water electrolyzer according to claim 1, characterized in that... The data is processed, specifically including: The running data is subjected to outlier and missing value detection, and outliers are removed and missing values are added to obtain the processed data; The processed data is then filtered using the SG filtering algorithm to obtain smooth, denoised data. The data described are all time-series data, and each data point has a corresponding timestamp.
3. The method for predicting the lifespan of a PEM water electrolyzer according to claim 1, characterized in that, The method for determining the LSTM-iTransformer hybrid model specifically includes: The dimensionality-reduced dataset is normalized, and the data is reconstructed by setting a sliding window to obtain the reconstructed data. Select a time window for the time series data, use the data within the window as input samples, and use the data after the window as labels; The training data is divided into a training set and a test set according to a set ratio; Construct the LSTM-iTransformer model, which includes: LSTM Layer, Embedding Layer, Multi-HeadSelf-Attention, Feed-Forward Networks, Mapping Layer, Layer Normalization, and fully connected layers. The training set is input into the LSTM layer, and an update process based on the activation function is performed to retain the forgotten data, thereby obtaining the updated data; The data is input into an embedding layer to convert the time series data into a format suitable for model processing. The above output data is processed through an encoder-decoder architecture, where the encoder processes the input sequence and the decoder generates the prediction result. The test set is input into the LSTM-iTransformer for verification, and then determined to be the LSTM-iTransformer hybrid model.
4. The method for predicting the lifespan of a PEM electrolyzer according to claim 3, characterized in that... The objective function includes: coefficient of determination, mean square error, root mean square error, mean absolute error, and absolute percentage error.
5. The method for predicting the lifespan of a PEM water electrolyzer according to claim 4, characterized in that, The expression for the objective function is: ; ; ; ; ; Among them, R 2 The coefficient of determination is denoted by: MSE (mean squared error); RMSE (root mean squared error); MAE (mean absolute error); RMSE (percentage absolute error); N is the number of data points in the training set; and i is the index. For label data; Output data for the model.