1 Introduction

WSNs include a set of sensor nodes which are able to measure, process and broadcast information in relation to some facts in the network environment. Sensor nodes have certain limitations with regard to bandwidth, radio range, processing capability, energy and memory [1,2,3]. In large-scale WSNs, since the required energy for transmitting the sensed data packets to the base station is high, hence, an energy-efficient routing protocol is needed for this task [4]. With regard to such inherent limitations of WSNs, particularly in the realm of the energy of routing protocols, there is a pressing need for creating communication routes between the sensor nodes and the base station. It should be noted that such protocols should be aware of energy level; consequently, they can result in the optimization of network lifetime [5,6,7,8]. In hierarchical routing protocols, nodes are divided into separate clusters and the node with higher energy level is selected as the cluster head. Other features of routing protocols include reliability, fault tolerant, scalability, information accumulation, etc. [5, 9]. LEACH [10] protocol can be regarded as one instance of such protocol.

Two stages are involved in clustering in the LEACH protocol, namely the setup stage and the steady-state stage. In the first stage, each node randomly selects a value ranging from 0 to 1. Then, according to the selected value, it makes a decision on whether or not it should function as CH in the present round. Next, its selection is advertised by CH nodes among the neighboring nodes. After that, other sensor nodes join the nearest elected CH. The nearest node is figured out through received signal strength indicator (RSSI). Then, the related CH produces time division multiple access (TDMA) schedule for the recently produced clusters. In the second stage, the member nodes within the cluster forward the produced data to the related CHs in its assigned time slot. In fact, LEACH is regarded as the fully probabilistic protocol for electing CHs which results in electing inappropriate CHs; consequently, this negatively impacts on network lifetime. Furthermore, since LEACH directly transmits data from CHs to sink, it has the scalability problem.

Since energy resources in WSNs are limited, developing energy-efficient routing protocols in WSNs is considered to be a fundamental challenge and problem [11, 12]. It can be maintained that clustering is one of the most logical ways for enhancing energy efficiency and optimizing network lifetime in WSNs [13]. It should be noted that the proposed clustering approaches and methods in related works have specific shortcomings which restrict and problematize their application in real-life networks. As a case in point, the typical selection of cluster heads from all sensor nodes in the given network leads to the production of unbalanced clusters. Also, control parameters are usually characterized manually. Furthermore, application specifications are not usually taken into consideration for adjusting and regulating the protocol [14].

It should be highlighted that selecting cluster heads (CHs) is regarded as an NP-hard optimization problem in WSNs [15]. The available clustering methods consider clusters as an object which should be modified in line with enhancing energy efficiency [16]. However, it should be pointed out that real-life problems have complicated and hybrid natures. Hence, for solving these problems intricate and sophisticated algorithms are needed [17].

In this paper, a routing protocol based on cuckoo optimization algorithm based routing protocol (COARP) is proposed which is aware of energy and capitalizes on clustering technique. It considers comprehensive information of nodes, i.e. remaining energy of nodes, distance from the base station, inter-cluster and intra-cluster distances for selecting cluster heads. Selecting optimal cluster heads in each round is assigned as the responsibility of COARP. Since FND criterion is considered as the most significant criterion in the majority of WSN applications, five free parameters with a number of trial and errors are selected in such a way that FND is maximized and can lead to a balance in energy consumption among sensors. Hence, the proposed COARP can lead to the enhancement of network life time.

The rest of the paper is organized as follows: Sect. 2 provides a brief overview of related works with regard to routing and clustering WSNs. Section 3 gives a through description of the proposed method, namely COARP which was develop on the basis of cuckoo optimization algorithm. Section 4 reports the results of simulating the proposed algorithm. Finally, Sect. 5 gives the conclusion of the paper and provides directions for further research.

2 Related Works

