A Location Predicting Method for Indoor Mobile Target Localization in Wireless Sensor Networks

Node position information is one of the important issues in many wireless sensor networks' usages. In this paper, based on path planning, a location predicting method (PPLP) for indoor mobile target localization is proposed. We first establish the path planning model to constrain the movement trajectory of the mobile target in indoor environment according to indoor architectural pattern. Then, one certain localization result can be obtained using MLE algorithm. After that, based on the path-planning model and some previous localization results, the most likely position of the target in the next time interval can be predicted with the proposed predicting approach. Finally, the MLE result and prediction result are weighted to obtain the final position. The simulation results demonstrate the effectiveness of the proposed algorithm.


Introduction
Wireless sensor networks (WSNs) are widely applied in monitoring, sensing, and collecting the information of interest in the environment [1].Localization of target nodes is a fundamental problem in wireless sensor networks [2].Up to now, the most existing localization algorithms of WSNs can be classified into two categories: range-based [3,4] and rangefree [5,6].Range-based algorithms use distance or angle estimates in their location estimations.Range-free algorithms use connectivity information between unknown nodes and anchor nodes.Range-based localization algorithms need to measure the actual distances or orientation between adjacent nodes, and then use the measured data to locate unknown nodes.Some ranging methods have been used for distance or orientation estimation, such as RSSI [7,8], ToA [7,9], TDOA [7,10], and AoA [7,11].Whatever the ranging method is, there will be measurement errors in practical localization systems that result in noisy range estimations.Thus, accuracy in the position estimation phase is highly sensitive to range measurements [12].Without improving range estimation or adding some other information related to localization, the accuracy of the current range-based algorithms cannot be improved obviously.
Indoor localization of WSNs has been a hot research topic for the last several years.Due to the randomness of targets moving and the complicated indoor environment, it is very different to locate indoor mobile target.In this paper, we proposed a location predicting method (PPLP) for indoor mobile target localization in WSNs based on path planning.We first establish the path-planning model to constrain the movement trajectory of the mobile target in indoor environment according to indoor architectural pattern.Then, we use MLE approach to get one certain location result of the target.After that, based on the pathplanning model and some previous localization results of the target, the best possible position of the target in the next time interval can be predicted with the proposed predicting approach.Finally, the MLE result and prediction result are weighted to obtain the final position.In simulation process, we define three metrics to evaluate the performance of the proposed algorithm and compared with the MLE algorithm and PSO algorithm.Simulation results demonstrate that the proposed algorithm performed better than the other two algorithms.
The rest of this paper is organized as follows: in the next section, some related work is briefly introduced.Section 3 presents a detailed description of the main contribution of International Journal of Distributed Sensor Networks this paper, the proposed algorithm PPLP.The simulation results on localization performance and error analysis are discussed in Section 4. Section 5 concludes.

Related Work
2.1.Maximum Likelihood Estimation.Maximum likelihood estimation (MLE) is widely used in many localization applications in wireless sensor networks [13][14][15].In the localization process, the number of multiple measurement equations is usually more than the number of variables.Set   ( = 1, 2, . . ., ) is the estimated distance from anchor sensor node (  ,   ) to the target node, the target's position can be calculated as [16]: where

Particle Swarm Optimization for Localization.
Particle swarm optimization (PSO) [17,18] is a swarm bionic optimization algorithm, which models the behavior of flocks of birds and fish.This method converges to the most optimal solution in a larger probability.Its process does not depend upon the quality of the objective function.So, it is commonly used to solve the optimization problems.
Let   = ( 1 ,  2 ) be the 2-dimensional vector representing the position of the th particle in the swarm,  = [ 1 ,  2 ] the position of the best particle in the swarm,  = [ 1 ,  2 ] the current best optimal solution of the th particle itself and is the velocity of the th particle.The particles evolve according to the following equations: where  = 1,2;  = 1, 2, . . ., ;  is the size of the swarm population;  is the inertial weight;  1 determines how much a particle is influenced by the memory of its best solution; and  2 is an indication of the impact of rest of the swarm on the particle. 1 and  2 are termed cognitive and social scaling parameters, respectively. 1 and  2 are uniform random numbers in the interval [0, 1].
Reference [18] proposed an improved PSO algorithm with RSSI self-correcting localization algorithm for wireless sensor networks.Based on the RSSI ranging, the author combined  the proposed RSSI self-correction mechanism and improved PSO algorithm to optimize the nodes' localization for WSNs.Reference [12] proposed two novel and computationally efficient metaheuristic algorithms based on tabu search (TS) and particle swarm optimization (PSO) principles for locating the sensor nodes in a distributed wireless sensor network (WSN) environment.The author compared the performance of the proposed algorithms with each other and also against simulated annealing.The effects of range measurement error, anchor node density, and uncertainty in the anchor node position on localization performance are also studied through various simulations.

