## 2 Basic Theories  
### Relevance Vector Machine  
The lithium-ion battery RUL prediction is a regression prediction problem [15]. The RVM is a data-driven method based on the Bayesian theory. It includes the benefits of probabilistic predictions, automatic estimation of \"nuisance\" parameters, and the facility to utilize arbitrary basis functions [31]. It is valuable for the lithium-ion battery RUL prediction. Thus, before performing this method on the problem, we provide a brief introduction of the components of the RVM. Assuming a dataset can be defined as \(\left\{x_{i},t_{i}\right\}_{i=1}^{M}\), where \(x_{i}\in\mathbf{R}^{n}\) is the input variable, \(n\) is the dimension of \(x_{i}\), \(t_{i}\in\mathbf{R}\) is the target value, and \(M\) is the length of the training data. In terms of the battery RUL prediction, \(x_{i}\) is the battery SOH value at the \(i\)th cycle, and \(t_{i}\) is the battery SOH value to be predicted. In this paper, the percentage of the current capacity to the rated capacity is taken as the battery health status. The regression expression of the RVM is as follows:  
\[y(x,\omega)=\sum_{i=1}^{M}\omega_{i}K(x,x_{i})+\omega_{0}, \tag{1}\]  
\[t_{i}=y(x_{i},\omega)+\varepsilon_{i}, \tag{2}\]  
where \(y(x,\omega)\) is a nonlinear function which needs to be modelled. \(w=\left[w_{0},w_{1},\cdots,w_{M}\right]^{T}\) is the corresponding weight vector. \(x\) is all the input variables from the training set. \(K(x,x_{i})\) is the kernel function. \(\varepsilon_{i}\sim N\left(0,\sigma^{2}\right)\) is the independent additive random noise term. The likelihood function of the training set can be expressed as follows:  
\[p\left(\mathbf{t}|\omega,\,\sigma^{2}\right)=\left(2\pi\sigma^{2}\right)^{-M/2} \exp\left(-\frac{\|t-y\|}{2\sigma^{2}}\right), \tag{3}\]  
If Equation (3) is directly used to carry out maximum likelihood estimation for \(\omega\) and \(\sigma^{2}\), the model will be overfitting and not sparse. Therefore, a constraint of zero mean Gaussian prior distribution is added on \(\omega\) as follows:  
\[p(\omega,\alpha)=\prod_{i=0}^{N}N\left(\omega_{i}|0,\,\alpha_{i}^{-1}\right), \tag{4}\]where \(\alpha=\)[\(\alpha_{0},\alpha_{1},\cdots,\alpha_{N}\)] is a hyperparameter vector. Then, we can get the posterior Gaussian distribution of \(\omega\) from the prior distribution according to the Bayesian theory as follows:  
\[ \begin{array}{ll}p\big{(}\omega|t,\alpha,\sigma^{2}\big{)}&=\frac{p\big{(} \mu_{0},\sigma^{2}\big{)}p(\omega|\alpha)}{p\big{(}\mu_{0},\sigma^{2}\big{)}}\\ &=(2\pi)^{-(M+1)/2}|\Sigma|^{-1/2}\exp\left[-\frac{1}{2}(\omega-\mu)^{T}\Sigma^ {-1}(\omega-\mu)\right]\end{array}  \tag{5}\]  
where \(\mu\) is the mean of \(\omega\), and \(\Sigma\) is the posterior covariance of \(\omega\):  
\[\mu=\sigma^{-2}\Sigma\mathbf{\Phi}^{T}y, \tag{6}\]  
\[\Sigma=\Big{(}\sigma^{-2}\mathbf{\Phi}^{T}\mathbf{\Phi}+\mathbf{A}\Big{)}^{-1}, \tag{7}\]  
where \(\mathbf{A}=diag(\alpha_{0},\alpha_{1},\cdots,\alpha_{M})\), \(\mathbf{\Phi}\) presents the \(N\times(N+1)\) kernel function matrix. The marginal integral of the hyperparameter can be used to calculate the likelihood distribution of the target value \(t\) in Equation (3) as follows:  
\[p\Big{(}t|\alpha,\sigma^{2}\Big{)}=(2\pi)^{-M/2}\big{|}\sigma^{2}\mathbf{I}+\mathbf{ \Phi}\mathbf{A}^{-1}\mathbf{\Phi}^{T}\big{|}^{-1/2}\exp\left[-\frac{1}{2}t^{T}\Big{(} \sigma^{2}\mathbf{I}+\mathbf{\Phi}\mathbf{A}^{-1}\mathbf{\Phi}^{T}\Big{)}t\right], \tag{8}\]  
The maximum posterior estimate of the weights depends on \(\alpha\) and \(\sigma^{2}\), Tipping [31] gives an iterative formula for calculating \(\alpha^{new}\) and \(\Big{(}\sigma^{2}\Big{)}^{new}\):  
\[\alpha_{i}^{new}=\frac{1-\alpha_{i}\Sigma_{ii}}{\mu_{i}^{2}}, \tag{9}\]  
\[\Big{(}\sigma^{2}\Big{)}^{new}=\frac{\|t-\mathbf{\Phi}\mu\|}{M-\sum_{i}(1-\alpha_ {i}\Sigma_{ii})}, \tag{10}\]  
where \(\Sigma_{ii}\) is the diagonal element of \(\Sigma\), \(\mu_{i}\) is mean of the \(i\)th weight of \(\omega\). Then, we can train the RVM model by iterating the above process until the results converge.