Abstract
Introduction
The use of wireless sensor networks (WSNs) 1 has significantly grown in the past few years, demonstrating the crucial need for scalable energy-efficient routing, data collection, and aggregation procedures in large-scale environments. 2 The ability to support economical battery-powered nodes requires a low data rate for communication and a long battery life, which have driven the development of ZigBee standards. 3 Unlike most wireless networking paradigms, which are designed to support long-range transmissions, ZigBee is designed for short-range communication. The applications of this standard range from simple home appliance such as remote control to sophisticated health care uses such as patient monitoring.
WSNs are not the same as other networks because of the low battery power, node masses, and substantial amount of anticipated data. The sensor nodes (SNs) commonly use energy-constrained small batteries for their energy supply. Therefore, battery consumption is a crucial concern in extending the lifetime of a network operation. Many applications, including seismic activity tracking and traffic monitoring, expect the network to run for a long period of time. However, the life span of a WSN could be affected by many factors, including the energy efficiency of the MAC design, topology management, energy-saving flow control, power aware routing, and error control schemes, which operate in a risky, inefficient, and sometimes infeasible manner.
A WSN consists of many low-cost, low-power SNs that can perform sensing, simple computation, and the transmission of the sensed data to their cluster head. As indicated by Al-Karaki and Kamal 4 and Heinzelman et al., 5 every SN encompasses sensing, processing, transmission, mobilizer, position-finding system, and power units. Some of these components are optional, such as the mobilizer. The wireless links are mainly determined by the transmission power of the sensors; thus, a higher transmission power produces a richer connectivity. 6 The long-distance transmission of data by SNs is not energy efficient because the energy consumption is a superlinear function of the transmission distance. One of the methods to prolong the network’s lifetime while preserving network connectivity is to deploy a fault-tolerant relay node (RN), which is expensive but high powered. Its main task is to communicate with other SNs or RNs.
SNs are expected to be deployed randomly in the area of interest. 7 Node failures are inevitable in WSNs because of their inhospitable environment and unattended deployment. However, the failure of an RN causes more damage to the network because of the limited accessibility to the member nodes that are under its control.
A well-organized method to improve the lifetime of the system is to divide the network into different clusters with a high-energy node, which is called a cluster header (CH). In clustering, SNs are partitioned into different clusters. Each cluster is managed and controlled by the CH, and other nodes are referred to as the SNs or member nodes of the cluster. The formation of the cluster is commonly based on the energy of the SNs and their proximity to the CH.
The SNs do not directly communicate with the gateway; rather they have to send data to their own CH, which then aggregates the collected information, thus reducing the total number of packets relayed to the gateway. Thus, it is possible to reduce the energy consumption of the SN and the number of messages communicated to the gateway. This can also reduce the number of nodes that communicate with the gateway.
Impartial clustering is used to meet the application requirements. Clustered systems reduce the communication overhead and offer an efficient resource allocation, thereby decreasing the overall energy consumption and interference between SNs. In clustering, the placement of the routers must guarantee the connectivity, allowing every sensor to be able to communicate through the CHs with the gateway node.
The motivation of this research is on how to place the CH in appropriate location that minimizes the energy consumption of sensors. Sensors are battery constrained, and the failure of a sensor can make failure of the network in that specific area. If the CH failed, the data which are collected from all sensors do not reach the gateway. Also selecting an optimal CH is known to be an NP-hard problem. 8 In order to overcome the above-mentioned problem and to make the network fault tolerant, we proposed a fault-tolerant CH-selection algorithm. To materialize the proposed scheme, we used the K-means clustering algorithm to place the routers in the process of establishing CHs. Once the node which is located in the centroid is selected as the CH, the K-means algorithm is not used anymore (Figure 1).