Path-Planning Method for WSNs Localization.
Path planning is usually used for mobile anchor node in WSNs localization, where usually requires complex hardware support [19].A mobile anchor node could be a small mobile robot equipped with a GPS and transmit its coordinate to the rest of the sensors to help them localize themselves.Figure 1 depicts a sensor network deployed over a geographical area.After the deployment, a mobile anchor traverses the sensor network while broadcasting its location packet.The packet contains the coordinates of the anchor, the current time, and some other information such as RSSI.Any node receiving the packet will be able to infer its location with several mobile anchors or one mobile anchor at different times.

Prediction Method for WSNs Localization.
Prediction method is usually used to predict the possible locations of target in the next time interval based on the existing time series data [20] as Figure 2 shows.Salamah and Doukhnitch [9] proposed a new efficient algorithm based on time of arrival (ToA) to determine the position of a mobile object (MO) in a wireless environment.However, it is not suitable for indoor mobile target localization because of the non-line-of-sight (NLOS) propagation in indoor environment.

Proposed Algorithm
3.1.Assumptions.We assume that the whole network consists of some stationary anchor nodes (ANs) and a mobile target.The anchor nodes whose coordinates are known are randomly or artificially deployed in a 2-dimensional indoor flat environment.All anchor nodes have the same radio transmission range ().A mobile target may be a human, a robot, or some object manipulated by some person.Turning point (TP) is the intersection of two subpaths.The target can move freely among various rooms.After encountering some turning points, the target may change or not change its motion path.The position of the target can be calculated periodical with the proposed algorithm.The trajectory of the target can be regarded as a series of discrete points called target nodes (TNs).So, the localization problem changes into solving the locations of the target nodes.

Path-Planning Model.
Generally, the movement of the mobile target (such as a person) is driving by its intention with large randomness.But in indoor environment, the motion trajectory of the target is relatively fixed because of the spatial constraint.People often engage in some typical motion patterns.For example, if a person wants to go to another nonadjacent room, he/she must go out the door first, then cross the corridors, and finally reach his/her destination.It is impossible for him/her to go through walls directly to reach the final position.Target's indoor movement will be limited by the indoor architecture pattern, such as walls and doors.Suppose the location system knows the indoor architectural pattern beforehand, and use it to assist positioning, we can get a better localization accuracy and trajectory of the target.
As Figure 3 shows, any corridor/aisle or room can be viewed as a path.Assume that each path can be described using function (, ), then all possible moving paths can be described using path function as follows: where  and  are the ranges of the -coordinate and coordinate, respectively, and   (, ) is the path function for the th path, called subpath function.All subpath functions form the total path function (, ).However, different buildings have different indoor architectural patterns.In order to make location computing more The paths that target can move along effective, we use a straight line segment function to describe each subpath as follows: where (  ,   ) and (  ,   ) are the jumping-off point (JOP) and the end point (EP) of this staight line segment, respectively.A straight line segments subpath can be obtained once JOP and EP are determined.This function can completely (if the real subpath is straight) or approximately (if the real subpath is not straight) describe the real subpath.It will be useful to improve localization accuracy.

