An Improved RSSI-Based Positioning Method Using Sector Transmission Model and Distance Optimization Technique

This paper focuses on the positioning algorithm suitable for harsh indoor environment such as manufacturing workshop in which the interferences from different directions cannot be neglected. The positioning algorithm is an improved Received Signal Strength Indication- (RSSI-) based ranging method. To preprocess the RSSI data Gaussian filter and mean filter are adopted. A sector transmission model is constructed and applied to divide the area around the anchor node into several sectors, and the shadowing model of each sector is measured. Then the average of all RSSI values in a particular sector is considered as the final RSSI value for distance calculation. The calculated distances designated for trilateration are also optimized to eliminate the abnormal distances from positioning calculations. Positioning experiment is designed via ZigBee facilities. The results show that the proposed algorithm greatly improves the positioning accuracy and stability; for instance, the average positioning error is reduced from 1.32 m to 0.79 m. Moreover, this study also proves that the node position has great influence on the positioning accuracy.


Introduction
Nowadays, the widely used positioning technology is changing our daily lives. The GPS (Global Positioning System) technology, as the representative of positioning technology, is mainly used to track a person, car, or any mobile body outdoors. However, owing to its attenuation of signals and insufficient accuracy, tracking objects inside a house or a factory may not be possible by using GPS technology. Indoor positioning has emerged as a hot topic that gained gradual interest from both academia and industry. For example, in the manufacturing workshop, it is very valuable to obtain the real-time locations of all the mobile resources such as the material delivery vehicles, the WIP (work-in-process), the machining tools or other auxiliary tools, and the workers [1,2]. Such location information can then be used to facilitate the vehicles scheduling, the WIP's progress monitoring, searching and evaluation of the residual useful life of tools, and the performance assessment of the workers [3,4]. Due to these advantages, the production efficiency can be improved to a significant extent.
Localization algorithm is the key of positioning technology that greatly affects the level of the positioning accuracy and stability directly. As we know, GPS is the most widely used method for outdoor localization and it provides global coordinates with high accuracy (10 m). GPS signals could also be used indoors when special hardware and powerful digital signal processing techniques are considered. For example, the Time-of-Flight (ToF) information could be extracted from the noisy signals before computation of estimated position. Nevertheless, GPS is not suited for indoor decimeter-level applications due to its low accuracy and high cost [5,6]. Therefore, low-cost, low-power, high-precision positioning of wireless sensor networks becomes the first choice for many indoor positioning problems.
Localization techniques can be categorized into the range-based and range-free approaches; the range-based algorithm has higher positioning accuracy, and it is better to meet the need of positioning. Among the range-based approaches, the RSSI-based algorithm is relatively simple, less demanding on the hardware, and with low cost. So there are more studies on RSSI-based algorithm. Most of the 2 International Journal of Distributed Sensor Networks researches improve the localization accuracy by using various optimization methods or combining a variety of positioning algorithms, with little regard to the actual environment. This paper focuses on the positioning algorithm suitable for manufacturing workshop. The study is carried out through the deployment of wireless sensor networks in the manufacturing plant to achieve localization of manufacturing resources. A new RSSI-based positioning algorithm is proposed to combine data preprocessing methods (Gaussian filter and mean filter), sector transmission models, and distance optimization techniques. The experimental study shows that the positioning accuracy is significantly improved.
The rest of this paper is organized as follows. In Section 2, we briefly review the relevant research on the range-based positioning algorithm of wireless sensor networks. The details of the proposed positioning algorithm are described in Section 3. An indoor positioning experiment to validate the improvement of the positioning accuracy and to analyze its influencing factor is designed in Section 4. Section 5 concludes this study and provides some ideas for future works.

