Solid oxide fuel cell voltage prediction method

By constructing a composite model based on long and short-term memory and convolutional neural network, the problem that traditional voltage prediction methods are difficult to accurately predict SOFC voltage fluctuations is solved, and more accurate and efficient voltage prediction is achieved, supporting SOFC performance optimization and stable operation.

CN119414239APending Publication Date: 2025-02-11TIANJIN UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411130838.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

Traditional solid oxide fuel cell voltage prediction methods are difficult to accurately predict voltage fluctuations during long-term operation, and statistical models based on experimental data have high requirements for data integrity and accuracy, resulting in uncertain prediction results.

Method used

Using a composite model based on long and short-term memory and convolutional neural network, the LSTM-CNN model is constructed and historical experimental data is used for training to achieve accurate prediction of SOFC voltage output.

Benefits of technology

This method can predict SOFC voltage output more accurately, overcomes the limitations of traditional methods, and provides a more comprehensive and efficient voltage prediction method, supporting SOFC performance optimization and stable operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119414239A_ABST
    Figure CN119414239A_ABST
Patent Text Reader

Abstract

The invention discloses a method for predicting the voltage of a solid oxide fuel cell. The method comprises the following steps: S1, acquiring short-term, medium-and-long-term and long-term voltage data of the solid oxide fuel cell from historical experimental data; s2, abnormal values in the acquired voltage data are processed, and a training set and a verification set are divided; s3, constructing a long-term and short-term memory and convolutional neural network model, and configuring a running environment required by the network; s4, inputting the training set data subjected to row normalization into the model for training until ideal training weight and predicted voltage data are obtained; and S5, collecting real-time voltage data of the solid oxide fuel cell, carrying out normalization processing, importing the weight obtained by training in the step S4 into the model, inputting the normalized real-time voltage data, and carrying out inverse normalization on a test result to obtain the real-time predicted voltage of the solid oxide fuel cell. The method is accurate and reliable in prediction, and the generalization ability of the model is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of solid oxide fuel cells, and in particular to a solid oxide fuel cell voltage prediction method based on long short-term memory and convolutional neural network. Background Art

[0002] Solid-Oxide Fuel Cell (SOFC), as an efficient and clean energy conversion device, has received extensive attention in the energy field in recent years. However, the performance of SOFC is affected by many factors, including microstructure, operating conditions, gas composition and flow rate, which makes its voltage output complex and dynamic. Traditional voltage prediction methods mainly rely on physical models. Although these methods can reflect the changing trend of battery performance to a certain extent, they are limited by the in-depth understanding of the complex internal mechanisms of the battery and it is difficult to accurately predict the voltage fluctuations during long-term operation. In addition, statistical models based on experimental data are also often used for SOFC voltage prediction, but these methods often require a large amount of experimental data as support and have high requirements for data integrity and accuracy. In practical applications, due to the limitations of experimental conditions and cost considerations, it is difficult to obtain sufficiently comprehensive experimental data, resulting in large uncertainties in the prediction results.

[0003] With the rapid development of artificial intelligence and big data technology, data-driven prediction methods have gradually become a research hotspot. Among them, Long Short-Term Memory Neural Network (LSTM) and Convolutional Neural Network (CNN) have shown excellent prediction performance in many fields due to their powerful time series data processing and feature extraction capabilities. LSTM network can effectively capture the long-term dependencies in time series data and is suitable for processing the long-term change trend in SOFC voltage output; while CNN is good at automatically extracting high-level features from raw data, which helps to identify the key factors affecting voltage output. At present, studies have shown that combining LSTM with CNN can further improve the performance of the prediction model. By extracting features from input data through CNN and then using LSTM to perform time series analysis on the extracted features, the voltage output of SOFC can be predicted more accurately. However, for the specific object of solid oxide fuel cells, the voltage prediction method based on the combination of LSTM and CNN is still in the initial exploration stage, and a systematic and complete technical solution has not yet been formed. Summary of the invention

[0004] The present invention aims to provide a solid oxide fuel cell voltage prediction method based on long short-term memory and convolutional neural network, and realizes accurate prediction of SOFC voltage output by constructing an LSTM-CNN composite model.

[0005] To this end, the present invention adopts the following technical solutions:

[0006] A solid oxide fuel cell voltage prediction method comprises the following steps:

[0007] S1, obtain short-term, medium-term and long-term voltage data of solid oxide fuel cells from historical experimental data;

[0008] S2, processes the abnormal values ​​in the voltage data obtained by S1 by linear interpolation method, and divides the processed voltage data into a training set and a validation set in proportion;

[0009] S3, based on the pytorch framework, builds long short-term memory and convolutional neural network models. Configuring the operating environment required by the network includes the following steps:

[0010] S31, build the network training environment through the Python compiler or deep learning server terminal, and successfully install dependencies and toolkits;

