Keywords

1 Introduction

In wireless sensor networks, nodes are deployed in large quantities where sensors can organize themselves to an ad hoc multipath network environment for communication between them. Each node is aware of its neighborhood nodes. Network protocol holds a strict layered structure and implements congestion control, scheduling, and routing protocols. However, the time-varying nature with different channel conditions proposes a significant challenge to accomplish the above goals. Traffic engineering, end-to-end rate adaptation, and transport layer signaling have been widely developed to prevent the network congestion.

Shashi Kiran et al. [1] proposed an algorithm to trade-off between the latency and real-time capacity to adapt the transmission schedule in accordance with the addition, removal, and changes in dynamic queries. For fixed transmission schedules, the proposed method has the ability to overcome the changes in workload more effectively than the time division multiple access. A fair end-to-end window-based congestion control protocol for a packet-switched network is demonstrated in Shashi Kiran et al. [2]. with first come-first served (FCFS) routers. Only the end host information is used by the protocol. The network considered is a multiclass fluid model. The convergence function of the protocol is proved using a Lyapunov function.

A joint optimal design of cross-layer congestion control (CCC) for wireless ad hoc network is proposed in Chen et al. [3]. The rate and scheduling constraint is formulated using multicommodity, flow variables fixed channels in networks. The resource allocation problem is addressed through natural decomposition method. Congestion control, routing, and scheduling are the subdivisions. The dual algorithm is used to handle the time-varying channels and adaptive multirate devices. The stability of the resulting system is established. The performance is characterized with respect to an ideal reference system.

The resource like time slots, frequency, power, etc., at a base station to the other network node where each flow is intended for a different receiver. A combination of queue-based scheduling at the base station and the congestion control is implemented at the base station or at the end user node leading to the fair resource allocation and provide queue-length stability [4]. A redesign framework for fluid-flow models for network congestion control is proposed [5]. An extra dynamics are introduced using augmented Lagrangian method to improve the performance of the network.

2 Congestion in Wireless Sensor Networks

Among the various reasons for the congestion in a wireless sensor network, overloading of data, coherent nature of traffic to the base station node in the network due to many-to-one topology, ingestion of sensory data into the wireless networks plays a key role for the predominant congestion. Congestion affects the continuous flow of data, loss of information, delay in the arrival of data to the destination node, unwanted consumption of energy at each node. Basically, there are two types of congestion, node level and link level.

Node level congestion

The node level congestion is found to be common in conventional network. The common reason for its occurrence is the overflow of data at node. Its major effects are packet loss and increased queuing delay.

Link level congestion

It occurs in wireless sensor network, where nodes transmit the data packets at the same time. It significantly affects the link utilization and overall throughput with an increase in delay time and energy utilization.

3 Fibonacci Backoff Algorithm

The nodes in the wireless sensor network are allowed to wait for a period which is formulated from the mathematical Fibonacci series. The wait period formulated is in incremental period. The subsequent numbers are generated directly adding the previous two numbers according to the given formulation.

$$F(x) = f\left( {x - 2} \right) + f\left( {x - 1} \right),\;\;{\text{where}}\;x{\text{ }} \ge 0 .$$
$$F(0) = 0,\;\;f(1) = 1.$$

There are two methods used to prevent the congestion. The possibility of two or more nodes in the network to transmit the data at the same time increases the possibility of congestion among them.

3.1 Method I

Nodes are allowed to choose a random backoff period as the below mentioned range.

$$0 - 2^{n} - 1,$$

where n—number of collisions.

For the first collision, each sender node has to wait for a 0 or 1 time slot. The maximum backoff period for a node depends on the range of Fibonacci series which is chosen for the Fibonacci Backoff Algorithm (Table 1).

Table 1 Slot time generation

From this method, the retransmission attempts can be analyzed as follows,

Number of retransmission attempts

α exponential increase in the number of delay possibility

Number of nodes considered in this work is 3, and the time slots considered is 10. The slotted time communication between the nodes and the station flow node is shown in Table 2.

Table 2 Transmission status for nodes 1, 2, 3

3.2 Method II

The second method is based on the Fibonacci Backoff Algorithm (FBA), and a random Fibonacci number is generated based on the number of times the transmission failure has occurred. This method has two sections as node flow and code flow. There are three basic steps in transmission of data as follows,

  1. 1.

    The serial port is open,

  2. 2.

    Method of algorithm is selected either as ‘exponential’ or ‘fibonacci backoff’ algorithm, and

  3. 3.

    Data is sent.