Literature Review
In this section we briefly review the relevant research on the range-based positioning algorithm of wireless sensor networks, which is used to calculate the distance between two nodes. The review of the measurement techniques in WSN localization and the corresponding localization algorithms are provided in [7,8]. Langendoen and Reijers [9] compared three distributed localization algorithms (ad hoc positioning, robust positioning, and -hop multilateration) on a single simulation platform. There are four general algorithms, the Time of Arrival (ToA), the Time Difference of Arrival (TDoA), the Angle of Arrival (AoA), and the RSSI-based methods. In the ToA-based algorithm, after recording the transmission time 0 of sending node and the reception time 1 of the receiving node, the distance between two nodes can be calculated by multiplying the time difference and the signal propagation speed. The demands on the hardware are high and expensive because each node requires strict time synchronization [10]. So it may not be suitable for general indoor positioning. TDOA, the difference in arrival time between signals received at spatially separated receivers, is commonly used for source localization measurements. Nevertheless, locating the source is not a trivial task because the TDOA measurements are nonlinear functions of the source coordinates [11,12]. The AoA-based localization is a passive localization technique whereby the location of an emitter is determined by triangulation of bearing information collected at a number of sensors [13]. The nodes are equipped with an antenna array angle measuring device to determine the direction of node, so this algorithm also requires more powerful hardware. Compared with the three mentioned methods, the RSSI-based algorithm has many advantages including less requirements of hardware and is very simple with low cost. Therefore, it becomes one of the most widely used indoor positioning algorithms, which is also adopted in this paper.
The core idea of RSSI-based algorithm is the uses of shadowing transmission model to estimate the distance between the anchor node (known position) and the blind node (unknown position) and then calculate the coordinate by trilateration. The theoretical transmission model is shown in where RSSI( ) is the Received Signal Strength Indication when the distance between transmitting node and receiving node is , 0 is the reference distance, and is the path loss coefficient related to the environment; the more the obstacles in the environment are, the larger is; generally = 2-6. ∼ ( , 2 ) is Gaussian distributed random variables. Let 0 = 1m, and ignore in the actual localization measurement, so the shadowing transmission model can be simplified into the following: where = RSSI( 0 ) is the RSSI value when the distance is 1 m. In the positioning experiment, the distance can be gotten according to (2), and then the coordinate is figured out by the general trilateration measuring technique, in which three or more anchor nodes are necessary to determine the position of a blind node. The above RSSI-based algorithm has been widely used to locate the indoor items. Shang et al. [14] presented a new location algorithm based on RSSI vector similarity degree and designed a location system to locate sensor nodes indoors. Ng et al. [15] introduced an improved algorithm, which can track moving crowd by building an indoor positioning and tracking system. This technique was applied by Oliveira et al. [16] into the relative positioning of mobile robot. They introduced a relative velocity estimation framework based on the RSSI measurements. This framework used consecutive distance measurements and position estimates to provide the relative velocity vectors for all the nodes in the network. e-healthcare is a popular healthcare application of Wireless Body Area Sensor Network, where RSSI-based algorithm is applied to disease prevention and reduces the occurrence of potential injury [17]. Lloret et al. [18] proposed a new stochastic approach which is based on a combination of deductive and inductive methods whereby wireless sensors could determine their positions using WLAN technology inside a floor of a building. Due to the surrounding environment fluctuations and defects of position estimation method, the positioning accuracy of basic RSSI-based algorithm is not very high and frequently changes. Garcia et al. [19] proposed a dual system positioning algorithm, adopting heuristic training measurement system and adding some fixed access point in the triangular model, which made the localization algorithm adapt to harsh environment of multipath, high temperature, and multibarrier. The introduction of -nearest neighbor algorithm in ZigBee-based indoor positioning system also improved the positioning accuracy and stability greatly [20]. In this method, the measured RSSI values are divided into four classes. RSSIs belonging to different classes will be adjusted in different proportions, and then the distances and coordinates are calculated. Galván-Tejada et al. [21] determined the transmission models according to the measured RSSI by Bluetooth, and the distance was estimated by using RSSI that was measured by WiFi technology. They found that the positioning accuracy is greatly improved. In another study [22], an adaptive distance estimation algorithm is proposed to reduce the great influence of changing environment by real-time dynamic correction to the shadowing transmission model. Finally, a fuzzy positioning algorithm based on information fusion is presented in a recent study [23], in which the fuzzy theory is used to deal with the randomness and fuzziness in the WSNs, and the information fusion is introduced to improve the localization accuracy.

The Proposed Positioning Algorithm
The proposed positioning algorithm consists of two steps, modeling and positioning. The first step aims to set up the positioning models including the integrated models and the sector transmission models for all anchor nodes by analyzing the RSSI values obtained through experiments, while the second step aims to locate the blind node by using the positioning models and the measured RSSI values of all anchor nodes.