[0011] S32, building long short-term memory and convolutional neural networks through the deep learning framework CUDA+NVIDIA GPU+pytorch:

[0012] First, the training set data is processed to transform it into a tensor shape:

[0013] x = tensor(B, L, C)

[0014] Among them, x is the data processed into a tensor shape, B is the batch size, L is the sequence length, and C is the number of input channels;

[0015] Then, the data x is resized to match the convolution input requirements:

[0016] x1[B,C,L]=permute(x[B,L,C])

[0017] Among them, permute is the dimension conversion function, and x1 is the tensor data after the dimension is transformed;

[0018] The transformed tensor data x1 is passed through three 1D convolution layers with different convolution kernels for feature extraction:

[0019] f1 = ReLU(Conv1d [x1,w1,b1] [in_c=1, out_c=16, k_size=3, padding=1]);

[0020] f2 = ReLU(Conv1d [x1,w2,b2] [in_c=16, out_c=16, k_size=5, padding=2]);

[0021] f3 = ReLU(Conv1d [x1,w3,b3] [in_c=16, out_c=16, k_size=7, padding=3]);

[0022] Among them, f1, f2, f3 are the outputs of the three convolutional layers, w1, w2, w3 are the weights of the three convolutional layers, b1, b2, b3 are the biases of the three convolutional layers, in_c is the number of input channels, out_c is the number of output channels, k_size is the convolution kernel size, padding is the padding value, and ReLU is the activation function that adds nonlinearity;

[0023] The outputs of the three convolutional layers are then concatenated in the channel dimension to integrate feature information of different scales:

[0024] f=concatnate(f1, f2, f3, dim=1),

[0025] Among them, f is the multi-scale feature after splicing, concatnate is the feature splicing function, and dim=1 is the splicing dimension;

[0026] Next, initialize the hidden state and cell state of the LSTM network, and adjust the dimension of the concatenated features again through the permute method to meet the input requirements of the LSTM network:

[0027] h0=0[n,b,h];

[0028] c0=0[n,b,h];

[0029] f1[B,L,C]=permute(f[B,C,L]);

[0030] Where n is the number of LSTM network layers, b is the number of sequences processed by the LSTM network at one time, h is the number of hidden layers of the LSTM network, h0 is the initial hidden state tensor, c0 is the initial cell state tensor, and f1 is the multi-scale feature after dimension transformation;

[0031] After that, f1, h0, c0 are passed to the LSTM network to produce the output features and the cell state at the last time step and apply the activation function:

[0032] f2[h1,c1]=LSTM(f1,[h0,c0]);

[0033] f2′[h1, c1]=ReLU(f2,[:,-1,:]);

[0034] Among them, f2 is the output feature of the LSTM network, f2′ is the output feature after activation, h1 is the hidden state of the LSTM network at the last time step, and c1 is the cell state of the LSTM network at the last time step;

[0035] Finally, the activated output feature f2′ is passed to the fully connected layer to generate the final output features of the long short-term memory and convolutional neural network:

[0036] FC = W′·f2′+b′;

[0037] f out = FC(f2′);

[0038] Among them, W′ is the weight of the fully connected layer, b′ is the bias of the fully connected layer, and f out is the final output feature;

[0039] S4, normalizing the training set data and inputting the data into the long short-term memory and convolutional neural network model for deep training, and continuously optimizing the model parameters until the ideal training weights and predicted voltage data are obtained;

[0040] S5, collecting the real-time voltage data of the solid oxide fuel cell, normalizing it, importing the weights trained in S4 into the long short-term memory and convolutional neural network model and inputting the normalized real-time voltage data to obtain real-time predicted voltage data, and inversely normalizing the test results to obtain the real-time predicted voltage of the solid oxide fuel cell.

[0041] Preferably, in step S1, when acquiring the voltage data of the solid oxide fuel cell, extraction is performed every 10 seconds; the short term is the 1st to 3rd day, the medium to long term is the 4th to 7th day, and the long term is the 8th to 10th day or longer.

[0042] The method for processing abnormal values ​​in step S2 is:

[0043] S21, using a statistical method to identify the interval location of abnormal values ​​in the voltage data;

[0044] S22, find the two normal data points closest to the abnormal voltage value on both sides as the interpolation reference points for interpolation. The linear interpolation formula is:

[0045]

[0046] Among them, x t-1 is the previous time node corresponding to the nearest point on the left side of the outlier, xt+1 is the next time node closest to the outlier on the right, y t-1 is the voltage value corresponding to the nearest point on the left side of the outlier, y t+1 is the voltage value corresponding to the nearest point on the right side of the outlier, and y is the abnormal voltage replacement value calculated by linear interpolation;

[0047] Replace the corresponding outliers with the obtained y values;

[0048] When all outliers have been replaced, the processing effects are compared through visualization methods to ensure that the interpolated data maintains consistency in trend and does not introduce new anomalies or unreasonable data points;

