#### Abstract

Wireless sensor network contains very large number of tiny sensors; some nodes with known position are recognized as guide nodes. Other nodes with unknown position are localized by guide nodes. This article uses the combination of fixed and mobile guide nodes in wireless network localization. So nearly 20% of nodes are fixed guide nodes and three nodes are intended as mobile guide nodes. To evaluate the proficiency, the proposed algorithm has been successfully studied and verified through simulation. Low cost, high accuracy, and low power consumption of nodes and complete coverage are the benefits of this approach and long term in localization is the disadvantage of this method.

#### 1. Introduction

With recent advances in wireless electronics and transmission, designing and manufacturing of wireless sensors with low power consumption, small size, reasonable price, and various applications have become popular. These small sensors with the abilities such as receiving environmental information based on the sensor type and processing and sending data have caused the creation of networks type which is called wireless sensor networks. The issue of location evaluation or spatial coordinate of wireless sensors is called localization. In the past few years, localization in wireless sensor network has become a widespread researchable field. knowing the position of nodes in WSN is necessary for some applications and protocols, for example, in tracking and inquiry [1]. Due to the random distribution of nodes and even the mobility of them in some applications an appropriate localization algorithm is needed [2]. A lot of works have been done in the area of localization and related issues but various presented algorithms need extra hardware. For example, in [3] destination measurement hardware is required and [4] needs angle measurement hardware. Method used in [5] needs a movable hardware and in [6, 7] a send-range radio hardware is used. Generally, many localization schemes use fixed stations but in some others the position of sensor nodes is determined by mobile stations. In this article, a localization algorithm is proposed which uses fixed and mobile guide nodes to determine the position of nodes with remarkable speed and accuracy. The proposed algorithm is composed of two phases: in the first stage, the position of nodes will be determined by fixed guide nodes and in the second phase the position of the remaining unallocated nodes of the first stage will be determined by mobile guide nodes.

The rest of this paper is organized as follows: Section 2 presents related work. The proposed scheme will be described in Section 3. The simulation model and experiment results are presented in Section 4. Section 5 concludes this paper.

#### 2. Related Work

Many localization methods contain two phases. In the first phase, the distances and angles of known position nodes and the node that is going to be localized are mapped. The first phase is known as the measurement phase. In the second phase, the distances or mapped angles are combined to determine the position of node. This phase is known as positioning phase. Some existing methods for mapping phase are as follows: time differences of arrival signal [8], time of arrival signal [9], angle of arrival signal [10], and received signal strength [11]. Depending on the method used for mapping, an individual positioning technique is used in the second phase. The most widely used techniques of these techniques for second phase are trilateral approach [12], pentagon method [13], the maximum probability technique [14], and triangulation method [15]. For example, in [16] by using four mobile guide nodes the position of unknown node is acquired. In this algorithm nodes determine their positions by receiving signals from guide nodes. The guide nodes are equipped with global positioning system. This algorithm uses received signal strength in first phase and pentagon method in second phase. In [17], a method is presented that finds the unknown positions without using GPS, as follows: () having a distance and a direction (angle), () having two points and their angle, and () having the distance of three required points. A different method is represented in [18] which calculates the location of unknown nodes by weighting that is based on the connectivity with the known positioning nodes and placement with maximum weighted node. In this algorithm the adjacency matrix is used to determine neighborhood nodes before localization. In this network nodes can move partially. After completing location, the current map is compared with adjacency matrix, and if it is incompatible the node will locate on its original place by tensile and buoyancy equations.

#### 3. The Proposed Algorithm

In this algorithm the network contains nodes and two types of nodes are used for localization: stationary guide node and mobile guide node. The proposed algorithm uses radio frequency to measure the distance between unknown node, mobile guide node, and located node by using two stages: in the first step, both stationary and mobile guide nodes are considered as stabile and do the locating. In the next step, the mobile guide nodes start to move and locate the remaining nodes of unknown position from the first step. To improve the speed of locating for each node in the network state flag of 1 or 0 can be defined. As a consequence, before starting positioning the identifier of guide nodes is one and for the other nodes it is zero. The identifier of located nodes will change from zero to one. In the second stage sensor nodes evaluate their identifier state by receiving signal from mobile stations. If the value of identifier is zero the node will participate in the process of locating; otherwise it would not do anything. The proposed algorithm is based on the assumptions below.

Fixed nodes are self-organized and establish contingency. Three mobile base stations broadcast their position’s information to the sensor node. Mobile base stations are equipped with GPS and radio frequency (RF) transmitter compared to the fixed nodes that are equipped with RF receiver. The mobile station is not restricted to the energy.

##### 3.1. Number of Guide Nodes

The number of nodes in the specified area is important, because if the number of guide nodes is high, it can cause conflict; otherwise locating time will be increased. In order to solve this problem, (1) is used. Considerwhere is the number of nodes, is area, and is the maximum range of node radio communication.

##### 3.2. Distance Measurement

