# Distance Mapping Algorithm for Sensor Node Localization in WSNs

- 234 Downloads

## Abstract

The localization of sensing nodes is most pronounced in the application of wireless sensor networks. To address this issue, a node localization algorithm called the DMA is proposed in this paper. This algorithm identifies the node position by using the estimation matrix and distance matrix together with the optimized linear transforming function. With the integration of GA, the position of the node can be accurately determined. The conducted simulation outcomes and the corresponding analysis verify the high accuracy and low energy consumption of the proposed algorithm, which can outperform other widely used approaches. This study designs and deploys the proposed algorithm and shows its sensor node localization theory, which makes it a promising basis for the realization of positioning in WSNs.

## Keywords

Wireless sensor network Node localization Distance mapping algorithm Genetic algorithm## 1 Introduction

Wireless sensor network (WSN) refers to a group of spatially dispersed and dedicated sensors for detecting and recording the physical conditions of targets and resolving the signals at a central location [1]. WSNs have become extremely popular in the present day due to their expanding ability to monitor and interact remotely with the world [2]. In a WSN, a large number of autonomous low-complexity sensor nodes are deployed to generate collaborative networks by collecting, transmitting and analyzing data [3]. Since sensor nodes measure the physical conditions at a given position, the signals delivered by each sensor are relevant only if tagged with the accurate locations of the sensor nodes [4, 5]. In addition, the trend towards the wireless sensing system is intended to employ energy-efficient algorithms and save resources [6, 7]. For this reason, the investigation of node positioning is imperative. Therefore, the localization strategy is deemed best able to meet the high accuracy and low power consumption demands [8].

Research is ongoing to take this localization methodology into widespread use. In most cases, the problem of sensing node positioning can be described as follows: On the foundation of the pairwise distance measurement, an unlocalized node is determined via the information exchanging principle, whose position or coordinate is in reference to the number of neighboring nodes and the distance to them. Current methods, such as the use of the global positioning system (GPS), have become significant in node localization in WSN. However, it is difficult to use this method to assign location data to all sensor nodes in a large-scale network because the per-node manual configuration is difficult and equipping each node with a GPS receiver is overly expensive. Typically, the localization algorithm can be categorized as a range-free approach, while the measuring of the actual distance between nodes can be categorized as a range-based approach [9, 10, 11]. Previous work in range-free localization schemes is heuristic, simple, and allows distributed implementation, which depends on merely the connectivity information (i.e., whether a node is in the transmission range of another node) [12]. For example, the approximate point in triangulation algorithm uses the triangle formed by any three anchors that contain the unlocalized node and estimates the position by identifying the center of the intersection of all these triangles [13, 14]. However, the range-free solutions have barriers to scalability due to error accumulation and due to power consumption because of centralized computation. In addition, range-based localization algorithms provide more reliable sensor positioning by using pairwise time-of-arrival (TOA), time-difference-of-arrival (TDOA), received signal strength (RSS), and/or angle-of-arrival measurements [15, 16]. As such, there are special hardware requirements for running the algorithms. There are still many challenges to locating sensor nodes in WSNs. For this reason, new methodologies are required for developing sensor node localization approaches.

During the methodology devising process, issues of positioning accuracy, scalability, and energy consumption must be evaluated to establish the system baseline. The sensor node localization algorithm is therefore of great significance for network deployment [17]. In this paper, a sensor node localization method called the distance mapping algorithm (DMA), which is distinctive from the aforementioned approaches, is devised and developed. We focus here not only on the precision of localization accuracy but also on reducing microsensor energy usage. The remainder of the paper is arranged in the following order:

In Sect. 2, we review the basic working foundation of node localization algorithm deployment as well as the theory of genetic algorithms for parameter optimization. Our proposed approach is described with detailed working procedures in Sect. 3. We then describe the performed simulation of the localization algorithm together with the result analysis in Sect. 4. The research findings and future expectations are provided in Sect. 5.

## 2 Preliminaries

