Multilateration Localization for Wireless Sensor Networks

Objectives/methodology: Localization in wireless sensor networks (WSNs) has long been one of the most interesting areas that researchers continue to study. This study presents the methodology of mathematical model for multilateration localization in WSNs verified by a simulation model using the NS-2 simulator. Findings: The new modules added to NS-2 can be extended to various rangebased localization techniques, which help many researchers in this field. Applications: This work makes a comparative study of atomic and iterative multilateration localization according to different performance metrics.


Introduction
Wireless sensor networks (WSNs) have been widely used in many applications and in different fields like agriculture, industry, healthcare, transportation, and many others. WSN introduced many challenges that are active research topics because of its various applications [1]. In order to determine the position of sensor node, WSN is a suitable mean because it has lower power consumption and has a cheap technology comparing with others. The process of determining the position of sensor node is not easy and considered an essential problem for different WSN applications [2]. To solve this problem, a general solution is called global position system (GPS) that is considered the most common technique for solving this problem. But this solution has some matters according to the case of WSN such as size, cost, and energy consumption. Moreover, GPS is impractical solution for indoor or underwater environments. Hence, most localization algorithms assume that there are only a few nodes with GPS devices which know their positions in advance called anchor or beacon nodes.
The process of localization in WSNs refers to estimating sensor node position, which can be applied by different classes of localization algorithms like range-free and range-based [3]. According to the range-free localization, the number of hops between sensor nodes is considered the measure of distance while in range-based, some techniques such as RSSI, TOA, AOA, etc. can be used to measure the distance between sensor nodes [4]. In the range-free techniques, no need for measuring the distance between sensor nodes because these techniques depend on connectivity algorithms [5]. In the range-based class, positions of sensor nodes are estimated based on the measured distance to anchor nodes.
Simulation is considered the most important tool used in system modeling for different applications such as engineering experiments, manufacturing, and business study [6]. In case of simulation of WSN localization, a lot of simulation tools used but the most common and powerful one is NS-2 [7]. Different localization algorithms can be simulated by NS-2, which has a huge collection of libraries and modules that can be modified easily. In this study, Multilateration algorithm has been simulated using the NS-2.34 simulator by modifying its libraries [8]. In the modified version of NS-2.34, there is main class called Place.cc that contains different localization methods, which can be modified by any researcher want to add new class to it. The new class added in this article is multilateration. cc, which is based on minimum mean square estimate (MMSE) [9]. Last but not least, in this article comparison between atomic and iterative multilateration is conducted.
The following sections of this article are as follows; section 2 presents the proposed system model of localization system. Section 3 presents the classes added to NS-2 that is used to implement multilateration localization. Section 4 illustrates a comparison between atomic and iterative Multilateration localization using different metrics. Finally, section 5 concludes this article.

System Model
Assume that, there is a WSN consists of a set of sensor nodes called unknown (due to unknown locations of them) and a few number of known location nodes (either manually or GPS) called anchors. The challenge here is how to find the location of unknown nodes using the known location of anchor nodes; this is done simply by measuring the distance between sensor and anchor nodes. Hence, the work presented in this article consists of three parts that is used to model the proposed localization system as shown in Figure  1. These parts are as follows: distance estimation -atomic multilateration -iterative multilateration. According to the first part, each anchor node broadcasts its location to neighbor nodes, which in turn measure the distance to anchor node. In the second part (atomic multilateration), each neighbor node (unknown) can estimate its location based on information from the first part. When unknown node estimates its position, it becomes a reference node and broadcasts its location to its neighbors so as to estimate their location. In the third part (iterative multilateration), the process done in the second part is repeated until all/most of unknown nodes estimate their locations. The details for each part summarized in the following.

Distance Estimation
Different methods can be used for distance estimation such as time of arrival (ToA), time difference of arrival (TDoA), received signal strength (RSS), and angle of arrival (AoA) [10]. In this part, the technique used for measuring distance is received signal strength (RSS) that is based on Friis free space equation (1) which estimates the measured distance between anchor (or reference) and sensor nodes as follows: where P T , P R are power transmitted and received at anchor and unknown node, respectively. G T is the gain of anchor node antenna, G R is the gain of receiver node, λ is the wavelength, and d is the distance between the anchor node and the unknown node. The derivation of equation (1) can be found in Ref. [11].