Location Predicting Method.
We assume that the maximum velocity of human moving is V max , and localization is periodically with period being Δ.It is difficult to determine TN's position according to the previous localization results, because the human moving is random and the localization error exists.However, the localization results can track target's trajectory with high possibility.So our strategy is, first, to compute localization results during a period of time  using some certain localization method (such as MLE); second, to predict the next possible positions according to these localization results; last, the localization result and prediction result are weighted to obtain the final position.In this paper, we use MLE algorithm to finish the first step.We only focused on step two and step three.Let us use set  = { 1 ,  2 , . . .,   } to describe localization results of the first step during time , where   = ( () ,  () ).The prediction problem can be described as follows: how to get the next position Ĝ+1 according to set  and the pathplanning model.
For any subpath (, ), a set  can be used to describe all points on this subpath.Each element of set  satisfied  function (5).We can also get that all elements of  are belong to set  which can be described as follows: where  min ,  min ,  max , and  max are the minimum -coordinate, minimum -coordinate, maximum coordinate, and maximum -coordinate among all elements of , respectively.Δ and Δ are threshold values which are related to accuracy of MLE algorithm.
One key point for predicting target's position is to find which subpath the target may move at time k.Some definitions are defined at first as follows: Definition 1. Optional subpath that target may move on: for any subpath (, ) described with set , if it is satisfied that  ∩  ̸ = 0, then this subpath is one optional subpath.
The prediction model can be showed as in Figure 4.
Usually, the subpath   (, ) in which   is on is the most possible subpath that target may move on.In order to increase the predicting probability, we choose the subpath most of S − to   are on as the th subpath that targets moves on.Here  is constant which is determined by experiment. should be satisfied during time  −  to ; the distance of target's moving is small.Then, we use the closet projection points on   (, ) to form a new set   = { (1) ,  (2) , . . .,  () }.And the prediction problem based on the previous model can be written as follows: where Ŝ+1 is the position to be predicted, and V  is the velocity at time .For the randomness of target moving, the direction of vector V  is hard to be determined.So, we rewrite it as follows: where ⋅, ⋅ denotes the shortest distance from one point to anther along some certain subpath.So, Ŝ+1 ,  () is the shortest distance from  () to Ŝ+1 along some certain subpath.
Obviously, the optional subpath targets are on at time  + 1 is very likely more than one.So, Ŝ+1 may have one or multiple solutions.At time +1, target may still be on subpath   (, ) or turn to another adjacent subpath.Without loss of generality, we assume that  +1 (, ) is the possible subpath at time +1.The key point to judge whether  +1 (, ) exist is to find out whether there is a TP when target is moving ahead during time Δ.
Let  be the set of all possible TPs that target may encounter, if there is a point   in  satisfing (10), then  +1 (, ) exists as follows: where   ,  () is the possible shortest distance from  () to   along the subpath   (, ) which can be obtained by as following: (, ) .
Then the set of all possible predicting positions at time  + 1 can be written as follows: Set  +1 contains all possible predicting positions.But the possibility of each element in  +1 to become the final localization result is different.Let Û+1 be the localization result using MLE algorithm at time  + 1.Generally, Û+1 is close to real position with high possibility.The more accurate the MLE is, the higher the possibility will be.And the element in  +1 nearby Û+1 has a higher possibility than the other elements.Predicting result in  +1 that owns this feature can be treated as one final result, that is: International Journal of Distributed Sensor Networks 5 On the other hand, for the randomness of human moving, different movement patterns may lead to different prediction possibilities.We can infer the next possible positions according to previous locations.Definition 3. Direction value of  () : for the th point  () in   , we use  orien ( () |  (−1) ) to describe the target's moving direction at time .If  orien ( () |  (−1) ) equals to 1, the moving direction of  () is forward, otherwise backward. orien ( () |  (−1) ) can be calculated with the following: where  =   (, ),  ≥ 2.
So the possibility the target moving forward at time k can be described as follows: where Num  (+1) is the amount of points whose direction value is 1;  is the amount of elements in   .From the previous description, we know that a TP may be encountered when target is moving forward or backward if  +1 (, ) exists.So, in set  +1 , some elements may reflect the prediction results that target moving forward; we use  (forward) to denote the number of these elements.Others may reflect the prediction results that target moving backward; we use  (backward) to denote the number of these elements.So, we can get another prediction result: where Q() +1 is the th prediction result in set  +1 when target is moving forward, Q() +1 is the jth prediction result in set  +1 when backward.
Then the final predication result can be written as follows: where  is the weight of each predicting result.It can be obtained with some learning methods [20] when doing longterm prediction [21] applications.Generally, the long-term motion trajectory of the target usually comply with limited movement patterns, which is shown as a repetitive motion along one or several paths.In this paper, we only consider short-term predicting, and the value of  is set to 0.5.

