1 Introduction

In the last decade, wireless sensor networks (WSNs) have drawn a lot of interest. They may be utilized for a broad range of uses, like environmental monitoring, health care, security, and surveillance. Sensor nodes (SNs) are tiny devices that can detect environmental phenomena, analyze and record data, and transfer data to a central (sink) node [1, 2]. Among the most critical design difficulties in WSNs, increasing the lifetime of a network is extremely challenging. This is particularly important when battery replacement is not an option. The majority of research in recent years has been focused on making optimal usage of battery resources for increasing the lifetime [3]. SNs activity scheduling is among the most prevalent strategies for extending lifetime. Scheduling is done effectively when SNs are redundantly distributed to monitor a fixed list of targets [4]. Every scheduling approach should account for different performance needs, such as routing connection, network coverage, redundancy, etc. Figure 1 represents the basic architecture of a typical WSN where SNs are randomly deployed. Every SNs has uniform sensing and communication range. In this research paper, we concentrate on the issue of target coverage and connection (C&C) maintenance. The state-of-art methods and previously conducted studies determined that relatively few tests were conducted on C&C maintenance employing computational intelligence [5, 6]. Researchers have recently employed learning automation to resolve the target coverage issue and increase network lifetime [7, 8]. Each sensor is allocated in learning automata (LA) in a scheduling system, which assists it in selecting an optimal state (sleep or active) to optimize battery usage. The learning automata (LA) method is a heuristic optimization technique that can be used to discover solutions for an optimal cover set in WSNs. The LA method works by iteratively exploring the solution space and updating the probabilities of different actions based on their performance in achieving the desired objective. In the context of optimal cover set discovery, the LA method can be used to identify a set of SNs that can provide full coverage of the target area with minimal redundancy. To achieve this, the LA method starts by randomly selecting a set of SNs and evaluating their coverage performance. Based on the evaluation results, the LA method updates the probabilities of different actions, which in this case correspond to selecting or deselecting SNs. During the learning process, the LA method uses a feedback mechanism to adjust the probabilities of different actions based on their past performance. Specifically, the method increases the probability of actions that have resulted in better coverage and decreases the probability of actions that have led to worse coverage. The LA method continues to explore the solution space until a stopping criterion is met, such as a maximum number of iterations or a desired level of coverage. At the end of the learning process, the LA method returns the set of SNs that provides the optimal cover set. The issue of target coverage is also discussed in [9, 10] using LA, in which a node that covers the maximum target has a higher likelihood of being chosen as a member of the current cover set. Because the coverage of a node is fixed in a network, this method chooses the same sensors in successive coverage sets until the battery runs out, resulting in coverage gaps in the provided network. The coverage gaps are those targets that become exposed due to the sensors’ energy depletion that covers them, even though there are numerous SNs with enough energy in the WSN. In this paper, we have proposed a CCM-OAL protocol. In this approach, a minimum of one communication connection is required for each SN to attain the intended coverage. Each SN’s learning ability determines the optimum plan of action to increase coverage and sustain connection among active nodes. The goal is to activate a small number of SNs to reduce energy usage [11]. Using the OAL method, these SNs discover their optimum action on their own. The detecting range is modified for the overlapping SNs. This method removes coverage redundancy among nodes. The benefit of this technique is to maintain the resources like battery and memory power by reducing the extra packet creation of similar spatial coordinates which helps in preventing network contention and congestion. Moreover, the suggested method maintains the required coverage rate, connectivity, and maximum lifetime network.

Fig. 1
figure 1

Sensor network

The rest of the research paper is organized as follow. Section 2 examines a brief survey of the related work. Section 3 presents the problem statement. Section 4 covers the theory of learning automata. Section 5 details the proposed scheme of scheduling based on optimal adaptive learning. Section 6 outlines the findings, and the concluding Sect. 7 concludes this paper and provides the future scope of the approach.

2 Related work