Energy efficiency is considered to be one of the challenges and critical issues in developing WSNs. In this regard, an energy-aware routing algorithm called ERA [18] was proposed which includes routing and clustering phase. This algorithm proved that there is no need for communicating messages for cluster heads. Here, one strategy was developed for organizing all cluster heads in different levels for creating oriented virtual backbone which was aimed at facilitating data routing to the sink node. Using this algorithm led to balancing energy consumption and the enhancement of network life time. In [19], optimal routing based on clustering and ROL and NDC load balance protocols is aimed at enhancing network life time and on-time message delivery; this routing protocol is distinguished from other protocols in three aspects; first, it uses hybrid routing parameters for creating efficient clusters with low cost; these parameters allow management and configuration to better execute users’ applications simultaneously. Second, it defines a new cluster balance method. In [20], linear programming method and particle swarm optimization (PSO) were used for optimizing the number of cluster heads, maximizing energy efficiency and improving network quality and coverage. Also, a new particle encryption scheme and fitness function were designed for finding optimal routing tree so as to connect cluster head to base station. In [21], CEBR selects a cluster head based on nodes near the optimal cluster head and the remaining energy of nodes; the energy for becoming a cluster head is distributed among the cluster members. In [22], multi-level clustering scheme based on cliques and clusters (MCCC) which is a method based on scalable and distributed hierarchical clustering, the size of cliques and clusters depends on the number of hops between cluster heads and nodes. In general, the rationale behind this method is to specify the maximum and minimum sizes for clusters and groups and minimize the hops. SGEAR is considered to be a scheme which was designed based on game theory; it takes into consideration the remaining energy of nodes and energy consumption and uses inductive backward for achieving balance. This method can carry out dynamic routing for relay nodes; hence, it consumes network energy evenly. SGEAR [23] is even appropriate for combining sleep plan and leads to the enhancement of network life time. For efficient WSN routing, two architectures can be considered: OLACR-RN architecture (opportunistic large array concentric routing algorithm with relay nodes for WSNs) and OLACRA-GRN architecture (opportunistic large array concentric routing algorithm with geographic relay nodes for WSNs). Using geographic information of relay nodes, OLACRA-GRN architecture reduces energy consumption of relay nodes and finds the optimal number of relay nodes for transmitting data. In contrast, OLACRA-RN architecture does not consider the geographic information of relay nodes. This architecture can find a number of optimal concentric arrays with regard to sensing data. The number of optimal concentric circles is measured based on the distance between the sink node and the border area [24]. In a similar vein, IHSBEF [25] method was proposed which is considered to be an improved version of HS harmony method. In this method, a number of significant revisions were made so as to better deal with the routing issue. Firstly, the encoding of harmony memory was improved according to routing features in WSNs. Secondly, new harmony method was better assembled. Also, dynamic adaptation was introduced for avoiding the lack of evolution in the early generations and for improving the capability of local search in the next generations. Thirdly, an effective local search strategy was introduced so as to optimize convergence speed and the accuracy of the algorithm. Furthermore, the operational objective of this method which considers energy consumption and route size is to enhance network life time. The combination of k-means algorithm and the improved genetic algorithm has significantly contributed to the reduction of energy consumption. That is, it reduces energy consumption by finding an optimal number of cluster heads through using the optimized genetic algorithm. For achieving balanced distribution of energy, K-means algorithm considers clustering in the form of a dynamic network [26]. In ICP [27], cluster head is locally determined with a pre-specified probability instead of voting. As a result, transmission load and clustering time are minimized until connection is made possible. In this method, ACK retransmission is eliminated. This protocol is in the distributed format and has better performance than the other methods with respect to time, energy, load balance and error tolerance. In [28], an optimal approach for cluster production was proposed by combining grid-based method and a new method for selecting concentric cluster head according to Bollinger Bands. Bollinger considers maximum node energy with the variance of the minimum energy for selecting cluster head. Using gird for creating cluster is regarded as one of the requirements of this method. Grid-based method supports scheduled messages for each grid ID. The distributed clustering routing algorithm, namely DFCR [29], is energy efficient and error-tolerant. It produces clusters based on the remaining energy of cluster heads, the distance between sensor nodes which are the members of the same cluster head and the distance between cluster heads and the base station.

