1 Introduction

Energy is a limited resource in the WSN. However, WSNs have more stringent network lifetime requirements, and recharging WSN node batteries is a vital strategy for supporting extended network lifespan. As a result, more energy must be conserved in a more efficient manner, and various energy-saving techniques must be developed in order to reduce energy waste [12]. A heterogeneous network is one that links computers and other devices that use diverse operating systems and protocols. Diverse connection methods are utilized in dissimilar networks, which can be found in wireless devices. When a user switches from one network to another, the user’s diverse network connection should be preserved invisibly or service degradation. Clustering structured routing protocols with data aggregation capabilities are intended to improve network energy efficiency [9]. We evaluate the results of clustering techniques for WSNs depending on network life duration, speed, and stability period. Data from sensor nodes is passed to cluster heads, which are in charge of relaying this data to a sink located far away. For networks, clustering such as LEACH and DEEC have met realistic goals in terms of improved network quality. To prevent squandering network resources, we often utilize the programming approach with WSN to extend the network’s lifespan [19]. Most of the nodes are put into a sleep state in sleep programming to increase the network’s lifespan. Sleep programming is critical for a network to become more cost-effective and adaptable. The primary goal of the sleep programming algorithmic rule is to evaluate the network over a lengthy period of time. With sleep programming, several techniques like as routing and tree-based algorithmic rules are used, which ostensibly increase the network’s capacity. By transmitting request messages to the Access Point(AP) at random times, every node tries to sleep at the present time and wake up at a later time. The node will go into sleep mode and wake up at the time set by the AP only if the request is approved by the AP. To discuss the precise processes at the node, the process will start with a basic situation in which the WLAN’s AP serves downlink traffic to only one node. The technique is then expanded to handle multiuser scenarios and uplink traffic [5].

The SEED clustering method is developed, which makes use of the sleep-awake process. In this strategy, sub-clusters are formed by joining two or more nodes from the same program that are within the same network area. Only one sensor node gets up in a paired group to feel the environment and send its observed information to the cluster head, while the other nodes remain in a sleep state to conserve battery life. SEED also employs traditional TDMA in the coupled groups, resulting in increased energy usage [3]. Asynchronous sleep solutions strive to keep the transceiver in its normal sleep state while temporarily waking it up to check for congestion. Each sensor node has two radio transponders included in the architecture. By default, the main (data) radio is turned off. The standby transmitter is a low-power, always-on wake-up radio. Whenever the auxiliary transceiver receives a remember waking to signal from another, it instructs the main radio to wake up as well, allowing information to be transferred [18]. Sleep scheduling in the SEA is an energy-efficient algorithm that takes into account the diversity and redundancy of nodes. The simulation results suggest that it has a longer network life than standard methods while also being less complicated [17]. The Energy Aware Sleep Alert Sensor Network Routing Algorithm is improved by the unique routing algorithm for heterogeneous WSNs. The I-EESAA idea is the clustering approach, which aimed to create clusters of sensors with the same user type and placement in the same network region. Following the formation of the groups, one sensor in each cluster stayed active while the others went into sleep state [8].

As WSN consists of very limited energy resource and in certain circumstances, charging a battery is extremely difficult, we proposed a method Adaptive Active Sleep Energy Efficient Method (AASEEM) that emphasize the necessity of network optimization to improve cluster head selection procedure. The main contributions of the proposed AASEEM method are as follows:

  • A Heterogeneous network is built with a sensor field of size 100m x 100m with an initial energy of 0.5J for all nodes.

  • CHs (Cluster Head) are chosen in the proposed AASEEM based on their remaining energy. To conserve energy, AASEEM nodes alternate between sleep and active states.

  • Improving the network stability and the efficient way of selecting the cluster head is proposed in this method.

  • Using this proposed approach results in the existence of more alive nodes and an increase in the network lifetime.

  • The simulation parameters like the number of packets to base stations, dead nodes, throughput, count of cluster head, average residual energy, alive nodes and network stability are compared with existing state of art methods such as SEP, DEEC, DDEEC, and Z-SEP.