Algorithm for node code flow

Algorithm for slot time communication between the nodes is as follows,

  1. Step 1:

    if index < TOTAL SLOTS.

  2. Step 2:

    wait for slots on serial port.

  3. Step 3:

    if received slot1 = ‘S’, go to step1.

  4. Step 4:

    data I MSG(n) is transmitted to the serial port, and node waits for acknowledgment or NACK.

  5. Step 5:

    data is sent successfully, once ACK msg is received.

  6. Step 6:

    if not, data is transmitted either into exponential or Fibonacci code as NACK is received.

  7. Step 7:

    random number is generated, and control is transmitted to the program.

  8. Step 8:

    the value returned represents the number of times, and the slot has to be skipped to avoid collision.

  9. Step 9:

    if index == TOTAL SLOTS, return.

  10. Step 10:

    else go to step 1.

Station flow algorithm

Algorithm for slot time communication for the station node is as follows,

  1. Step 1:

    serial port is initialized for communication with node1, node2, and hyper-terminal.

  2. Step 2:

    slot signal is sent to node1 and node2.

  3. Step 3:

    wait period is set, until the data is received from node1 and node2.

  4. Step 4:

    if node1 and node2 send data at the same time, ACK message is sent to both the nodes to signal the collision between them and discard of data.

  5. Step 5:

    if anyone of the node sends data during the slot time, ACK message is send to the node and received data is displaced.

  6. Step 6:

    if end of transmission is received from node1 and node2, station node is terminated else control is transferred to step2.

4 New Slot Allocation Table for Retransmission

4.1 First New Slot Generation for Retransmission for Node1, Node2, Node3

See Table 3.

Table 3 First new slot allocation

4.2 First New Slot Generation for Retransmission for Node2, Node3

See Table 4.

Table 4 Second new slot allocation

4.3 New Slot Generation for Retransmission for Station Node

See Table 5.

Table 5 New slot allocation for station node

5 Comparative Analysis Between BEB and FBA

In a wireless sensor network, distributed coordination function (DCF) is used for this best performance. When nodes want to access the channels, the backoff algorithm is executed while its backoff time greatly depends on the random number. Hence, it is difficult to predict exactly the backoff duration. In BEB, when data is sent and if acknowledgment (ACK) message is not received represents the occurrence of collision in the transmitted channel. The nodes involved increases its contention window size, and in case of successful transmission, the slot time is reduced by one. In this work, we have proposed Fibonacci Backoff Algorithm (FBA) which makes significant changes in the channel access mechanism. Two different scenarios have been introduced for the existing protocol.

In an actual BEB, when the number of collision is 3, the backoff time slot generated is obtained from 2n.

$$\begin{aligned} & 2^{3} = 8\left( {0\,{\text{to}}\,7} \right) \\ & {\text{Generated time slots}} = 0,1,2,3,4,5,6,7. \\ \end{aligned}$$

Whereas in Fibonacci Backoff Algorithm, the waiting time slot is generated using the formula,

$$F(x) = f\left( {x - 2} \right) + f(x)$$

For the considered condition of number of collision 3,

$$\begin{aligned} F(3) & = f(3 - 2) + f(3 - 1). \\ & = 1 + 2 = 3. \\ \end{aligned}$$

When n = 3, with the mathematical Fibonacci series generation, the waiting time slots generated are,

$${\text{Time slots}} = (0,1,1,2)$$

Number of time slots or the backoff/waiting period generated is 4, whereas in binary exponential backoff algorithm, the number of waiting slot generated is 8. Hence, the comparative study of BEB and FBA can be expressed as,

$${\text{Backoff period in BEB}} = 2\left( {\text{waiting time slot generated in FBA}} \right)$$

6 Hardware Setup

See Fig. 1.

Fig. 1
figure 1

Connection of nodes through Aurdino board

7 Results

  • Output Screen Shots

8 Conclusion

In this paper, a new Fibonacci Backoff Algorithm is proposed and implemented. A comparative analysis is done between the already existing binary exponential backoff (BEB) algorithm. The incremental nature of the Fibonacci Backoff Algorithm decreases the probability of occurrence of congestion by allocating the waiting time slots based on the number of transmission failure occurrences. The newly proposed Fibonacci Backoff Algorithm (FBA) and the results obtained prove the effectiveness of by reducing the number of waiting time slots, and the waiting period is reduced to half than the BEB algorithm. Hence, the network throughput increases by congestion prevention and decreased energy utilization.