# Slip Estimation Model for Planetary Rover Using Gaussian Process Regression
## 4 Training Methods  
Under the same input conditions, slip also has distribution uncertainty. For the safety of the rover, it was critical to know not only the average value of the slip, but also the maximum possible value that the slip could reach [33]. GPR is a nonparametric model for regression analysis of data using the Gaussian process (GP) as a prior for Bayesian inference. It exhibits strong adaptability and generalization ability. Furthermore, GPR synthesizes both data and model uncertainty to estimate uncertainty [34,35]. Therefore, GPR was used to train models in this paper. GA-BP, proposed in our previous work, was also used to train models and compared with the performance of GPR, as fully detailed in the literature [22]. GP is defined as a collection of random variables, any finite number of which have consistent joint Gaussian distributions, and is fully specified by their mean function \(m(x)\) and covariance function \(k(x,\,x^{\prime})\), where \(x\) and \(x^{\prime}\) are random variables [36]. Treat the mean function \(m(x)\) as zero for the convenience of calculation, and there is no loss of generalization. \[f(x)\,\sim GP(0,k(x,x^{\prime})) \tag{5}\]  
Generally, the data were episodically affected by noise from various sources; the slippage observations can be represented as  
\[s=f(x)+\varepsilon \tag{6}\]  
where \(f(\cdot)\) is assumed as a zero-mean Gaussian process, is noise-dependent and follows \((0,\sigma^{2})\) distribution. \(f(\cdot)\) is a nonlinear mapping relationship between inputs and outputs, \begin{table}
\begin{tabular}{c c} \hline \hline
**Raw Data** & **Sampling** \\  & **Frequency** \\ \hline Rover’s pitch & 20 Hz \\ Rover’s roll & 20 Hz \\ Rover’s yaw & 20 Hz \\ Current of each wheel driving motor & 1 Hz \\ Angular velocity of each wheel driving motor & 1 Hz \\ Position of rover & 20 Hz \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The data collected in ground tests. and \(\varepsilon\) is noise. Assuming that they both fit zero-mean GP, then the prior distribution of sample observations, \(s\), also fit GP. \[s\,\sim GP(0,K+{\sigma_{n}}^{2}I_{n}) \tag{7}\]  
The joint prior distribution of the sample observations, \(\mathbf{s}\), and the predicted value \(s_{*}\) is:  
\[\left[ \begin{array}{c}s\\ s_{*}\end{array} \right]\,\sim N\bigg{(}0,\,\left[ \begin{array}{cc}K+s^{2}I&{K_ {*}}^{T}\\ K_{*}&{K_{**}}\end{array} \right]\bigg{)} \tag{8}\]  
where  
\[K=\left[ \begin{array}{cccc}k(x_{1},x_{1})&k(x_{1},x_{2})&\ldots&k(x_{1},x_{n })\\ k(x_{2},x_{1})&k(x_{2},x_{2})&\ldots&k(x_{2},x_{n})\\ \vdots&\vdots&\ddots&\vdots\\ k(x_{n},x_{1})&k(x_{n},x_{2})&\ldots&k(x_{n},x_{n})\end{array} \right] \tag{9}\]  
\[K_{*}=\left[ \begin{array}{cccc}k(x_{*},x_{1})&k(x_{*},x_{2})&\ldots&k(x_{*}, x_{n})\end{array} \right] \tag{10}\]  
\[K_{**}=k(x_{*},x_{*}) \tag{11}\]  
\[I_{n}=\left[ \begin{array}{cccc}1&0&\ldots&0\\ 0&1&\ldots&0\\ \vdots&\vdots&\ddots&\vdots\\ 0&0&0&1\end{array} \right] \tag{12}\]  
where \(K\) is the covariance matrix for the training data, matrix elements \(k_{ij}=k\big{(}x_{i},x_{j}\big{)}\) are used to measure the correlation between \(x_{i}\) and \(x_{j}\), \(K_{**}\) is the covariance matrix between the test points (prediction) and the training data, \(K_{**}\) is the covariance between the points in the test set, and \(I_{n}\) is the identity matrix. According to Bayesian formula  
\[P(s_{*}|\mathbf{s})=\frac{P(s_{*},\mathbf{s})}{P(\mathbf{s})} \tag{13}\]  
We can obtain the posterior predictive distribution of \(s_{*}\) at the location \(x_{*}\) which is the obtained predicted result by GPR.