The proposed AASEEM (Adaptive Active Sleep Energy Efficient Method) is organized clearly as follows: Section 2 provides the literature survey of the existing and recent research papers. Section 3 provides the proposed AASEEM methodology along with its flow chart. Section 4 provides the evaluation of the proposed method and its simulation outcomes. Section 5 provides the conclusion of this research paper.

2 Related work

The local cluster head in LEACH is rotated randomly. In a homogeneous context, LEACH works well. Every node in LEACH has an equal chance of becoming the cluster leader. However, in a heterogeneous setting, it is not well adapted. The impact of effective CH selection on resource consumption is significant. In LEACH, the CH is chosen based on the likelihood of the present round. As a result, the CH selection is not consistently distributed, resulting in unconnected nodes [14]. An Energy Efficient Sleep and Wake-up Timing Method is used to save energy and prolong the lifespan of networks. The nodes will modify their sleep-wake cycle schedules during each phase. A self-adaptive sleep/wake-up scheduling technique that considers both energy balance and packet delivery is proposed. As a result, the duty-cycling technique is not required in this approach [16]. The sleep-awareness of energy and traffic methods improves energy efficiency and load balancing. Unlike previous systems, ETASA alternates between sleep and waking modes dependent on the energy and traffic rate of the linked nodes. To interact with the sink, Z-SEP employs two methods. Direct communication is one technique. Transmission through the Cluster head [4]. The authors took advantage of the problem of energy waste multi-hop transmissions when the duty cycle is low, and subsequently provided node sleep scheduling in WSNs. The on-demand planned route was displayed. When compared to asynchronous routing protocol under sleep planning, this networking boosts energy efficiency by 20-30 percent.

Content-based Adaptive Scheduling employs sending and receiving paradigm. It is used to limit the sending of redundant packets of data and prevent duplicated data values and has been applied at the component level to extend the life of WSNs and conserve valuable energy at the node level. In order to conserve energy, EESAA nodes alternate between sleep and active states [20]. The network’s stability duration and lifetime have been maximized in this method. DEEC aligns the spinning epoch of every node with its energy. Energy nodes will have more opportunities to be leaders than those with lesser energy. In DEEC, huge energy nodes are likely to convert cluster chiefs than minimum nodes [1]. In the SEP, ordinary and advanced nodes are allocated at random. When the most of ordinary nodes are placed distant from the bs, high energy is consumed while sending data, the stability time is shortened, and the throughput is decreased [11]. As a result, SEP’s efficiency falls. SEP is a heterogeneity protocol that extends the time gap between the first node’s death and the conclusion of the stability period. The SEP is calculated using the balanced electoral likelihood of every node shifting a group leader based on the amount of energy remaining in each node [2].

Kalburgi et al. [7] suggested a method that uses a fitness metric that takes into account energy, distance, and latency to make an informed CH selection. Then, the modified k-Vertex Disjoint Path Routing (mod-kVDPR) method, developed from kVDPR by modification with parameters including connection dependability and throughput, is used to route the data. Finally, route maintenance is activated to monitor data packet deliveries and the record failed links. 50-node and 10-node simulation networks are used to evaluate the effectiveness of the suggested technique. Traditional methods such as Herding Optimization-Greedy and Grey Wolf Optimizer are contrasted with the suggested system, along with the Distributed Energy Efficient Heterogeneous Clustering methodology and the Tabu particle swarm optimization. Rao et al. [15] suggested Competitive swarm optimization (CSO)-based algorithms to deal with the “Hot spot” problem. These algorithms are called CSO-UCRA, which stands for “CSO-based Unequal Clustering and Routing Algorithms.” First, the CSO-based CH selection method was introduced. Next, the non-CH sensors were assigned to CHs based on the CH proficiency function. Finally, a route method based on CSO has been shown. For these algorithms, efficient particle encoding schemes and new fitness functions have been made. The CSO-UCRA is simulated a lot with different numbers of sensor nodes and CHs for different WSN scenarios. The results are compared with some recently developed algorithms and a standard meta-heuristic-based algorithm called PSO-UCRA to show how well it works in terms of different performance metrics.

