3.1 Introduction

In order to satisfy the QoS requirements and energy constraints for WSNs, hierarchical (clustering) techniques have been an attractive approach to organize sensor networks based on their power levels and proximity. In each cluster, sensor nodes are delegated different roles, such as cluster head or ordinary member node. A cluster head (CH) is elected in each cluster that collects sensed data from member nodes, aggregates and transmits the aggregated data to the next cluster head or to the base station (BS). The role of ordinary member node is to sense data from the environment and communicate the data to the cluster head as shown in Fig. 3.1.

The QBCDCP protocol [1] achieves QoS routing in Wireless Sensor Networks by using delay, along with the transmission energy, as the routing metric while ensuring that bandwidth requirements and end-to-end delay objectives of the application are met in the route selection process. The protocol achieves energy efficiency through a rotating cluster head mechanism and delegation of energy intensive tasks to a single high power Base Station. The QBCDCP scheme shows an increase in sensing node lifetime with the number of clusters, but with a corresponding increase in end-to-end delay.

Fig. 3.1
figure 1

System model

The cluster based network model provides inherent optimization capabilities at cluster heads, such as data fusion and reduces communication interference by using TDMA (Time Division Multiple Access). High energy nodes can be used to process and send the information while low energy nodes can be used to perform the sensing task. Overall, clustering is an excellent approach for achieving scalability, lifetime, energy efficiency, and reduce network contention. While earlier works were primarily focused on the above mentioned aspects, more recent research has begun to consider fault tolerance, reliability, and Quality of Service and our proposed protocol is motivated by these metrics.

The proposed algorithm Fault Tolerant QoS Adaptive Clustering (FTQAC) employs a fault tolerant dual cluster head mechanism in the cluster with respect to the working of the cluster head and guarantees the desired QoS by including delay and bandwidth parameters in the route selection process. Furthermore, the protocol evenly distributes the energy consumption to all nodes so as to extend the sensor network lifetime.

3.2 Related Works

In this section a summary of the current state-of-the-art in hierarchical routing protocols for WSNs are presented with the highlights of the performance issues and limitations of each strategy.

A self-organizing, adaptive clustering scheme that uses randomized rotation of cluster heads to uniformly distribute the energy load among the sensor nodes in the network is proposed in Low-Energy Adaptive Clustering Hierarchy (LEACH) [2]. The cluster heads have the responsibility of collecting data from their clusters and fuse the collected data, hence reducing the number of messages to be sent to the Base Station, which results in lower energy consumption. The broadcast messages, as well as cluster formation messages are transmitted using CSMA (Carrier Sense Multiple Access) to lower collisions. After cluster formation, cluster heads creates a transmission schedule and broadcasts it to all the nodes in their respective cluster. This schedule contains TDMA slots for each neighboring node. This scheduling scheme helps energy minimization at nodes that can power off their radio during all but their scheduled time slot. In the centralized variant of this protocol, LEACH-C [3], the base station manages the clustering procedure.

Despite these benefits, LEACH and LEACH-C suffer several shortcomings. Cluster head selection that uses probability does not naturally lead to minimum energy consumption. Cluster head route messages to the Base Station in a single hop and when the network size grows, it is possible that these cluster heads discharge faster than others and if the distance is large, the messages may not reach the Base Station.

Threshold sensitive Energy Efficient sensor Network (TEEN) [4] and its adaptive version (AdaPtive) Threshold sensitive Energy Efficient sensor Network (APTEEN) [5] are clustering protocols that are similar to LEACH; they are receptive to quick changes in WSNs. The two protocols nominate the transmitting nodes by using threshold schemes. The deficiency of the two schemes are the overhead related to forming of clusters at multiple levels and the process of executing threshold based methods.

Lindsey and Ragavendra propose an efficient chain-based scheme called Power Efficient Gathering in Sensor Information Systems (PEGASIS) [6]. Instead of classifying nodes into clusters, the scheme makes a chain of sensor nodes. As per this structure, each node transmits to and receives from only the nearest nodes of its neighbors. The node carrying out data aggregation transmits the data to the node that communicates with the sink. Every round, a greedy scheme is run to designate one node in the chain to transmit with the sink. The shortcoming of the protocol is that the single leader can itself become a congestion point in the network.

Younis et al. [7] presented a new clustering model called HEED (Hybrid Energy-Efficient Distributed clustering), in which cluster heads are elected through finite iteration, taking into account nodal residual energy and the inner clusters communication costs. The quality of clustering in HEED is better than LEACH, but requires higher communication costs, and the time synchronization difference is relatively large.

