A method for predicting the health status of fuel cells based on hybrid deep learning networks
By using a hybrid deep learning network, combining multi-index fusion and CNN-GRU-Attention architecture, the shortcomings in health index construction and feature extraction in fuel cell health status prediction are addressed, achieving high-precision prediction under dynamic operating conditions and improving the estimation accuracy of fuel cell health status and the robustness of the system.
Patent Information
- Application Number
- CN202611220470.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-12
- Publication Date
- 2026-11-06
AI Technical Summary
Existing fuel cell health status prediction methods have shortcomings in the objectivity of health indicator construction, the sufficiency of time-series feature extraction, the adaptability of key information focus, and the standardization of data preprocessing, resulting in insufficient prediction accuracy under complex operating conditions.
A hybrid deep learning network is adopted to construct a comprehensive health status representation through the fusion of multiple indicators. The CNN-GRU-Attention architecture is used to adaptively extract spatiotemporal features and key information. Strictly following the time series prediction specification, the inlet and outlet temperature difference of coolant, cathode pressure difference, gas flow difference, coolant flow rate and output power are selected as health feature indicators. The weights are optimized by genetic algorithm and prediction is performed by combining one-dimensional convolutional neural network, gated recurrent unit and channel attention mechanism.
It achieves high-precision estimation of fuel cell health status, improves prediction accuracy under dynamic operating conditions, overcomes the problem that a single indicator is difficult to fully capture complex degradation mechanisms, enhances adaptive focusing on key degradation features, and avoids model evaluation distortion caused by data leakage.
Smart Images