[0049] S23, dividing the processed voltage data without outliers into a training set and a validation set in a ratio of 3:1.

[0050] Preferably, in step S2, the processed voltage data is divided into a training set and a validation set in a ratio of 3:1;

[0051] Step S4 includes the following sub-steps:

[0052] S41, normalizing the training set and validation set data to eliminate the dimension differences between different data and scale all voltage values ​​to the range of 0-1;

[0053] S42, using the mean square error MSE loss function and Adam optimizer for training, and setting the learning rate scheduler to adjust the learning rate after each predetermined epoch. During the training process, the model performs forward propagation, loss calculation, back propagation and parameter update on the normalized training set, and is evaluated on the normalized validation set after each epoch to monitor the model performance;

[0054] S43, after the training is completed, the obtained network model weights are saved to ensure that the network model can make accurate predictions on the real-time voltage data in subsequent steps in an expected manner.

[0055] The method for normalizing the training set data in step S41 is:

[0056] The training set data is processed using the Min-Max normalization method. The Min-Max normalization formula is:

[0057]

[0058] Among them, U is the battery voltage value of the original data, U min is the minimum battery voltage of the original data, U max is the maximum battery voltage of the original data, Unormm is the normalized battery voltage value.

[0059] The mean square error MSE loss function in step S42 is:

[0060]

[0061] Among them, Y i and are the voltage values ​​of the fuel cell at the ith and i′th time nodes respectively, and n is the total data volume of the collected voltage data training set.

[0062] Preferably, the long short-term memory and convolutional neural network models use the MSE loss function and the Adam optimizer, the batch size is batch size = 32, the number of LSTM hidden layers is hidden size = 50, the convolutional neural network convolution kernel size is kernel size = 3, 5, 7, the training round epoch = 100, and the initial learning rate is learning rate = 0.001.

[0063] Step S5 includes the following steps:

[0064] S51, collecting real-time voltage data of the solid oxide fuel cell as a test set;

[0065] S52, normalizing the test set data, inputting the normalized test set data into the long short-term memory and convolutional neural network model, calling the weights saved in S43 for testing, and obtaining a real-time voltage prediction value of the fuel cell;

[0066] S53, performing a denormalization process on the real-time voltage prediction value obtained in step S52 to obtain the actual voltage prediction value of the solid oxide fuel cell using the long short-term memory and convolutional neural network model:

[0067] U predict =U norm ·(U max -U min )+U min

[0068] Among them, U min is the minimum value of battery voltage in historical experiments, U max is the maximum battery voltage in historical experiments, U norm is the normalized battery voltage value, U predict is the predicted value of the actual battery voltage after denormalization.

[0069] The solid oxide fuel cell voltage prediction method of the present invention fully utilizes the advantages of LSTM in processing time series data and the ability of CNN in feature extraction, overcomes the limitations of traditional prediction methods, and can provide a more comprehensive and efficient method for solid oxide fuel cell voltage prediction, which can provide strong support for performance optimization and stable operation of SOFC.

[0070] Compared with the prior art, the present invention has the following beneficial effects:

[0071] 1. The method of the present invention innovatively combines long short-term memory with convolutional neural network. The convolutional neural network can automatically extract local features from the original input data through the convolution layer. These features are very effective in capturing short-term fluctuations and patterns in voltage data. Subsequently, the long short-term memory network uses these features to model long-term dependencies, thereby improving the model's prediction accuracy for voltage change trends. This fusion strategy provides a more comprehensive and efficient method for solid oxide fuel cell voltage prediction.

[0072] 2. The method of the present invention has significantly improved the traditional single convolutional neural network by introducing three convolution kernels of different sizes to construct a multi-scale convolutional neural network. This innovative design enables the network to capture richer and more diverse feature information across different sizes and depths from the input voltage data. This multi-scale feature extraction capability greatly enhances the model's ability to recognize and understand complex voltage change patterns, thereby improving the accuracy and reliability of voltage prediction.

[0073] 3. The method of the present invention can flexibly process voltage data with sequence characteristics by defining custom data sets and data loaders. This processing method allows the model to receive input data in the form of a sequence and better capture the time dependency in the voltage data. In addition, the method of the present invention can automatically adjust the learning rate according to a preset period during training. This dynamic adjustment mechanism helps the model to converge quickly in the early stages of training, and fine-tune parameters in the later stages to reduce the risk of overfitting and improve the generalization ability of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] Figure 1 A flow chart of a solid oxide fuel cell voltage prediction method according to the present invention;

[0075] Figure 2 This is a diagram showing the effect of the long short-term memory and convolutional neural network of the present invention on the short-term (1st to 3rd day) voltage data prediction of a solid oxide fuel cell;

[0076] Figure 3 This is a diagram showing the effect of the long short-term memory and convolutional neural network of the present invention on the medium- and long-term (4-7 days) voltage data prediction of a solid oxide fuel cell;

