{'fraction_non_alphanumeric': 0.02509977400586623, 'fraction_numerical': 0.012814348223301438, 'mean_word_length': 4.496168076109937, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Multi-Node Localization and Identity Estimation Based on Multi-Beacon Searching Algorithm

The accuracy of multi-nodes localization and identity estimation algorithms directly affected the performance of multi-agent systems like WSN, multi-robot, cellular phone and so on. In this paper, a novel algorithm is introduced in order to achieve high accuracy for multi-nodes localization and identity estimation, this algorithm is named multi-beacon searching algorithm. In this algorithm, the concept of the grid is employed for estimating the location and identity of nodes, in which the environment represented by a grid of reference beacons, for each beacon, light-emitting diode (LED) is used. Whereas, each node in the environment is equipped with four LDR sensors which are used to sense the lighting of LEDs according to a proposed searching algorithm. The localization process achieved based on three proposed algorithms: Firstly, a modified binary search algorithm is utilized to estimate the approximate location of the node by a group of neighbor LEDs. Secondly, the accurate localization algorithm is used to find the accurate location of each node by reducing the number of neighbor LEDs. Finaly, two algorithms are introduced to evaluate the location and identification of each node: the centroid algorithm and the minimum bounded circle algorithm. In the minimum bounded circle algorithm, a new faster algorithm called the maxima boundaries convex hull algorithm for polygon convex hull construction is introduced instead of the Chan's algorithm. Several simulation processes have been implemented for testing the proposed algorithms. The obtained results show that the proposed algorithms have very good performance in estimating the accurate localizations of the nodes.


Introduction
Recently, the rapid development of multi-agent systems such as WSN, multi-robot systems, and cellular phones has led to the development of the localization algorithms. This development plays an influential role in the performance of these systems where the localization accuracy and execution time are the main quality parameters of these algorithms.
Localization is a term that refers to the finding mechanism of objects spatially in its environment, such as in multi-robot systems [22,27]. However, in a WSN, localization is the process of computing the locations of sensor nodes with respect to the WSN environment [7]. The nodes localization systems are categorized into two systems: the single-node system and the multi-node systems. The multi-node system has several superiorities over single-node systems for localizing themselves more efficiently [14], improving the speed of search and performing the exploration missions [18].
The field of indoor multi-nodes localization algorithms has been deeply studied by researchers. These algorithms are categorized according to sensors that are used to estimate the location of the nodes. Many different types of sensors are used to perform this mission such as vision system, laser range finder sensor (LRF), technologies of Bluetooth, radio frequency identification (RFID), ultrasonic range sensor technology, Wi-Fi wireless network, and infrared light emitting diode (IR-LED) detectors. A vision system of position sensing has an influential performance for localizing of multi-nodes and identifying the nodes resided in an indoor environment [11]. However, this method needs a complex software to increase the accuracy and overcoming environment limitation issues. The "time of flight" concept based sensors, such as Ultrasonic [26] and LRF [25] localization systems, are characterized by a simple hardware structure with high localization accuracy. However, these types of sensors are not accurate if they are neighbors for unknown moving objects and it is difficult to identify the nodes. For LRF, a transparent wall technique is used for the indoor environment. Bluetooth [5] and Wi-Fi [8] devices are relatively easy to install to the mobile nodes, but there are problems with accurate localization due to the interference of other signals with them. Many IC tags should be employed for accurate localization by the RFID system. In addition, these tags need for optimal distribution in order to achieve localization tasks [19]. Therefore, this technology requires a notable deal of preparatory work such as building a map of identifiers and RFID tag locations. In addition, RFID is relatively expensive.
Although the IR-LEDs need optimal distribution, the VLC and IR systems are characterized by a fast response, good stability, high information security, and the impact of environmental changes on them are minimal. Due to these advantages, those systems are used in indoor localization of multi-nodes. Almost all the localization applications that employed the IR system depend on the identified artificial tags. These tags are classified into passive and active tags. The passive tags based localization implemented by distributing tags is able to reflect IR signals, so they do not need for power. The IR camera and IR detectors, which are fixed on the nodes, sense the IR signal that emitted by nodes and reflected by tags [21,13]. IR emitter is usually used as an active tag and optimally distributed in the environment. The emitted IR signals are sensed by the IR detectors in order to estimate the locations of nodes [3,10]. In [24], Wang and Takahashi mentioned that the IR system based localization needs a unique ID to encode each tag. This led to limiting the number of nodes that can be localized in the indoor environment. However, the cost is an important limiting factor for extended flexibility. As it is known, most of the multi-node systems, such as robotics, WSN and so on, work in large open areas such as large stores, large museums, stadiums, health institutions, etc. Therefore, they need a large number of tags. As a consequence, there is a great demand for a multi-node localization system that is characterized by a suitable cost for a large number of tags and is able to face the challenges of the complexity of the system.
With the rapid increase of smart technology, the researchers are seeking a sensor that provides precise distance detection taking into account the cost. The features of Light Dependent Resistor (LDR) detectors, such as accuracy, low price, and long lifetime, led us to use this system in localization scenarios. Moreover, there is no overlap problems compared with IR-LED and Laser sources that reduce noise effects.
Many localization techniques have been developed for multi-nodes in indoor environments. Comparisons have been introduced for indoor multi-nodes localization techniques in [4,9,15]. A survey for approaches employed the IR system for node localization is introduced to create an idea for the reader about the contribution made in this research.
The Hagisonic StarGazer localization system is presented in [23] where the overall cost has been evaluated as 1750 $ for an environmental area of about 2000 m 2 . This cost includes the price of passive tags (HLD1-L 4 x 4 grid), tags installation on the ceiling, in addition to the cost of localization sensors. Due to the high cost of localization sensors, this system is unsuitable for the multi-nodes operate together within unknown environment, which need for unique code for each node. This challenge led to increasing the system complexity and cost. However, our proposed system will solve this problem by increasing the number of nodes localized at the same time, reducing the cost as well as avoiding the complexity of the system.
The majority of approaches of indoor localization are employing active tags such as IR-LED for emitting signals, while IR detectors used to receive these signals as IR beacons that contain information about tag only [21]. Their approach includes placing beacons that have known locations in the environment which then is detected by using scanners fixed on the nodes. Sixteen receivers were used for this purpose, they were distributed as a circle covering the 360° range. In addition, the Extended Kalman filter (EKF) has been used for estimating the location of each node. In our approach, four LDR detectors will only be used in order to reduce the cost without losing good accuracy and so there is no need for known the initial position of the nodes.
In [13], Lee and Song employed unique IDs for encoding IR LED as artificial tags for nodes localization. Tags placed on the ceiling in which dividing into zones of tags, for each active node there is a unique identified sector in order to know the node location within the identified zones. At each node, there is a receiver for enabling the estimation of the position of the node during its motion. They introduced an algorithm to include both distance measurement and IR ID information so that the size of the uncertainty can be reduced. However, the starting point must be identified, and unit length is required, while the overlapping cannot be analyzed. Our Proposed system is LEDs that will be distributed on the ground while LDR is fixed on the robot body and close to the LEDs. Thus, there would be a small chance of overlapping. Our proposed system is LEDs will distributing on the ground while LDR is fixed on the robot body and close to the LEDs, so, there is a very low chance of overlapping.
Some researchers employ the receiver as an active tag in localization systems such as Gorostiza et al. [6], and they developed these systems. In these systems, the active tags fixed on the node while the sensors distributed in the environment and received a sinusoidal modulated IR signal transmitted by the node. One emitter set is placed on each node while there is one photo-detector for each receiver fixed in the environment (ceiling). Range measurement based on phase shift has been used to measure different distances, and then hyperbolic trilateration used to estimating node location. Using these systems will avoid the challenges of ID coding. Nevertheless, it requires a controller that sends back the information of the estimated position of nodes in the environment to each node. This process will increase the complexity of the system, furthermore cost and time, but the proposed system introduces a method for evaluating node position locally by each node, so, there is no need for an additional controller for retransmitting the estimated location of the node. This paper aims at introducing a multi-node localization and identification system based on an LED-LDR system which is supported by a multi-node searching algorithm. This system achieves node location estimation and node identification with respect to a grid of reference beacons in the indoor environment. A grid of LEDs distributed uniformly in the global indoor environment represents these beacons. Four LDR sensors are used to sense the lighting LEDs according to a new proposed searching algorithm equip each node. During the scan process, the LDR sensors for each node collect its reading and send the information to the computer transmitter/receiver board as shown in Figure 1. For example, using an NRF24L01 transmitter/receiver unit to wirelessly transfer data between the computer in one side and the node on the other side. The localization process is achieved in three stages. In the first one, the modified binary search algorithm is used to estimate the approximate location of the node based on a group of neighbor LEDs. In the second stage, an accurate location of each node is addressed through a new proposed searching algorithm. This algorithm is used to estimate a more accurate location of the node by reducing the number of neighbor LEDs of the node. In the last stage, two algorithms are used to evaluate the location and identification of the nodes: the centroid approach and the minimum bounded circle algorithm. In the minimum bounded circle algorithm, Chan's algorithm is used to draw a circle containing all the set points, which represent a convex hull polygon. In addition, a new proposed algorithm to enhance the execution time has replaced Chan's algorithm.

The Multi-Beacon Searching Algorithm
In this section, the background of the proposed multinode localization system and its modification will be explained in detail. In addition, the hardware structure of the proposed LED-LDR system is described in detail. As mentioned in the introduction, the overall implementation of the proposed system is divided into three stages, so, the description of these stages is shown in the following subsections.
The proposed algorithms discussed in detail in Section 2. Section 3 describes the simulation results of the Multi-Beacon Searching Algorithm. Finally, Section 4 draws the conclusions of the paper.

Approximate Localization Algorithm
This section introduces the first stage of the proposed system. The approximated localized algorithm is used to estimate the approximate location of the node by a group of neighbor LEDs. The localization process depends on using a grid of LEDs that are distributed uniformly in the known environment as shown in Figure 2. The absolute location of each LED is computed according to its address in the LED grid. The LDR sensors are placed on the nodes to sense the status of LEDs in the environment and provide the approximate location of the nodes. Actually, this algorithm depends on turning on and off the LEDs sequentially according to the modified binary search algorithm. This algorithm is a two-dimensional binary search algorithm that replaces the decimal numbers by the digital data representing the status of lighting LEDs.

Binary Search Algorithm
The binary search algorithm is a simple logarithmic algorithm used with sorted numbers [20]. The array of numbers searched is divided into half repeatedly, and the search value is checked in each step. If the searched value is less than the middle element in the array, then this array reduced to the lower half elsewhere to the upper half. This process is repeated until the searched value found or the array is empty. Figure 3 shows the flowchart of the binary search algorithm.

Modified Binary Search Algorithm
The last subsection shows that the binary search algorithm is designed to search for one number among several numbers arranged in a one-dimensional array. In our system, there is more than one value that should be searched, which represented by the LDR sensors, and instead of a one-dimensional array of numbers, the system has a two-dimensional array of logical values that represent the status of the LEDs. Therefore, the binary search algorithm must be modified to be suitable for use in the proposed system. In this section, two localization algorithms have been suggested: single node and multi-node modified binary search algorithms. Both algorithms are used to estimate the approximate location of the nodes depending on the two-dimensional binary searching in the LEDs grid.

A. Single node modified binary search algorithm
This algorithm is used to estimate the approximate location of a single node by labeling the entire neighbor LEDs to the node location according to the following steps: Step 1: Estimate the approximate columns of the neighbor LEDs.
In this step, the readings of the LDR sensors are used to distinguish the neighbor columns to the node location. The modified binary search algorithm was implemented on the columns of the LED grid. Firstly, half of these columns are turned on and the rest are turned off, then the statuses of the LDR sensors are checked. Figure 4 shows several cases that may be obtained depending on the node location as described below. 1 All of the LDR sensors may sense the light of LEDs as shown in Figure 4(a). This case occurs when the position of node is on the right part of the environment. This means that the left part of the environment has no node. In this case, the LEDs located in the right half of the right part should be turned on and the rest should be turned off. This process is repeated until one of the following cases occurs. 2 The single LDR sensor may senses the light of LEDs as shown in Figure 4(b). Let the distance between each two neighbor LEDs is D pixels, the distance between each two-neighbor LDR sensors is R pixels and the sensing range of the LDR sensor is S pixels. In this case, the worst probability is shown in Figures 4(a)-(b). The value of Lt is computed as L t = N+ S, (1) where N is the distance between the middle lighted column and the left far LDR sensor. The number of left approximate columns is computed from the following equation: The value of R t , shown in Figure 4(a), is computed as where M is the distance between the middle lighted column and the right far LDR sensor. Therefore, the number of right approximate columns is computed as: (4) 3 Two LDR sensors may sense the light of the LEDs as shown in Figure 4(c). The worst-case for node location is to have two LDR sensors sensing an LED light is in Figures 5(c)-(d). The process of the approximation columns estimation of the neighbor LEDs is similar to the procedures that are used to estimate the location of the single LDR sensor as described above.  The worst probability for node location dependent on the sensitivity of the LDR sensors. (a, b) single LDR sensing (c, d) two LDRs sensing (e, f ) three LDRs sensing 4 Three LDR sensors may sense the light of LEDs as shown in Figure 4(d). The worst probability for node location to make three LDR sensors sense the LED light as shown in Figures 5(e)-(f ). The same procedures that are described in Step 2 can be used to estimate the location of the node. 5 All of the LDR sensors may not sense the light of the LEDs. This case occurs when the node position is on the left part of the environment. This means that the right part of the environment has no node. In this case, the LED columns of the right half of the left part should be turned on and the rest should be turned off.
This process is repeated until one of the last three cases occurs.
Step 2: Estimate the approximate rows of the neighbor LEDs.
In this step, the readings of the LDR sensors are used to distinguish the neighbor rows to the node location. The same procedures in the last step of implementing the modified binary search algorithm on the columns are repeated in this case. In the beginning, half of these rows are turned on and the others are turned off, then the status of the LDR sensors is checked. Figure 6 shows the cases which may be obtained from the rows configuration depending on the node location. 1 Figure 6(a), shows the case where all of the LDR sensors sense the light of LEDs. This case occurs when the node position is on the upper part of the environment. This means that the lower part of the environment has no node. In this case, the LED rows of the upper half of the upper part are turned on and the rest are turned off. This process is repeated until one of the following cases occurs.   (5) where B is the distance between the middle lighted row and the lower far LDR sensor. The number of lower approximate rows is given by:

6)
The value of U p is computed from the following equation: U p = C + S, (7) where C is the distance between the middle lighted row and the upper far LDR sensor. The number of upper approximate columns is given by: Step 2 can be used in this case to estimate the location of the node. 5 All of the LDR sensors may not sense the light of the LEDs. This case occurs when the node position is at the lower part of the environment. This means that the upper part of the environment has no node. In this case, the LED rows of the upper half of the lower part are turned on and the rest are turned off. This process is repeated until one of the last three cases occurs.