Figure CN123053902A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fuel cells, and in particular to a method for predicting the health status of fuel cells based on hybrid deep learning networks. Background Technology
[0002] Proton exchange membrane fuel cells (PEMFCs) have broad application prospects in the field of new energy vehicles due to their high energy conversion efficiency and zero emissions. However, in actual operation, fuel cells are affected by complex operating conditions such as frequent start-stop cycles, dynamic loads, and temperature fluctuations, leading to a gradual decline in performance. Accurate prediction of their state of health (SOH) directly affects the system's operational reliability, durability, and economic efficiency. Predictive health management technology, by predicting performance degradation trends and intervening in advance, has become a key technical means to extend the service life of fuel cells.
[0003] Currently, fuel cell SOH prediction methods mainly fall into two categories: model-driven methods and data-driven methods. Model-driven methods establish mathematical equations based on degradation mechanisms for prediction, but accurate modeling is very difficult, and it is hard to fully describe the complex degradation process involving multi-physics coupling. Data-driven methods achieve end-to-end mapping by training machine learning models on monitoring data, and have received increasing attention. However, existing data-driven methods still have the following shortcomings: First, the indicators for characterizing the state of health (SOH) are often singular and fail to comprehensively capture the complex degradation mechanisms. Most existing studies use stack voltage or output power as the sole indicator of SOH. However, the degradation process of fuel cells involves multiple disciplines, including electrochemistry, thermodynamics, and fluid mechanics, and a single indicator cannot fully reflect the true degradation state within the stack. Especially under dynamic load conditions, voltage signals fluctuate dramatically due to load changes, making it difficult for traditional methods based on degradation trend regression to accurately capture such random variations. While some recent studies have attempted to integrate multiple operating parameters to construct a comprehensive indicator, the determination of the integration weights largely relies on empirical settings and lacks objective optimization methods, resulting in insufficient adaptability of the integrated indicator under different operating conditions.
[0004] Second, deep learning methods are insufficient for feature extraction from non-stationary multi-sensor data, and key information is easily attenuated over long time. Some studies use LSTM or GRU for time series prediction, but single recurrent neural networks are insufficient to fully extract local features and cross-variable correlations from multi-sensor data. Existing literature has attempted to combine CNN and LSTM in series, but most existing hybrid models use a simple stacking approach. On the one hand, the kernel size design of CNNs lacks consideration for time series data; on the other hand, recurrent neural networks still face the problem of key information attenuation when processing long sequences and lack an adaptive focusing mechanism for important feature channels, resulting in insufficient robustness of the prediction model under complex conditions.
[0005] Third, improper data preprocessing can lead to data leakage, resulting in distorted model evaluation. In time series forecasting tasks, some existing methods normalize all data before dividing it into training and test sets, unintentionally introducing statistical information from future test sets into the training process. This causes data leakage, resulting in inflated model evaluation results and a significant decrease in prediction accuracy after actual deployment.
[0006] In summary, existing methods have significant shortcomings in terms of the objectivity of health indicator construction, the sufficiency of temporal feature extraction, the adaptability of key information focus, and the standardization of data preprocessing. Therefore, there is an urgent need for an efficient prediction method that can integrate multi-source features, accurately model temporal degradation patterns, adaptively focus on key information, and strictly adhere to temporal prediction standards. Summary of the Invention
[0007] The purpose of this invention is to provide a fuel cell health status prediction method based on a hybrid deep learning network. By fusing multiple indicators to construct a comprehensive health status representation and using a CNN-GRU-Attention hybrid deep learning architecture to adaptively extract spatiotemporal features and key information, a high-precision estimation of SOH can be achieved.
[0008] To achieve the above objectives, this invention provides a method for predicting the health status of fuel cells based on hybrid deep learning networks, comprising the following steps: Step 1, Data Acquisition and Preprocessing: Obtain historical operating time series data of fuel cells, and sequentially perform outlier removal, smoothing filtering and resampling to obtain a complete dataset; Step 2, Dataset Partitioning and Normalization: Divide the complete dataset into training and test sets in chronological order; perform min-max normalization independently on each feature dimension of the training set and calculate the extreme values of each dimension; use the extreme values of the training set to perform the same transformation on the test set; then use a sliding window to reconstruct the normalized continuous time series into a sample-sequence format, where each sample contains feature data of T consecutive time steps, and T is a positive integer greater than 1. Step 3: Constructing a fused SOH label: Select the inlet and outlet temperature difference of coolant, cathode pressure difference, gas flow difference, coolant flow rate and output power during the operation of the fuel cell as health feature indicators. Optimize the weight of each indicator through a genetic algorithm, and use the weighted fusion result as the true label of the health status (SOH). Step 4: Building a Hybrid Deep Learning Model: Construct a prediction model consisting of a one-dimensional convolutional neural network (CNN) layer, a gated recurrent unit (GRU) layer, a channel attention mechanism layer, and an output layer. The CNN layer extracts feature cross-information within each time step of the input sequence. The GRU layer receives the feature sequence output by the CNN layer and outputs the hidden state vector of the last time step, which represents the temporal dependency of the entire input sequence. The channel attention mechanism layer performs channel-level adaptive weighting on the hidden state vector output by the GRU layer. The output layer uses fully connected layers to progressively reduce dimensionality and finally outputs the SOH prediction value. Step 5, Model Training and Optimization: Train the hybrid deep learning model using the training set data processed in Step 2, use the mean squared error loss function to measure the prediction error, and use the Adam optimizer to update the model parameters. Step 6: Use the trained model to make predictions on the test set, and compare the prediction results with the true fused SOH labels after inverse normalization. Evaluate the model performance by calculating at least one of the following metrics: root mean square error (RMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE).
[0009] Preferably, in step 1, outlier removal uses the 3-σ filtering method, smoothing filtering uses the moving average filter, and resampling involves extracting a data sample every 0.5 hours.
[0010] Preferably, in step 2, each feature dimension of the training set is independently subjected to min-max normalization to scale the data to the [0,1] interval, as follows: ; in, The original data, , These are the minimum and maximum values of the feature in the training set, respectively. These are the normalized eigenvalues.
[0011] Preferably, in step 3, the optimization objective function of the genetic algorithm is... for: ; in, The fusion weighting coefficients for each health characteristic indicator; To adjust the coefficients for the weights of each penalty item; The time span of the sample data; For the first Monotonicity penalty term for each time step; The trend similarity coefficient; This is a penalty term for curve smoothness. This is a penalty term for the uniformity of weight distribution.
[0012] Preferably, in step 4, the CNN layer consists of two cascaded one-dimensional convolutional layers. The first convolutional layer uses 32 convolutional kernels of size 1×1, and the second convolutional layer uses 64 convolutional kernels of size 1×1, both using ReLU as the activation function; the formula is expressed as: ; in, This is the weight matrix of the convolution kernel in layer 1. Let be the first input matrix at time step t. This represents the convolution operation. For the first level bias term, This is the activation function.
[0013] Preferably, in step 4, the number of hidden units in the GRU layer is 50, and the calculation process is as follows: ; ; ; ; in, To update the door, To reset the door, In the candidate hidden state, This represents the final hidden state at the current time step. , , These are the weight matrices for the update gate, reset gate, and candidate hidden state, respectively. , , These are the corresponding bias vectors; This is the input feature vector for the current time step; This is the hidden state vector from the previous time step; Here, is the Sigmoid function; tanh is the hyperbolic tangent activation function. This is element-wise multiplication; Output the hidden state vector at the last time step. .
[0014] Preferably, in the channel attention mechanism layer of step 4, the 50-dimensional features are first compressed to 12 dimensions through the first fully connected layer to aggregate global information, as shown below: , ; in, Here is the weight matrix of the first fully connected layer, with dimension 1. ; This is the bias vector of the first fully connected layer; The feature vector output by the GRU layer; This is the intermediate feature vector output by the first fully connected layer; right ReLU activation is used, and then the result is restored to 50 dimensions through a second fully connected layer, followed by the generation of channel attention weight vectors using the Sigmoid function. , is represented as: ; in, Here is the weight matrix of the second fully connected layer, with dimension 1. ; This is the bias vector for the second fully connected layer; This is the intermediate feature vector output from the previous stage; For the Sigmoid function; This is the final channel attention weight vector; Then, and Channel-by-channel multiplication yields the enhanced feature vector. , is represented as: ; Achieve feature recalibration.
[0015] Preferably, in step 5, the model training also employs a dynamic learning rate adjustment strategy and monitors the training set loss during training to execute an early stopping mechanism.
[0016] Preferably, in step 6, the calculation formula for the evaluation index is: ; ; ; in, For the first The model prediction value for each sample. For the first The true SOH value of each sample This represents the total number of samples in the test set.
[0017] Preferably, the method also includes step 7, which involves deploying the trained model to a fuel cell management system or edge computing device to perform real-time prediction of the fuel cell health status.
[0018] Therefore, the fuel cell health status prediction method based on hybrid deep learning networks of the present invention has the following beneficial effects: (1) This invention selects five key physical parameters: temperature difference between inlet and outlet of coolant, pressure difference of cathode, gas flow difference, coolant flow rate and output power. By optimizing the fusion weight through genetic algorithm, the comprehensive SOH index constructed is more stable than the single voltage index and can better characterize the long-term degradation trend of fuel cell. It overcomes the defect that a single index is difficult to fully capture the complex degradation mechanism.
[0019] (2) This invention organically combines a one-dimensional convolutional neural network, a gated recurrent unit and a channel attention mechanism: the CNN layer extracts the feature cross information of multi-source data within the time step; the GRU layer models long-term temporal dependencies, effectively solving the gradient vanishing problem; the channel attention mechanism adaptively weights the hidden state vector output by the GRU, automatically enhances the contribution of important feature channels, suppresses irrelevant interference information, and realizes adaptive focusing on key degenerate features.
[0020] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating the fuel cell health status prediction method in an embodiment of the present invention. Figure 2 This is a network framework diagram of the CNN-GRU-Attention hybrid deep learning model in an embodiment of the present invention; Figure 3 This is a comparison curve of normalized output power and fused SOH index in an embodiment of the present invention; Figure 4 This is a comparison chart of the prediction performance of the method of the present invention with LSTM, BiLSTM, and GRU under a 60% training set / 40% test set partitioning in an embodiment of the present invention; Figure 5 This is a comparison chart of the prediction performance of the method of the present invention with LSTM, BiLSTM, and GRU under a 70% training set / 30% test set partitioning in the embodiments of the present invention. Detailed Implementation
[0022] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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 some embodiments of the present invention, but not all embodiments.
[0024] Example This embodiment uses the IEEE PHM2014 Data Challenge public dataset for verification. This dataset records the operational data of a fuel cell from its initial state to its performance degradation throughout its entire lifecycle, including operating parameters such as voltage, current, temperature, pressure, and flow rate. Figure 1 As shown, this embodiment specifically includes the following steps: I. Data Preparation and SOH Label Construction: 1. Data preprocessing: First, a 3- Outliers are removed using a filtering method; then, a moving average filter is used for smoothing to eliminate the impact of sensor noise and random fluctuations on data quality. Finally, resampling is performed at a fixed frequency, extracting one data sample every 0.5 hours to obtain a time-aligned complete dataset.
[0025] The publicly available fuel cell aging dataset contains a large amount of noisy signals that require preprocessing.
[0026] First, the 3-σ filtering method is used to remove outliers that exceed the mean ± 3 standard deviations. The calculation formula is shown below: ; in, The representative length is Sequence data The normal range boundary, For sequence data The average value.
[0027] Then, a moving average filter is used for smoothing to eliminate the impact of sensor noise and random fluctuations on data quality. Since the filter needs to calculate the neighborhood mean centered on the processed data point, the queue length needs to be set to an odd number, therefore defined as 2N+1, as shown in the following formula: ; in, For the first The smoothed data For the first One set of raw data, The data points being processed Number of adjacent data points on one side.
[0028] Finally, resampling is performed at a fixed frequency, extracting a data sample every 0.5 hours to obtain a time-aligned complete dataset.
[0029] 2. Dataset partitioning and normalization: The preprocessed complete dataset is strictly divided according to chronological order, without random shuffling, to ensure that the training set represents historical data and the test set represents future unknown data. This embodiment uses two division ratios for comparative experiments: 60% training set / 40% test set and 70% training set / 30% test set.
[0030] Min-max normalization is performed independently on each feature dimension of the training set to scale the data to the [0,1] interval. The normalization formula is: ; in, The original data, and These are the minimum and maximum values of the feature in the training set, respectively. The test set is calculated using the training set. and Perform the same transformation to ensure that the normalization parameters do not introduce statistical information from future test sets.
[0031] 3. Reconstructing the sliding window sequence: A sliding window is used to reconstruct the normalized continuous time series into a sample-sequence format. Each sample contains feature data from T (T=10) consecutive time steps, with the corresponding label being the SOH value at the T-th time step. After reconstruction, each sample has a shape of [T,D], where D is the feature dimension (i.e., the number of sensor channels).
[0032] 4. Constructing by integrating SOH tags: Five key physical parameters during fuel cell operation were selected as health characteristic indicators: coolant inlet / outlet temperature difference, cathode pressure difference, gas flow rate difference, coolant flow rate, and output power. A genetic algorithm was used to optimize the weights of each indicator, and the weighted fusion result was used as the true label for the state of health (SOH).
[0033] Specifically, the objective function of the genetic algorithm is: ; in, The fusion weighting coefficients for each health characteristic indicator; The coefficients are used to adjust the weights of each penalty item.
[0034] For the first The monotonicity penalty term for each time interval, in this embodiment, includes four sub-indices: Spearman rank correlation coefficient. Non-decreasing point ratio Maximum continuously increasing segment length and normalized area difference Its formula is expressed as: ; in, It measures the predicted SOH sequence Over time The overall monotonic trend is expressed by the formula: ; In the formula, For the first A point in time; For the first A point in time; In the first The SOH (health status) value predicted by the model at each time point; The rank function sorts the sequence elements in ascending order of value and assigns them sequential numbers; to further strengthen the constraints, [the following is added]... Piecewise nonlinear mapping :when >0 =2 ,when ≤0 =max(0, +0.9).
[0035] Calculate the proportion of pairs of points where SOH did not decrease at adjacent time points. For sequence length, For indicator functions; Calculate using the run-length encoding algorithm: for the differential symbol sequence Perform run-length encoding, and take the length of the longest consecutive segment with 1s as... When the sequence is completely monotonically decreasing =0; The global shape of the quantized prediction curve deviates from the ideal monotonic reference line: First, construct from max( ) to min( Linear decreasing reference line: Then, the absolute area difference Area = is calculated using trapezoidal numerical integration. Finally, divide by the time span get .
[0036] The weighting coefficients of 5, 0.1, and 10 are based on magnitude balance and physical prior settings. The value range [0,1] has a typical small value, so it is magnified by 5 times to enhance the constraint. The value can range to tens; multiplying it by 0.1 avoids its dominant penalty term. It directly reflects the global shape deviation and is assigned a maximum weight of 10. The robustness of the coefficient is verified through sensitivity analysis.
[0037] The trend similarity coefficient measures the correlation between the fusion curve and the reference curve (based on the stack voltage decay curve). This is a curve smoothness penalty term used to suppress abnormal fluctuations in the fusion curve; This is a penalty term for the uniformity of weight distribution, used to prevent excessive concentration of weights on a particular indicator.
[0038] In this embodiment, empirical values are assigned based on the physical importance of each penalty term. Specifically, the monotonicity penalty term... Similarity coefficient of trends The fusion of the SOH curve directly determines whether it can accurately reflect the irreversible performance degradation of the fuel cell stack, and is the core of the optimization objective; therefore, it is given a high weight. The smoothness penalty term... and weight distribution uniformity penalty term As an auxiliary constraint, it is mainly used to suppress abnormal fluctuations in the curve and prevent excessive concentration of weights for a single feature, and therefore is assigned a relatively low weight.
[0039] After initial empirical assignment based on the above principles, through multiple rounds of iterative debugging, using the consistency of the monotonically decreasing trend of the fusion curve and the smoothness of the curve as evaluation indicators, the degree of agreement between the fusion SOH curve and the known performance degradation trend was observed. Finally, the coefficient combination that makes the optimization objective function achieve the best balance was determined as follows: , , , .
[0040] After optimization using the genetic algorithm, the weights of each indicator are as follows: coolant inlet / outlet temperature difference 0.0254, cathode pressure difference 0.1902, gas flow rate difference 0.4337, coolant flow rate 0.1014, and output power 0.2493. The indicators are then weighted and fused according to their optimized weights, and the fusion result is subjected to secondary normalization (using the same method as described above) to obtain a comprehensive SOH value within the [0,1] interval, which serves as the true label for model training and evaluation.
[0041] like Figure 3 As shown, the fused SOH index fluctuates more smoothly than the single voltage index, and is better able to characterize the long-term degradation trend of fuel cells. It effectively overcomes the shortcomings of the single voltage index, which fluctuates violently under dynamic operating conditions and is difficult to reflect the true degradation state.
[0042] II. Construction of CNN-GRU-Attention Model: The hybrid deep learning model architecture of this invention is as follows: input layer → one-dimensional convolutional neural network (CNN) layer → gated recurrent unit (GRU) layer → channel attention mechanism layer → output layer, as shown below. Figure 2 As shown.
[0043] The model first receives formatted data through a sequence input layer and then performs format conversion through a sequence folding layer.
[0044] 1. One-dimensional Convolutional Neural Network (CNN) layer: The CNN layer, acting as a feature extractor, consists of two cascaded one-dimensional convolutional layers. The first convolutional layer uses 32 1×1 convolutional kernels with a stride of 1, followed by a ReLU activation function; the second convolutional layer uses 64 1×1 convolutional kernels with a stride of 1, followed by a ReLU activation function.
[0045] Since the convolution kernel size is 1×1, this operation does not span multiple time steps; it only performs linear combination and nonlinear transformation on the feature channels within each time step, thereby extracting the feature intersection information of multi-sensor data within each time step. The computation process of a CNN layer can be represented as follows: ; in, This is the weight matrix of the convolution kernel in layer 1. Let be the first input matrix at time step t. This represents the convolution operation. For the first level bias term, is the activation function. After two convolutional layers, the output feature sequence is restored to its original format through a sequence unfolding layer and flattened (keeping the original number of time steps unchanged, but the number of feature channels changes from the original input dimension to 64 dimensions), and then input into the key gated recurrent unit (GRU) layer.
[0046] 2. Gated Recurrent Unit (GRU) Layer: The GRU layer receives the feature sequences output by the CNN layer and models the long-term dependencies and dynamic evolution of features over time through update gates and reset gates.
[0047] The calculation process for the GRU layer is as follows: ; ; ; ; in, To update the door, To reset the door, In the candidate hidden state, This represents the final hidden state at the current time step. , , These are the weight matrices for the update gate, reset gate, and candidate hidden state, respectively. , , These are the corresponding bias vectors; This is the input feature vector for the current time step; This is the hidden state vector from the previous time step; Here, is the Sigmoid function; tanh is the hyperbolic tangent activation function. This is element-wise multiplication.
[0048] In this embodiment, the GRU layer is configured as a unidirectional structure with 50 hidden units, and the output mode is set to the last time step. The GRU layer ultimately outputs a 50-dimensional hidden state vector. This vector encapsulates the temporal dependency information of the entire input sequence.
[0049] 3. Channel attention mechanism layer: The channel attention mechanism layer analyzes the state of all time steps of the GRU output, calculates the importance weight of each historical moment to the current prediction, and generates a context vector that focuses on key information by weighted summation, enabling the model to focus on historical stages that have a greater impact on the recession.
[0050] The channel attention mechanism layer is used to process the hidden state vector of the GRU output. Perform channel-level adaptive weighting.
[0051] First, the 50-dimensional features are compressed to 12 dimensions through the first fully connected layer to aggregate global information: ;in, Here is the weight matrix of the first fully connected layer, with dimension 1. ; This is the bias vector of the first fully connected layer; The feature vector output by the GRU layer; This is the intermediate feature vector output by the first fully connected layer.
[0052] Then, ReLU activation is applied to z, and it is restored to 50 dimensions through a second fully connected layer, and the channel attention weight vector is generated by the Sigmoid function: ;in, Here is the weight matrix of the second fully connected layer, with dimension 1. ; This is the bias vector for the second fully connected layer; This is the intermediate feature vector output from the previous stage; For the Sigmoid function; This is the final channel attention weight vector. Each element represents the importance of the corresponding feature channel.
[0053] Finally, the weight vector a is compared with the original features. Channel-by-channel multiplication enables feature recalibration. .
[0054] This mechanism enables the model to automatically learn the importance weights of each feature channel, enhance the contribution of key degraded feature channels, and suppress irrelevant or interfering channels, thereby improving prediction accuracy.
[0055] 4. Output layer: The enhanced feature vector The input is fed into a fully connected layer, where dimensionality is gradually reduced, and finally mapped to a single SOH prediction value.
[0056] III. Model Training, Prediction, and Evaluation: 1. Training configuration: The model training uses the mean squared error loss function to measure the prediction error, which has good robustness to outliers.
[0057] Mean Squared Error (MSE) Loss Function: ; in, For the first The model prediction value for each sample. For the first The true SOH value of each sample This represents the total number of samples in the test set.
[0058] The optimizer used is Adam, with an initial learning rate of 0.001 and a segmented decay strategy (decreasing to 0.5 times the original rate every 30 training epochs). The batch size is set to 32, and the maximum training epochs are 500.
[0059] To prevent overfitting, a validation set (approximately 15%–20% of the training set) is split from the training set during training. The validation set loss is used to monitor the model's generalization performance. When the validation set loss stops decreasing for 15 consecutive epochs, an early stopping mechanism is triggered, terminating training prematurely. The training curve shows a steady decrease in loss, indicating no overfitting.
[0060] 2. Prediction and Comparison: To verify the effectiveness of the method of this invention, three prediction models—LSTM, BiLSTM, and GRU—were added as benchmarks on the same dataset. All comparison models used the same training / test set partitioning, the same input features, and the same evaluation metrics.
[0061] The following three indicators are used to quantify the prediction accuracy of the model: Mean Absolute Error (MAE): ; Root Mean Square Error (RMSE): ; Mean Absolute Percentage Error (MAPE): ; in, For the first The model prediction value for each sample. For the first The true SOH value of each sample This represents the total number of samples in the test set. The smaller the value of the above indicators, the higher the precision and accuracy of the prediction model.
[0062] With a 60% training set / 40% test set split, the MAE, RMSE and MAPE of the CNN-GRU-Attention model of this invention are 0.0784, 0.0937 and 0.4557%, respectively, which are 18.3%, 21.8% and 22.8% lower than the suboptimal model.
[0063] With a 70% training set / 30% test set split, the MAE, RMSE and MAPE of the CNN-GRU-Attention model of this invention are 0.0385, 0.0431 and 0.2704%, respectively, which are 32.2%, 36.9% and 13.6% lower than the suboptimal model.
[0064] The specific comparison chart of prediction results is shown below. Figure 4 , Figure 5 As shown.
[0065] IV. System Application: Once the trained model parameters are solidified, they can be deployed to a fuel cell management system (FMS) or edge computing device to enable online, real-time monitoring and prediction of the fuel cell's health status.
[0066] The specific process for the online prediction phase is as follows: (1) Real-time acquisition of sensor data streams from fuel cells (which must be completely consistent with the input feature dimensions during training), with the acquisition frequency consistent with the resampling frequency during offline training.
[0067] (2) The preprocessing method used in the offline training stage is adopted: the real-time data is smoothed by using a moving average filter, and then the data of each feature dimension saved in the training stage is directly called. and This scales the real-time data to the [0,1] range.
[0068] (3) Maintain a first-in-first-out (FIFO) queue of length T in memory, push the normalized data of the current time to the tail of the queue, and remove the oldest data at the head of the queue to form an input tensor of shape [1,T,D] (D is the feature dimension).
[0069] (4) Input the input tensor into the trained CNN-GRU-Attention model for forward inference, and the model outputs the normalized SOH prediction value.
[0070] (5) Denormalize the normalized SOH prediction value to restore it to the true SOH physical dimensions (or percentage). The denormalization formula is: ; in, The final output SOH value of the fuel cell; The normalized predicted value output by the model. and These are the maximum and minimum values of the SOH labels in the training set, respectively.
[0071] (6) The denormalized SOH prediction value is pushed to the vehicle control unit or cloud monitoring platform for real-time monitoring of the fuel cell's health status. When the SOH prediction value is lower than a preset threshold (e.g., 80%), a warning or alarm signal is triggered to prompt fuel cell stack maintenance. At the same time, the SOH prediction value can be used as an input for energy management strategies to adjust the power output distribution of the fuel cell in order to extend the stack's service life.
[0072] Therefore, this invention presents a fuel cell health status prediction method based on a hybrid deep learning network. By selecting five key physical parameters—coolant inlet / outlet temperature difference, cathode pressure difference, gas flow rate difference, coolant flow rate, and output power—and employing a genetic algorithm to optimize the fusion weights, a comprehensive health status characterization index with multi-parameter fusion is constructed. This overcomes the shortcomings of traditional single voltage indicators, which struggle to comprehensively capture complex degradation mechanisms and exhibit severe fluctuations under dynamic operating conditions. This invention proposes a CNN-GRU-Attention hybrid architecture. CNN extracts cross-feature information from multiple sensors, GRU models long-term temporal dependencies, and a channel attention mechanism adaptively weights the hidden state vector. These three components work together to fully exploit the local features and key contextual information of non-stationary multi-sensor data, solving the problems of insufficient feature extraction and easy attenuation of key information in long-sequence transmission in existing deep learning methods. Furthermore, this invention strictly adheres to temporal prediction specifications; the normalized parameters are derived only from the training set, and the same parameters are used for the test set and online prediction, fundamentally preventing data leakage. Experiments show that, under the 60% / 40% and 70% / 30% division, the present invention significantly outperforms the LSTM, BiLSTM, and GRU comparative models in terms of MAE, RMSE, and MAPE. The present invention can be deployed in fuel cell management systems to achieve real-time SOH monitoring and early warning, providing reliable technical support for predictive maintenance.
[0073] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for predicting the health status of a fuel cell based on a hybrid deep learning network, characterized in that, Includes the following steps: Step 1, Data Acquisition and Preprocessing: Obtain historical operating time series data of fuel cells, and sequentially perform outlier removal, smoothing filtering and resampling to obtain a complete dataset; Step 2, Dataset Partitioning and Normalization: Divide the complete dataset into training and test sets in chronological order; perform min-max normalization independently on each feature dimension of the training set, calculate the extreme values of each dimension, and perform the same transformation on the test set using the corresponding extreme values of the training set. Then, a sliding window is used to reconstruct the normalized continuous time series into a sample-sequence format, where each sample contains feature data of T consecutive time steps, and T is a positive integer greater than 1. Step 3: Constructing a fused SOH label: Select the inlet and outlet temperature difference of coolant, cathode pressure difference, gas flow difference, coolant flow rate and output power during the operation of the fuel cell as health feature indicators. Optimize the weight of each indicator through a genetic algorithm, and use the weighted fusion result as the true label of the health status (SOH). Step 4: Building a Hybrid Deep Learning Model: Construct a prediction model consisting of a one-dimensional convolutional neural network (CNN) layer, a gated recurrent unit (GRU) layer, a channel attention mechanism layer, and an output layer. The CNN layer is used to extract feature cross-information within each time step of the input sequence. The GRU layer receives the feature sequence output by the CNN layer and outputs the hidden state vector at the last time step, which is used to represent the temporal dependency of the entire input sequence; the channel attention mechanism layer is used to perform channel-level adaptive weighting on the hidden state vector output by the GRU layer; the output layer uses fully connected layers to gradually reduce the dimensionality and finally outputs the SOH prediction value. Step 5, Model Training and Optimization: Train the hybrid deep learning model using the training set data processed in Step 2, use the mean squared error loss function to measure the prediction error, and use the Adam optimizer to update the model parameters. Step 6: Use the trained model to make predictions on the test set, and compare the prediction results with the true fused SOH labels after inverse normalization. Evaluate the model performance by calculating at least one of the following metrics: root mean square error (RMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE).
2. The fuel cell health status prediction method based on a hybrid deep learning network according to claim 1, characterized in that: In step 2, each feature dimension of the training set is independently subjected to min-max normalization to scale the data to the [0,1] interval, as shown below: ; in, This is the original data. , These are the minimum and maximum values of the feature in the training set, respectively. These are the normalized eigenvalues.
3. The fuel cell health status prediction method based on a hybrid deep learning network according to claim 2, characterized in that: In step 3, the optimization objective function of the genetic algorithm for: ; in, The fusion weighting coefficients for each health characteristic indicator; To adjust the coefficients for the weights of each penalty item; The time span of the sample data; For the first Monotonicity penalty term for each time step; The trend similarity coefficient; This is a penalty term for curve smoothness. This is a penalty term for the uniformity of weight distribution.
4. The fuel cell health status prediction method based on a hybrid deep learning network according to claim 3, characterized in that: In step 4, the CNN layer consists of two cascaded one-dimensional convolutional layers. The first convolutional layer uses 32 convolutional kernels of size 1×1, and the second convolutional layer uses 64 convolutional kernels of size 1×1, both using ReLU as the activation function.
5. The fuel cell health status prediction method based on a hybrid deep learning network according to claim 4, characterized in that: In step 4, the number of hidden units in the GRU layer is 50, and the hidden state vector of the last time step is output. .
6. The fuel cell health status prediction method based on a hybrid deep learning network according to claim 5, characterized in that: In the channel attention mechanism layer of step 4, the 50-dimensional features are first compressed to 12 dimensions through the first fully connected layer to aggregate global information. After ReLU activation, they are restored to 50 dimensions through the second fully connected layer, and then the channel attention weight vector is generated by the Sigmoid function. Then and Channel-by-channel multiplication yields the enhanced feature vector. .
7. The fuel cell health status prediction method based on a hybrid deep learning network according to claim 6, characterized in that: In step 5, the model training also employs a dynamic learning rate adjustment strategy and monitors the training set loss during training to implement an early stopping mechanism.
8. The fuel cell health status prediction method based on a hybrid deep learning network according to claim 7, characterized in that: In step 6, the formula for calculating the evaluation indicators is: ; ; ; in, For the first The model prediction value for each sample. For the first The true SOH value of each sample This represents the total number of samples in the test set.
9. The fuel cell health status prediction method based on a hybrid deep learning network according to claim 8, characterized in that: It also includes step 7, which involves deploying the trained model to a fuel cell management system or edge computing device to perform real-time prediction of the fuel cell health status.