[0077] Figure 4 This is a diagram showing the effect of the long short-term memory and convolutional neural network of the present invention on the long-term (8th to 10th day) voltage data prediction of a solid oxide fuel cell;

[0078] Figure 5 This is a diagram showing the prediction effect of the solid oxide fuel cell voltage prediction method of the present invention on the real-time voltage data of the solid oxide fuel cell. DETAILED DESCRIPTION

[0079] The method of the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0080] See also Figure 1 The solid oxide fuel cell voltage prediction method of the present invention comprises the following steps:

[0081] S1, obtain short-term, medium-term and long-term voltage data of solid oxide fuel cells from historical experimental data. The voltage data can be directly used for training and verification of prediction models, helping the model to learn the trend of voltage changes over time, so as to accurately predict the future short-term, medium-term and long-term voltage output.

[0082] In order to avoid the high sampling rate experimental data introducing more redundant information, it is preferred that the voltage data of the solid oxide fuel cell is extracted at one point every 10 seconds. The selection of extracting one voltage data point every 10 seconds as the sampling interval is based on a deep understanding of the working characteristics of the solid oxide fuel cell and a preliminary evaluation of the data redundancy. The data point every 10 seconds can not only retain sufficient time resolution to capture the long-term trend of voltage changes over time, such as voltage fluctuations caused by load changes, fuel supply fluctuations, etc., but also effectively reduce the amount of data and eliminate non-critical changes caused by measurement noise, small fluctuations of equipment, etc. in the short term.

[0083] The present invention divides the extracted voltage data into three stages: the voltage data of the 1st to 3rd day is short-term data, the voltage data of the 4th to 7th day is medium- and long-term data, and the voltage data of the 8th to 10th day and longer is long-term data.

[0084] Specifically, in the short-term stage of solid oxide fuel cell operation, voltage changes may be mainly caused by fine-tuning of fuel flow rate, rapid changes in load or slight adjustments in operating conditions. Analysis of short-term data can enable the network model to quickly adapt to immediate changes; in the medium- and long-term stages of solid oxide fuel cell operation, voltage fluctuations may be affected by adjustments to the balance of chemical reactions inside the fuel cell, gradual changes in material properties or system maintenance cycles. Analysis of medium- and long-term data can help the network model capture these slower but continuous influencing factors; in the long-term stage of solid oxide fuel cell operation, voltage changes may be more related to material aging, durability limitations of system design or performance degradation under long-term operating conditions. Analysis of long-term data can better understand the long-term operating characteristics of solid oxide fuel cells, predict performance changes during their life cycle, and formulate battery maintenance strategies.

[0085] S2, due to electrochemical workstation equipment failure or data entry error, the solid oxide fuel cell voltage data will produce some abnormal voltage values. Therefore, the abnormal voltage values ​​are processed by linear interpolation, and the processed voltage data are divided into a training set and a validation set according to a suitable ratio.

[0086] Processing outliers in solid oxide fuel cell voltage data using linear interpolation can maintain data continuity and smoothness, improve processing efficiency, avoid information loss and enhance adaptability to data outliers. This method can provide a more accurate and reliable data basis for subsequent voltage prediction models.

[0087] The specific steps are as follows:

[0088] S21, identifying the interval position of the abnormal value in the voltage data.

[0089] Statistical methods (box plot, Z-score method) are used to identify the intervals where outliers in the voltage data are located.

[0090] Outliers will distort the statistical characteristics of the data, thereby affecting the performance of the prediction model. By removing outliers, the data set can be purified, noise interference can be reduced, and network model training can be more focused on learning the real data distribution patterns.

[0091] S22, obtaining a replacement value of the abnormal voltage by linear interpolation.

[0092] Find the two normal data points closest to the abnormal voltage value on both sides as the interpolation reference points for interpolation. The linear interpolation formula is:

[0093]

[0094] Among them, x t-1is the time node corresponding to the nearest point on the left side of the outlier, x t+1 is the time node corresponding to the nearest point to the right of the outlier, y t-1 is the voltage value corresponding to the nearest point on the left side of the outlier, y t+1 is the voltage value corresponding to the nearest point on the right side of the outlier, and y is the replacement value of the outlier voltage calculated by linear interpolation.

[0095] Replace the corresponding outliers with the obtained y values.

[0096] When all outliers have been replaced, visualization methods are used to compare the processing effects to ensure that the interpolated data maintains consistency in trend and does not introduce new anomalies or unreasonable data points.

[0097] S23, dividing the processed voltage data without abnormal values ​​into a training set and a validation set according to proportion.

[0098] S3, builds long short-term memory and convolutional neural network models based on the pytorch framework and configures the operating environment required by the network. The specific steps are as follows:

