Abstract
Introduction
Wireless sensor networks (WSNs) are currently widely used in fields, such as traffic control, industrial and manufacturing automation, e-health, and animal monitoring. They are among the most important technologies of the 21st century and considered as the next step in information revolution. 1 WSNs are wireless networks that comprise a large number of low-cost and low-power sensor nodes deployed either inside or extremely close to the event and contain sensor nodes that can sense the physical environment for data acquisition, data computation, and communication. 2 A sensor node typically contains signal-processing circuits, microcontrollers, and wireless transmitters or receiver antennas and has limited processing capabilities. After collecting information, sensor nodes send the data to the base station (BS) if the latter is within communication range; otherwise, data are sent to other sensor nodes through routing techniques. A BS is a device that manages WSNs and collects data to be analyzed for further use. This device commonly has more energy capacity, processing power, and memory than typical sensor nodes. Sensor nodes are usually randomly deployed in the sensing fields. Once deployed, their batteries do not require recharging. Therefore, prolonging the life span of networks with limited energy is an important research topic concerning WSNs. The life span of a sensor network can be measured based on generic parameters, such as the time that the first sensor node loses its transmitting capability (first dead), the time that half of the sensor nodes lose their transmitting capabilities (half dead), and the time that all of the sensor nodes lose their transmitting capabilities (all dead). Recent years have witnessed great efforts concerning the energy efficiency made to prolong the life span of networks, such as energy-efficient routing protocols,3–8 Duty-cycling and medium access control (MAC) protocols,9–11 topology control,12–15 energy-efficient data aggregation schemes,16–19 and cross-layer optimization techniques.20–23 According to the energy model of sensor nodes, 24 the communicating part of a sensor node consumes considerably more energy than the computing part, thereby causing routing techniques to affect the energy conservation of sensor nodes. Clustering algorithms are widely used in WSNs. In cluster-based WSNs, several nodes form a cluster, and one of them is elected as cluster head (CH). The CH collects information from normal nodes and sends aggregated data to the BS or to other CHs. Thus, CHs consume considerably more energy than normal nodes and die faster. Most clustering algorithms randomly select several sensor nodes as CHs. This random selection of CHs cause uneven energy consumption, thereby reducing network life span. Hence, the energy load on every sensor node should be balanced. From the local point, the energy consumption of CHs is influenced by many factors, such as their distance to the BS and the number of cluster members. From the global point, the distribution of the CHs also affects the energy dissipation of the networks. If CHs are close to one another, energy dissipation will be unevenly distributed.
Game theory, which is developed for and extensively used in economics and biology, is a powerful mathematical tool for analyzing and predicting the behavior of rational and selfish entities. Game theory has recently been widely applied in WSNs. 25 In Koltsidas and Pavlidou, 26 game theory is used to analyze the abovementioned clustering problem and form a clustering mechanism called clustered routing for selfish sensors (CROSS). In CROSS, each sensor node is modeled as a player that can hear the messages of all the other players and know the number of players present. Based on the number of players, each node calculates an equilibrium probability, which decides if a player becomes a CH. However, the sensing field can be large in real WSNs; therefore, a sensor node cannot realistically and effectively communicate with all the sensors. Meanwhile, different CHs with different positions and cluster members do not have the same energy dissipation as normal nodes. CROSS assumes the ideal scenario that all CHs have the same energy dissipation.
In this article, we propose a new clustering algorithm based on localized game theory. For CH selection, each sensor node communicates only with neighbors within its communication radius. We also consider the residual energy of each node. Our proposed algorithm computes a probability on the basis of the number of players in a neighborhood of a node and its residual energy and determines whether to compete for CH.
This article is organized as follows. In section “Related works,” we discuss the related works on WSNs routing and clustering problems. In section “System model,” we described the system model in our proposed algorithm. We present our proposed algorithm in section “ECAGT algorithm.” In section “Simulation results and discussions,” we give the algorithm analysis and simulation results. Conclusions are presented in the last section. Finally, section “Conclusions” concludes this article.
Related works
Routing in WSNs means that the data from the sensor is forwarded to the BS. Routing algorithm is an important research topic in WSNs, and a number of routing and clustering algorithms have been developed so far.
Low-energy adaptive clustering hierarchy (LEACH)
24
is a well-known single-hop self-organizing clustering algorithm proposed by Heinzelman et al. and widely referenced routing protocol for WSNs. In this algorithm, the nodes in the networks form clusters by self-organization, and one of the nodes in each cluster is selected as CH. All non-CH nodes transmit data to the CHs, which receive and aggregate data before transmitting them to the BS. This two-layered algorithm minimizes energy consumption in WSNs through cluster formation and data aggregation. In LEACH, each node independently decides whether to become a CH. A sensor node selects a random number between 0 and 1. If this number is less than the threshold
where
CROSS
26
is proposed by Gerorgios Koltsidas and Fotini-Niovi Pavlidou from Aristotle University in Greece. This algorithm combines game theory and clustering to solve the routing problem of WSNs. In the said paper, sensor nodes are modeled as players, and CH selection is modeled as a clustering game. Whether a sensor node decides to declare itself a CH is the strategy space. The payoffs depend on whether the node declares itself a CH and whether data are sent to the BS. The author proved the existence of a Nash equilibrium, where no node will have the incentive to change the balance if every node declares itself a CH with probability
where
Routing algorithms come in different types as well. Clustering algorithms, such as weighted clustering, 33 hierarchal clustering,34–36 and dynamic clustering, 37 were proposed to organize nodes as clusters. The cluster-based approach for energy-efficiency (CLENER) algorithm, which was proposed in Silva et al., 38 uses fuzzy logic to form clusters. The non-CHs select CHs according to a cost function computed through the Takagi Sugeno fuzzy system. 39 An efficient data routing scheme is proposed in Anisi et al. 40 for controlling data delivery from the nodes to the BS. This scheme defines the link cost function of the next nodes and selects the next node by comparing their costs. Finally, a novel energy-efficient clustering mechanism based on the artificial bee colony algorithm was proposed by Karaboga et al. 41 In the next sections, we will propose a new clustering algorithm.
System model
Network model
WSN routing protocols are application specific. The assumptions regarding WSNs in this article are as follows:
The sensor nodes are fixed, energy-constrained, and have the same capabilities;
The BS is not subject to energy restrictions and has strong communication and computation capabilities;
Batteries do not recharge after node deployment;
The sensor nodes have enough power to reach the BS;
Each sensor node can change its transmission power level dynamically to adapt to a certain communication distance;
A sensor node can switch between run and sleep states under the command of a TDMA order.
We use the similar concept of round for LEACH. However, our proposed algorithm has no epoch. Each round has two states, namely, setup and steady states. In our algorithm, each node collects local information in the setup phase. Figure 1 shows a time line of our proposed algorithm.

