Improved trilateration for indoor localization: Neural network and centroid-based approach

Location awareness is the key to success to many location-based services applications such as indoor navigation, elderly tracking, emergency management, and so on. Trilateration-based localization using received signal strength measurements is widely used in wireless sensor network–based localization and tracking systems due to its simplicity and low computational cost. However, localization accuracy obtained with the trilateration technique is generally very poor because of fluctuating nature of received signal strength measurements. The reason behind such notorious behavior of received signal strength is dynamicity in target motion and surrounding environment. In addition, the significant localization error is induced during each iteration step during trilateration, which gets propagated in the next iterations. To address this problem, this article presents an improved trilateration-based architecture named Trilateration Centroid Generalized Regression Neural Network. The proposed Trilateration Centroid Generalized Regression Neural Network–based localization algorithm inherits the simplicity and efficiency of three concepts namely trilateration, centroid, and Generalized Regression Neural Network. The extensive simulation results indicate that the proposed Trilateration Centroid Generalized Regression Neural Network algorithm demonstrates superior localization performance as compared to trilateration, and Generalized Regression Neural Network algorithm.


Introduction
Wireless sensor network (WSN) is an important technology of 21st century that can do smart sensing and ubiquitous computing, and has plenty of localization and tracking (L&T)-based applications. 1,2 The measurements collected are useful only if knowledge of source of data is known. Therefore, the underlying target localization mechanism plays very crucial role in the WSN-based applications. The L&T is one of the core application areas of the WSN. Although GPS is widely used for localization in outdoor environment, GPS-based location estimates are not accurate and reliable for indoor environmental setup. 3,4 The reason behind this is unavailability of GPS signals in indoor environment. Consequently, the indoor L&T applications require GPS-less architecture. The low cost and low power WSN technology is proved to be very useful to address the problem of indoor L&T. The WSNbased localization has two major categories namely, range-free and range (distance)-based. 5,6 The range-free localization is based on relationship between inter node connectivity and network topology, whereas the rangebased approach is based on computing the distances between sensor nodes. Generally, the localization accuracy is high in latter approach. Out of all the major range-based techniques, the received signal strength indication (RSSI)-based approach is widely used in the WSN-based L&T. The major reason behind this is that unlike other methods, the RSSI-based system does not need additional hardware in the process of localization. The term RSS and RSSI are one and the same, and we use these words interchangeably in the article. Although the RSSI is a widely used metric for target L&T, it generally leads to high localization errors due to highly fluctuating nature of the RSSI measurements, and dynamicity in given radio frequency (RF) environment. 7,8 The trilateration technique is widely used in target L&T because of its implementation simplicity, and low computational complexity. [9][10][11] It can estimate the unknown target location with the help of its distances from three anchors (the nodes whose locations are known) using RSSI measurements. Many variations in traditional trilateration-based target localization technique can be found in the literature. However, either due to ignorance to error uncertainty propagation mechanism or the environmental dynamicity, improvement in the localization accuracy is poor or unsatisfactory.
Depending on the application in hand, the requirement of localization accuracy may change. For example, if it is a marketing/advertisement case, then roughly a 5-10 m should serve the purpose. On the other hand for industrial applications, localization accuracy below 1 m may be required. In this article, we propose centroid and Generalized Regression Neural Network (GRNN)-based improved trilateration localization algorithm. The main contributions of this research work are listed below.
1. We formulated a novel framework based on the trilateration, GRNN, and centroid for the problem of RSSI-based localization of single target moving in indoor environment. We named it as Trilateration Centroid Generalized Regression Neural Network (TCGRNN). 2. The proposed TCGRNN algorithm is tested and verified against dynamicity in the surrounding environment as well as target motion through MATLAB simulations. To realize dynamicity in the RSSI measurements, we increased measurement noise in RSS from 3-9 dB in the steps of 3 dB. 3. We compared the localization performance of the proposed TCGRNN algorithm with that of traditional trilateration and our previous GRNN-based localization algorithm for high RSSI measurement noise of 9 dB. Simulation and numerical results demonstrate that the proposed TCGRNN algorithm better deals with the environmental dynamicity (i.e. high measurement noise in RSS) and abruptly varying target velocity as compared to trilateration and GRNN.
The remaining structure of the article is as follows. Section ''Related work'' covers the current state of art in the RSSI-based target L&T followed by the discussion on the proposed TCGRNN architecture in section ''TCGRNN architecture for target localization.'' We present system design and results obtained with proposed algorithm in detail through extensive simulations in section ''System design and assumptions of TCGRNN-based L&T system'' and section ''Discussion on results,'' respectively, followed by conclusions at the end in section ''Conclusion and future scope.''

