LEACH AND HEED CLUSTERING ALGORITHMS IN WIRELESS SENSOR NETWORKS: A QUALITATIVE STUDY

Wireless sensor network consists of numerous small and low cost sensors which collect and transmit environmental data. These nodes are spatially distributed and capable of measuring their ambient. Sensor node is responsible for collecting data in regular intervals, converting the obtained data into electronic signals and transmitting data to sink node or base station through reliable wireless communications. Moreover, these nodes are supplied by non-rechargeable batteries with limited energy. Lifetime and network coverage are crucial factors in WSNs. Thus, particular algorithms must be employed so that energy consumption is reduced. In this paper two clustering algorithms LEACH and HEED are investigated.


INTRODUCTION
A WSN includes a large number of small devices called sensors.These nodes are spatially distributed and capable of measuring their ambient.Sensor node is responsible for collecting data in regular intervals, converting obtained data to an electronic signal and transmitting data to sink node or base station through reliable wireless communications.The most prominent application of wireless sensors is inside environments to which human can hardly access.Among these applications monitoring volcano eruption, monitoring impassable borders region, monitoring strength of dams, bridges and roads and monitoring battlefields or sensitive military zones might be mentioned.Since these sensors are utilized in hardly accessible areas and their batteries are not rechargeable with limited energy, lifetime and coverage of the network plays essential role in design of WSNs.Therefore, some algorithms must be exploited which reduce extra energy consumption in the sensor network.In this study several clustering algorithms are investigated.

WIRELESS SENSOR NETWORKS
Recent progress has brought about multipurpose, low cost, low energy and small sensors which are capable of short range communication.In these networks nodes are able to sense the environment, process data and communicate with base stations.Sensor network includes numerous sensor nodes which are densely distributed in the desired area.As these sensors are mostly utilized in dangerous or inaccessible regions, the locations of sensor nodes do not need adjustment.They are equipped with a simple processor so that they could process collected data instead of transmitting the raw version of it.They are able to perform local calculations merely using their nearby nodes.As a result, necessary and processed data is transmitted; this decreases the amount of transmitted data.It will decrease network traffic as well as resulting in better data fusion.Mentioned characteristics have caused these networks to be applied to various fields, such as military, hygienic, industrial and smart home.Table 1 and Figure 1 demonstrate components and applications of wireless sensor networks, respectively.

CLUSTERING CONCEPT IN WIRELESS SENSOR NETWORKS
In wireless sensor networks, sensors are randomly distributed in a wide area.Since battery lifetime is short and they cannot be charged or re-placed, sensor failure is highly probable.Due to the Large number of sensors in these networks, design and operation of such networks requires a scalable architecture and applying specific management.Furthermore, sensors in such environments have considerable energy consumption.Hence, designing energy saving algorithms significantly prolongs sensor lifetimes and, in turn, network lifetime increases.Clustering is a method for decreasing energy consumption and increasing network lifetime.Besides, it offers other advantages such as higher security, decreasing redundant data and increasing scalability.Clustering divides nodes into groups which are called clusters.Each cluster is managed by a cluster head and all members are coordinated with the cluster head.Cluster heads are responsible for communicating with their own members and other cluster heads.There are diverse methods for selecting cluster head.In some methods cluster head is selected by cluster members; while, in other methods cluster head is selected by network designer.Cluster head may either remain constant during network lifetime or change based on the algorithm.The same is true for members of clusters.In clustering methods each sensor is either a cluster head which introduces itself in a specific region or is a member which must introduce itself to cluster head and become its member.The members are only able to communicate with their own cluster head and transmit their data to it.Each cluster head receives data from its members, processes obtained data (if necessary), aggregates processed data and transmits it to the base station [2].

POPULAR CLUSTERING ALGORITHMS
There are several clustering algorithms.

