Keywords

1 Introduction

A wireless sensor networks (WSNs) typically consist of tens to thousands of sensor nodes. These sensor nodes sense and measure physical conditions such as temperature and pressure from the environment, and then, it process and cooperatively pass their collected data to a sink node or base station [1, 2]. These nodes operate on battery, and replacement of it is impractical. The functional life of each individual node varies based upon the demands placed on its battery. Thus, important characteristics in the design of sensor networks are lifetime maximization, robustness, fault tolerance, self-configuration, and adaptability. Various routing protocols to save energy consumption and to extend sensor network lifetimes have been studied in [3].

In WSNs, nodes closer to the sink die rapidly due to heavy traffic load for packet transmission which leads to unbalanced power consumption among the sensor nodes; thus, the connectivity within the network may be lost [4]. Although energy is the most critical resource in a WSN, message transfer delay also plays a pivotal role for time critical application such as disaster management.

Most of the existing techniques focus on lifetime maximization of sensor network considering variations such as data aggregation, efficient routing, scheduling, and by introducing sleep mode. However, these techniques compromise on data delivery ratio and latency. In our work, an Efficient Adaptive Routing Algorithm for WSNs with Sink Mobility (EARASM) is proposed. The impulse behind this work is to trim down the energy consumption of sensor node and to allow nodes to dissipate data as and when the data are available using alternative path if the primary path fails due to node failure.

The rest of the paper is organized as follows: Sect. 2 briefs about the related work. Proposed scheme is defined in Sect. 3. Simulation and performance parameters are described in Sect. 4. Section 5 describes the simulation results of our proposed work. Finally, Sect. 6 concludes the paper.

2 Related Work

Extensive research work has been carried out on data routing techniques in WSNs. In [5], authors propose an efficient data forwarding techniques for WSNs. In this paper, they have compared data routing for multiple event occurrence in case of next node with minimum distance (NNMD) and next node with maximum residual energy (NNMRE). The authors in [6] have proposed a dynamic discovers routing method for data transfer between sensor nodes and a sinks in WSN. This method tolerates node failure and small part of network failure. Here, each node records only its neighbor nodes information and adds no extra routing overhead during failure-free periods. They assumed that every node decides its path based only on local information, such as its parent node and neighbor nodes routing information, due to which there is possibility of forming a loop in the routing path.

In [7], authors propose distributed routing algorithm that relies on the local view of a node that relocates the least number of nodes and provides pre-failure intimation of node before failure occurs and ensure that no path between any pair of affected nodes is extended. However, a failure of an actor may cause the network to partition into disjoint blocks. In [8], authors propose a method to maintain network wide energy equivalence and maximize network lifetime so that no critical nodes would become the bottleneck of network lifetime.

In [9], authors have designed technique to maintain the cluster structure in the event of failures caused by energy-drained nodes is proposed. In [10], authors deal with issues that affect the stability and reliability of data transmission in network layer and present a gradient-based reliable multipath transmission strategy with fault tolerance when the node failure occurs. In [11, 12], authors discuss different methods to deal with node failure and its recovery.

3 Proposed Work

In this section, we present EARASM protocol for WSNs. A source node transmits data packets to sink using one of the routes with low route cost metric. Distance between transmitter and receiver has more effect on energy of the network. Goal of this proposed work is to make network energy efficient and tolerant to node failure.

3.1 Energy Model

Energy model used to calculate the energy consumed by each node to transmit a frame of data to sink. The energy consumed to transmit one bit of data to sink is given by

$$ E_{b} = \frac{ - 1}{\pi }\left( {1 + \alpha } \right)N_{f} \sigma^{2} \ln \left( {P_{b} } \right)G_{1} M^{2} M_{1} + \frac{{P_{r} + P_{t} }}{B} $$
(1)

And the total number of bits transmitted to the sink by a node in each round is given by

$$ S_{1} = NF_{n} {\text{PS}} $$
(2)

And the total energy consumed by each node in WSN to transmit data to the sink is given by

$$ E_{\text{tot}} = S_{1} E_{b} $$
(3)

Using Eq. 3, we can define the energy left in each node after transmission of information is given by

$$ {\text{Remaining}}\_{\text{energy}} = {\text{Initial}}\_{\text{energy}}{-}{\text{Energy}}\_{\text{consumed}} $$
(4)

Table 1 describes about the symbol used in equations with their assumed values.

Table 1 Assumed parameter values

3.2 Route Selection

In a WSN, every source node finds an independent route to the sink and data are transmitted at the rate specified by 802.11 standards from source to sink. Each node can communicate to each other over a distance of T h which is ideally 20 m in real WSN networks. The proposed algorithm is divided into route setup phase and route recovery phase shown in Fig. 1.

Fig. 1
figure 1

Route selection process

For managing WSN, each nodes exchange beacon packets at the beginning. Generally, beacon packets are short. However, as we want to incorporate channel condition in routing, we add payload filed in the beacon packets.

As beacon is transmitted from one node to its nearest node, the receiving node estimates delay, energy consumption, and power loss with respect to each of these nodes and generates route request query (RREQ) packets. Path obtained using dijkstra’s shortest path by incorporating energy, power, and delay obtained in the beacon exchange phase.

The desired condition for best route is to have minimum energy loss and delay with maximum reception power; thus, a route cost matrix is calculated as given below,