The concept of C&C is a key challenge in developing wireless applications because these two factors directly impact the reliability and performance of the wireless networks [12]. Coverage refers to the geographical area that the wireless signal can reach, while connectivity refers to the ability of the wireless device to establish and maintain a reliable connection to the network. In wireless applications, maintaining a consistent level of C&C is crucial for ensuring that users can access the network and use the application seamlessly [13]. This requires careful planning and optimization of the wireless network infrastructure, as well as the use of advanced technologies such as mesh networking and beamforming to overcome signal interference and obstacles. Some of the recent schemes which consider the issue of C&C are explained as follows. Farsi et al. [14] provides a comprehensive survey of the different deployment techniques for WSNs, and their impact on C&C. The paper examines the impact of deployment techniques (random, regular, grid-based, and cluster-based) on C&C. The paper highlights that the C&C of WSNs depend on factors such as the density and distribution of the SNs, the transmission range of the SNs, and the type of propagation model used. Furthermore, the paper highlights the importance of selecting the appropriate deployment technique based on the desired C&C requirements, as well as other factors such as energy consumption, scalability, and cost. One of the key challenges in deploying WSNs is to ensure adequate C&C of the SNs to achieve the desired functionality. The paper also discusses the role of topology control in improving C&C in WSNs. The paper concludes by highlighting the importance of selecting the appropriate deployment technique for a given application based on the desired C&C requirements, as well as other factors such as energy consumption, scalability, and cost. The paper also highlights the need for further research in the area of topology control algorithms and their impact on coverage and connectivity in WSNs.