Mukherjee et al. [10] proposed a way to set up contact in a Wireless Multimedia Cognitive Radio Sensor Network (WMCRSN) that is both cheap and fast. Dynamic channel modeling is used to figure out how much power to give to sensor nodes, and Distributed Artificial Intelligence (DAI) with multiple agents is used in WMCRSN applications to give out the power. The method is new because it analyses the real-time spectrum sensor outputs system for high data rate wireless video apps. The DAI gives power to sensor nodes in a smart way so that sensor nodes can talk to each other quickly within and between clusters. The network’s success factors, such as the chance of finding something and the chance of getting a fake alarm, along with the estimated error rates, are presented. Raghava Rao et al. [13] suggested a diverse network with a long life, high speed, and low energy use. Specifics must be given for things like Area, Nodes, Sink location, and Data Aggregation. With this method, the cluster head is chosen based on throughput, data transfer rate, the study of live nodes, and a decrease in the amount of energy each node uses. But it’s hard to make an integrated IoT system. We thought about the ADEEC method for self-managing cellular networks, which makes the networks work better and last longer. Messages can be sent more easily in different situations than they are right now. Due to the way high-data-rate, bursty video traffic is sent over a lossy wireless link, Wireless Multimedia Sensor Networks (WMSNs) often get backed up. So, it is very important to change the sending rate of source nodes based on how the network is working. Javaid et al. [6] explained the problems of rate adaptation and crowding control in WMSNs. At the transport layer, there is a proposal for a traffic-aware congestion control (TACC) protocol that works on the end-to-end concept. The suggested protocol uses information about burst loss to find out if there is congestion at the target and tells source nodes how to change their reporting rate. Simulations are used to test the suggested protocol. The results show a big increase in terms of packet loss, end-to-end delay, packet delivery rate, and picture quality.

3 Proposed work

Our objective is to reduce energy usage as much as possible in order to improve network stability and longevity. We introduce the Adaptive Active Sleep Energy Efficient Method (AASEEM), a novel network routing strategy which is depicted in Fig. 1.

Fig. 1
figure 1

Flowchart of AASEE method

3.1 Adaptive active sleep energy efficient method

In the proposed method, Sensor nodes with the same purpose and close proximity will form a pair for data network communication. After each data transmission period, the pair nodes shift between “sleep” and “active” modes. We additionally improve the CHs election approach by picking CHs based on the node’s residual energy.

3.1.1 Prototype of pairing network

Initially, sensor nodes use GPS to determine their location. The nodes send to the Base Station their position, application model, and node Identification (BS). The information obtained is then used by the sink to compute the distance between nodes. BS Couples nodes that are within their intra-cluster radio range and have the same function. BS then sends the coupling data to every network node. The connected node is recognized by the nodes. Some nodes are kept out of the coupling process because they are outside of any other node’s inter-cluster transmission range. In the proposed technique, the nodes switch between “Sleep” and “Awake” mode throughout a single interval of transmission. If the distance between the BS and the paired node is less than that between BS and coupled node, the node in the pair enters Awake mode, also termed as Active-mode. In the Active region, the node gathers data from its surroundings and delivers it to the CHs. The connected node’s transmitter stays switched off and enters the Sleep state. Sleep-state nodes cease communication with CHs and instead monitor the network’s status. During the following communication period, nodes that are currently in The active state will be switched to the Sleep state, while nodes in the Sleep state will switch to the Awake state. We can conserve energy by not communicating with the CHs when nodes are in a Sleep state. Nodes in the sleep state conserve energy by reducing tapping and idle monitoring. Once their energy supplies are depleted, confined nodes remain in an Active state.

3.1.2 Phase of network establishment

Using a distributed approach, the ideal number of CHs is chosen. At first, each node has the same quantity of energy. In the present round, each node in the Leach algorithm decides to choose whether or not become CH. The choice is dependent on the desired proportion of CHs each round, R. Leach permits that after each 1/R round, every node becomes CH to ensure an average number of CH (RN) for N nodes. The number of rounds that a node takes to become CH is referred to as an epoch. After the first cycle, the energy of nodes in a network cannot be similar. If the span for certain high-energy and low-energy nodes is the same, these have a similar chance of becoming cluster heads. Because the CH duties are not distributed properly, nodes with low energy will perish rapidly in comparison to nodes with high energy. The CH election is decided by nodes in Active mode. When all nodes in Active-mode have a similar initial energy Eo, they will elect themselves as CHs using a distributed approach based on the probability of picking cluster head in the first round. Once the nodes have the similar starting energy Eo in the first round, nodes in Active-mode will select themself as CHs using a network model based on the likelihood of selecting CH. Every node elects an arbitrary number between 0 and 1 and checks it to a threshold T,

