A localization and deployment model for wireless sensor networks using arithmetic optimization algorithm

With the advancement of sensor technologies, Wireless Sensor Networks (WSN) are envisioning a rich variety of promising services in many fields. WSN is formed by the deployment of sensor nodes in the regions of interest using a deterministic or random deployment strategy. The random deployment strategy is more suitable in large monitoring areas and harsh environments. But, in this type of deployment, coverage holes and disconnected networks can exist. Important events may get unnoticed reducing the reliability of the networks. Since the locations of nodes are unknown in a randomly deployed WSN, it is difficult to locate the holes. For this, we are proposing a localization and deployment model. The localization algorithm uses Arithmetic Optimization Algorithm (AOA) and the results of this algorithm are further used to develop a deployment model to achieve a completely connected network. This algorithm is tested in various fields. The algorithm is able to localize nodes accurately and identify the coverage holes with an error rate of less than 0.27% when the Average Localization Error (ALE) is within 5m.


Introduction
Wireless Sensor Networks (WSN) have gained popularity in recent years because of their utilization in numerous monitoring and control applications. These are simple networks formed by a group of sensor nodes that communicate with each other through wireless channels [1][2][3].
WSNs are used in various applications such as oil and gas explorations, intrusion detection, military surveillance, forest fire monitoring, precision agriculture, and road traffic tracking [4][5][6]. The deployment strategy of sensor nodes varies depending on the application. This can be broadly classified as deterministic deployment and random deployment [7]. The deterministic deployment is more suitable for friendly environments with a limited sensor area. But, in applications like oil and gas explorations, military surveillance, natural disasters, forest fire monitoring, sensor nodes need to be deployed in large areas [8]. Sometimes, the region of deployment is harsh and unreachable. In such cases, manual placement of nodes in fixed locations is impractical [9]. Hence, random deployment of sensor nodes is carried out in the required fields of interest using an aerial vehicle. But, in this type of deployment, there is no guarantee of complete coverage and connectivity. Sensor nodes may cluster in some regions leaving out coverage holes and disconnected networks in other regions [10]. These coverage holes and disconnected networks result in missing out on important events and hence reduces the quality of the network [11]. Coverage holes and disconnected networks can also exist because of the presence of obstacles, energy dissipation of nodes in certain regions, radio signal attenuation and jamming [12]. The operator needs to know about such conditions to take further action. Many solutions are developed for this purpose. To address the problem of coverage holes in WSN with static sensor nodes, solutions based on the properties of the Delaunay triangle, Hamilton cycle, perimeter coverage of sensing range, etc are reported [13][14][15].
The existing deployment algorithms assume that sensor nodes are aware of their locations [16]. But, in reality, as sensor nodes are randomly deployed, they are unaware of their locations. Attaching every sensor node with positioning devices such as Global Positioning System (GPS) receivers is not possible because of increased cost, higher energy consumption and lower accuracy due to shadowing [17]. Hence, to estimate the locations of sensor nodes in random deployment, localization algorithms are used [18]. But, the locations obtained from localization algorithms are only estimated locations with errors [19]. These errors impact the efficiency of the deployment algorithms. To improve localization accuracy, we have reported an Arithmetic Optimization Algorithm based Localization (AOAL) for the localization of sensor nodes with minimal errors. The localization problem is formed as an optimization problem and solved using Arithmetic Optimization Algorithm (AOA) [20]. To the best of our knowledge, AOA has been utilized for the first time to solve the problem of localization. Also, the distance measurement among nodes is enhanced by utilizing the communication radius of nodes. We have observed improved localization results compared to other algorithms. Further, we have proposed a deployment model called Coverage Hole Discovery (CHD) for static nodes using the localization results of the AOAL algorithm. In this deployment method, sensor nodes use the information collected for the localization process such as the neighbor list and their estimated locations to identify the coverage holes in a distributed manner. The main contributions of this paper are highlighted as follows: • A novel AOAL algorithm for the localization of sensor nodes using connectivity information. • A deployment model utilizing the information collected for localization purpose to achieve a completely connected network. • Analysis of the impact of localization errors on the developed deployment algorithm. • Comparison of the reported method along with different localization algorithms.
The rest of the paper is organized as follows. In Sect. 2, the related localization and deployment methods are reviewed. The network model is discussed in Sect. 3 and the developed localization and deployment model is elaborated in Sect. 4. Simulation results are discussed in Sect. 5. Finally, Sect. 6 provides the conclusion and proposed future work.