A distributed LEACH-based CH election algorithm, namely LEACH-DT, was proposed in [30] which was intended to maintain energy consumption balance among all the network nodes. In this algorithm, according to their different distances from the sink, nodes are self-selected as CHs with differing probability values. A novel method, i.e. clustering algorithm based on Steiner tree in wireless sensor networks (CAST-WSN) was introduced in [31]. The following three parameters were taken into consideration in CAST-WSN: node distance from the gravity center of the cluster, from the gravity center of cluster nodes and from the energy center of nodes within each cluster. Two clustering types are obtained according to these three distances and Steiner tree structure. A function was provided in [31] for investigating and examining cluster quality. The quality of clusters in the two mentioned presented modes can be investigated and the best clustering type can be chosen. It can be argued that CAST-WSN operates properly in terms of notably optimizing C-Means clustering algorithm. Energy-aware fuzzy clustering algorithm (EAFCA) was developed in [32]; the EAFCA algorithm was able to enhance lifetime with regard to CH election, data aggregation and inter-cluster traffic stages of a multi-hop WSN environment. Since EAFCA considered residual energy, mean distance to 1-hop neighbors and 2-hop coverage of the competing nodes, it contributed to the process of energy-efficient cluster head (CH) election. Indeed, data from all the sensor nodes within its related cluster is gathered by the elected CH. Then, it is forwarded to the same base station. A new multi-branch tree-based clustering method was introduced in [33]. It was aimed at optimizing WSN lifetime. In this method, independent neighbor set features of nodes and certain branches were used for selecting cluster heads. Accordingly, in this algorithm, five branches were produced and developed at various directions according to the nature of INS. Inter-cluster communication distance was significantly reduced in this method and energy consumption of nodes were uniformly distributed in the network. Multi-objective bee swam optimization with differential evolution (MOBSO-DE) was developed in [34]. It was aimed to enhancing clustering efficiency. In this method, cluster heads were selected according to the parameters of communication energy, residual energy and energy limitation. Weighted energy-efficient clustering along with robust routing (WECRR) was proposed in [35]. This protocol was aimed at establishing balanced energy consumption and optimizing network-wide data delivery. WECRR created a deterministic approach for the uncertainties involved in cluster head election and it carries out bounded clustering mechanism. Furthermore, this protocol provides multi-level optimized routing decision making based on multi-facet attributes. Finally, it has a route maintenance strategy for handling faulty or exhausted nodes on the primary route. As a result of this strategy, retransmissions and route breakages are reduced. A novel heuristic algorithm for clustering hierarchy (HACH) was proposed in [36]. It was intended to detect inactive nodes and select cluster heads at every round. Regarding inactive node, a stochastic sleep scheduling approach was used in this method for determining nodes which can be put into sleep mode without negatively impacting on network coverage. Moreover, a novel heuristic crossover operator was used in clustering algorithm for combining two different solutions and obtaining an improved solution. HACH enhanced the distribution of cluster head nodes and coordinated energy consumption in WSNs.

3 The Proposed Method

3.1 Network Model

In the proposed method, measurements for determining cluster heads are carried out in a central control system. As shown in Fig. 1, network model is a single-hop model in which cluster heads directly communicate with the central station. In each round, the central station is aware of the energy-level and the position of network nodes. In each round, each node senses and collects surrounding information. Then, it processes information and transmits it in the form of a data packet to the cluster head. Next, each cluster head receives data related to all the member nodes of its cluster; after that, it transmits the received data in the format a packet to the central station in one hop.

Fig. 1
figure 1

Network model in the proposed algorithm

3.2 Energy Consumption Model

Energy consumption model of the proposed protocol is based on the model which was introduced in LEACH algorithm [10]. In this model, for transmitting a k-bit data packet with the d distance (between the transmitting and receiving nodes), the amount of energy consumption in the transmitting node is measured through Eq. (1)

$$E_{TX} \left( {k,d} \right) = k\left[ {E_{elec} + \varepsilon_{amp} d^{2} } \right]$$
(1)

