Keywords

1 Introduction

Nowadays, a number of sensor-based applications require the presence of sensors on mobile elements. The multiple advantages of using mobility in the Wireless Sensor Network (WSN) made the sensors powerful to be integrated in large networks. It can extend the coverage of a network or obtain more precise results. For example, in a surveillance application, sensors can be placed on animals that will evolve freely in a park, where also fixed nodes will be deployed. Moreover, it is very likely that, like IP network equipments, mobile nodes will no longer be confined within a single network but will evolve within multiple networks. This mobility is one of the key elements of the Internet of Things (IoT). Unfortunately, given to their small size, sensors devices are extremely constrained. Despite the easy and interesting solutions they offer and their various applications, sensors suffer from constraints such as: rapid depletion of the energy and routing information. Moreover, the mobility of the sensor brings new challenges such as network coverage, packets destined for a mobile node would not be able to be delivered to it when it moves out of its network, etc. Therefore, one of the proposed solutions for Mobile WSN, the Clustering Duty Cycle Mobility aware Protocol (CDCMP) [1]. It is a hierarchical routing protocol, combining three very important aspects in the WSN: a duty cycle mechanism with sink mobility in the context of nodes clustering organization. Although, the algorithm uses a predefined mobility. The Sink moves in a fixed path and its coordinates are random. After a while, the Sink may be away from some CHs that want to send data and privileges some CHs over others. Authors of [2,3,4] review data collection method with mobile sinks in WSN. Article [5] is also a survey of routing protocols of WSN with mobile sinks.

A new promising bio-inspired protocols, that can lead to quick convergence to quality solutions [6], and bridge the gap between microbiology and engineering, have emerged. Bacterial activities are complex and organized systems that give a new approach to solve complex optimization problems. Bacterial Foraging Optimization Algorithm (BFOA) was introduced by Passino in 2002 [7]. Indeed, the BFOA design is inspired by the social and cooperative intelligent behaviors of Escherichia coli bacteria, which are the most common kind of bacteria living in a human gut. According to paper [7], BFOA is better than PSO in terms of convergence, robustness and precision. In the area of WSNs research, Kulkarni et al. [6] in 2009 was the first authors that successfully used the BFOA for node localization. They compared the performances of PSO and BFOA in terms of the number of nodes localized, localization accuracy and computation time. They conclude that PSO determines the node coordinates more quickly and BFOA does it more accurately. Authors in [8] proposed a new routing algorithm to achieve low mean delay and energy efficiency, respecting the shortest path algorithm and based on the intelligent behavior of searching method of E.Coli. This approach could scale since no flooding of messages is required. However, the network is randomly deployed in a two dimension circle with the sink at the center. This could be applicable only in some application fields where the data collector is in the center of the sensing area. In the paper [9], BFOA is used for cluster head (CH) selection to provide improved energy efficiency in routing. Several simulations were carried out and results showed that BFOA had better performance compared to other clustering protocols. Rajagopal et al. [10] also proposed an improved CH selection for efficient data aggregation in sensor networks based on BFOA. This approach improved the average End-to-End delay (sec), the average packet drop ratio and lifetime computation. Another mechanism is proposed by Lalwani and Das [11]. Authors used BFOA method to propose a new manner to select CHs and to route sensed data. Homogeneous sensors are deployed randomly. Then the algorithm is applied centrally, by the base station (BS), to form several clusters. After that, the routing path is computed from each CH to the BS. Kavitha and Wahidabanu [12, 13] combined both BFOA and GSA (Gravitational Search Algorithm) and incorporated the hybrid algorithm in LEACH to optimize its CH selection method. In [14], a new low energy intelligent clustering protocol (LEICP) is proposed for balancing the energy consumption in every cluster and prolonging the network lifetime. According to the residual energy and positions of nodes, in order to balance to balance the energy consumption in every cluster, a fitness function is defined. Authors in [15] wanted to deploy the nodes only in the terrains of interest identified by segmentation of the images captured by a camera on board the unmanned aerial vehicle (UAV). They used PSO and BFOA for image segmentation for autonomous deployment of WSN nodes and for localization of the deployed nodes in a distributed and iterative fashion. In [16], BFOA based Traveling Salesman Problem (TSP) is used for data collection in mobile sinks. Recently, Ari et al. [17] used the BFOA to introduce a mobile sensing scheme in WSNs. This approach guarantees a better network coverage and a high quality of service, especially in term of throughput.