Clustering WSN.
The remaining part of this article is organized as follows. In section “Background,” we present the related work and our network model. In section “Proposed mechanism,” we describe the proposed mechanism for energy-efficient router placement. In section “Performance evaluation,” we report the results of a performance evaluation. Finally, in section “Conclusion,” we conclude the article.
Background
Related work
Much research has been done on low-power, low-energy, and low-processing resource-constrained small devices. A clustering-based protocol called the low-energy adaptive clustering hierarchy (LEACH) was proposed for sensor networks by Tang et al. 9 This protocol reduces the energy dissipation in sensor networks.
The objective of LEACH is to minimize the energy dissipation in sensor networks by randomly selecting member nodes as CHs. If the node selected to become a CH has less energy, the battery energy will be drained quickly. Thus, the high energy dissipation during communication with the gateway is spread to every SN in the sensor network environment.
The operation of LEACH is classified into two phases: the set-up phase and steady phase. Each step starts with the set-up or clustering phase, during which the clusters are organized. This is followed by a steady phase, in which data packets are sent from the member nodes to the CHs. After the data are combined, the CHs will transmit the aggregated information to the gateway. During the set-up phase, the CHs have to introduce themselves to every member node in the sensor network. During the steady phase, the SNs can start sensing and sending the collected information to their own CHs once per frame allocated to them. This assumes that the node always has data to transmit. After the transmission, the node goes to sleep until the next allocated transmission slot to save energy.
The CH has to keep its receiver turned on constantly to collect information from its cluster members. The duration of the set-up phase is less than that of the steady phase. The duration of the steady phase is high to reduce the overhead. However, LEACH incurs a high communication overhead during the cluster head selection and advertisement processes.
Concerning router placement schemes in a WSN environment, the approach by Cheng et al. 10 proposed RN placement for uniformly deployed SNs. This strategy employs a few RNs so that every SN can reach at least one RN and the RNs form a connected network. Moreover, they considered various problems in which each SN should reach at least two RNs. However, this study did not consider SNs that were deployed in a non-uniform fashion.
A relay sensor placement mechanism for WSNs was proposed by Mahalik. 11 This mechanism formulates the optimization problem as a Steiner minimum tree with a minimum number of Steiner points (SMT-MSP), which is NP-hard. The network survivability, which results in the failure of the network, is not considered in the scheme. A fault-tolerant clustering scheme was suggested by Gupta and Younis. 7 However, this scheme does not address the problem of the gateway node placement and energy utilization.
An energy-efficient clustering algorithm has been proposed for WSNs using fuzzy logic concept by Nayak and Devulapalli. 12 By selecting suitable fuzzy descriptors, one super cluster head is elected among the cluster heads, who is the representative for delivering the message to a mobile base station. Their proposed clustering technique follows the basic principle of LEACH. Lee et al. 6 proposed a clustering approach that follows the same technique as LEACH, where clusters are configured in each round. To prolong the lifetime of the network, they also proposed a technique that can evenly distribute the workload among the nodes.
As described by Mahmood et al., 13 the cluster head is not changed until its energy is below the required threshold, whereas new cluster head is chosen in every round in LEACH. The other difference with LEACH is that it uses different amplification for the signal depending on the type of communication such as intra-cluster communication, inter-cluster communication, and data transmission. Neto et al. 14 enhanced the LEACH protocol to achieve improved energy-saving performance. The node sends data packet indirectly to the cluster head by relaying a nearby node with the cluster head. Thus, transmission energy is reduced compared to direct transmission. In addition, node and cluster head can refuse data transmission requested from other nodes depending on their energy level to save their energy.
Network model
When considering numerous sensors deployed in the field of interest, we can make some assumptions about the properties of the sensor network:
All of the nodes are able to manage their own energy consumption.
The CHs know the remaining energy budget of each member nodes.
The SNs are randomly distributed in the target area.
The SNs are fixed as typically assumed for sensor network applications.
The SNs can interconnect or communicate using equal transmission power levels.
The energy consumptions of the member nodes are not uniform for all the nodes, that is, they vary based on their tasks.
All of the SNs are able to transmit their collected information to their own CH.
All of the SNs have the same communication and processing capabilities. They remain unattended after their deployment. The battery of each SN is not re-chargeable.
Initially, for the placement of the CHs, the gateway or server can run the K-means algorithm to select the initial CHs.
Each node has its own identification number based on the following MAC address assignment techniques. The MAC address is uniquely assigned to generate the identification number of each node in the network.
Address assignment for clustering
In this section, we describe the address assignment technique for clustering. After clustering is done, addresses are given to nodes using a dispersed address assignment scheme. The gateway determines the maximum children
The initial
The gateway is placed at depth zero, whereas the node that is a child of another node at depth
We assign the addresses accordingly; for example, in Figure 2, addresses are assigned to one coordinator or gateway, three routers, and nine children with a depth of 3.