Time line showing the procedures of our proposed algorithm.
Energy model
The evaluation of wireless communication algorithms and dissipation of energy when transmitting and receiving signals mostly depend on the energy model of communication. We assume an ideal model based on the energy model of LEACH. Figure 2 shows the radio energy dissipation model.

Radio energy dissipation model.
In Figure 2,
In the simulation, we use the same channel model used in Heinzelman et al.
24
This channel model includes free-space transmitting model (
With
The energy dissipated by the receiving part is
The values of
CHs aggregate the data they receive before transmitting them to the sink. The energy spent by a CH in aggregating
where
Therefore, when sensor
where
where
ECAGT algorithm
In this article, we propose an energy-efficient clustering algorithm based on game theory (ECAGT). This algorithm uses the same concept of round as that used by LEACH and CROSS. Each round consists of two states: setup state and steady state. In the setup state, we propose a new function for CH selection. CHs are elected and clusters are formed in this stage. In the steady state, the WSN sends data to the BS. In this article, our work focuses on CH selection and cluster formation.
Setup phase
Collecting local information
In this phase, each node collects the local information of its neighbor. As previously assumed, each sensor node can adjust its power level to adapt to a certain communication distance, and each node at their highest power level can communicate with another node. However, the energy dissipation of message sending increases as the communication distance increases. In this article, we set a communication radius

Nodes communicate only with neighbors within radius
Selecting CHs
From our perspective, LEACH and CROSS both select CHs randomly in each round. Thus, the position of the CHs cannot be evenly distributed. The CHs can be near or far from one another. Figure 4(a) shows a possible CH distribution layout in LEACH and CROSS. Despite the Zero Probability Zule, the energy consumption of the different CHs in equation (7) cannot be the same.

Comparison of CHs distribution. (a) Possible CH distribution layout in LEACH and CROSS and (b) typical CH distribution layout in our proposed algorithm.
In this article, we use a localized method to make sure that the CHs are properly distributed. Before a node chooses whether to become a CH, it first decides whether to be a candidate CH. Candidate CHs compete to be final CHs. After a node decides to be a candidate CH, it will announce itself as the final CH if it does not receive an announcement message from its neighbor sensor nodes. When a candidate CH hears an announcement, it will declare itself a normal node and leave the competition. This response eliminates the neighbors of CHs within a certain radius. Figure 4(b) shows a typical CH distribution layout in our proposed algorithm.
In CH candidate selection, we consider energy dissipation and propose a function based on equation (2) to select candidate CHs. This function is described as follows
where
The first part of the equation comes from the equilibrium of game theory, which is used in equation (2). The second part of the equation is the energy dissipation factor. By adding this factor to the equilibrium, the energy dissipation factor will have an effect on CH selection. We will discuss this equation and how it can affect the selection of CHs in detail in the next section.
After collecting local information, node
Cluster formation
After all the final CHs are elected, the final CHs change their communication power to transmit data to the BS and broadcast a message to announce their election. When normal nodes receive the message, they select the CH nearest to them. Some normal nodes may not be selected because they cannot reach any CH within their communication radii. Our solution to this problem is the changing of the power levels of all the unselected nodes to enable their communication with the nearest CH, so they can join the cluster. Figure 5 is the setup state flowchart of our proposed solution.

Flowchart of the setup state in the proposed algorithm.
Steady state
After all the clusters are formed, sensor nodes start to transmit data to the BS. In this state, CHs allocate time slots to the normal nodes. Each normal node collects sensing data and transmits them to its CH using its designated time slot. After a CH receives all the data packets from its cluster members, it aggregates the data and sends a compressed packet to the BS. After all the data are sent to the BS once in this state, the networks revert to the setup state and restart the cluster formation until the wireless network exhausts all the energy.
Simulation results and discussions
Simulation model
To evaluate our proposed algorithm, we run several simulations that compare LEACH, CROSS, and ECAGT with one another. We use MATLAB (R2014a) as the simulation tool. Table 1 shows the simulation parameters.
Simulation parameters.
We randomly place 100 nodes in a 100 m × 100 m area. The BS is at (50, 175), which is at least 75 m from the closest node of the network. The data packet size is 4000 bytes and the control signal packet size is 100 bytes. We use the energy model as we described in the “System model” section. In this energy model,
Parameter analysis
This section discusses how parameters

Life span of networks with different

Life span of networks with different

Average number of cluster heads with different

Life span of the networks under different

Average number of cluster heads under different

Life span of the networks with different
Algorithm discussions
In this section, we analyze the characters of our proposed algorithm.
Deviation of CHs position
To evaluate the distribution of CHs, we define a new performance parameter:
where

Comparison of
Probability discussion
Equation (9) is detailed in this section. First, we set
We add equation (12) to introduce the energy dissipation factor in CH selection.

Values of

Values of

Values of
Based on Figures 13–15,

Values of

Values of
Simulation results
In this section, we compare our proposed algorithm ECAGT with three other algorithms LEACH, CROSS, and LGCA. Figure 18 shows the life span of the networks under LEACH (

Comparison of network life spans of LEACH, CROSS, LGCA, and ECAGT.
Figure 19 compares the number of CHs per round in LEACH, CROSS, LGCA, and ECAGT. Based on Figure 19, LEACH and CROSS both have rounds with no CHs, that is, the nodes send data directly to the BS in these rounds. The figure also indicates that the deviation in the number of CHs in ECAGT is smaller than those in LEACH and CROSS.

Comparison of CHs number per round of LEACH, CROSS, LGCA, and ECAGT.
To eliminate the random factors, we run the simulation 1000 times and obtain the average life span of the networks. Figure 20 compares the network life spans across the three algorithms. In contrast to LEACH, CROSS, and LGCA, our algorithm ECAGT can prolong the life span of the first dead and half dead nodes. However, when the nodes start to die, the networks under ECAGT die faster than those under LEACH and CROSS. This effect resulting in all dead time under ECAGT is smaller than that under LEACH, CROSS, and LGCA.

A comparison of network life span of LEACH, CROSS, LGCA, and ECAGT.
Conclusion
In this article, we propose a new clustering algorithm based on LEACH and CROSS. In our proposed algorithm, each node and its neighbors form a clustering game for the selection of CHs, which in turn contend to be final CHs. One CH at most is within the computing radius of each sensor node. This mechanism ensures that the CHs are evenly distributed and the energy in the networks are evenly consumed. We also propose a new clustering probability equation, which makes the sensor node with high residual energy and increases the probability of a node with few neighbor nodes of becoming a CH. Simulation results show that when proper parameters are used, our algorithm is superior to LEACH and CROSS with regard to extension of WSN life span.