Related work
As mentioned in the ''Introduction'' section, the trilateration technique is widely used in target L&T because of its implementation simplicity, and low computational complexity. The base for the work in Bouchard et al. 9 is the idea: smaller the error in distance estimation, the higher the location estimation quality. This method selects three smallest estimated distance values to formulate trilateration equations for localization. However, the applicability of these equations with the real-time environment is poor. In Li et al., 10 an advanced trilateration-based technique is proposed to alleviate the problem non-existence of intersection points during trilateration steps. This work is based on establishing a proper confidence interval. An improved trilateration localization algorithm named ITL-MEPOSA is proposed in Yan et al. 11 which is based on optimized selection of anchors and minimum uncertainty propagation arising from distance estimation result. With ITL-MEPOSA, the optimized selection of anchor nodes is attained through a single scan-sliding window. Although ITL-MEPOSA algorithm provides high target location estimation accuracy as compared to trilateration, but computational complexity involved is quite high. Although coupled with various advantages, the localization accuracy of the trilateration method is influenced by three factors: [9][10][11] Noise uncertainty in RSSI measurements: It arises due to issues such as NLOS condition, attenuation of RF signal, multipath fading, Non-linear system dynamics: Due to fluctuations in RSSI measurements and abrupt variations in target velocity, Error propagation: It occurs especially in the tracking problem in which the localization error induced during each iteration step gets accumulated and propagated in the subsequent iterations.
Many times, the calibration of parameters of given RF environment of the theoretical signal propagation model is very difficult and time consuming process. The major reason for inaccurate computation of calibrated parameters is highly fluctuating nature of RSSI measurements and non-linear system dynamics. The work in Mari et al. 12 proposed a novel kernel online sequential extreme learning machine (KOS-ELM) technique for RF fingerprinting in the offline stage, followed by a hybrid wireless LAN-based approach during online localization stage. The proposed algorithm incorporates both RF fingerprinting and trilateration for target localization, followed by K-nearest neighbor (KNN)based approach for online estimation of location of the target. Systems that use RSSI measurements for localization adopt RF fingerprinting for calibration of given RF environment. But it is very time consuming process, and if the calibration is inaccurate, then it leads to high localization errors. The authors in Barsocchi et al. 13 proposed two novel virtual calibration techniques which only need the RSSI measurements between anchors for the calibration of given RF environment. The authors named these as global virtual calibration (G-procedure) and per-wall virtual calibration (W-procedure). The simulation experiments carried out demonstrate the improved localization performance as compared to time consuming RF fingerprinting-based approach. The authors in Crane et al. 14 proposed a novel filtering technique Emender that identifies the noisy RSSI measurements which effect the localization performance adversely. Based on the proposed Emender-based approach, a novel trilateration approach is adopted for indoor localization. The realtime experiments in a building using Emender-based system demonstrate accurate location estimate of the target with less time complexity.
To deal with above problems, the traditional trilateration technique must be coupled with some appropriate advanced signal processing technique to solve the problem of RSSI-based target L&T. Looking the L&T problem from another perspective, the concept of centroid can be very useful to provide accurate estimate if the underlying RSSI dataset is sparse. 15,16 Recently the weighted centroid-based localization (WCL) using RSSI measurements has been found to be an attractive low complexity solution for target L&T. 15,16 The WCL-based localization algorithm uses position of anchors that are in the communication radius of unknown node whose position is to be estimated. The WCL algorithm generally yields low localization accuracy, especially if the unknown node is outside a polygon established by the anchors. Some researchers have proved that by fusing the centroid concept with some other existing localization framework, the localization error can be significantly reduced. The authors in Phoemphon et al. 15 have proposed a fuzzy-based centroid localization (FCL) algorithm for localization. In proposed FCL, the anchor nodes are prioritized using fine-tuned weights. In Zhang et al., 16 the authors proposed a particle centroid drift (PCD) algorithm for large-scale WSN with an objective to reduce the distance estimation errors. In PCD-based system, centroid algorithm is combined with particle distribution function to form in high-quality particles.
We know that artificial neural network (ANN) once trained with appropriate dataset can deal with almost any non-linear system dynamics. 17,18 The authors in Zhou et al. 19 designed a novel hybrid hypothesis test based on the idea of asymptotic relative efficiency (ARE), which takes into account the signal distributions from different Wi-Fi access points. In this research work, the Jarque-Bera (JB) test is utilized to perform the normality test on the Wi-Fi signal distribution, and then to obtain contribution degree of each access point, the chi-square automatic interaction detection (CHAID) approach is adopted. The target location estimates are obtained by using the KNN. The extensive experimental results using the proposed approach lead to higher localization accuracy and enhanced robustness as compared with other existing Wi-Fi-based localization techniques. Choosing appropriate ANN architecture for the given indoor L&T application is very crucial. The GRNN is found to be suitable to variety of target L&T applications involving highly non-linear system dynamics. 20,21 Unlike other ANN architectures, the GRNN has only one control parameter. That is GRNN smoothing factor. We have previously used the concept of GRNN and applied it in several ways to solve the problem of single mobile target L&T. For instance, we proposed and verified two algorithms namely GRNN + KF and GRNN + UKF to address uncertainty in RSSI measurement noise in Jondhale and Deshpande. 20,21 In these works, the GRNN architecture is trained with training dataset that consists of input vectors (four RSSI measurements) and corresponding output vector (actual 2D locations of target). Here the location estimates obtained with developed GRNN architecture are applied to KF and UKF to further smooth the GRNN location estimates. These GRNN + KF and GRNN + UKF algorithms are also validated in a real-time experiment carried out in our institute laboratory. 20 In this experiment, we proved that the moving person can be tracked efficiently using wireless communication network formed using smartphone and PSOC BLE nodes. Although the algorithms presented in show improved localization results than that with trilateration, GRNN, RSSI + KF, and RSSI + UKF algorithms, the RSSI measurement noise is kept constant (i.e. 3 dB). Motivated by the benefits of trilateration, GRNN, and centroid concept, we propose novel TCGRNN architecture for indoor target L&T problem. Unlike Jondhale and Deshpande, 20,21 to focus only the architectural design aspect, we have not fused the proposed TCGRNN architecture with KF framework in this work. Unlike our previous GRNN architecture, input vector dimension for the proposed TCGRNN architecture is made 8. Unlike localization analysis in our previous works, 20,21 a new parameter for localization performance evaluation is introduced (i.e. regression coefficient R)