Address assignment and cluster formation.
Proposed mechanism
In the following section, we describe the proposed router placement scheme for cluster-based energy efficiency in WSNs.
CH selection
In the existing CH selection schemes such as the scheme proposed by Baker and Ephremides, 16 it is beneficial to select nodes with a larger degree (i.e. nodes with a greater number of neighbors within a given transmission range) so as to establish a dense cluster of nodes and then select the minimal-dominating set of CHs. Nevertheless, this may result in the rapid energy drain of nodes with larger degrees. The work by Heinzelman et al. 17 considers node identifiers as a mechanism to choose cluster heads. Hence, the node with the lowest identifier is assigned as a cluster head.
However, this technique may not be appropriate in a WSN environment because it penalizes an energy-constrained node without taking the battery lifetime into consideration. Therefore, our scheme selects a CH through cluster-head role rotation among the SNs of a given cluster. Rotating the cluster-head task among the SNs can be helpful to make the network fault tolerant. It also creates a balance between the nodes, which is another benefit. 18
All of the member nodes that receive the announcement message from their CH during the initial cluster head formation are nominees for selection as CHs. Every node considered to be a cluster head calculates its remaining energy budget and sends it to their CH. All of the nodes that are currently working as CHs maintain their respective secondary CH registration request in their candidate secondary CH list.
Regarding the CH placement, our scheme uses a Euclidean distance computation to place computer-generated nodes (CGNs), which are placed at the centroid, rather than the real nodes. The node that is the closest to the CGN becomes the CH. During the formation of the cluster, if a node is on the edge of two clusters, that node will join the cluster that first sends a beacon to it. The node sends its ID and becomes a member of that cluster.
Once a CH is created, it sorts and creates a hierarchy of the SNs based on the identification numbers of the sensors and their remaining battery lives, which will be discussed in the following sections. During this ranking, the CH broadcasts a message indicating which secondary CH will be the next CH if the existing CH fails.
As previously discussed, the function of the CH is not only gathering information from the sensors and sending the gathered data to the gateway but also controlling and ranking the sensors based on their battery lives for the purpose of fault tolerance. This technique can also be used in the case of a failure of the CH; the sensor with the greatest battery life can automatically replace the original CH and perform the tasks of the CH. The newly designated CH performs its main task without the need for additional communication. The details of the CH formation algorithm will be discussed in relation to the proposed energy-efficient algorithm for fault-tolerant CHs in WSNs.
K-means algorithm for initial CH placement
For the purpose of clustering, we used the K-means algorithm to select cluster heads which are in the centroid for the sensors in given clusters. K-means calculates the distance from each SN and makes the centroid node be a CH of the cluster. It is used only for the initial selection of the CH. Once the CH is selected, we used our proposed fault-tolerant CH selection algorithm.
During the CH-formation stage, the gateway assigns
The algorithm that we used to calculate the centroid to select the CH at the centroid is as follows:
Set
Calculate the Euclidean distance of each of the member nodes from the centroid and give it to the centroids adjacent to it. By doing this,
Repeat and recalculate the position of the means in every cluster and check if there is a difference in location from the preceding.
If some modification is needed, repeat from the second steps; otherwise finalize clustering.
As we see in Figure 3, if the gateway randomly assigns SNs as CHs, the energy consumed by the sensors to reach the CHs will not be optimal. A member node that is far from the CH consumes a large amount of energy and hence drains its energy within a short time.

Placement of the CH without using K-means algorithm.
However, using the K-means algorithm, when the CH is placed at the centroid of every cluster, the energy consumed by the SNs that are far from the CH will be decreased, which will increase the lifetimes of the nodes. Figure 4 shows the CHs placed at the centroids of the clusters. The technique used to place the CH at the centroid is discussed in the following sections.