Harizan and Kuila [15] proposes a novel approach based on “Non-Dominated Sorting Genetic Algorithm-II (NSGA-II)” for SN scheduling in IWSNs, considering both C&C requirements. The proposed NSGA-II approach includes three steps: firstly, the authors use the k-means clustering algorithm to group the SNs into different clusters based on their spatial distribution. Secondly, NSGA-II is used to generate a set of non-dominated Pareto-optimal solutions based on the objectives of maximizing C&C and minimizing the number of active SNs. Finally, the authors use fuzzy logic to select the optimal solution from the Pareto-optimal solutions based on the QoS requirements of the IWSN. The paper evaluates the proposed NSGA-II approach by comparing it with other existing approaches, including greedy algorithm, simulated annealing, and Genetic Algorithm (GA). The evaluation is performed using several performance metrics, including C&C, energy consumption, and network lifetime. The experimental results illustrate that the suggested NSGA-II method outperforms the other approaches in terms of C&C, and lifespan of WSN with reduced energy consumption. The main strengths of the paper are better network performance in terms of C&C, and network lifetime. Harizan and Kuila [16] proposed a novel approach for “energy efficient scheduling in target-based WSNs” using an improved genetic algorithm (GA) technique to ensure adequate C&C of the WSN. The proposed approach considers multiple objectives simultaneously, including energy consumption, network C&C. The approach considers the varying importance of different targets and adjusts the SN scheduling accordingly to meet the specific requirements of the network. Furthermore, the approach is robust and able to handle dynamic changes in network conditions, such as node failures and mobility. However, the proposed approach has some limitations that need to be addressed. The approach relies on the availability of accurate location information of the targets, which may not be feasible in all scenarios. Additionally, the approach assumes a static network topology, and further research is needed to evaluate its performance in dynamic network scenarios. The simulation results show that the proposed approach outperforms existing schemes, including a traditional GA-based approach and a fuzzy logic-based approach. In comparison to the traditional GA-based approach, the proposed approach reduces energy consumption by up to 30% while achieving higher network C&C. Furthermore, the proposed approach outperforms the fuzzy logic-based approach by achieving higher network C&C with a lower number of deployed SNs, which leads to energy conservation and cost reduction in WSNs. Yue et al. [17] proposed a “hybrid artificial bee colony (ABC) algorithm” for improving the C&C of WSNs. The proposed approach optimizes the SNs deployment to achieve maximum C&C of the network while minimizing energy consumption. The hybrid ABC algorithm combines the global search capability of the original ABC algorithm with the local search capability of the particle swarm optimization (PSO) algorithm [18] to improve the optimization performance. The authors reported significant improvements in both C&C when using the HABC algorithm compared to the existing algorithms. Specifically, the HABC algorithm showed a 10.8% improvement in coverage and a 10.1% improvement in connectivity compared to GA. When compared to PSO and ABC, the HABC algorithm showed similar or slightly better performance in terms of C&C. The paper [19] “A distributed reinforcement learning based SN scheduling algorithm for coverage and connectivity maintenance in wireless sensor network” where each SN learns the optimal time to stay active and transmit data based on its own observations and rewards. The experimental outcomes of the suggested algorithm demonstrate significant improvements in both C&C compared to existing algorithms. Specifically, the proposed algorithm achieved a coverage of 96.6% and a connectivity of 99.5%, which outperformed three existing algorithms by 6.1% to 18.6% in terms of coverage and 3.2–7.6% in terms of connectivity. The proposed algorithm also showed robustness to changes in the network topology and node density, and was able to adapt to different scenarios and achieve near-optimal performance. Moreover, the algorithm was shown to be scalable and suitable for large-scale WSNs. Rao et al. [20] proposes a novel approach for optimizing coverage and network lifetime in WSNs using multi-objective metaheuristics and by optimizing the placement and operation of SNs. The authors conduct simulation experiments to assess the performance of their suggested algorithm, comparing it with three existing algorithms: a genetic algorithm (GA), PSO, and a simulated annealing (SA) algorithm. The simulation results show that the proposed algorithm outperforms the existing algorithms in terms of both coverage and network lifetime. Specifically, the proposed algorithm achieves a higher percentage of coverage and extended lifespan than the existing schemes. The algorithm also demonstrates the ability to adapt to changes in the network topology and node density, showing robustness and scalability in large-scale WSNs. The authors also use a performance metric called Pareto optimal front to evaluate the trade-off between coverage and network lifetime. The Pareto optimal front is a set of solutions that represent the optimal balance between the two objectives. The simulation results show that the proposed algorithm is able to achieve a more evenly distributed Pareto optimal front compared to the existing algorithms, indicating a better balance between coverage and network lifetime. Overall, the paper proposes a promising solution for optimizing coverage and network lifetime in WSNs using multi-objective metaheuristics. Tirandazi et al. [21] proposes a novel algorithm for improving C&C in WSNs using a team of mobile robots to reposition SNs. The proposed algorithm consists of the following steps: (i) Initialization: The SNs are randomly distributed in the sensing area. The mobile robots are deployed and assigned to move the SNs. (ii) Coverage improvement: The mobile robots move the SNs to increase network coverage. The coverage improvement is achieved by using a clustering algorithm that groups the SNs into clusters. Each cluster is assigned to a mobile robot that moves the SNs to optimize coverage. (iii) Connectivity improvement: The mobile robots move the SNs to expand network connectivity. The connectivity enhancement is attained by using a connectivity metric that computes the distance between adjacent SNs. The mobile robots move the SNs to reduce the distance between adjacent SNs and improve connectivity. Steps 2 and 3 are repeated iteratively until a stopping criterion is met. The stopping criterion can be a predefined number of iterations or a convergence threshold for C&C improvement. The authors also propose an energy-efficient approach for the movement of mobile robots. The mobile robots move the SNs only when necessary to reduce energy consumption. The mobile robots also use a priority-based approach to optimize movement and avoid collisions. The authors conduct simulation experiments to evaluate the performance of their proposed algorithm, comparing it with two existing algorithms: the grid-based algorithm and the virtual force algorithm. The simulation results show that the proposed algorithm outperforms the existing algorithms in terms of both C&C. Specifically, the suggested procedure achieves a higher percentage of coverage and better connectivity than the other algorithms. The algorithm also demonstrates the ability to adapt to changes in the network topology and node density, showing robustness and scalability in large-scale WSNs. Jebi and Baulkani [22] proposes a novel procedure for mitigating C&C issues in WSNs which uses a “multi-objective randomized grasshopper optimization (MORGO) algorithm” based selective activation scheme to activate a subset of SNs in the network. The SNs are randomly distributed in the sensing area. A subset of nodes is selected for activation using the MORGO algorithm. The activated nodes are used to improve network C&C. The coverage improvement is achieved by using a clustering algorithm that groups the activated nodes into clusters. Each cluster is assigned to a mobile robot that moves the SNs to optimize coverage. The connectivity improvement is achieved by using a connectivity metric that calculates the distance between adjacent SNs. The mobile robots move the activated nodes to reduce the distance between adjacent nodes and improve connectivity. The MORGO algorithm is used to select the subset of nodes to be activated. The MORGO algorithm is a metaheuristic optimization algorithm based on the behavior of grasshoppers. The algorithm is used to optimize two conflicting objectives: C&C. The algorithm considers the energy consumption of the SNs and the remaining energy of the network to balance the objectives. The projected algorithm is evaluated using various simulation experiments and exhibits that it outperforms the existing algorithms in terms of both C&C. The algorithm also demonstrates the ability to adapt to changes in the network topology and node density, showing robustness and scalability in large-scale WSNs. However, practical implementation of such a system may face challenges such as the cost and complexity of deploying and maintaining a subset of activated nodes. Deepa and Revathi [23] proposes a novel algorithm to achieve “efficient target monitoring with fault-tolerant connectivity in WSNs”. The proposed algorithm is a distributed and adaptive approach that ensures reliable data transmission from the monitored targets to the base station by selecting and activating the most suitable set of SNs. The algorithm aims to reduce energy consumption while ensuring high data reliability, fault tolerance, and network connectivity. The algorithm consists of two phases: the target selection phase and the SN activation phase. In the target selection phase, the algorithm selects the most critical targets based on their priority level and relevance to the monitoring objectives. In the SN activation phase, the algorithm activates the minimum number of SNs required to monitor the selected targets, ensuring fault-tolerant connectivity and high data reliability. The proposed algorithm uses a hierarchical clustering technique to organize the SNs into clusters, with each cluster headed by a cluster head (CH). The CHs are responsible for collecting data from the SNs and forwarding it to the base station. The algorithm dynamically adjusts the clustering structure to optimize energy consumption and network connectivity. The proposed algorithm was evaluated using simulations in the NS-2 network simulator. The simulation experiments were conducted in a randomly generated WSN with 100 nodes deployed over a 100 × 100 m2 area. The experimental results illustrate that the projected algorithm outperforms present algorithms in terms of energy consumption, fault-tolerant connectivity, and data reliability. The algorithm’s adaptive and distributed nature, combined with the use of hierarchical clustering and dynamic adjustment of the clustering structure, results in improved energy efficiency, fault tolerance, and data reliability, which are critical requirements for target monitoring applications in WSNs.