This paper presents a new pattern of Sink mobility in WSN, to deal with the problems encountered by the CDCMP protocol [1], with better throughput and high availability. The proposed protocol takes into account new characteristics inspired by Escherichia coli bacteria. This solution introduces an autonomous and intelligent mobility. The entire network operational time is divided into some rounds. At the first, the clusters are constructed, and in the remainder of the round, the data are gathered, aggregated and transmitted to the sink. During transmission phase, Cluster Heads (CHs) can be awake only during the closest members transmissions. Clusters-members can switch to the sleep state except in their time slots.

This paper is organized as follows: An overview of Bacterial Foraging Optimization Algorithm is given in Sect. 2. Sink Mobility based on Bacterial Foraging Optimization Algorithm is discussed in Sect. 3. The experimental results are presented in Sect. 4 followed by the conclusion.

2 Bacterial Foraging Optimization Algorithm

This section presents the social foraging behavior of the Escherichia coli bacteria. To model the behavior of this bacterium, Passino [7] proposed four main operations in the bacterial feeding system: “Chemotaxis”, “Swarming”, “Reproduction” and “Elimination and Dispersal”. In our proposed mobility design for WSNs, we are interest by only the two first operations.

  • 1- Chemotaxis: This process aims to simulate the basic operations that allow the Escherichia bacteria to move via the flagella [18]. The chemotactic step corresponds to a swim, movement without changing the direction [6], followed by swim or tumble, random modification of movement direction [6].

    Let j, k and l be the indexes for the chemotaxis step, the reproduction and the event of the elimination-dispersion respectively, such as: \(\theta ^{i}(j,k,l) \in \mathbb {R}, i=1,2,...,S\) defines the position of each member in the population of S bacteria in the \(j^{th}\) chemotactic step, \(k^{th}\) stage of reproduction and at the \(l^{th}\) event the elimination-dispersion. Let \(C(i)>0\) be the size of the step taken in the random direction specified by the tumble. To represent a tumble, a random unit length of the direction, say \(\phi (i)\), is generated, see Eq. 1.

    $$\begin{aligned} \phi (i)=(\varDelta ^{T}(i) \varDelta (i))^{-1/2} * \varDelta (i) \end{aligned}$$
    (1)

    Where \(\varDelta (i) \in \mathbb {R}^{p}\) is a randomly generated vector, where each element of \(\varDelta (i)\), \(i = 1,2,..,p\) is a number taken in \([-1,1]\). Liu and Passino [19] have modeled the chemotaxis, i.e. the movement of the bacterium, by Eq. 2.

    $$\begin{aligned} \theta ^{i}(j+1,k,l)=\theta ^{i}(j,k,l)+C(i)*\phi (i) \end{aligned}$$
    (2)
  • 2- swarming: This process consists of the formation of a group of bacteria in a self-organized manner. In Eq. 3, the function \(J_{cc} (\theta ,\theta ^{i}(j,k,l))\), which models the cell-to-cell signaling via an attractant and a repellent, is given.

    $$\begin{aligned} J_{cc}(\theta ,\theta ^{i}(j,k,l)) =&- \, d_{attractant}*\exp ({-w_{attractant}*\sum \nolimits _{m=1}^{p}{(\theta _{m}-{\theta ^{i}}_{m})}^{2}})\nonumber \\&+\, h_{repellant}*\exp ({-w_{repellant}*\sum \nolimits _{m=1}^{p}{(\theta _{m}-{\theta ^{i}}_{m})}^{2}}) \end{aligned}$$
    (3)

    Where \(d_{attractant}\) is the depth of the attractor released by the cell, \(w_{attractant}\) is the attractive signal width, \(h_{repellant}\) = \(d_{attractant}\) is the height of the repellent effect (magnitude), and \(w_{repellant}\) is the width of the repellent. The objective function representing the cell-to-cell signaling in the Escherichia coli swarm is defined by Eq. 4.

    $$\begin{aligned} J_{cc}(\theta ,P(j,k,l)) = \sum \nolimits _{i=1}^{S} J_{cc}(\theta ,\theta ^{i}(j,k,l)) \end{aligned}$$
    (4)

    Where \(P (j,k,l) = \theta ^{i}(j,k,l)\) with \(i = 1,2, ..., S\) is the position of each member in the population of S bacteria in the \(j^{th}\) chemotactic step, \(k^{th}\) reproduction step and the \(l^{th}\) elimination-dispersion event.

    Equation 5 represents the cost, i.e., the fitness function, at the location \(\theta ^{i}(j,k,l)\) of the \(i^{th}\) bacterium.

    $$\begin{aligned} J(i,j,k,l) = J(i,j,k,l) + J_{cc}(\theta ^{i}(j,k,l),P(j,k,l)) \end{aligned}$$
    (5)

