1 Introduction

The Internet of things (IoT) is a highly integrated and comprehensive application of the new generation of information technology. It has great significance for the new era of industrial, green, intelligent networks under a sustainable economy and a modern society. Wireless sensor networks (WSNs) can be viewed as an important technology class under IoT, which has created a solid foundation to enable the fast development of IoT.

WSNs are usually composed of a large number of static or mobile sensors, which form a self-organized network in a multi-hop manner. Each sensor, often tiny, can collaborative, sense, collect, process and transfer their collected raw or interpreted data from the sensor field and eventually send the information to the owner’s network. WSNs can be applied to the fields such as the military, disaster relief, environment monitoring including forest fire and pollution, healthcare monitoring and tele-healthcare systems, etc. [1].

The research and creation of energy-efficient routing algorithms is one of the most important issues for WSNs because sensor nodes tend to have limited battery power which is often not practical to replace. In WSNs with static sinks, the sensor nodes transmit information to the sink node usually in a multi-hop manner. Some nodes close to the sink are more likely to deplete their energy much faster than other nodes far away from the sink as more data are routed through these nodes compared to other outlying nodes. Multi-hop routes and concentration of data traffic toward the sink are the biggest problems to address. This problem is called the hot spot problem (or energy hole problem), and the corresponding sensor nodes are also referred to as hot nodes.

Adopting sink mobility has been exploited in recent years to prolong the lifetime of wireless sensor networks. Contrary to wireless sensor networks with a static sink, the mobile sink-based approaches can alleviate hot spot issues and balance the energy consumption among sensor nodes. The mobile sink nodes can roam around the sensing field to collect data through relatively short communications distance. Significant energy savings have been reported extending network lifetime. Finding an optimal trajectory for the mobile sink to visit some rendezvous nodes is a crucial issue, and the literature has indicated that the ant colony optimization (ACO) algorithm has been a useful solution to calculate the mobile sink trajectory.

ACO is a heuristic swarm intelligence technique inspired by the foraging behavior of real ant colonies. It has been proved to be a successful technique and has been applied to a number of combinatorial optimization problems. The ACO algorithm establishes the shortest path between food sources and nests. When an ant moves, it releases a trail pheromone which other ants can detect. As more ants pass by the path, more pheromones will be deposited. Because ants move depending on the amount of pheromones, the richer the pheromone trail on a path is, the more likely it would be followed by other ants. Through this mechanism, ants can finally find an optimal path from their nest to food source. However, traditional ACO has some disadvantages such as slow convergence rate and can fall into local optimal solution rather than a global solution. Such disadvantages negatively influence the time delay and solution convergence of the networks.

In this paper, we propose an improved ACO-based approach and demonstrate the advantage of our algorithm when applied to mobile sink-based WSNs. In our work, the distance heuristic factor is considered in order to enhance the global search ability, to avoid being trapped in a local optimal solution and to improve the convergence rate. The sensor field is divided into several clusters, and each cluster has only one cluster head (CH). Then, mobile sink finds an optimal sink mobility trajectory by the improved ACO algorithm to communicate with all CHs and collect data from them via short-range communications.

The main contribution in this paper includes the following three aspects. First, it combines clustering algorithm, ACO algorithm and mobile sink to further improve the overall performance of sensor network. Secondly, the improved ACO algorithm can enhance the global search ability by considering the distance between the cluster heads and distance to mobile sink. It is beneficial to alleviate the network time delay problem. Finally, moving strategy of mobile sink can largely save the energy consumption of cluster heads.

The rest of the paper is organized as follows. Section 2 introduces related work. In Sect. 3, we first present relevant network and energy models. Then, we present our proposed scheme in detail. The performance evaluation is given in Sect. 4, and Sect. 5 concludes the paper.

2 Related work

Low-energy adaptive clustering algorithm (LEACH) [2] has become a classical clustering algorithm for WSNs. It also has become a benchmark for WSN performance measurements. LEACH randomly selects a few nodes as CHs and rotates this role to balance the energy dissipation of the sensor nodes. The CH nodes fuse and aggregate data from member nodes, and CHs send aggregated data to the sink in order to reduce the amount of data. LEACH is superior to traditional algorithms in the aspect of extending network lifetime, but it does not apply well to a lager network model because the CHs distribute unevenly and communicate directly.

Mottaghi and Zahabi [3] proposed an optimized LEACH clustering algorithm for mobile sink and rendezvous nodes. This algorithm combined the use of LEACH, mobile sink and rendezvous points, not only to preserve the benefits of LEACH, but also to improve the CH selection process. For large networks, this algorithm decreased the energy consumption compared to traditional LEACH.