[0099] S31, train the LSTM and CNN through the deep learning framework CUDA+NVIDIA GPU+pytorch, and set the initial parameters. The LSTM and CNN include three parts: CNN, LSTM and FCL. The LSTM and CNN first extract features from the input data through the one-dimensional convolution layer Conv1d, then use the LSTM layer to capture the long-term dependencies in the sequence data, and finally output the prediction results through the FCL. The CNN consists of three parallel branches: the first branch includes 3×3 one-dimensional convolution layers and ReLU activation functions connected in sequence, the second branch includes 5×5 one-dimensional convolution layers and ReLU activation functions connected in sequence, and the third branch includes 7×7 one-dimensional convolution layers and ReLU activation functions connected in sequence. The three branches work in parallel to achieve multi-scale feature extraction of the voltage data of the solid oxide fuel cell.

[0100] The feature concatenation layer concatenates and fuses the output features of the above three branches to meet the input feature requirements of the long short-term memory network.

[0101] The long short-term memory network captures the long-term dependencies in the fused features and finally outputs the prediction results through the fully connected layer.

[0102] S32, through the deep learning framework CUDA+NVIDIA GPU+pytorch to build long short-term memory and convolutional neural network, first of all, the training set data is processed and transformed into tensor shape as follows:

[0103] x = tensor(B, L, C)

[0104] Among them, x is the data processed into a tensor shape, B is the batch size, L is the sequence length, and C is the number of input channels;

[0105] The data x processed into a tensor shape is then resized to match the convolution input requirements:

[0106] x1[B,C,L]=permute(x[B,L,C])

[0107] Among them, permute is the dimension conversion function, and x1 is the tensor data after the dimension is transformed;

[0108] The transformed tensor data x1 is passed through three 1D convolution layers with different convolution kernels for feature extraction:

[0109] f1 = ReLU(Conv1d [x1,w1,b1] [in_c=1, out_c=16, k_size=3, padding=1])

[0110] f2 = ReLU(Conv1d [x1,w2,b2] [in_c=16, out_c=16, k_size=5, padding=2])

[0111] f3 = ReLU(Conv1d [x1,w3,b3] [in_c=16, out_c=16, k_size=7, padding=3])

[0112] Among them, f1, f2, f3 are the outputs of the three convolutional layers, w1, w2, w3 are the weights of the three convolutional layers, b1, b2, b3 are the biases of the three convolutional layers, in_c is the number of input channels, out_c is the number of input channels, k - size is the convolution kernel size, padding is the padding value, and ReLU is the activation function that adds nonlinearity;

[0113] The outputs of the three convolutional layers are then concatenated in the channel dimension to integrate feature information of different scales:

[0114] f=concatnate(f1, f2, f3, dim=1)

[0115] Among them, f is the multi-scale feature after splicing, concatnate is the feature splicing function, and dim=1 is the splicing dimension;

[0116] Next, initialize the hidden state and cell state of the LSTM network, and adjust the dimension of the concatenated features again through the permute method to meet the input requirements of the LSTM network:

[0117] h0=0[n,b,h]

[0118] c0=0[n,b,h]

[0119] f1[B,L,C]=permute(f[B,C,L])

[0120] Where n is the number of LSTM network layers, b is the number of sequences processed by the LSTM network at one time, h is the number of hidden layers of the LSTM network, h0 is the initial hidden state tensor, c0 is the initial cell state tensor, and f1 is the multi-scale feature after dimension transformation;

[0121] After that, f1, h0, c0 are passed to the LSTM network to produce the output features and the last time step state and apply the activation function:

[0122] f2[h1,c1]=LSTM(f1,[h0,c0])

[0123] f2′[h1, c1]=ReLU(f2,[:,-1,:])

[0124] Among them, f2 is the output feature of the LSTM network, f2′ is the output feature after activation, h1 is the hidden state of the LSTM network at the last time step, and c1 is the cell state of the LSTM network at the last time step;

[0125] Finally, the activated output feature f2′ is passed to the fully connected layer to generate the final output features of the long short-term memory and convolutional neural network:

[0126] FC=W′·f2′+b′

[0127] f out =FC(f2′)

[0128] Among them, W′ is the weight of the fully connected layer, b′ is the bias of the fully connected layer, and f out is the final output feature.

[0129] S4, after normalizing the training set data, input it into the long short-term memory and multi-scale convolutional neural network model for deep training, and continuously optimize the model parameters until the ideal training weights and predicted voltage data are obtained. Specifically, the following steps are included:

[0130] S41, normalize the training set and validation set data:

[0131] Due to the influence of various factors such as experimental conditions and battery status, voltage data often have different dimensions and value ranges. Using the Min-Max normalization method to process voltage data can eliminate the dimension differences between different data and scale all voltage values ​​to the range of 0-1, which is helpful for subsequent data processing and analysis. The Min-Max normalization formula is:

[0132]