3 SMBFOA Protocol

A flowchart of our proposal is represented in Fig. 1. It takes place in “rounds” which have approximately the same predetermined time interval. Each round begins with a clustering phase, where the optimum location of CHs is found. Followed by a routing phase, where the intra-clusters sensed data are transferred to CHs as in CDCMP protocol [1]. After that, the Sink moves intelligently inspired by the BFOA to find the better position to receive more data. Like that, the inter-clusters transmissions are done.

Fig. 1.
figure 1

Flow chart of the proposed SMBFOA protocol.

In the proposed SMBFOA protocol (Fig. 1), the following assumptions about network model are fixed:

  • The Sink is a resource-rich device and is not limited in terms of memory and computing power.

  • The Sink is located inside the WSN.

  • All sensor nodes are stationary after deployment.

  • All sensors have GPS or other location determination devices.

  • The WSN includes homogeneous sensor nodes.

  • Initially, all nodes sensors have the same amount of energy.

3.1 Clustering Phase

As mentioned in [1], this phase consists of dividing the network into four regions, each containing a CH, in order to ensure an equitable distribution of CHs in the network. The selection of CHs is done according to the nodes topological density \((D_{t})\) during the round 0 and as a function of the residual energy of the sensors during the other rounds. The density of each node S is computed with:

$$\begin{aligned} D_{t} (S) = (D + L) / D \end{aligned}$$

Or D is the degree of the node S and L is the neighbouring links of the node S. Each CH acts as a local coordinator to coordinate the data transmission within its group. It divides the cluster into two sub-levels (Level1 and Level2) to create a TDMA Schedule starting with the most remote nodes, and at the same time assigns each member node a time slot during which it can transmit its data. CH also realizes the notion of the Duty-Cycle to synchronize the wake-up and sleep time in the network.

3.2 Routing Phase

The data collection in our proposition is done on two steps. Firstly, the sensed data are transferred to CHs (intra-clusters transmissions). Then, each CH aggregates data received from its members to send them to the Sink (inter-clusters transmissions). Meantime, the Sink choose its best position according to BFOA.

3.2.1 Transmissions Intra-clusters

In [1], authors decomposed this stage into several time frames. Each frame contains a number of slots equal to the number of cluster-members set. A slot is dedicated to a single member node of a cluster, during which time it transmits its data to the Level concerned. These operations are repeated at each frame until the end of the round.

3.2.2 Transmissions Inter-clusters

At the end of each frame, the CH gathers the data of its members and sends them to the Sink.

  • a - The Sink moves according to the “Chemotaxis”: The Sink moves like a bacterial, from the position \(\theta {(t)}\) to \(\theta {(t+1)}\) as follows:

    $$\begin{aligned} \theta {(t+1)}= & {} \theta {(t)}+C*\phi \\ \phi= & {} {(\varDelta ^T*\varDelta )}^{-1/2}*\varDelta *Degre \end{aligned}$$
  • \(\phi \): is a unit length random direction to represent a tumble.

  • C: let \(C > 0\) be the size of the step taken in the random direction specified by the tumble.

  • \(\varDelta \): is a vector of two elements \(\varDelta _1\) and \(\varDelta _2\), which are chosen randomly in the interval \([-1,1]\) as mentioned in [7].

  • Degre: is the largest number of members of our clusters. The Sink moves in order to collect as much data as possible. It moves to the densest cluster.