Placement of the CH in the centroid using K-means algorithm.
Fault-tolerant CH-selection algorithm
When the clusters are formed, each node of the corresponding cluster gets an identification number, as previously described. After the CHs are nominated, they calculate the energy budget of each of their SNs to check whether their energy is greater than the threshold.
The procedure that is used to transfer the data is the same as that of the steady phase suggested in LEACH. In the steady phase of LEACH, the member nodes can start collecting the data by sensing and sending the collected information to the CH.
Once they receive the collected information from the member nodes, the CHs also aggregate or combine this information before transferring it to the destination gateway. In the steady phase, the frame is broken into sub-frames, where the sensors can transmit their collected information to their CHs no more than once in each frame during their given transmission slot.
Every CH sends announcement messages to its member nodes to check the energy status of each member. The CHs periodically calculate the energy levels of the SNs in their clusters to check the status of each member node and select the node that has the highest energy and is the closest to the current CH as a secondary CH. After the formation of the initial CH, the CH selects the secondary CH from the nodes within the cluster.
Therefore, if the existing CH fails, the secondary CH assumes the task of the existing CH to make the network fault tolerant. During the energy checkup, the CH uses an energy threshold (10 J in our work). If the energy level of a node is less than that threshold, the node is not selected as the secondary CH.
The proposed fault-tolerant CH selection algorithm is as follows. The CH periodically calculates the energy status of each SN in the cluster:
The CH assigns the closest node as the S-CH.
If the energy of S-CH < ENERGY-THRES HOLD, then go to step 6. Else S-CH is placed in its position (in its current rank).
for ( If (the energy of Else The CH periodically checks the energy of
If (the energy of the current CH < ENERGY-THRESHOLD) then the CH tells its sensors and other CHs to use S-CH.
for ( If ( S-CH = The energy of each
where
End
The K-means and CH-selection algorithms are computed with the time complexities of
Analysis
When selecting the secondary CH, if the energy budget of the currently selected secondary CH is less than the given threshold, then the CH sends a request to
If the energy of
where
In order to calculate
where
Here,
Because each SN has a different distance from the CH in the cluster, the energy consumption of a node that is far from the CH is larger than that of a node that is close to the CH. Thus, the lifetimes of the nodes also vary based on their tasks and distances from the CH. The total remaining lifetime of the sensors in a given cluster is calculated as follows
The remaining energy,
Here,
where
Performance evaluation
This section discusses an evaluation of the performance of the proposed scheme in terms of the consumed energy, as well as the end-to-end delay, packet loss, and throughput. Initially, all of the nodes had equal energy budgets. The evaluation was performed using the OPNET 16.1 discrete event simulator tool in a 32-bit Windows 7 operating system. Each simulation lasted for 60 min, and we averaged over 100 iterations. The simulation parameters are listed in Table 1.
Simulation parameters.
Energy consumption
The performance of our proposed scheme was compared with that of the LEACH clustering strategy for fair comparison of basic features, although there are many variations of LEACH. As shown in Figure 5, the simulation results reveal that the energy consumption of our proposed scheme was better than that of the LEACH mechanism.

Energy consumption.
The higher energy consumption of the LEACH scheme may have resulted from the communication overhead incurred during the CH setup process. In addition, LEACH consumes a large amount of energy because of the huge number of messages sent during the CH re-election process. Using more clusters can save more energy because the transmission distance between cluster representatives can be shortened.
When there are a small number of clusters in the network, the energy consumption of the SNs is very high. As seen in Figure 5, when the number of CHs increases, the consumed energy decreases. The K-means algorithm consumes less energy because the energy of the CGNs can be managed by the gateway. When we deploy both the proposed K-means and fault-tolerant algorithms, the energy consumed by the CHs is also included; therefore, the energy consumption is slightly higher than that of the pure K-means algorithm.
Packet loss
As indicated in Figure 6, our scheme experiences less packet loss than LEACH. LEACH had more packet loss as a result of the advertisement process and communication overhead. Thus, the packet loss in our scheme is less than that of LEACH when considering the traffic sent and received during the best-effort case. The small packet loss in our scheme results from the proposed fault-tolerant CH-selection algorithm.

Traffic sent and received.
Throughput
As indicated in Figure 7, the simulation results show that increasing the number of CHs increases the throughput until a certain number of CHs. After reaching the maximum, the throughput starts to decrease. In the case of LEACH, the throughput slowly increases with an increase in the number of CHs. The continuous increase in throughput with an increase in the number of CHs in LEACH is observed to be due to the energy consumption during the CH formation.

Throughput versus number of CHs.
End-to-end delay
As depicted in Figure 8, the end-to-end delay of our scheme is also better than that of LEACH. When the CH communicates with many sensors, it collects data from all the sensors in that cluster and aggregates all those data and sends the aggregated data to the gateway. At this time, delay and packet loss occur. Initially, when the number of CHs is small, the end-to-end delay is high, and as the number of CHs increases the delay decreases and reaches the lowest point. As the number of CHs increases, throughput increases and energy consumption decreases until it reaches the optimum as shown in the simulation. After reaching the maximum, the throughput starts to decrease.

Total delay.
Conclusion
In this work, we proposed a cluster-based energy-efficient router placement for WSNs. To materialize the proposed scheme, we used the K-means clustering algorithm to place the routers in the process of establishing CHs. We also proposed a fault-tolerant CH-selection algorithm to select a secondary CH from the member nodes based on their proximity and battery budget. When the current CH fails, the secondary CH becomes the CH and performs the role of the CH. The performance of the proposed scheme was evaluated in relation to the energy consumption, end-to-end delay, and packet loss. In the simulation results, we observed that our scheme achieved a better performance than LEACH.
