# Lithium Battery SOH Estimation Based on Manifold Learning and LightGBM
## 5 Instance Validation
### SOH Prediction Based on LightGBM Model  
In this paper, the cell capacity is used to describe the SOH of the cell, defined as follows:  
\[SOH=1-\frac{C_{init}-C_{batt}}{0.2C_{init}} \tag{20}\]  
where \(C_{init}\) represents the rated capacity, \(C_{batt}\) represents the actual capacity, and \(0.2<C_{batt}<C_{init}\). Battery RUL indicates the number of cycles between the capacity decay of a lithium battery and its 80% capacity. According to the EOL standard, the failure thresholds of B0005, B0006, and B0007 batteries are set to 1.38 Ah, 1.38, Ah and 1.5 Ah, respectively, which can be calculated as 128 cycle count points for B0005 to reach the failure threshold point for the first time, 112 cycle count points for B0006 to reach the failure threshold point for the first time, and 125 cycle count points for B0007 to reach the failure threshold point for the first time. The six-dimensional health factor sequence obtained above is used as the input of the LightGBM model for battery SOH prediction. For the 168 cycles of battery B0005, B0006, and B0007 data obtained after feature processing, the first 84 cycles were taken as the training set and the 85 th to 168 th cycles were taken as the test set. Here, the grid search method is used to find the optimization of the hyperparameters of the LightGBM model. The num_leaves, learning_rate, and n_estimators of the LightGBM model are selected as the grid search parameters, and five-times cross-validation is used in the adjustment process of each parameter to obtain the optimal LightGBM model with negative mean square error (NMSE) as the objective function. The optimal values of the above parameters for the LightGBM model were obtained after the grid search method to find the optimal values, as shown in Table 2.  
The prediction results for their test set SOH and RUL are shown in Figure 12. To demonstrate that statistical significance is reflected, a 95% confidence interval is added to the prediction results as an indication that there is only a 5% or smaller margin of probability that the true results will occur outside the confidence interval. As can be seen from Figure 12, on the test set results of dataset A, the fit of each prediction curve is good, the overlap between the prediction curves and the true capacity curves is high, the overall prediction curves fit the true values well, and the true values of the capacities all fall within the 95% confidence interval predicted by the LightGBM model, \begin{table}
\begin{tabular}{c c c c} \hline
**Battery Number** & **Num\_Leaves** & **Learning\_Rate** & **n\_Estimators** \\ \hline
5 & 17 & 0.1837 & 60 \\
6 & 26 & 0.0163 & 60 \\
7 & 10 & 0.1563 & 71 \\ Parameter range & [2, 50] & [0.001, 0.5] & [1, 100] \\ \hline \end{tabular}
\end{table} 
Table 2: Optimization search results. indicating that the model can achieve the prediction purpose well on the SOH estimation and RUL prediction in dataset A. In order to show the prediction accuracy of each cell in more detail, mean square error (MSE), mean absolute error (MAE), and goodness-of-fit (R-Squared, \(R^{2}\)) are chosen as the prediction models. The prediction results are evaluated by the evaluation indexes. The specific information and error distribution of the prediction evaluation indexes are shown in Table 3 and Figure 13, respectively. \begin{table}
\begin{tabular}{c c c c c} \hline
**Battery Number** & **MSE** & **MAE** & **AE** & \(R^{2}\) \\ \hline
5 & \(1.2740\times 10^{-4}\) & 0.0076 & 0 & 0.9889 \\
6 & \(5.4299\times 10^{-4}\) & 0.0175 & 1 & 0.9865 \\
7 & \(9.0437\times 10^{-5}\) & 0.0069 & 0 & 0.9921 \\ \hline \end{tabular}
\end{table} 
Table 3: Specific information on predictive evaluation indicators. Figure 12: Prediction results of the dataset A test set. (**a**) Battery 5 test set prediction results. (**b**) Battery 6 test set prediction results. (**c**) Battery 7 test set prediction results.