1 Introduction

The wireless sensor network (WSN) is a set of multiple micro sensor nodes and these nodes are capable to intellect the environment and gather data from its surroundings, then data is forwarded to the sink (Yang et al. 2013). WSN has a wide range of applications such as military, industrial, healthcare, environmental monitoring, agriculture, and intrusion detection etc. (Pantazis et al. 2013; Kumar and Kumar 2018). In WSN, nodes have restricted energy capability, and in several application nodes are positioned in the harsh ambiance thus it is difficult to replace or recharge the node’s battery (Han et al. 2014). Thus the effective utilization of energy is necessary to enhance the lifetime of nodes. The node’s energy is utilized to perform operations such as sensing, transmitting data, receiving data and data aggregation in the network. Data aggregation is a process in which multiple copies of common data are removed and uncorrelated noise among the data is reduced (Siavoshi et al. 2016). In WSN, data is routed to sink through a path made of the nodes (Juhi et al. 2015). Nodes can communicate with the sink through single-hop or multi-hop traffic pattern. The direct communication between nodes and sink takes place in single-hop communication contrarily communication occurs through intermediate nodes in the multi-hop communication (Pesovic et al. 2010). In single hop traffic, if the sink is located far away from the observing field, then nodes deplete their energy quickly (Touati et al. 2017). The multi-hop communication is generally better than single hop communication in term of energy efficiency because of the channel characteristics. However, the energy hole problem occurs during the multi-hop communication, as the nodes closer to sink deplete their energy quickly due to substantial relay traffic (Chen et al. 2009).

The concept of clustering with a hierarchical topology is introduced in order to diminish the long distance communication between nodes and sink which yields less energy depletion of nodes. The major perspective of clustering is to extend the lifespan of the network. In addition to extended lifetime, clustering delivers better load balancing and also reduces the data packet collision (Gupta and Pandey 2016). In clustered network, nodes are assembled into groups denominated as clusters and each cluster has a representative node which is known as the cluster head (CH). The nodes other than CH are manifested as cluster members (CMs) (Shankar et al. 2016). The CH assembles data from the CMs and an aggregated form of data is conveyed to the sink. Apart from managing the activities of the cluster, CH senses the environment and also acts as a relay node for upstream CHs. Therefore, energy depletion in CH is more than the normal nodes (Al-Karaki and Kamal 2004). The energy dissipation level of the CH depends on its position, cluster size, and sink location to which data has to be transferred.

The sink position can be static or dynamic/mobile that depends on the requirement of the network (Jayram and Ashoka 2016).To understand the pros and cons of mobile and static sink, let’s consider an example. Suppose there is a network which dispersed geographically in a vast area and it has a static sink, then the data transmission can become difficult for far located nodes since those nodes have to spend a higher amount of energy to access the sink. However, this could become quite convenient for far located nodes if the sink is mobile. As the sink moves persistently from one location to another due to which the nodes located at a far distance can transmit data without spending high amount of energy. Therefore the static sink node concept is replaced with a mobile sink node in some of the applications to enhance the network stability (Hamida and Chelius 2008). The mobility of the sink leads to the better load balancing in terms of energy consumption of the nodes and also resolve the energy hole issue (Curry and Smith 2016). Mobile sink also provides data security as it moves from one location to another location, thus to fetch the location of the sink becomes difficult. Hence it secures the WSN from malicious users. Besides this, it is also responsible to increase the network lifetime and decrease the packet drop rate of a network by balancing the load of routed data among sensor nodes (Verma and Prasad 2017).

In this study, a mobile sink based energy aware clustering (MSEAC) protocol using the firefly optimization technique is developed. The sensor nodes contain restricted energy resources and also it is impractical to recharge and replace node’s battery in many real time situations; these limitations motivate to develop a routing protocol to utilize the energy resource astutely so that the operational lifespan of the network can be enhanced. A novel attempt is made in the proposed MSEAC protocol to enhance the network lifetime and packet delivery ratio with reduction of packet delay. In the proposed work the entire monitoring area is divided into rectangular regions and initially the sink is in the middle of the monitoring field. The nodes within the premises of particular region form a cluster. The firefly optimization based algorithm is used for the CHs selection in each region. The remaining energy, distance between node to node and the distance to the sink are the decisive parameters for the CH selection. After the selection of the CHs, sink computes the centroid point of the CHs and moves to that centroid location for the current round. The sink mobility approach reduces the delay and transmission cost since sink can move towards the CHs to gather the data. The sink changes its position in every communication round, thus it is difficult to fetch the position of the sink consequently enhance the network security.

