The wireless sensor network (WSN) triangle centroid localization algorithm based on RSSI

Node location is one of the key technologies in wireless sensor network. RSSI-based location is a hotspot in nowadays. For resolving biggish error in RSSI-based location, the paper presents a new method of location, RSSI-based triangle and centroid location, using triangle and centroid method to reduce the error of RSSI measurement. Simulation experiments prove that this algorithm can obviously improve the location accuracy compared to trilateration. 1 Instruction Node location technology is an important supporting technology of wireless sensor network, the location information of sensor network monitoring activity is very important. The sensor node positioning is based on a few known location of the node itself, to determine its own position according to some targeting mechanism. Positioning technology become an important research direction and hotspot. Localization algorithms for wireless sensor networks can be divided into two categories: distance based localization algorithm and range free localization algorithm. The distance based localization method needs to measure the absolute distance or orientation between the beacon nodes and unknown nodes and use the actual distance between nodes to estimate the position of unknown nodes. The main methods are TOA,TDOA,AOA and RSSI. The localization algorithm don’t relate to positioning distance need not measure the absolute distance between nodes or orientation. It uses the estimated distance between nodes and the network connectivity to compute the position of nodes. The main methods are centroid algorithm, APIT algorithm, DV-hop algorithm, DV-distance algorithm and so on. The RSSI positioning using the signal strength will be some loss during transmission, according to the theoretical and empirical model, this loss is estimated to be the distance between nodes. Sensors can satisfy the measurement of RSSI value itself without additional hardware support easy to implement. Because of the estimation of the theoretical and empirical models, RSSI has a large positioning error. Based on RSSI technology, a new positioning algorithm combining RSSI measurement with triangle centroid algorithm is proposed. The algorithm uses triangle centroid algorithm to reduce the measurement error of RSSI. 2 Distance measurement based on RSSI The distance measurement technology based on RSSI is used to measure the distance between nodes, which is based on the principle of the radio signal with the distance. The relationship DOI: 10.1051/ 05008 (2016) , matecconf/2016 MATEC Web of Conferences 63 630


Distance measurement based on RSSI
The distance measurement technology based on RSSI is used to measure the distance between nodes, which is based on the principle of the radio signal with the distance [5] .The relationship between RSSI and the transmission distance d is shown below [6] :    Formula ( 2) is the nonlinear equations obtained according to the formula of distance calculation.As shown in figure 2, circle A, B, C intersect at a point.Intersection point coordinates M (x m , y m ) can be obtained by solving equations.

3.2Triangle localization algorithm
Because of the trilateral localization algorithm without considering the actual factors, so the error is bigger.The actual situation is shown in figure 2. Assuming that beacon node coordinates are A (x a , y a ), B (x b , y b ), C (x c , y c ).The coordinates of the unknown nodes is D (x d ,y d ).Beacon node to the distance of the unknown node can be obtained by the RSSI ranging method, are d1, d2 and d3.Can get cross area by A, B, C as the center, d1, d2, d3 as the radius of the circle.The intersection point is M, L, N. Then can get equation:  x

x y y r x x y y r x x y y r d
Therefore, the coordinates of L can be obtained is (x l ,y l ).( Therefore, the coordinates of N can be obtained is (x n ,y n ).
Then the coordinates of unknown nodes for D is 3 3 x

x x y y y x y
The value of RSSI is affected greatly by the distance, the greater the distance, the greater the error.So weighting the results.The weighted coordinates is (1)Beacon nodes periodically broadcast information around, information including the node itself and coordinate ID.After the unknown node receives the information, take average of RSSI by the same beacon node.
(2) When the unknown node to collect a certain number of beacon nodes, no longer receive new messages.The unknown node based on RSSI from strong to weak to sort the beacon node, and establish distance map by the RSSI values with the unknown node to beacon node.Establish three sets, the beacon node set, distance between unknown node and beacon node set, location of beacon node set.
(3)Select larger RSSI value of several beacon nodes and positioning calculation itself.In turn according to formula of (3), ( 4), (5) calculate the three point coordinates.Finally by the centroid algorithm, it is concluded that the unknown node coordinates.(4) Taking the average of the coordinates of unknown nodes for collection, get the unknown node coordinates.

Error
Error is defined as M. Assuming that the unknown node coordinate for (x d , y d ), its true position is (x, y).Then, M=

Simulation
This algorithm use ZigBee hardware platform as wireless communication platform, the ZigBee module as the unknown node and beacon node to complete the functions of wireless signal to send and receive [7] .Chip module using CC2431, and using matlab simulation tool to simulate triangle centroid algorithm, investigate the performance of the algorithm.Suppose there are 30 unknown nodes and 20 beacon nodes are evenly distributed in the square area of 50 m × 50 m.The simulation with trilateral localization algorithm and triangle centroid location algorithm, and randomly  1 shows that triangle centroid algorithm accuracy is higher than trilateral localization algorithm.

Table 1
Comparison of two algorithms error

Conclusion
The proposed method combines the RSSI method and the triangle centroid location algorithm use RSSI value to measured distances d of unknown nodes and beacon node, according to the beacon node as the center of the circle, the distance d as the radius of three circle intersect to obtain the unknown node location of the triangle area, seeking the centroid and the location of the unknown node is obtained.Through the simulation experiment, compared to the algorithm and trilateration algorithm proved the superiority of the algorithm.
localization algorithm don't relate to positioning distance need not measure the absolute distance between nodes or orientation.It uses the estimated distance between nodes and the network connectivity to compute the position of nodes.The main methods are centroid algorithm, algorithm and so on.The RSSI positioning using the signal strength will be some loss during transmission, according to the theoretical and empirical model, this loss is estimated to be the distance between nodes.Sensors can satisfy the measurement of RSSI value itself without additional hardware support easy to implement.Because of the estimation of the theoretical and empirical models, RSSI has a large positioning error.Based on RSSI technology, a new positioning algorithm combining RSSI measurement with triangle centroid algorithm is proposed.The algorithm uses triangle centroid algorithm to reduce the measurement error of RSSI.
between the transmitter and the receiving end; unit M A:In one meter away from the launcher of signal strength The accuracy of ranging is influenced by the n and A's actual value.A is an empirical parameter, can be worth to by measuring the distance from one meter of RSSI .N is used to describe the signal strength decrease with the increase of distance parameter.The size of N depends on the specific environment.In order to get the optimal values of n, all the beacon nodes be placed first then try different values of n_index to find the most suitable value of the specific environment of the n.According to equation (1), The distance d from the node to the other node of the radiation signal can be calculated, that is, the distance between the beacon node and the unknown node.In this paper, we use 3 beacon nodes A, B, C to locate the unknown nodes, so the distance phase should be at least three distance values d 1 , d 2 , d 3 , as shown in figure 1.

Figure 1 .
Figure 1.RSSI positioning of the ideal model of the distance As shown in figure 1, in the ideal in the

Figure 2 .
Figure 2. Actual distance model diagram of beacon nodes and unknown nodes

3 .
1The trilateral localization algorithm Known of the beacon node location information, select appropriate coordinate origin, and DOI: 10.1051/ 05008 (2016) , matecconf/2016 MATEC Web of Conferences 63 630establish a coordinate system.Assuming that beacon node coordinates for A(x a ,y a ), B(x b ,y b ), C(x c ,y c ).The unknown node coordinates for M x m ,y m .The beacon node as the center, the distance between the beacon nodes and unknown nodes as the radius of the circle equation is coordinates of M can be obtained is (x m ,y m ).
of data.The results are shown in table1.Table