[0133] Among them, U is the battery voltage value of the original data, U min is the minimum battery voltage of the original data, U max is the maximum battery voltage of the original data, U norm is the normalized battery voltage value.

[0134] S42, network model training uses the mean square error MSE loss function and Adam optimizer for training, and sets the learning rate scheduler to adjust the learning rate after each predetermined epoch. During the training process, the model performs forward propagation, calculates loss, backpropagation and parameter updates on the normalized training set, and after each epoch, it is evaluated on the normalized validation set to monitor model performance.

[0135] Specifically, the mean square error MSE loss function is:

[0136]

[0137] Among them, Y i and are the voltage values ​​of the fuel cell at the ith and i′th time nodes respectively, and n is the total data volume of the collected voltage data training set.

[0138] By minimizing the MSE, the network model is able to learn how to predict the voltage of the fuel cell more accurately. After each epoch, by calculating the MSE on the validation set, the performance of the model on unlearned data can be monitored, which helps to evaluate the generalization ability of the model and prevent overfitting.

[0139] S43, after the training is completed, the obtained network model weights are saved to obtain the long short-term memory and convolutional neural network models. In the subsequent steps, after the normalized real-time data is input into the network model, the fuel cell voltage can be accurately predicted.

[0140] S5, collect the real-time voltage data of the solid oxide fuel cell, normalize it, import the weights trained in S4 into the long short-term memory and convolutional neural network model and input the normalized real-time voltage data to obtain real-time predicted voltage data. After inverse normalization of the test results, the real-time predicted voltage of the solid oxide fuel cell is obtained. Specifically, the following sub-steps are included:

[0141] S51, collecting experimental data of the solid oxide fuel cell in real time through an electrochemical workstation, a computer and other equipment, and extracting real-time voltage data as a test set;

[0142] S52, normalizing the test set data and inputting it into the long short-term memory and convolutional neural network model obtained in S4 for testing to obtain a real-time voltage prediction value of the fuel cell.

[0143] S53, performing a denormalization process on the real-time voltage prediction value obtained in step S52 to obtain the actual voltage prediction value of the solid oxide fuel cell using the long short-term memory and convolutional neural network model:

[0144] U predict =U norm ·(U max -U min )+U min

[0145] Among them, U min is the minimum battery voltage of historical experimental data, U max is the maximum battery voltage of historical experimental data, U norm is the normalized battery voltage value, U predict is the predicted value of the actual battery voltage after denormalization.

[0146] Example

[0147] A solid oxide fuel cell voltage prediction method comprises the following steps:

[0148] S1, obtain short-term, medium-term and long-term voltage data of solid oxide fuel cells from historical experimental data;

[0149] S2 processes the abnormal values ​​in the voltage data obtained by S1 through linear interpolation, and divides the processed voltage data into a training set and a validation set in a ratio of 3:1.

[0150] In this embodiment, the voltage data changes of the fuel cell before and after linear interpolation are shown in Table 1:

[0151] Table 1

[0152] Timestamp Original voltage value (V) Outlier identification Interpolated voltage value (V) Remark 2024-0X-01 XX:60 0.8925 Normal data 2024-0X-01 XX:70 0.5832 abnormal 0.8925 Interpolation 2024-0X-01 XX:80 0.8925 Normal data …… …… …… …… …… 2024-0X-01 XX:20 0.8924 Normal data 2024-0X-01 XX:30 0.6107 abnormal 0.8924 Interpolation 2024-0X-01 XX:40 0.8924 Normal data

[0153] S3, builds long short-term memory and convolutional neural network models based on the pytorch framework, and configures the operating environment required by the network.

[0154] In this embodiment, the training parameters set for the long short-term memory and convolutional neural network models are shown in Table 3:

[0155] Table 3

[0156]

[0157]

[0158] The long short-term memory and convolutional neural network models use the MSE loss function and the Adam optimizer. In this embodiment, the batch size is 32, the number of LSTM hidden layers is 50, the convolutional neural network convolution kernel size is 3, 5, 7, the training round epoch is 100, and the initial learning rate is 0.001.

[0159] S4, after normalizing the training set data, input it into the long short-term memory and convolutional neural network model for deep training, and continuously optimize the model parameters until the ideal training weights and predicted voltage data are obtained.

[0160] S5, collects the real-time voltage data of the solid oxide fuel cell, normalizes it, imports the weights obtained by S4 training into the long short-term memory and convolutional neural network model and inputs the normalized real-time voltage data to obtain real-time predicted voltage data, and obtains the real-time predicted voltage of the solid oxide fuel cell after inverse normalization of the test results.

[0161] In this embodiment:

[0162] The results of short-term (1-3 days) voltage prediction of solid oxide fuel cells using long short-term memory and convolutional neural networks are shown in Figure 2. Figure 2 As shown, the first 54 hours of data are used as a training set for network model training, and the last 18 hours of data are used as a validation set for network model prediction, and the predicted voltage value is compared with the actual voltage value. It can be seen from the figure that the voltage of the solid oxide fuel cell decreases steadily at this stage, and the method of the present invention can accurately capture the time node of the voltage drop trend and make an accurate prediction.

[0163] Long short-term memory and convolutional neural network for solid oxide fuel cell medium- and long-term (4-7 days) voltage prediction results are as follows Figure 3As shown, the first 72 hours of data are used as a training set for network model training, and the last 24 hours of data are used as a validation set for network model prediction, and the predicted voltage value is compared with the actual voltage value. It can be seen from the figure that the voltage of the solid oxide fuel cell shows a small fluctuation at this stage but is still on a downward trend overall. The method of the present invention can accurately capture the small fluctuation trend of the battery and make accurate predictions.

[0164] Long short-term memory and convolutional neural network for solid oxide fuel cell long-term (8-10 days) voltage prediction results are as follows Figure 4 As shown, the first 54 hours of data are used as a training set for network model training, and the last 18 hours of data are used as a validation set for network model prediction, and the predicted voltage value is compared with the actual voltage value. It can be seen from the figure that the voltage fluctuation of the solid oxide fuel cell increases significantly and the change trend is more complicated at this stage. The method of the present invention can accurately capture the large fluctuation trend of the battery and make accurate predictions.

[0165] The prediction results of long short-term memory and convolutional neural network for solid oxide fuel cell real-time voltage (test set) are as follows Figure 5 As shown, the predicted voltage value and the real voltage value are compared. It can be seen from the figure that the method of the present invention has real-time prediction capability after training according to S1-S4, and can make accurate predictions for unknown new data.

Claims

1. A solid oxide fuel cell voltage prediction method, characterized in that: The following steps are involved: S1, obtain short-term, medium-term and long-term voltage data of solid oxide fuel cells from historical experimental data; S2, processes the abnormal values ​​in the voltage data obtained by S1 by linear interpolation method, and divides the processed voltage data into a training set and a validation set in proportion; S3, based on the pytorch framework, builds long short-term memory and convolutional neural network models. Configuring the operating environment required by the network includes the following steps: S31, build the network training environment through the Python compiler or deep learning server terminal, and successfully install dependencies and toolkits; S32, building long short-term memory and convolutional neural networks through the deep learning framework CUDA+NVIDIA GPU+pytorch: First, the training set data is processed to transform it into a tensor shape: x = tensor(B, L, C) Among them, x is the data processed into a tensor shape, B is the batch size, L is the sequence length, and C is the number of input channels; Then, the data x is resized to match the convolution input requirements: x1[B,C,L]=permute(x[B,L,C]) Among them, permute is the dimension conversion function, and x1 is the tensor data after the dimension is transformed; The transformed tensor data x1 is passed through three 1D convolution layers with different convolution kernels for feature extraction: f1=ReLU(Conv1d [x1,w1,b1] [in_c=1,out_c=16,k_size=3,padding=1]); f2=ReLU(Conv1d [x1,w2,b2] [in_c=16,out_c=16,k_size=5,padding=2]); f3=ReLU(Conv1d [x1,w3,b3] [in_c=16,out_c=16,k_size=7,padding=3]); Among them, f1, f2, f3 are the outputs of the three convolutional layers, w1, w2, w3 are the weights of the three convolutional layers, b1, b2, b3 are the biases of the three convolutional layers, in_c is the number of input channels, out_c is the number of output channels, k_size is the convolution kernel size, Padding is the filling value, and ReLU is the activation function that adds nonlinearity; The outputs of the three convolutional layers are then concatenated in the channel dimension to integrate feature information of different scales: f=concatnate(f1, f2, f3, dim=1), Among them, f is the multi-scale feature after splicing, concatnate is the feature splicing function, and dim=1 is the splicing dimension; Next, initialize the hidden state and cell state of the LSTM network, and adjust the dimension of the concatenated features again through the permute method to meet the input requirements of the LSTM network: h0=0[n,b,h]; c0=0[n,b,h]; f1[B,L,C]=permute(f[B,C,L]); Where n is the number of LSTM network layers, b is the number of sequences processed by the LSTM network at one time, h is the number of hidden layers of the LSTM network, h0 is the initial hidden state tensor, c0 is the initial cell state tensor, and f1 is the multi-scale feature after dimension transformation; After that, f1, h0, c0 are passed to the LSTM network to produce the output features and the cell state at the last time step and apply the activation function: f2[h1,c1]=LSTM(f1,[h0,c0]); f2′[h1, c1]=ReLU(f2,[:,-1,:]); Among them, f2 is the output feature of the LSTM network, f2′ is the output feature after activation, h1 is the hidden state of the LSTM network at the last time step, and c1 is the cell state of the LSTM network at the last time step; Finally, the activated output feature f2′ is passed to the fully connected layer to generate the final output features of the long short-term memory and convolutional neural network: FC = W′·f2′+b′; f out =FC(f2′); Among them, W′ is the weight of the fully connected layer, b′ is the bias of the fully connected layer, and f out is the final output feature; S4, normalizing the training set data and inputting the data into the long short-term memory and convolutional neural network model for deep training, and continuously optimizing the model parameters until the ideal training weights and predicted voltage data are obtained; S5, collecting the real-time voltage data of the solid oxide fuel cell, normalizing it, importing the weights trained in S4 into the long short-term memory and convolutional neural network model and inputting the normalized real-time voltage data to obtain real-time predicted voltage data, and inversely normalizing the test results to obtain the real-time predicted voltage of the solid oxide fuel cell.