The destination is measured by RSSI which is sent from fixed and mobile guide node. After receiving RF signal by the fixed node, fixed node will measure the received signal strength to measure the distance. where and are, respectively, one-bit transmit energy and one-bit received energy, and are radio signal amplification factor, and are, respectively, the distance between two nodes and the number of transmitted bits, BER denotes bit error rate, and *α* shows the dissipation factor of environment which can be obtained by Table 1.

Distance of two nodes can be calculated by using (2). Hence by using (3) and three points of mobile base station or three distances between fixed located nodes which cooperate in localization of other nodes and other nodes with unknown position, localization can be done. where , , and are locations of mobile stations, is the position of receiver node, and , , and are the distances between the mobile node and the fixed nodes.

##### 3.3. Measurements

Five different kinds of measurement are used to evaluate the performance of localization algorithm.

*(**1) The Average of Positioning Error.* The average difference between estimated location and the exact position of all sensor nodes is specified.where represents the total number of fixed sensor nodes.

*(**2) The Average of Energy Consumption.* It is defined as follows:where illustrates the energy consumption of fixed node .

*(**3) The Average of Throughput.* It is defined as follows: where is the throughput of fixed node .

*(**4) Location Duration.* The average time to locate all network nodes is called execution time. Time unit is considered as second. To find out the average time of a node location the values should be divided into -, where represented the number of guide nodes.

*(**5) Success Rate of the Algorithm*. The success rate is the percentage ratio of successful tests number to the total tests number.

##### 3.4. Base Point Selection

In Figure 1, the unknown node calculates its position based on three fixed or mobile guide nodes, , , and . Unlike similar algorithms three mobile guide nodes are used in localization. The proposed algorithm avoids situations of placing guide nodes on a line or placing at least two guide nodes in the same position during localization.

#### 4. Simulation Results

In this section by using simulation we will describe some of the main concepts of the proposed algorithm such as error location, energy consumption, throughput, location duration, and success rate of the algorithm.

##### 4.1. Simulation Condition

In order to evaluate the effects and efficiency of our proposed algorithm we implement it in MATLAB R2009a. The radio range of nodes is equal to and the number of guide nodes is shown by . The values of and are given as input in the program. 100 nodes are placed randomly within a m^{2} area as shown in Figure 2. The mobile nodes are equipped with GPS, radio frequency, and capability of moving like curve from the middle region. Each fixed node is equipped with radio frequency receiver. The mobile nodes have no limited energy and all fixed sensor nodes need to store their energy. Experiments were performed for different values of and the results are presented in Figures 3–5. The results presented in each case are the mean of 30 repeated experiments. To show the efficiency of the proposed algorithm, we compare it with different algorithms; the results are shown in Figures 3–5. The first algorithm shows the localization with only fixed guide nodes. The second algorithm shows the localization with only three mobile guide nodes and the next two algorithms are Ssu’s and Yu’s methods which are mentioned in [8, 19].

##### 4.2. Simulation Results

In this part the simulation result will be shown.

Random distribution of nodes within a m^{2} area which are located by mobile and fixed guide nodes is shown in Figure 2.

*(**1) Throughput.* The total throughput of the five algorithms is simulated and the results are shown in Figure 3. High performance of the proposed and the first algorithm is clear because they just need three distances to base points. Therefore they are less affected by internal transfer of the package compared to the three other projects.

*(**2) The Average of Energy Consumption*. The main energy consumption is during packet receiving and transmission. The calculations consume less energy which can be ignored. The average energy consumption of the proposed method in comparison to the four other algorithms is shown in Figure 4. The simulation results show that the energy usage in the proposed and the first algorithms is less than the other three, because, in the proposed and the first algorithms, fixed sensor node is required to receive the position which is distributed by three actual based points, while, in the others, fixed nodes consistently receive the massages to calculate station’s locations.

*(**3) The Average of Localization Error.* In all localization algorithms, the sensors position is calculated based on points, received by the packets from mobile and fixed guide nodes. Therefore internal packet transmission is strongly influenced by accurate positioning. Figure 5 shows the average of localization error on different times. Simulation results show that the proposed and the first algorithms are highly efficient compared to the others.

#### 5. Conclusion and Future Works

This paper presents an algorithm with a good performance that locates sensor nodes by using mobile and fixed guide nodes. To evaluate the performance, four algorithms are presented and their performance is compared with the proposed algorithm. The results of simulation indicate that, by increasing the density (number of ), error decreases. The proposed and the first algorithms are similar in throughput, average energy consumption, and average positioning error and much better than the three other algorithms. In terms of location duration the proposed algorithm has better performance than the second algorithm but lower performance in comparison to the first algorithm. The success rate of the proposed algorithm is extremely better compared to the first algorithm. Due to the fairly good performance of the algorithm especially in success rate of locating, it can be used to simulate a network with the real transmission radius, when more information and details of environment are needed. For the future work, by integrating two stages of the proposed method and simultaneously localization of fixed and mobile nodes the location period will greatly reduce. The problem that may likely appear will be the overlap of fixed and mobile guide nodes. In order to solve the problem, fixed guide nodes can be used for locating intermediate nodes and mobile guide nodes can be used for other nodes.

#### Competing Interests

The authors declare that they have no competing interests.