where E elec stands for the energy consumption of the electronic circuit. Also, \(\varepsilon_{amp}\) denotes the required energy for reinforcing transmitting signals so as to send a data bit. Furthermore, for receiving a k-bit data packet, the degree of energy consumption for the receiving node is measured through the following equation:

$$E_{RX} \left( k \right) = k \times E_{elec } .$$
(2)

3.3 Overall Stages of the Proposed Method

COARP clustering method includes these stages: selecting cluster head, establishing cluster and transmitting data. The proposed algorithm has two main phases: (1) start-up phase including the determination of cluster heads and establishment of clusters. (2) Register phase including the production of scheduling program and transmitting data. In the proposed method, cluster heads are selected centrally by the cuckoo algorithm in the central station. Next, the process of establishing clusters and the register phase are carried out. The overall stages of the proposed COARP protocol is depicted in Fig. 2.

Fig. 2
figure 2

Overall flowchart of the proposed method

3.3.1 Start-Up Phase

In each round, after optimal cluster heads are selected by means of the cuckoo algorithm in the central station, a message from the central station is sent to the determined cluster heads so as to inform the related nodes about the role of the cluster head in the current round. Then, the selected cluster heads inform all the other nodes in the network about their role as the cluster head in the current round. Hence, for doing so, each cluster head broadcasts an advertisement message in the entire network. Normal nodes determine a node as the cluster head for the upcoming round; indeed, they select a node which requires the minimum energy for communicating with them (the lowest distance). This selection is carried out based on the strength of the receiving signals from different cluster heads. In other words, for each non-cluster head node, the closest cluster head is regarded as the supervisor and administrator of that node.

After each normal node decides about the cluster to which it belongs in the current round, it should inform the related cluster head. For doing so, each non-cluster head node transmits a Join-REQ message to the respective cluster head. For coordinating data transmission and avoiding data collision within a cluster, cluster heads create a TDMA scheduling program by considering the number of cluster members. Then, each cluster head transmits this scheduling program to its cluster members. As a result, it is guaranteed that no collision will occur among the messages within a cluster. Also, this condition requires all the radio elements of the non-cluster head nodes to be off in all the time spans except for their own time span. In this way, the energy consumption of all the nodes is reduced. After TDMA scheduling program is recognized by all the cluster nodes, the start-up phase is finished and the register phase (data transmission phase) begins.

3.3.2 Register Phase

The performance of the network in this phase is divided into a number of time frames; in each frame, the total nodes of a cluster transmit their data to the related cluster head in the respective time frame. In the proposed algorithm, it is assumed that all the nodes are always synchronous with one another and they begin the start-up phase with one another. For realizing this phenomenon, the central station transmits the synchronizing pulses to the network nodes. Also, for reducing energy consumption of each non-cluster head node based on the strength of the received advertisement (ADV) signal from the cluster head, a power and energy control mechanism is used for regulating communicating power with the cluster head in the current round. Furthermore, except for their own related time frames, the radio elements of non-cluster head nodes are off.

After clusters are established and TDMA scheduling table is determined, data transmission will begin and each node transmits its own data to the related cluster head in the specific allocated time. The data collected by normal nodes through carrier scene with multiple access (CSMA) method is transmitted to the corresponding cluster heads by means of a distribution code. Each cluster uses a unique distribution code and all the cluster nodes transmit their data using this distribution code. Also, cluster heads filter the received signals based on the distribution codes. When a cluster head has some data which should be transmitted, it should listen to the channel to find whether another node is transmitting data by using distribution code. If it is so, it waits a while before transmitting data; otherwise, the respective cluster head uses the code for transmitting data to the central station.

3.4 The Proposed Clustering Method Based on Algorithm

In this section, the process of selecting optimal cluster heads by means of the cuckoo algorithm in the proposed COARP method is elaborated. Cuckoo optimization is regarded as a population-based and iteration-based algorithm. In this algorithm, a random initial population is firstly produced. Then, in a repetitive cycle, two stages related to evaluating the fitness and suitability of the current population and updating the population are carried out consecutively until the algorithm termination condition is met. This condition requires that all the prespecified iterations of the algorithm are finished.

