Fast Charging of Lithium-Ion Batteries Using Deep Bayesian Optimization
  with Recurrent Neural Network
Fast charging has attracted increasing attention from the battery community
for electrical vehicles (EVs) to alleviate range anxiety and reduce charging
time for EVs. However, inappropriate charging strategies would cause severe
degradation of batteries or even hazardous accidents. To optimize fast-charging
strategies under various constraints, particularly safety limits, we propose a
novel deep Bayesian optimization (BO) approach that utilizes Bayesian recurrent
neural network (BRNN) as the surrogate model, given its capability in handling
sequential data. In addition, a combined acquisition function of expected
improvement (EI) and upper confidence bound (UCB) is developed to better
balance the exploitation and exploration. The effectiveness of the proposed
approach is demonstrated on the PETLION, a porous electrode theory-based
battery simulator. Our method is also compared with the state-of-the-art BO
methods that use Gaussian process (GP) and non-recurrent network as surrogate
models. The results verify the superior performance of the proposed fast
charging approaches, which mainly results from that: (i) the BRNN-based
surrogate model provides a more precise prediction of battery lifetime than
that based on GP or non-recurrent network; and (ii) the combined acquisition
function outperforms traditional EI or UCB criteria in exploring the optimal
charging protocol that maintains the longest battery lifetime.
Benben Jiang, Yixing Wang, Zhenghua Ma, Qiugang Lu
Fast Charging of Lithium-Ion Batteries Using Deep Bayesian Optimization with Recurrent Neural Network

###### Abstract

Fast charging has attracted increasing attention from the battery community for electrical vehicles (EVs) to alleviate range anxiety and reduce charging time for EVs. However, inappropriate charging strategies would cause severe degradation of batteries or even hazardous accidents. To optimize fast-charging strategies under various constraints, particularly safety limits, we propose a novel deep Bayesian optimization (BO) approach that utilizes Bayesian recurrent neural network (BRNN) as the surrogate model, given its capability in handling sequential data. In addition, a combined acquisition function of expected improvement (EI) and upper confidence bound (UCB) is developed to better balance the exploitation and exploration. The effectiveness of the proposed approach is demonstrated on the PETLION, a porous electrode theory-based battery simulator. Our method is also compared with the state-of-the-art BO methods that use Gaussian process (GP) and non-recurrent network as surrogate models. The results verify the superior performance of the proposed fast charging approaches, which mainly results from that: (i) the BRNN-based surrogate model provides a more precise prediction of battery lifetime than that based on GP or non-recurrent network; and (ii) the combined acquisition function outperforms traditional EI or UCB criteria in exploring the optimal charging protocol that maintains the longest battery lifetime.

 Data-driven optimization, Bayesian optimization, Fast-charging optimization, Recurrent neural network.

## I Introduction

Fast charging is an essential technology for alleviating the issues of mileage anxiety and overly long charging time for electrical vehicles (EVs), and thus it has drawn increasing attention in recent years. However, fast charging with extremely high power may intensify side reactions such as lithium dendrite growth and electrolyte decomposition[1] that can considerably degrade batteries. Fast charging process could also produce excessive heat which may lead to safety risks such as fire and explosion[2, 3]. Therefore, it is imperative to develop fast charging strategies that can maintain the safe and efficient operation of batteries while minimizing the battery degradation.