Final Location Computing.
The final localization result can be obtained as follows: Here we defined  as follows: where  +1 ,   (  (,)) is the distance from   to  +1 along the subpath   (, );  +1 is the closest projection point of  +1 which can be obtained by Definition 2.  +1 (, ) is the subpath that  +1 is on at time  + 1.
The update rule for set  is to keep the length of  unchanged, remove the first element, and insert the new element  +1 into the last of .
3.6.Pseudoprocedure of PPLP Algorithm.Target's final location at time  + 1 can be obtained with the following pseudo procedure of PPLP algorithm.
Procedure end.

Simulation and Analysis
In this section, we will evaluate the performance of the proposed localization algorithm through extensive simulations carried out using MATLAB.

Simulation Scenario and Settings.
We set simulation scenario and some key parameters as follows.
All ANs are randomly deployed in a 50 * 50 m 2 area for the simulation.The total number of ANs is initially 100 and every AN is known its position.All members of  are initialized to (0, 15).Some other parameters are shown in Table 1.The nodes deployment and the environment setup are shown in Figure 5.
In Figure 5, we use 4 dotted-line segments to represent 4 subpaths, respectively.The path width is set to be 2 m.We use some random discrete TNs (as shown in Figure 5 with blue dots) to simulate the randomness of human movement.In the proposed algorithm, we did not consider any particular ranging technique.In the simulation process, we use the following formula (22) [12,22] to describe the measured distances between TNs and ANs with some certain ranging technique: where d and   are the measured and real distance between the AN  and the TN  , respectively, and   is assumed to

Evaluation Metrics.
To analyze the simulation results, in this paper, we defined the following two metrics to evaluate the performance of the proposed algorithm.
(a) Average localization error: where err aver is the error mean of localization result which reflects the accuracy of the algorithm.  is the real coordinate of the TN  ;  is the calculated coordinate of the TN  using the proposed localization algorithm.‖  −   ‖ represents the localization error of TN  .NUM is the number of TNs.
(b) Standard variance of localization error: where Loc var is the standard variance of localization results which can describe the degree of spread of the localization results.Other variables have the same meanings as metric (a).
(c) Average distance to the correct subpath: where deviate value aver is the average distance that the location results of the targets deviated from the correct subpath.  is the closest projection point of the TN  ,   is the calculate coordinate of TN  using proposed algorithm localization algorithm.‖  −   ‖ represents the distance that TN  departed from the correct subpath.

