Node Localization Technology of Wireless Sensor Network Based on RSSI Algorithm

Wireless sensor network, as one of the system compositions of the Internet of Things, is an important carrier of the efficient use of rural resources. An accurate localization algorithm is of great significance to the complete coverage of the farmland monitoring area and to ensure the connectivity of the whole network. This paper carries out an experiment based on the signal intensities of network nodes of wireless sensor in different farmland environments having crops or not at different placing heights and relative distances. In the research, an analysis is made on the attenuation relationship between the RSSI values and the distance and height between nodes. Besides, multiple linear regression methods are used to fit the propagation model of wireless signal. Then, a distance-measuring experiment is carried out according to the model, and finally the localization of unknown nodes is realized based on Gauss mixed algorithm. Average error of the experiment is 1.02m, indicating good experimental results.


INTRODUCTION
Wireless sensor network, as a branch of the Internet of Things, is a necessary way of information perception and transmission. As early as in 1999, Business Week listed wireless sensor network as one of the most influential 21 technologies in the twenty-first Century, and predicted that it would stir up a new industry wave. The advantages of wireless sensor network in agriculture are becoming more and more prominent [1]. It overcomes such shortcomings as deployment difficulty, high costs of installation and maintenance, easy aging with the passing time, etc. In wireless way, it can quickly build a network automatically without anybody onsite by using the hierarchical network communication protocol and the distributed algorithm. Moreover, the system can be automatically adjusted in case of node failure. Since sensor nodes are in small sizes with good cooperation ability, their deployment has a small impact on the agricultural environment [2]. Through the integration of various sensors, physical quantities of people's interest can be detected, including air temperature, humidity, light intensity, concentration of carbon dioxide, PH value of soil, soil moisture and others [3]. In addition, sensor node, with low power consumption and long transmission distance, is very suitable for the collection of farmland information.
Localization information is the basis of the application for open field in wireless sensor network. Through research on node localization technology, the specific local-ization information of the happening of the event can be effectively monitored to understand the happening situation of local environment for farmland [4]. In practical agricultural applications, in addition to monitoring some information of farmland, we also need to know the source localization of the information, which can make effective and prompt analysis on what happened in the regional objective, to achieve the localization and tracking of the goal [5]. By determining the localization of the sensor nodes, the routing efficiency can be improved to enable the deplorer to grasp the network coverage situation and ensure the load balancing of network and the selfregulation of network topology [6]. However, due to the limitations of cost, power, scalability and other problems, not all network nodes can be installed with GPS receivers for localization [7]. Therefore, it has been necessary to realize the self-localization of WSN by certain mechanism and algorithm in current research.

PERFORMANCE EVALUATION
RSSI localization method is to estimate the distance by measuring the RSSI values of the two communication nodes; this method does not need the complex hardware equipment, with simple operation and low cost, so common wireless transceiver chips can provide RSSI value[8]. In addition, some new types of wireless chip with the standard of 802.15.4 are also equipped with LQI value; some can carry out node localization by the comprehensive use of RSSI and LQI. In recent years, RSSI has become widely used in ranging and localization [9].

A. RSSI localization principle
As for sensor node localization, firstly, unknown nodes receive RSSI of each reference node and its coordinate which are subsequently sent to the upper computer. Then, the distance from the reference node is calculated according to the Gauss mixed ranging model, while the unknown node coordinates are calculated using the maximum likelihood estimation location algorithm.
1) Gauss mixed ranging model An unknown node may receive n values of RSSI from the beacon node at the same location; firstly, the RSSI values of the high probability generating region are selected by the Gauss model, and then select the average value; this can eliminate some of the singular values of RSSI to enhance the accuracy of localization information.
Suppose that there are m beacon nodes in wireless sensor network, respectively N1, N2 and N3, and that their locations are known; the unknown node of the network is PAPER NODE LOCALIZATION TECHNOLOGY OF WIRELESS SENSOR NETWORK BASED ON RSSI ALGORITHM X; the RSSI value of each beacon node that have been received for n times are respectively RSSI 1 , RSSI 2 , …, RSSI n ; it can be known from the Gauss model that: keep these values and store in the corresponding array; when f(x)!0.5, we count them as random events with small probability, and eliminate these values.
The final RSSI value is obtained by averaging those retention values: According to the signal propagation model in 1, the distances between the unknown nodes and the beacon nodes can be obtained by calculating.

