# State of Health Prediction for Lithium-Ion Batteries Using Transformer-LSTM Fusion Model
## 4 Results and Discussion
### Prediction on the Same Battery  
In predicting the SOH of the same battery, the main challenges are twofold. On the one hand, the selected features need to be closely related to the SOH; on the other hand, the change in battery capacity usually shows a slow decline in the early stage, and as the use time increases, the SOH will enter a stage of accelerated decline along with the battery capacity. Therefore, the selection of features needs to accurately reflect the changing trends of the long-term health status of the battery. At the same time, the prediction model must adapt to the accelerated decline phase based on the training data of early capacity degradation to achieve accurate SOH prediction.  
We selected two batteries from each of the batches \"2017-05-12\", \"2017-06-30\", and \"2018-04-12\" in the dataset to predict the SOH of the same battery. These batteries were those with channel numbers 18 and 20 in the \"2017-05-12\" batch, channel numbers 8 and 48 in the \"2017-06-30\" batch, and channel numbers 17 and 42 in the \"2018-04-12\" batch. In the dataset of each battery, we used the first half as the training set and the second half as the test set, with a ratio of 1:1 between the training set and the test set. In the SOH prediction for the same battery, selecting a small number of representative features can often bring better prediction results than using more features. However, too few features may be interfered with by noise, thus affecting the accuracy of the prediction. Finally, three key features were selected from batches \"2017-05-12\" and \"2018-04-12\", and five key features were selected from the \"2017-06-30\" batch for SOH prediction.  
The SOH prediction results for the same battery are shown in Figure 10. It can be observed that the SOH value (blue curve) in the first half shows a slow decay trend, while in the second half, the rate of decline of SOH is significantly accelerated. Using the first-half data to predict the second half, although a noticeable deviation exists between the predicted and true values towards the end of the prediction, the results indicate that the trend between the predicted values (red curve) and the true values is largely consistent. According to the prediction evaluation indicators shown in Table 1, the \(RMSE\) values of the six batteries are between 0.00205 and 0.00984 and the \(MAE\) values are between 0.00163 and 0.00621. These data show that although the prediction errors of batteries in different batches are different, overall, the model has high accuracy in SOH prediction. In particular, the battery with channel number 42 in the \"2018-04-12\" batch has a very small prediction error, which is consistent with the results in Figure 10. This shows that the features selected based on the transformer-LSTM prediction model can accurately capture the changing patterns of battery SOH, verifying the effectiveness and accuracy of the selected features and models in battery SOH prediction.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Battery** & \(RMSE\) & \(MAE\) \\ \hline
2017-05-12\_18 & 0.00509 & 0.00338 \\
2017-05-12\_20 & 0.00329 & 0.00272 \\
2017-06-30\_8 & 0.00984 & 0.00621 \\
2017-06-30\_48 & 0.00392 & 0.00185 \\
2018-04-12\_17 & 0.00231 & 0.00163 \\
2018-04-12\_42 & 0.00205 & 0.00189 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Prediction evaluation indicators on the same battery.  
Figure 10: (**a**) Prediction results for battery with batch number 18 on “2017-05-12”, (**b**) prediction results for battery with batch number 20 on “2017-05-12”, (**c**) prediction results for battery with batch number 8 on “2017-06-30”, (**d**) prediction results for battery with batch number 48 on “2017-06-30”, (**e**) prediction results for battery with batch number 17 on “2018-04-12”, (**f**) prediction results for battery with batch number 42 on “2018-04-12”.