Mostafaei et al. [9] proposes a new method for scheduling sleep cycles in WSNs with partial coverage. The methodology used in the paper involves the use of a learning automata (LA) algorithm for determining the sleep cycles of each SN. The LA algorithm is a machine learning technique that allows the SNs to learn and adapt their behavior based on their environment and performance. In this case, the LA algorithm is used to optimize the energy consumption of the SNs by determining the optimal sleep cycle duration for each node. The authors use a mathematical model to define the coverage requirements and constraints for the WSN, and then develop an optimization algorithm based on the LA approach to schedule the sleep cycles of the SNs. The performance of the proposed approach is evaluated through simulation studies using a real-world dataset. The simulation results show that the proposed approach can significantly reduce the energy consumption of the WSN while still meeting the coverage requirements. The authors also compare their approach with other existing sleep scheduling algorithms and show that their approach outperforms these algorithms in terms of energy consumption and coverage requirements. However, there exist some limitations such as limited evaluation, limited scalability, non-consideration of fault tolerance and suitability for homogeneous WSN.

Yu et al. [10] proposes a new method to improve the coverage of WSNs by considering the coverage contribution area of each SN. The proposed method divides the sensing area into grids of equal size, and each SN is assigned to a specific grid. The k SNs, and the coverage contribution area of each SN is also covered by at least k SNs. This way, the proposed method aims to achieve better coverage of the sensing area with minimum redundancy and energy consumption. To evaluate the performance of the proposed method, the researchers conducted a series of simulations under different scenarios, including different numbers of SNs, sensing ranges, and grid sizes. The performance of the proposed method was compared with that of traditional k-coverage algorithms. The results of the simulations showed that the proposed method outperformed traditional k-coverage algorithms in terms of network coverage, energy efficiency, and network lifetime. The proposed method was also found to be robust against node failures and node mobility. However, there are some limitations such as the proposed method assumes that each SN has a fixed sensing range, which may not be realistic in some scenarios where SNs may have varying sensing capabilities. Moreover, the method relies on the assumption that all SNs have equal energy levels, which may not be true in real-world scenarios where some nodes may have more energy than others. Furthermore, the proposed method does not consider the impact of interference and signal attenuation on network coverage, which can affect the accuracy of coverage estimation.

