# A Mobile Anchor Node Assisted RSSI Localization Scheme in Underwater Wireless Sensor Networks
## 3 Detailed Description of the Proposed Localization Scheme
### Determining the Projection of a Node on the Trajectory
#### 3.2.1 Modeling the Nonlinear Relationship Using SVR  
According to Equations (2)-(4), there is a nonlinear relationship between \(\mathbf{X}\) and \(\widetilde{\mathbf{R}}\). Since SVR has a rather strong nonlinear approximation ability and antinoise ability [41], we use SVR to learn the regression function by identifying structures in the mapping of input \(\mathbf{X}\) to output \(\widetilde{\mathbf{R}}\).  
The mobile anchor node starts at point \(x_{1}\), moves along a linear trajectory, and ends at point \(x_{m}\). Then, the node to be located obtains data: the location of \(m\) broadcast points \(x_{1},x_{2},\ldots,x_{m}\), and the measured RSSI value \(\widetilde{r}_{1},\widetilde{r}_{2},\ldots,\widetilde{r}_{m}\). The location of \(i\)th broadcast points and the \(i\)th measured RSSI value together form a data sample \(\{(x_{i},\widetilde{r}_{i})|x_{i}\in\mathbf{X},\widetilde{r}_{i}\in\widetilde {\mathbf{R}},i=1,2,...,m\}\). These \(m\) data samples are used as a dataset for SVR training. We need find an approximation function with the form  
\[f\left(x\right)=w\cdot\varphi\left(x\right)+b \tag{8}\]  
Figure 3: The process of determining the projection of a sensor node on the trajectory.  
where \(\varphi\left(x\right)\) is a mapping function, \(w\) is the weight, and \(b\) is the threshold. Define the \(\varepsilon\)-insensitive loss function as  
\[\left|\widetilde{r}_{i}-f\left(x_{i}\right)\right|_{\varepsilon}=\begin{cases}0,&\left|\widetilde{r}_{i}-f\left(x_{i}\right)\right|\leq\varepsilon\\ \left|\widetilde{r}_{i}-f\left(x_{i}\right)\right|-\varepsilon,&\left  
where \(K\left(x_{i},x_{j}\right)\) is a RBF kernel function  
\[K\left(x_{i},x_{j}\right)=\exp\left(-\frac{\left\|x_{i}-x_{j}\right\|^{2}}{ \sigma^{2}}\right) \tag{19}\]  
KKT conditions for Equation (18) are  
\[\begin{cases}\alpha_{i}\left(f(x_{i})-\widetilde{r}_{i}-\varepsilon-\xi_{i} \right)=0\\ \alpha_{i}^{*}\left(\widetilde{r}_{i}-f(x_{i})-\varepsilon-\xi_{i}^{*} \right)=0\\ \beta_{i}\xi_{i}=0,\beta_{i}^{*}\xi_{i}^{*}=0\\ (C-\alpha_{i})\xi_{i}=0,\left(C-\alpha_{i}^{*}\right)\xi_{i}^{*}=0\end{cases} \tag{20}\]  
The final regression function is obtained:  
\[f\left(x\right)=\sum_{i=1}^{m}\left(\alpha_{i}^{*}-\alpha_{i}\right)K\left(x,x _{i}\right)+b \tag{21}\]  
The regression function is the nonlinear relationship between \(\mathbf{X}\) and \(\widetilde{\mathbf{R}}\). We use the regression function to predict the location vector \(\mathbf{X}\), and obtain the predicted RSSI vector  
\[\widehat{\mathbf{R}}=\left[\widehat{r}_{1},\widehat{r}_{2},\ldots,\widehat{r }_{m}\right] \tag{22}\]  
We embed \(\mathbf{X}\) of Equation (5), \(\widetilde{\mathbf{R}}\) of Equation (6), \(\mathbf{R}\) of Equation (7), and \(\widehat{\mathbf{R}}\) of Equation (22) into Figure 4. The measured RSSI curve (black dashed line) is drawn using all the elements in \(\widetilde{\mathbf{R}}\). The predicted RSSI curve (red dash-dot line) is drawn using all the elements in \(\widehat{\mathbf{R}}\). The noiseless RSSI curve (purple solid line) is drawn using all the elements in \(\mathbf{R}\). Since the SVR has a good noise reduction effect, the predicted RSSI curve should be closer to the noiseless RSSI curve than the measured RSSI curve.