B. Multi-node modified binary search algorithm
This algorithm is used to estimate the approximate location of multi-node by labelling all the neighbor LEDs to the nodes location according to the following steps.
Step 1: Estimate the approximate columns for each node.
In this step, the readings of the LDR sensors are used to distinguish the neighbor columns to each node location.
The modified binary search algorithm is implemented on the columns of the LED grid. In the beginning, half of these columns are turned on and the others are turned off then the status of the LDR sensors is checked. Figure 8 shows several cases that may be obtained depending on the nodes locations. 1 All of the LDR sensors of all the nodes may sense the light of the LEDs. This case occurs when all the nodes positions are on the right part of the environment. This means that the left part of the environment has no nodes. In this case, the LED columns of the right half of the right part are turned on and the rest are turned off. This process is repeated until one of the following cases occurs. 2 One, two or three LDR sensors for one node only sense the light of the LEDs and the other nodes locate in left or right side of the environment. The process of the approximate columns estimation of the neighbor LEDs is treated as in the case of a single node environment (Figures 4-5). Point one, two or both are repeated for implementing the modified binary search algorithm depending on the locations of the other nodes (Figure 8(a)). 3 The process of the approximate columns estimation of the neighbor LEDs is treated as in the case of a single node environment (Figures 4-5) when all the nodes with sensing LDR sensors less than four have the same number of these sensing LDR sensors. 4 More than one node has a different number of sensing LDR sensors less than four as shown in Fig-ures 8-9. The process of the approximate columns estimation of the neighbor LEDs is implemented as follows: _ A single LDR sensor on node 1 and two LDR sensors on node 2 sense the light: the worst case for node 1 location is shown in Figure 9(b). The value of L t1 is computed as L t1 = N 1 + S, (9) where N 1 is the distance between the middle lighted column and the left far LDR sensor on node 1. The number of left approximate columns is given by: The worst probability for node 2 location is shown in Figure 8(a). The value of R t2 is computed as R t2 = M 2 + S, (11) where M 2 is the distance between the middle column and the right far LDR sensor on node 2. The number of right approximate columns is: The nodes locations cases on the columns. (a) Different sensing LDRs on four nodes (b) one and two sensing LDRs on node 1 and 2 (c) one and three sensing LDRs on node 1 and 2 (d) two and three sensing LDRs on node 1 and 2 Rcount2 = R t2 / D. (12) _ A single LDR sensor on node 1 and three LDR sensors on node 2 to sense the LEDs light: The worst probability for node 1 and node 2 locations are shown in Figures 9(d)-(c). The same Equations (9)- (12) can be used to estimate the location. _ Two LDR sensors on node 1 and three LDR sensors on node 2 to sense the LEDs light: The worst probability for node 1 and node 2 locations are shown in Figures 9(e)-(f ). The same Equations (9)-(12) can be used to estimate the location of the nodes. The worst probability for node 1 and 2 locations dependent on the sensitivity of the LDR sensors. (a, b) one and two sensing LDRs (c, d) one and three sensing LDRs (e, f ) two and three sensing LDRs for nodes 1 and 2 Step 2: Estimate the approximate node rows. 1 In this step, the readings of the LDR sensors are used to distinguish the neighbor rows to each node location. The modified binary search algorithm implemented on the rows of the LED grid. At first, half of these rows are turned on and the others are turned off then the status of the LDR sensors is checked. Figure  10 shows several cases may be obtained depending on the locations of the nodes. 2 All of the LDR sensors of all the nodes may sense the light of the LEDs. This case occurs when all the nodes positions are on the upper part of the environment. This means that the lower part of the environment has no nodes. In this case, the LED rows of the upper half of the upper part are turned on and the rest are turned off. This process is repeated until one of the following cases occurs. 3 One, two or three LDR sensors for one node only sense the light of the LEDs and the other nodes located in the upper or lower side of the environment. The process of the approximate rows estimation of the neighbor LEDs is treated as in the case of a single node environment (Figures 6-7). Point one, two or both are repeated for implementing the modified binary search algorithm depending on the other nodes locations (Figure 10(a)). The process of the approximate rows estimation of the neighbor LEDs is treated as in the case of a single node environment (Figures 6-7) when all the nodes with sensing LDR sensors less than four have the same number of these sensing LDR sensors. 5 More than one node has less than four LDR sensors that sense the light as shown in Figures 10-11. The process for estimating the approximate rows of the neighbor LEDs is implemented as follows: A more than one node has less than four LDR sensors that sensing the light as shown in Figures 10-11. The process of the approximate rows estimation of the neighbor LEDs is implemented as follows: _ A single LDR sensor on node 1 and two LDR sensors on node 2 to sense the LEDs light: The worst probability for node 1 location is shown in Figure 11(b). The value of L o1 is computed as: (13) where B 1 is the distance between the middle lighted row and the lower far LDR sensor on node 1. The number of lower approximate rows is Locount1 = L O1 / D. (14) The worst probability for node 2 location is shown in Figure 10(a). The value of U p2 is computed as: U p2 = C 2 + S, (15) where C 2 is the distance between the middle lighted row and the upper far LDR sensor on node 2. The number of upper approximate rows is Upcount2 = U p2 / D. (16) _ A single LDR sensor on node 1 and three LDR sensors on node 2 to sense the LEDs light: The worst probability for node 1 and node 2 locations are shown in Figures 11(d)-(c), respectively. The same Equations (13)- (16) can be used in this case to estimate the location of the nodes. _ Two LDR sensors on node 1 and three LDR sensors on node 2 sense the LEDs light: The worst probability for node 1 and node 2 locations are shown in Figures 11(f )-(e) respectively. The same Equations (13)- (16) can be used in this case to estimate the location of the nodes. _ None of the LDR sensors of all the nodes sense the light of the LEDs. This case occurs when all the nodes positions are in the lower part of the environment. This means that the upper part of the environment has no nodes. In this case, the LED rows of the upper half of the lower part are turned on and the rest are turned off. This process is repeated until one of the above cases occur.