$$ {\text{Cost}} = \left( {E_{\text{loss}} *{\text{Delay}}} \right)/\Pr . $$
(5)

where E loss is the energy lost during the transmission of packet, Delay represents time taken for a packet to reach sink from source, and Pr represents receiver circuit power required.

The proposed algorithm obtains the best link from source node form all possible links that has minimum cost in comparison with others. Once route is formed, we transmit round number of data packets from source to sink and measure the parameters along with output parameter throughput.

3.3 Algorithm 1: Route Setup Phase

In this phase, beacon packets are exchanged between sensor nodes and my path table is created.

Note: In our algorithm, we have assumed energy threshold (EN) in the range 80–70 %, and threshold range can be modified to suit real-time applications.

3.4 Algorithm 2: Route Recovery Phase

In this phase, the data are transmitted from source to sink through the route selected and link failure is recovered caused by node failure.

4 Simulation Model

4.1 Simulation

Due to rich function library of MATLAB, it enables easy implement of different types of algorithms for WSN. MATLAB has built-in mathematical functions, graphical functions, etc. MATLAB also allows user to write their own functions and scripts using the built-in functions and data types and data structures. Therefore, MATLAB 12.0 is chosen as simulation environment for implementation of our algorithm for WSN in an area of 100 × 100 m.

In our paper, we have considered some of the parameters given in Table 2 to illustrate simulation results.

Table 2 Simulation parameters

In this paper, BPSK modulation is used to transmit S number of bits from one node to another node. Here, at first, message bits are converted into bipolar signal, and later, the signal is multiplied with a carrier signal. The resultant bits are then transmitted through Additive white Gaussian noise (AWGN) channel. Ideally in WSN network, SNR sensitivity is about −84 dBm, i.e., two nodes at a distance of 1 m can receive packets even if signal to noise ratio is −84 dB.

4.2 Simulation Procedure

We outline the simulation procedure of the proposed system by following steps:

  1. 1.

    Start.

  2. 2.

    Provide network simulation parameters.

  3. 3.

    Generate the WSN for the given area and number of nodes.

  4. 4.

    Apply the proposed Adaptable routing algorithm.

  5. 5.

    Compute the performance of the system.

  6. 6.

    End.

Consider a simple network with 50 nodes where we define some of the parameters of the system such as SNR = −40, message length = 20, iterations = 20 with source id and sink.

4.3 Performance Parameters

The performance parameters considered here are as following:

  • Average energy consumed: It is defined as the mean of energy consumed for S bit transmission with respect to number of iterations.

  • Average BER: It is defined as probability of getting error bits in received packet.

  • Average delay: It is defined as the mean of time taken to transmit packet through each link.

  • Failure rate: It is defined as number of dead nodes with respect to number of nodes deployed.

5 Results and Discussions

In this section, we discuss various results obtained through simulation. EARASM protocol is compared with existing non-energy aware DSR protocol with static sink.

Figures 2 and 3 depict average energy consumed with respect to increase in number of nodes deployed and number of packets being transmitted, respectively, for proposed scheme and DSR protocol.

Fig. 2
figure 2

Number of nodes versus average energy consumed

Fig. 3
figure 3

Number of messages transmitted versus average energy consumed

In Fig. 2, it can be observed that EARASM protocol consumes 7.6 % average energy compared to 9.4 % for DSR protocol for 10 packets transmitted for 10 times.

In Fig. 3, it can be observed that EARASM protocol consumes 7.9 % average energy compared to 10.38 % for DSR protocol for 50 nodes deployed and simulation is carried out for 10 iterations.

Figure 4 depicts percentage of node failure rate with respect to number of iterations being carried out for 50 sensor nodes deployed in an area of 100 × 100 m. Results show that the average node failure rate is 10.8 % for EARASM protocol compared to 14.8 % for DSR protocol.

Fig. 4
figure 4

Number of iterations versus percentage of node failure

Figure 5 depicts average delay obtained for transmitting 10 messages with respect to increasing the number of nodes. It can be observed that average delay is 2.8 s for EARASM protocol compared to 3.7 s for DSR protocol.

Fig. 5
figure 5

Number of nodes versus average delay

Figure 6 presents variation in BER with respect to number of nodes for 10 packets being transmitted for 10 iterations; it can be observed that the EARASM protocol has average of 9 error bits, whereas DSR protocol has average of 14 error bits.

Fig. 6
figure 6

Number of nodes versus average BER

6 Conclusions and Future Scope

WSN is a modern technology, and it has a very exciting application areas ranging from disaster management to health care and vehicle tracking. Energy efficient network is a vital problem in this field of WSN. Moreover, sensor nodes are prone to failure due to various challenges.

A wireless sensor network links often fail, and the failed sensor nodes cannot be replaced in short time gap, so people must use some energy efficient routing protocol for better result. Proposed scheme is basically a modification of an existing DSR protocol and assures in-time data delivery for critical data.

Proposed scheme consumes nearly 3 % less energy measured against non-energy aware DSR protocol with static sink. It also achieves 4 % less node failure rate, better network lifetime, reduced BER, and transmission delay so that WSNs can be effectively used in real-time applications.

As a future extension of this work, the efficiency of the network can be improved by implementing the proposed algorithm with multiple sink and efficient placement of sinks, which improves lifetime of sensor nodes and ultimately the whole network.