2) Localization by maximum likelihood localization method
Theoretically, in the localization of wireless sensor network, as long as locations of the three beacon nodes are known, unknown node coordinates can be determined. However, since this is too dependent on the three beacon nodes, once some of the node coordinates get into problem, great measuring errors will appear, so we use the maximum likelihood estimation method. Suppose that the coordinates of the m beacon nodes are (x 1 ,y 1 ), (x 2 ,y 2 ),……(x n ,y n ) and distances from the unknown node (X, y) to the beacon ones are d 1 ,d 2 ,……d m respectively, which can be written as: The linear equation of the above formula can be expressed as AX=B, where The estimated unknown node coordinates can be obtained through further sorting�

B. Performance evaluation of localization technology in wireless sensor network
The performance of self-localization technology in wireless sensor network has a direct influence on its availability. The evaluation of them mainly has the following several indicators: (1) Localization accuracy: the primary indicator of localization technology, which is generally expressed as the ratio of error value to the radio range of the node. For example, if the localization accuracy is 10%, namely, the accuracy range of the localization is ±10cm within one meter; (2) Density of beacon node: the proportion of known nodes in the network to the total number of nodes. The density of the beacon node is proportional to location accuracy; the greater the density is, the higher the accuracy is, but costs will also increase accordingly [10]; (3) Node density: the greater the node density is, the better the network connectivity is and the more the aided location information the node obtains. However, it will lead to the increase of costs and the amount of data transferring, thus causing network congestion and having impact on the real-time data processing capacity of WSN [11]. For this reason, an appropriate node density is of great importance; (4) Energy consumption: Sensor nodes have limited battery energy that is needed in localization, data acquisition, transcribing and storage. Therefore, under the premise of ensuring localization accuracy, controlling energy consumption as much as possible is also an important measuring indicator [12]. The above 4 common indicators are not only standards to measure the level of WSN localization system and algorithm, but also important indicators to measure whether WSN network is good or not.

A. Influence of node height and distance on RSSI measurement
Measurement of RSSI value of nodes (received Signal Strength Indicator) is related to height of node displacement, surrounding environment and crop growth. Different displacement heights of antenna will influence the signal strength of measurement [13].
The experiment will not take other external environmental conditions into consideration except open places and certain height of paddy to measure relationship between signal strength and distance in different heights. Measurement distance is from 1m to 50 m. Considering that actual displacement place for nodes is higher than ground, all node heights from ground is from 0.5m to 1.5m with interval of 0.25m [14]. The displacement is as shown in Fig 1. Working frequency of nodes is 2.4GHz, collecting RUSSI value every two minutes. Collect 10-PAPER NODE LOCALIZATION TECHNOLOGY OF WIRELESS SENSOR NETWORK BASED ON RSSI ALGORITHM time measurement data every time and calculate the average.

RSSI (dBm)
The relationship between distance and RSSI in case of no crop Figure 2. The relationship between distance and RSSI in case of no crop The relationship between distance and RSSI in case of crop 0.5m 0.75m 1.0m 1.25m 1.5m From Fig.2 and 3, we can know that signal strength decreases monotonously with increasing nodes distance and signal decreasing speed slows with gradually raised displacement node height. At the same time, signal propagation slows down more significantly in case of crops.