Accurate Localization Algorithm
This section introduces the proposed second stage that is used to estimate the accurate location of the node by a group of neighbor LEDs. In the previous section, the localization process depends on using the approximate location of the nodes (grid of LEDs as shown in Figure 12(a). In this section, the linear search algorithm is used to estimate the accurate lo- The worst probability for node 1 and 2 locations dependent on the sensitivity of the LDR sensors. (a, b) 1 and 2 sensing LDRs (c, d) 1 and 3 sensing LDRs (e,f ) 2 and 3 sensing LDRs for nodes 1 and 2 cation of the node. This algorithm has superiority over the previous algorithm because this algorithm needs less computation when working with small grid of the LEDs. The steps of estimating the accurate location of the nodes are described as follows: Step 1: Reducing the number of the columns of the approximated LED grid.
The worst case probability of estimating the approximated LED grid gives some columns outside of the node sensing range as shown in Figure 11.b. Since the distance between any two neighbor LDR sensors is R, then the distance between the diagonal LDR is √2*R (worst case to compute the node sensing range). The worst case for the node actual sensing range is computed as: The number of the actual sensing columns for each node is given by: The number of the approximate columns for the node sensing range is given by: A ccount = L count + R count . (19) D column = A ccount -C acount , (20) where D column is the number of the columns that must be disable (disable columns) to give an accurate number of columns to the node sensing range. The linear search algorithm is used to element the disable columns according to the following procedures: 1 Turning on the LEDs in the left column of the approximate columns (Figure 12(c), then check the status of the node LDR sensors.
2 Repeat step one for other columns until the node LDRs sense the LEDs light. 3 The left checked columns must be removed from the approximate columns. 4 The difference between the number of the removed and the disabled columns must be removed from the right side of the approximate columns.
Step 2: Reducing the number of the rows of the approximated LED grid.
The worst case probability of estimating the approximated LED grid gives some rows outside of the node sensing range as shown in Figure 12(b). Since the distance between the diagonal LDR is √2*R, then where R acount is the number of the actual sensing rows for each node.
A rcount = U pcount + L ocount , (22) where A rcount is the approximate rows number for the node sensing range.

Figure 12
The computing of the node accurate location. (a) The approximate LED grid (b) Removing the non-sensed rows and columns (c) Removing the non-sensed columns (d) Removing the non-sensed rows (e, f and g) Eliminate the non-sensed LEDs (h) The accurate LED grid where D row is the number of the rows that must be disable (disable rows) to give an accurate number of rows to the node sensing range. The linear search algorithm is used to element the disable rows according to the following procedures: Step 3: Enhancement the accurate LED grid by removing the non-sensed LEDs. A modified linear search algorithm is suggested here to complete the accurate LED grid by removing the non-sensed LEDs. The linear search algorithm is modified to work with two dimensional binary numbers that are represented by the status of the LEDs. The LED grid is divided into four quarters and the following procedures are used to treat with all of these quarters: 1 Start from the outer column to inner one for each quarter of the LED grid.
2 Start from inner LED to an outer one in current column as in Figure 12(e).
3 Turn on the LED and check the status of the node LDR sensors. 4 Repeat linearly the third step for other upper LEDs until the node LDRs not sense the LEDs light ( Figure 12(f )). 5 The lower checked LEDs must be fixed into the accurate LED grid and the other are removed. 6 Move one column and repeat the last three points as shown in Figure 12(g). 7 The procedure is repeated until finalizing the quarters of the LED grid (Figure 12(h)). The procedure repeating until finalizing the quarters of the LED grid ( Figure 12(h)).

Multi-Node Localization Algorithm
This section explains two algorithms: Minimum Bounded Circle of 2D Convex Hull and Centroid al-gorithms both are used to estimate the location and identification of the multi-nodes using the accurate LED grid which represent the LEDs within the sensing range of the nodes. The identification process is simply solved since each node sends its ID with information collected by its LDR sensors. The localization process of the multi-node system is similar to the case of a single node since each node is manipulated alone. The Minimum Bounded Circle of 2D Convex Hull algorithm localizes any node by representing the LED grid as a polygon convex hull and then computing the circle with minimum boundary. The center of this circle represents the node location. In centroid approach, the LED grid is treated as a polygon and the centroid (the geometric center) is the arithmetic mean position of all the points in the polygon.

Minimum Bounded Circle of the 2D Convex Hull Algorithm
This algorithm is used to compute the polygon convex hull from a set of points that is used to obtain a minimum bounded circle. The convex hull is obtained by choosing the smallest subset of the points which does not include any of the inner set points. Chan's algorithm is one of the best known algorithms used to build the convex hull of set points in a 2D or 3D environment [2]. Chan's algorithm is based on using both the Jarvis March algorithms and Graham's scan.
In this section, a new algorithm "maxima boundaries convex hull algorithm" for polygon convex hull construction is introduced instead of Chan's algorithm.

A. Maxima Boundaries Convex Hull Algorithm
This algorithm produces a new method to construct a polygon convex hull from a set of point represented by the LED grid. The process of the construction depends on scanning 2D array with the coordinate axis of the entire LED grid where the coordinates with maximum and minimum values are chosen to build the convex hull. The steps of implementing this algorithm are as follows: 1 Store the coordinate axis of the LED grid (red LED in Figure 13(a)) in two dimensional array, the first index of each element in the array represents the LED number and the second one is used to store the x and y coordinate axis of each LED.

Simulation Results
The multi-beacon searching algorithm is simulated by using the Visual Basic dot Net software. Simulations are executed over 100 different topologies, different LED grid and different number of nodes. The nodes are randomly placed in the environment with 16×16, 32×32 and 64×64 LED grid. For each topology, the LDRs sensing range is varied in order to study the full detection range and the percentage of the error that occurred during the localization process. The system parameters that used in this simulation are: 1 The environment size n: the number of LEDs in the environment (n*n LEDs). Changing the network size will indirectly change the node localization accuracy.
2 Maximum sensing range of LDR sensors S: this parameter affects the full detection range and the accuracy in the localization process. 3 Number of LDR sensors m: this parameter affects the time of execution.

Figure 13
The steps of applying the maxima boundaries convex hull algorithm on the accurate location LED grid (a) The accurate location LED grid (b) Create the elements of the boundary convex hull array (c) Improved the elements of the boundary convex hull array

Figure 14
The using of the minimum bounded circle algorithm with LDRs have 50 Pixels sensing range (a) The 16´16 LED grid (b) The 32´32 LED grid At first, the effect of changing the LDRs sensing range on the average of the error that occurs in the localization process is illustrated using the minimum bounded algorithm. Figure 14 shows the simulation executed on 16×16 and 32×32 LED grid with LDR sensors have 50 Pixels sensing range. Figure 15 demonstrates the comparison between the average of the detecting neighbor LEDs and the sensing range in 16×16, 32×32 and 64×64 LED grid.
The second simulation is used to study the impact of changing the sensing range of the LDR sensors on the average of the error occurs in the node localization using the centroid algorithm. Figure 16 shows the simulation executed on all the LED grid environment with LDR sensors have 50 Pixels sensing range. Figure 17 demonstrates the comparison between the average of the detecting neighbor LEDs and the sensing range of the LDR sensors in (16×16), (32×32) and (64×64) LED grid. The results in the last two simulations demonstrate that when the sensing range is increased, the average error will be decreased and the best case happens when the environment has (64×64) LEDs. The

Figure 15
A comparison between the average of the error and the sensing range of the LDR sensors using centroid localization algorithm in (16×16), (32×32) and (64×64) LED grid environment

Figure 16
The applying of the centroid algorithm with LDR sensors have 50 Pixels sensing range (a) The 16×16 LED grid (b) The 32×32 LED grid centroid approach has more accurate reading than the minimum bounded circle algorithm.

Figure 17
A comparison between the average of the error and the sensing range of the LDR sensors using the centroid localization algorithm in (16×16), (32×32) and (64×64) LED grid A further example is intended to show the effect of changing the LDRs sensing range on the percentage of the full detecting range. Figure 18 shows the simulation executed on 32×32 LEDs environment with LDR sensors have 40, 60, 80 and 100 Pixels sensing range. Figure 19 shows the comparison between the percentage of the full detecting range of the neighbor LEDs and the sensing range of the LDR sensors in (16×16), (32×32) and (64×64) LED grid environment.  The result shows that when the sensing range is increased, then the percentage of the full detecting range of the neighbor LEDs will increased too. The full detecting range of the neighbor LEDs is 70 Pixels for (16×16) LEDs, 30 Pixels for (32×32) LEDs and 20 Pixels for (32×32) LEDs. The best case for the full detecting range of the neighbor LEDs occurs when the environment has (64×64) LEDs.
The last simulation results are used to study the effect of changing the sensing range of the LDR sensors on the execution time for the localization process in different sizes of LED grid environment and different number of nodes for each simulation process. Figure 20 shows the simulation executed on 64×64 LED grid environment with one, two, three and four nodes localization process.  The simulation shows the execution speed with different cases for the nodes number in 64×64 LED grid environment (a) one node (a) two nodes (a) three nodes (a) four nodes

Figure 21
A comparison between the average of the execution time for the one node localization process and the sensing range of the LDR sensors in all the LED grid environment  The result shows that, as the sensing range is increased, the average of execution time is decreased for all types of LED grid environment and in one, two, three and four nodes localization process. When the number of the neighbor LEDs for each node is increased, the sensing range is increased and this leads to increasing the time of searching by the modified bi-

Figure 24
A comparison between the average of the execution time for the four nodes localization process and the sensing range of the LDR sensors in (16×16), (32×32) and (64×64) LED grid environment nary search algorithm. The best case of the execution time of the localization process occurs when the environment has 16×16 LED grid, but this type of environment produces a less accuracy in the localization process. Figures 21-24 show that the one node localization has less execution time since in this process the number of the neighbor LEDs of the nodes in the localization process are reduced.

Conclusion
In this paper, a new multi-beacon searching algorithm for multi-node localization and identification has been introduced. This algorithm depends on searching in two-dimensional LED grid by using LDR sensors placed on nodes. The collected information by LDR has been used for the localization process based on either the minimum bounded circle or the centroid algorithms.
The proposed multi-node localization system has a low cost. It only needs LEDs and LDR sensors for the localization process while the problem of a limited number of nodes has been solved because of no need for node ID coding. Simulation results show that when the sensing range is incremented, the average of error in the localization process will be decreased. The best case happens when the environment has (64×64) LED grid for all types of the environment (16×16, 32×32 and 64×64 LED grid). In addition, it is observed that the centroid approach has more accurate reading than the minimum bounded circle algorithm for both the value of the sensing range and all the types of the environment.
The full detecting range of the neighbor LEDs is a significant factor since it indicates the LDR sensing range that makes the LED grid always visible by the LDR sensors. From the simulation results, it is found that as the LDR sensing range is increased, the percentage of the full detecting range of the neighbor LEDs will be increased too. The full detecting range of the neighbor LEDs is 70 Pixels for (16×16) LED grid, 30 Pixels for (32×32) LED grid and 20 Pixels for (32×32) LED grid. The best case for the full detecting range of the neighbor LEDs occurs when the environment has (64×64) LED grid.
The execution time of the node localization is an important factor because it shows the validation of the proposed algorithms for localization in a dynamic environment. The simulation results show that as the sensing range of the LDR sensors is increased, the average of execution time is decreased for all types of the LED grid of one, two, three and four nodes localization process. When the number of the neighbor LEDs for each node is increased, the sensing range will be increased and the time of searching by the modified binary search algorithm is increased, too. The best case of the execution time of the localization process occurs when the environment has 16×16 LED grid, but this type of environment produces less accuracy in the localization process. In addition, the one node localization has less execution time since in this process the number of the neighbor LEDs of the nodes is reduced.