3.4.1 The Production of Random Initial Population

One possible solution for the issue of clustering sensor nodes is a binary string with the length of N where N refers to the total number of sensor nodes. As illustrated in Fig. 3, “1” indicates cluster head nodes, “0” denotes normal nodes and “−1” refers to the dead nodes in the current round.

Fig. 3
figure 3

A possible solution

In this paper, with regard to the continuous nature of search in the cuckoo algorithm, each member of the population in the cuckoo algorithm is expressed as a continuous string with N length. Indeed, N denotes the total number of sensor nodes. Then, (1 ≤ i ≤ N) i of the solution is continuously expressed in the [0, 1] interval which expresses the probability of selecting node i as the cluster head. At the beginning of the algorithm, each member of the population (each cuckoo) is randomly selected from the continuous interval [0, 1]. Also, in all the stages of the algorithm (except for the solution evaluating stage), this structure is maintained which is shown in Fig. 4. In the evaluation stage, each member of the population is converted into the standard clustering form which is illustrated in Fig. 3; next, using the purpose function, members are evaluated.

Fig. 4
figure 4

A member of population

3.4.2 Evaluating the Fitness of Solutions Through the Proposed Purpose Function

According to the proposed COARP method, nodes with more energy and less distance with the central station are selected have more chances for being selected as the cluster heads. Also, with respect to the inter-cluster and intra-cluster distances, a more appropriate distribution of the cluster heads is obtained in the entire network. In other words, an attempt is made in the proposed method to minimize the average intra-cluster distances among cluster members and cluster heads. At the same time, the distances between cluster heads should be maximized.

For evaluating each member of the population, at first, the continuous structure of the solution (shown in Fig. 4) should be changed into the standard structure. For doing so, “−1” is set for all the inactive and dead nodes. Then, according to Eq. (3), the numerical values of all the alive nodes whose energy levels are less than a threshold are changed into “0”.