$$\begin{aligned} \varDelta *\varDelta ^{T}=\sum \nolimits _{i=1}^{n}{{\varDelta _i}^{2}} \end{aligned}$$
  • \(\varDelta *\varDelta ^{T}\): is the product of a vector by its transpose. It is a mathematical law called the Scalar Square.

  • b - The Sink evaluates its Fitness according to “Swarming”: The Sink evaluates the value of the Fitness function as follows:

$$\begin{aligned} J(\theta ^k{(t+1)})=-\alpha _1*g(\beta _1)+\alpha _2*g(\beta _2) \end{aligned}$$

Where \(\alpha _1\), \(\alpha _2\), \(\beta _1\) and \(\beta _2\) are coefficients that should be chosen properly. Let g(x) be the swarming function that governs the movement of a mobile sink.

$$\begin{aligned} g(x)&=\exp {(-x*\varGamma (\theta ^k{(t+1)}))} \, \quad \qquad \qquad \\ \varGamma (\theta ^k{(t+1)})&={(\theta _1(t+1)-\theta _1(t))}^2+{(\theta _2(t+1)-\theta _2(t))}^2 \end{aligned}$$

To minimize the Fitness function, we must check the following equation:

$$\begin{aligned} J(\theta ^K{(t)}) > J(\theta ^K{(t)} + \varDelta \theta ^k) \end{aligned}$$

3.3 Illustrative Case

We suppose that the coordinates of our Sink are (50; 50). The Sink will move to new position according to BFOA.

  • a- The Sink moves according to the “Chemotaxis”: We take two random numbers between \([-1;1]\). For example: \((-1;1), (0.5;0.5), (0.9;-0.5), (0.75;-0.75)\).

Firstly, we calculate the Scalar Square:

$$\begin{aligned} \varDelta *\varDelta ^T=[-1,1]*[-1, 1]^T = 2 \end{aligned}$$

Then, we compute:

$$\begin{aligned} \phi = {(\varDelta *\varDelta ^T)}^{{-1}/{2}} * \varDelta * Degre = 2^{{-1}/{2}}*[-1,1]*8 = [-5. 6568, 5. 6568] \end{aligned}$$

Then, the coordinates of the new position (X, Y) are calculated with \(C = 0.1\):

$$\begin{aligned} \theta _x(t+1)&=50+(-5.6568)*0.1=49.4343 \,\,\, \text {and} \\ \theta _y(t+1)&=50+(5.6568)*0.1=50.5656 \quad \,\, \end{aligned}$$

For each new position, the Fitness function must be evaluated.

  • b- The Sink evaluates its fitness according to the “Swarming”: We must carefully choose the value of the following: \(\alpha _1\), \(\alpha _2\), \(\beta _1\) and \(\beta _2\).

    $$\begin{aligned} J(\theta ^k{(t+1)}) = -0.5*g(0.1)+1.5*g(0.1) \end{aligned}$$

    If \(J(\theta ^K{(t+1)}) < J(\theta ^K{(t)})\), then the Sink will move to the new position because it will minimize the Fitness function. So, there will be less moves. The Sink will ensure that its movement will collect as much data as possible without unnecessary move.

Figure 2 shows the movement of the Sink using BFOA.

Fig. 2.
figure 2

Sink positions with BFOA mobility.

4 Simulation Results and Analysis

In this section, we perform simulations using NS2 to analyse and evaluate the performance of the proposed protocol. The number of nodes in the simulated network is 100, scattered randomly within a 100\(\,\times \,\)100 \(\mathrm{m}^2\) sensor field as shown in Fig. 3. The simulation parameters are presented in Table 1.

Fig. 3.
figure 3