In this section, we provide a widespread review and analysis of recent research to improving coverage and connectivity (C&C) in WSNs. Furthermore, we provide findings, as well as research gaps or limitations in the existing schemes to better understand the context and significance of the current research, and to situate the study within the broader academic discourse.

3 Problem statements

WSNs are a critical component of many modern systems, including industrial automation, environmental monitoring, and healthcare. One of the most significant challenges in preserving C&C in WSNs is the dynamic and often unpredictable nature of the wireless environment. There are various other challenges in preserving C&C in WSNs such as network topology, security [24], energy management and signal interference. Network topology can affect C&C, as the placement and arrangement of SNs can have a significant impact on signal propagation and network performance [25]. WSNs are often deployed in critical applications, making security a major concern. Ensuring secure and reliable communication is essential to preserving C&C in WSNs. Furthermore, SNs typically have limited battery life and may need to be repositioned or replaced to maintain C&C. Addressing these challenges requires careful planning and optimization of the WSN architecture, as well as the use of advanced signal processing techniques and energy-efficient communication protocols. Furthermore, the design of WSNs must be highly scalable and adaptable to changing environmental conditions to ensure reliable operation and maximize the potential benefits of this technology.

We consider a network with \(N\) sensors and \(T\) targets randomly distributed throughout a rectangular area \(A=l \times l\). Assume that \({S}_{i}\) be a set of SNs \(\left\{{S}_{1},{S}_{2},{S}_{3}\ldots ,{S}_{n}\right\}\) and \(T\) be a set of targets \(\{T,{T}_{2},{T}_{3}\ldots ,{T}_{m}\}\) with location information. Every SN in a network has same sensing radius. The nodes have two transitions state sleep and active. The numbers of sensors are placed in the monitoring area expected to be more than the number required sensors to monitor the target region. Scheduling of SN activity helps in energy conservation. A SN may monitor a target if the Euclidean distance between sensor and target is lesser than the node’s sensing range. The covered target list of a SN \({S}_{i}\) is described as the list of the targets \({T}_{i}\). The primary task is how to arrange nodes into numerous cover sets, each of which can monitor all of the targets while maximizing the lifetime of network.

4 Learning automata

Learning automata (LA) is a machine learning method [9]. LA is the abstract model which selects an optimal action out of the available limited options which can be executed in a complicated environment. LA analyzes this action and reacts to the automation using a signal. For next action, the automation system should change its internal state from its past actions.

Therefore, the automation in LA method is able to discover solution for an optimal cover set. The LA shows in Fig. 2. The LA method is able to discover a solution for an optimal cover set by iteratively exploring the solution space and adjusting the probabilities of different actions based on their performance. This way, the LA method can efficiently identify a set of SNs that can provide full coverage of the target area with minimum redundancy [26, 27].

Fig. 2
figure 2

Learning automata

Two kinds of LA are used: variable and fixed stochastic model. The Eq. (1) computes next action of learning model:

$$p\left(x+1\right)=T\left[p\left(x\right),a\left(x\right),b\left(x\right)\right].$$
(1)

The terms \(a\left(x\right)\ \textit{and}\ p(x)\) are selected actions. The term x defines a moment on which an action is carried out. For any action, probability vector is given by \(p\). The vectors are changed according to Eqs. (2) and (3). Assume that \(a1 (x)\) is a chosen action on \(x\):

$${p}_{i}\left(x+1\right)={p}_{i}\left(x\right)+a1{[ p}_{i}(x)]$$
(2)
$${p}_{j}\left(x+1\right)=\left(1+a\right){p}_{j}\left(x\right)\quad\forall j,j\ne i.$$
(3)

If certain behaviors are favored by the environment then \(b\left(x\right)= 0\). If not favored then \(b(x) = 1\). In Eq. (4), \({p}_{i}\left(x+1\right)\) represents the probability of action i at moment (x + 1), and \({p}_{j}\left(x\right)\) represents the probability of action j at moment x. The term (1 − b) represents the multiplication factor for updating the probability vector pi. This equation updates the probability vector pi when certain behaviors are not favored by the environment. In Eq. (5), \({p}_{j}\left(x+1\right)\) represents the probability of action j at moment (x + 1), excluding action i. The term b/(r − 1) represents a constant term, and (1 − b) represents the multiplication factor for updating the probability vector pj. This equation updates the probability vector pj for all actions except action i when certain behaviors are not favored by the environment:

$${p}_{i}\left(x+1\right)=\left(1-b\right){p}_{j}\left(x\right)$$
(4)
$${p}_{j}\left(x+1\right)=\frac{b}{r-1}+\left(1-b\right){p}_{j}\left(x\right)\quad\forall j,j\ne i.$$
(5)

The terms \(b(x)\) represent reward and punishment, the probability is computed according to reward and punishment.

5 CCM-OAL protocol

The C&C maintenance is based on optimal adaptive learning protocol (CCM-OAL). The adaptive learning-based node activity scheduling technique is proposed. In each scheduling cycle, CCM-OAL method assists to maintain coverage rate and connection of active SNs. The OAL [24] is a method for multi-agent learning which is used in nodes for scheduling activity. This process is time-consuming and difficult for achieving an optimal path with single agent learning method. Therefore, the OAL algorithm is applied to provide minimum convergence time. There are two phases of a CCM-OAL protocol: (a) coverage maintenance, and (b) connectivity maintenance. Figure 3 shows the detailed flowchart of CCM-OAL.

Fig. 3
figure 3

Flowchart of CCM-OAL

5.1 Coverage maintenance phase

In SNs, the learning phase is initiated directly after randomly deploying the SNs. The CCM-OAL learns the features of nodes. An agent explores the whole network. At time \(t = 0\), the learning rate is\(\alpha\), and \(\beta\) is the discount factor. A learning process initiates at time \(t\) on SN \({S}_{i}\). The SNs identified all of the neighboring nodes \({S}_{NN}\) and observes the \({S}_{L}\) local state \(({S}_{L}\in {S}_{LR},{S}_{LI}\)), where \({S}_{L}\in {S}_{LR}\) shows that SNs are in the coverage redundancy state. The SNs compute the redundancy of all the neighboring nodes by using Euclidean distance. Further, the SN chooses the best action (sleep and active). The active action is selected for mitigating the redundancy of coverage. If the action is active, the area covered by SNs is assigned as a positive reward. The \({S}_{L}\in {S}_{LI}\) shows that the SNs are in an isolated state. Isolated nodes are not performing any actions then in this case node is assigned a positive reward. Figure 3 represents the aforesaid description in a flow chart. When the reward is higher than the threshold level after SN scanning, this type of learning is called convergent. The time required for achieving this is called the convergence time. Otherwise, the whole process is carried out again for achieving the goal. Output from this phase helps in computing total active sensors and their rate of coverage. It defines an input for the connectivity maintenance phase. Four steps are included in the coverage phase: initial, learning, target monitoring, and removal of redundant. Each node participates in the initial process. It is carried out when the network starts functioning. The nodes in the network know their respective neighbors. The learning step is divided into various rounds, the learning mechanism of each node assists in selecting an appropriate state. Each node’s action probability vector is determined. The OAL selects the optimal action for the target of monitoring. Every sensor decides whether to be active or asleep depending on the optimal action. In the last step, OAL obtained the set of redundant sensors.

Initial step Each SN initiates a learning process in the network, which assists the SN in deciding its appropriate state, whether the SN is in active or sleep state. The sleep and active actions have an equal chance with a probability of 0.5 at the beginning of the process. The SN chooses the targets at the start of the algorithm. Then every SN broadcasts the packet to its neighbor, including its location, node ID, and targets covered by the node. The SN waits for acknowledgment packets from its neighbors. The functioning of the network is divided into rounds. Every cycle starts with a learning step and ends with a monitoring step of the target.

Learning step In the learning step, a random SN is selected. The node in the learning process chooses one active or sleeps actions at random and creates an action packet. After producing an action packet, the packet is broadcast by a node to all of its neighbor nodes. The neighbors choose one of its actions and transmit it to the source node based on the learning process. If the SN has received the responses from all neighbors then the learning processes the sender in an active state and its neighbors also in an active state. If all targets are covered by the sender as well as its neighbors then the sender node is penalized, if not then the sender is rewarded.