RSSI Data Preprocessing.
Due to the environmental noise, the measured RSSI values in the same place are fluctuant with time; sometimes they even vary widely. Table 1 shows 7 sets of RSSI values, where the distances from blind node to anchor node are 1.5 m, 2 m, . . . , 4.5 m, respectively. Each set contains 10 samples acquired in different times. It can be seen that some data are distinctly too large or too small compared to others.
In order to eliminate the errors of experimental results caused by accidental factors, Gaussian filter is used to remove all the abnormal RSSI values produced by the outside interference fluctuations. The probability densities function of Gaussian distribution ( , 2 ) is formulated as where = (1/ ) ∑ =1 RSSI is the mean of RSSI values in times tests and 2 = (1/( − 1)) ∑ =1 (RSSI − ) 2 is the variance. Figure 1 shows the probability density curve of Gaussian distribution (−50.7, 4). The probability of RSSI values fall in interval [ − , + ] can be calculated as Only 68.2% centralized RSSI values are accepted, which ensures that the possible abnormal values are removed. If we set the accepted interval wider, for example, [ − 2 , + 2 ], then about 95.5% RSSI values will be accepted; abnormal values are then difficult to be identified. Therefore, in this paper, we set the filter in the range of [ − , + ]. The measured values outside this range should be ignored.
Taking the second column in Table 1 The RSSI values in the Gaussian filter range are in the normal range but still have great variations; hence the distance will also undergo significant change. Therefore, the positioning accuracy will be unstable. So it is necessary to return to the average filtering and regard the average RSSI value as the RSSI value for calculation purpose. The calculation equation is as shown in   In the following experiment, the RSSI values of each test point will be tested 30 times. At first, points with large fluctuations in the test results will be eliminated by Gaussian filter. Then the average filtering is adopted to work out the average values of the rest arrays. Finally, the average values will be regarded as the RSSI values of receiving the anchor node. The effect of the experiment shows that the RSSI value pretreatment has distinctive effects in the results stated in the next section.

Introduction of Sector Transmission Model of Anchor
Node. During the experiment, it can be noticed that, at the same distance, the RSSI values may vary with region in which the blind node located. As shown in Figure 2, the area around the anchor node is divided into 12 zones; each zone is a sector of 30 ∘ .
The measured average RSSI values 1 meter around the anchor node within these 12 sectors are presented in Table 2. It is clear that the RSSI values are fluctuant. This phenomenon may be attributed to the obstacle site and the antenna of the experimental devices. Therefore, in order to make the positioning algorithm available for the production site applications, it is reasonable to use different transmission model for each sector of anchor node. Also, the distance from the anchor node to the blind node should be estimated according to the sector transmission model. the values of and are affected by the environment. The traditional method is first to determine some sets of RSSI value at 1 m and then calculate the average for . Finally, calculate the value of from several sets of data. Different directions of all the anchor nodes will use the resultant model. In this study, a different method has been used. First, some sets of (RSSI , ) data values are obtained from the experimental study, and then the least square method is used to calculate the value of and . To simplify the calculation we set = 10 lg( ), and = RSSI. Therefore transmission model can be simplified as = + . The core idea of the least squares method is to make the sum of squared deviations of all data minimum; the sum of MSE (mean squared error) can be expressed as follows:

Least Squares
By working out the partial derivatives of and , and making them equal to zero, (7) can be obtained: In actual measurement, the function tool () of Matlab helps to fit the curve, which can save a lot of complicated calculations.

Determination of Sector Transmission Model.
At first the angular size of the partition is set before the determination, which should be based on the positional accuracy according to the actual application requirements and environmental conditions.
In the specific test as shown in Figure 3, the anchor node is placed in a corner, and the blind node moves in the lower right corner of the area around when positioning. The angular size of each sector is set to 30 ∘ for the balance of positioning accuracy and calculation efficiency. When the transmission model of each partition is determined, the blind node is adjusted to move within the fan-shaped area. The curve of RSSI and is fitted by the least square method. Three sector models and the whole 90 ∘ integrated International Journal of Distributed Sensor Networks 5  model are determined for each anchor node. These models are illustrated in Figure 4. It can be observed that there is a large difference between the shadowing model of sector 1 and sector 2, which leads to large differences in the estimated distance. So it is more reasonable to use different transmission models in different sectors instead of an integrated model within the whole area.

Flowchart of Sector Transmission
Modeling. The whole procedure of the nodes modeling is summarized in Figure 5. In order to calculate the suitable RSSI( 0 ) values to be used in the equation of shadowing model, the algorithm is designed to take realistic measurements for the distance calculation. At first, a particular area around an anchor node is divided into sectors and the angles are determined. The determination of all the models applied for the calculation of realistic RSSI; values are carried in the next step. Multiple RSSI values of selected test nodes falling in each sector are obtained; then the filtering methods are applied after which the least square method determines more realistic values of RSSI, .

