1 Introduction
In a wireless sensor network (WSN), a large number of applications require the information on geographical location of the node within the network in order to get the accurate location of the information source. In most cases, without the location information of nodes, the data collected by the sensor nodes become meaningless [
1]. In order to address node localization problems in the WSN, many studies on localization methods and algorithms have been conducted. Generally, there are two types of node localization algorithms, one is the range-based localization algorithm and the other is the range-free localization algorithm [
2,
3]. The range-based localization algorithm, such as radio signal strength indicator (RSSI), time of arrival (TOA), time difference of arrival (TDOA), and angle of arrival (AOA), requires the information on distance or angle in order to provide the node localization. According to that, all these range-based localization algorithms must have a distance-measuring device on the sensor nodes. The localization accuracy obtained by the range-based algorithm is high, but the costs of localization algorithm are high [
4,
5]. On the other hand, the range-free localization algorithm, such as the centroid algorithm and the DV-hop algorithm, provides the node localization though the network connectivity. Although the localization accuracy of the range-free algorithm is lower than accuracy of the range-based algorithm, range-free algorithms are widely used because of their low costs [
6,
7].
Least squares support vector regression (LSSVR) is a machine learning technology based on a structure risk minimization [
8]. LSSVR transforms the localization problem into the constraint optimization problem of the quadratic programming, which can greatly reduce the computational complexity and improve the computational efficiency. Meanwhile, LSSVR uses all learning samples as support vectors, which can greatly improve the regression modeling ability of the learning samples. In addition, LSSVR can obtain better location effect by optimizing the parameters of LSSVR. Hence, LSSVR algorithm has the unique advantage in the node localization for WSN [
9]. For instance, the WSN node localization method based on the LSSVR modeling was proposed by Guixiong et al. [
10]. In addition, the WSN node target tracking method based on the LSSVR algorithm was proposed by Kim W et al. [
11]. Also, Samira Afzal proposed a large-scale mobile node localization method based on the machine learning [
12]. Moreover, an improved LSSVR WSN three-dimensional mobile node localization method in an obstacle condition was proposed by Lieping et al. [
13].
The Kalman filter (KF) algorithm can remove the influence of the noise. KF algorithm uses the dynamic information of the target to obtain a more accurate target location estimation, which can improve the localization accuracy [
14]. Dazhong et al. used traditional KF algorithm to implement mobile node localization [
15]. For instance, Hui Long et al. proposed a WSN node localization method based on the distributed extended KF algorithm [
16]. Jianping et al. used the KF algorithm for mobile node localization in the complex mine environment [
17]. Moreover, Rafiullah Khan et al. proposed a localization method based on extended KF algorithm [
18].
All presented localization algorithms have superiorities but also have many limitations. Especially in the complex environment, the localization effects have obvious limitations because of signal non-linear attenuation, non-line-of-sight propagation, multipath effect, noise, and mobile node randomness. For example, traditional LSSVR localization method uses the least squares method to eliminate the influence of measurement errors and can obtain a better localization effect. But for mobile nodes, it will be unable to predict the motion states of nodes. Hence, if sometimes the desired localization accuracy is high and just one algorithm is used for the node localization, it may be difficult to achieve the desired localization accuracy. However, if a combination of several algorithms is used to solve the localization problem, it will be possible to achieve a better balance between quality and efficiency and can obtain a solution that meets the different localization needs. For instance, Xuewen et al. proposed a three-dimensional node localization method for WSN based on LSSVR and RSSI algorithm [
19]. Moreover, Tarik Ljouad et al. proposed a method for mobile target localization based on the improved cuckoo search algorithm and KF algorithm [
20]. In addition, Weidong et al. proposed a node localization method based on the least square method and extended KF algorithm [
21]. In these hybrid localization methods, the obtained localization effects were better than in the single localization algorithm.
In the actual environment, the majority of nodes is not distributed only in the three-dimensional environment, but also may be mobile. In this paper, we propose a method based on LSSVR and KF algorithm to take advantage of both techniques to locate mobile nodes in three-dimensional environment. In this algorithm, KF algorithm was used to filter and estimate the position, and LSSVR algorithm was used to model and locate. The paper is organized as follows. In Section
2, a mobile node localization method in three-dimensional environment based on LSSVR algorithm is introduced. In Section
3, a distance estimation method based on KF method is introduced. In Section
4, a three-dimensional mobile node localization method based on KF-LSSVR algorithm is presented. In Section
5, localization effects of KF algorithm, LSSVR algorithm, and KF-LSSVR algorithm have been compared in the same environment and parameters. We end the paper with some conclusions concerned effectiveness and limitations of the proposed algorithm in Section
6.
2 Mobile node 3-D localization based on LSSVR algorithm
The two-dimensional LSSVR localization principle is extended to the three-dimensional environment. We assume that there are N anchor nodes S
i
(x
i
, y
i
, z
i
)(i = 1, 2, …, N), and M unknown nodes S
j
(x
j
, y
j
, z
j
)(j = 1, 2, …, M) in the three-dimensional environment. We also assume that the communication radius of all nodes and the ranging error factor are the same,and the unknown nodes can move randomly.
If the actual distance between the anchor node
S
i
and the unknown node
E is
d
iE
, then the distance vector is composed of the actual distance from
N anchor nodes to the unknown node
E,
V = [
d1E,
d2E, …,
d
NE
]. Since the unknown node moves randomly, the coordinates of the unknown node
E also change randomly, and the distance vector
V is also changed. It can be concluded that there is a non-linear mapping between the unknown node coordinates and the distance vector. In this paper, the LSSVR is used to establish the mapping model between the unknown node coordinates and the distance vector. The three-dimensional mobile node localization algorithm based on LSSVR is as follows.
(1)
Construction of the training set with virtual nodes
Due to complexity of three-dimensional mobile node localization, the three-dimensional environment is meshed into small cubes with a length of
l
x
. Assume that the
K grid points are regarded as
K virtual nodes after three-dimensional space is meshed into cubes. The coordinates of each virtual node can be described as
\( {S}_l^{\prime}\left({x}_l^{\prime },{y}_l^{\prime },{z}_l^{\prime}\right)\left(\mathrm{l}=1,2,\dots, K\right) \). Hence,
d
il
is the actual distance of anchor node
S
i
to the virtual node
\( {S}_l^{\prime } \), and the corresponding distance vector is
V
l
= [
d1l,
d2l, …,
d
Nl
]. The training sets
U
x
,
U
y
and
U
z
, shown in Eq. (
1), were constructed of
V
l
and
\( {S}_l^{\prime } \). The training sets are preprocessed by the input vector standard normalization, and then the output coordinates of the unbiased regression model are obtained.
$$ \left\{\begin{array}{l}{U}_x=\left\{\left({V}_l,{x}_l^{\prime}\right)|l=1,2,\dots, K\right\}\\ {}{U}_y=\left\{\left({V}_l,{y}_l^{\prime}\right)|l=1,2,\dots, K\right\}\\ {}{U}_z=\left\{\left({V}_l,{z}_l^{\prime}\right)|l=1,2,\dots, K\right\}\end{array}\right. $$
(1)
(2)
Training of the LSSVR localization model
There are many LSSVR kernel functions, but the most commonly used function is the radial basis function (RBF), the expression of RBF can be described as follows.
$$ Y\left({u}_i,{u}_j\right)=\exp \left(-\frac{{\left\Vert {u}_i-{u}_j\right\Vert}^2}{\sigma^2}\right),\left(i,j=1,2,\dots, K\right) $$
(2)
The LSSVR is used for training the sample sets
U
x
,
U
y
and
U
z
. For
U
x
, the optimization problem is constructed and solved by Eq. (
3).
$$ \left\{\begin{array}{l}{\min}_{\omega, \xi, b}\frac{1}{2}{\left\Vert \omega \right\Vert}^2+\gamma \frac{1}{2}{\sum}_{i=1}^m{\xi}_i^2\\ {}s.t.{x}_l^{\prime }={\omega}^T\phi \left({V}_l\right)+b+{\xi}_i,i=1,2,\dots, K\end{array}\right. $$
(3)
In Eq. (
3),
\( \phi \left(\cdot \right):{R}^n\to {R}^{n_k} \) represents the nonlinear mapping function,
b is the deviation,
ω is the weight,
γ is the regularization parameter, and
ξ
i
is the random error.
Using Eq. (
2) and Eq. (
3), the problem can be converted to the solution of the Lagrange operators
α and
b by Eq. (
4).
$$ \left[\begin{array}{cc}0& {1}^{-T}\\ {}\overline{1}& \Omega +{\gamma}^{-1}I\end{array}\right]\left[\begin{array}{c}b\\ {}\alpha \end{array}\right]=\left[\begin{array}{c}0\\ {}{x}^{\prime}\end{array}\right] $$
(4)
where \( {x}^{\prime }=\left[{x}_1^{\prime },{x}_2^{\prime },\dots, {x}_K^{\prime}\right] \), α = [α1, α2, …, α
K
]
T
, \( \overline{1}={\left[{1}_1,{1}_2,\dots, {1}_K\right]}^T \), and Ω
ij
= Y(V
i
, V
j
).
Parameters
α and
b can be obtained by
\( \left[\begin{array}{c}b\\ {}\alpha \end{array}\right]=\left[\begin{array}{cc}0& {1}^{-T}\\ {}\overline{1}& \Omega +{\gamma}^{-1}I\end{array}\right]\left[\begin{array}{c}0\\ {}v\end{array}\right] \). Thus, the decision function is obtained.
$$ {f}_x\left({V}_l\right)={\sum}_{i=1}^K{\alpha}_iY\left({V}_i,{V}_j\right)+b $$
(5)
where
f
x
(
V
l
) represents the X-LSSVR localization model. Similarly,
f
y
(
V
l
) and
f
Z
(
V
l
) can be obtained, which represent the Y-LSSVR and Z-LSSVR localization models.
(3)
Optimization of the kernel function parameter σ and regularization parameter γ
The kernel function parameter and regularization parameter directly affect the model performance, so the particle-swarm optimization algorithm is used for optimization of the LSSVR regularization parameter and the kernel function parameter, the fitness function is defined as Eq. (
6) [
22].
$$ {f}_{\mathrm{fitness}}=\sqrt{\sum \limits_{i=1}^M\left({\left({f}_X\left({V}_l\right)-{x}_l^{\prime}\right)}^2+{\left({f}_Y\left({V}_l\right)-{y}_l^{\prime}\right)}^2+{\left({f}_Z\left({V}_l\right)-{z}_l^{\prime}\right)}^2\right)} $$
(6)
Here,
\( {x}_l^{\prime } \),
\( {y}_l^{\prime } \), and
\( {z}_l^{\prime } \) are the actual location coordinates of the virtual sampling point
\( {S}_l^{\prime } \) in the detection area,
V
l
is the distance vector from the sampling point to the anchor node, and
f
x
,
f
y
,
f
z
are the estimated values of the regression model established by the optimization model parameter.
(4)
Localization of mobile node
The distance between the anchor node S
i
to the unknown node E is defined as measured distance \( {d}_{iE}^{\prime } \). Distance vector \( {V}^{\prime }=\left[{d}_{1E}^{\prime },{d}_{2E}^{\prime },\dots .,{d}_{NE}^{\prime}\right] \) is composed of the measured distances \( {d}_{iE}^{\prime } \), where i = 1, 2, …, N. In order to simplify the calculation, the distance vector V′ is normalized. Then, the distance vector is used as the input of the localization model. Through the anti-standardized output value, the estimated coordinates of the unknown node \( \left({x}_E^{\prime },{y}_E^{\prime },{z}_E^{\prime}\right) \) are obtained. Therefore, the three-dimensional mobile node localization based on LSSVR is achieved.
3 Distance estimation based on KF method
KF algorithm is one of the best predictive algorithms, especially for noise processing and motion prediction. Moreover, KF algorithm continually obtains new information from the predicted estimate. KF algorithm gradually eliminates the measurement errors and adjusts the posterior estimate until the estimated value is close to the actual value of the system motion state. Multi-hop ranging method is suitable in the three-dimensional static network. But in this study, there is obstacle in the environment and the unknown nodes are moving. So in the localization process, the measurement errors of the multi-hop ranging might affect the localization accuracy and cause a less accurate result. Therefore, in order to obtain the measurement distance with less error, the system error should be filtered by the KF algorithm.
Assume that the measurement error of the distance contains system error and random noise, which can be formulated as Δ
d
i
=
β +
V(
i), where
β is the system error, and it is a slowly variable constant value, and
V(
i) is the random noise. In order to decrease the system errors, a KF model is used [
23]. In this model,
V(
i) is zero mean Gauss white noise. The model is as follows.
State equation can be described as follows:
$$ X\left(i+1\right)= FX(i) $$
(7)
Among them, \( X(i)=\left[\begin{array}{c}{\widehat{\beta}}_n\\ {}\Delta {d}_i\end{array}\right] \), \( F=\left[\begin{array}{cc}1& 0\\ {}0& 1\end{array}\right] \).
Measurement equation can be written as follows:
$$ \Delta \widehat{d}(i)={\tilde{d}}_i-{\widehat{d}}_i= HX(i)+V(i) $$
(8)
where H = [1 1] and \( \Delta \widehat{d}(i) \) is the difference between the LSSVR estimated value and the actual value of the distance between nodes, \( {\tilde{d}}_i \) is the measured value of the distance between nodes, and \( {\widehat{d}}_i \) is the LSSVR estimated value of the distance between nodes.
Prediction equation can be described as follows:
$$ V(i)=\Delta \widehat{d}(i)-H\widehat{X}\left(i-1\right) $$
(9)
State update equation can be described as follows:
$$ \widehat{X}(i)=\widehat{X}\left(i-1\right)+K(i)V(i) $$
(10)
Gain equation can be described as follows:
$$ K(i)=P\left(i-1\right)H{{}^T\left[R(i)+ HP\left(i-1\right){H}^T\right]}^{-1} $$
(11)
Covariance update equation can be described as follows:
$$ P(i)=P\left(i-1\right)-P\left(i-1\right){H}^T HP\left(i-1\right){\left[R(i)+ HP\left(i-1\right){H}^T\right]}^{-1} $$
(12)
6 Conclusions
According to the mobile node characteristics in a complex environment, a three-dimensional localization algorithm for mobile node based on the KF-LSSVR algorithm, is proposed. (1) In the proposed algorithm, the KF model was used to filter and estimate the position, which can provide higher accuracy distance measuremnet. The simulation results have shown that the ranging errors can be reduced by this way. (2) A method was presented that LSSVR model was used to mobile node localization. Mobile node localization accuracy can be improved through the LSSVR localization model. (3) A mobile node localization algorithm using a joint KF and LSSVR algorithm was proposed in this paper. Simulation results have shown that, compared with the KF localization algorithm or LSSVR localization algorithm, the overall localization ability of the proposed localization algorithm is improved.
However, the localization error of the proposed algorithm is smaller but still a little bit large, so the algorithm needs to be further improved. The ranging factor η and the grid spacing t of LSSVR localization model are fixed. In our further work, we will study the RSSI ranging method to reduce the range errors and used extended Kalman filter (EKF) localization algorithm to improve localization accuracy. And proposing a method that can choose the appropriate ranging factor η and grid spacing t in order to obtain smaller localization error will also be the subject of our further research. Moreover, in order to evaluate the mobility and the influence of the speed, it needs to be evaluated with higher speeds or with a ranging error model (TOA or RSSI based) that depends on the mobility of nodes, and this should be considered in our further studies.