We now briefly describe the basic principle of distance measurement in WSNs to facilitate the description of subsequent algorithm deployment. For more details, see the work done by Guillermo Molina et al. and Feng Jun et al. [18, 19]. In addition, the genetic algorithm is used to facilitate the localization process. As a class of optimization heuristics based on natural selection and genetic evolution, the genetic algorithm is employed to identify the optimum solution of the parameter.

### 2.1 Distance Resolving

*M*—dimensional space can be expressed via the estimated vector, which is

*M*—dimensional space is defined by the following estimation matrix

We shall thus say that an optimal linear transformation can be calculated to provide a mapped relationship between the estimation matrix and the distance matrix. For each nonanchor node with an estimated vector, the corresponding vector distance is obtained, from which its coordinate can be computed.

Calculation with the target matrix is facilitated by using the singular value decomposition (SVD) principle. Owing to the noise within the measuring output, we remove data points with values close to zero during the computation.

### 2.2 Genetic Algorithm

The genetic algorithm (GA) is a metaheuristic inspired by the process of natural selection in the field of evolutionary biology [20]. The evolutionary algorithms, however, have already shown their specific capabilities in optimizing problems relating to the parameter evaluation [21, 22]. Genetic algorithms are generally applied to generate high-quality solutions to where the variables to be optimized (genes) can be encoded to form a string (chromosome) [23]. In a GA, every string stands for one trial solution of the problem. A GA aims to find better solutions by exchanging information between the strings.

- 1.
Initialization: a population of chromosomes, which represent the individuals, are created at the first stage. Concretely, each chromosome contains genes with alleles, which indicate the actual parameters [25]. The initial parameter values are randomly assigned.

- 2.
Fitness calculation: the fitness of each individual in this population is computed, which will become a variable in future steps.

- 3.
Individual selection: individuals with better fitness outcomes are able to produce the next generation because the selection mechanism allows only a small portion of chromosomes to evolve further [26]. Variable fitness levels allows for selection among random competitors. The selected individuals, which come from the current population, are then inserted into a mating pool.

- 4.
Reproduction: a new set of individuals in every generation is reproduced from the parents in the mating pool. Generally, reproduction involves the operation of both crossover and mutation [27]. Reproduction is the process of crossover of the genetic information. Altering the alleles randomly ensures the genetic diversity of the subsequent generations of offspring. The mutation probability is commonly less than 1%. Thus, a new individual can be created that shares major commonalities and minor differences with the parents [28].

- 5.
The initial population is replaced with the new population. After the repeated iterations of the processes, a solution is found that caters to the minimum criteria. Successive iterations no longer produce better results.

## 3 Methodology

This section comprehensively introduces the design principle of the sensor node localization algorithm and the positioning process.

Preprocessing: the WSN is enabled for both anchor node and nonanchor node communication.

Parameter determination: related variables, such as the estimation matrix, the distance matrix and the linear transformation function, are derived from the measurement distances.

Localization: The nonanchor node is localized by using the parameters obtained above.

More details of each step are described in the following sections.

### 3.1 Preprocessing

One of the key processes in WSNs is the deployment of the system. Each node is initialized with an empty node link list hereafter. Note that one anchor node link list contains an anchor node ID, positioning information, hop numbers and the distances to neighboring nodes. The nodes can connect only to each other rather than detecting the distance. Then, in relation to assigning the value 1 to all edges, the distance can be calculated from the hop ranges. Aiming to reduce the communication overhead, especially for large WSNs, a threshold is preset as the hop count for each anchor node to expand outward. If and only if the hop range from one node to the anchor node is larger than the threshold, the expanding will stop.

Subsequently, each anchor node can broadcast a “Hello” packet to its neighboring node. The content of the packet is in line with the anchor node ID, coordinate \( x_{i} \) and the hop range \( p_{i} \) with the initial value preset as 0.

### 3.2 Parameter Determination

After acquiring the aforementioned information, the link list of the anchor node is updated, especially for the hop count. Then, in relation to the WSN, a straightforward way to compute the estimation matrix and the distance matrix is available. As long as all the anchor nodes update their key information, three nodes, which are the closest to each other in distance, are selected to construct a new matrix of approximate value. At this stage, the variables for node localization are established.