The optimization of charging strategy has received broad attention due to the widespread demand for fast charging in various daily-life and industrial applications. In general, the optimization mainly focuses on the selection of charging currents, aiming to reduce battery's degradation and maintain battery's safe operation to the maximum extent. Existing methods on this topic can be roughly classified into model-based and data-driven approaches. For model-based methods, commonly employed battery models include equivalent circuit model (ECM)[4], single particle model (SPM)[5], and pseudo-two-dimensional model (P2D)[6]. In particular, a single shooting method with a coupled electrochemical-thermal aging model has been proposed to design a fast-charging strategy[7], where the growth of the solid electrolyte interface (SEI) layer can be captured. Ashwin et al.[8] modeled battery aging mechanism using the P2D model, accounting for the thickness of SEI layer and the temperature. Parhizi et al.[9] studied the capacity degradation of lithium-ion batteries under different operating conditions by analyzing the growth of SEI layer based on the SPM. Xavier et al.[10] developed model-predictive control (MPC) based on reduced-order models to design fast charging strategies under the constraint of no Li plating. A quadratic dynamic matrix control method is developed to design high-performance fast-charging strategies in the presence of temperature and voltage constraints[11].

However, model-based approaches have been shown to be inefficient since they require extensive expertise knowledge and their performance is largely limited by the model complexity. Given the overwhelming complexity in modeling battery's physical and chemical properties with electrochemistry[12], data-driven approaches arise by treating the design of charging strategies as a black-box problem and using experimental data to estimate the optimal solution. Data-driven approaches are advantageous in that they do not require domain knowledge, instead, they only need experimental data to extract valuable insights and establish statistical machine learning models. For instance, Severson et al.[13] utilized the elastic net regression to predict battery cycle life based on the proactive charging and discharging features during early cycles. In addition, Hong et al.[14] proposed an approach to predict the remaining useful life (RUL) of batteries based on the voltage curve information from only a few early cycles, where dilated CNN is used to deal with the time-sequential voltage information and implicit sampling is adopted to measure the output uncertainty of the neural network.