TCGRNN architecture for target localization
The RSS used in this research work is generated using log normal shadow fading model (LNSM) as given below 20,21 where, (z 'j, k ) is the RSS received at the node N ' with coordinates (x 'k , y 'k ) at time k. It is assumed to be transmitted by node N j with coordinates (x jk , y jk ), P r (d 0 ) is the RSS at receiver kept at a distance d 0 (1 m), and h is the path loss exponent. Like Jondhale et al., 18 here also it is kept 2.84, and X s is the normal random variable with some value of variance, and standard deviation. It represents X s ; N (3, 1): In Case II and Case III, standard deviation is kept same as 1 dB but variance is changed to 6 and 9 dB, respectively. Trilateration is the traditional process of localization wherein the target location can be computed using its distances from at least three anchor nodes (say R 1 , R 2 , and R 3 ), and coordinates of these anchor nodes. [9][10][11] As we are aiming at 2D localization of the mobile target, let us consider at particular time instance during motion, the target location is (x, y) and is at distances d 1 , d 2 , and d 3 from R 1 , R 2 , and R 3 , respectively. Although, the trilateration can also be used for the localization of 3D scenario. Thereafter, 3D location estimates of trilateration and 3D centroid locations can be applied to our proposed TCGRNN architecture to produce 3D result. In other words, the proposed TCGRNN architecture dimension for 3D localization scenario would be 10. With this input dimension (i.e. 10), and output dimension (i.e. 3), the proposed TCGRNN architecture would be required to be trained. To keep things simpler, we tested the proposed TCGRNN architecture for 2D localization scenario Solving above equations for x and y, we get It is well known that the GRNN can converge any linear or non-linear regression surface (sparse datasets) very quickly. For estimating output, it measures the distance of given input vector from vectors used in the training dataset. The detailed study of GRNN can be found in Jondhale and Deshpande. 20,21 In this work, we designed the proposed TCGRNN architecture by fusing the ideology of trilateration and centroid in it (see Figure 1). The input to the proposed TCGRNN is X (an input vector consisting of four RSSI measurements, trilateration estimated location, and centroid location), and its output is M(output vector that includes estimated 2D location) (see Figure 1). As the dimension of X for the proposed TCGRNN architecture is 8 (see Figure 1), there are eight nodes in the input layer corresponding to eight parameters of X . The number of nodes in the input layer and pattern layer is the same (i.e. 8). Each node in the input layer is connected with each node in the pattern layer. Whereas, the GRNN algorithm in Zhang et al. 16 has input X (an input vector consisting of only four RSSI measurements), and its output is M(output vector that includes estimated 2D location). Thus, the dimension of X for the GRNN architecture in Jondhale and Deshpande 20 is 4.
The mathematical equations for estimations with TCGRNN architecture are the same as that with GRNN architecture. These are as given below where M is the estimated 2D location, X is the input vector consisting of four RSSI measurements, trilateration-estimated location, and centroid location, s is the smoothing factor, and n is the dimension of input vector. Here n = 8: Choosing appropriate value of s is very important in case of GRNN and TCGRNN for accurate output estimation. 18 To compare our previously published GRNN architecture with the proposed TCGRNN architecture, we took s = 3:5:

System design and assumptions of TCGRNN-based L&T system
In this work, an indoor area of 100 m 3 100 m is simulated using MATLAB 2016a as shown in Figure 2. Total 16 WSN nodes are assumed to be utilized for the proposed target L&T problem, out of which 15 are considered to be anchor nodes. The remaining one node is assumed to be carried by the target during motion. All the anchor nodes are supposed to be configured in transmitter mode, whereas the node carried by the mobile target is assumed to be configured in receiver mode. The anchor nodes are deployed at locations as given in Table 1     Changing the locations of these anchor nodes can change RSSI measurements received at the mobile target. The deployment of anchor nodes is kept same during training as well as testing of the proposed TCGRNN localization architecture for the considered indoor target tracking problem. So we believe that changing anchor location deployment setup might not have huge impact on the localization performance. The total number of unknown target locations to be estimated in this work is 35. The location estimations are carried out using trilateration technique, GRNN algorithm, and the proposed TCGRNN algorithm. Figure  3 illustrates the proposed TCGRNN architecture-based L&T system. The operational difference between the GRNN architecture and TCGRNN architecture is input vector. The input vector for GRNN architecture consists of any four random RSSI measurements (see equation (8)), whereas input vector for TCGRNN architecture includes the same four random RSSI measurements, and centroid coordinates of anchors which produced those four RSSI measurements (see equation (9)). Thus, the input vector dimensions for GRNN and TCGRNN architectures are 4 and 8, respectively where X i is the ith input vector for GRNN architecture, RSSI 1 to RSSI 4 is the four RSS obtained from random four anchor nodes, x T and y T are the x and y coordinates estimated by trilateration, and C 1 and C 2 are the x and y coordinates of centroid of four anchors. Let us consider the coordinates of anchors who generated RSSI 1 , RSSI 2 , RSSI 3 , and RSSI 4 are (x 1 , y 1 ), (x 2 , y 2 ), (x 3 , y 3 ), and (x 4 , y 4 ), respectively. Then C 1 and C 2 can be computed using coordinates of anchors who generated RSSI 1 to RSSI 4 as given below in equation (10) The GRNN and TCGRNN architectures are trained with the help of 75 sets of input vector (field measurements) and corresponding output vector (actual 2D location of target corresponding to those field measurements) (see Figure 3). This training dataset is obtained through one any random trial of target motion as described by equations (11)- (16). Once the proposed TCGRNN is trained, it is ready for any random input vector generated during real-time target motion in the online localization stage, whereas the trilateration technique does not need such training prior to its real-time application. The Figure 3 is also applicable for GRNNbased L&T system. To visualize GRNN-based L&T system, all we have to replace TCGRNN architecture box by GRNN box, and X i in equation (9) by X i in equation (8). During target motion, target node receives 15 RSSI measurements from 15 anchor nodes for each of the 35 target locations. Out of these 15 measurements, three higher values of RSSI measurements are utilized to estimate the target location in case of trilateration, whereas the GRNN and TCGRNN work with any four random RSSI measurements during online estimation phase. The MATLAB simulations are carried out on hp platform with Core i5, and 4 GB RAM. The transmission power and communication radius of node are assumed to be 1 mW and 50 m, respectively.
The state of moving target at time instant k is defined by the vector X k = (x k , y k , _ x k , _ y k ) 0 , where x k and y k specify the position, _ x k and _ y k specify the speed in x and y directions, respectively, at kth time instance, and is given by following equations where dt is discretization time step between two successive time instants such that dt = k À (k À 1) and is kept 1 s. The target motion undergoes the variation in velocity during T seconds as given by equations (13)- (16).
To evaluate the localization performance of the proposed TCGRNN algorithm, two parameters are considered namely, average localization error and root mean square error (RMSE). For every kth time instance, one target location is estimated. As there are total 35 target locations and time for estimating one location is 1 s, the total simulation period is T = 35s. Therefore, k represents both location number as well as time instance. For each time instance k, we get two values of localization error: one associated with x coordinate estimate (x k À x k ), and other with y coordinate estimate (ŷ k À y k ). So the localization error for kth time instance can be computed by averaging these two error values. Then, the overall localization error (we named it as average localization error) for total simulation period T can be computed using equation (17). Lower the values of these two parameters, high will be the target localization (or tracking) accuracy. In the corresponding result figure, we get a value of coefficient of correlation (R). R is a measure of correlation between actual and estimated value. R varies from 21 to + 1. R = À 1 indicates inverse correlation between target and output, whereas R = + 1 indicates a perfectly linear positive correlation. Unlike Jondhale and Deshpande, 20,21 we have also used R for performance evaluation of all the considered techniques where (x k ,ŷ k ) is the estimated target location for kth time instance, (x k , y k ) is the actual target location at kth time instance

Discussion on results
To realize the real-time indoor environment, X s (see equation (1)) is varied in Case I (X s ; N ( 3, 1 )), Case II (X s ; N ( 6, 1 )), and Case III (X s ; N ( 9, 1 )). For each of the simulation case, the target is assumed to start from (10,10) and stop at (97, 10). Numeric results obtained in all the three cases are average of 50 simulation trials (refer Tables 2-8).
Case I: X s ; N ( 3, 1 ) Figure 4 plots actual target track, and corresponding location estimates obtained with trilateration, GRNN, and TCGRNN methods. Here, black dark circles are anchor nodes that continuously broadcast RF signal to be received by mobile target node. The red square indicates 35 actual target locations during its motion, whereas blue plus, black plus, and green plus symbols are the location estimations with trilateration, GRNN, and the proposed TCGRNN architecture, respectively, against these 35 actual target locations. The overall (average) localization error in estimating x and y coordinates of mobile target can be computed by taking average of individual localization errors in estimating x and y coordinates. The average localization error with trilateration varies between 0 m and approximately 220 m, whereas that with GRNN and TCGRNN is below 20 m (see Figure 5).
We want to highlight few important observations regarding the result in Figure 4.
For few locations, the estimation with TCGRNN can be seen, but the corresponding GRNN-based estimates are not visible. The      Table 3)). Few location estimates of target with trilateration are not seen. The reason behind this is that the location estimates obtained with trilateration are out of the considered WSN area. For location 8 (24, 45), the location estimate obtained with trilateration is (285.88, 2128.54) (refer Table 3).     corresponding R values in Table 4). It can be seen that the R values obtained with the proposed TCGRNN algorithm are higher as compared to that with other two algorithms. Thus, results in Case I indicate that the location estimation with TCGRNN, GRNN, and trilateration is best, moderate, and poor, respectively.
Case II: X s ; N ( 6, 1 ) Figure 8 illustrates the comparison of location estimations with TCGRNN, GRNN, and trilateration techniques. By comparing Figure 8 (Case II) with Figure 4 (Case I), one can conclude that as the measurement noise in RSSI is doubled, the localization errors are also increased. However, significant rise in localization error can be noted down in case of trilateration only (see Table 5). The % rise in localization error with TCGRNN is lowest as compared to that with trilateration and GRNN. Figure 9 plots average localization errors with trilateration GRNN and TCGRNN. From Figure 9, we can see that the highest localization error with the traditional trilateration, GRNN, and the proposed TCGRNN is approximately 200, 25, and 22 m, respectively, whereas lowest localization error with the traditional trilateration, GRNN, and the proposed TCGRNN is approximately 4, 3, and 0 m, respectively. Thus, the proposed TCGRNN architecture outperforms the rest of the other two techniques. Figures 10 and 11 plot regression of x and y coordinates of actual target locations with corresponding x and y estimations of GRNN and TCGRNN, respectively. It can be seen that the R values obtained      with the proposed TCGRNN algorithm for x and y estimations are better than that obtained with GRNN algorithm (see Table 6).
Case III: X s ; N ( 9, 1 )  Table 8). Therefore, as the measurement noise is increased by thrice in Case III as compared to that in Case I, a significant rise in estimation errors is observed in Case III for all the three implementations. However, still the % rise in localization error with TCGRNN is lowest as compared to that with trilateration and GRNN (see Tables 7 and 8). The average localization error with trilateration varies between 0 m and approximately 1000 m (see Figure 13). Thus, the traditional trilateration technique completely fails to provide acceptable localization performance in the context of very high environmental dynamicity (i.e. very high measurement noise in RSSI readings).   Speaking about the efficacy of the proposed TCGRNN algorithm, although it ranges in the scale of 3-10 m in the three cases, it is certainly far better than the traditional trilateration technique. In addition, the localization accuracy of the proposed TCGRNN architecture is also better than the GRNN architecture in all the investigated cases (see Tables 2-8). From these numeric results, it is clearly observed that as the measurement noise in RSSI goes beyond 6 dB, the traditional trilateration technique yields worst localization results (i.e. average RMSE = 165.3697, and average localization error = 41.9073) (see Table 7) as compared to GRNN and TCGRNN. Thus, the traditional trilateration technique is not at all recommended for highly dynamic RF environment with measurement noise in RSSI greater than 6 dB. Augmenting four extra parameters (i.e. centroid and trilateration-based estimation) in input vector for TCGRNN architecture certainly improves the target localization performance as compared to that with plain GRNN architecture.