Related works
The deployment strategy determines the reliability of the WSN in terms of its ability to monitor, collect and transmit the required data. Researchers have reported different deployment methods to enhance the performance of the WSN in various applications. Various deterministic deployment plans are reported in [21][22][23][24][25] for the applications of precision agriculture, smart grid, indoor environments, structural health monitoring systems, etc. Deterministic deployment methods offer optimum network configuration, but they are more suitable for small scale WSN. Also, this type of deployment is impractical and impossible in large scale WSN and in inaccessible and harsh regions of interest. Generally, in such conditions, random deployment is the only available option. [26] reported a solution to the WSN deployment problem by hybridizing two meta-heuristics, namely the Bees algorithm and the Grasshopper optimization algorithm. Here, the strength of Grasshopper optimization is used to enhance the exploitation phase of the Bees algorithm. [27] reported a sensor deployment technique based on the space between the sensor node and its neighboring sensors to improve the coverage area after a random deployment. This method capitalizes on the coverage of the detected area by forcing the sensor to change its position toward the area with a lower sensor density. But, these approaches are not relevant for static sensors which are unable to change their initial positions.
However, static sensors are widely used in real life network applications to reduce costs and save energy [28]. To identify coverage holes after random deployment in a static WSN, [15] reported a method in which each sensor node determines if every segment of its sensing perimeter is covered by its neighbors. This method assumes the locations and sensing neighbors are known to the nodes. The algorithm is analyzed in 2D square fields. [13] reported a coverage hole detection method based on the properties of empty circles. Empty circles are the circumcircle of the Delaunay triangle. Coverage holes are identified by comparing the radius of the empty circle with the radius of the sensing range. [14] reported a distributed algorithm with only connectivity information to detect coverage holes in a static WSN. Here, a neighbor graph is constructed based on the neighbor information. Then, each node determines whether it can be a hole boundary or not by checking for the existence of the Hamilton cycle in its neighbor graph. The results are analyzed in 2D square fields.
Most of the coverage hole discovery algorithms for static WSN use location and neighbor node information. But, in random deployment, the locations of nodes are unknown. Localization algorithms are developed for this purpose. These algorithms use few location known reference nodes and localize other nodes with reference to these nodes. In recent years, various localization algorithms are developed considering the practical challenges of the deployment environment such as 3D fields, anisotropy, effects of obstacles on the distance measurements, etc. [29] reported a localization algorithm using augmented Lagrangian matrix to fill and reconstruct the complete Euclidean distance matrix and establish a complete mathematical model. Another localization algorithm called SL-Free localization is reported in [30]. This method consists of three steps namely relative localization, geographical distances evaluation and the fine localization for the accurate positioning of nodes. [31] reported MDS-MAP(D) positioning algorithm based on steepest descent optimization method. A range free localization algorithm based on Harris Hawks optimization method is reported in [32]. A multihop range-free localization method for anisotropic networks is reported in [33].
Here the distance estimation between sensor and reference nodes is improved using a distributed pattern-driven scheme. [17] reported an adaptive flower pollination algorithm with enhanced exploration and exploitation capabilities for the localization of sensor nodes in WSN. [34] reported another localization algorithm using the mean-shift clustering method for outlier detection in a shadowed environment.
In this paper, we use a simple and straightforward optimization algorithm called AOA for the localization of sensor nodes along with a novel distance estimation technique utilizing the communication range of nodes to improve the localization accuracy of the nodes. The results are further used to develop a deployment method to achieve a connected network.