LEACH algorithm
It is a self-organization clustering algorithm which distributes energy consumption between all sensors of the network.In this algorithm sensors are organized in local networks.In each local network one sensor is selected as cluster head.According to this algorithm all sensors might be selected as cluster head with a specific probability; however, due to importance of energy as a crucial  factor in clustering, sensors with higher energy levels are selected as cluster head randomly and rotationally.Moreover, as the data must be transmitted to base station by cluster head, obtained data is locally aggregated to reduce energy consumption and prolong network lifetime.As mentioned in LEACH algorithm sensors might be selected as cluster head with a particular probability.Cluster heads inform all sensors about their position and each sensor finds its corresponding cluster head based on minimum communication energy.After organizing the nodes, each cluster head transmits a schedule for members so that each node turns on its radio hardware in a specific time for data transmission.It will reduce energy consumption of nodes.When cluster head receives all information from its nodes it transmits received data to the base station.In this method each node determines whether it should become cluster head or not, based on its residual energy (Figure 3).

Algorithm operation
LEACH could be divided into several rounds.Each round starts with a setup phase and finishes with steady state phase.In the setup phase clusters are organized and in steady state information is transmitted to base station.

Setup phase
First off, each sensor determines whether it wants to be cluster head or not considering its residual energy and number of times it is selected as cluster head.The decision is made based on a random number between zero and one.Afterwards, if selected number is less than threshold that node will be cluster head in a new round.This trust threshold is derived from following equation: Where p is probability for cluster heads (selected by cluster), r is current round and p/1 is a set of nodes which were selected as cluster heads in previous round.At the first stage all nodes might be cluster heads with p probability.When a node is selected as cluster head it cannot be a cluster head for next p/1 rounds.As the probability of being cluster head is lower for some nodes, with this method all nodes could be selected as cluster head.When the cluster head is determined it announces its position by broadcasting advertisement message (ADV).This message includes a small message consisting of node ID and a header as announcement message.All nodes store received messages for next rounds.Each node selects its corresponding cluster head with respect to power of received signal.If at the end of procedure one node does not select its cluster head, one cluster head is randomly selected as its cluster head.Each node transmits a membership request message to its cluster head.In all stages of this phase, radio hardware of cluster heads must be on.Cluster head receives messages of its members.In LEACH algorithm, cluster heads operate as local control centers for coordination of data transfer in their cluster.Based on number of nodes a cluster head designs a schedule using TDMA method and transmits it to member nodes.

Steady state phase
When clusters are formed in the setup phase data is transmitted to cluster head and then base stations.In this stage it is assumed that all nodes have information.Each node turns on its radio hardware according to schedule received from cluster head.Subsequent to completion of data transmission the node turns off its radio hardware to avoid unnecessary energy consumption.It is noteworthy that radio hardware of cluster head must be on as long as it is playing cluster head role in the cluster.When all nodes transmit their data to cluster head, it processes received data to compress it as a unit.This is the operation of network in steady state conditions.Then, cluster head transmits information to base station.When this phase finishes, based on determined time span the setup phase starts again to determine next cluster head.If one node is constantly selected as cluster head it loses its energy very soon and dies.When a cluster head is dead all dependent nodes will be out of work.Hence, the principle of this algorithm is involving all nodes as cluster heads in the network.Using this algorithm cluster heads change alternatively to address the abovementioned problem.
In the next round all nodes which were cluster heads will set their probability to zero and the other nodes will increase their probability.If the probability of being cluster head is p, its probability in the next round is pr.In the first round p is zero which means that the node was not cluster head.p/1 is the total number of rounds.This procedure continues till all nodes are selected as cluster head once.

Advantages of this algorithm
• This algorithm does not need information of whole system and is completely distributed.

• Network lifetime is prolonged in comparison
with other existing algorithms.• With scheduling the nodes, they can stay in sleep mode and save energy.Additionally, data packet contention is avoided [1,3].

