1 Path Planning Based Localization for Wireless Sensor Network Shivangi Kanungo1 1 Department of Computer Science & Engineering,, National Institute of Technology,, Hamirpur, Himachal Pradesh location of the sensor is node is very necessary because by this we know that the data is from which node. By the use of GPS or manual methods the location was distributed.Location information of these nodes are identified previously.It is very difficult for installation of of not even with them .There comes many eacha Nd every network.The use of GPS for this tast is very expensive in terms of money and energy. GPS don't situations when we need to have node's location work well with indoor systems and underwater systems. information to make effective use of the Sensor nodes are of very low battery powers and using data received.With unknown locations anchor nodes GPS ACN reduce the efficiency and life duration of nodes are used to localise the unknown paths drastically. To overcome the above two mentioned drawbacks we introduce localisation algorithm. by moving on a path in network. Localisation accuracy and network cost is also improved Sensor nodes in wireless sensor networks (WSN) are randomly Abstract— when anchor nodes are used. To broadcast and move it's location information. Paths that are fixed are called as trajectories.The prime aim is to create a trajectory with minimal errors and to identify efficiently the nodes that are unknown. Using Trilateration and mobile anchor nodes in this paper we have proposed a localisation algorithm. Keywords: Wireless Sensor Network (WSN), Localization, Sensor Node, Mobile Anchor Node, Path Planning, Trilateration, Trajectory; I. INTRODUCTION Localisation algorithm is basically classified into many types. Anchor nodes are sometimes used to do localisation,these are nodes which have location information. Localisation is classified into range based and range free Algorithms. In range free Algorithm connectivity and hop counts are used to calculate distance between network nodes.some examples of Distance Vector-Hop (DV-Hop), Centroid, Amorphous etc. In range-based localization algorithm, preinstalled extra devicesare used to calculate the unknown distance between the nodesby getting the signal strength, angle of arrival etc. information. Some example of range-based algorithms are Time of Arrival (ToA), Angle of Arrival (AoA), Received Signal Strength Indicator (RSSI) etc. A. Background and motivation I. INTRODUCTION A. Background and motivation Collection of large number of sensor nodes are called as wireless sensor networks, which are used to collect data from a targeted area,this is of low cost and low power.Data such as humidity and temperature are sensed from surrounding by sensor Fig. 1: Classification based on range nodes and sent via wireless problem with wireless Further classification of algorithm is based on anchor sensor network is of localisation.Knowing the 2 node,classified as anchor-based algorithm and anchor free algorithm. In anchor-based algorithm, localization is done by the help of anchor node, nodes can be static or mobile.Anchor node broadcast their location information and other nodes make use of that information to localize themselves.In anchor-free algorithm, no anchor node is used, unknownnodes localize themselves by using some transmission range,neighbouring nodes etc. Fig. 2: Classification based on Anchor Node 3 Trajectory based and trajectory free Algorithms are another forms of classification of localisation algorithm.In trajectory based algorithm anchor nodes follows a trajectory to traverse the network or a fixed path to localise the unknown network,also called as planned Dynamic and static are the further classification of trajectory based algorithm.If path is fixed prior to runtime it is called as static and if path is decided during runtime then it is called as dynamic.Some examples are SCAN,DOUBLE-SCAN, HILBERT etc.There exit no Fixed path in trajectory free According to the Algorithm used path is followed by anchor nodes,also called as random algorithm. Some examples are Random Way Point, Gauss Markov. Fig. 3: Classification based on Trajectory In this paper, anchor path planning is done and a static trajectory-based localization algorithm is proposed. The an- chor node follows the sine wave shaped trajectory. The anchor node moves along the trajectory and broadcast the packet containing its location, periodically. The unknown nodes receive this signals and as any node gets three signal from different location, it calculate its location by applying trilateration. The unknown node also calculate the distance between anchor node and itself by using RSSI measures for the process of trilateration. This trajectory is compared with the other existing trajectory-based localization algorithms and performance improvement is shown by simulation results. B. Contribution In this paper, our main aim is to get efficient result from the given trajectory. The proposed trajectory can help in reducing the average localization error as compared to other trajectories. The contribution of this paper are as follows: 1) For this localization process, an efficient trajectory of anchor node is to be selected to insure that all the unknown nodes get location information to locate them- selves. So, to maximize the location accuracy of the unknown node, an efficient trajectory is studied. That is, the anchor node travel the network along the sine wave curve. Compared with other trajectories this trajectory gives less localization and is able to locate all unknown nodes. 2) The proposed trajectory improves the performance by adjusting the number of sine waves according to deploy- ment area in a WSN. Thus, if unknown node situated 4 obstacle avoidance mechanism which provide noncollinear points around obstacles. The main drawback of MMAPP-NDC is it has longest path length among four algorithms, since it use a group of mobile anchor nodes to traverse the ROI to reduce localization time and improve localization ratio. An effective path planning algorithm can significantly improve the localization performance.In ,both dynamic and static path planning Algorithms have been proposed for mobile based II. RELATED WORK localization.This algorithm makes mobile anchor to stop Wireless Sensor Network (WSN) is used in a lot of at minimum number of nodes to cover the monitoring application now a days. It has become a very area with shortest path length.In proposed static interesting area of research. WSN consist of a lot of approach trilateration with shorter path and loss anchor research issues. The main issue of WSN is are used to determine path.The both static and dynamic localization, as every node in the network need to be algorithms use a two-phase procedure to search the localized by some localization algorithm as it reduces surveillance region and decide the mobile anchor the cost of GPS and also helps in getting the required trajectory. In the search-phase, they divide the region information about the data. Different localization into circular grids and detect the sensors inside. In the algorithms are proposed which achieve high accuracy. decision-phase, they revisit the grids with sensors for The location of unknown node can be determined localization. This algorithms performs better compared to either by using another device i.e. a mobile anchor other algorithms. node or without using any device. There are many advantages of using anchor node base localization. In , author proposed a Hilbert space filling trajectory to First, it reduce the energy consumption of the nodes reduce the collinearity problem. A n-level HILBERT in the network.Second, the localization accuracy can curve divides the space into 4 n squares, which be improved by choosing a correct algorithm or a path increases the path length as “n” increases. In this for anchor node to traverse the network or to transmit algorithm, sensors located near the border of the the messages. We can control the anchor node easily, surveillance area are not localized effectively.In , because they are less in number as compared to the author proposed a localization algorithm which is other nodes. Efficient Localization Algorithm based Path Planning for Mobile Anchor (ELPMA). This algorithm is based on a In , the author proposed a Localization algorithm one mobile anchor which is moving in adjustable circular with a Mobile Anchor node based on Trilateration trajectory to scan the network. It uses received signal (LMAT) in WSN.The mobile anchor node used in this strength indicator as ranging function to determine the Algorithm uses a fixed trajectory in the network where distance between mobile anchor and sensor nodes. In periodically locations are shared to nearby nodes with this algorithm, mobile anchor starts the motion from the the help of sensors embedded in it.High accuracy and centre of the target area. The traveling path is planned in better coverage are provided by equilateral advance based on the distance measurement between triangles,and that is used in this paper.Trilateration is the mobile anchor and sensor node. applied to calculate coordinates of unknown nodes from the received message packets.This lead to high accuracy and reduced error.In , author propose three Mobile anchor nodes Path Planning (MAPP) algorithms namely,IMAPPP-NDC, SMAPP-NDC and MMAPP-NDC. The proposed algorithm combine network-density-based clustering, Inter-clustering path planning and intra-cluster path planning together to improve localization and utilize rate of virtual beacons. This algorithm used hexagon shaped trajectory. SMAPP-NDC and MMAPP-NDC algorithms employ at the corner of the area will also get localized. Thus, localization coverage and accuracy of unknown node also increases. 3) Compared to existing algorithms such as SCAN, DSCAN, HILBERT, SPIRAL etc., this algorithm pro- vides better solution to solve the problem of collinearity for the process of localization. 5 In , author proposed a novel idea of localizing the target node with moving single anchor node, using application of Particle Swarm Optimization (PSO) and H-Best Particle Swarm Optimization (HPSO).The anchor node localize other nodes and moves in HILBERT trajectory. Localization algorithm have been implemented for distributed WSN and using RSSI based (range based) technique by this algorithm. HILBERT trajectory is followed by anchor node in the proposes algorithm,any deployed target node falls under the range of moving anchor node, the Euclidian distance between anchor and unknown node is calculated. After calculating the distance, six virtual anchor nodes at a distance same as Euclidian distance are projected with an angle difference of 60 degree around the anchor node. After projecting the virtual anchor node, two anchor node are used to find 2D coordinates of the target node. The anchor node is moving with a constant speed and algorithm runs after a fix time interval. B. Trajectory Fixed path to move in a network by anchor node is called as trajectory. All other nodes can be localized with only one anchor node in the network if we use trajectory. As Location signals are transmitted periodically when anchor nodes are moved along the trajectory.The challenging part is to select the most optimal trajectory which provides the best result. Main goals for choosing the correct trajectory for Localization are:1.High network coverage should be provided by trajectory. 2.Less Localization error should be provided by trajectory. III. PROPOSED APPROACH A. Network Model In proposed approach, the WSN consist of a number of randomly deployed unknown sensor node and a moving anchor node. The size of network is L*B, which can be changed according to the size. All the sensors including the mobile anchor node consist of same communication radius i.e. r, which can be changed according to need. The anchor node sends the message containing its location information after particulate interval of time. When at least three packet received by unknown node, it calculated its own location by applying trilateration. Fig. 4: Traveling Trajectory of anchor node in sine wave shape C. Trilateration Process When location containing signal information is received by any unknown node from three different locations,trilateration method is used to determine the relative location of itself. Absolute relative location is of any node is determined by calculating the distance. For calculation of the distances geometrical figures are used such as circle, spheres, triangles.The condition required for applying trilateration is that ,we need to have three coordinates known prior to method implementation .Since mathematically to identify location in 2D space we need to have three coordinates atleast. Here, three points with known location A, B, C and (x1, y1), (x2, y2), (x3, y3) respectively are there coordinates. The intersection point of three sphere is the unknown node is at which distance of d1, d2, d3 from A,B,C respectively. The equations for finding (x, y) coordinates areThe distance between Measu the anchor node and1 res. un- known node is We calculated by RSSI2 consid 6 er that the packet can be sent and received in the circular region within the radius. (x1 − x)2 + (y1 − y)2 = d2 (1) (x2 − x)2 + (y2 − y)2 = d2 (2) (x3 − x)2 + (y3 − y)2 = d2 (3) 7 IV. PROPOSED ALGORITHM Fig. 5: Trilateration Process By solving (1),(2),(3) equations we can calculate the value of (x, y) We can expand out the squares in each one: x2 − 2x1x + x21+ y2 − 2y1y + y21= d21 (4) The algorithm proposed in this paper can be summarized by the following steps: 1) The anchor node move along the trajectory in the network. 2) When the anchor node broadcastthe location signal/packet. 3) If a unknown node is within the range of broadcast. 4) Then unknown node stores the location packet and calculate the estimated distance to the anchor node using d = (A−RSSSI )/10n max 10 . 5) Else do nothing. 6) If the unknown node receives packets from at least three different anchor locations. 7) Then unknown node perform Trilateration. 8) Else do nothing. 9) If the trilateration is applied correctly, we get the coor- dinates of unknown node. 10) Then repeat 3. 11) End. The steps shows the step by step method by which the x2 − 2x2x + x22+ y2 − 2y2y + y22= d22 (5) proposed algorithm can be implemented. x3 − 2x3x + x23 + y2 − 2y3y + y23 = d23 (6) V. PERFORMANCE ANALYSIS AND COMPARISON A. Simulation parameter On subtracting eq. (5) from eq. (4), we get (−2x1 + 2x2)x + (−2y1 + 2y2)y = d2 − d2 − x2 + x2 − y2 + y2 1 2 1 2 1 (7) 2 HILBERT, SPIRAL. The deployment area is set to 100m X On subtracting eq. (6) from eq. (5), we get (−2x2 + 2x3)x + (−2y2 + 2y3)y = d22 − d23 − x22 + x23− y22+ y23 100m, other parameters are mentioned in table given bellow. (8) From the above equations we can get two equations with two unknowns Ax + By = C DX + Ey = F The simulation of this algorithm is done in MATLAB sim- ulator. In this we compare the performance analysis and local- ization error of different algorithms mainly SCAN, DSCAN, TABLE I: Simulation Parameters Parameter Value Network Size(in m) Unknown Nodes(n) Radius (in m) Node Density 100 x 100 100 20 0,8,12,16,20 (9) B. Node Density On solving x= CE − FB EA − BD CD − AF y= BD − AE (10) Node density of the deployed node affects the efficiency of localization algorithm, as the density of unknown nodes is larger, it increases the energy consumption of network and also communication overloads of sensor node. In the figure (6) shown the comparison between different algorithms by comparing the localization error with 8 respe ct to n For determining the value of d1, d2, d3 RSSI (Received Signal Strength Indicator) Measures are used. Distance can be calculated by using RSSI Measure using following formulad = 10(A−RSSSImax)/10n Where, RSSI max is maximum RSSI value A is received signal power in the distance d0 between two points n is path loss exponent. ode density. C. Traveling Speed of anchor node The traveling speed of anchor node varies from o.5 to 2m/s. It is observed that the speed of anchor node does not affect the localization error of the algorithm. The proposed trajec- tory performs well as compared to other. Figure (7) shows the localization error of different algorithms with respect to traveling speed of anchor. 9 Fig. 6: Localization error vs. Node Density Fig. 8: Number of Reference node of different algorithms E. Localization Error Localization error is main issue of any localization al- gorithm. Inefficient algorithm and mobility of sensor is the main reason of increase in localization error. Localization error is summation of the difference between the estimated and real coordinates of localized sensor node divided by the total number of nodes. Localization error is used to calculate the localization accuracy of the algorithm. Mathematically, Average localization error (L) can be calculated as followL= n Σ E(i) n (12) i=1 √ E(i) = Fig. 7: Average Localization Error vs. Traveling Speed of anchor node (Est xi − xi) 2 + (Est yi − yi) 2 (13) Where, E(i) is the error of single node, n is total number of node, (xi,yi) is actual coordinates of the sensor and (Estxi,Estyi) is estimated coordinates of the sensor which is calculated by applying the algorithm. D. Number of reference node Localization error reduces with the increase in number of reference node(Rn) as it increase the localization accuracy of unknown nodes. Mathematically, number of reference node can be calculated as1Σ C(R i) n 1 n Rn = (11) Where, n is the total number of localized node and Ri is the total number of reference node used to localize the unknown node i. C(Ri) is the cardinality of set Ri. Figure (8) shows the number of reference node used by each algorithms. Though, the number of reference node of HILBERT is higher that proposed trajectory, despite of that proposed trajectory has less localization error. 10 Fig. 9: Localization Error of different algorithms 11 As seen in the figure localization error of SCAN and proposed algorithm(SINE) is somewhat equal but proposed algorithm reduces the problem of collinearity which is main problem in SCAN algorithm. Due to the collinearity problem (i.e. getting the anchor node locations in same line), there is error in calculating the estimated position of any unknown node. Thus, it is observed that SINE outperform well among other algorithms. In comparison, the radius is 40m and there are 100 number of unknown nodes. F. Results Figure (10) shows the localization error occurred when the number of unknown nodes changes in the network by keeping the network size same i.e. 100 X 100m. Fig. 10: Localization Error vs. Number of nodes Figure (11) shows the comparison between the real and estimated position of the unknown nodes. It can be observed that most of the estimated position is same as real position and some are very close to them. Rest of the differences come due to the localization error which can be caused by many reasons. Thus, Proposed algorithm has performed well. VI. CONCLUSION In this paper we first propose the trajectory on which our mobile anchor node moves and transmit its location periodically and the trilateration is used to determine the location of unknown nodes. By the proposed algorithm, we conclude that path planning for the mobile anchor node affects the localization process in WSN. While choosing the correct path or trajectory, two points we should keep in mind that it should provide high location accuracy and energy consumption by the sensor nodes are less. This trajectory would definitely decrease the localization error compared to other trajectories. The comparisons is done between SCAN, DOUBLE SCAN, HILBERT, SPIRAL trajectories. By simulation results, we conclude that the proposed algorithm performs great with respect to other algorithms. Proposed algorithm decrease the localization error and also increase the localization accuracy. 12  R. Huang and G. Zaruba, “Static path planning for mobile beacons to localize sensor networks”, Proc. 5th Annual IEEE International Conference Pervasive .Computer Communication Workshops, pp. 323–330. Mar. 2007 Fig. 11: Comparison of real and estimated position of sensor node REFERE NCES  Guangjie Han, Huihui Xu1, Jinfang Jiang, Lei Shu, Takahiro Hara and Shojiro Nishio, “Path Planning using a Mobile Anchor node based on Trilateration in Wireless Sensor Network,” Journal of Wireless Commu- nication and Mobile Computing, vol. 13, pp. 1324-1336, 2011.  Guangjie Hana, Chenyu Zhangb, Jinfang Jianga, Xuan Yanga and Mohsen Guizanic, “Mobile Anchor Nodes Path Planning Algorithm using Network-density-based Clustering in Wireless Sensor Network,” Jounal of Network and Computer Applications, Vol. 85, pp. 64-75, 2017.  Ecenaz Erdemir and T. Engin Tuncer, “Path Planning for MobileAnchor based Wireless Sensor Network Localization: Static and Dynamic Schemes”, Journal of Ad Hoc Networks, vol. 77, pp. 110, 2018.  J. Rezazadeh, M. Moradi, A.S. Ismail and E. Dutkiewicz, “Superior path planning mechanism for mobile beacon-assisted localization in wireless sensor net- works”, Journal of IEEE Sensor, Vol. 14, no. 9, pp. 3052–3064, 2014 .  Bassam Faiz Gumaida and Juan Luo, “ ELPMA: Efficient Localization Algorithm Based Path Planning for Mobile Anchor in Wireless Sensor Network”, Journal of Wireless Pers Communication, vol. 100, pp. 721- 744, 2018.  Parulpreet Singh, Arun Khosla, Anil Kumar and Mamta Khosla, “Opti- mized localization of target nodes using single mobile anchore node in wireless sensor network”, Journal of Int. J. Electron. Commun., vol. 91, pp. 55-65, 2018.  Samiullah Khan, Farhanda Javed, Asfandyar Khan, Alweena Javed, Rohi Tarq, Matiullah and Faheem Khan, “ On precise path planning aalgorithm in Wireless Sensor Network”, International Journal of Distributed Sensor Networks, Vol. 14, No. 7, pp. 1-12, 2018.  D. Poorvaradevi and S. Priyadharsini, “ Circle Based Path Planning Algorithm for Localization using Mobile Anchor in Wireless Sensor Network”, World Conference on Futuristic Trends, 2016.  C. Ou and W. He, ”Path planning algorithm for mobile anchorbased localization in wireless sensor networks”, IEEE Sens. J., vol. 13, no. 2, pp. 466475, Feb. 2013.  N. V. Doohan, S. Tokekar, JitendraPatil, “Mobility of sink using hexagon architecture in highly data centric wireless sensor networks”, Interna- tional Journal of Scientic & Engineering Research, vol. 3, no. 9, pp. 528-540, Sep. 2012.  F. Liu, H. Zhu, Z. Gu, and Y. Liu, ”A linear localization algorithm for wireless sensor network based on RSSI”, Advanced Research on Computer Education, Simulation and Modeling, vol. 176, S. Lin and X. Huang, Eds. Berlin, Germany: Springer-Verlag, 2011, pp. 384389. 13  S. Lee, E. Kim, C. Kim, and K. Kim, “Localization with a mobile beacon based on geometric constraints in wireless sensor networks”, IEEE Trans. Wireless Commun., vol. 8, no. 12, pp. 5801–5805, Dec. 2009.  Abdullah Alomari, William Phillips, Nauman Aslam and rank Comeau, “Swarm Intelligence Optimization Techniques for Obstacle-Avoidance Mobility-Assisted Localization in Wireless Sensor Networks,” Journal of IEEE Access, vol. 6, pp. 22368-22385, 2018.  Ivan Maurovic, Marija Seder, Kruno Lenac and Ivan Petrovic, “Path planning for Active SLAM Based on the D* Algorithm with Negetive Edge Weight,” Journal of IEEE Transaction on Systems, Man and Cybernetics System, vol. 48, no. 8, pp. 1321-1331, 2018.  Pericle Perazzo, Francesco Betti Sorbelli, Mouro Conti, Gianluca Dini and Cristina M. Pinotti, “Drone Path Planning for Secure Positioning and Secure Position Verification,” Journal of IEEE Transactions on Mobile Computing, vol. 16, no. 9, pp. 2478-2493, 2017.  Guangjie Han, Jinfang Jiang, Chenyu Zhang, rung Q. Duong and Mohsen Guizani, “A survey on Mobile Anchor Node Assisted Localization in Wireless Sensor Networks,” Journal if IEEE Sensor,vol. 18, no. 3, pp. 2220-2243, 2016.  Chih-Yung Chang, Chih-Yu Lin and Chao-Tsun Chang, “Tone-Based Localization for Distinguishing Relative Location in Wireless Sensor Network,” Journal of IEEE Sensor, vol. 12, no. 5, pp. 1058-1070, May 2012.  K. Liu and J. Xiong, “A Fine-grained Localization Scheme Using a Mobile Beacon Node for Wireless Sensor Networks,” Journal of Information Processing Systems, vol. 6, no. 2, pp. 147-162, 2010.  G. Han, D. Choi and W. Lim, “Reference Node Placement and Selection Algorithm Based on Trilateration for Indoor Sensor Networks,” Journal of Wireless Communications and Mobile Computing, vol. 9, pp. 1017-1027, 2009.  H. Zhen, D. Gu and Z. Song, “Localization in Wireless Sensor Networks Using a Mobile Anchor Node,” In: Proc. of IEEE/ASME on Advanced Intelligent Mechatronics, pp. 602 607, 2008.  Tashnim J.S. Chowdhury, Colin Elkin, Vijay Devabhaktuni and Danda B. Rawat, “Advances on localization technique for wireless sensor networks: A Survey” ,Computer Networks, pp. 284-305, 2016.  Leila Chelouah, Fouzi Semchedine and Louiza Bouallouche-Medjkoune, “Localization protocols for mobile wireless sensor networks : A Survey” , Computer and Electrical Engineering, pp. 1-19, 2017.