Target monitoring step The SN chooses its state of action by using probability vector OAL for the monitoring. If the chance of active action is greater than the chance of sleep action for a sensor \({S}_{i}\), then the sensor \({S}_{i}\) chooses active state. The monitoring of the target continues until all active sensors exhaust their energy.

Remove redundancy step In this step, the number of redundant SNs in the coverage is computed using Eq. (6)

$$\text{Coverage redundancy}= {R}_{N} /{n}_{r}$$
(6)

where \({R}_{N}\) represents the redundant SN and \({n}_{r}\) represents the number of SNs required for covering the targets. In this proposed technique, all the redundant SNs put into sleep state. If no redundant SNs in the network then in this condition, the optimal value for redundancy is 1. The complete algorithm for Coverage Maintenance Phase is given below as Algorithm 1. All the steps are clearly defined in the Algorithm 1.

figure a

5.2 Connectivity maintenance phase

In the connectivity maintenance phase, number of active SNs is obtained using Algorithm 1. The goal of this phase is to keep at least one communication connection among active SNs. This helps to avoid network partitioning. The learning process begins on a SN chosen randomly from the active SNs. Furthermore, it identify 1-hop neighbor of randomly selected SN. If the active SN has no 1-hop neighbors then find the most eligible node from the current uncovered set of sleep SN. The change the state of the selected SN and the cover set. The detailed algorithm for connectivity maintenance phase is listed as Algorithm 2.

figure b

6 Simulation results

The proposed CCM-OAL is implemented in MatLab (R2022b). MATLAB provides a comprehensive set of tools and libraries for data analysis and visualization, which are essential for designing and testing C&C schemes. The built-in functions and toolboxes in MATLAB can be used to simulate and analyze different scenarios, evaluate the performance of different algorithms, and visualize the results. The scalability of CCM-OAL technique is assessed by varying the network size. The performance of the proposed protocol is evaluated in terms of convergence time, coverage rate, average number of active SNs, and number of covers set formations on window10 (Processor: Intel i7-1255U (Base-3.50 GHz and Turbo up to 4.70 GHz), 16 GB DDR4 and 512 GB SSD). The CCM-OAL comparative analysis performs with existing k-coverage contribution area (k-CCA) [10] and LA for Partial Coverage (LA-PC) [9]. The network lifetime, coverage rate, and the average number of active SNs are used to compare the CCM-OAL’s performance with LA-PC [9] and k-CCA [10]. Table 1 shows the list of simulation parameters used in the research work to obtain the results.

Table 1 Simulation parameters

The two monitoring region have been considered for the analysis purpose. The first deployment region is \(100\times 100\, {\mathrm{m}}^{2}\). In which the SNs have been deployed randomly and the number of SNs are deployed in group size of 50, 100, 150 and 200 SNs. The Fig. 4 depicts the average number of active SNs in a single scheduling cycle, the number of cover sets formed, and the rate of coverage for the small and large network size. These parameters are computed of small network size for the sensing ranges of 10 m, 20 m, and 25 m. The monitoring area of \(1000\times 1000\, {\mathrm{m}}^{2}\) is considered for deployed of groups of 250 SNs, 500 SNs, 1000 SNs, and 1500 SNs in Fig. 5. The proposed method performance is evaluated over three distinct sensing ranges: 25 m, 30 m, and 35 m. Figure 4 shows the analysis of cover set and active sensors for small sensing area. Figure 5 shows the analysis of cover set and active sensors for the large sensing area. The number of cover sets increases when the sensing range is increased, as shown in Fig. 4a for small size network and Fig. 5a for large size of network. The Fig. 4b and Fig. 5b clearly shows active SNs declines as the sensing range increases. The proposed method determines the number of SNs required with a homogeneous sensing range to cover an area up to a threshold level. Table 2 clearly shows the performance improvement in number of cover sets w.r.t sensing range. Furthermore, Table 3 clearly shows the active number of SNs when we increase the network size and sensing range.

Fig. 4
figure 4

a Number of cover sets. b Average of active sensors

Fig. 5
figure 5

a Number of cover sets. b Average of active sensors

Table 2 Number of cover sets w.r.t sensing range
Table 3 Average number of active SNs w.r.t increase in SNs