Network model
A WSN of N sensor nodes is considered to be deployed randomly in the required field of interest. Let R be a small fraction of sensor nodes that are attached with GPS receivers. These nodes are aware of their locations and act as reference nodes in localization algorithms. After deployment, nodes communicate with other nodes located in their communication region and form an adhoc network.
The communication range of nodes is defined using log normal path loss model [18]. Let (x i , y i ) be the location, CR Ni be the communication range and S Ni be the sensing range of node N i . The communication range of a node can be obtained as, where P t is the transmitted power, P th is the minimum threshold receiver power required by nodes, and is the path loss factor. The nodes in the network start monitoring the events occurring in their sensing area and report them to the network operator through multihop communication.

Sensing model
The sensing area of a sensor node N i is the area in which N i can detect the occurrence of events. In practice, because of environmental factors, the sensing area of a (1) node is of irregular shape. We have defined the sensing range S Ni , as the lower bound of the irregular sensing area of nodes [13]. Here, all the events occurring within the distance S Ni from node N i are determined with probability 1 [15]. We have assumed CR Ni ≥ 2 × S Ni .
Heterogeneity The nodes are assumed to be heterogeneous with different transmission powers and sensing ranges. This means, CR Ni and CR Nj need not be same for any i, j;i ≠ j.
Problem description When the sensors are deployed randomly in hostile target fields, nodes may cluster in some regions and leave holes in other regions. Even if care is taken to deploy nodes uniformly, a coverage hole can still appear because nodes can be destroyed, or the signal may be jammed. The holes can cause network disconnection. Important events may not get detected and thereby reducing the reliability of the networks. Therefore, it is important to detect and heal the holes in the network. Figure 1 shows few examples of the coverage holes.
In a randomly deployed network, nodes collect information from neighbors and localize themselves. The nodes are localized with respect to the locations of reference nodes. When they observe any event, they report it to the operator along with location information. Accurate location of nodes is important to identify the location of occurrence of events and to take action on them. This location information is also important to identify coverage holes and disconnected networks in a randomly deployed network. Hence, we have reported a method where nodes can localize themselves in a distributed manner and then identify the holes by themselves and report them to the operator.

Details of the localization and deployment plan
To overcome the above mentioned challenges, in this section, a new localization and deployment model is developed to achieve a completely connected network. Here, initially, nodes are deployed randomly. Then, nodes are localized by estimating their distance from reference nodes using the sum of communication ranges in the shortest path and evaluating the locations using AOA. Further, nodes uncover the coverage holes and disconnected networks by analyzing the distribution of neighbor nodes around them. The steps are described here.

Initial deployment
WSN is formed by the random deployment of sensor and reference nodes. The node density should be selected carefully to achieve the required level of coverage. As discussed in [35], the required node density to achieve k-coverage is given in Eq. (1).
where, r 0 = S min ∕1.066 . S min is the minimum sensing radius among the heterogeneous set of nodes. All the nodes are initialized as non-Border with a parameter Border set as 0.

