1 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.

2 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.

3 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,

$$\begin{aligned} CR_{N}=10^{( \frac{P_t-P_{th}}{10 \eta })} \end{aligned}$$
(1)

where \(P_t\) is the transmitted power, \(P_{th}\) is the minimum threshold receiver power required by nodes, and \(\eta\) 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 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}\) \(\ge\) \(2 \times 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 \ne 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.

Fig. 1
figure 1

(a) Coverage hole (b) Disconnected network in a 2D square field

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.

4 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.

4.1 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).

$$\begin{aligned} \textit{node density} = \frac{k}{0.422 \times {r_0}^3} \end{aligned}$$
(2)

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.

4.2 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 (xy) 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 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: \(NSET_{1}\) \(=\) \(\{\)1. \((x_{R1},y_{R1})\), \(CR_{R1}\), 2. \((x_{R2},y_{R2})\), \(CR_{R2}\), 3. \((x_{R3},y_{R3})\), min \((CR_{R3}+CR_{R1}\), \(CR_{R3}+CR_{N2})\) \(\}\).

Fig. 2
figure 2

An example of a WSN

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

$$\begin{aligned} ACD_{R1} = \frac{\sum \limits _{i \in NSET_1}{d_{R1Ri}}}{\sum \limits _{i \in NSET_1}{CR_{R1Ri}}} \end{aligned}$$
(3)

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,

$$\begin{aligned} \tilde{d}_{NiRj} = ACD_{Rj} \times CR_{NiRj} \end{aligned}$$
(4)

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: \(\forall i, 1 \le i \le N\), find location estimation \((\widetilde{x}_{i},\widetilde{y}_{i})\) as a point in the field such that the distance from \((\widetilde{x}_{i},\widetilde{y}_{i})\) to every reference node \(j \in NSET_i\) is equal to \(\widetilde{d}_{ij}\).

Or equivalently,

\(\forall\) i; \(1 \le i \le N\), find \((\widetilde{x}_{i},\widetilde{y}_{i})\) s.t. \(\vert\) \(\sqrt{(\widetilde{x}_i-{x}_{j})^2 + (\widetilde{y}_i-{y}_{j})^2}\) - \(\tilde{d}_{ij}\) \(\vert\) is a minimum for every \(j \in\) \(NSET_i\).

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:

$$\begin{aligned} COST = \sum \limits _{j \in NSET_i} \vert {\sqrt{(\widetilde{x}_i-{x}_{j})^2 + (\widetilde{y}_i-{y}_{j})^2} - \tilde{d}_{ij}} \vert \end{aligned}$$
(5)

The location with minimum cost value is saved as \(P_{BEST}=(\widetilde{x}_{i}, \widetilde{y}_{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:

$$\begin{aligned} MOA(t) = 0.2 + t \times \frac{0.8}{T} \end{aligned}$$
(6)
$$\begin{aligned} MOP(t) = 1 - \frac{t^{0.2}}{T^{0.2}} \end{aligned}$$
(7)

Generate random numbers \(r_1\), \(r_2\) and \(r_3\) between 0 and 1.

If \(r_1<\) MOA, modify \(\widetilde{x}_{i,k}\), \(1 \le k \le P\) as

$$\begin{aligned} \widetilde{x}_{i,k}(t) = {\left\{ \begin{array}{ll} \frac{\widetilde{x}_{i}(t-1)}{(MOP(t)+\in )} \times ((UB_x-LB_x) \times 0.5 + LB_{x}) \textit{ if } r_2 > 0.5 \\ \widetilde{x}_{i}(t-1) \times MOP(t) \times ((UB_x-LB_x) \times 0.5 + LB_{x}) \textit{ otherwise } \\ \end{array}\right. } \end{aligned}$$
(8)

Here, \(\in\) is a small number set as \(2.2204e-16\).

Else, if \(r_1 \ge MOA\), modify \(\widetilde{x}_{i,k}\), \(1 \le k \le P\) as

$$\begin{aligned} \widetilde{x}_{i,k}(t) = {\left\{ \begin{array}{ll} \widetilde{x}_{i}(t-1)-MOP(t) \times ((UB_x-LB_x) \times 0.5 + LB_x) \textit{ if } r_3 > 0.5 \\ \widetilde{x}_{i}(t-1) + MOP(t) \times ((UB_x-LB_x) \times 0.5+LB_x) \textit{ otherwise } \\ \end{array}\right. } \end{aligned}$$
(9)

Similarly, value of \(\widetilde{y}_{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}=(\widetilde{x}_{i}, \widetilde{y}_{i})\) is considered as the location estimate of the unknown node.

4.3 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.

Fig. 3
figure 3

Points on the sensing range of node N1

For node \(N_1\), if there is any \(N_i\) where \(i=2,3,...,9\) such that \(d_{(Pj_{N1})-Ni} \le (S_{Ni})\) \(\forall 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} \le (S_{Ni})\), then the node \(N_1\) is marked as a border node with Border=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.

Fig. 4
figure 4

An example of a border node identification

4.4 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.

4.5 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.

figure c

4.6 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 \times (2 \times T + 1))\) where P is the population size, T is the iterations. The computational complexity of the deployment model is \(O(8 \times 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.

5 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,

$$\begin{aligned} ALE=\frac{\sum \limits _{i=1}^n\sqrt{(\widetilde{x}_{i}-x_{i})^2+(\widetilde{y}_{i}-y_{i})^2+(\widetilde{z}_{i}-z_{i})^2}}{n} \end{aligned}$$
(10)

where \((x_i,y_i,z_i)\) is the actual node location, \((\widetilde{x}_i,\widetilde{y}_i,\widetilde{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,

$$\begin{aligned}& \text{Deployment error} \ (\%) \\&\quad= \frac{\text{Count of erroneously reported border nodes}}{\text{Nodes in the network}} \times {100} \end{aligned}$$
(11)

5.1 Evaluation of AOAL

The reported AOAL is evaluated under various scenarios.

5.1.1 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 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.

Fig. 5
figure 5

Comparison of localization error at varying node densities

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.

5.1.2 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.

Fig. 6
figure 6

Comparison of localization error at varying reference node densities

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.

5.1.3 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.

Fig. 7
figure 7

Comparison of localization error at varying transmission powers

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.

5.1.4 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.

Fig. 8
figure 8

Comparison of computational time

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.

5.2 Evaluation of the deployment model

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

5.3 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 \(0.03/m^2\). 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.

Fig. 9
figure 9

Square field: (a) Random deployment, (b) Localization results and (c) Coverage hole discovery

Fig. 10
figure 10

C shaped field: (a) Random deployment, (b) Localization results and (c) Coverage hole discovery

5.4 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.

Fig. 11
figure 11

Influence of node density on deployment error in a square field

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\%\).

Fig. 12
figure 12

Influence of node density on deployment error in a C field

Table 1 Comparison of deployment error with ALE

6 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.