The linear transforming function is based on the estimation matrix \( P \). By using the SVD, we shall thus obtain the linear transformation \( T \) mapping the neighboring sensor nodes. The matrices can then be delivered to the nonanchor nodes.

### 3.3 Localization

The position of every nonanchor can be determined calculated using the trilateration principle. However, considering the energy consumption and the hardware working accuracy, the three circles cannot intersect at one point all the time. Therefore, we employ GA to find the optimized point, which can effectively minimize the difference between the measuring distance and the estimation outcome. This optimized point represents the position of the node.

For current research, the initial population of individuals’ genes is generated randomly so that the selection of genes with high fitness can address a best gene in the minimum number of genetic evolutions [29, 30]. The size of the initial population is set at 40 individuals. The fitness function is used to select individuals with the highest fitness. Reproduction is then utilized to produce increased numbers of offspring with higher fitness. The mutation ratio is given as converges on 0.2% considering that the convergence speed slows down as the search space expands. After 150 generations, the iterative procedures stop satisfying the criteria. The variation in the target value became negligible. Finally, the result approaches a constant value.

## 4 Experiments

This section shows the implemented approach for sensor node position identification in a WSN. This study integrates the localization algorithms into an embedded virtual platform, where the state of each node can be set and measured for system development.

### 4.1 Experimental Setup

Experiments are conducted on the proposed sensor node localization method to evaluate the working performance in WSNs. The algorithms are compiled and run on the simulation software Network Simulator, which can be applied to the WSN environment. The localization accuracy and the energy consumption are taken to verify DMA technical efficacy in comparison with traditional approaches, DV-Hop and MDS-map.

### 4.2 Analysis of Results

According to Fig. 4, the positioning errors decrease as the number of anchor nodes increases. The presence of more reference nodes in the WSN leads to a more accurate representation of the network. The proposed DMA algorithm typically reaches an even higher localization accuracy than the other two algorithms. The localization error can be explained by the noise within the network and the transmitting error resulting from variable collection environments. An accuracy rate of 100% is not possible [31].

The proposed algorithm DMA uses less power mainly because it employs neighboring nodes by transmitting local positioning information. Since the anchor nodes reject the nodes that are beyond their hop range automatically, the algorithm is more efficient in energy consumption. Moreover, DMA benefits network expansion by using the information of neighboring nodes. In summary, the qualitative results of the simulation provide evidence that DMA can be adapted for complex WSNs with reliable working performance that and it is possible to conserve relatively more power.

## 5 Concluding Remarks

The DMA concentrates on identifying the position of the sensor nodes in the WSNs. On the basis of high-accuracy localization, the estimation matrix, distance matrix and the optimized linear transformation are effective for node position description. GA is employed during the computation to provide a more reliable outcome through identification of optimal node position. In addition, this algorithm also tends to be beneficial to system scalability. The simulation of three localization algorithms was set up in the laboratory. The results reveal that the proposed approach outperforms other widespread methods in terms of localization accuracy and energy consumption, which offers an opportunity to fulfill the demand for high-accuracy sensor node localization within the development of WSNs.

Due to the significance of this research, future work will focus on more complex situations that require real-time localization of freely moving nodes. The proposed algorithm may have difficulty in identifying the node location without a preset trajectory. Therefore, we tend to improve the current method by integrating path planning and predicting strategies.

## Notes

### Acknowledgements

This research is a general project supported by Beijing Tehua Post Doctor Programme and Huashan Hospital, Fudan University.

### Funding

Project supported by Natural Science Foundation of Shanghai (14ZR1429800, 15ZR1430000, 18ZR1427500), Ministry of Education of the People’s Republic of China (EIA140412), Foundation of Shanghai Municipal Commission of Health and Family Planning (2015ZB0401)

## References