Figure 5 shows the performance improvement in finding the number of covers sets and active SNs with the increase in network size and sensing range. In the context of WSNs, convergence time and convergence period refer to two important metrics that are used to evaluate the performance of coverage and connectivity schemes. Convergence time is the time taken for the network to achieve a stable state after a change in the network topology or sensor readings. This can occur when a SN fails, when new SNs are added to the network, or when the environmental conditions change. The convergence time represents the time required for the network to adapt to these changes and reach a steady state where the network coverage and connectivity are optimal. A shorter convergence time indicates faster network adaptation and better network performance. Convergence period, on the other hand, is the time interval between two consecutive instances of network convergence. This metric is relevant for scenarios where the network topology or environmental conditions change frequently. The convergence period indicates how often the network needs to adapt to changes to maintain optimal C&C. A shorter convergence period indicates that the network can quickly adapt to changes and maintain optimal performance. Both convergence time and convergence period are important metrics for evaluating the performance of C&C schemes in WSNs.

A scheme that has a shorter convergence time and convergence period is generally considered to be more efficient and effective in adapting to changes and maintaining optimal network performance. Figure 6 shows the convergence period. The convergence time is spent in scheduling of SN activities and coverage rates. The convergence time for a given sensing area is related to the number of sensors. The convergence time increases with sensors increases. The CCM-OAL protocol is a nodes scheduling method. The objective of CCM-OAL method is to allow nodes to learn the optimum sleep or active action for the maximizing coverage with minimum number of active nodes while maintaining network connectivity. A subset of sensors is activated in each scheduling cycle. The performance of CCM-OAL method is evaluated with existing k-CCA and LA-PC based on three variables, the average number of active SNs, network lifetime, and rate of coverage.

Fig. 6
figure 6

Number of sensors vs. convergence time

The Fig. 7 shows that CCM-OAL allows a smaller number of sensors to be active in a single scheduling round in comparison to existing methods. The number of cover sets and lifetime of network grows as active nodes decrease in every scheduling round. The coverage rate is shown in Fig. 8 for the suggested scheme (CCM-OAL). It demonstrates that CCM-OAL offers maximum coverage with fewer active nodes.

Fig. 7
figure 7

Average number of active sensors vs. number of sensors

Fig. 8
figure 8

Coverage rate vs. average number of active sensors

Moreover, Fig. 8 shows that with the rise in the network size, the suggested scheme CCM-OAL achieve acceptable coverage over existing schemes. Furthermore, CCM-OAL has also lowered coverage redundancy to address the issue of duplicate packet creation. The Fig. 9 shown, the lifetime of network varies as deployed sensors rises. It may be observed from this figure that the network lifetime is considerably increases if the number of SNs increases. The Fig. 9 has shown the comparative analysis of CCM-OAL method with existing method. The proposed method performs better in term of network lifetime. The main reason behind this remarkable performance is that in proposed method (CCM-OAL), every SN learns its best action (sleep/active) on its own to optimize the coverage rate and preserve the network’s connectivity.

Fig. 9
figure 9

Number of sensors vs. lifetime

7 Conclusion

In this paper the CCM-OAL protocol is proposed to address the coverage and connectivity issue. This protocol optimizes overall coverage and connectivity of the network by scheduling the nodes. The adaptive learning algorithm (OAL) is applied in proposed CCM-OAL protocol. The SNs use OAL algorithm for the selection of their optimum sleep or active action. The proposed method also customizes the SNs sensing range to decrease coverage redundancy. The simulation results show that the proposed CCM-OAL protocol reduces the energy consumption, the number of cover sets, and the average number of active sensors, and increase the coverage rate in the network. The future objective of this study is to use restore of node and cut vertex failure. In the future, there is immense potential for employing machine learning algorithms to enhance coverage and connectivity in Wireless Sensor Networks (WSNs). These algorithms have the capability to predict and identify when a sensor node (SN) is likely to fail or malfunction, enabling proactive replacement or repair and minimizing downtime. Furthermore, machine learning algorithms can analyze the data collected by WSNs, identifying patterns and trends. This analysis can optimize the placement of SNs and pinpoint areas where coverage and connectivity can be enhanced. Additionally, these algorithms can facilitate the development of adaptive routing protocols that adjust routing paths in real-time, further improving coverage and connectivity in WSNs.