## 2 Materials and Methods
### Unscented Particle Filter  
The degradation law of dynamic system state can be described by a set of dynamic models including a state equation and observation equation expressed by [19].  
\[x_{t}=f_{t}(x_{t-1},w_{t}) \tag{5}\]  
\[y_{t}=h_{t}(x_{t},v_{t}) \tag{6}\]  
where \(f_{t}\) is the state transfer function from the previous time to the current time, \(x_{t}\) and \(w_{t}\) are the state value of the system and the system noise at the current time, \(h_{t}\) is the functional relationship between the current state and the observed value, \(y_{t}\) is the observed value of the current system state, and \(v_{t}\) is the observation noise at the current time.  
RUL prediction is to estimate the state value of the next moment from the current state value and the observed value of the rolling bearing. According to Bayesian theory, all information of the system state estimation is included in the posterior probability distribution, given by:  
\[p(x_{t}|y_{1:t-1})=\int p(x_{t}|x_{t-1})p(x_{t-1}|y_{1:t-1})dx_{t-1} \tag{7}\]  
\[p(x_{t}|y_{1:t})=\frac{p(y_{t}|x_{t})p(x_{t}|y_{1:t-1})}{p(y_{t}|y_{1:t-1})} \tag{8}\]  
where \(p(x_{1:t}|y_{1:t})\) is the posterior probability and \(p(x_{t}|y_{1:t-1})\) is the prior probability of the state, which describes the prior knowledge of the state before the observation value is obtained.  
The traditional PF algorithm is based on Bayesian theory. It estimates the probability density function (PDF) of the system state through the observation data, and uses the sequential importance sampling (SIS) algorithm to replace PDF with a priori probability approximation. However, the PF algorithm easily falls into the problem of particle degradation, which leads to the divergence of estimation results. The unscented particle filter algorithm (UPF) uses UKF to construct the importance sampling distribution of the particle filter. It integrates the latest observation information into the importance distribution function. It strengthens the tracking ability of particles, improves the accuracy of target tracking, and effectively solves the problem of particle degradation.  
The first step is the initialization. Setting \(t=0\), sample \(N\) particles from the initial distribution to generate the original particle set \(x_{0}^{i}=p(x_{0})\). The weight coefficient corresponding to each particle is  
\[w_{0}^{i}=\
icefrac{{1}}{{N}},i=1,2,N \tag{9}\]  
For each particle, UKF algorithm is used to estimate the state of each particle. The particle \(x^{i}\) is obtained according to the Gaussian distribution \(N(\overset{-}{x_{t}^{i}},\overset{\wedge}{p_{t}^{i}})\) as  
\[\overset{-}{x_{t}^{i}}=\sum\limits_{i=1}^{N}w_{t}^{i}x_{t}^{i} \tag{10}\]  
\[\overset{\wedge}{p_{t}^{i}}=\sum\limits_{i=1}^{N}w_{t}^{i}\bigg{(}x_{k}^{i}- \overset{-}{x_{k}^{i}}\bigg{)}\bigg{(}x_{k}^{i}-\overset{-}{x_{k}^{i}}\bigg{)} ^{T} \tag{11}\]  
The weight of each particle is updated according to the measured value at the current time. The weight is normalized as  
\[w_{t}^{i}=w_{t-1}^{i}\frac{p\big{(}y_{t}|x_{t}^{i}\big{)}p\big{(}x_{t}^{i} \big{|}x_{t-1}^{i}\big{)}}{q\big{(}x_{t}^{i}\big{|}x_{0:t-1}^{i},Y_{1:t}\big{)}} \tag{12}\]  
\[w_{t}^{i}=\frac{w_{t-1}^{i}}{\sum\limits_{i=1}^{N}w_{t}^{i}},i=1,2,N. \tag{13}\]  
\[N_{\text{eff}}=\,1/\sum\limits_{i=1}^{N}\left(w_{t}^{i}\right)^{2},i=1,2,N. \tag{14}\]  
where \(N_{\text{eff}}\leq N_{thr}\) (\(N_{thr}\) represents the threshold). This means that the particles have been severely degraded and need to be resampled according to the importance weight, and the particles are mapped into \(N\) particles of equal weight. In this way, the updated particle and its weight can be used to estimate the state at the current time as  
\[x_{t}=\frac{1}{N}\sum_{i=1}^{N}W_{t}^{i}x_{t}^{i},\ i=1,2,N. \tag{15}\]