## 2 Method for RUL Prediction
### RT-TrAdaBoost Model  
To solve the problem of low prediction accuracy, this section performs migration improvement based on the AdaBoost algorithm and develops the RT-TrAdaBoost model based on the CART-based learner. The model predicts lithium-ion battery RUL using only minimal data samples of the battery under test. It can effectively transfer the concept of lithium-ion battery aging in different distributed datasets from the historical battery dataset to the dataset under test, and its principle is illustrated in Figure 2.  
Compared with the AdaBoost algorithm, the improvement of the RT-TrAdaBoost algorithm mainly reflects two aspects. One is to embed CART as a base learner into the algorithm, and the other is to treat the battery samples used for training unequally. Specifically, the weight vector produced by the \(t\)-th iteration is first normalized by  
\[p^{t}=\frac{w^{t}}{\sum_{i=1}^{n+m}w_{i}^{t}} \tag{14}\]  
Use the combined training set \(T\) mentioned in Section 2.1 and the standardized weight \(p^{t}\) generated by the \(t\)-th iteration to train on CART to obtain the mapping between battery aging information and RUL. The mapping is validated on the testing set, and the prediction error is calculated. The maximum value is  
\[D_{t}=\max_{i=1}^{n}\lvert c(x_{i})-h_{t}(x_{i})\rvert \tag{15}\]  
The error is also adjusted using the exponential loss function in the same way as Equation (10). The adjusted error reflects the predictive power of the mapping for each sample on the testing set. Then, to evaluate the effect of the current round of iteration and adjust the weight of the next iteration, the sum of these errors is calculated. \[\varepsilon_{t}=\sum_{i=m+1}^{n+m}\frac{w_{i}^{t}\cdot e_{i}^{t}}{\sum_{i=m+1 }^{n+m}w_{i}^{t}} \tag{16}\]  
Figure 2: Principle of RT-TrAdaBoost approach. Compared with the AdaBoost approach, the RT-TrAdaBoost does not include the source domain data \(T_{source}\) when calculating the sum of errors. It aims to make the target domain data \(T_{target}\) with the same distribution as the testing sets play a greater role in training. Likewise, Equation (12) is used to calculate the confidence of this part of the sum of errors. For the source domain data, fixed confidence is used as follows:  
\[\beta=\frac{1}{1+\sqrt{\frac{2\ln n}{N}}} \tag{17}\]  
Then, the new weight vector in the next iteration is updated with Equation (18). \[w_{i}^{t}= \begin{cases}w_{i}^{t}\beta^{t}_{i},&1\leq i\leq n\\ w_{i}^{t}\beta^{-t}_{i},&n+1\leq i\leq n+m\end{cases}  \tag{18}\]  
The updated weights are, in turn, normalized by Equation (12). In this way, samples in the target domain and samples with smaller prediction errors in the source domain will get greater weights. For some samples with large prediction errors in the source domain, the weight will gradually decrease. After multiple iterations, the battery aging information in the source domain will gradually migrate to the target domain. Finally, by taking the weighted median of all the mapping sets produced by iterations, the expression is  
\[h_{f}=\text{inf}\Bigg{\{}y\in Y:\sum_{t:h_{f}\leq y}\ln\left(\frac{1}{\beta_{ t}}\right)\geq\frac{1}{2}\sum_{t}\ln\left(\frac{1}{\beta_{t}}\right)\Bigg{\}} \tag{19}\]  
\(h_{f}\) represents the final mapping result. The pseudocode of the RT-TrAdaBoost is given, as shown in Algorithm 1. According to Algorithm 1, if the prediction results of diff-distribution training samples significantly deviate from the actual values in each iteration round, it suggests that these samples may differ greatly from those in the same-distribution training data set and thus fail to accurately reflect battery aging details. Therefore, it is necessary to decrease its weight during training in order to mitigate its impact on the subsequent iteration. The weights of these diff-distribution training samples gradually diverge from those of the same-distribution battery samples.