BiLSTM-based PEM electrolytic cell chamber voltage prediction method
By using the BiLSTM model to process noise and extract key features, the problem of low accuracy of existing prediction methods over long periods is solved, enabling accurate prediction of the voltage of the PEM electrolyzer cell chamber and supporting efficient operation and maintenance.
Patent Information
- Application Number
- CN202511629974.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-08
- Publication Date
- 2026-02-27
AI Technical Summary
Existing prediction methods are sensitive to noise and have difficulty accurately capturing the degradation characteristics of PEM electrolyzers over long periods, resulting in low prediction accuracy and failing to meet the requirements of efficient operation and maintenance.
A BiLSTM-based prediction method is adopted, which constructs a voltage prediction model for PEM electrolyzer cells by data preprocessing, feature selection using Pearson correlation coefficient, bidirectional time series feature extraction, and iterative prediction mechanism, thereby reducing noise interference and improving model adaptability.
It enables accurate prediction of the cell voltage of PEM electrolyzers, supports accurate prediction of electrolyzer degradation trends and remaining lifespan, and ensures safe and stable operation of the equipment.
Smart Images

Figure CN121579880A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of proton exchange membrane electrolyzer lifetime prediction, and specifically to a method for predicting the cell voltage of a PEM electrolyzer based on BiLSTM. Background Technology
[0002] Proton exchange membrane (PEM) electrolyzers, as highly efficient and green hydrogen production equipment, offer advantages such as fast response, high hydrogen purity, compatibility with renewable energy sources, and all-solid-state, emission-free operation, aligning with the needs of low-carbon development. However, their large-scale commercialization is constrained by high equipment costs, insufficient durability of key materials, and complex operation and maintenance. During operation, natural aging and dynamic operating conditions accelerate performance degradation, shortening lifespan and increasing risks. When the electrolyzer degrades, more electrical energy is required to overcome reaction resistance to maintain the same hydrogen production efficiency, ultimately manifesting as an increase in chamber voltage. Conversely, if the voltage rises abnormally without other operational interferences (such as normal temperature and flow rate), it can be inferred that key materials have degraded. Therefore, voltage changes are directly linked to the degradation process.
[0003] Predicting performance degradation trends is crucial for ensuring safe operation. Existing prediction methods include three categories: model-driven, data-driven, and hybrid-driven. Among them, model-driven methods are difficult to model due to the complex nonlinear characteristics of multivariable and multi-stage systems. Although data-driven methods avoid the hot topic of mechanism modeling, they suffer from data noise and missing data affecting input quality. Furthermore, traditional time series models have difficulty accurately capturing long-term degradation characteristics. Therefore, there is an urgent need for a prediction method that can effectively handle noise, extract key features, and adapt to time series changes to improve accuracy and reliability and support efficient operation and maintenance.
[0004] Predicting performance degradation trends is crucial for ensuring safe operation. Existing prediction methods fall into two categories: model-driven and data-driven. Model-driven methods are challenging and computationally expensive due to the complex nonlinear characteristics of multivariable and multi-stage systems. Data-driven methods, on the other hand, attempt to bypass the complexity of mechanistic modeling and directly construct prediction models using operational data. The paper "Degradation prediction of PEM water electrolyzer under constant and start-stop loads based on CNN-LSTM" (see: Xu B, Ma W, Wu W, et al. Degradationprediction of PEM water electrolyzer under constant and start-stop loads based on CNN-LSTM[J]. Energy and AI, 2024, 18: 100420.) proposes a prediction method based on a CNN-LSTM hybrid model to address the degradation prediction of electrolyzers under constant and start-stop loads. However, this model heavily relies on complete and high-quality input data, lacking robustness to common data noise and missing features in real-world engineering scenarios. Furthermore, its model structure is insufficient in capturing long-term, slowly changing degradation trends, impacting the accuracy of long-term predictions. Therefore, a prediction method that can effectively handle noise, extract key features, and adapt to temporal changes is urgently needed to improve accuracy and reliability, supporting efficient operation and maintenance. Summary of the Invention
[0005] To address the problems of high data noise interference, low long-term prediction accuracy, and poor model adaptability to actual operation and maintenance requirements in existing technologies, this invention provides a BiLSTM-based method for predicting the cell voltage of PEM electrolyzers. Through standardized data preprocessing, bidirectional time-series feature extraction, and iterative prediction mechanism, it achieves accurate prediction of the cell voltage of PEM electrolyzers, laying the foundation for accurate prediction of electrolyzer degradation trends and remaining lifespan.
[0006] The technical solution adopted in this invention is as follows: a method for predicting the cell voltage of a PEM electrolyzer based on BiLSTM, characterized in that the method specifically includes the following steps: Step 1: Obtain historical operating parameter data of the target PEM electrolyzer over a certain period of time; Historical operating parameter data of PEM electrolyzers include cell voltage U, current density I, inlet temperature T1, outlet temperature T2, inlet flow rate Q1, and outlet flow rate Q2. Each data point is a time series data of continuous monitoring within the same time period. Step 2: Filter the historical working parameter data from Step 1 to obtain the original dataset; Step 3: Based on the original dataset obtained in Step 2, select the cell voltage data of the electrolyzer as the detection index, and calculate the Pearson correlation coefficient between each historical working parameter in the original dataset and the cell voltage of the electrolyzer in turn based on the Pearson correlation coefficient method. Step 4: Based on the Pearson correlation coefficient calculated in Step 3, select historical operating parameter data with a Pearson correlation coefficient of not less than 0.6 from the original dataset as relevant operating parameter data. Together with the cell voltage data of the electrolytic cell, these data constitute the training data. Normalize the relevant operating parameter data and the cell voltage data of the electrolytic cell in the training data. Then, divide the data into training set and validation set according to time sequence, with at least 60% of the data being the first set. Step 5: Using the training set and validation set from Step 4, train the BiLSTM-based prediction model to obtain the optimal prediction model. The training process of the BiLSTM-based prediction model is as follows: Step 5.1: Initialize the BiLSTM-based prediction model. Use random assignment to initialize the weight matrix and bias terms of the prediction model, and set the hyperparameters of the prediction model. The specific settings of the hyperparameters are as follows: the number of hidden layer nodes is 100, the maximum number of training epochs is 500, the gradient threshold is 1, the initial learning rate is 0.001, the learning rate descent period is 125, and the learning rate descent factor is 0.05. Step 5.2: Take the relevant working parameter data at a sampling time point t in the training set, the cell voltage data of the electrolytic cell at sampling time point t, and the cell voltage data of the electrolytic cell at sampling time point t-1 as a training sample at sampling time point t, and input them into the prediction model. The prediction model outputs the predicted data of the cell voltage data of the electrolytic cell at time point t+1. The cell voltage data value of the electrolytic cell at time point t+1 in the training set is used as the reference data for the output value of the prediction model. Let N be the number of sampling time points in the training set. The prediction model predicts the cell voltage data of the electrolytic cell for N-2 sampling time points in the training set, using the mean squared error as the loss function. The weight matrix and bias term of the prediction model are updated once through backpropagation based on the training loss of n training samples in a batch of the training set, completing one training cycle. Then, the next batch of training samples is input into the prediction model after one training cycle, and this process is repeated until the last batch of training samples in the training set is used, completing one training round. Then, the process of inputting a batch of training samples from the training set is repeated... The training process is repeated continuously, with the inputs going into the prediction model after one round of training. After each round of training, the training samples from the validation set are sequentially input into the prediction model, and the root mean square error (RMSE) of the prediction model on the validation set is calculated. Training is complete when the RMSE on the validation set is less than a preset threshold or the maximum number of training rounds is reached. If the RMSE on the validation set is not less than the preset threshold when the maximum number of training rounds is reached, the hyperparameter values in step 5.1 are adjusted, and the process in step 5.2 is repeated until the RMSE on the validation set is less than the preset threshold. The current prediction model is then considered the optimal prediction model. Step 6: To obtain the predicted value of the cell voltage at time point K for a PEM electrolyzer of the same model as the target PEM electrolyzer in Step 1, relevant operating parameter data and cell voltage data of the electrolyzer are obtained for a certain time period preceding time point K. These are first filtered using the method described in Step 2, then normalized using the method described in Step 4. The relevant operating parameter data at the (K-1)th sampling time point, the cell voltage data at the (K-1)th sampling time point, and the cell voltage data at the (K-2)th sampling time point are then input into the optimal prediction model in Step 5 to obtain the predicted cell voltage at time point K. This predicted data is then inversely normalized to obtain the predicted value of the cell voltage at time point K.
[0007] Compared with existing technologies, the beneficial effects of this invention are as follows: First, this invention collects historical degradation data of PEM electrolyzers, preprocesses the acquired historical degradation data, and then performs resampling and Gaussian filtering to reduce noise interference and improve the quality of input data. Next, based on the Pearson correlation coefficient method, it selects aging parameters highly correlated with cell voltage as correlation factors, eliminating parameters not strongly correlated with degradation and reducing redundant information interference to the model. Then, it constructs a BiLSTM neural network model including forward LSTM and backward LSTM, inputs the filtered correlation factor data into the model for repeated training, and obtains a PEM electrolyzer cell voltage prediction model. Finally, it outputs the future voltage through an iterative prediction mechanism. This invention's prediction method lays the foundation for accurate prediction of degradation trends and remaining lifespan of PEM electrolyzers, especially those operating for long periods, helping to achieve early warning of electrolyzer performance degradation and ensuring the safe, stable, and long-term operation of the equipment. The method of this invention adopts a BiLSTM neural network model. By combining forward LSTM layers and backward LSTM layers, it captures the positive degradation trend and reverse working condition feedback features of time series data respectively. The bidirectional features are then spliced and fused through hidden layers, which can effectively enhance the ability to extract long-period time series features, thereby improving the predictive adaptability of the model under dynamic working condition coupling. Attached Figure Description
[0008] Figure 1 This is a flowchart illustrating the steps of an embodiment of the method for predicting the cell voltage of a PEM electrolyzer based on BiLSTM according to the present invention.
[0009] Figure 2 This is an embodiment of the present invention, which describes a method for predicting the cell voltage of a PEM electrolyzer based on BiLSTM. The data curves of the cell voltage before and after filtering processing are shown in the figure.
[0010] Figure 3 This is a comparison chart of the prediction results obtained by the prediction method of this invention and the prediction method using LSTM and GRU models when 40% of the training data is used as the training set.
[0011] Figure 4 This is a comparison chart of the prediction results obtained by the prediction method of this invention (BILSTM) and the prediction method using LSTM and GRU models when 50% of the training data is used as the training set.
[0012] Figure 5 This is a comparison chart of the prediction results obtained by the prediction method of this invention (BILSTM) and the prediction method using LSTM and GRU models when 60% of the training data is used as the training set.
[0013] Figure 6This is a comparison chart of the prediction results obtained by the prediction method of this invention (BILSTM) and the prediction method using LSTM and GRU models when 70% of the training data is used as the training set.
[0014] Figure 7 This is a comparison chart of the mean absolute error (MAE) of the prediction results obtained by the prediction method of this invention (BILSTM) and the prediction method using LSTM and GRU models when different proportions of training data are used as training sets.
[0015] Figure 8 This is a comparison chart of the mean absolute percentage error (MAPE) of the prediction results obtained by the prediction method of this invention (BILSTM) and the prediction method using LSTM and GRU models when different proportions of training data are used as training sets.
[0016] Figure 9 This is a comparison chart of the root mean square error (RMSE) of the prediction results obtained by the prediction method of this invention (BILSTM) and the prediction method using LSTM and GRU models when different proportions of training data are used as training sets. Detailed Implementation
[0017] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0018] This invention provides a method for predicting the cell voltage of a PEM electrolyzer based on BiLSTM. See [link to relevant documentation]. Figure 1 The method specifically includes the following steps: Step 1: Obtain historical operating parameter data of the target PEM electrolyzer over a certain period of time.
[0019] In step 1, the historical operating parameter data of the PEM electrolyzer includes the cell voltage U, current density I, inlet temperature T1, outlet temperature T2, inlet flow velocity Q1, and outlet flow velocity Q2. Each data is a time series data of continuous monitoring within the same time period.
[0020] Step 2: Filter the historical working parameter data from Step 1 to obtain the original dataset.
[0021] Step 2 specifically includes the following steps: Step S2.1: Resample each type of historical operating parameter data from Step 1. Let X be a certain type of historical operating parameter data. Resample it using an hourly interval rule. The specific formula is as follows:
[0022] In the formula: This indicates the historical working parameter in time. The mean sampled value at; This indicates the monitored value of this historical operating parameter; This indicates the historical working parameter within a certain time period. The number of monitored values within; Step S2.2: The Gaussian filtering algorithm is used to smooth each historical working parameter data after resampling in Step S2.1 to effectively suppress random noise interference and obtain the original dataset. The core of this process is a locally weighted average based on a sliding window. The specific execution steps are as follows: This will be illustrated using a specific historical operating parameter—the sequence of the cell voltage (y) of an electrolyzer over time (x)—as an example. Let the data point to be smoothed be ( , ).by Centered on a time range, a smoothing window is defined. The window width is set to 5 data points, covering […]. The neighborhood of ] . For each data point within the window. According to its relationship with the center point The distance is used to calculate the weights using a Gaussian kernel function. The Gaussian kernel function expression is:
[0023] In the formula, the parameters (Standard deviation) controls the width of the weight distribution. The larger the value, the higher the weight given to distant data points, and the more significant the smoothing effect.
[0024] center point Smoothing value at It is calculated by taking the weighted average of the y-values of all points within the window according to their corresponding Gaussian weights, as shown in the formula:
[0025] By sliding the window along the time series x data points one by one and repeating the weighted average calculation process, the smoothed result of the entire voltage series can be obtained. This method effectively filters out high-frequency random fluctuations while preserving the main voltage variation trends, providing a high-quality data foundation for subsequent degradation feature extraction.
[0026] Step 3: Based on the original dataset obtained in Step 2, select the cell voltage data of the electrolytic cell as the detection index. Based on the Pearson correlation coefficient method, calculate the Pearson correlation coefficient between each historical working parameter in the original dataset and the cell voltage of the electrolytic cell.
[0027] In step 3, the formula for the Pearson correlation coefficient method is:
[0028] In the formula It is the Pearson correlation coefficient. The correlation between the factors The larger the value, the stronger the correlation. It is the number of data points, and This represents the value of a certain historical working parameter at sampling point i. This represents the average value of the historical working parameters. This represents the value of the cell voltage at sampling point i. The average voltage representing the voltage of the small chamber in the electrolytic cell.
[0029] Step 4: Based on the Pearson correlation coefficient calculated in Step 3, select historical operating parameter data with a Pearson correlation coefficient of not less than 0.6 from the original dataset as relevant operating parameter data. Together with the cell voltage data of the electrolytic cell, these data constitute the training data. Normalize the relevant operating parameter data and the cell voltage data of the electrolytic cell in the training data respectively. Then, divide at least 60% of the data into the training set according to the time sequence, and the remaining data into the validation set.
[0030] Step 5: Using the training set and validation set from Step 4, train the BiLSTM-based prediction model to obtain the optimal prediction model.
[0031] The prediction model based on BiLSTM is a bidirectional long short-term memory network. Its working principle is as follows: the same input sequence is fed into both a forward LSTM and a backward LSTM. The forward LSTM captures the forward temporal features of the sequence, and the backward LSTM captures the reverse temporal features. The hidden layer outputs of the two networks are then fused together and fed into the output layer. Specifically, the LSTM includes: Forget gate operation: receiving the implicit state from the previous time step. and the input at the current moment They are concatenated, and the sigmoid activation function is used to obtain a vector between 0 and 1. :
[0032] in, It is the weight matrix of the forget gate; It is a bias term; It is the sigmoid function, used to determine which information in the cell state is discarded; Input gate updates cell state: The sigmoid function determines the information that needs to be updated. and through Function generates candidate update values Finally, update the cell state. :
[0033]
[0034]
[0035] In the formula: , These are the weight matrices for the input gate and the candidate state, respectively; , These are the corresponding bias terms; The output gate controls the final output, and the output ratio is determined by the sigmoid function. and combined with cell state The activation result generates the hidden state at the current moment. :
[0036]
[0037] In the formula: It is the weight matrix of the output gate; It is a bias term.
[0038] The training process of the BiLSTM-based prediction model is as follows: Step 5.1: Initialize the BiLSTM-based prediction model. Use random assignment to initialize the weight matrix and bias terms of the prediction model, and set the hyperparameters of the prediction model. The specific settings of the hyperparameters are as follows: the number of hidden layer nodes is 100, the maximum number of training epochs is 500, the gradient threshold is 1, the initial learning rate is 0.001, the learning rate descent period is 125, and the learning rate descent factor is 0.05. Step 5.2: Take the relevant operating parameter data at a sampling time point t in the training set, the cell voltage data of the electrolytic cell at sampling time point t, and the cell voltage data of the electrolytic cell at sampling time point t-1 as a training sample at sampling time point t, and input them into the prediction model. The prediction model outputs the predicted data of the cell voltage data of the electrolytic cell at time point t+1. The cell voltage data value of the electrolytic cell at time point t+1 in the training set is used as the reference data for the output value of the prediction model.
[0039] Let N be the number of sampling time points in the training set. The prediction model predicts the cell voltage data of the electrolytic cell for N-2 sampling time points in the training set, using the mean squared error as the loss function. The weight matrix and bias term of the prediction model are updated once through backpropagation based on the training loss of n training samples in a batch of the training set, completing one training cycle. Then, the next batch of training samples is input into the prediction model after one training cycle, and this process is repeated until the last batch of training samples in the training set is used, completing one training round. Then, the process of inputting a batch of training samples from the training set is repeated... The training process is repeated continuously, with the inputs going into the prediction model after one round of training. After each round of training, the training samples from the validation set are sequentially input into the prediction model, and the root mean square error (RMSE) of the prediction model on the validation set is calculated. Training is complete when the RMSE on the validation set is less than a preset threshold or the maximum number of training rounds is reached. If the RMSE on the validation set is not less than the preset threshold when the maximum number of training rounds is reached, the hyperparameter values in step 5.1 are adjusted, and the process in step 5.2 is repeated until the RMSE on the validation set is less than the preset threshold; the current prediction model is then considered the optimal prediction model.
[0040] Step 6: To obtain the predicted value of the cell voltage at time point K for a PEM electrolyzer of the same model as the target PEM electrolyzer in Step 1, relevant operating parameter data and cell voltage data of the electrolyzer are obtained for a certain time period preceding time point K. These are first filtered using the method described in Step 2, then normalized using the method described in Step 4. The relevant operating parameter data at the (K-1)th sampling time point, the cell voltage data at the (K-1)th sampling time point, and the cell voltage data at the (K-2)th sampling time point are then input into the optimal prediction model in Step 5 to obtain the predicted cell voltage at time point K. This predicted data is then inversely normalized to obtain the predicted value of the cell voltage at time point K.
[0041] To fully demonstrate the effectiveness of the proposed method for predicting the cell voltage of a PEM electrolyzer based on BiLSTM, comparative experiments were conducted with the proposed BiLSTM model and LSTM and GRU models under different training set proportions. Error analysis of the prediction results was performed using three evaluation metrics: root mean square error (RMSE), mean absolute percentage error (MAPE), and coefficient of determination (R²). The specific calculation formulas for the three evaluation metrics are as follows: Mean Absolute Error (MAE): ; Mean absolute percentage error: ; Root Mean Square Error (RMSE): ; In the formula: For the sample size, For the first The actual value of the voltage at any given moment. For the first The predicted value of the voltage at any given time.
[0042] The voltage prediction curve of the BiLSTM model closely matches the actual voltage, effectively reflecting the voltage's changing trends and fluctuations. In contrast, the prediction curves of LSTM and GRU show significant deviations from the actual values. When the training set is relatively small, BiLSTM exhibits larger prediction errors at peaks and troughs, resulting in sharp peaks in the residual plot. This may be because the low training set size prevents BiLSTM from fully learning all the characteristics of the electrolyzer voltage changes. However, as the training set size increases, the prediction error of the BiLSTM algorithm gradually decreases, and the prediction accuracy gradually improves. This indicates that when the training set size is high, BiLSTM can fully utilize the temporal and nonlinear characteristics of the electrolyzer's historical data to achieve accurate voltage prediction.
[0043] The training set was set to 40%, 50%, 60%, and 70% respectively; from Figure 7-9 It can be seen that BiLSTM outperforms LSTM and GRU in MAE, MAPE, and RMSE, indicating that BiLSTM has higher prediction accuracy and stability. With different training set proportions, BiLSTM significantly outperforms other algorithms, demonstrating its superiority not only when the training set proportion is large, but also when the training set proportion is small.
[0044] Any aspects not covered in this invention are applicable to existing technologies.
Claims
1. A method for predicting cell voltage of a PEM electrolyzer based on BiLSTM, characterized in that, The method specifically includes the following steps: Step 1: Obtain historical operating parameter data of the target PEM electrolyzer over a certain period of time; Historical operating parameter data of PEM electrolyzers include cell voltage U, current density I, inlet temperature T1, outlet temperature T2, inlet flow rate Q1, and outlet flow rate Q2. Each data point is a time series data of continuous monitoring within the same time period. Step 2: Filter the historical working parameter data from Step 1 to obtain the original dataset; Step 3: Based on the original dataset obtained in Step 2, select the cell voltage data of the electrolyzer as the detection index, and calculate the Pearson correlation coefficient between each historical working parameter in the original dataset and the cell voltage of the electrolyzer in turn based on the Pearson correlation coefficient method. Step 4: Based on the Pearson correlation coefficient calculated in Step 3, select historical operating parameter data with a Pearson correlation coefficient of not less than 0.6 from the original dataset as relevant operating parameter data. Together with the cell voltage data of the electrolytic cell, these data constitute the training data. Normalize the relevant operating parameter data and the cell voltage data of the electrolytic cell in the training data. Then, divide the data into training set and validation set according to time sequence, with at least 60% of the data being the first set. Step 5: Using the training set and validation set from Step 4, train the BiLSTM-based prediction model to obtain the optimal prediction model. The training process of the BiLSTM-based prediction model is as follows: Step 5.1: Initialize the BiLSTM-based prediction model. Use random assignment to initialize the weight matrix and bias terms of the prediction model, and set the hyperparameters of the prediction model. The specific settings of the hyperparameters are as follows: the number of hidden layer nodes is 100, the maximum number of training epochs is 500, the gradient threshold is 1, the initial learning rate is 0.001, the learning rate descent period is 125, and the learning rate descent factor is 0.
05. Step 5.2: Take the relevant working parameter data at a sampling time point t in the training set, the cell voltage data of the electrolytic cell at sampling time point t, and the cell voltage data of the electrolytic cell at sampling time point t-1 as a training sample at sampling time point t, and input them into the prediction model. The prediction model outputs the predicted data of the cell voltage data of the electrolytic cell at time point t+1. The cell voltage data value of the electrolytic cell at time point t+1 in the training set is used as the reference data for the output value of the prediction model. Let N be the number of sampling time points in the training set. The prediction model predicts the cell voltage data of the electrolytic cell for N-2 sampling time points in the training set, using the mean squared error as the loss function. The weight matrix and bias term of the prediction model are updated once through backpropagation based on the training loss of n training samples in a batch of the training set, completing one training cycle. Then, the next batch of training samples is input into the prediction model after one training cycle, and this process is repeated until the last batch of training samples in the training set is used, completing one training round. Then, the process of inputting a batch of training samples from the training set is repeated... The training process is repeated continuously, with the inputs going into the prediction model after one round of training. After each round of training, the training samples from the validation set are sequentially input into the prediction model, and the root mean square error (RMSE) of the prediction model on the validation set is calculated. Training is complete when the RMSE on the validation set is less than a preset threshold or the maximum number of training rounds is reached. If the RMSE on the validation set is not less than the preset threshold when the maximum number of training rounds is reached, the hyperparameter values in step 5.1 are adjusted, and the process in step 5.2 is repeated until the RMSE on the validation set is less than the preset threshold. The current prediction model is then considered the optimal prediction model. Step 6: To obtain the predicted value of the cell voltage at time point K for a PEM electrolyzer of the same model as the target PEM electrolyzer in Step 1, relevant operating parameter data and cell voltage data of the electrolyzer are obtained for a certain time period preceding time point K. These are first filtered using the method described in Step 2, then normalized using the method described in Step 4. The relevant operating parameter data at the (K-1)th sampling time point, the cell voltage data at the (K-1)th sampling time point, and the cell voltage data at the (K-2)th sampling time point are then input into the optimal prediction model in Step 5 to obtain the predicted cell voltage at time point K. This predicted data is then inversely normalized to obtain the predicted value of the cell voltage at time point K.
2. The PEM cell cell voltage prediction method based on BiLSTM according to claim 1, wherein, Step 2 specifically includes the following steps: Step S2.1: Resample each type of historical operating parameter data from Step 1. Let X be a certain type of historical operating parameter data. Resample it using an hourly interval rule. The specific formula is as follows: , wherein: represents a mean sample value of the historical operating parameter at a time t; represents a monitored value of the historical operating parameter; represents a number of monitored values of the historical operating parameter over a time period t; Step S2.2: Use the Gaussian filtering algorithm to smooth each historical working parameter data after resampling in step S2.1 to obtain the original dataset.
3. The method of claim 2, wherein the BiLSTM-based PEM cell cell-voltage prediction method is characterized by, The specific steps for step S2.2 are as follows: Let the data points to be smoothed be ( , ); by time point Centered on, For a historical working parameter data at a corresponding point in time, a time range is set as a smoothing window; the window width is set to 5 data points, i.e., covering [ The neighborhood of ]; for each data point within the window. According to its relationship with the center point The distance is used to calculate the weights using a Gaussian kernel function. The Gaussian kernel function expression is: , In the formula, the standard deviation parameter Control the width of the weight distribution. The larger the value, the higher the weight given to distant data points, and the more significant the smoothing effect. center point Smoothing value at It is calculated by taking the weighted average of the y-values of all points within the window according to their corresponding Gaussian weights, as shown in the formula: , By sliding the window along the time series x data points one by one and repeating the above weighted average calculation process, the smoothed result of the entire series of historical working parameter data can be obtained.
4. The method for predicting the cell voltage of a PEM electrolyzer based on BiLSTM according to claim 1, characterized in that, In step 3, the formula for the Pearson correlation coefficient method is: , In the formula It is the Pearson correlation coefficient. The correlation between the factors The larger the value, the stronger the correlation. It is the number of data points, and This represents the value of a certain historical working parameter at sampling point i. This represents the average value of the historical working parameters. This represents the value of the cell voltage at sampling point i. The average voltage representing the voltage of the small chamber in the electrolytic cell.
5. The method for predicting the cell voltage of a PEM electrolyzer based on BiLSTM according to claim 1, characterized in that, In step 5, the prediction model based on BiLSTM is a bidirectional long short-term memory network. Its working principle is as follows: the same input sequence is fed into both a forward LSTM and a backward LSTM. The forward LSTM captures the forward temporal features of the sequence, and the backward LSTM captures the reverse temporal features. The hidden layer outputs of the two networks are then fused through a concatenation operation and fed into the output layer. Specifically, the LSTM operation includes the following: Forget gate operation: receiving the implicit state from the previous time step. and the input at the current moment They are concatenated, and the sigmoid activation function is used to obtain a vector between 0 and 1. : , in, It is the weight matrix of the forget gate; It is a bias term; It is the sigmoid function, used to determine which information in the cell state is discarded; Input gate updates cell state: The sigmoid function determines the information that needs to be updated. and through Function generates candidate update values Finally, update the cell state. : , , , In the formula: , These are the weight matrices for the input gate and the candidate state, respectively; , These are the corresponding bias terms; The output gate controls the final output, and the output ratio is determined by the sigmoid function. and combined with cell state The activation result generates the hidden state at the current moment. : , , In the formula: It is the weight matrix of the output gate; It is a bias term.