2. The solid oxide fuel cell voltage prediction method according to claim 1, characterized in that: In S1, when acquiring the voltage data of the solid oxide fuel cell, the data is extracted every 10 seconds; the short term is the 1st to 3rd day, the medium to long term is the 4th to 7th day, and the long term is the 8th to 10th day or longer.

3. The solid oxide fuel cell voltage prediction method according to claim 1, characterized in that: The method for processing abnormal values ​​in step S2 is: S21, using a statistical method to identify the interval location of abnormal values ​​in the voltage data; S22, find the two normal data points closest to the abnormal voltage value on both sides as the interpolation reference points for interpolation. The linear interpolation formula is: Among them, x t-1 is the previous time node corresponding to the nearest point on the left side of the outlier, x t+1 is the next time node closest to the outlier on the right, y t-1 is the voltage value corresponding to the nearest point on the left side of the outlier, y t+1 is the voltage value corresponding to the nearest point on the right side of the outlier, and y is the abnormal voltage replacement value calculated by linear interpolation; Replace the corresponding outliers with the obtained y values; When all outliers have been replaced, the processing effects are compared through visualization methods to ensure that the interpolated data maintains consistency in trend and does not introduce new anomalies or unreasonable data points; S23, dividing the processed voltage data without outliers into a training set and a validation set in a ratio of 3:

1.

4. The solid oxide fuel cell voltage prediction method according to claim 1, characterized in that: In S2, the processed voltage data is divided into a training set and a validation set in a ratio of 3:

1.

5. The solid oxide fuel cell voltage prediction method according to claim 1, characterized in that: Step S4 is specifically as follows: S41, normalizing the training set and validation set data to eliminate the dimension differences between different data and scale all voltage values ​​to the range of 0-1; S42, using the mean square error MSE loss function and Adam optimizer for training, and setting the learning rate scheduler to adjust the learning rate after each predetermined epoch. During the training process, the model performs forward propagation, loss calculation, back propagation and parameter update on the normalized training set, and is evaluated on the normalized validation set after each epoch to monitor the model performance; S43, after the training is completed, the obtained network model weights are saved to ensure that the network model can make accurate predictions on the real-time voltage data in subsequent steps in an expected manner.

6. The solid oxide fuel cell voltage prediction method according to claim 5, characterized in that: The method for normalizing the training set data in step S41 is: The training set data is processed using the Min-Max normalization method. The Min-Max normalization formula is: Among them, U is the battery voltage value of the original data, U min is the minimum battery voltage of the original data, U max is the maximum battery voltage of the original data, U norm is the normalized battery voltage value.

7. The solid oxide fuel cell voltage prediction method according to claim 5, characterized in that: The mean square error MSE loss function in step S42 is: Among them, Y i and The fuel cells at the ith and ith ′ The voltage value at each time node is n, and n is the total data volume of the collected voltage data training set.

8. The solid oxide fuel cell voltage prediction method according to claim 5, characterized in that: The long short-term memory and convolutional neural network models use the MSE loss function and Adam optimizer, batch size batch size = 32, number of LSTM hidden layers hidden size = 50, convolutional neural network convolution kernel size kernel size = 3, 5, 7, training round epoch = 100, initial learning rate learning rate = 0.

001.

9. The solid oxide fuel cell voltage prediction method according to claim 7, characterized in that: Step S5 includes the following steps: S51, collecting real-time voltage data of the solid oxide fuel cell as a test set; S52, normalizing the test set data, inputting the normalized test set data into the long short-term memory and convolutional neural network model, calling the weights saved in S43 for testing, and obtaining a real-time voltage prediction value of the fuel cell; S53, performing a denormalization process on the real-time voltage prediction value obtained in step S52 to obtain the actual voltage prediction value of the solid oxide fuel cell using the long short-term memory and convolutional neural network model: IN predict =U norm ·(IN max -IN min )+U min Among them, U min is the minimum value of battery voltage in historical experiments, U max is the maximum battery voltage in historical experiments, U norm is the normalized battery voltage value, U predict is the predicted value of the actual battery voltage after denormalization.