International Journal of Advanced Computer Engineering and Communication Technology (IJACECT) _______________________________________________________________________________________________ Efficient Hierarchical Based Routing Protocol Enhancement for Energy Balancing and Prolonging the Lifetime of the WSNs 1 Surekha K B, 2T. G. Basavaraju 1 Research Scholar, Dept of CSE, Prof & HOD: Dept. of Computer Sciences & Engg JNTUH Hyderabad, Government SKSJ Technological Institute, Bangalore-560 001 E-Mail: 1prashanth.surekha@gmail.com, 2tgbraju@gmail.com 2 Abstract— A Wireless Sensor Network (WSN) is a wireless network consisting of spatially distributed autonomous tiny computing devices, each equipped with sensors, a wireless radio, a processor, and a power source. Sensor networks are envisioned to be deployed in the physical environment in order to monitor a wide range of environmental phenomena. Efficient usage of energy is one of the most important concerns in wireless sensor networks, especially while designing a routing protocol. LEACH is a promising protocol that combines medium access with routing and application-specific data aggregation to achieve good performance in terms of network lifetime, energy and throughput. The paper aims at evaluating the performance of the LEACH protocol for Wireless Sensor Network under varying network models. Thus, an extensive comparison of energy, throughput and lifetime of the sensor network under different network scenarios is carried out and result analysis is done in detail. Through NS2 simulation, it is clearly shows that LEACH works well for a network with the Base Station placed at the position (50,175) and when the numbers of clusters or clusters heads are 5 percentages of the total sensor nodes. Keywords— Wireless Sensor Networks, Base Station, Energy Efficiency, LEACH protocol, performance, analysis, lifetime I. INTRODUCTION Wireless Sensor Networks (WSNs) nodes are powered by non-rechargeable batteries and thus energy is a scarce resource. It is imperative that energy conservation is considered across all layers of the protocol stack in order to minimizing the total network energy consumption and prolong the operational lifetime of the network. WSNs have extensive potential applications. Nodes of a WSN are generally deployed to collect the interested data (temperature, chemicals, etc.) or just sense the presence or the absence of a phenomenon of interest in an information field. The amount of data collected by nodes varies with the application requirement of the WSN. The application requirement can be simply embodied by source rates of nodes. communication of nodes in WSNs. Therefore, the energy efficient approaches for the low rate setup should be explored for WSNs. Among arts of energy efficiency in WSNs, joint cross-layer design stands as the most alternative to inefficient traditional layered protocol architectures. There has been some cross-layer work aiming to optimize the network energy consumption and prolong the lifetime of the network. In [1], authors characterize an inherent trade-off in simultaneously maximizing the network lifetime and the application performance (characterized as network utility) by considering a cross-layer design problem in a wireless sensor network with orthogonal link transmissions. The lifetime of the wireless sensor network is highly dependent on the lifetime of the sensors battery, preserving energy in sensors will increase the lifetime of the network. Most of the energy is consumed by the nodes for making efficient routing and sensing operations [2]. In this paper the performance evaluation of LEACH routing protocol for Wireless Sensor Networks is carried out. LEACH is a promising protocol which combines the best characteristics of medium access with routing and application specific data aggregation to achieve good performance in terms of network lifetime, information latency and collecting application dependent quality [3]. Wireless sensor networks are emerging network technology with innumerable applications. But the energy constraints reduce its successful deployment. This paper evaluate the performance of existing LEACH protocol in terms of throughput (data received at the base station), total energy consumed, total number of nodes alive, when the network is subject to various traffic scenarios. The remainder of the paper is organized as follows: In Section 2 related work carried out is discussed. The LEACH protocol and its working is discussed in Section 3. In section 4, protocol design is described. We provide simulation and analysis of or LEACH protocol and finally, the paper is concluded in Section 5. II. RELATED WORK Typically, the data generation and transmission rates of nodes are low by reason of the scarce of power and the limitation of capacity of storage, processing and _______________________________________________________________________________________________ ISSN (Print): 2319-2526, Volume-3, Issue-3, 2014 1 International Journal of Advanced Computer Engineering and Communication Technology (IJACECT) _______________________________________________________________________________________________ A sensor network is defined as being composed of a large number of nodes which are deployed densely in close proximity to the phenomenon to be monitored. Each of these nodes collects data and its purpose is to route this information back to a sink. The network must possess self-organizing capabilities since the positions of individual nodes are not predetermined. Cooperation among nodes is the dominant feature of this type of network, where groups of nodes cooperate to disseminate the information gathered in their vicinity to the user. LEACH is energy efficient hierarchical based protocol that balances the energy expense, saves the node energy and hence prolongs the lifetime of the network [4]. The efficient utilization of energy source in a sensor node is very important criteria to prolong the life time of wireless sensor network. Wireless sensor networks have explored many new protocols specifically designed for sensor network where energy consideration is very crucial. Most of importance, given to hierarchical routing protocols based on clustering which has better scalability. As sensor nodes are generally battery powered devices, the critical aspects to face concern how to reduce the energy consumption of nodes, so that the network lifetime can be extended to reasonable times, LEACH protocol is analysed in terms of energy, throughput and lifetime [5]. Low Energy Adaptive Clustering Hierarchy (LEACH) is the first energy efficient routing protocol for hierarchical clustering. It reduces the energy significantly. The LEACH protocol forms clusters in the sensor networks and randomly selects the cluster heads for each cluster. The basic principle is that it assigns overall energy consumption of the network uniformly to each sensor node through periodically selecting different nodes as cluster-head. This makes the survival time of nodes close to the lifetime of network. Thus, the energy consumption can be reduced and lifetime of the entire network can be pro-longed [6]. Clustering is an efficient technique used to achieve the specific performance requirements of large scale wireless sensor networks. The simulation results based on the LEACH protocol identify some important factors that induce unbalanced energy consumption among sensor nodes and hence affect the network lifetime. This highlights the need for an adaptive clustering protocol that can increase the network lifetime by further balancing the energy consumption among sensor nodes [7]. Different traffic models are introduced to LEACH protocol for wireless sensor network. Network performance of LEACH with these traffic models is analysed. The results provide design guidelines for LEACH implementation under a realistic traffic model in which each node has a range of transmission probabilities and for a range of network sizes [8]. The resource constrained nature of WSN implies various challenges in its design and operations, which degrades its performance. However, the major fact that sensor nodes run out of energy quickly, has been an issue. Many routing, power management, and data dissemination protocols have been specifically designed for WSNs, where energy consumption is an essential design issue, which preserves longevity of the network. Out of these, clustering algorithms have gained more importance, in increasing the lifetime of WSN, because of their approach in cluster-head selection and data aggregation [9]. III. LEACH PROTOCOL LEACH protocol is one of the renowned hierarchical routing approaches for wireless sensor networks. It is novel energy efficient clustering hierarchy which focuses on the equalize energy distribution and area distribution for the clusters. This method improves the lifespan of the network and also the data throughput of the network [10]. LEACH uses a TDMA based MAC protocol, and in order to maintain balanced energy consumption. The TDMA adds feature to leach to reduce the consumption of the network resource in each round. The protocol shows a significant reduction in network energy consumption [11]. LEACH [12] is a hierarchical protocol in which most nodes transmit to cluster heads, and the cluster heads aggregate and compress the data and forward it to the base station (sink). Each node uses a stochastic algorithm at each round to determine whether it will become a cluster head in this round. LEACH assumes that each node has a radio powerful enough to directly reach the base station or the nearest cluster head, but that using this radio at full power all the time would waste energy [13]. Nodes that have been cluster heads cannot become cluster heads again for P rounds, where P is the desired percentage of cluster heads. Thereafter, each node has a 1/P probability of becoming a cluster head in each round [14]. At the end of each round, each node that is not a cluster head selects the closest cluster head and joins that cluster. The cluster head then creates a schedule for each node in its cluster to transmit its data [15]. IV. PROTOCOL DESIGN A. Mathematical Model The mathematical model of [16] is used to compute the total energy dissipation in the sensor network for the transmission of a frame. The derivative of the total energy is taken to find the optimum number of clusters Hopt is given by _______________________________________________________________________________________________ ISSN (Print): 2319-2526, Volume-3, Issue-3, 2014 2 International Journal of Advanced Computer Engineering and Communication Technology (IJACECT) _______________________________________________________________________________________________ H opt N 2 Ef D 2 Em d CHBS Where N is the total number of sensor nodes, D is the dimension of the sensor area, dCHBS is the distance between cluster head and base station, Ef and Em are the amplifier energies. In [17], a mathematical model is proposed to compute the total energy consumption in the sensor network during a single round. By taking the derivative of the total energy, it also finds the optimum number of clusters, correlated values. Finally it transmits the aggregated data directly to BS. The function of LEACH is divided into rounds which are further organized in two phases. The setup phase consists of CH selection and cluster formation followed by steady-state phase in which selected CH does data collection, aggregation, and delivery to BS. B. Setup Phase It starts with the self-election of nodes to become CHs. The self-election algorithm ensures that CH role rotates among nodes to distribute energy consumption evenly across all nodes. CH selection and rotation algorithm N H opt Ef Em d D 2 CHBS In [18], a mathematical model is proposed to calculate the total energy consumption in the sensor network during a single round. It also finds the desired optimum cluster head probability, Popt as— Popt 1 Ef 2 E d4 E E m CHBS efec DA where, λ is the intensity of homogeneous spatial Poisson process that indicates the sensor node density, Eelec is the electronic energy required for coding, modulation, filtering etc. and EDA is the energy required for data aggregation. All nodes that are not cluster heads only communicate with the cluster head in a TDMA fashion, according to the schedule created by the cluster head. They do so using the minimum energy needed to reach the cluster head, and only need to keep their radios on during their time slot. LEACH also uses CDMA so that each cluster uses a different set of CDMA codes, to minimize interference between clusters. LEACH is a cross layered protocol architecture that combines medium access with routing to collect and deliver data to BS. The main goals of LEACH are: • Increasing network lifetime. • Decreasing network energy consumption. The CH selection algorithm is simple and lightweight using random choice for CH selection. This reduces the overhead for determining optimal CH. To decide if it is its turn to become a CH, a node, n, generates a random number, v, between 0 and 1. It then compares it with CH selection threshold, T (n) which is designed to ensure with high probability that a pre-determined fraction of nodes, P, is elected as CH for each round. Threshold also ensures that nodes which served in past 1/P rounds are not selected as CH in the current round. To meet up these necessities, the threshold of a contending node n is articulated as follows: P 1- P*(r mod 1/P) T (n) = 0 if n € G otherwise C. Steady State Phase During this phase, NCH nodes periodically collect sensor data and transmit it to CH in their allocated slots. The entire steady-state operation is broken into frames which are further broken into slots of constant duration. NCH nodes send collected sensor data to their respective CH at most once per frame during their allocated transmission slot and enter the sleep mode otherwise. Data transmissions are scheduled to avoid collisions and increase sleep time of each NCH node. With slots of constant duration, time to send a frame of data depends on the number of nodes in the cluster. • Reducing number of communication messages by data aggregation. In order to achieve these goals, LEACH uses hierarchical approach and organizes the network into a set of clusters. Each cluster is administered by a selected CH. The CH does the task of creating TDMA-based schedule to assigns a time slot to each Cluster Member (CM) for periodic data transmission to CH. CH then aggregates the data to remove redundancy among V. SIMULATION RESULTS AND ANALYSIS A. Simulation Environment NS2 is written in the C++ programming language with the Object Tool Common Language (OTCL) as the front-end interpreter. A class of hierarchy supported in C++ is the compiled hierarchy and the interpreter _______________________________________________________________________________________________ ISSN (Print): 2319-2526, Volume-3, Issue-3, 2014 3 International Journal of Advanced Computer Engineering and Communication Technology (IJACECT) _______________________________________________________________________________________________ hierarchy for OTCL. The complete simulations are carried out using Network Simulation NS2 [19]. The Table I show the simulation parameters used in the simulation. TABLE I SIMULATION PARAMETERS Parameter Description Node Density 25, 50, 75and 100 Simulation Area 1000m x 1000m Fig 1. Simulation Snap Shot Base Station Location (50, 100), (50,125), (50,150) and (50, 175) Packet Size 512 bytes and 1024 bytes Initial Energy 40J Processing Delay 50 µs Graphs are plotted for the extracted values like Position of BS versus Data received at the BS, Total energy consumed versus Number of Clusters, Number of Nodes versus Data received at the BS, Network Lifetime versus Number of Clusters, Total data received at the BS versus Number of Clusters, Node Density, Packet size versus Energy consumed. Signal Wavelength 0.325 m For every event created by the network component, the event will be placed onto an event queue linked to the scheduler. The data structure is ordered to be synchronized with the executing events invoked by the event handler. As the simulation progresses, the first event in the queue is assigned with the appropriate network component and executed. The scenarios are implemented with scripts written in TCL that comprise commands and parameters for simulator initialization, node creation and configuration. The trace file will contain information on the various events which occurred, details of node behaviour, packet transmissions and receptions, communication layer, packet drops, etc. Simulation is carried out for scenarios containing 25, 50, 75 and 100 nodes with the simulation time of 3600 seconds and each node having an initial energy of 2 joules. Simulation is done by considering the channel as wireless, propagation as two-ray ground, antenna type is Omni-directional where it can receive and transmit in all directions. A. Position of Base Station versus Total Energy Consumed Fig. 2. Position of BS vs. Total energy consumed When the position of the Base Station is changed, we observe that the total energy consumed increases. Therefore the optimal position of the Base Station in the LEACH protocol is (50,175), where less energy is consumed, than the other positions as shown in figure 2. B. Position of Base Station versus Data received at the Base Station B. Simulation Results The simulation is carried out in NS2 simulation environment for LEACH protocol to obtain certain parameters for comparison. The required values are extracted from simulation output of the LEACH protocol that is subject to various traffic conditions. Simulation snap shot for initial network condition is shown in figure 1. The red colour nodes depicts that node energy depletion Fig 3: Position of BS vs. Data received at BS As shown in figure 3, when we change the position of the Base Station, we observe that the total data received at the Base Station goes on increasing. Therefore the optimal position of the Base Station in the LEACH protocol is considered to be (50,175) where the amount _______________________________________________________________________________________________ ISSN (Print): 2319-2526, Volume-3, Issue-3, 2014 4 International Journal of Advanced Computer Engineering and Communication Technology (IJACECT) _______________________________________________________________________________________________ of data received is comparatively better that other positions. heads are 5 percentages of the sensor nodes then the performance is good. C. Total Energy Consumed versus Number of Clusters F. Throughput versus Number of Nodes In this scenario, the numbers of nodes in the network are varied. Fig 4: Number of Clusters Vs Energy dissipation of the network From the figure 4 results, we observe that if the clusters in the network or cluster heads in the network are below or above 5 percentage of the total number of nodes, the performance of the network is degraded. D. Network Lifetime versus Number of Clusters Fig 7: No. of Nodes Vs Throughput The base station are set to different values such as 25, 50, 75 and 101, by replacing the existing one at (50, 175) and by keeping the number of cluster heads in the network to 5 percentage of the total sensor nodes, and observe the total data received at the base station. From the figure 7 results, we observe that the performance of the network is better when the number of clusters is set to 5 percentages of the total sensor nodes in the network and when the position of the Base Station is at (50, 175). G. Node Density versus Packet Size Fig 5: Number of Clusters Vs Energy dissipation of the network The figure 5 results shows that if the clusters in the network or cluster heads in the network are below or above 5 percentage of the total number of nodes, the performance of the network is degraded in terms of lifetime. E. Throughput versus Number of Clusters Fig 8: Energy Level for Different Packet Size and Node Density From the figure 8 results, we observe that as we increase the packet size for different nodes, the energy consumption at the Base Station also increases. Therefore the packet size must be kept optimal so that the performance of the network is enhanced in terms of energy and throughput. VI. Fig 6: No. of Clusters Vs Throughput of the network CONCLUSIONS Efficient usage of energy is one of the most important concerns in wireless sensor networks, especially while designing a routing protocol. The project works aims at evaluating the performance of the LEACH protocol for Wireless Sensor Network under varying network models. Through our simulation, we show that LEACH works From the figure 6 results, we observe that by varying the different number of cluster head/clusters in the network below or above 5 percentage of the total number of nodes, the performance of the network is degraded in terms of throughput, so when the numbers of cluster _______________________________________________________________________________________________ ISSN (Print): 2319-2526, Volume-3, Issue-3, 2014 5 International Journal of Advanced Computer Engineering and Communication Technology (IJACECT) _______________________________________________________________________________________________ well for a network with the Base Station placed at the position (50,175) and when the numbers of clusters/ clusters heads are 5 percentages of the total sensor nodes. We compare the energy, throughput and lifetime of the network under different network scenarios. LEACH is a promising protocol that combines medium access with routing and application-specific data aggregation to achieve good performance in terms of network lifetime, energy and throughput. The simulations results are limited in scope and hence more thorough experiments are required by changing many parameters. Implementing the protocol in real life scenario is straight forward but may require little modifications. More wide research is necessary to further increase the efficient usage of energy in wireless sensor network. Application Constraints”, IJCNIS”, 2009, 1, 1623. [10] Guofeng Hou and K. Wendy Tang, “Evaluation of LEACH Protocol Subject to Different Traffic Models”, NGNCON, July 2006. [11] Parth M Dave and Purvang D Dalal, “Simulation and Performance Evaluation of Routing Protocols in Wireless Sensor Network”, IJARCCE, volume 2, Issue 3, March 2013. [12] V.B. Thakar, C.B Desai and S.K. Hadia, “Performance Evaluation and Improvement of LEACH- A Wireless Sensor Network Protocol using a Novel Algorithm for Clustering”, Journal of Information, Knowledge and Research in Electronics and Communication Engineering. [13] Mortaza Fahimi Khaton Abad and Mohammad Ali Jabraeil Jamali, “ Modify LEACH Algorithm for Wireless Sensor Network”, IJCSI, volume 8, Issue 5, No 1, September 2011. [14] Dr. Yingu Li fall GSU by Robert Persaud LEACH protocol for wireless sensor networks 2010. [15] H. Yang, B. Sikdar, “Optimal Cluster Head Selection in the LEACH Architecture”, In the proceedings of the 26 th IEEE International Performance and Communications Conference, IPCCC2007, April 11 -13, 2007, New Orleans, Louisiana, USA. [16] W. B. Heinzelman, A. P. Chandrakasan, and H. Balakrishnan, “An application-specific protocol archi- tecture for wireless microsensor networks,” IEEE Transa- ctions on Wireless Communications, pp. 660–670, Octo- ber 2002. REFERENCES [1] Raja Jurdak, “Wireless Ad Hoc and Sensor Networks: A Cross-Layer Design Perspective” Springer Publications, 2007. [2] Sachin Gajjar, Shrikant N. Pradhan, Kankar Dasgupta, “Performance Analysis of Cross Layer Protocols for Wireless Sensor Networks”, [3] Proceedings of ICACCI '12, August 03 - 05 2012. [4] Wendi B. Heinzelman, Anantha P. Chandrakasan, Hari Balakrishnan, “An Application-Specific Protocol Architecture for Wireless [5] Microsensor Networks”, IEEE Transactions On Wireless Communications, Vol. 1, No. 4, October 2002. [6] Meena Malik, Dr. Yadhvir Singh and Anshu Arora, “Analysis of LEACH Protocol in Wireless Sensor Networks”, IJARCSSE, volume 3, Issue 2, February 2013. [7] Rajesh Patel, Sunil Pariyani, and Vijay Ukani, “Energy and Throughput Analysis of Hierarchical Routing Protocol (LEACH) for Wireless Sensor Network”, IJCA, volume 20No.4, April 2011. [17] J. C. Choi and C. W. Lee, “Energy modeling for the cluster-based sensor networks,” In Proceedings of the Sixth IEEE International Conference on Computer and Information Technology, pp. 218, September 20–22 2006. [8] Ravneet Kaur, Deepika Sharma and Navdeep Kaur, “Comparative Analysis Of LEACH and its Descendant Protocols in Wireless Sensor Network”, IJP2PNTT, volume 31, Issue 1, 2013. [18] S. Selvakennedy and S. Sinnappan, “An energyefficient clustering algorithm for multihop data gathering in wireless sensor networks,” Journal of Computers, pp. 1, April 2006. [9] Abdul Sattar Malik, Jingming Kuang, Jiakang Liu and Wang Chong, “ Performance Analysis of Cluster-based Wireless Sensor Networks with [19] Network Simulator www.isi.edu/nsnam/ns 2 (NS2) , _______________________________________________________________________________________________ ISSN (Print): 2319-2526, Volume-3, Issue-3, 2014 6