Localization of nodes
After the initial deployment, nodes localize themselves using the AOAL method. The initial step is similar to hop based algorithm, but the hop counts are replaced by communication ranges. This change helps in overcoming the impact of heterogeneity on distance estimations. Here, every reference node broadcasts the location information (x, y) and communication range CR to the neighbor nodes.
The neighbor nodes store this information, add their CR value to the received CR. If this sum of CR is less than a predefined CR threshold , nodes broadcast them along with location information of reference nodes. The CR threshold helps to identify only the closer reference nodes, thus reducing the impact of irregular bent paths on distance estimations. After receiving this information, neighbor nodes verify if the obtained reference node information is already stored in their neighbor information. If it is a new node information, the neighbor information is updated with the received reference node location and sum of CR.
If the obtained node information is already stored, the received sum of CR is compared with the stored value and (2) node density = k 0.422 × r 0 3 the minimum among these two CR values is saved with location information. At the end of this step, every node will have location information of reference nodes and the corresponding minimum value of the sum of CR from reference node to itself.
For example, consider a WSN shown in Fig. 2. Here, neighbor information stored in N1 is: After this, reference nodes in the network measure the Average Communication Distance (ACD) as a ratio of the distance between reference nodes and the sum of CR between them. ACD for a reference node R 1 is defined as where d R1Ri is the distance between two nodes R1 and Ri.
Reference nodes broadcast the measured ACD to other nodes. Sensor nodes estimate the distance to reference nodes as the product of received ACD and the sum of communication ranges CR. The distance between sensor node Ni and reference node Rj is measured as, The obtained distances are only estimated values affected by errors due to irregularities in the field. Next, the location estimation problem is formulated as an optimization problem and solved using these distance measurements.
The optimization problem: ∀i, 1 ≤ i ≤ N , find location estimation (x i ,ỹ i ) as a point in the field such that the distance from (x i ,ỹ i ) to every reference node j ∈ NSET i is equal to d ij . Or equivalently, The defined localization problem is solved using AOA. AOA is a population-based algorithm consisting of exploration and exploitation phases. This algorithm is developed by considering simple arithmetic operators (i.e., Multiplication, Division, Subtraction, and Addition) to determine the best element subjected to specific criteria from a set of candidate alternatives [20].
This algorithm takes population size P, maximum number of iterations T, upper bound UB, lower bound LB as input values and searches for a best solution by measuring cost value. This is implemented as follows. To localize an unknown node i, input parameters LB = (LB x , LB y ) and UB = (UB x , UB y ) are set as arrays of lower and upper boundary values of the deployment field. AOA generates initial P locations randomly within the boundaries LB and UB. The cost of each of these P location estimations is measured as below: The location with minimum cost value is saved as P BEST = (x i ,ỹ i ).
Previously generated P location estimates are next modified in exploration and exploitation phases of AOA to converge towards the actual location of node i. This is done using Math Optimizer Accelerator (MOA) and Math Optimizer Probability (MOP) which are defined as a function of current iteration t as below: Generate random numbers r 1 , r 2 and r 3 between 0 and 1. If Here, ∈ is a small number set as 2.2204e − 16.
Similarly, value of ỹ i,k (t) is modified. This process is continued to get the best location with minimum cost in T iterations. The final solution P BEST = (x i ,ỹ i ) is considered as the location estimate of the unknown node.

Coverage hole discovery (CHD)
After localization, every node is aware of its location in the field. Next, this location information is used to discover coverage holes. This is done by checking for uniform distribution of neighbor nodes around every node with overlapping sensing ranges. For this, every node identifies few points evenly spaced around it at a distance of S Ni . The number of points identified can be any number greater than 1. After identifying the points, the nodes check if these points are inside the sensing range of any of the neighbor nodes stored in the neighbor matrix. If any one of the identified points of a node doesn't reside inside the sensing range of any of its neighbor nodes, the node is identified as a border node with the Border parameter set to 1. By selecting more points, even coverage holes with smaller sides can be detected. But, since every point needs to be checked for overlapping neighbor nodes, this also increases the computation overhead. Hence, depending on the need of the application, suitable number of points need to be identified. This step is explained with an example. Here, we have considered 8 evenly spaced points. In this case, the coverage holes with sides greater than (1∕8) th of the perimeter of the sensing area can be detected. Consider a node N 1 having N 2 , ..., N 9 as neighbors stored in its neighbor matrix. To check if N 1 is in the boundary of any coverage hole, it first identifies 8 points, P1 N1 , P2 N1 ,..., P8 N1 as shown in Fig. 3. Next, every point is checked for an overlapping sensing range.
For node N 1 , if there is any N i where i = 2, 3, ..., 9 such that d (Pj N1 )−Ni ≤ (S Ni ) ∀j = 1, ..., 8, then the node N 1 is marked as not a border node with Border=0. Here, d (Pj N1 )−Ni indicates the distance between (Pj N1 ) and Ni. If any Pj N1 does not find a N i such that d (Pj N1 )−Ni ≤ (S Ni ) , then the node N 1 is marked as a border node with Bor-der=1. This can be a node at the border of a field or at the border of a coverage hole. As shown in Fig. 4, point P5 of node N1 is not covered by sensing region of any of its neighbor nodes. Hence, node N1 is identified as a border node.