$$S^{new} \left( i \right) = \left\{ {\begin{array}{*{20}l} {S^{old} \left( i \right) } \hfill & { if\quad E\left( i \right) > threshold \times E_{avg}^{live} } \hfill \\ 0 \hfill & {otherwise} \hfill \\ \end{array} } \right.$$
(3)

In Eq. (3), S old(i) and S new(i) denote the actual and new values of the solution for the i node, respectively. E(i) refers to the remaining energy of node i in the current round and \(E_{avg}^{live}\) denotes the remaining energy of all the alive nodes in the current round. Furthermore, threshold is within the [0, 1] interval. In case the threshold value is considered to be zero, no limitations and changes are applied and the solution value for all the nodes remains unchanged. In case a higher value is considered for the threshold, cluster heads are selected from nodes which have more energy. Under special conditions, it might be the case that the number of nodes with energy levels higher than the threshold is less than the total number of required cluster heads. In these cases, the threshold level is reduced in stages with the coefficient of \(\alpha = 0.99\) until the number of nodes having energy levels higher than the threshold transcends or equals the number of required clusters.

After applying Eq. (3) on each member of the population, finally, a solution is organized in the decreasing manner from the highest probability to the lowest probability. C nodes with the highest probabilities are selected as the cluster heads. Next, value “1” is set for the nodes selected as cluster heads in the solutions and value “0” is assigned for other alive nodes. As a result, each member of the population (each cuckoo) is changed into the standard clustering format which is depicted in Fig. 3.

After each cuckoo is changed into the standard clustering format, cluster head nodes and non-cluster head nodes are determined. In the next stage, each non-cluster head node is allocated to the closest cluster head and clusters are established. Next, the error degree of each k member of the population (k cuckoos) is measured through the proposed purpose function.

$$cost\left( k \right) = w_{1} \times f_{1} \left( k \right) + w_{2} \times f_{2} \left( k \right) + w_{3} \times f_{3} \left( k \right) + w_{4} \times f_{4} \left( k \right)$$
(4)

where w 1, w 2, w 3 and w 4 are fixed weighing coefficients which regulate the impact of four terms in the entire purpose function. For normalizing the equation, the total of these coefficients equals one. The four error terms in Eq. (4) are obtained through the following relations:

$$f_{1} = \frac{{E_{avg}^{live} }}{{E_{avg}^{CHs} }} = \frac{{\frac{1}{N}\mathop \sum \nolimits_{i = 1}^{N} E\left( i \right)}}{{\frac{1}{C}\mathop \sum \nolimits_{n = 1}^{C} E\left( n \right)}} , \quad i \in LiveNodes$$
(5)
$$f_{2} = \frac{{D_{avg}^{CHs} }}{{D_{avg}^{live} }} = \frac{{\frac{1}{C}\mathop \sum \nolimits_{n = 1}^{C} D\left( n \right)}}{{\frac{1}{N}\mathop \sum \nolimits_{i = 1}^{N} D\left( i \right)}} , \quad i \in LiveNodes$$
(6)
$$f_{3} = \frac{{d_{avg}^{live} }}{0.1M} = \frac{{\frac{1}{N}\mathop \sum \nolimits_{i = 1}^{N} d\left( i \right)}}{0.1M} ,\quad i \in LiveNodes$$
(7)
$$f_{4} = \frac{0.1M}{MDCH}$$
(8)

The parameters and indices of the above-mentioned equations are given in Table 1.

Table 1 Definitions of the parameters

In the proposed COARP method and the other comparative methods, the number of cluster heads was equal to the number of cluster heads of the LEACH algorithm [10].

$$C_{opt} = \frac{\sqrt N }{{\sqrt {2\pi } }} \times \frac{{\sqrt {\varepsilon_{fs} } }}{{\sqrt {\varepsilon_{mp} } }} \times \frac{M}{{d_{BS}^{2} }}$$
(9)

In Eq. (9), N denotes the number of alive nodes of the network in the current round. M refers to the maximum length of the working space (in meter); d BS stands for the average distance of the nodes from the central station. It should be noted that the optimal value for cluster heads was identical in the proposed method and the other comparative methods. Hence, the optimal probability of being cluster head (P) in the compared algorithms was equal to: P opt  = C opt /N. The following figure illustrates the pseudo code of the proposed method (Fig. 5).

Fig. 5
figure 5

Pseudo code of the proposed scheme

3.4.3 Updating Population

After evaluating the fitness of the solutions, the best solution in the current iteration is selected. Then, it is compared with the best global solution from the beginning of the algorithm until now. In case the error degree of the best solution of the current iteration is less than the error of the best global solution, the best global solution of the algorithm is updated. Next, cuckoo population is updated according to the equations of the cuckoo optimization algorithm. The stages of evaluating solutions and updating populations are carried out consecutively until the maximum iterations of the algorithm are finished.

4 Evaluating the Efficiency of the Proposed Method

MATLAB software was used for simulating and investigating the efficiency of the proposed method, LEACH [10], LEACH-TD [30], LEACH-EP [37] and ASLPR [38] in terms of energy consumption, rate of received data packet and network lifetime. All the simulations were carried out on a strong PC with 2.5 GHz processing power, 8 GB RAM memory and Windows 10 operating system.

For conducing the simulation, the locations of the sensor nodes were randomly determined in the working space. All the sensor nodes and the central station were static. Network nodes were homogenous and convergent and fusion channel was symmetric. Sensor nodes could reduce their own radio radius and enhance it up to the specified threshold. Table 2 shows the parameters of the cuckoo optimization algorithm.

Table 2 Adjusting the parameters of the cuckoo optimization algorithm

For conducting the simulations different working spaces were used by changing the dimensions of the network, number of nodes and the location of the placement of the central station. Network simulation parameters are given in Table 3. Moreover, the central station was considered in different locations. The specifications of the used working space are given in Table 4.

Table 3 Simulation parameters
Table 4 Used scenarios

4.1 Simulation Results

In the first scenario, the results of simulating different algorithms were investigated by changing the dimensions of the working space (scenarios of 1, 4, and 5). In the second scenario, the results of simulations were evaluated with regard to changing the number of network sensors (scenarios 5, 6). Also, in the third scenario, the results of simulation were examined for the changes made in the placement locations of the central station (scenarios 1, 2, 3).

  • In simulating scenario 1, as shown in Figs. 6, 7 and 8, the number of alive sensors in terms of round, the minimum network energy in each round and the total received packets in the central station in each round were investigated. As illustrated in Fig. 6, the proposed method was able to achieve a longer FND life time in relation to other methods. Also, as depicted in Fig. 7, the minimum network energy in the proposed method in all the different rounds is more than those of the other methods. Hence, the diagram drops with a milder slope. Furthermore, as shown in Fig. 8, in the majority of rounds (except for 1500–1700), the number of received packets in the central station in the proposed method is higher than those of other methods.

    Fig. 6
    figure 6

    Alive nodes versus different rounds in the first scenario

    Fig. 7
    figure 7

    View of network energy spent versus rounds in the first scenario

    Fig. 8
    figure 8

    All the delivered packets in the sink versus the rounds in the first scenario

  • Regarding scenario 2, all the conditions were identical to those of scenario 1, the only difference being the location of the central station; that is, rather than the location in the center of the scenario (50, 50), it was located in the top corner of the scenario (100, 100). Hence, the average distance between the sensors and the central station was enhanced to the previous mode (almost twice as the former). Thus, as it is expected and according to Figs. 9, 10 and 11, all the criteria of network life time and the total of received packets in the central station were decreased to about half of the former amount. Moreover, comparing Figs. 7 and 10 indicate that the diagrams of minimum network energy for each round dropped with a sharper slope for all the methods. It should be mentioned that, in each round, the majority of sensors (especially those cluster heads which are far from the central station) consume more energy.

    Fig. 9
    figure 9

    Total alive nodes versus rounds in the second scenario

    Fig. 10
    figure 10

    Network energy spent versus different rounds in the second scenario

    Fig. 11
    figure 11

    All the delivered packets in sink versus different rounds in the second scenario

  • In scenario 3, the same conditions of the first and second scenario were maintained, the only difference was related to the location of the central station. That is, the central station was outside at the right side of the scenario in (125, 50) position. In this mode, the average distance between the sensors and the central station is approximately similar to that of scenario 2. According to Fig. 12, the criterion of network life time was similar to scenario 2. Also, as shown in Fig. 13, minimum network energy in each round drops with a slope in all methods which is similar to that of scenario 2. In a similar vein, the majority of sensors in the second scenario consume more energy than the first scenario.

    Fig. 12
    figure 12

    All the alive nodes versus different rounds in the third scenario

    Fig. 13
    figure 13

    The minimum network energy spent versus different rounds in the third scenario

  • In scenario 4, all the conditions were similar to scenario 1, the difference being that dimensions of scenario became 50% larger and the number of sensor was doubled. The number of received packets in the central station is directly associated with the number of sensors. Also, as network dimensions increase, both network life time and the number of received data packets decrease. Hence, it is expected that network life time is less than scenario 1 and more than scenarios 2 and 3. Figure 14 depicts the number of alive sensors in each round.

    Fig. 14
    figure 14

    All the alive nodes versus different rounds in the fourth scenario

  • In scenario 5, the dimensions of scenario were 33% larger that scenario 4 and the number of sensors was 50% more than those of scenario 4. Hence, it is expected that, as illustrated in Fig. 15, network lifetime in this scenario is less than that of scenario 4.

    Fig. 15
    figure 15

    All the alive nodes versus rounds in the fifth scenario

  • In scenario 6, all the conditions were similar to those of scenario 5. The only difference was that the number of sensors was doubled. Hence, it is expected that network life time, number of alive sensors and the total of received packets in the central station were almost similar to those in scenario 5. As depicted in Figs. 16 and 17, simulation results prove these conditions.

    Fig. 16
    figure 16

    All the alive nodes versus rounds in the sixth scenario

    Fig. 17
    figure 17

    Number of delivered packets in sink versus rounds in the sixth scenario

In investigating network efficiency with regard to the changes made in network dimensions and as it is expected from energy consumption in Eqs. 1 and 2, the results of simulation indicate that there is an inverse relationship between network dimensions and network lifetime. That is to say, as the network size increases, network lifetime will decrease and as the network size decreases, network lifetime will increase. This phenomenon is attributed to the fact that the radio term of energy consumption in Eq. (1) has a direct relationship with exponent 2. Indeed, the most fundamental criterion for evaluating sensor networks is considered to be FND life time. Figure 18 compares the FND value in different algorithms in scenario 1, 4 and 5. It should be noted that the position of central station in these three spaces is in the center of scenario.

Fig. 18
figure 18

Comparison of FND in different algorithms with regard to network dimensions

For evaluating network efficiency with respect to the changes made in the number of sensors, it was found that changing the number of network sensors does not have a significant impact on network lifetime. In fact, it should be noted that there is one additional energy source in the network for each extra sensor. Figure 19 illustrates the comparison of the FND degree in different algorithms with regard to the changes made in the number of sensors in scenario 5 and 6. The dimensions of scenario and the location of central station were identical in scenario 5 and 6. The only difference was related to the fact that scenario 5 includes 150 sensors and scenario 6 includes 300 sensors.

Fig. 19
figure 19

Comparison of FND in different algorithms with regard to the number of sensors

Regarding the evaluation of network efficiency for the changes made in relation to the location of the central station, it was noticed that as the distance between the sensors and the central station increases, network lifetime decreases. For investigating and analyzing this phenomenon, scenarios 1, 2 and 3 with respect to FND lifetime were examined which is depicted in Fig. 20. All three spaces had identical dimensions (100, 100) and 50 sensors were allocated to each scenario. The only difference was related to the location of the central station. In other words, the central station was in the center of the scenario 1; in scenario 2, it was in the top corner; in scenario 3, it was outside on the right. As it may be expected, network lifetime in scenario 1 was about twice of those in scenarios 2 and 3.

Fig. 20
figure 20

Comparison of FND in different algorithms versus sink position

In line with the results of the evaluations, it can be maintained that the proposed method was more efficient than the other methods in terms of the majority of the respective criteria (except for LND lifetime). However, it should be noticed that the proposed method requires more execution time which is attributed to executing cuckoo optimization algorithm (since it is a population-based and iteration-based algorithm). Consequently, the proposed method had more delay than the other methods. In fact, there must be a balance and trade-off between efficiency and computational speed. Yet, the proposed method had a better balance than the other methods.

5 Conclusion and Directions for Further Research

With regard to the inherent limitations of WSNs in terms of energy, routing algorithms of WSNs should be designed in such a way that they must be aware of energy. The most effective routing method are the ones which are based on clustering. Clustering-based methods divide network nodes into clusters and select a representative in each cluster, i.e. cluster head. In this way, these methods are aimed at achieving an energy balance in the network. In this paper, an energy-aware routing method based on a novel clustering was proposed which is referred to as COARP. In this method, in each round, the cuckoo algorithm is responsible for selecting optimal cluster heads of network. Indeed, the following four criteria were used for selecting cluster heads in the purpose function of the cuckoo algorithm: the remaining energy of sensor nodes, distance from the central station, intra-cluster distances and inter-cluster distances. Also, for ascertaining that low-energy sensors are not selected, an energy threshold was determined. When compared with LEACH [10], LEACH-DT [30], LEACH-EP [37] and ASLPR [38], the results of simulations revealed that the degree of optimization of FND in the proposed method were 103.2, 95, 8.8 and 2.5% respectively.

As mentioned earlier in the paper. It should highlighted that the protocol proposed in this paper was aimed at WSNs with stationary sensor nodes. As a direction for further research, the proposed protocol can be extended for managing mobile sensor nodes. Furthermore, in case further parameters such as coverage redundancy, node centrality and other related parameters are included, COARP performance might be enhanced which should be addressed and investigated in future works. Last but not least, quality of service (QoS) parameters such as reliability, fault tolerance and delay should be further optimized in the routing protocols.