Distance Optimization.
The geometric relations are accorded to represent the distance ( Figure 6) where 1 is the distance of blind node to anchor node 1, 2 is the distance of to anchor node 2, and 12 is the distance of anchor node 1 to anchor node 2. 1 , 2 are estimated and 12 is known; the relationship between them should meet In this paper, the estimated distance which does not meet (8) is called abnormal distance. There are two ways to deal with the abnormal distance data. The large distances which do not meet | 1 − 2 | ≤ 12 will be eliminated to avoid the positioning accuracy error caused by the distance, while the small distances which do not meet 12 ≤ | 1 + 2 | will be optimized by proportionally amplifying 1 and 2 as shown in Figure 7.
From (9) two new distances can be obtained and denoted by 1 and 2 : Likewise, for anchor nodes and 1, From the above equation − 1, 1 can be calculated and the maximum value will be the distance between the blind node and anchor node 1. Several effective distances can be computed after elimination and optimization, but three of them are needed to calculate the coordinate of blind node. As the distance between the nodes and the RSSI reliability are closely tied, minimum three distances of all the effective distances in the improved algorithm are used to calculate the coordinate of the blind node.

Flowchart of the Positioning Algorithm.
The positioning process is summarized in Figure 8. All sector transmission models of all anchor nodes are determined based on different application contexts in the proposed algorithm before practical positioning. For determining the partition model, Gaussian filter and mean filter are used to preprocess RSSI values; thereafter fitting the curve of RSSI values by the least square method shadowing partition model was calculated. In practical positioning, the RSSI values are also measured repeatedly to obtain the optimum RSSI value, and then the distance is measured according to the sector transmission model. End Select several test nodes in this sector. For each test node, measure n RSSI values, and then calculate the optimal RSSI by filtering methods Get some group of (RSSI, d), and then use the least square method to fit the transmission model of this sector  There are two key features concerning the proposed algorithm.
(1) The positioning accuracy is improved compared to the general RSSI range localization algorithm by introducing several techniques including filtering, model partitioning, and distance optimization. These techniques are used in both modeling phase and positioning phase.
(2) The positioning process is gradually convergent. Firstly, the integrated model of each anchor node is used to preliminarily determine the location of blind node. Then the sector transmission models are used repeatedly to reposition the blind node. For any anchor node, as long as the coordinate of blind node obtained at this time does not locate in the same partition of the last time, the positioning process will be continued and the positioning accuracy will be improved gradually. It is understandable that when the sector size is larger, the convergence speed will be slow.

Experimental Layout and Model.
In this experiment a wireless sensor network positioning solution based on ZigBee technology is adopted. CC2530 chips produced by TI Company serve as the basic nodes of positioning network. ZigBee network, one of the PANs (Personal Area Networks) complying with IEEE802.15.4 standard, has the character of short-range and low-power. The ZigBee nodes with CC2530 microprocessor can detect the RSSI values of other nodes within the region. The ZigBee-based positioning modules for the experimental design are illustrated in Figure 9. The blind node in the middle is located according to the RSSI values that received from its neighbour anchor nodes. The wireless sensor network is established by the coordinator node. All anchor nodes and blind nodes are joined in the network and accessed by other nodes automatically on the localization experiment. At first, all anchor nodes receive the signal of positioning instruction sent by the coordinator node. The anchor nodes then sent signals to the blind node which in return transmits these data to the coordinator and the coordinator extracts the RSSI values which are then used for the position estimation using the Microsoft Visual  Basic program. This program automatically carries out the positioning algorithm and gives the values of the distances between the nodes and the position of the target node as a coordinate. The experiment is conducted in an indoor rectangle area of 7.5 m * 6.8 m. As shown in Figure 10, there are four anchor nodes A, B, C, and D, and their coordinates are (0, 0), (7.5, 0), (0, 6.8), and (7.5, 6.8), respectively. The blind node , whose coordinate ( , ) is unknown, cannot move beyond the dimension of the area ABCD. Meanwhile, each anchor node will be divided into three parts, which formulates three subareas with the equivalent angle 30 ∘ . And each subarea will be in correspondence with its measured transmission model of radio signal sited in which the corresponding anchor node exists. For instance, the blind node is currently located in the second subarea which corresponds to the anchor node B area, so that the formula RSSI 2 = 2 + 10 2 lg( ) is utilized to figure out the distance between anchor node B and blind node . By using the method described in Section 3.2, the sector transmission models and the single integrated model are obtained without partition, as shown in Table 3. Each anchor 8 International Journal of Distributed Sensor Networks node has three sector transmission models. The single integrated model, used for comparison, is applied to the entire areas of anchor node. In this study, the sector size of each anchor node is set to 30 ∘ . This is a balance between positioning accuracy and measurement complexity. Theoretically, the smaller size of the sector is characterized by higher accuracy and stability of positioning. When the angle size is close to zero, the highest positioning accuracy is obtained. But more timeconsuming measurements are required to set up the sector models. Moreover, the RSSI values of the dynamic space will always change with signal fluctuation affected by the barriers, so it is not necessary to set too small sector size.