Atomic Multilateration
Here, the location of sensor node is estimated according to information such as estimated distance given from the first part and position of three or more anchor nodes [12]. Here, the problem of estimating unknown's absolute position based on distance measurements from three or more anchor nodes is considered.
Each anchor node can range an unknown node within its detection radius. A single distance measurements, r, restricts unknown's location to a circle of radius r centered at anchor node, shown in Figure 2(a). Similarly, if a second anchor node can provide distance measurement as well, then unknown's location is restricted to one of the two points where the circles intersect, Figure 2(b). If a third anchor can provide distance measurement, then unknown's position can be narrowed to just one position, as shown in Figure 2(c). With only two dimensions, three distance estimates will exactly determine unknown's location, but four or more anchor nodes will give an over determined solution [13], which clarified in the following.
If unknown's location is denoted by (x, y), and the i-th anchor's location as (x i , y i ) and distance estimate as r i , then the following set of equations will be true i ∀ . In order to determine the distance from unknown to anchor node, the following formula is used: Indian Journal of Science and Technology Vol 13(10), DOI: 10.17485/ijst/2020/v13i10/150005, March 2020 Squaring both sides and writing in vector notation for n independent distance estimates gives: Expanding left hand side results in: x x x y y x y These equations can be linearized by subtracting the bottom row from each of the remaining rows (eliminating all unknown square terms) then moving all remaining square terms (anchor nodes) to the right-hand side then factorization of the unknown variables, gives: x x x y y y r r x x y y Which can be written in matrix form as follows: For an exactly determined solution where precisely three independent anchor nodes give estimated distance, can be written as: Which is easily solvable as a system of two equations in two unknowns.
If there are more than the anchor nodes communicating with unknown nodes, then the solution is over determined. In such a case, this system of over determined equations can be solved using minimum mean square error (MMSE) technique. The advantage of using this technique is that when distance estimates have unknown errors (noexact), this technique provides the least-squares solution that will find the best estimate. The general formula of n equations in m unknowns, 1 2 , , , m z z z … . is given by: When m = n and the determinant of A ≠ 0, the solution to the set of equations is: When m < n, then the set of equations is over determined and the solution is given by: ere # A . is called pseudoinverse of A. # A . exists whenever T A A . has an inverse and igiven by: call that the norm of a vector v is the inner product of the vector with itself as swn below: ast-squares and pseudo-inverse approach provides the solution that minimis the norm Az r − . . This approach minimizes the distance error between two vectors Az and r as follows: Which is the least squares solution.

Iterative Multilateration
In this part, atomic multilateration considered its main primitive to estimate the location of unknown nodes using the location of anchor nodes. When an unknown node estimates its location, it becomes a reference node and used for localization of another unknown. This process repeats until the locations of all unknowns that eventually can have three or more anchor nodes estimated [14].

NS-2 Added Modules
This article, C++ classes added to NS-2 as shown in Figure 3 represent the localization system. The first module is Place.cc, which contains several helper functions for the localization process. The second module considered the core of localization system, which implemented in multilateration.cc class.  The process of distance estimation is performed in function called measure_distance_ RSS(double Pr) contained in Place.cc class. The RSS technique is used to measure the distance between the sensor node and anchor (reference) nodes. The error introduced in distance measurements is modeled as Gaussian random number by using the following equation: distance += error.normal(mean, sd) where normal is Gaussian random number generator specified by mean and standard deviation sd.
Location estimation process is performed by estimate(Location* loc_) function which calls an instance of multilateration.cc class then returns true or false according to estimated location reference &loc_. The multilateration.cc class represents core process of multilateration algorithm which uses all the available anchor or reference nodes and performs the estimation only once. In order to perform estimation process several times, the process is repeated again by calling estimate (Location* loc_) function so as to satisfy iterative multilateration.