HEED algorithm
HEED clustering algorithm is a distributive clustering method which considers energy and communication cost simultaneously.HEED is an iterative grouping algorithm which utilizes residual energy of nodes and their communication cost to choose the best set as cluster head nodes.During clustering procedure a sensor node might be tentative cluster head, final cluster head or covered.At the beginning of grouping phase a node with higher energy level is more probable to be selected as tentative cluster head.It transmits a message to all sensor nodes existing in its group range and informs them about its new condition.For this purpose, AMRP (average power) is introduced which is a cost criterion and is exploited for breaking constraints in procedure of cluster head selection.
This algorithm has four main goals: • Prolonging network lifetime by distributing energy consumption • Terminating clustering process by constant number of iterations • Minimizing control overload • Providing appropriate distributed cluster heads and compressed clusters.
HEED does not consider any assumptions regarding distribution, density or ability of nodes (such as nodes ability relative to their location).Since the algorithm aims to prolong network lifetime, it decides based on residual energy of each node.To improve energy efficiency and network lifetime, inter cluster communication cost is also taken into account.Usually each node has a limited number of transmission power levels.As the power increases the covered area is increased as well.Thus, cluster range is determined by transmitted power level used in inter cluster communication and during clustering.

Algorithm operation
When several nodes are candidate for being cluster head, the node which has the lowest inter cluster cost will be selected as cluster head.
This cost is a function of: • Cluster characteristics, such as size of a cluster.
• Variability or non-variability of power levels used in intra cluster communications.
If power levels for cluster nodes are the same, communication cost cloud be dependent on the following parameters: Node degree, if it is necessary for load to be distributed on cluster heads.

Inverse of node degree, if denser clusters are needed
Now consider a case where variable power levels could be utilized for intra cluster communications.In this condition MinPwri is the minimum power level required for node i (1<i<M) so that VI is able to communicate with a cluster head, such as U. M denotes the number of nodes in the cluster range.Average Minimum Reachability Power (AMRP) is considered as average needed power level for all M nodes in the cluster range for reaching u.
If each node is allowed to choose proper power level to access its cluster head, AMRP provides an acceptable estimation of communication cost.If a node is cluster head, AMRP of node is a measure of required energy in cluster communications.Clustering algorithm is executed each Tpc + Tno seconds to select new cluster heads.In each node clustering process needs a few steps.The number of steps is represented by Niter.Each step lasts Tc (enough time for messages to reach from each neighbor).The probability of being cluster head, C prob , equals to: Assuming that an optimum percent cannot be determined before executing the algorithm, at the beginning an arbitrary percent is considered for probability of being cluster head (C prob = 0.5%).In this equation E residual is the energy remained in the node and E max is the maximum energy of node.The of Ch prob for each node cannot be less than a threshold value p min (4-10) which is proportionate to inverse of E max .This limitation is considered to terminate the algorithm after N iter = o(1) iterations.In each iteration, i uncovered nodes select themselves as cluster head with Emax probability.After step i SCH cluster heads are equal to union of cluster head sets after i-1 and new cluster heads in i iteration.Each node vi selects a node with the lowest cost in the SCH as its cluster head which can even be the node itself.Afterwards, each node doubles its Chprob and goes to next step.Pseudo algorithm is illustrated in figure 7.As the neighbors are detected once, it is not necessary to detect neighbors in each iteration of algorithms.Nodes detect their neighbors by transmitting and receiving messages.Each node which selects itself as cluster head transmits a message in the form of clusterhead msg (Node ID, selection status, cost).
If Ch prob is less than 1, the node is tentative CH, and if it is equal to one, it would be final CH.If at the end of HEED algorithm one node does not select a cluster head that node would be final cluster head.In the next step if a cluster head with lower cost appears, a tentative cluster head might be converted to a normal node.Notice that if a node has large residual energy and low cost it could select itself as cluster head successively [5].

CONCLUSION
LEACH and HEED clustering algorithms in wireless sensor networks were investigated.As mentioned the most prominent issue in wireless sensor networks is energy of nodes.In clustering algorithms cluster head play an important role in management of energy consumption.Taking advantage of this property the best efficiency might be achieved from sensors.As future work these algorithms might be compared and evaluated using NS-2 software.
Figure 2 depicts classification of clustering algorithms.This study aims to investigate HEED and LEACH algorithms.

Table 1 .
Components of wireless network network components Definition Sensor A device which detects an object or event or measures a physical quantity and converts it to electric signal.There are different types of sensors such as temperature sensors, pressure, humidity, photo and acceleration sensors Sensor node A node consisting of one or more sensors Network A network composed of sensor nodes with a specific objective Base station A node which is responsible for receiving data and establishes communication between nodes and task manager node.Task manager A node by which a person as operator or network manager communicates with the network