Experiment Results.
These experiments are designed to compare the positioning results of the proposed algorithm with the ordinary RSSI-based localization algorithm. We conduct the tests at 46 points within the area ABCD. This area is assumed as a rectangle and the anchor nodes are placed at four corners. This is not obligatory since the practical environment is always complex. If the area has another shape, we have to determine the sector transmission models of each anchor node according to respective angular size. But the main difference lies in the modeling phase rather than the positioning phase.
The positioning results are shown in Table 4, where the actual coordinates are the location of test points, the estimate coordinates are the positioning results, and the positioning errors are the distances between actual coordinates and estimate coordinates.

Error Improvement Analysis.
Positioning accuracy is the main index for measuring positioning algorithm, which is shown by the positioning errors. As shown in Table 4, the fourth column denotes the positioning errors of the ordinary RSSI-based model without sector partition and distance optimization. The average positioning error is 1.32 m and the standard deviation is 0.53 m. As stated before, there are two major features of the proposed algorithm. One is the introduction of the anchor node sectors and the other is the process to delete or optimize the unusual distances. The experimental results of the proposed algorithm are shown in the last column of Table 4. The average positioning error is 0.79 m and the standard deviation is 0.36 m, indicating a relatively big improvement to reduce the positioning error. For those manufacturing workshops in which high accuracy is not required, this positioning accuracy is more sufficient.  The error curve of the ordinary RSSI-based model and the proposed model are presented in Figure 11. It can be noticed that the positioning error is decreased in the proposed method leading to better accuracy compared to an ordinary RSSI-based model.

Blind Node Location and Location Accuracy Relation-
ship. The positioning errors of the proposed algorithm in different experimental coordinates are pointed by the bubble chart in Figure 12. The two dimensions -indicate the coordinate location of blind node, and the bubble size represents the level of positioning errors for a certain coordinate point tested during the experiment.
International Journal of Distributed Sensor Networks From Figure 12 it can be noticed that less positioning errors occur when the blind node is located at the central area of the localization model, while much more positioning errors are observed when the node is located among the fringe area of the model. Therefore, it can be concluded that the location of blind node plays an important role in the outcome of localization accuracy. There are many reasons for this phenomenon: the interference of radio signal while gauging the location on anchor nodes or the attenuation of radio signal caused by fringe-setting nodes mode with much obstruction. So we are supposed to put the location-required area into the central area formulated by the anchor nodes to improve the accuracy of localization during the experimental study.

Other Analyses.
As proven by the above experimental results, the positioning accuracy is superior to that of other methods. For example, Shang et al. [14] reported that the mean location error is about 1 m by using the RFID-based indoor positioning technique. The shortcoming of the proposed method is that it is time-consuming to construct the sector transmission model. So some self-learning techniques, which will be introduced in the future, may be useful to deal with this problem.

Conclusion
The proposed indoor positioning algorithm combines the use of filters with the implementation of sector modeling and distance optimization, which helps improve the positioning accuracy when the indoor environment is harsh with signal interference. In this study filters are used twice when preprocessing the RSSI values, once by using the Gaussian filter technique after which the mean filter technique is applied. The sector transmission models are used to deal with the directional differences when calculating the RSSI values. Distance optimization further reduces the abnormalities of distance due to measure errors or interferences. The experiment results show that the positioning accuracy improves a lot compared to the ordinary method. In order to balance the positioning accuracy, the measurement complexity, and the calculation convergence, the sector size should be chosen reasonably.
There are several directions for future research. Firstly, the current method is more suitable for the localization of static object or mobile one with low speed due to its computational time. It is necessary to combine the RSSI-based algorithm with other methods such as Monte Carlo method for mobile objects localization. Secondly, only the planar partition is considered. In the actual circumstance, the spatial differences of RSSI values may not be negligible when the environment is harsher, for example, the warehouse. The spatial sector transmission models should be adopted to deal with this situation.