Impact of Initialization on Gradient Descent Method in Localization Using Received Signal Strength

In this article we present a localization technique based on received signal strength (RSS) combined with the gradient descent optimization method. The goal of this article is to show the importance of gradient descent in localization domain over the trilateration technique, and that by reducing the number of needed anchor nodes. Furthermore, we demonstrate the effect of the initialization technique on the localization accuracy. Results have shown that the selection of the initialization type (4 types of initialization were tested) has an efficient impact on the accuracy of the target sensors location estimation.


Introduction
In the last few years wireless sensor network (WSN) had become one of the dominant technologies that can be used in different fields (outdoor and indoor). WSN can be defined as a collection of low cost and power sensors that can communicate wirelessly, each node in this network can since, process and have the ability to communicate with its peer, in order to share and exchange meaningful information [1], furthermore, WSN has gained a lot of interest in many application such as tracking system, underwater surveillance, health caring and so on [1-2-3], most of these applications consist of distributing sensors in a random way, hence, knowing the sensors location is necessary to recuperate from them significant information. Consequently, localization has become an interesting topic for many researchers.
One of the famous approaches that has been mostly used in localization is the global positioning system (GPS), despite all the advantages that GPS offer, it's still unsuitable in indoor places and will not be a good choice due to different physical phenomena (attenuation, multipath …) that can affect signal propagation. For that, two common types of localization have been widely used: range free techniques [4][5] (hop count, pattern matching, centroid….), where the absolute range information or angle between two pair of node is not needed, and range based techniques such as time of arrival (TOA), time difference of arrival (TDOA), angle of arrival(AOA), Received Signal Strength Indicator (RSS), where the information on distance/angle between nodes are required. RSS technique offers a good solution in an indoor environment compared to other methods, it consists of calculating the distance using the RSS measurements between the receiver and the transmitter node, it is considered as a low complex and low energy consumption method [4][5]. Nevertheless, RSS still susceptible to the noise and interference factor, that will affect the estimated distance accuracy. Hence, some researchers have used optimization algorithms like gradient descent, newton Raphson [6] and other techniques, that have shown an attractive solution in localization domain compared with the previous mentioned algorithms.
Furthermore, to localize an unknown node, a wellknown technique is used; the trilateration where at least 3 anchor nodes (nodes which real positions are known) are necessary to estimate an unknow node's position.
For that, in this article our goal will be showing the impact of initialization in gradient descent on the localization accuracy, where 4 types of initialization were tested and compared. Also, we have shown the benefits of the gradient descent technique in localization domain by showing its advantage over trilateration in terms of reducing the number of needed anchors.
The remaining of this paper will be organized as follow, in the section 2 we will briefly describe some related works. In section 3, gradient descend method and 4 types of initialization will be explained, in section 4 we present the simulation results with a comparison between the initialization techniques. In the last section we wrap up with a conclusion.

Related works
Localization and optimization algorithm have become a good combination to obtain a better result compared to the traditional localization methods. Between all optimization techniques, gradient descent (GD) has gained a lot of popularity in localization domain, the main idea of GD depends on the concept of finding the optimum value by using the derivative of the objective function. Many localization studies were done based on gradient descent, in [7] an improved indoor positioning method was done based on fingerprinting method, and a K nearest neighbor (KNN) was applied to obtain a good initial point of the gradient descent algorithm. In [8] another modified gradient method was done in radio localization system; the proposed algorithm has shown a good result compared with Foy method. In other hand, some researchers have focused on the safe side of gradient localization, [9] presents a secure localization algorithm that can resist malicious attack by combining gradient descent with a selective pruning method, furthermore, this same technique was modified in [10] to remove misleading information, where the ordinary nodes can cooperate to reduce localization errors. Other researches have focused on smart initialization in localization. Usually, the initial value can be implemented randomly, however sometimes gradient descent can fall into the local minima issue [11]. For that selecting a suitable initial point can play an important role in avoiding this problem and has an important influence on the accuracy of localization [7]. In [12] two gradient methods were introduced, gradient method A(GDA) and gradient method B(GDB), in both, the inter sensor distance was supposed to be known, and the target function represented as the sum of the squared error between the given and estimated distance, the idea is to minimize the target function. In GDA method, the initialization was done randomly based on the weight. The difference between the two methods is that in A the gradient was applied on the weight changing on each iteration in order to obtain the optimum weight that will give us the location of the unknown node, while in B the gradient was applied on the estimated coordinates.
The idea in our work is to show the importance of using gradient descent in localization domain in term of reducing the required anchor nodes, and that is by comparing the number of anchor node used in trilateration technique with the gradient descent method used in this article, second, to show the importance of a good initialization in node's localization. For that, we combine these two methods (GDA and GDB), and that by using the initialization used in GDA ( 1 = ( 1,2 × 1,2 ) + ( 1,3 × 1,3 ) + ⋯ ) [12] and applying it on GDB, while the gradient will be made on the coordinates and not on the weights. This initialization technique was compared to a non-random initialization method [7], and that is to show the importance of non-random initialization and how it can affect the results accuracy.