This paper is arranged in a way that Sect. 2 comprises the related work that had been done by various authors to develop energy efficient routing protocol. Section 3 describes the proposed MSEAC protocol in terms of division of network, mobility pattern for the sink, CH selection process, and data routing. Section 4 illuminates the parameters that are used for evaluating the performance of the proposed MSEAC protocol. Section 5 discusses the simulation results of the proposed scheme and its comparison with existing protocols. The conclusion of the paper is given under Sect. 6.

2 Related work

Various authors proposed prominent energy efficient routing protocols based on the clustering technique. Heinzelman et al. (2002) developed a clustering based protocol low-energy adaptive clustering hierarchy (LEACH) protocol. LEACH is a pioneer hierarchical protocol in which various clusters are formed in entire network and the CHs are selected randomly. CMs sense the data and send it to CH. The CH aggregates and compresses the data gathered from CMs and forward it to the sink. The randomized rotation of cluster heads is used to evenly distribute the energy load among the nodes in the network. LEACH protocol reduces the number of direct transmissions in network, and data aggregation at the CH also reduces the number of data packets. The CMs can operate in low power sleep mode until their transmission slot comes. Thus the overall energy consumption of network is reduced that significantly enhance the network lifetime. The major disadvantage of LEACH is that the selection of CHs is random thus the optimum number of CHs is not guaranteed. Another shortcoming is that all nodes have the same probability to become a CH; therefore node with small residual energy has the same probability to become CH as the node having higher residual energy. Various variants of LEACH protocol are proposed by researchers to overcome these shortcomings. Vijayvargiya and Shrivastava (2012) developed a new protocol termed as amend LEACH (A-LEACH) which elects the CH on the basis of the weighted probability of the nodes along with their remaining energy. The nodes are heterogeneous where some nodes have higher initial energy. This protocol provides the optimal clustering that improves the network lifespan. A-LEACH is appropriate for certain application specific scenarios where the initial energy of nodes is different. Salim et al. (2014) introduced the evolved form of clustering technique named as PR-LEACH. This technique is implemented to balance the energy dissipation in LEACH protocol. On the basis of relationship among remaining energy in the nodes and specified threshold limit the PR-LEACH clustering technique organized the selection of CHs. The threshold value is computed by the sink and then communicates this value to select CHs. Thereafter selected CHs transmit it to the respective member nodes in the cluster. In this protocol, multi-hop inter cluster traffic is used and therefore the performance of this technique is better than the LEACH, but it also required an enormous amount of energy to transmit the information from CH to sink and also increases the overhead on the sink.

Liu and Ravishankar (2011) proposed a genetic algorithm (GA) based LEACH protocol for CH selection by optimizing the probability of nodes to become a CH. The sink collects the information about the nodes and computes the optimal probability for nodes to select as CHs and then sink broadcasts a message in the network, which comprised of the optimal value of probability to create the clusters. LEACH-GA adopts the centralized approach where large numbers of control and advertising messages have to transmit during the operation. This technique is quite complex and computation time is also high. Yang et al. (2013) proposed an energy efficient clustering approach (EECA) by implementing a predetermined node deployment strategy. In this technique two phases are required to select the CHs. In the first phase, a sensor node that contained maximum residual energy is chosen as anchor CH and after this candidate CHs are selected on the basis of remaining energy and distance from the anchor CH. The second phase is comprised of competition among the candidate CHs to become the CH on the basis of delayed broadcast technique. The two-layer CH selection method adopted in EECA balances the CHs distribution.

Mottaghi and Zahabi (2015) implemented the variant of LEACH protocol called as RZ-LEACH to enrich the performance and network lifespan. The concept is implemented along with the mobile sink and rendezvous nodes to reduce the energy consumption. All nodes have a fixed amount of initial energy and the sink node is mobile as it is based on LEACH therefore, its operation is also divided into various rounds like LEACH algorithm. In the first phase all of the nodes decide that whether they want to be a rendezvous node or not. After this the CH selection is performed on the basis of the energy of the nodes and percentage of existing CHs. Then the threshold value is evaluated to elect the node as a CH. After this the TDMA scheduling is performed before transmission takes place. Simulation results validate that this technique is more effective than the initial version of LEACH however; it is suitable only for the small observing area.

In Lindsey et al. (2002) a chain based routing protocol named power-efficient gathering in sensor information system (PEGASIS) is introduced in which a chain is formed using a greedy algorithm. First a chain head is selected after that chain formation started from furthermost node and nodes communicate only with adjoining neighbor. Data fusion takes place at every node except end nodes and each node fuses own data with neighboring node’s data, thereafter converted into a data packet of the same length. The role of chain head is rotated after 100 rounds. PEGASIS eliminates the clustering overhead and reduces the communication distance between nodes, this result the significantly improvement in network life as compare to LEACH. The drawbacks of this protocol are high link delay and postulation that each node in the chain can generate a packet of the same length.