- 1.Wireless sensor network. https://en.wikipedia.org/wiki/Wireless_sensor_network. 27 Dec 2018.
- 2.X. Qingjun,
*Range-free and range-based localization of wireless sensor networks*, Doctor Dissertation, Hong Kong Polytechnic University, Hong Kong, 2011.Google Scholar - 3.A. Moragrega, P. Closas and C. Ibars, Potential game for energy-efficient RSS-based positioning in wireless sensor networks,
*IEEE Journal on Selected Areas in Communications*, Vol. 33, No. 7, pp. 1394–1406, 2015.CrossRefGoogle Scholar - 4.S. Srirangarajan,
*Ranging and positioning in wireless sensor networks*, Doctor Dissertation, The University of Minnesota, Twin Cities, 2008.Google Scholar - 5.N. R. Kumarasiri,
*Development of novel algorithms for localization in wireless sensor networks*, Master Dissertation, The University of Toledo, Toledo, 2014.Google Scholar - 6.Xiaoning Zhu, Bojian Ding, Wenjun Li, Gu Lize and Yixian Yang, On development of security monitoring system via wireless sensing network,
*EURASIP Journal on Wireless Communications and Networking*, Vol. 221, pp. 1–10, 2018.Google Scholar - 7.F. Shahzad, T. R. Sheltami, An efficient MAC scheme in wireless sensor network with energy harvesting (EHWSN) for cloud based applications, In
*Proc. IEEE Local Computer Networks Conference Workshops*, pp. 783–788, 2015.Google Scholar - 8.Wu Dong-Shing and Chin-Liang Wang, A decentralized positioning method based on recursive weighted least absolute value optimization for wireless sensor networks,
*IEEE Signal Processing Letters*, Vol. 21, No. 1, pp. 18–21, 2014.CrossRefGoogle Scholar - 9.Xingcheng Liu, Su Shaohua, Feng Han, Yitong Liu and Zhihong Pan, A range-based secure localization algorithm for wireless sensor networks,
*IEEE Sensors Journal*, Vol. 19, No. 2, pp. 785–796, 2019.CrossRefGoogle Scholar - 10.Younes Ahmadi, Naser Neda and Reza Ghazizadeh, Range free localization in wireless sensor networks for homogeneous and non-homogeneous environment,
*IEEE Sensors Journal*, Vol. 16, No. 22, pp. 8018–8026, 2016.CrossRefGoogle Scholar - 11.G. Mao, B. Fidan and B. D. O. Anderson, Wireless sensor network localization techniques,
*Computer Networks*, Vol. 51, pp. 2529–2553, 2007.zbMATHCrossRefGoogle Scholar - 12.Q. Shi, C. He, H. Chen, L. Jiang and Distributed wireless sensor network localization via sequential greedy optimization Algorithm,
*IEEE Transactions on Signal Processing*, Vol. 58, No. 6, pp. 3328–3339, 2010.MathSciNetCrossRefGoogle Scholar - 13.K. Frankie, W. Chan and H. C. So, Accurate distributed range-based positioning algorithm for wireless sensor networks,
*IEEE Transactions on Signal Processing*, Vol. 57, No. 10, pp. 4100–4105, 2009.MathSciNetzbMATHCrossRefGoogle Scholar - 14.V. V. Deshpande, A. R. Bhagat Patil, Energy Efficient Clustering in Wireless Sensor Network using Cluster of Cluster Heads. In
*Tenth International Conference on Wireless and Optical Communications Networks*, pp. 1–5, 2013.Google Scholar - 15.Yu Qinghua Luo, Junbao Li Peng and Xiyuan Peng, RSSI-based localization through uncertain data mapping for wireless sensor networks,
*IEEE Sensors Journal*, Vol. 16, No. 9, pp. 3155–3162, 2016.CrossRefGoogle Scholar - 16.Wu Yue, Wang Hao and Zheng Xiujuan, WSN localization using RSS in three-dimensional space—a geometric method with closed form solution,
*IEEE Sensors Journal*, Vol. 16, No. 11, pp. 4397–4404, 2016.CrossRefGoogle Scholar - 17.N. A. Azmi, S. Samsul, Y. Yamada, M. F. M. Yakub, M. I. M. Ismail, R. A. Dziyauddin, A survey of localization using RSSI and TDoA techniques in wireless sensor network: system architecture, In
*2018 2nd International Conference on Telematics and Future Generation Networks (TAFGEN)*, pp. 131–136, 2018.Google Scholar - 18.Guillermo Molina and Enrique Alba, Location discovery in wireless sensor networks using metaheuristics,
*Applied Soft Computing*, Vol. 11, pp. 1223–1240, 2011.CrossRefGoogle Scholar - 19.Wu Feng Jun, Xiao Bei, Xu ZhiLiang and Ge Hui, Position algorithm in wireless sensor network based on estimated of the distance mapping,
*Journal of Lanzhou University of Technology*, Vol. 41, No. 1, pp. 112–116, 2015.Google Scholar - 20.Genetic algorithm, https://en.wikipedia.org/wiki/Genetic_algorithm, 2019.1.4.
- 21.Janne Riionheimo and Vesa Valimaki, Parameter estimation of a plucked string synthesis model using a genetic algorithm with perceptual fitness calculation,
*EURASIP Journal on Applied Signal Processing*, Vol. 8, pp. 791–805, 2003.zbMATHGoogle Scholar - 22.R. S. M. Saadaldeen, A. A. Osman, Y. E. E. Ahmed, Clustering for energy efficient and redundancy optimization in WSN using fuzzy logic and genetic methodologies a review, In
*2018 International Conference on Computer, Control, Electrical, and Electronics Engineering (ICCCEEE)*, pp. 1–5, 2018.Google Scholar - 23.Y. Guo, L. Liu, Y. Fu, C. Li, L. Guo, Optimization of magnetic-grating-like stroke-sensing cylinder based on response quality evaluation algorithm,
*Journal of Sensors*, Vol. 11, pp. 1–15, 2018, Article ID 7046390.Google Scholar - 24.W. P. Calixto, L. M. Neto, M. Wu, K. Yamanaka and E. da Paz Moreira, Parameters estimation of a horizontal multilayer soil using genetic algorithm,
*IEEE Transactions on Power Delivery*, Vol. 25, No. 3, pp. 1250–1257, 2010.CrossRefGoogle Scholar - 25.Z. U. Koreshi and H. Khan, Optimization of moderator design for explosive detection by thermal neutron activation using a genetic algorithm,
*Journal of Nuclear Engineering and Radiation Science*, Vol. 2, No. 031018, pp. 1–7, 2016.Google Scholar - 26.Meikang Qiu, Zhong Ming, Jiayin Li, Keke Gai and Ziliang Zong, Phase-change memory optimization for green cloud with genetic algorithm,
*IEEE Transactions on Computers*, Vol. 64, No. 12, pp. 3528–3540, 2015.MathSciNetzbMATHCrossRefGoogle Scholar - 27.Mohamed El-Sherif, Yasmine Fahmy and Hanan Kamal, Lifetime maximisation of disjoint wireless sensor networks using multiobjective genetic algorithm,
*IET Wireless Sensor Systems*, Vol. 8, No. 5, pp. 200–207, 2018.CrossRefGoogle Scholar - 28.Jason Michael Anthony Falbo and Stéphane Dedieu, Network device allocation optimization using genetic algorithms,
*IEEE Canadian Conference on Electrical & Computer Engineering (CCECE)*, Vol. 2018, pp. 1–6, 2018.Google Scholar - 29.B. K. Jung, J. R. Cho and W. B. Jeong, Sensor placement optimization for structural modal identification of flexible structures using genetic algorithm,
*Journal of Mechanical Science and Technology*, Vol. 29, No. 7, pp. 2775–2783, 2015.CrossRefGoogle Scholar - 30.Sanghyun Lee, Baehyun Min and Mary F. Wheeler, Correction to: Optimal design of hydraulic fracturing in porous media using the phase field fracture model coupled with genetic algorithm,
*Computational Geosciences*, Vol. 22, No. 6, p. 1583, 2018.MathSciNetzbMATHCrossRefGoogle Scholar - 31.Z. Peng, C. Cao, J. Huang, W. Pan, Human moving pattern recognition toward channel number reduction based on multi pressure sensor network,
*International Journal of Distributed Sensor Networks*, No. 4, pp. 1–10, 2013, Article ID 510917.Google Scholar

## Copyright information

**Open Access**This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.