Distance Estimation:
The distance can be calculated based on the RSS values between the anchor and the unknown nodes. As a first step, the calculation of the distance will be based on the equation of the received power below: Where the distance can be calculated as follow using [13]: (2) , represent the power between the i th node and the j th anchor. Pr 0 represents the power of the transmitter at distance 0 , and is the path loss exponent (2< <6), and * ( , ) is the distance between unknown node i and anchor j.

Coordinates estimation
The objective function now will be represented by the sum of the squared errors between the distance obtained in (2) and the estimated distance ( ) changing in each iteration. [12] = 0.5 × ∑ ( , , * is the distance obtained by equation (2), and , is the estimated distance based on the estimated coordinate that will change on each iteration: and represent the estimated coordinates of the unknown node to be localized. and represent the coordinates of the anchor nodes. The goal of the algorithm is to obtain the location of the unknown coordinates at the end, and that will be by minimizing the objective function (3). Gradient descent is used to find the best coordinate and that minimize the target function. In order to do that we should start by an initial coordinate, it can be assigned randomly but it is important to start by a suitable value in order to avoid local minima issue and obtain an accurate result. This article will show multiple way of a good initialization, that will be compared in the simulation with the random initialization techniques:
1, is the distance between the unknown node 1 and the anchor j. 1 and 1 represent the coordinates of the unknown node 1.

b. Initialization 2:
The second initialization will be based on RSS and the nonrandom weight [7]:

c. Initialization 3:
Another initialization method based on [7] is used also in this article. Where the weight will not be multiplied with the inter sensor distance, but with the coordinates of the anchor nodes.
Where 2 , 3 , , 2 , 3 and represent the coordinates of the anchor nodes and 1, represent the non-random weight based on RSS equation (9).

d. Initialization 4:
Same as initialization 3 but the weight is given randomly (it's not calculated based on RSS value).

Derivative
After the initialization step, we derive the objective function in (3)  Then, we apply gradient on the coordinates in order to minimize the objective function and obtain the position of the unknown nodes. [12] [ ] k the step size (0 < < 1).
The derivative will be calculated until reaching the convergence of the target points and , and that by reaching the minimum of the objective function. The steps can be summarized as follow: 1) Calculate the distance based on RSS values using equation (2).  (14) 6) The convergence will be depending on the condition applied on the objective function in equation (3).

Simulations
Simulations are done using MATLAB. The first part of the simulation result is described by figures below presenting a comparison between the gradient method and trilateration technique, showing the efficiency of our proposed method, in an environment of area= 10m×10m. Fig.1.localization using trilateration technique [14].

Fig. 2.
Localization of 55 points using gradient descent. Figure 1 represents the localization using trilateration technique. Generally using trilateration, three anchor nodes is needed to localize the unknwon location of the target sensors as figure 1 shows. Neverless, in figure 2, by using only two anchors ,we were able to locate 55 unknwon points with a high accuracy by using gradient descent technique.
This reduction of anchor numbers presents different advantages such as reducing the overloading in the network, adding the economic benefits.
The second part of the simulation shows the impact of initialization on the gradient descent methods in localization.
• We have tested 4 types of initialization.
• For the simplicity and to see the error in the random initialization clearer, we have used 20 nodes, two of them are anchors (note that we can use more nodes). • For the simplicity also, we did not take into consideration the noise factor. • We have chosen a suitable step size value in our simulations. • The random initialization was done using MATLAB function rand. • We have used two anchors Anchor1 (2,9) and Anchor2(0,0)   In fig.3 and fig.5 where a random weight is applied, the used algorithm fails to locate target points (red and blue curves are different). Nevertheless, in fig.4 and fig.6, where a nonrandom weight based on RSS is applied, the algorithm can locate the target points with a high accuracy (red and blue curves are almost overlapped). The error between the real and estimated coordinates for a random initialization is big and most of the points was not located (XE1 YE1 and XE4 YE4). For a non-random initialization the error was small as the Fig.7 shows (XE2 YE2 and XE3 YE3).  Figure 8 shows that, using an initialization based on RSS will make the convergence faster than a random initialization, also we should light on an important thing. Despite that the convergence using random initialization can be done, however, the estimated positions will not be accurate (fig 3 and fig 5).

Conclusion
In this article, we present the importance of the gradient descent method where the number of reference nodes can be reduced in a specific area. In addition, we show the significance impact of the initialization technique affecting the accuracy of the location estimation. As a result, we conclude that a smart initialization based on RSS measurements is important to reduce errors in positions estimation.