PEGASIS based energy efficient routing protocol (MIEEPB) with a mobile sink is proposed in Jafri et al. (2013). It represents the concept of sink mobility for a multi-chain model and sub-divided the network into four equal regions. It proves to be efficient in delivering the data effectively by reducing the chain length and also decreases the load of the head node. In this work, sink node is mobile and traverses in the network and programmed to stay at a fixed location for a fixed interval. In Kim et al. (2010), an intelligent agent-based routing (IAR) protocol is developed to guarantee efficient data delivery to sink and to reduce signal overhead. This technique implemented with an idea to elect sensor nodes as agents and sink moves towards the agent node and gathers the data from it. If the sink is not in the range of agent node, then sink select an intermediate node as a relay node which would be responsible for collecting the data from the agent node and delivers it to the sink. IAR protocol improves the data delivery ratio and lessens the communication overhead.

In Abo-Zahhad et al. (2015) a controlled mobile sink node based protocol named mobile sink based adaptive immune energy efficient clustering protocol (MSIEEP) is developed. The factors that are used for CH selection are number of alive nodes and energy on the nodes. In this technique adaptive immune algorithm (AIA) is used to guide the mobile sink, and also find the optimum number of CHs. The optimum sojourn path patterns are used for mobile sink. First of all, the whole network is divided into equal sized regions. The area of the network is divided into three different patterns, i.e. four regions rectangular line path, four regions rectangular path and eight regions rectangular path respectively. The radio energy dissipation model is implemented for both multipath fading channel and free space channel. The drawback of this technique is that it leads to an increment in the delay due to division of network into various regions. In this scenario only those nodes will remain active in a specific region in which sink is located in the particular communication round, the rest of the nodes in other regions operate low power sleep mode, which indirectly increase the delay factor. In this case the nodes in sleep mode cannot send data to the sink in case of emergency. The other demerits of this study is the usage of the adaptive immune algorithm that make it complex and also the number of factors used for CH selection are not sufficient as only node energy is considered for selection. In MSIEEP, a significant amount of energy is consumed in CHs election process and to determine the sojourn locations of the sink.

Literature study concluded that the traditionally developed CH selection mechanisms, suffers from the problem of hasty energy dissipation due to various factors such as clustering approach, the location of the CHs, the position of the sink, the dimension of sensing area, and node count. Table 1 illustrates the relative comparison between various existing routing protocols. Some of the authors implemented their work by dividing the network into subsections and taking sink as static which also suffered from energy dissipation due to its static nature. Hence, there is a requirement to develop a network with such characteristics that enhances the performance parameters of the network. By inspiring from Abo-Zahhad et al. (2015), proposed MSEAC protocol replaces the AIA with Firefly algorithm to elect the appropriate CHs. The number of factors for electing the CH are also increased by adding the distance as a vital factor as per the energy dissipation model. The distance from the nodes to CH and CH to sink is considered to evaluate the energy dissipation of the network. The reason behind using the firefly optimization algorithm is that it proved as a better algorithm over other algorithms in terms of complexity and reliability (Fister et al. 2013). In majority of existing mobile sink based protocols, sink moves on a predefined path and stops at particular sojourn points for gathering the data, this leads the nodes in the vicinity of sojourn point depleted their energy quickly. In the proposed MSEAC protocol, mobility of the sink node is evaluated on the basis of the centroid of the CHs location.

Table 1 Comparison of routing protocols

3 Proposed work

The following factors are considered for the implementation of the proposed protocol:

  1. (a)

    All the sensor nodes other than sink node are stationary.

  2. (b)

    The mobility of sink node relies upon the value of the centroid.

  3. (c)

    The network requires the equal amount of energy for transmitting the data packets from one node to another node by following a symmetric channel for communication.

The parameters that are considered for preparation of the network are represented in Table 2.

Table 2 List of notations

In proposed work, mobility of the sink node is evaluated by using the centroid of the CHs. The location of sink is determined by considering the Eqs. (1) and (2).

$$ SinkX = \frac{1}{{N_{CH} }}\mathop \sum \limits_{i = 1}^{{N_{CH} }} x_{i} $$
(1)
$$ SinkY = \frac{1}{{N_{CH} }}\mathop \sum \limits_{i = 1}^{{N_{CH} }} y_{i} $$
(2)

where \( x_{i} \) and \( y_{i} \) are the x and y coordinates of the selected CHs and \( N_{CH} \) is the number of CHs.