Update the end user
When the node detects any change in its border status, it alerts the end user. This way, the user will know all the border nodes at the borders of coverage holes and fields. He can take further actions based on the requirements.

Disconnected networks
As proved in [36], if the coverage radius of a node is at least twice the sensing range, a completely covered network will be a completely connected network. Hence, by ensuring complete coverage, we get a completely connected network.
The pseudo-code of the reported localization and deployment method is shown in Algorithm 1.

Computational complexity
The computational complexity of the proposed model relies on two factors: localization and deployment. Localization is achieved by AOA. The computational complexity of the AOA is of O(P × (2 × T + 1)) where P is the population size, T is the iterations. The computational complexity of the deployment model is O (8 × AN) where AN is the average number of immediate neighbors for a node in the network.
In the next section, the proposed model is evaluated under various scenarios.

Results and analysis
In this section, the reported localization and deployment model is evaluated by comparing the results with the traditional Centroid [37] and the recent range-free algorithms EWCL [38] and HHO-AM [32]. For this, a combination of isotropic and anisotropic fields are considered. These fields are simulated by defining the required boundary shapes using the MATLAB R2018a tool. Sensor and reference nodes are randomly deployed in these fields. This is done by generating locations for nodes within the boundary region using the built in uniform random distribution function of MATLAB. Sensor nodes are considered to be heterogeneous with sensing ranges varying from 6m to 12m and communication ranges varying from 12m to 24m. After deployment, nodes communicate with each other and form a network. The transmission of signals among nodes undergoes attenuation in space, which is represented by the path loss factor of 4. Apart from path loss, the presence of obstacles causes attenuation of signals in different directions, resulting in irregular communication patterns. The degree of irregularity in the communication field is assumed to be 0.005. The irregular communication patterns are generated using weibull random distribution as suggested in [39].
After deployment, localization algorithms are used to estimate the locations of sensor nodes by considering the actual locations of reference nodes. The localization algorithms are then evaluated by comparing the actual locations of sensor nodes with their estimated locations. This is done using the parameter Average Localization Error (ALE) [40] which is defined as, where (x i , y i , z i ) is the actual node location, (x i ,ỹ i ,z i ) is the measured node location and n is the number of localized nodes.
After localization, nodes identify themselves as border or non-border nodes using the reported method. The efficiency of this is evaluated by analyzing the percentage of non-border nodes erroneously reporting as border nodes. The deployment error is measured as,

Evaluation of AOAL
The reported AOAL is evaluated under various scenarios.

Influence of node density
Here, the performance of the reported algorithm is evaluated under various node densities. For this, sensor and reference nodes are deployed in a square shaped field. The count of Deployment error (%) = Count of erroneously reported border nodes Nodes in the network × 100 nodes is increased from 500 to 2000. Reference node density is maintained at 20% . The ALE at node densities varying from 0.01∕m 2 to 0.04∕m 2 is compared with other localization algorithms. Comparison of localization results for different algorithms is shown in Fig. 5. From Fig. 5, it can be observed that the localization error of the Centroid algorithm is very high at lower node densities whereas AOAL has shown the least localization error. With an increase in node density, the performance of localization algorithms improves. AOAL has shown an overall improvement of 24% in ALE compared to HHO-AM.

Influence of reference node density
The localization algorithm is evaluated at different reference node ratios. Node density is fixed at 0.03∕m 2 and reference node density is varied from 10% to 40% . The localization errors from different algorithms are shown in Fig. 6.
While the error rate was very high for other localization algorithms at lower reference node densities, AOAL has performed well. It has shown an overall improvement of 24 − 41% when compared with Centroid, EWCL, and HHO-AM localization algorithms.