Conclusion and future scope
This article presents a novel improved trilateration technique based on TCGRNN architecture to deal with the issues of dynamic RF channel and non-linear system dynamics to solve the problem of indoor L&T of a mobile target. To realize uncertainty in the noise in RSSI measurements, the normal random variable parameter in LNSM path loss model is varied from 3-9 dB in the steps of 3 dB during simulations (Case I, Case II, and Case III). The extensive simulation results prove that the proposed improved trilateration-based TCGRNN architecture demonstrates superior localization performance as compared to trilateration and even GRNN architecture. Looking at localization from another perspective, we know that depending on the application in hand, the requirement of localization accuracy may change. For example, if it is a marketing/ advertisement case, then roughly a 5-10 m should serve the purpose. On the other hand, for industrial applications, localization accuracy below 1 m may be required. Yes, we believe that the localization accuracy for the proposed TCGRNN architecture-based algorithm can be improved further by fusing the results with some more advanced technique such as Kalman filter or its variants such as Extended Kalman Filter (EKF) or Unscented Kalman Filter (UKF). Thus, the proposed TCGRNN architecture-based localization system is useful in localization applications wherein the demand of localization accuracy is in the range of 3-8 m. The proposed TCGRNN architecture can also be applied to multitarget tracking scenario in indoor environment. We believe that fusing the proposed TCGRNN architecture with KF framework may further refine localization accuracy to the scale of 1 m, and it even can solve the problem of 3D localization of the target.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.