The energy dissipation model used in this work is similar to LEACH protocol. To transmit the k-bits data packet energy cost is

$$ \begin{aligned} E_{tx} \left( {k,d} \right) &= E_{tx - elec} \left( k \right) + E_{tx - amp} \left( {k,d} \right) \\ &= \left\{ {\begin{array}{*{20}c} {k E_{elec} + E_{fs} k d^{2} , if\,d < d_{0} } \\ {k E_{elec} + E_{mp} k d^{4} , if\,d \ge d_{0} } \\ \end{array} } \right. \hfill \\ \end{aligned} $$
(3)

To receive the k-bits data packet at the receiver side the energy model expands to

$$ E_{Rx} \left( k \right) = E_{Rx - elec} \left( k \right) = k E_{elec} $$
(4)

The threshold distance is defined as

$$ d_{0} = \sqrt {\frac{{E_{fs} }}{{E_{mp} }}} $$
(5)

Let us consider a network which is comprised of n number of sensor nodes randomly dispersed in the network. There are r number of clusters and each cluster has an equal number of the nodes. The each CH dissolves its energy to aggregate and receive the L bits data from its CMs, and CH also depletes its energy to forward data to the sink. The dissipated energy while transmitting data and control packets from ith node to CH, and CH to sink during each communication round is calculated by Eqs. (6) and (7) respectively.

$$ E_{i} - L*\left( {E_{elec} + E_{fs} *d_{i - CH}^{2} } \right) $$
(6)
$$ E_{CH} - \left( {{\raise0.7ex\hbox{$n$} \!\mathord{\left/ {\vphantom {n r}}\right.\kern-0pt} \!\lower0.7ex\hbox{$r$}}} \right)*\left( {E_{elec} + E_{DA} } \right) + L*E_{fs} *d_{CH - S}^{2} $$
(7)

The proposed work is divided into following phases:

  • Preparation phase

  • Setup phase

  • Steady state phase

3.1 Preparation phase

The preparation phase of the proposed MSEAC protocol defines that the network consists a fixed number of nodes that are uniformly dispersed in the network. Initially, all the sensors have assigned an equal amount of energy. In the proposed MSEAC protocol, sink splits the entire sensing area into R equal size regions, after that N/R nodes are randomly deployed in every region. The two cases have been considered here, in the first case network is split into 4 equal rectangular (4R) regions and in another case the network is split into 8 equal rectangular (8R) regions as shown in Fig. 1. The sink is mobile node and can traverse the whole network. The location of the sink node is initially set at the center of the monitoring area.

Fig. 1
figure 1

a Sink mobility for 4 rectangular regions, b sink mobility for 8 rectangular regions

3.2 Setup phase

In this phase, CHs selection, cluster formation and next-hop selection process takes place. After initializing the network, the sink is placed at the center location in the monitoring field. The selection of CHs is the next step of the proposed MSECA protocol.

3.2.1 Cluster head selection

Initially the place of CH per section is randomly selected for generating the initial population for optimization algorithm. After that the fitness function is evaluated to have the best fitness value among the available fitness values to select the effective CHs. The fitness value of the nodes is estimated by using the Eq. (8):

$$ F1 = w_{1} *E_{residual} + w_{2} *\frac{1}{{\frac{1}{N - 1}\mathop \sum \nolimits_{i = 1}^{N - 1} d_{i} }} + w_{3} *\frac{1}{{d_{2} }} $$
(8)

where \( d_{i} \) is distance between ith node to other nodes in particular region, \( E_{residual} \) is the residual energy of a node, \( d_{2} \) is node to sink distance, and \( w_{1} \),\( w_{2} \), \( w_{3} \) are the weight factors those satisfying the condition as given in Eq. (9)

$$ w_{1} + w_{2} + w_{3} = 1 $$
(9)

After evaluating the fitness value of the nodes, firefly algorithm is applied to optimize it so that the node with the maximum fitness value can be attained. The firefly optimization algorithm is a nature inspired mechanism. It is a metaheuristic algorithm. The intention behind using a metaheuristic algorithm instead of any exact approach is that it provides the best solution explored by the population with faster computational speed; particularly in time constrained applications. Metaheuristic algorithms give an optimal solution with fewer fitness function calculations as compared to the exact methods (Cerulli et al. 2012). Metaheuristic firefly algorithm used in the proposed MSEAC protocol fastens the process of CHs selection. As the exact methods may work faster with the small number of nodes, however complexity increases as the nodes increase in the network and its take more execution time to evaluate each and every node in the network. This problem leads to use the firefly algorithm in the proposed model. The firefly algorithm was developed by Xin She Yang in late 2007 at Cambridge University (Yang and He 2013). The idea of developing firefly algorithm was derived from the concept of particle swarm optimization, but the only difference is that the firefly algorithm works on the basis of flashing pattern and nature of fireflies. It works on the basis of three rules:

  1. (a)

    Fireflies are unisex insects. Therefore a firefly can lure other firefly irrespective to their sex.

  2. (b)

    The property of luring and brightness is directly proportionate to each other, thus both of the properties decreases with the increase in distance. Consequently the firefly with less brightness, move towards the firefly with more brightness if no such firefly is located then the firefly moves randomly.

  3. (c)

    The brightness of firefly is diagnosed on the behalf of the objective function landscape.

The variation of attractive firefly with the distance can be evaluated on the basis of:

$$ \beta = \beta_{0} e^{{ - \gamma r^{2} }} $$
(10)

\( \gamma \) is light absorption coefficient, \( \beta \; {\text{and}}\; \beta_{0} \) are attraction coefficients

The movement of firefly \( i \) with less brightness towards another firefly \( j \) is determined by:

$$ x_{i}^{t + 1} = x_{i}^{t} + \beta_{0} e^{{ - \gamma r_{ij}^{2} }} \left( {x_{j}^{t} - x_{i}^{t} } \right) + \alpha_{t} \epsilon_{i}^{t} $$
(11)

where i and j represents the fireflies.

The values of node’s residual energy, distances and weight factors are given to evaluate the fitness function. On the basis of fitness value, the best available set of CHs is elected. The pseudo code for firefly algorithm based optimization is given in Fig. 2.

Fig. 2
figure 2

Pseudo code for firefly optimization

The Fig. 3 illustrates the flow chart for the proposed MSECA protocol with respect to the different phases. The initial step is that the sink defines the network parameters such as the number of nodes, size of observing area, the initial energy of the nodes, and number of regions for area division. Then the deployment of the network takes place. The centroid is evaluated correspond to coordinates of CHs by using Eqs. (1) and (2) so that the sink can be traveled to that location. After that, CHs selection will be updated by applying the firefly algorithm based optimization. On the basis updated fitness values, the best available set of CHs in the population is selected. The pseudo code for updating process of CHs is represented in Fig. 4. Then the updated information is transferred to the sensor nodes and node verified that whether the node is a CH or a CM. If it is a CH then the nodes of region join that CH. The TDMA schedule is initialized for data transmission by the CH. After gathering data from the CMs; CH applies the data aggregation to the received data and forwards aggregated data to the sink and at last the sink node ends the functionality of the network if it found all the nodes dead. If the nodes are found still alive then the control goes to the initialization of the set up phase and relocate the sink again and so on.

Fig. 3
figure 3

Flow chart for the proposed MSECA protocol

Fig. 4
figure 4

Pseudo code for CHs selection

3.3 Steady state phase

After locating the CHs in the network the CHs send their location to sink and on behalf of this location, sink calculates its effective location. Then the process of communication will start by transmitting the sensed data received from CMs to the CH. Now CH is responsible to send data to the sink node. In the process of communication the CMs spend an amount of energy to forward the data to the CH. CH consumes the energy to receive the data packets from CMs, to aggregate the received data, and to transmit the aggregated data packets to the sink node. In proposed work, each CH can communicate with the sink node in two different manners, i.e. CH can directly transmit the data packets to the mobile sink or another one is CH can communicate to the mobile sink through another CH. Thus, both the free space and multipath fading model are used to avoid the excessive energy consumption (Siavoshi et al. 2016). The movement of the sink depends upon the CH’s location. The location of the sink node depends upon the centroid location of CHs defined in Eqs. (1) and (2). The current location of the sink node is maintained till the completion of a single communication round, then sink will be relocated with the initialization of another round and the location of CHs is also changed.

3.3.1 Communication among CMs and CH

Cluster members periodically gather data from the environment and send it to CH. In clustered WSN, CH acts as a common receiver of the CMs within the cluster. If more than one node is sending data to the CH on the common channel than collision occurs. For collision-free data delivery, TDMA scheduling format is used here.

TDMA scheduling is employed for the effective sharing of the channel bandwidth between the CMs. A slot is assigned to the each CM and CMs can send their data only in the assigned slot. Entire bandwidth is utilized by each CM in their assign time slot. The small size and low cost receivers are required to implement TDMA scheduling. Only one cluster member can send data to their respective CH; this abolishes the possibility of data packet collision. At the same time, other CHs switch the radio to sleep-mode till their time slot comes (Siavoshi et al. 2016). This approach excellently reduces the energy consumption of the nodes. The channel bandwidth is categorized in the slots and these slots are grouped together into frames. Frames are repeated in a circular manner. The information is transmitted in the form of packets via a physical slot as shown in Fig. 5. TDMA is used because it supports multiple users at a given period of time and reduces the energy consumption (Kim et al. 2010). In the proposed MSEAC protocol, CH forms the TDMA schedule for its associated CMs thereafter CH informs to the CMs about the TDMA schedule.

Fig. 5
figure 5

TDMA frame format

3.3.2 Communication between CH and Sink

Once the data is received from sensor nodes, the CH has to transfer this data to the sink. Before transmitting it to the base station CH performs data aggregation. Hence, a CH node spends energy to receive the data from the nodes, to perform data aggregation and to transmit data to the sink. The factor of energy relies upon the distance covered by data packets to reach the destination. Data can travel from CH to mobile sink in two different manners. In the first way the distance between CH is evaluated in order to check which CH is nearly located to the sink node. Then the distance from sender CH to mobile sink is evaluated. If the distance between CH and the sink is less as compare to the distance between CH to other CHs, then the data will be directly handover to the mobile sink else the data packets will be transferred to the nearest located CH. The communication within CH and mobile sink is a single-hop communication and communication from CH to mobile sink with the intervention of another CH is multi-hop communication. The utilization of CHs protocols aims to minimize the energy consumption. The proposed model is composed of having both single hop and multi hop communication.

4 Performance metrics

The performance of the proposed work is evaluated by using the listed metrics:

  1. (a)

    Network lifetime Network lifetime depicts that for how long the nodes are in an operational state. It represents the operational time from the establishment of network till it ends.

  2. (b)

    Packet delivery ratio (PDR) PDR is a parameter that measures the capability of protocol to deliver data packets to the destination. PDR depicts the ratio of the data packets that are delivered to the destination node to total packets (Anand et al. 2016).

    $$ PDR = \frac{{Packet_{Received} }}{{Packet_{Total} }} $$
    (12)
  3. (c)

    Packet delay Delay or average delay is a parameter that is used to measure the delay that takes place while delivering data packets from source to destination node (Mantri et al. 2016). It is determined as

    $$ Packet Delay = \frac{Distance}{{Speed\,of \,{{transmission}}}} $$
    (13)
  4. (d)

    Packet drop ratio It is evaluated to analyze the packet dropping probability in a network while data transmission takes place. The Packet drop ratio varies with the variations in the distance covered by the data packets. It is estimated as

    $$ Packet\, Drop\, Ratio = \frac{Dropped\,packets}{Transmitted\,packets} $$
    (14)

5 Simulation and results

This section represents the results that are observed after simulating the proposed work in MATLAB. The results are generated on the basis of network parameters that are presented in Table 3.

Table 3 Network setup

The Fig. 6a illustrates the division of monitoring field in 4 regions (4-R). It is depicted that the nodes are equally distributed in four regions. The nodes with the marker edge black represent the CHs of those particular regions. The cross of green color indicates the sink node which is mobile in nature. Each region in the network has one CH. The numbering of the regions starts from the lower most left block and moves toward right then it continues to the upper layer from right to left and so on. In Fig. 6a, the x–y coordinates of the four edges for region 1 are [(0,0), (50,0), (50,50), and (0,50)], for region 2 the x–y coordinates are [(50,0), (100,0), (100,50), and (50,50)], for region 3 the x–y coordinates are [(50,100), (100,100), (100,50), and (50,50)] and similarly for region 4 the coordinates are [(50,100), (0,100), (0,50), and (50,50)]. The current location of the mobile sink is located in region 3 as per the centroid position of all CHs. Similarly the Fig. 6b depicts the structure of the proposed network for 8 regions (8 R).

Fig. 6
figure 6

Clustered network for proposed scenarios

The performance of the proposed MSEAC protocol is compared with the LEACH, LEACH-GA, A-LEACH, MIEEPB, and MSIEEP. The performance metrics considered to evaluate the MSEAC protocol are network lifespan, residual energy of nodes, PDR, and packet delay with respect to communication rounds. Round comprises of the setup and steady state phases. The round is said to be completed when the sink gathers the information from all nodes.

5.1 Comparison with mobile sink protocols

The Fig. 7a–g depicts the comparison of different scenarios of MSIEEP, MIEEPB and the proposed MSEAC protocol. The network lifetime is represented in terms of number of alive nodes. Figure 7a shows the rounds at which first node (FND), half nodes (HND), and last node (LND) demise. The first node dies at round 419 in MSIEEP 4-line, at round 439 in MSIEEP 4-R, at round 589 in MSIEEP 8-R respectively. However, in the case of proposed MSEAC 4-R, it is located at round 694, whereas in case of MSEAC 8-R it is located at round 1002 round. The 50% of nodes completely exhaust their energy at round 425, 446, and 612 in MSIEEP 4-line, MSIEEP 4-R, and MSIEEP 8-R respectively. HDN for proposed MSEAC 4-R is located at round 1300 and for MSEAC 8-R it exists at round 1410. All nodes demise at round 452, 468, and 616 in MSIEEP 4- line, MSIEEP 4-R, MSIEEP 8-R respectively. For proposed MSEAC 4-R is at round 1560 and for proposed MSEAC 8-R it is at round 1630. These values ascertain that the round at which FND, HND, and LND is higher in the proposed MSEAC protocol as compared to existing traditional works.

Fig. 7
figure 7

a FDN, HDN and LDN, b alive nodes in network, c dead nodes in the network, d residual energy of network, e packet delivery ratio, f packet drop ratio, g delay in packet transmission

Figure 7b, c indicate the alive and dead nodes in terms of rounds. On the basis of outcomes, it is observed that the nodes remain alive till the completion of the approximately 1000 rounds for MSEAC 8-R whereas for MSIEEP 4-R the nodes started falling dead at round 700. Similarly, the graph of dead nodes signifies that all of the nodes found dead at round 1560 for proposed MSEAC 4-R, for proposed MSEAC 8-R it is observed at the completion of the 1630 rounds.

Figure 7d indicates the residual energy of network in terms of number of rounds. Residual energy is imperative parameter to assess the network longevity. In the proposed scenario, the total initial energy of network is 40 J. The residual energy becomes 0 at the round 423, 459, 478, and 616 for static sink, MSIEEP 4-line, MSIEEP 4-R, and MSIEEP 8-R respectively, however, for proposed MSEAC 4-R the nodes are left with 8.031 J energy till the completion of 1000 rounds and similarly for proposed MSEAC 8-R, 10.85 J energy remains left after 1000 rounds. These outcomes validate that proposed MSEAC protocol excellently explores the available energy resources.

Figure 7e portrays the packet delivery ratio (PDR) of the proposed protocol and it is observed to be high, i.e., around 97% in contrast to the MSIEEP 4-R and 8-R, whereas the PDR of the MIEEPB is least in comparison to the rest of the protocols. The Packet Drop ratio depicted by Fig. 7f states that in the case of proposed MSEAC 4-R is evaluated to be near by 3%, whereas for MIEEPB it is measured to be 29% at round 189. The proposed MSEAC protocol reduces the transmission distance and also due to sink mobility, there is a noteworthy expansion in the PDR.

Figure 7g indicates the packet delay and it is represents the total time taken by the packet to reach the destination. As the outcomes indicate that average packet delay for proposed MSEAC 4-R, MSEAC 8-R, MSIEEP 4-R, MSIEEP 8-R are 0.0378, 0.0189, 0925, and 0.0822 μs respectively with respect to rounds. The sink travels in observing field that consequences scale down the factor packet delay.

5.2 Comparison with static sink protocols

In this section, the proposed MSEAC protocol is compared with static sink protocols such as LEACH, LEACH-GA, A-LEACH and MSIEEP-Static Sink (SS). The network consists of total count of 100 nodes with an initial energy of 0.5 J within an area of 50 × 50 m2.

5.2.1 Network stability

Table 4 represents the simulation results corresponding to the required number of rounds in network with respect to the 1%, 20%, 50% and 100% dead nodes. As observed from the values of the Table 3, the comparison is done between LEACH, LEACH-GA, A-LEACH, MSIEEP- static sink, proposed MSEAC- 4R and proposed MSEAC-8R. The 1% of total deployed nodes die at round 1467 in LEACH, at round 1610 in LEACH-GA, at round 1620 in A-LEACH, at round 2498 in MSIEEP-SS, at round 3615 in proposed MSEAC-4R and at round 3847 in MSEAC-8R respectively. The 20% nodes become inactive at round 1618 in LEACH, at round 1732 in LEACH-GA, at round 1937 in A-LEACH, at round 2511 in MSIEEP-SS, at round 4173 in proposed MSEAC-4R and at round 4336 in MSEAC-8R respectively. The 50% nodes demise at round 1691, 1818, 2209, 2534, 4337, and 4653 in LEACH, LEACH-GA, LEACH-A, MSIEEP-SS, proposed MSEAC-4R and proposed MSEAC-8R respectively.

Table 4 Percentage of dead nodes with respect to number of rounds

The Table 4 ascertains that the proposed work leads to an enhancement in stability of the network in comparison to the LEACH by 2380, 2718, 2707 and 2803 rounds, LEACH-GA by 2237, 2604, 2580 and 2613 rounds, A-LEACH by 2227, 2399, 2189 and 2117 rounds for proposed MSEAC-8R and, for proposed MSEAC-4R the enhancement are 2148, 2555, 2646, 2744 rounds for LEACH, 2005, 2441, 2519, 2554 rounds for LEACH-GA and 1995, 2236, 2128, 2058 rounds for A-LEACH protocol with respect to the 1%, 20%, 50% and 100% dead node. It is observed that stability in the proposed MSEAC-4R protocol is higher by 1117, 1662, 1803, and 1933 rounds; for MSEAC-8R it is higher by 1349, 1825, 1864, and 1992 rounds in comparison to the MSIEEP-SS for 1%, 20%, 50% and 100% dead nodes in the network, respectively. The results indicate the proficiency of the proposed MSEAC protocol over the present static sink based protocols.

5.2.2 Packet delay and packet drop ratio

When communication takes place in a network, it is assumed that all data packets have reached successfully to the sink but in reality it is not possible to accomplish a communication without losing any data packets on the way and also data packets take time to reach from the nodes to the sink that is known as packet delay. The success rate of data transmission is evaluated by considering the packet drop ratio, and packet delay. The values corresponding to the packet drop ratio (PDR) and packet delay are analyzed after simulating the network for 100, 200, 300, and 400 nodes with the 0.2 J initial energy of each node. Table 4 represents the comparison of LEACH, MSIEEP and proposed MSEAC protocol on the basis of the packet drop ratio, and packet delay with respect to a different node degree, i.e., 100, 200, 300 and 400 nodes.

It is observed that the packet drop ratio of the proposed MSEAC protocol is lower than LEACH by 10.357% and 0.027% lower than MSIEEP-SS for 100 nodes. For 200 nodes, it is 10.769% lower than LEACH and 0.054% lower than MSIEEP. For 300 nodes, it is 11.616% lower than LEACH and 0.346% lower than MSIEEP-SS, and for 400 nodes; it is 12.73% lower than LEACH and 0.74% lower than MSIEEP. The results demonstrate that there is a notable decline in the PDR for proposed MSEAC protocol.

As Table 5 designates, the packet delay of proposed MSEAC is 7.56 μs less than LEACH and 5.375 μs less than MSIEEP-SS for 100 nodes. For 200 nodes, it is 11.25 μs less than LEACH and 7.9442 μs less than MSIEEP-SS. For 300 nodes, it is 14.18 μs less than LEACH and 9.97 μs less than MSIEEP-SS and for 400 nodes; it is 16.74 μs less than LEACH and 11.97 μs less than MSIEEP. The packet delay of the proposed MSEAC protocol is also lower than the LEACH and MSIEEP-SS protocols.

Table 5 Results of LEACH, MSIEEP and proposed MSEAC protocols for packet drop ratio and packet delay

6 Conclusion

This paper proposed a novel mobile sink based clustering protocol along with efficient cluster selection approach. The major goal of this study is to alleviate the issue of energy hole and to enhance the network lifetime by enhancing the performance parameters. The proposed protocol considers the firefly algorithm based optimization for measuring the fitness value of nodes for the CH election. The proposed network has two network setups: one is 4 and another is 8 regions splits strategy. To lessen the energy depletion in the proposed model, the mobile sink stops at the centroid location of the CHs to accumulate the data from CHs, so that each CH can access the mobile sink without depleting much energy. After obtaining the simulation results using Matlab, a comparison has been done between proposed work, MIEEPB, MSIEEP, LEACH, LEACH-GA and A-LEACH. It is concluded that the proposed work outperforms the traditional techniques in the terms of delay, packet delivery ratio, packet drop ratio, network lifespan and residual energy. Thus it is ascertained that the proposed protocol resolves the issue of energy hole and enhances the network lifetime to a mean communication rounds by 1630 in comparison to traditional techniques that proves an improvement of 40%. The packet drop ratio in the case of the proposed work is decreased by 20% in comparison to the MIEEPB. The packet delivery ratio in comparison to the MSIEEP is increased approximately by 2% and 6% for proposed MSEAC 4-R and 8-R respectively; the packet delay ratio is improved by 10% overall in contrast to traditional techniques. The proposed work has been proved quite efficacious and outperforms the traditional mechanisms in term of communication and energy efficiency. However, some amendments can be done in proposed MSEAC protocol to make it more effective for congestion control and load balancing.