Influence of heterogeneity
Here, the behavior of the localization algorithms at various heterogeneous conditions is analyzed. For this, sensor nodes of different transmission powers are considered. The deviation in transmission powers of nodes is varied from 0 to 15dBm and the localization errors are observed in these situations. Figure 7 shows the localization errors in these conditions. The increase in heterogeneity deteriorated the performance of Centroid and EWCL. But, HHO-AM and AOAL showed more stable performance in heterogeneous conditions. The localization accuracy of AOAL is improved by 28% compared to the HHO-AM algorithm.

Computational time
In this section, the complexity of the localization algorithm is evaluated in terms of computational time. The average computational time for localization of a node is compared with other localization algorithms and the results are provided in Fig. 8.
The computational time of Centroid algorithm is the least as it considers only immediate neighbor nodes for location analysis. The EWCL and HHO-AM localization algorithms consider reference nodes within a threshold distance, their computational time is higher than Centroid algorithm. But, computational time of AOAL algorithm is observed to be higher than HHO-AM and EWCL.

Evaluation of the deployment model
After localization, nodes identify the coverage holes and disconnected networks using the reported deployment model.

Field anisotropy
To evaluate the effectiveness of the reported deployment method on various types of fields, a combination of sensor and reference nodes are randomly deployed in a square field with a disconnected network and a C shaped field with a hole as shown in Figs. 9a and 10a. Node density is maintained at After the initial random deployment, sensor nodes localize themselves using a localization algorithm. Here, we have used the AOAL localization algorithm. The results of the localization algorithm are shown in Figs. 9b and 10b. After localization, sensor nodes use their estimated locations and their neighbor nodes to identify holes. The results of the coverage hole discovery method are shown in Figs. 9c and 10c. The nodes identified as border nodes are marked in red color and non-border nodes are marked in green color. We can observe that using the proposed method, nodes were able to identify the coverage holes and disconnected networks effectively.

Influence of node density and localization errors
To study the influence of node density on the reported deployment algorithm, initial random deployment is carried out by varying the node density from 0.01∕m 2 to 0.04∕m 2 . Then, the nodes are localized using different localization algorithms namely Centroid, EWCL, HHO-AM, and AOAL. The results of ALE and deployment error at various node densities in two different fields are shown in table 1. Figure 11 shows the measured deployment error in a square field when the nodes are localized using Centroid, EWCL, HHO-AM, and AOAL localization algorithms. Border node detection errors of sensor nodes are in the range of 2 − 10% at 0.01∕m 2 node density. This is because the number of neighbor nodes available for node localization is small which causes higher localization errors. Higher localization errors resulted in higher errors in border node identification. With an increase in node density, the ALE of localization algorithms is reduced and hence node discovery errors are also reduced.  Similar results are observed when the tests are repeated in a C shaped field with a coverage hole. The results are shown in Fig. 12. When the node density is increased from 0.01% to 0.04% , the average ALE from four localization algorithms is reduced from 10m to 5m. This reduced the average deployment errors from 3.6% to 0.07%.

Conclusions
WSNs have recently attracted considerable research interest by providing unprecedented opportunities for monitoring and controlling applications. WSN can be formed by following deterministic or random deployment strategies. When sensor nodes are deployed using a random deployment strategy, sensor nodes may cluster in some regions leaving out coverage holes and disconnected networks in other regions. But, since in random deployment, the user is not aware of the locations of the deployed nodes, it is not possible to identify the holes. To overcome this problem, we have reported a localization and deployment plan to help the end user in identifying the coverage holes and disconnected networks in a distributed manner. The reported method uses AOA to identify the locations of the nodes. The localized nodes then use their neighbor information collected for localization purposes to identify missing coverage regions. This method is tested in various fields for different node densities. AOAL showed an improvement of 24% to 45% in ALE compared to other methods. It is also observed that by reducing the average localization errors from 10m to 5m, the average deployment errors were also reduced from 5% to 0.04% . In the future, the algorithm will be enhanced to reduce deployment errors even in lower node densities.
Funding information Open access funding provided by Manipal Academy of Higher Education, Manipal. No funding was received for conducting this work.

Declarations
Competing interests The authors have no competing interests to declare that are relevant to the content of this article.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.