Nodes deployment map.

Table 1. Simulation parameters

In Fig. 4 the performance of the CDCMP and SMBFOA protocol was evaluated in terms of the number of data packets received by the Sink and the energy consumed by nodes. In our simulation, the number of nodes is 100. As it is evident from Fig. 4, inter-cluster communication minimizes the energy consumption in the data transmission to reach the Sink. Simulation results revealed that in a network which uses CDCMP protocol, it delivers 70475 data packets using 160 J at 460 s. By contrast, a network employing the SMBFOA protocol, Sink receives 99141 data packets using only 155 J. In other words, when 3/4 of the energy of a network is consumed, CDCMP transmits only 2/3 data packets comparing to SMBFOA protocol. We note an energy saving in the case where the intelligent mobility is integrated in the SMBFOA. If the Sink stay immobile for a long period of time, CHs standing far from it, will consume more energy and their lifetimes decrease rapidly, as in the case of the CDCMP protocol.

Fig. 4.
figure 4

Packets number received by the Sink and energy consumed by nodes.

In Fig. 5 the performance of the CDCMP and SMBFOA protocols was evaluated in terms of the number of data packets received by the Sink. The amount of data packets received within a certain time period is an important index for measuring the quality of network service. As it is evident from Fig. 5, the simulation results clearly show that the SMBFOA protocol is better than CDCMP protocol in terms of the number of data packets received by the Sink. We see that practically the number of data packets received by the Sink using the SMBFOA protocol is doubled (\(16 * 10{^4}\) data packets received by the Sink) compared to the CDCMP protocol (\(10 * 10{^4}\) data packets received by the Sink). Following the ideal use of time synchronization and Fitness functions, we have got a significant improvement in the amount of data transmitted, virtually no loss. The reason is simple, an intelligent mobile Sink moves closer to the CHs. Thus, the distance will be minimised. CHs consume less energy and transmit more data.

Fig. 5.
figure 5

Number of data packets received by the Sink.

In Fig. 6 the performance of the CDCMP and SMBFOA protocols was evaluated in terms of the number of dead nodes. From this Fig. 6, it is noticed that the first node died after 470 s and all nodes died after 680 s in CDCMP protocol. However in SMBFOA protocol, the first node died also after 470 s and all nodes died after 710 s. It is clearly that the proposed protocol do not differ too much from CDCMP protocol. This is related to the fact that the SMBFOA protocol do not change the clustering and intra-cluster routing method from CDCMP protocol. Moreover, the energy consumption is distributed between the CHs due to the use of an intelligent mobile Sink. As a result, no node will be exploited more than its capability which in turn leads to optimization of the energy consumption in the whole network.

In Fig. 7, the performance of CDCMP and SMBFOA protocols was evaluated by the ratio between energy consumption and throughput. It can be seen that after 150 J consumed, CDCMP protocol transmits only 65000 data packets and SMBFOA protocol transmits 90000 data packets.

Fig. 6.
figure 6

Alive nodes number function of round time = 20 s.

Fig. 7.
figure 7

Energy consumed by nodes.

5 Conclusion

Researchers have used bio-inspired stochastic optimization methods instead of analytical methods due to their efficiency in computations. The latter methods require enormous computational efforts to solve optimization problems. Computations grow exponentially as the problem size increases. BFOA is one of these powerful bio-inspired methods for optimization problems, requires moderate memory and computational resources and leads to promising results. In this paper we have presented a protocol for energy efficient inter-cluster routing in WSNs using mobile Sink. We have shown that the algorithm balances the lifetime of the CHs and increase significantly the throughput. The solution have been described with proper chemotaxis, swarming, and derivation of fitness function. It can be observed that the intelligent mobile Sink will help to conserve the overall energy of the system with maximum operability. The experimental results have shown that the performance of the proposed algorithm are better than CDCMP in terms of energy consumption and throughput.

Our future work will be to made clustering and routing algorithms totally based on BFOA for a dynamically changed network. This study can also be supplemented by the combination of this algorithm with other bio-inspired approaches, which will yield an hybrid algorithm.