Stable Election Protocol [8] utilize non-homogeneous sensor nodes to dispense power uniformly in WSNs. The scheme of cluster head election is based on two distinct levels of power. A node with the maximum weight as per their different power levels is elected as cluster head. Successive cluster heads are selected using this scheme. This ensures that cluster heads are randomly elected and power consumption is evenly distributed among nodes.

Two-Level Hierarchy LEACH (TL-LEACH) [9] protocol selects two sensor nodes in individual cluster as cluster heads; one node acts as the primary cluster head and the other the secondary cluster head. Primary and secondary cluster heads can communicate with each other and secondary cluster heads communicate with nodes in their sub-clusters. The two-level scheme of TL-LEACH lowers the amount of nodes that require to transmit to the base station, efficaciously lowering the total power usage. However, there is a huge probability of rise in overhead at the time of selection of primary and secondary cluster heads which causes higher power consumption.

Chen et al. [10] propose a native unified scheme for selecting a dual cluster head and developed a parameter to quantify QoS in applications of WSNs. The scheme can strengthen the reliability and dependability of WSN by allotting evenly the communication and data fusion load amid the cluster heads. The dual cluster head model can also enhance the life of Wireless Sensor Networks. The drawbacks of the protocol are that the secondary cluster is formed only if the number of nodes in a given cluster is larger than a threshold, the protocol proposed in this chapter always creates a secondary cluster to achieve fault tolerance in WSNs.

Muruganathan et al. [11] propose a Base-Station Controlled Dynamic Clustering Protocol (BCDCP), which employs the high-energy base station to execute most power-hungry tasks and assigns the power evenly among all sensor nodes to augment network lifetime and average power savings. BCDCP relies on the base station to perform balanced cluster formation, path selection, and other energy intensive tasks. Multi-hop communication among cluster heads is employed to reach the base station, through the lowest energy path.

Haiping and Ruchuan [12] propose an innovative clustered control scheme based on location data, priority of coverage, power, and multi-layered architecture. This scheme elects a cluster head as per the geographical locations and residual power at the nodes and assures greater coverage rate for the cluster head by a priority system to evade the dense and sparse distribution of cluster heads. This scheme lowers the power cost by expanding the size of sleeping nodes amid non-media data transmission phase and including many intermediate nodes to forward data during multimedia data transmission which enhance the lifetime of the network.

Ji et al. [13] proposed a protocol that targets on boosting the power efficiency and other QoS metrics by omitting the node with an inaccurate geographic position to be the cluster heads. Feng et al. [14] modeled a High Available Sensor network protocol for Differentiated Services, which calculate the routing gradient with different parameters, and then build two types of routing gradient table for best-effort and real-time service.

EkbataniFard et al. [15] utilized cluster heads as higher energy relay nodes in a two-tiered WSN and these relay nodes create a network among themselves to route data to the sink and implement power efficient QoS routing in cluster based WSNs. Ben-othman et al. [16] proposed an algorithm that implements Quality of Service (QoS) by using a queuing scheme to categorize the traffic into four different queues as per speed. Higher priority queues have outright special advantage over low priority queues.

Aslam et al. [17] presented a mathematical model using Network Calculus for TDMA-based medium access control scheme, where a cluster based system is designed and arrival to service graph is presented. The protocol is used to find the largest delay and backlog limits for applications with QoS needs.

Melodia et al. [18] proposed a novel cross-layer communication model based on the time-hopping impulse radio ultra wide band technology built for flexibly and reliably bringing QoS to heterogeneous applications in WMSNs, by using and regulating interactions among different layers of the protocol stack as per applications needs. Noori et al. [19] proposed a probabilistic scheme for evaluating the network lifetime when actions occur randomly over the network area. A scheme of the packet transmission rate of the sensors is proposed making use of Voronoi tessellation. The probability of accomplishing a given life span by individual sensors is determined and is then utilized to examine the cluster life span. The study combines the result of dynamic cluster head assignment, power model, random deployment of sensors, data compression and packet generation model at the sensors.