In the mobile sink-based routing protocol (MSRP) [4], the CHs were responsible for collecting the sensor data from the corresponding cluster member nodes. The mobile sink communicated with the CHs when it was near to the CHs compared to a distance threshold; therefore, it is not suitable for real-time applications. The sink moved to CHs that had the highest energy in the clustered network to collect sensed data from them. A disadvantage is that some portions of the network the mobile sink may not be well served.

Jafri et al. [5] proposed an energy-efficient PEGASIS [6]-based routing protocol with a mobile sink. This algorithm divided the sensor field into four regions and introduces the sink mobility in the multi-chain model. Therefore, it achieved smaller chains and decreased the load on the leader nodes. The mobile sink stayed for a time at a fixed location in each region in order to guarantee data collection.

Chu and Ssu [7] proposed a method for a cluster-based mobile sink exploration (CMSE) to guide data packets efficiently to the mobile sinks. In CMSE, the source node identified the sink without the knowledge of node locations. The source node communicated with the mobile sink in a multi-hop manner, thus increasing the lifetime of the wireless sensor network.

Sharma et al. [8] proposed a rendezvous-based routing protocol (RRP), which addresses the requirement of energy-efficiency and less end-to-end latency. There are two different modes of data transmission in this protocol. The proposed protocol has good performance in energy consumption, end-to-end latency, network lifetime than other protocols.

Wang et al. [9] proposed an energy-efficient dynamic routing adjust algorithm based on mobile sink. By setting some communication rules that manage routes reconstruction process, there will not be a phenomenon of the whole network reconfiguration with the mobility of the sink node. The cluster head rotation mechanism alleviated the hot spot problem efficiently and also avoided frequent cluster head selection and intracluster routing reconstruction.

Chen et al. [10] proposed an energy-efficient routing protocol for a mobile sink based on the shortest data transmission path. In this protocol, according to the position of the sink node and the common nodes ID, the coordinate values of each node are calculated. The shortest path was found by comparing the coordinate values of the sensor nodes to forward data to the sink.

Shi et al. [11] proposed an efficient data-driven routing protocol (DDRP) for WSNs using a mobile sink. This protocol aimed to reduce the network control overhead in the route discovery or maintenance process and improve the data delivery performance. The main drawback of DDRP was that with each movement of the mobile sink, subsequent topological changes will occur for the overhearing mechanism. The overhearing mechanism greatly compromised the nodes energy reserves due to nodes needing to overhear the sink’s latest location.

An energy-aware sink relocation algorithm using a maximum capacity path protocol was proposed by Wang et al. [12]. In this work, mobile sinks moved only when two relocation conditions are met, and the next location must have had the greatest weight value. In this work, it took a long time to meet the relocation conditions, and the algorithm did not significantly prolong network lifetime.

Xie and Wang [13] presented an approximation algorithm termed ADCMCST. This algorithm constructed a tree network for homogeneous WSNs to reduce and balance the energy consumption of each node so that the network lifetime was prolonged.

Shen et al. [14] presented location-aware routing protocol (LARP), an interesting and novel routing protocol specifically designed for underwater sensor networks. The location information of the node is used to help message propagation through the network.

Zhang et al. [15] formulated data gathering problem as a network utility maximization problem, which aims at maximizing the total amount of data collected by the mobile sink while maintaining the fairness of network. Then, the authors proposed a distributed data gathering approach (DDGA) to obtain the optimal data gathering scheme.

Deng et al. [16] investigated the problem of data collection by multiple sinks and designed a suboptimal online algorithm via primal–dual approach, requiring very little a priori knowledge. The authors theoretically derived the competitive ratio of the online algorithm and further improved it by finding the optimal sink location with an approximation ratio.

A novel partition algorithm was proposed by Zhang et al. [17] to divide a WSN sensing field into several regions. Each region had its own mobile sink node. The mobile sink visited every node in its corresponding region. The work achieved a good overall balance between nodes in data collection latency. An optimal solution was calculated using the Traveling Salesman Problem (TSP) by using a shuffled frog leaping algorithm to reduce the traveling time of each mobile sink.

An energy-efficient proactive data reporting protocol was proposed by Liu et al. [18]. This work established a logical coordinate system for routing and forwarding data packets. Senor nodes selected the next hop according to the trail messages and the sojourn position of the mobile sink. Then, sensor nodes updated their routing messages and established routes with the mobile sink through the shortest distance. This algorithm has good performance in reducing control overheads.