A particular category of data-driven approaches directly utilizes experimental data for discovering the optimal charging strategies without explicitly building the data-driven battery models. For such black-box optimization methods, the charging phases are often split into divisions and the optimal charging current is determined for each division. Specifically, each charging strategy, consisting of a vector of candidate charging currents across these divisions, is evaluated by performing experiments and then the optimal strategy is obtained by comparing different charging strategies. A well-known
example is the grid search approach that performs a large number of repetitive experiments across different grid points (charging strategies) to yield an approximated optimum. However, this method becomes computationally and experimentally intractable if the number of decision variables is large and the experiments are expensive to perform\({}^{\text{\@@cite[cite]{\@@bibref{Authors Phrase1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year1Year11Year1Year11Year1Year11Year11Year1Year11Year1Year11Year11Year11Year11Year11Year11Year11Year11Year11Year11Year11Year11Year11Year11Year11Year11Year11Year11Year11Year11Year11Year11Year11Year11Year111Year11Year11Year111Year11Year111Year11Year11Year111Year11Year111Year11Year11Year111Year11Year111Year11Year111Year11Year111Year11Year111Year11Year111Year11Year111Year111Year111Year111Year111Year111Year111Year111Year111Year111Year111Year111Year111Year111Year111Year111Year111Year111Year111Year111Year111Year111Year111Year111Year1111Year111Year1111Year111Year111Year1111Year111Year1111Year111Year1111Year1111Year1111Year1111Year1111Year1111Year1111Year1111Year11111Year1111Year1111Year11111Year11111Year11111Year11111Year11111Year11111Year11111Year11111Year11111Year111111Year11111Year111111Year111111Year111111Year111111Year111111Year1111111Year1111111Year1111111Year11111111Year1
connect past states/inputs with the prediction of outputs. However, traditional RNN as in Fig. 1 often cannot well capture long-term information[24]. To this end, the long short-term memory (LSTM) network, a variant of RNN, will be used in this work to alleviate this problem[25].

### _Bayesian Recurrent Neural Network_

Although the RNN and LSTM networks are advantageous in capturing dynamical dependencies, they are unable to estimate prediction uncertainty due to their deterministic nature. Such statistical quantifications are critical for assessing the confidence level associated with the subsequential decision-making, particularly Bayesian optimization and inference. Therefore, Bayesian RNN has been developed to provide uncertainty information for the output prediction[26]. The work on Bayesian RNN was pioneered by Gal et al.[27] where variational dropout approach was adopted to obtain the Bayesian approximation of output prediction. Such techniques are further adopted and extended by Sun and Braatz[23] for fault detection and identification. For these methods, the full-scale Bayesian framework is utilized by treating all network parameters as random variables. The overall predicted output of the network is obtained by taking the expectation of individual predicted output under given parameters with respect to the posterior of these parameters. However, such methods involve an overly large size of parameters, posing significant challenge for computation. In this work, we adopt the strategy in Lazaro-Gredilla et al.[28] by only treating the parameters of the last layer of the RNN as random variables. This approach can not only avoid the computation issue associated with full-scale Bayesian setup, but also generate the distribution of the predicted output that is critical for the subsequent decision-making within the Bayesian optimization framework. The output of the RNN, under given network parameters, is assumed to be Gaussian distributed in this work.

We consider the typical BO setup in (1) with BRNN as a surrogate model to predict output \(y_{t}\) (i.e., battery cycle life) under any given input \(x_{t}\) (i.e., charging strategies). Denote \(D\) as the set of data samples, and \(\theta_{y}\) as the parameters of the last layer of the BRNN, which are assumed to be random. Then the posterior distribution of \(y_{t}\), given the sample dataset \(D\), is

\[p(y_{t}|D)=\int p(y_{t}|\theta_{y})p(\theta_{y}|D)\,\mathrm{d}\theta_{y} \tag{5}\]

where \(\theta_{y}=[W_{y}\quad b_{y}]\) and \(p(\theta_{y}|D)\) is the posterior distribution of the random parameters in the last layer of BRNN under given dataset \(D\), and \(p(y_{t}|\theta_{y})\) is the presumed distribution of the output under a fixed \(\theta_{y}\). With such a Bayesian framework, the posterior distribution of output \(y_{t}\) is essentially a weighted average of that under all possible parameter values where the weight is the posterior of parameter \(\theta_{y}\) under dataset \(D\). Given the posterior distribution \(p(y_{t}|D)\), we denote \(\mu_{y_{t}}(x_{t})\) and \(\sigma_{y_{t}}(x_{t})\) as the mean and standard deviation of \(y_{t}\) for any given input \(x_{t}\). Then the AF can be constructed from these posterior statistics to determine the subsequent optimal input for attempt.

## III Deep BO with BRNN for Battery Fast Charging

### _Battery Fast Charging Optimization Problem_

The objective of this work is to discover the optimal fast charging strategy for lithium-ion batteries, with as few experiments as possible, that can slow down the battery degradation and respect safety constraints. The inherent conflict between battery aging and fast charging makes the problem of seeking the optimal charging strategy to be nontrivial. To simplify this problem, we fix the charging time to be a constant and design the charging strategy under this constant charging time, with the aim of reducing the battery aging and satisfying the safety constraints.

First, the battery cycle life is defined as the number of cycles when the battery capacity degrades to 80% of the nominal capacity. In general, longer cycle life indicates slower battery degradation. The charging protocols will follow the multi-constant-current-step charging profile[29, 18]. Specifically, we divide the fixed charging time to \(n\) steps, with the charging current in the \(i\)th step defined as \(I_{(i)}\). Then the aforementioned problem can be modeled as a combinational optimization:

\[\arg\max_{I_{(1)^{2}}(2)^{-},I_{(n)}}y=f(I_{(1)^{*}}I_{(2)},\cdots,I_{(n)}) \tag{6}\]

where \(y\) indicates the battery cycle life and \(f(\cdot)\) represents the mapping from charging strategy to battery cycle life.

We specify the function \(f(\cdot)\) in (6) as the objective function of BO. Since there is no analytical expression for \(f(\cdot)\), we can only establish an approximate model \(\hat{f}(\cdot)\) (i.e., the surrogate model) via experimental observation data. In addition, the design of acquisition function is also important for finding satisfactory charging strategies in the parameter space. This work mainly focuses on developing novel surrogate models utilizing additional battery experiment data to improve the battery lifetime prediction, as well as a novel acquisition function to efficiently find the optimal charging strategy. The proposed novel surrogate model and acquisition function will be discussed in the two subsections below.

### _Battery Lifetime Prediction with LSTM Networks_

To design strategies for battery charging, the ultimate objective is to discover the optimal charging strategies that maximize the battery cycle life. To this end, we choose the battery cycle life as the output of the LSTM network and the charging currents across different charging steps as the input. However, directly predicting battery lifetime only based on charging currents is always difficult[13]. On the other hand, the voltage during the charging process is more indicative because it can better reflect the health status of a battery and thus can be used to speculate the battery lifetime. In addition, the voltage also has a strong relationship with the current since it is determined by the current during the charging process. Therefore, as an intermediate variable, voltage can serve as a bridge connecting the current and the battery lifetime.

However, different from charging currents, the voltage continuously changes over time and charging steps, and also varies slightly across different charging-discharging cycles. In addition, after completing all charging-discharging cycles, one can gather a large number of voltage measurements, and thus the voltage data throughout all cycles forms a high-dimensional
vector. Such high-dimensional voltage information is hard to be incorporated into the LSTM network. Therefore, it is necessary to reduce its dimension, meaning to find a low-dimensional representation of the voltage data obtained from all experimental cycles. Given the observation that voltage curves from the first few cycles are similar, we choose the first cycle as the representative (see Fig. 2(a) and Fig. 2(c)). Next, we discard the irrelevant discharging and constant-voltage steps from the voltage curve because they are not affected by charging currents, as in the shaded area in Fig. 2(b) and Fig. 2(d). Then we divide the truncated voltage curve into several parts based on the state of charge (SOC), corresponding to different charging steps. For each part, we construct two or three statistical features to represent the original voltage curve to reduce the dimension. Here four schemes are used to produce statistical features:

**Scheme 1**: use the voltage mean and variance in each part.

**Scheme 2**: use the 20%, 50% and 80% quantile of the voltage in each part.

**Scheme 3**: fit the voltage curve by linear regression, then use the slope and intercept of the linear function in each part.

**Scheme 4**: fit the voltage curve by quadratic regression (\(y=ax^{2}+bx+c\)), then use the parameters (\(a,b,c\)) in each part.

The entire process to reduce the dimension of voltage data is illustrated in Fig. 2. Let us denote the charging currents as \(\mathbf{I}\), and the voltage features as \(\mathbf{U}\). In our approach, we divide the constant-current (CC) charging process into several steps, and the charging current in each step is defined as \(I_{1},I_{2},\cdots,I_{n}\), where \(\mathbf{n}\) is the number of steps. The set \(\{I_{1},I_{2},\cdots,I_{n}\}\) of currents forms the decision variables of the BO. Since the feature vector \(\mathbf{U}\) is obtained after the above dimension reduction of the voltage data, it is already a low-dimensional array containing the sequence information. Inspired by the role of hidden states in the RNN, in this work, we propose to use the low-order voltage features \(\mathbf{U}\) as intermediate states for enhancing the battery lifetime prediction with current input \(\mathbf{I}\), as shown in Fig. 3. Specifically, the relation between charging strategies \(\mathbf{I}\) (input), voltage features \(\mathbf{U}\) (state), and predicted battery cycle life \(\mathbf{y}\) (output) is depicted below:

\[\mathbf{\bar{U}}=\mathbf{\hat{g}}(\mathbf{I}),\quad\mathbf{\hat{y}}=\mathbf{\hat{h}}(\mathbf{I},\mathbf{ \bar{U}}) \tag{7}\]

With this novel architecture, the prediction of battery lifetime becomes a two-step process. First, we use the charging strategy \(\mathbf{I}\) to predict the state \(\mathbf{U}\), followed by the second step of using the combined \(\mathbf{U}\) and \(\mathbf{I}\) to predict battery lifetime \(\mathbf{y}\). Note that combining \(\mathbf{U}\) and \(\mathbf{I}\) for predicting the battery lifetime is equivalent to adding an extra feature \(\mathbf{U}\) to superrise and improve the prediction of battery lifetime \(\mathbf{y}\) directly from \(\mathbf{I}\).

Another important fact is that strong temporal correlation exists within the charging current sequence\(\{I_{(1)},I_{(2)},\cdots,I_{(n)}\}\), i.e., the present charging current can impact the final cycle life along with the subsequent charging currents throughout the entire cycle. Therefore, to capture such dynamical relation, we utilize an LSTM network to model the connections between charging currents across all steps. In other words, the \(\mathbf{\hat{g}}(\cdot)\) function above will be described by an LSTM network. For the lifetime prediction function \(\mathbf{\hat{h}}(\cdot)\), we will represent it by a traditional multi-layer perceptron (MLP) network that consumes the combined \(\mathbf{U}\) and \(\mathbf{I}\) as the inputs.

Figure 3: The proposed framework to predict battery lifetime.

Figure 2: The process of reducing the dimension of the voltage data. (a) The original voltage curve; (b) Omit discharging part; (c) Retain only one cycle; (d) Omit the CV step; (e) Separate the charging process based on the SOC.
### _Acquisition Function Design_

After the previously established surrogate model, the next task for BO is to decide which point to sample in the subsequent iteration. Such decision making is often achieved by optimizing a constructed AF. Common strategies to establish AFs include expected improvement (EI), upper confidence bound (UCB), probability of improvement (PI), and Thompson Sampling (TS) [30]. The objective of the EI-based AF is to maximize the expected improvement

\[\alpha_{\text{EI}}(\mathbf{x})=\sigma_{f}(\mathbf{x})((Z_{f}(\mathbf{x})\Phi(Z_{f}(\mathbf{x}) ))+\phi(Z_{f}(\mathbf{x}))) \tag{8}\]

with

\[Z_{f}(\mathbf{x})=\frac{f(\mathbf{x}^{\dagger})-\mu_{f}(\mathbf{x})}{\sigma_{f}(\mathbf{x})} \tag{9}\]

where \(\Phi(\cdot)\) and \(\phi(\cdot)\) are the cumulative distribution function and the probability distribution function for normal distribution, respectively; \(f(\mathbf{x}^{\dagger})\) stands for the best observation value so far; \(\mu_{f}(\mathbf{x})\) and \(\sigma_{f}(\mathbf{x})\) indicate the posterior predictive mean and standard deviation for the objective function, respectively. The UCB-based AF has a simpler expression that is given by

\[\alpha_{\text{UCB}}(\mathbf{x})=\mu_{t}(\mathbf{x})+\kappa\sigma_{t}(\mathbf{x}) \tag{10}\]

where parameter \(\kappa\) balances posterior mean \(\mu_{t}(\mathbf{x})\) and variance \(\sigma_{t}(\mathbf{x})\).

In this work, we propose to use a hybrid AF for facilitating the BO. Initially, we use the EI-based AF to guide the search process. However, this method often becomes inefficient if the expected improvement of the entire parameter space is low, which means that the estimation of the objective function is inaccurate, causing the algorithm to fall into a local optimum. In this case, we can resolve this issue by further switching to the UCB-based AF. In practical applications, it often occurs that the maximum of the EI and the UCB falls on the same sample point [31]. A reasonable explanation is that both EI and the UCB criteria consider the uncertainty of the surrogate model when searching the subsequent sample point. In particular, the EI criterion calculates the possible improvement based on a normal probability distribution and the UCB criterion calculates the confidence bound based on the posterior variance. This often leads to the coinciding maximum for the EI- and the UCB-based AFs when the uncertainty exists [32]. Under such situations, the charging strategy corresponding to the UCB in a certain quantile (often between 75% to 90%) can be selected as the candidate strategy. If the selected charging strategy still repeats, then the final strategy will be randomly selected. When the maximum point of the EI has already been explored, a charging strategy corresponding to UCB in a certain quantile can make the algorithm jump out of the local optimum to enhance the exploration, while still taking the advantage of the existing prediction. Therefore, such a scheme allows us to make better usage of the existing learning results of the lifetime prediction network, to fully exploit areas with long lifetime expectation in the input space. This algorithm that combines EI and UCB can be described in Algorithm 1.

```
1:Decide exploration leaning or exploitation leaning based on \(D_{y}\) and rounds
2:for\(I_{l}\in I\)do
3:if exploitation leaning then
4:\(\sigma(\hat{y}_{l})\leftarrow\) 0.5 \(\sigma(\hat{y}_{l})\)
```
5:endif
6: Compute \(EI(\hat{y}_{l})\)
7:endfor
8:if\(\max_{l\in I}EI(\hat{y}_{l})>0.001\)then
9:return\(\arg\max_{l\in I}EI(\hat{y}_{l})\)
10:endif
11:for\(I_{l}\in I\)do
12:if exploitation leaning then
13:\(\sigma(\hat{y}_{l})\gets\) 0.5 \(\cdot\sigma(\hat{y}_{l})\)
14:endif
15: Compute \(UCB(\hat{y}_{l})\)
16:endfor
17:\(I_{c}=\arg\max_{l\in I}UCB(\hat{y}_{l})\)
18:if\(I_{c}\in D_{l}\)then
19:return\(I_{c}\)
20:endif
21:if exploitation leaning then
22: Randomly choose \(I_{c}\) s.t. \(UCB(\hat{y}_{c})\) is between 75% and 90% percentile of \(UCB(\hat{y}_{l})\), \(I_{l}\in I\)
23:endif
24:if\(I_{c}\in D_{l}\)then
25:return\(I_{c}\)
26:endif
27:while\(I_{c}\in D_{l}\)do
28: Randomly choose \(I_{c}\) from \(I\)
29:endwhile
30:return\(I_{c}\) ```

**Algorithm 1** Deep Bayesian optimization with combined acquisition function.

## IV Results

In this section, we first introduce the used battery simulator for validating our methods. Then, we apply our proposed BRNN-based lifetime prediction method and compare it to the widely used GP-based method. Finally, we test the performance of the proposed BO with mixed EI-UCB-based acquisition function for fast charging protocol optimization to demonstrate the efficacy of using the hybrid AF.

### _Simulation_

The simulation is implemented on the PETLION [20], a porous electrode theory-based battery simulator. We split the charging current into three steps: \(I_{(1)}\), \(I_{(2)}\), and \(I_{(3)}\), where \(I_{(1)}\) and \(I_{(2)}\) are free variables and \(I_{(3)}\) is determined by the former currents. Define \(\Delta Q_{(i)},i=1,2,3\), as the change of SOC before and after the \(i\) -th charging step, and denote \(\Delta t_{(i)},i=1,2,3\), as the duration of the three steps. Then it can be obtained as

\[t_{(i)}=\frac{\Delta Q_{(i)}}{I_{(i)}},i=1,2,\;\;t_{(3)}=t_{f}-t_{(1)}-t_{(2)}, \;\;t_{(3)}=\frac{\Delta Q_{(2)}}{t_{(3)}} \tag{11}\]

where, \(t_{f}\) is the total charging time, and \(t_{f}\)=800 s is used in this work. \(I_{(1)}\), \(I_{(2)}\), and \(I_{(3)}\) are the charging currents corresponding to charging battery from the SOC of 0% to 20%, from 20% to 40%, and from 40% to 80%, respectively. Both \(I_{(1)}\) and \(I_{(2)}\) range from 2.2 C to 6.0 C in this work, with step length of 0.1 C. We split the ranges of \(I_{(1)}\) and \(I_{(2)}\) into fine grids and simulate the battery lifetime at each grid. The battery lifetime over the entire 2D space across different current values is shown in Fig. 4.
### _Surrogate Models for Lifetime Prediction_

In this section, we are to validate the predictive ability of the BRNN-based surrogate model. For comparison, we use both non-recurrent network and BRNN to predict the battery lifetime, where the inputs to both networks are identical, including charging currents and charging voltages. Fig. 5 shows the prediction result of the non-recurrent network. Comparing with Fig. 4, all plots in Fig. 5 are quite different from the true plot, regardless of the scheme that is employed. This indicates the incapability of using non-recurrent network as surrogate models for predicting battery lifetime.

In contrast, the prediction results of the BRNN-based surrogate model show much improved accuracy as in Fig. 6. With this surrogate model, all of these four schemes can yield precise predictions of battery lifetime and in particular, Scheme 3 and Scheme 4 present better performance than Scheme 1 and 2. Therefore, the following section will only employ Scheme 3 for demonstrating the proposed method and its comparison with other methods.

### _Bayesian Optimization of Fast Charging Protocols_

We choose four random charging strategies to initialize the BO process. With these starting points, BO is then conducted to sequentially search the optimal strategy, until reaching the given maximum number of iterations, i.e., 20 rounds. Since the optimization result is affected by the initializing points, we repeatedly run the entire optimization routine by 20 times, and then calculate the mean result as the final result.

For comparison, we employ three variants of BO: defined respectively as the baseline, control group, and the proposed method. First, the baseline method adopts the traditional BO with GP as the surrogate model and the EI criterion as the AF. Second, the control group method uses BRNN as the surrogate model and the EI criterion as the AF. However, the BRNN here only uses the charging currents as the input without using the charging voltages. Finally, the proposed method employs BRNN as the surrogate model and mixed EI and UCB criteria as the AF, with both charging currents and charging voltages utilized as the inputs to the BRNN.

#### Iv-C1 The baseline method

For this method, the prediction result of the surrogate model after 20 iterations based on GP and the trajectory of the sample points over the BO iterations are shown in Fig. 7. We can see that the surrogate model cannot provide an accurate prediction for the battery lifetime even after 20 rounds of iterations. Meanwhile, the selected samples points by BO are largely dispersed in parameter space without converging to the optimum. This phenomenon indicates that the traditional BO, based purely on the GP as the surrogate, cannot fully learn the parameter space, and thus is not able to discover the optimum rapidly. Such an observation, on the other hand, underpins the importance of developing advanced surrogate models with more complex machine learning models and additional battery features for enhancing the battery lifetime prediction.

#### Iv-C2 The control group

The control group adopts the BRNN as the surrogate model, but the charging voltages are not considered as the input to the network. The left plot of Fig. 8 demonstrates the prediction result of the surrogate model after 20 BO iterations. It is

Fig. 4: Illustration of the simulated battery lifetime across the 2D parameter space.

Fig. 5: Battery lifetime prediction by the non-recurrent network with both charging currents and voltages as inputs. Each plot (a), (b), (c) and (d) indicates Scheme 1 to 4.

Fig. 6: Battery lifetime prediction by BRNN network with both charging currents and voltages as inputs. Each plot (a), (b), (c) and (d) indicates Scheme 1 to 4, respectively.
observed that after these iterations, the surrogate model can discover the region where the global optimum resides (see the yellow region), despite that the predicted performance over the entire region still has a large discrepancy with respect to the true values as in Fig. 4. The trajectory of sample points from the control group is shown in the right plot of Fig. 8. It reveals that the optimization algorithm often visits the edge of the parameter space, where the battery lifetime is far less than the optimal value. Although the sample points finally converge into the region of the optimum, the control group still suffers from low efficiency in convergence.

#### V-B3 The proposed method

The proposed method uses the BRNN as the surrogate model, and both charging currents and voltages are employed as the input to the network. The prediction result of the surrogate model and the trajectory of the sample points during BO iterations are shown in Fig. 9, respectively. The left plot of Fig. 9 shows that after 20 BO iterations, the proposed method can predict the battery lifetime with a high accuracy, as indicated by the high similarity between the color maps in Fig. 9 and Fig. 4. In fact, for the proposed method, the surrogate model can capture the true model rapidly. Fig. 10 shows the estimated posterior distribution of the battery lifetime based on our proposed method at iterations 1, 5, 10, and 15. One can see despite the large difference from the true distribution at the beginning, the proposed surrogate model can well capture to the true model only after 10 iterations. This verifies the effectiveness of our BRNN-based surrogate model with both currents and voltages as inputs. Fig. 9 (right) shows the trajectory of the sample points over BO iterations based on the proposed method. One can see that the sample points can converge to the neighborhood of the optimum after a few iterations although the starting points are far from the optimum. Thus, our method exhibits superior performance in both optimization result and computation efficiency.

#### V-B4 Comparison of Loss Function

To quantitatively compare the prediction performance of the surrogate models, we define the following loss function:

\[L=y^{*}-\max\left(D_{y}\right) \tag{12}\]

where \(y^{*}\) denotes the global optimal battery lifetime in the simulation dataset, and \(D_{y}\) denotes the set of all the estimated data points. We run the optimization 20 times with the three candidate methods, and then calculate the mean and variance of the loss functions (12).

As in Fig. 11, the proposed method has the fastest downtrend and the lowest loss value after convergence. For the robustness of these algorithms, i.e., considering the value of the mean plus the variance of the loss, we can see that all algorithms have a high loss value at the beginning of the optimization. However, the loss value of the baseline method remains high whereas that of the proposed method decreases rapidly. In addition, the loss value of our method also clearly outperforms that of the control group, as indicated by the large difference between the blue and green curves over the last few i

Fig. 8: Left: The prediction result of the surrogate model of the control group after 20 BO iterations; Right: The trajectory of the sample points over BO iterations based on the control group. The red dot is the determined next sample point.

Fig. 10: The predicted battery lifetime based on the proposed BRNN surrogate model over BO iterations. Each plot (a), (b), (c) and (d) indicates iterations 1, 5, 10, and 15, respectively.

Fig. 7: Left: The prediction result of the surrogate model after 20 iterations based on the baseline method; Right: The trajectory of the sample points over BO iterations, where the background is the simulation result from Fig. 4, and the red dot stands for the determined next sample points.

Fig. 9: Left: The prediction result of the BRNN-based surrogate model after 20 iterations; Right: The trajectory of the sample points over BO iterations based on the proposed method. The red dot is the determined next sample point.
discovered solution and the optimization efficiency of the proposed method surpass those of the control group and the baseline method. This observation indicates that adopting BRNN as the surrogate model and using charging voltages as extra information can significantly improve the BO for designing optimal charging strategies.

## V Conclusion

In this article, a novel Bayesian optimization algorithm is proposed with the BRNN as the surrogate model and the combination of EI and UCB criteria as the acquisition function for fast charging strategy optimization. The proposed optimization method was validated using the data generated by the PETLION simulator. The results show that the BRNN-based surrogate model can predict the battery lifetime with a higher accuracy than the widely used BO based on GP or without utilizing additional voltage information. Simulation results further show that the proposed method also has the fastest convergence speed for fast charging optimization. The proposed deep Bayesian optimization approach embodies the potential of using data-driven methods to handle complicated problems of battery parameter optimization, such as the design of next-generation electrode and electrolyte chemistries [33].