B. Determination and inspection of RSSI ranging propagation model
Because sensor node is applied in outer environment like farmland, route of signal transmission and lost is complex. Transmission of signal is influenced by many factors like distance between nodes, height of antenna, rather than a single route [15]. As well, there are phenomena of reflection, refraction, and etc. Thus, egli signal propagation model can be applied, which belongs to empirical model of experimental measurement. Hence, the coefficients of the model need to be redefined through experiments [16].
Horse-power formula of receiving wireless signals can be transformed into: It can be known from the above formula that RSSI has a specific corresponding relationship with distance D and height H. A, N and M values can be confirmed by experiment. Validity of test model shall be analyzed by mathematical statistics method [17]. Configuration of test parameter is shown in Table 1.

1) Confirmation of coefficient value of propagation model when the field is open in case of no crop
According to multiple linear regression methods, model equation of signal propagation can be expressed as: Inspection result of each coefficient is shown in Table 2. It can be obtained from Table 2 that test level values of coefficient of each variable in model all are less than 0.05 and are within permissible range, which means the abovementioned variables have relatively good predication effects on dependent variables [18]. Table 3 reflects variance situation if regression model. It can be gotten from it that significance probability value of the model is less than 0.01, which means that model has relatively good imitative effects.

2) Confirmation of coefficient value of propagation model with crops
In  Inspection results of all model coefficients are shown in Table 4.
It can be gotten from Table 4 that level value of coefficients inspection of all variables in models shall all be less than 0.05; it means the above-mentioned variables have a relatively good predicated effect on dependent variables [19]. Table 5 reflects variance situation of regression model; signification probability values of the model is less than 0.01, which means the model has comparative fine imitative effect [20].

3) Verification of multi-element route loss model
The above-mentioned regression model was verified by verification data measured on the same condition in the text. Fig. 4 is imitative situation table of verification and predicated values. It can be obtained from Figure 4 that imitative correlation coefficient between predicted value and actual value is 0.895 when the field is open and is in case of no crop; imitative correlation coefficient is 0.871 with crops; degree of correlation under the two kinds of situation both meet the requirements, which means the model has relatively fine correlation effects [21][22][23][24].

A. Experiment of RSSI localization test
The experiment is arranged in farmland; select a piece of area of 64m 2 ; experiment site is an open field and is in case of no crop. In order to simplify calculations, placing height of nodes all are 1.5m, of which the locations of 4 beacon nodes respectively are N1~N4; 2 unknown nodes are respectively X1 (3, 6) and X2 (4, 2); schematic diagram of position is shown as Fig 5. Each unknown nodes collects RSSI values for 10 times to beacon node, which is shown in Table 6.
According to formula (2), the final RSSI value can be calculated. Refer to Table 7.
According to formula (11), the distance from each unknown node to relevant reference beacon node can be calculated. The result is shown in Table 8.
According to distance between nodes, maximum likelihood method is used to aquire coordiation data on unknown nodes (see Table 9). Corresponding distribution diagram of nodes is shown in Fig 6. Average range error of this localization experiment is 11.5%; average localization error is 1.01m.

B. Influence of beacon node to localization result
The influence of density of beacon node to localization performance is an important evaluation criterion to localization algorithm. (a) and(b) in Fig. 7 respectively show localization result when the number of beacon node is 6 and 8. It can be seen that error between unknown node and localization node is evidently decreased and degree of accuracy of localization is improved with the increase of beacon node density; however, calculations and costs are greatly increased.
Relative position of beacon node is different and ranging accuracy is relatively different. The closer the distance is, the higher the localization accuracy. Fig. 8 shows localization results of 4 beacon nodes in different relative positions. The paper measured that wireless sensor network RSSI value of 2.4GHz node is influenced by distance between nodes, antenna height and crop growth; confirmed each parameter of signal propagation model by making use of multiple linear regression methods; and realized localization to unknown nodes according to Gaussians mixture algorithm and maximum likelihood method. Furthermore, we carried out a localization experiment on 4 beacon nodes and 2 unknown nodes placed in 8x8m 2 field areas and realized better localization to two localization nodes. Average localization error is 1.01m, which can meet the demands of most application market. The experiment has also tested the influence of the number of beacon nodes and different placing positions of beacon nodes on localization, with experiment results beneficial to research on and application of agricultural supervising system.