Simulation Results and Analysis.
We firstly simulate 100 ANs to evaluate the performance of the proposed algorithm and the classical MLE algorithm [13][14][15][16].The simulation results are shown in Figures 6 and 7. Figures 6 and 7 show the simulation results of the proposed algorithm and MLE algorithm when the number of anchor nodes is 100 and transmission range () is 10 m.We can see that the performance of the proposed algorithm is better than MLE algorithm.To ease the understanding and analyzing of simulation results, we use average localization error (err aver), standard variance of localization error (Loc var), and average distance to the correct subpath (deviate value aver) as the evaluation metrics to evaluate the performance of these two algorithms.Finally, we get the following comparison results.
Figure 8 provides an intuitive comparison of the accuracy of the proposed localization algorithm and the MLE.The average localization error can be obtained using formula (23).
The result shows that the average localization error of MLE is 2.5621 m while the proposed algorithm is only 1.7624 m.We can see that the proposed localization algorithm has a better accuracy than MLE algorithm.Figure 9 shows the distance that localization results of TNs deviated from the correct trajectory when the target moves along the correct subpath as shown in Figure 5.The average distance to the correct subpath can be obtained using formula (25).The simulation result shows that the average distance to the correct subpath of the proposed algorithm is 0.5175 m, which is much smaller than MLE algorithm.We also calculate the standard variance of localization error with formula (24).The Loc var of MLE is 1.4318, and the proposed algorithm's is 1.0972.Figure 10 gives the comparison results of these two algorithms with respect to the proposed three metrics.The result shows that the proposed algorithm (PPLP) has better performance in all evaluation metrics than MLE algorithm.The accuracy is high, the localization result is stable and concentrated, and it can always find the right way that the target moves on.This is very useful in some practical applications such as elders/children guarding, hospital patients care, indoor searching, and rescuing for trapped.
In order to further verify the effectiveness of the proposed algorithm, we also did some extensive simulations and compared it with the PSO algorithm [12,17,18].By changing the transmission radius () and anchor nodes ratio, we get the following simulation results.
Figure 11 provides a comparison of the accuracy of the proposed localization approach, the MLE algorithm, and the PSO algorithm with respect to anchor nodes' ratio and average connectivity.We run the simulation with 90 TNs.The number of anchor nodes varied from 30 to 100 (as a result the average connectivity increased from 3.99 to 11.73).The simulation results show that the proposed algorithm has a higher accuracy than the other two algorithms.Figure 12 shows the results of these three algorithms with respect to the standard variance of localization error when the number of anchor nodes was changed from 30 to 100.The results show that the standard variance of localization error of the proposed algorithm is lower than the other two algorithms.Figure 13 gives the simulation results of average distance to the correct subpath when the simulation setting is the same as Figure 11.After running at least 100 times simulations, the average distance to the correct subpath can be obtained.As can be seen from Figure 13, it is obvious that the average distance to the correct subpath decreases when anchor nodes' ratio increase.But simulation result of the proposed algorithm changed within a narrow range from 0.51 m to 0.86 m, while the other two algorithms changed obviously.That is to say, the proposed algorithm is more stable than the other two algorithms in indoor environment.Some more simulation results about the discussed three metrics of these three algorithms can be observed in Figures 14, 15, and 16.We run the simulation with 90 TNs and 100 ANs.The transmission range was increased from 5 m to 15 m (as a result, the average connectivity increased from 3.15 to 16.27).The transmission range of a sensor node varies with its transmission power.A better localization performance is expected with higher transmission range as the number  of one-hop ANs increases [14].With the increase in transmission range, the average localization error, the standard variance of localization error, and the average distance to the correct subpath decrease.But the decrease scopes of these three metrics are not all obvious when transmission range is larger than 10 m (here the connectivity value is 11.60).That is because the connectivity is an essential factor that affects these algorithms' performance.When connectivity is greater than a certain value (such as 11.60 showed in Figures 14-16), the accuracy of the algorithm is changed little.Before that, connectivity can greatly affect algorithm's performance.However, the proposed algorithm can have an  excellent performance even with low connectivity as showed in Figures 14-16.
All simulation results proved that PPLP algorithm is performed well in indoor environment.Furthermore, PPLP algorithm is a centralized computing method.The location calculation of the target can be done in some certain device with strong processing capacity such as personal computer.The proposed algorithm does not need to calculate large matrix; there is no iteration in localization computing, the localization program is executed sequentially with high efficiency and low complexity.

Conclusion
Localization is one of the substantial issues in wireless sensor networks.In this paper, we presented a location predicting method (PPLP) for indoor mobile target localization in WSNs based on path-planning.We first analyzed the common feature of indoor environment for most buildings and the motion pattern of most targets and established the path-planning model to constrain the movement trajectory of the mobile target according to indoor architectural pattern.Then, we used MLE algorithm to obtain one certain kind of location result of the target.After that, based on the pathplanning model and some previous localization results of the target, the best possible position of the target in the next time interval was predicted with the proposed predicting approach.Finally, the MLE result and prediction result were weighted to obtain the final position.In simulation process, we defined three metrics to evaluate the performance of the proposed algorithm and compared it with the MLE algorithm and PSO algorithm.Simulation results showed that the proposed algorithm has a better performance in all these three evaluation indicators and can be very useful for some practical applications such as elders/children guarding, hospital patients care, indoor search, and rescue for trapped.

Figure 1 :
Figure 1: A mobile anchor assisting in the localization.

Figure 3 :
Figure 3: An indoor architectural pattern with some indoor paths.
Target nodes (TNs)Localization result   and sequence  Closest projection point   The possible prediction results Ŝ+1

Figure 4 :
Figure 4: Predicting model in indoor environment.

Figure 5 :
Figure 5: The nodes deployment and environment set up.

Figure 6 :Figure 7 :
Figure 6: The simulation result of the proposed algorithm.

Figure 13 :
Figure 13: Average distance to the correct subpath versus anchor nodes' ratio/average connectivity.

Figure 16 :
Figure 16: Average distance to the correct subpath versus transmission range/average connectivity.
Definition 2. Closest projection point   and set :   is the closest projection point of   which satisfies the following function (8),  is the set of { 1 ,  2 , . . .,   } whose element number is equal to 's as