Andziulis et al. [19] proposed a production scheduling approach, being an asymmetric TSP (ATSP). The work used the nearest neighbor (NN) and ACO algorithms for solving the ATSP. Furthermore, it was tested on a specific real-life scenario. This work concluded that the ACO algorithm was superior to NN when considering at the achieved minimum values of the objective function. However, the computational time of the ACO algorithm was slightly longer than NN.

Neumann and Witt [20] proposed an ACO for solving the minimum spanning tree problem. This was the first comprehensive rigorous analysis of a simple ACO algorithm for a combined optimization problem. They considered the minimum spanning tree (MST) problem and examined the effect of two construction graphs with respect to the run-time behavior.

López-Ibáñez and Blum [21] proposed a Beam-ACO for the TSP with time windows. The aim of work was to deal with the minimization of the travel cost and to use a hybrid method combining ACO with beam search. The Beam-ACO used stochastic sampling as a useful alternative, which was evaluated on seven benchmark sets. When travel cost optimization was concerned, the Beam-ACO algorithm is currently still the most advanced technique for the TSP with time windows.

A novel routing algorithm which combined the features of ACO, clustering and sink mobility techniques was proposed by Wang et al. [22]. This algorithm adopted the ideas of LEACH in the CH selection and improved the CHs rotation process by considering the residual energy of nodes. The ACO algorithm was used to find the optimal trajectory for the mobile sink to travel to each CH in order to communicate and collect data from each CH through short-range communications.

3 Proposed energy-efficient routing algorithm

3.1 Network model

Assume that a network consists of N sensor nodes and can be represented as a graph \(G\,(V,E)\) where:

  1. 1.

    \(V=V_\mathrm{s} \bigcup V_\mathrm{f}\), where \(V_\mathrm{s} \) represents the sensor nodes and \(V_\mathrm{f}\) represents the feasible sites,

  2. 2.

    \(E\subseteq V\times V\) represents the set of wireless links.

We initially deploy the mobile sink node at the edge of the sensor field and make the following assumptions:

  1. 1.

    All sensor nodes are homogeneous and static,

  2. 2.

    Nodes can adjust their transmission power according to the relative distance to the receiver,

  3. 3.

    Links are symmetric,

  4. 4.

    The mobile sink has enough transmit power and does not have any resource constraints.

3.2 Energy model

In our considered energy consumption model, we let \(E_{\mathrm{Tx}}(k,d)\) and \(E_{\mathrm{Rx}}(k)\) denote the total energy required in a sensor node to transmit a k-bit length message to a neighboring sensor node at distance d away, respectively. The Tx and Rx severally denote the nodes to transmit and receive message. The energy consumed to transmit a message can be partitioned into two parts. The first part is the energy consumed transmit then message, \(E_{\mathrm{elec}} \times k\), where \(E_{\mathrm{elec}}\) denotes the energy consumed for driving the transmitter circuitry, the \(\hbox {elec}\) denotes the transmitter circuitry. The second part is the energy consumed in the amplifier component, \(\varepsilon _{\mathrm{amp}} \times k\times d^{n}\), where \(\varepsilon _{\mathrm{amp}}\) denotes the energy required for the transmitter amplifier. Based on the distance between the transmitter and receiver, a free space (\(d^{2}\) power loss) or multi-path fading (\(d^{4}\) power loss) channel models can be used.

The receiving process performed in a sensor node only includes the first part of the energy consumption. Summarizing the above descriptions, the total energy consumption for message transmitting and receiving is:

$$\begin{aligned} E_{\mathrm{Tx}} ({k,d})= & {} E_{\mathrm{elec}} \times k+\varepsilon _{\mathrm{amp}} \times k\times d^{n} \end{aligned}$$
(1)
$$\begin{aligned} E_{\mathrm{Rx}} (k)= & {} E_{\mathrm{elec}} \times k \end{aligned}$$
(2)

3.3 Clustering formation and cluster head selection

We divide the entire network into several equal clusters, so that the cluster formation is achieved first. Each cluster has only one CH. The other nodes in the same cluster become member nodes and send their data to their CH. The selection of the CHs is decided by the residual energy and the distance to the center location of cluster. Initially, we first select the sensor node that is located in the center of each cluster as the CH candidate. Then, the CH candidate will compete with other nodes in the same cluster. In each round, only the node that has the larger residual energy will become the new CH candidate, or in the case where more than one CH has the same residual energy then the node nearest to the center location of cluster is selected as the new CH. All the nodes in the cluster should be compared only once. In this way, the node with the largest residual energy is chosen as the CH. Also the CHs are distributed in the center of the cluster, so it inherently avoids a long-distance communication between the member nodes and the CH.