$$\begin{aligned} T={\left\{ \begin{array}{ll} (\frac{R}{1 - R*((1^ST\ Round)\text {mod}\frac{1}{R})}) &{} \text {if n }\epsilon \text { M}.\\ 0 &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$
(1)

In the first round, M represents the collection of nodes that are active. If a node’s arbitrary number is smaller than the threshold T, the node will choose itself as a CH and is referred to as Root-Cluster-Heads (RCHs). When a node is designated as the RCH, sends out an ack information to the entire network. Only Active-state nodes hear ack message from various RCHs, and they choose their RCHs based on the commercials’ Received Signal Strength Indication (RSSI). To avoid collisions, when an Active-mode node determines which group it wants to join, it sends a request to that RCH through the Carrier Sensed Multiple Access (CSMA) MAC protocol. Active nodes additionally send their energy data to RCH in addition to requests. The RCH calculates the residual energy and its distance from each node before choosing a cluster head for the following cycle, known as Child-Cluster-Head (CCH). CCH is chosen on the node’s highest remaining energy. If nodes with the same remaining energy are selected as CCH, the node with shortest distance from RCH is chosen. When RCH chooses CCH, it establishes a TDMA communication schedule for the linked nodes. The RCH then broadcasts CCH information and TDMA schedules for its cluster’s related nodes. In each TDMA slot, every node in the group sends information to RCH.

3.1.3 Transmission stage of the network

During their designated TDMA slots, total nodes in Active-state broadcast observed data to cluster head. Nodes in Sleep state do not participate in network transmission and hence save energy by going off their radio. Cluster heads collects information from every node and sends it to the sink. Data aggregation is an important signaling strategy for compressing the quantity of information. A significant quantity of energy is saved due to the data aggregation approach. If S is the -9pt total nodes and T is ideal number of cluster heads, each cluster has an average of nodes.

$$\begin{aligned} (\frac{\text { S}}{T} - 1) \end{aligned}$$
(2)

To attain an acceptable SNR, the transmission of a non-Cluster Head node wastes ETX to engage the transmitter circuitry and Eamp to power the transmit amplifier. As a result, a non-CH node grows for KC bit message transmission.

$$\begin{aligned} E_{non-CH} = (\frac{\text {\ S}}{T} - 1) X E_{TX} X K_{C} X E_{amp} X K_{C} X d^{2}_{to CH} \end{aligned}$$
(3)

Receiving information from non-cluster head nodes through the CH transmission in each cluster expands:

$$\begin{aligned} E_{r} = (E_{RX} X K_{C}) (\frac{\text {\ S}}{T} - 1) \end{aligned}$$
(4)

where ERX is energy wasted by the receiver circuitry while receiving data. CH expends energy to aggregate info from its linked nodes.

$$\begin{aligned} E_{AGG} = (E_{A} X K_{C}) \frac{\text {S}}{T} \end{aligned}$$
(5)

ET is dissipated by CH in order for aggregated data to be sent to the BS.

$$\begin{aligned} E_{T} = E_{TX} X K_{A} X E_{amp} X K_{A} X d^{2}_{to BS} \end{aligned}$$
(6)

where KA is the aggregated data and d2to BS is the distance between CH and sink. The total energy wasted by cluster head throughout a round is as follows:

$$\begin{aligned} E_{CH} = E_{r} + E_{AGG} + E_{T} \end{aligned}$$
(7)

The total energy wasted by CH is the energy spent during data receiving from its related nodes, data aggregation, and information transfer to the sink. The following is the flow chart of the proposed AASEE method.

3.1.4 Phase of node mode configuration

Every node determines whether to go into sleep or active state for the following cycle. The active node initially determines whether or not it is CCH. If it is not CCH, the transmitter will be turned off and the device will go into a sleep state. If it gets elected as CCH, it will remain active until the following round. If their paired partner is not designated as CCH, sleep-mode nodes become active. Nodes that are not connected with another node will stay active for the duration of their lives.

3.1.5 Parameters for simulation

The mathematical formulation was further developed using the Matlab software, in which the following parameters were provided and unique graphs were made to show our research’s purpose. In Table 1 below, we’ve listed the parameters of our simulation.

Table 1 Parameters for simulation

4 Results & simulation analysis

Comparative simulations using different procedures are used to assess the AASEEM performance. Our methodology is written in MATLAB, which provides the benefit of a modeling approach. In MATLAB, the simulation time taken by an algorithm to execute until a termination criterion is met is not the same as the actual clock time. This is because of the reason that the time taken by an algorithm to run depends on multiple factors such as algorithm complexity, step sizes, and the speed of the computer processor. To evaluate and analyze the AASEEM method conduct to those of other methods such as SEP, Z-SEP, DEEC and DDEEC.

4.1 Heterogeneous network

In a heterogeneous network, we build a sensor field with a size of 100m x100m, all nodes have equal initial energy of 0.5J. We distribute a 100 of different sensor nodes like normal, advanced, Supernodes are deployed randomly and Base Station (green) is located at the coordinate field (70, 70) as shown in Fig. 2.

Fig. 2
figure 2

Heterogeneous network

The Fig. 3 shows that sensors are randomly deployed in heterogeneity network. Nodes will elect its own Cluster Head (black) for contact with a sink (green) indicated with star symbol. This cluster head will form a group and it take care of its nodes. Cluster Head is liable for all routing and Communication is completed within the specified time frame, and local data is aggregated prior to transfer.

Fig. 3
figure 3

Nodes to cluster head to base station formation

Figure 4 tells Clusters are formed by dividing sensor nodes into groups. There would be a leader in each cluster called Cluster Head (CH). CHs control the network, conduct data fusion, and deliver processed data to the sink (star green) via other CHs. Every sensor node is part of a single group and communicates with the cluster leader.

Fig. 4
figure 4

Cluster formation

4.2 Network stability

The suggested approach AASEEM significantly outperforms the SEP, DEEC, DDEEC, and Z-SEP methods when it comes to the amount of nodes that are still alive. Figure 5 depicts the comparison graph. Stability period will track the time it takes for the network to run from the start till the first node perishes.

Fig. 5
figure 5

Network stability

This evaluated results reveals an improvement in the network’s stability duration where the first node perishes at 2876\(^{th}\) round for the proposed method whereas SEP perishes the first node at 1137\(^{th}\) round DEEC perishes the first node at 1243\(^{rd}\) round, DDEEC perishes the first node at 1297\(^{th}\) round and Z-SEP perishes the first node at 1137\(^{th}\) round. Hence the proposed AASEEM long lasts and improves the stability and the network performance when compared to existing schemes.

4.3 Alive nodes

From the Fig. 6, first node for SEP, DEEC, DDEEC, Z-SEP methods and Proposed method AASEEM dies at 1137,1243,1297,1614,2876 round. According to the graph, even after 2000 rounds, the number of living nodes utilizing the new approach was larger than that of previous methods. The network lifespan has grown, the network has been active for a longer amount of time, resulting in improved throughput for proposed method. Similarly, on the 6000\(^{th}\) execution round, the newly developed AASEEM method presents a maximum of 13 living nodes, whereas all other methods reached 0 nodes. The nodes in our proposed approach are kept alive for a prolonged amount of time. More data packets are transferred to the sink, resulting in a decrease in energy usage. Our new AASEEM approach definitely outperforms than SEP, DEEC, DDEEC, and Z-SEP, and it increases network stability and longevity.

Fig. 6
figure 6

Alive nodes vs number of rounds

4.4 Packets to base station

The AASEEM approach employs a well selected set of CHs. This method efficient CH selection algorithm allows data to be transferred to the BS in a more reliable and consistent manner. AASEEM transmits less data to the sink during the initial rounds due to the node’s active sleep approach.

Fig. 7
figure 7

Packets to BS vs number of rounds

It has the greatest data rate after 4000 rounds as shown in the Fig. 7. Although AASEEM provides a sleep-active strategy for nodes and less data is delivered to sink, data delivery to sink is much more successful than other approaches. In compared to SEP, DEEC, DDEEC and Z-SEP, the proposed approach is more efficient in terms of effective data transmission and has a higher number of packets transmitted to the BS. The base station’s total number of packets received rises in direct proportion to the network lifespan.

Fig. 8
figure 8

Dead nodes vs number of rounds

4.5 Dead nodes

Figure 8 shows the dead node examination of the AASEEM approach using the available SEP, DEEC, DDEEC, and Z-SEP methodologies under the application of 100 nodes. For example, on the execution round 4000, a low value of 20 nodes is dead by the AASEEM technique, while high values of 90, 99, nodes are dead by the Z-SEP, SEP methodology, and DEEC, DDEEC nodes all are dead at that round. Furthermore, on the 6000\(^{th}\) execution round, the newly designed AASEEM scheme expires the minimum count of 87 nodes, and all nodes are dead by the SEP, DEEC, DDEEC, and Z-SEP techniques. When compared to previous methods, the proposed AASEEM achieved the longest network endurance.

4.6 Throughput

The quantity of data packets transferred in a given amount of time. Figure 9 for a 2000 round, As the simulation round lengthens, the throughput figures grow. This accomplishment can be related to the elimination of packet losses during data transmission. The average rate of successful packet delivery. In this case, the total number of packets transferred to the base station and cluster head during a given time period is tracked, and a cluster head is created. We find that in the early rounds, the DEEC, DDEEC and Z-SEP receives the most packets among the proposed methods due to the frequency with which they communicate data. The AASEEM produces higher throughput in the final rounds. The reason for this is because the AASEEM network is the most stable and has the longest network lifetime compared to others.

Fig. 9
figure 9

Throughput vs number of rounds

The throughput value grows with packet size and then begins to decline until it reaches the saturated value. Increasing packet size indicates increasing data volume, which increases throughput as shown in Fig. 10.

Fig. 10
figure 10

Comparison of packets for all methods

4.7 Count of cluster head

Figure 11 depicts the outcome of our simulation about the number of cluster heads comparison. We notice that the number of cluster heads in the proposed approach stays constant for a longer duration of time than others since the residual energy idea utilized allows the nodes to communicate with one another. The clusterhead with the most energy will be the leader for the next round as well. Every round, a random number of CHs is picked, however AASEEM has certain patterns and controlled cluster heads selection, and an efficient CHs selection method aids it in improved and consistent data rate transmission to sink. As a consequence, AASEEM has a larger stable area of cluster heads than SEP, DEEC, DDEEC, and Z-SEP.

Fig. 11
figure 11

Count of cluster head vs Number of rounds

4.8 Average residual energy

The remaining energy among all nodes was analyzed using the proposed method. The total network’s leftover vitality of the proposed method is more than that of the current framework such as SEP, DEEC, DDEEC, and Z-SEP methods which is depicted in Fig. 12. The information of the adjacent nodes is used as one of the essential components of the chosen cluster head, which successfully reduces the hot zone problem of the cluster forwarding node. The more expanded nodes that are active, the more consistent the energy use. The suggested approach consumes more energy than other current methods. We note that the energies of SEP, DEEC, and DDEEC are dispersed early and entirely depleted before 4000 rounds, but Z-SEP is expended by 6000 rounds. As a consequence, the suggested AASEEM technique outperforms in energy balance.

Fig. 12
figure 12

Average residual energy per rounds

The simulation results of different parameters in comparison with existing methods is shown in Table 2.

Table 2 Specifications of the real-time embedded applications

5 Conclusion

We provided a better optimal routing technique in this paper. For Wireless Sensor Networks, the primary goal was to improve cluster-head selection process. CHs are chosen in AASEEM based on their remaining energy. In order to conserve energy, AASEEM nodes alternate between sleep and active states. The network’s stability duration and life time have been maximized in our proposed strategy. When compared to some of the existing schemes, such as SEP, DEEC, DDEEC, and Z-SEP, simulation results demonstrate a considerable improvement in all of these characteristics. In the future, we will examine modulation and coding schemes to improve network efficiency and reliability.