Yao et al. [20] propose a novel model which can capture both the factors of energy efficiency and QoS guarantee especially the source-to-sink delay and data-loss probability. Quang and Kim et al. [21] propound a clustering scheme to enhance the performance of the fixed wireless sensor, a multi-level hierarchical structure can be used to reduce the power consumption. In addition to the cluster head, some nodes can be selected as intermediate nodes, each of which manages a sub-cluster, according to their positions. Intermediate nodes aggregate data from general nodes and send them to the cluster head. The selection of intermediate nodes to optimize energy consumption is modeled as a mixed-integer linear programming having high computational complexity; consequently, the lowest energy path searching algorithm is proposed to shorten the computational time.

Chen et al. [22] proposed a robust fault-tolerant Quality of Service (QoS) algorithm, here the aim to attain application QoS demands while increasing the life of the sensors using a hop-by-hop data delivery employing source and path overabundance.

Fapojuwo et al. [1] proposed a Quality of service augmented Base station Controlled Dynamic Clustering Protocol (QBCDCP). The scheme obtains power efficiency through a revolving head clustering mechanism and assignment of power-hungry tasks to a single base station, QoS support parameters like delay and bandwidth are used for the route selection process. Prakash et al. [23] propose a dual cluster head scheme to obtain the fault tolerance and enhance the life of the WSNs, additionally the dual cluster head scheme reduces the end-to-end delay and augments packet delivery ratio (PDR).

3.3 System Model and Problem Definition