3.4 Inter-cluster routing procedure

After selecting a CH for each cluster, the member nodes communicate with the CH directly or using multi-hop communication according to their distance to the CH. Some member nodes may receive CH messages from more than one CH; these nodes are likely slightly beyond the cluster boundary. These special nodes will share the information of the secondary CH with their primary CH. In this way, CHs can calculate the distance with their neighbor CHs.

3.5 Rotation of cluster head

The CH selection does not need to be carried out in each round in order to save energy. We set up an energy threshold for a CH, such that if any of the CHs residual energy falls below the energy threshold, the CH selection process will be carried out accordingly. This approach can avoid a frequent CH election process so that the energy consumption of sensor nodes is reduced.

3.6 Improved ant colony optimization

In the traditional ACO algorithm, each ant is randomly put on a city. During the construction of a feasible solution, ants select the next city to be visited through a probabilistic decision rule. When ant k stays in city i and constructs the partial solution, at time t, the probability of moving to the next city j neighboring on city i is calculated as:

$$\begin{aligned} p_{ij}^k (t)=\left\{ {\begin{array}{ll} \frac{\tau _{ij}^\alpha (t)\eta _{ij}^\beta (t)}{\sum \limits _{k\in \mathrm{allowed}_k} {\tau _{ik}^\alpha (t)\eta _{ik}^\beta (t)} }&{}\hbox {if}~j\in \mathrm{allowed}_k \\ 0&{}\hbox {otherwise} \end{array}} \right. , \end{aligned}$$
(3)

where \(\tau _{ij}(t)\) is the amount of pheromone trail on \(\hbox {arc}(i,j)\) at time t, \(\eta _{ij} =1/d_{ij}\) is the heuristic value of moving from city i to city j, \(\hbox {allowed}_{k}\) is the visited city set of ant k, \(\alpha \) and \(\beta \) are two parameters that control the relative weight of pheromone trail and heuristic value.

However, the traditional ant colony optimization algorithm has some shortcomings such as slow rate of convergence and is easy to fall into local optimal solution. So we propose to improve the traditional ACO algorithm by further considering a distance heuristic factor to increase effects on the next node so as to enhance the global search ability, avoid being trapped in a local optimal solution and improve the rate of convergence.

We increase the effect of the target node to the next node and improve \(\eta _{ij}\) by using the minimum sum of distance between the current node to the next node and the next node to the destination node, thus:

$$\begin{aligned} n_{ij} =\frac{1}{\min \left[ {\hbox {dis}({i,j})+\hbox {dis}({j,m})}\right] } \end{aligned}$$
(4)

where \(\hbox {dis}(i,j)\) is the distance from node i to next node j, \(\hbox {dis}({j,m})\) is the distance from node j to the target node m. Placing Eq. (4) into Eq. (3):

$$\begin{aligned} p_{ij}^k(t)=\left\{ {\begin{array}{ll} \frac{\left[ {\tau _{ij} \left( t \right) ^{\alpha }} \right] \times \left\{ {\frac{1}{\min \left[ {\hbox {dis}\left( {i,j} \right) +\hbox {dis}\left( {j,m} \right) } \right] }} \right\} ^{\beta }}{\sum \nolimits _j {\left[ {\tau _{ik} \left( t \right) } \right] ^{\alpha }\times \left\{ {\frac{1}{\min \left[ {\hbox {dis}\left( {i,j} \right) +\hbox {dis}\left( {j,m} \right) } \right] }} \right\} ^{\beta }}}&{}\hbox {if}~j\in \hbox {allowed}_k \\ 0 &{} \hbox {otherwise} \end{array}} \right. \end{aligned}$$
(5)

The amount of pheromone trail on a path evaporates over time. After time m, the trail intensity is updated according to:

$$\begin{aligned} \tau _{ij}\left( {t+s} \right)= & {} \rho \tau _{ij} \left( t \right) +\Delta \tau _{ij} \end{aligned}$$
(6)
$$\begin{aligned} \Delta \tau _{ij}= & {} \sum _{k=1}^n {\Delta \tau _{ij}^k } \end{aligned}$$
(7)

where \(\rho \) is a coefficient which represents the evaporation of trail between time t and \(t+s\), its value between 0 and 1. \(\Delta \tau _{ij}^k \) is the quantity per unit of length of trail substance (akin to pheromone in real ants) laid on edge (i, j) by ant k between time t and \(t+s\), n is the total number of ants.

The ant-cycle system information update model was adopted as:

$$\begin{aligned} \Delta \tau _{ij}^k =\left\{ {\begin{array}{ll} \frac{Q}{L_k} &{} \hbox {arc}(i,j)\,\hbox {belongs to best tour} \\ 0 &{} \hbox {otherwise} \end{array}} \right. \end{aligned}$$
(8)

where Q represents one constant of the total pheromone and has the same meaning as those traditional strategies of pheromone updating. \(L_k\) represents the passing length of the kth ant.

This process will terminate until an optimal path is found after a given number of iterations.

3.7 Sink movement strategy

In this paper, we treat the mobile sink as a salesman, the CHs as cities, and the mobile sink will visit CHs. Therefore, this problem is a TSP, which we solve using the ACO algorithm. The mobile sink will traverse the optimal path determined by the ACO algorithm to visit the positions of CHs to collect data using single hop physically close communications. The energy consumption of CHs are significantly decreased due to the transmission range is very short between mobile sink and the CH. We also take into account the shortcomings of the traditional ACO algorithm, and we implement the proposed and distance heuristic factor to increase the effects on the next node, to enhance the global search ability, avoid trap in local optimal solution and improve the rate of convergence. Therefore, the network latency is thus decreased.

4 Performance evaluation

We evaluate the performance of our algorithm (termed IACO-MS) via simulations. Our algorithm is compared with the algorithm proposed in [18] (termed ACO–M). The simulation environment is set up with the parameters listed in Table 1. It has been assumed that all the senor nodes and the sink nodes are uniformly deployed in a \(200\times 200~\hbox {m}^{2}\) area.

Table 1 Simulation parameters

Extensive simulations have been performed to determine suitable values for \(\alpha \) and \(\beta \), as is listed in Table 2. From the table, when \(\alpha \), \(\beta \) and \(\rho \) have values of 5, 10 and 0.6, respectively, the length of path is the shortest and iteration number is also small.

Table 2 Length of path by using different values for \(\alpha \), \(\beta \) and \(\rho \)

Lifetime is an important metric to evaluate network performance and is defined as the time when the first node ceases operation due to energy depletion. The network lifetime for our work compared to ACO–M is shown in Fig. 1. ACO–M starts to have depleted nodes after 2330 rounds and our work at about 2600 rounds. It is clear that our algorithm has the better performance in prolonging the network lifetime compared to ACO–M due to the mobile sink communicating directly with the CH over a short communication range. Thus, the energy of the CHs can be reduced using the mobile sink node.

Fig. 1
figure 1

Comparison of network lifetime

In our proposed algorithm, the node with the maximum residual energy will be selected as the CH. The CH rotation is only performed when the residual energy of the CH is less than a given energy threshold. In Fig. 2, it can be seen that the rate of energy consumption is lower than ACO–M and thus our proposed algorithm has good performance for WSNs.

Fig. 2
figure 2

Comparison of energy consumption

Extensive simulations have been carried out to demonstrate that our improved ACO algorithm has better performance in a WSN using different numbers of nodes, as can be seen in Tables 3 and 4. Table 3 shows the time when the first node ceases to operate due to energy depletion, over different numbers of nodes. Our algorithm always has an improved performance compared to ACO–M extending the lifetime of the network. Table 4 shows the total energy consumption in the WSN with different numbers of nodes until all the energy in all the nodes are exhausted. Our algorithm further offers improved use of energy to prolong the whole network lifetime compared to ACO–M.

Table 3 Round when the first node dies
Table 4 Round when the energy of nodes run out

We used the ACO algorithm to find an optimal mobility trajectory for the mobile sink. The traditional ACO algorithm leads ants to move to the next node using current information, but they deviate from the target over time. As a result, we considered the distance between CHs to improve distance heuristic factor to enhance the global search ability, avoid being trapped in local optimal solutions and improve the rate of convergence. In this way, we also reduce the time delay problem when the mobile sink collects data from the CHs. In Fig. 3, it can be seen that when using our algorithm the amount of data collected at any given point of time has been increased compared to the other one, so our algorithm has an improved performance in the data collection for the WSNs.

Fig. 3
figure 3

Comparison of packet delivery

5 Conclusions

In this paper, an energy-efficient improved ant colony optimization-based approach for wireless sensor networks that have mobile sinks is proposed. Cluster heads (CHs) are selected based on the residual energy of each node, but in this work the CH rotation is only done when the residual energy of the CH less than a given energy threshold. The mobile sink collects data via an optimal moving trajectory which is determined by our improved ACO algorithm and directly communicates with CHs through short-range communications. The simulation results show that the proposed approach performs particularly well compared to other standard algorithms in the literature thus extending the wireless sensor network lifetime.