Comparative Study
this section, the performance of atomic and iterative multilateration will be evaluated. Performance metrics used for comparison are average localization error and number of localized nodes. Average localization error calculation is based on calculating mean square error as follows: Where n is the number of sensor nodes that have been localized; and (x i , y i ), (x j , y j ) represents real and calculated location of unknown node respectively. MSE is divided by sensor's transmission range results in average localization error as shown below: where ALE is the coverage computed from equation (13) and R is the transmission range for sensor node.

Simulation Model
Multilateration localization implemented by adding new classes to NS-2 simulator. Simulation model consists of two scenarios: the first one based on changing standard deviation and studying its effect on localization error and coverage for both atomic and iterative multilateration. The second scenario is based on changing transmission range for anchor nodes and measuring its compact on localization error and coverage for both atomic and iterative multilateration. Details of simulation models shown in Table 1. According to the first scenario, area size = 200 × 200 m 2 with varying number of anchor nodes from 10% to 50% of the total number of unknown nodes and varying transmission range of all sensor nodes so as to study its effect on localization error and coverage. Second scenario, working on larger deployment area 300 × 300 m 2 , also varying number of anchor nodes but transmission range is settled at 50 m with varying standard deviation of distance measurement error from 0 to 1% of distance between anchor and unknown nodes. For both scenarios, there are five simulation runs each has 200 sec with random distribution of nodes. Simulation parameters used in this study found in Ref. [11].

Simulation Results
In this section, simulation results based on two measures: localization error from equation (13) and percent of localized sensor nodes (coverage) represented in equation (14). There are three types of sensor nodes: normal sensor node with unknown location has a blue Indian Journal of Science and Technology Vol 13(10), DOI: 10.17485/ijst/2020/v13i10/150005, March 2020 color on simulator GUI. The second type is anchor node with known location via GPS or manually has a green color and third type is a reference node that is a normal senor node but with estimated location has a red color as shown in Figure 4.

Scenario I
This scenario has a deployment field of 200 × 200 m 2 , 100 unknown location sensors, number of anchor nodes varied from 10 to 50 nodes and the transmission range of all nodes has the following values: 25, 30, and 35 m. Standard deviation is 0.01, which represents the percent of the change in distance measured between anchor and sensor node. From Figure 5, average localization error decreases when increasing number of deployed anchor node. This is due to the fact that as the number of anchor nodes increase the covered region (intersecting region) decreases yielding less localization error. This

Indian Journal of Science and Technology
Vol 13(10), DOI: 10.17485/ijst/2020/v13i10/150005, March 2020 figure illustrates that iterative multilateration has higher localization error than atomic multilateration, that is because iterative multilateration is based on reference nodes which give higher localization error than anchor nodes. This figure also shows that varying transmission range has no great impact on localization error. As shown in Figure 6, when the number of anchor nodes increases, percent of localized sensor nodes also increases. This figure shows that iterative multilateration has higher coverage than atomic multilateration, because iterative multilateration is based on reference nodes as stated before so that giving it the ability to localize more unknown nodes. This figure also illustrates that when increasing transmission range, percent of localized sensor nodes increases for both atomic and iterative multilateration.

Scenario II
In this scenario, all nodes are deployed randomly in deployment area 300 × 300 m 2 , total number of nodes deployed 110, 120, 130, 140, and 150 nodes. Standard deviation values are 0%, 0.1%, and 1% of measured distance between anchor and unknown node. Figure 7 presents the topology of this scenario.  Figure 8 presents the effect of varying standard deviation on localization error where an increase in standard deviation leads to increase in localization error accordingly. As shown, the average localization error decreases as number of anchor nodes increase for both atomic and iterative localization. This scenario illustrates that atomic multilateration has lower localization error than iterative multilateration.
In the following, standard deviation settled at 0% but with varying number of anchor nodes. As shown in Figure 9, when the percent of anchor nodes increases, percent of localized sensor nodes increases. Iterative multilateration has higher percent than atomic multilateration due to increased number of localized reference nodes.

Conclusion
This study presents the methodology of adding new classes to NS-2 simulator such that it is able to simulate multilateration localization algorithm. Afterwards, a simulation study done between atomic and iterative multilateration base on some simulation measures such as average localization error and percent of localized sensor nodes. Simulation results show that iterative multilateration has higher localization error and higher percent of localized sensor nodes than atomic multilateration.