In our system model, we assume the following:

  • The Wireless Sensor Network consists of N homogeneous sensor nodes, deployed at random locations in a sensor field. An example scenario is shown in Fig. 3.1 where the sensor field is a square area at a distance \(d_{BS}\) from a single fixed base-station. The sensors are grouped into one-hop clusters with a specific clustering algorithm. All sensor nodes are immobile.

  • All the nodes in the network start with the same initial energy and have limitations with respect to battery, processing, and memory space.

  • The N sensor nodes are powered by a nonrenewable on board energy source. When this energy supply is exhausted, the sensor becomes non-operational. All nodes are supposed to be aware of their residual energy and are capable of measuring the signal strength indicator (RSSI) of a received message, this measurement may be used as an indication of distance from the sender. The received signal strength indicator (RSSI) is a measurement of the power present in a received radio signal.

  • The nodes in a cluster may perform either of three roles: primary cluster head, secondary cluster head or sensing. Each cluster head performs activities such as scheduling of intra-cluster and inter-cluster communications, data aggregation, and data forwarding to the base station through multi-hop routing. The role of the secondary cluster head is to emulate the role of the primary cluster head in case of its failure. On the other hand, a sensing node maybe actively sensing the target area.

  • The information sensed by the sensing nodes in a cluster are transmitted directly to their cluster head. The cluster head gathers data from the other nodes within its cluster, performs data aggregation/fusion and routes the data to the base station through other cluster head nodes. The base station in turn performs the key tasks of cluster formation, cluster head selection, and cluster head to cluster head QoS routing path construction.

  • The base station has knowledge via internal global positioning system (GPS) of the position of all nodes inside the sensor field. The base station has a constant power supply and thus, has no energy constraints. Hence, it can also be used to perform functions that are energy intensive and can store past data. The base station can transmit directly to the nodes, however the nodes due to their limited power supply may not be able to communicate with the base station directly, except the nodes close to the base station.

  • Radio Model: The energy required at the transmitter amplifier to guarantee an acceptable signal level at the receiver; when receiver and transmitter are separated by a distance d, \(E_a(d)\) is:

    $$\begin{aligned} E_{a}(d) = \left\{ \begin{array}{ll} \varepsilon _{FS}d^2, &{} d \le d_o\\ \varepsilon _{TR}d^4, &{} d \ge d_o \end{array} \right. \end{aligned}$$
    (3.1)

    here \(\varepsilon _{FS} d^2\) and \(\varepsilon _{TR} d^4\) denote the transmit amplification parameters corresponding to the free-space and two-ray models, respectively, and \(d_o\) is the threshold distance which is denoted by

    $$\begin{aligned} d_o = \sqrt{\frac{\varepsilon _{FS}}{\varepsilon _{TR}}} \end{aligned}$$
    (3.2)

The topology of a Wireless Sensor Network may be described by a graph \(G=(N,L)\), where N is the set of nodes and L is the set of links. The objectives are to

  • Improve the lifetime of the network.

  • Reduce the average end-to-end packet delay.

  • Minimize the packet delivery ratio (PDR).

  • Making the QoS Path Fault Tolerant.

Fig. 3.2
figure 2

TDMA frame structure for FTQAC

The proposed protocol FTQAC incorporates QoS requirements like fault tolerance, delay, and bandwidth information during route establishment. The energy intensive tasks are delegated to the base station to improve the lifetime of the network. The operation of the protocol is split into phases. The first stage of FTQAC consists of the cluster splitting and primary cluster selection, the second phase involves the selection of the secondary cluster head. The last phase involves the formation of the QoS route from cluster head to the base station. TDMA (Time Division Multi Access) and spreading code are engaged to minimize inter-cluster interference to allow simultaneous transmissions in neighboring clusters. The TDMA structure for QBCDCP is shown in Fig. 3.2, where the frame length is of length L time units, segmented into z time slots, one of which is reserved for control and the remaining slots are partitioned for reception and transmission of data messages. The control period is used for transmission and reception of control messages related to clustering and routing information, state updates data requests and acknowledgments and neighbor discovery. To allow simultaneous transmissions in neighboring clusters and reduce inter-cluster interference, each cluster is assigned a different spreading code assumed to be orthogonal.

figure a
Fig. 3.3
figure 3

Selection of secondary cluster head

3.4 Cluster Setup and Primary Cluster Head Selection

In the proposed protocol, the cluster splitting and primary cluster head selection is accomplished by the Base Station [11] as shown in Algorithm 3.1.

3.5 Secondary Cluster Head Selection

In the next phase the primary cluster head has the role of identifying the secondary cluster head, the steps involved are shown below and illustrated in Fig. 3.3.

  1. (i)

    Each new primary cluster head sends message \(M_1\) to the sensing nodes in the cluster, the message contains the node’s ID and a header to distinguish the message.

  2. (ii)

    The sensing nodes record the Received Signal Strength Indicator (RSSI) of message \(M_1\). The sensing nodes send message \(M_2\) to the primary cluster. The message contains the node’s ID, ID code of the primary cluster head, RSSI value of message received from the primary cluster head, and the current residual energy of the node.

  3. (iii)

    The primary cluster head receives \(M_2\) from ordinary nodes, the cluster head calculates the average residual energy level of all sensing nodes in the cluster. It selects a secondary cluster from one of the nodes which have the largest RSSI of message \(M_1\) among the qualified nodes whose residual energy is more than the average residual energy of all nodes in the cluster.

  4. (iv)

    The primary cluster head sets up the TDMA schedule and transmits the schedule to the secondary cluster head and the sensing nodes in the cluster. The role of the secondary cluster head is to emulate the primary cluster head in case of its failure.

  5. (v)

    The primary cluster head sends a message \(M_3\) periodically to the secondary cluster head informing its role and its current residual energy status. The secondary cluster head sends an ACK back to the primary cluster head on receiving the message.

  6. (vi)

    When the residual energy of the primary cluster head is equal to or less than the \(E_t\) (threshold energy level) the primary cluster head relinquishes its role to the secondary cluster head by sending a common message to all nodes in the cluster.

  7. (vii)

    The new primary cluster updates the base station of its delay, bandwidth and residual energy of the sensing nodes, it continues the functions of the cluster head using the same TDMA schedule.

  8. (viii)

    The base station triggers re-clustering process only when more than one-third of the secondary cluster heads have reached their \(E_t\), it also assigns the new \(E_t\) level for the next round based on the average residual energy of selected primary cluster heads. This process prevents frequent re-clustering and avoids excessive depletion of the cluster heads battery; this mechanism results in better power efficiency.

3.6 QoS Route Establishment

The desired QoS metrics for route establishment, i.e., delay, bandwidth of cluster head nodes and residual energy of the sensing nodes are aggregated and reported to the base station periodically. Delay and bandwidth are measured at cluster head nodes. The delay associated with traversing a particular cluster head is the time duration between entering the input queue and leaving the output queue of the cluster head (\(D_{xy}\)). Bandwidth is computed at each cluster head as the number of free time slots within each cluster head (\(BW_{xy}\)).

When a connection is desired, the base station sets up a QoS-based route \(Q_S\) between the cluster head where the connection is initiated through other cluster heads and finally ending at the base station as shown in Fig. 3.1. The base station finds the route which minimizes the delays and power along the path, and has a minimum bandwidth greater than or equal to the requested bandwidth (\(BW_{req}\)) as shown in Algorithm 3.1. The algorithm may produce more than one optimal path; the path having cluster heads with minimum required transmission energy (\(E_{aSum}\)) is chosen. After a route is chosen, the base station communicates it to the concerned cluster head nodes, which schedule the connection by specifying the required number of time slots to maintain it.

Table 3.1 Simulation parameters

During the communication phase, when the primary cluster head is depleted of energy it transfers its role to the secondary cluster head. The primary cluster head is currently involved in the QoS path informs both the downstream cluster head, upstream cluster head, and the base station of its duty transfer and then relinquishes its role. The traffic is redirected to the new primary cluster and the QoS level is maintained throughout the duration of the connection.

3.7 Simulation Setup

To evaluate the proposed protocol, we carried out a simulation study using ns-2 [24] a discrete event simulator; the FTQAC implementation is obtained by modifying the popular LEACH [2, 3] ns-2 source code. The proposed protocol FTQAC is compared with QBCDCP. The simulation configuration consists of 100 nodes where each node is assigned an initial energy of 2 Joules, located in a 100 \(m^2\) area. The base station is located 25 m from the sensor field. The end-to-end delay objective \(D_{req}\) is fixed at 10 s and \(BW_{req}\) was set at 16 Kbps by assigning each connection one out of 16 available TDMA time slots. Table 3.1 summarizes the simulation parameters. A comparison of the average residual energy of cluster heads, average end-to-end delay and packet delivery ratio (PDR) for different loads are obtained.

Figure 3.4 illustrates the role of the secondary cluster head in increasing the overall lifetime of the sensor network. In QBCDCP during the communication phase if the primary cluster head is depleted of energy, the entire cluster does not function and causes the WSN to become unstable and inconsistent. This problem can be overcome by the dual cluster head model. In FTQAC, the cluster continues to work reliably since the secondary cluster head takes the role of the primary cluster head when the threshold (\(E_t\)) energy is reached. In QBCDCP, the cluster formation is triggered frequently since the cluster head gets depleted of energy quickly.

Fig. 3.4
figure 4

Number of rounds versus average residual energy of cluster

Fig. 3.5
figure 5

Packet arrival rate versus average End-to-End delay

In Fig. 3.4 the characteristics of both the protocols are similar initially since the energy level of the cluster heads are high, but during the later stage of simulation the average residual energy of primary cluster head in FTQAC is higher since the primary cluster head relinquishes its role to the secondary cluster head. This model of dual cluster head has the feature of fault-tolerance and improves the robustness of the WSN. From Fig. 3.4 it is observed that there is about 15% increase in the network lifetime using the dual cluster head model.

Figure 3.5 shows the average end-to-end delay for FTQAC and QBCDCP. In this evaluation, we change the packet arrival rate at the source node and measure the end-to-end delay. As expected, the increase in network load produces a higher queuing delay at each cluster head along a path, which gives a larger end-to-end delay. At a packet rate of 60 packets per second QBCDCP is unable to meet the delay objective of 10 seconds, due to the rapid depletion of energy in the cluster head; network congestion emerges at the cluster head because of limited energy and computing ability. The base station sets up paths based on the energy of the cluster heads. If a cluster head with low residual energy is selected for the QoS path, this results in drop of the link during the communication phase and affects the desired QoS. In FTQAC, the dual cluster head model ensures the necessary energy level and the bandwidth required for maintaining the link from base station to requesting cluster head node.

Fig. 3.6
figure 6

Packet arrival rate versus packet delivery ratio

As depicted in Fig. 3.6, the packet delivery ratio (PDR), decreases as the packet arrival rate increases. The packet delivery ratio is defined as the number of packets generated by the source to the number of packets received by the destination node. It is observed that FTQAC performs marginally better than QBCDCP when the packet arrival rate is above 30 packets per second. In QBCDCP, as the packet arrival rate increases, the cluster head in the QoS path gets depleted of energy and the connection is terminated, triggering route repair and hence results in a lower PDR. In FTQAC, the role transfer from primary cluster head to secondary cluster head ensures that the scheduled connection is not dropped, thereby maintaining the packet delivery ratio.

3.8 Summary

This chapter presents a Fault Tolerant QoS Adaptive Clustering Algorithm (FTQAC) protocol. The protocol achieves QoS routing in Wireless Sensor Networks by using delay and transmission energy as the routing metrics. It also ensures that the bandwidth objective of the application is met. The protocol achieves fault tolerance through a dual cluster head mechanism and guarantees the desired QoS. Evaluated results show an increase in lifetime of the WSN. The FTQAC provides an improvements of up to 15% increase in lifetime when compared to QBCDCP. The FTQAC is a feasible solution to the QoS fault tolerant routing problem in power constrained Wireless Sensor Networks.