# Curve-Localizability-SVM Active Localization Research for Mobile Robots in Outdoor Environments
## 3 Curve-Localizability-SVM Active Localization
### Curve-Localizability-SVM Path Planning  
Considering that in the process of active global localization, we need to generate a path which is conducive to particle convergence and robot relocation based on the coarse results of global localization, which means the selection of the path is directly related to the constraint of the curve localizability, so we propose an improved SVM algorithm for experiments, but it should be noted that our active localization strategy is not limited to one specific path planning algorithm, other suitable algorithm could be chose if necessary. Figure 3: Sketch Graph of Curve Localizability. The optimal classification hyperplane found by SVM has the maximal distance between different sample classes, and the path it planned is not only smooth, but also far away from obstacles, so it can be a good path for robots. Suppose that the data sample is  
\[D=\{(x_{1},y_{1}),(x_{2},y_{2}),...(x_{m},y_{m})\},y_{i}\in\{+1,-1\}.\]  
The hyperplane can be described by the following equation:  
\[w^{T}x+b=0.\]  
The formula of the distance from any point \(x\) in space to the hyperplane is as follows:  
\[r=\frac{\left|w^{T}x+b\right|}{w}. \tag{5}\]  
The optimal hyperplane satisfies the following equation:  
\[\max_{w,b}\frac{2}{||w||}, \tag{6}\]  
\[s.t.y_{i}\Big{(}w^{T}x_{i}+b\Big{)}\geq 1,i=1,2,\ldots,n.\]  
The above formula can be converted into:  
\[\min_{w,b}\frac{1}{2}||\mathbf{w}||^{2}, \tag{7}\]  
\[s.t.y_{i}\Big{(}w^{T}x_{i}+b\Big{)}\geq 1,i=1,2,\ldots,n.\]  
The Laplace function \(L(w,b,a)\) is defined as follows:  
\[L(w,b,a)=\frac{1}{2}||\mathbf{w}||^{2}-\sum_{i=1}^{n}a_{i}[y_{i}(w^{T}x_{i}+b) -1], \tag{8}\]  
coefficient \(a_{i}\geq 0\). The minimum problem is transformed into a dual problem of convex quadratic programming:  
\[\max\sum_{i=1}^{n}a_{i}-\frac{1}{2}\sum_{i=1}^{n}a_{i}a_{i}y_{i}y_{j}(x_{i}^{T }x_{j}), \tag{9}\]  
\[D=\{(x_{1},y_{1}),(x_{2},y_{2}),...(x_{m},y_{m})\},y_{i}\in\{+1,-1\}.\]0  
For the non-linear classificaion samples, we introduce the kernel function:  
\[D=\{(x_{1},y_{1}),(x_{2},y_{2}),...(x_{m},y_{m})\},y_{i}\in\{+1,-1\}.\]1  
By solving the optimization problem:  
\[D=\{(x_{1},y_{1}),(x_{2},y_{2}),...(x_{m},y_{m})\},y_{i}\in\{+1,-1\}.\]2  
\[D=\{(x_{1},y_{1}),(x_{2},y_{2}),...(x_{m},y_{m})\},y_{i}\in\{+1,-1\}.\]3  
Finally, the hyperplane equation is obtained:  
\[D=\{(x_{1},y_{1}),(x_{2},y_{2}),...(x_{m},y_{m})\},y_{i}\in\{+1,-1\}.\]4To ensure that all the subsequent paths produced from SVM are connected together, we add virtual obstacles on both sides of the end point to make the next starting point connect with it. Since the SVM algorithm only considers the path length, we have to take other factors into account. In our question, the main factors that need to be considered are the length of path and curve localizability on the path, with some other traditional path planning constraints such as obstacles. We generate the active path by defining the objective function which maximize the localizability index, and taking other objects such as the length of path as the constraint conditions. The definition of objective function is related to the value of curve localizability index, so we need to calculate the cost function of this index on the path based on the index graph firstly. Suppose \(P\) is an arbitrary path in the 2D grid map, and the grid it passes through can be defined as \(g_{1},g_{2},g_{3},...,g_{n}\), then the cost function of the curve localizability index on path \(P\) can be expressed as:  
\[D=\{(x_{1},y_{1}),(x_{2},y_{2}),...(x_{m},y_{m})\},y_{i}\in\{+1,-1\}.\]5  
Where \(C(P)\) is the total cost of path \(P\), and \(l_{curve}(p_{g_{i}})\) represents the value of curve localizability index of grid \(g_{i}\).