The Simulation and Analysis of LEACH Protocol.pdf

Share Embed Donate


Short Description

Download The Simulation and Analysis of LEACH Protocol.pdf...

Description

2012 International Conference on System Science and Engineering June 30-July 2, 2012, Dalian, China

The Simulation and Analysis of LEACH Protocol for Wireless Sensor Network Based on NS2 LiTian,HuaichangDu,YanweiHuang Communication University of China Beijing, China [email protected],[email protected],[email protected] Abstract—The typical routing protocol of wireless sensor network is Low Energy Adaptive Clustering Hierarchy (LEACH) protocol, which uses self organizing and dynamic cluster formation, so it has a problem that more or less cluster headers may have a bad effect on the network. This article will discuss that the quality of network can be optimized through controlling the number of cluster headers in LEACH protocol via the NS2 simulation, and then illustrate that setting optimal cluster headers can lower energy consumption and extend the lifecycle of network.

LEACH protocol is a typical layering routing protocol for wireless sensor network, which uses self organizing and dynamic cluster formation [1]. Compared with the plane routing protocol, it has advantages of low energy consumption and long survival time, but there is still a problem that more or less cluster headers may have a bad effect on the network, so it is important for the network performance to make sure the optimal cluster headers.

Keywords-LEACH protocol; NS2; optimal number of cluster headers;Wireless Sensor Network

A. The Overview of Wireless Sensor Network Wireless sensor network is a wireless network consisted of large numbers of static or mobile sensors in the way of self organizing and multi-hop, whose purpose is collaboratively collecting, processing, transmitting information in the network, and then reporting it to the user [1]. The wireless sensor network is called as WSN. As can be seen from the above, sensor node has three functions, that is, data acquisition, data processing and data transmission, corresponding to three aspects of modern technology, that is , sensor technology, computer technology and communication technology. In this network, sensor, perception object and user are the basic elements, and collaboratively collecting, processing and transmitting information are the basic functions.

I.

II.

INTRODUCTION

With the rapid development of information technology, there gradually appears tiny sensors integrated with perception, computation and communication function, and the wireless network consisted of these tiny sensors is more and more popular. Because wireless sensor network can make people get their needed information in any time and any environment, and can innovate functions that many traditional wireless networks can't achieve, it is its appearance that keeps pace of the development of times, and complies with the progress of science and technology. Wireless sensor network, as a completely new wireless network, can collaboratively perceive in real time, collect all kinds of information in the network, then fuse the information, finally transfer to the user, which integrates the sensor technology, embedded computing technology, information processing technology and communication technology [1]. It self organizes a network through the way that a plane randomly sows the sensor nodes, which has advantages of conveniently organizing network, quickly obtaining information and so on. It can be used in the battlefield, mines and other harsh environment to monitor the environment, so wireless sensor network has a wide application in the military, industry, agriculture, medical care and other fields. The routing protocol research is one of the hot spots in the wireless sensor network. Compared with traditional wireless network, the node energy is finite and cannot be charged, so how to efficiently use node energy becomes the first factor to be considered for designing routing protocol.

LEACH PROTOCOL

B. The Algorithm of Selecting Cluster Header LEACH protocol has two phases, that is, the cluster establishment phase and data communication phase, and the duration time of both the two phases is called a round. In the cluster establishment, the process for cluster header selection is that sensor node generates a random number between 0, 1, if it is less than threshold T (n), it will be selected as the cluster header, and report it to the other nodes [2]. The T (n) equation is as following (1):

p ­ °° 1 T (n) = ®1− p × (r mod ) p ° °¯0

n ∈G

(1)

others

r is the current round, p is the probability to become the cluster header, and G is the number of nodes that were not cluster headers in (r-1) round. N is the total number of nodes,

978-1-4673-0945-5/12/$31.00 ©2012 IEEE 530

k is the expected number of cluster headers, then p = k/N .This algorithm can make each sensor node become the cluster header each once, if one node is cluster header in the round, it will not be in the next round.

In this model, energy consumption of sending l bit is expressed as following equation (2).

­°Eelec ×l +l ×ε fs ×d2, d < d0 ETX (l, d) = ® 4 °¯Eelec ×l +l ×εamp ×d , d > d0 ε fs d0 = ε amp

C. The Work Process of LEACH Protocol 1) Cluster Establishment Phase After cluster headers have been selected, they use MAC protocol to broadcast ADV news to other nodes. ADV news includes node ID and packet header used as identifying news type [3]. The node decides to join which cluster according to the signal strength the node receives, and sends a request (Join-REQ) using MAC protocol to the corresponding cluster header. Join-REQ includes node ID, cluster header ID and packet header. After cluster formation is finished, cluster header sets up TDMA mechanism, and informs their member nodes of data transmission time slot. The TDMA mechanism effectively ensures the data transmission inside cluster to be fluently, and avoids the communication conflict in one cluster. 2) Data Transmission Phase In the wireless sensor network, this phase lasts a long time. Every node sends data only in its own time slot, and in other time it will shut the wireless communication module to be dormant state, but the wireless receiver of cluster header should always keep open so that it can receive the data sent by member nodes at any time [4]. Every communication within the cluster would inevitably affect the neighbors, in order to avoid this interference, cluster nodes that are not in one cluster communicate in the way of CDMA. When one node becomes cluster header, it will choose one code in order for the cluster from a code sequence, and then send it with the TDMA slot table together. When the member nodes receive the information, they send data using this code, so their communication within the cluster cannot affect other clusters [5]. Member nodes send collected data to the cluster header, and cluster header fuses the data to eliminate data correlation and compresses into an effective data that have the minimum capacity, finally sends the fusion data to the base station. The work process of LEACH protocol is shown as flow chart in figure 1.

(2) (3)

The distance threshold value is expressed as equation (3), is amplification factor of signal amplifier, and Eelec is energy consumption of transmitting and receiving circuit. In this model, it is thought that they are equal, r is decided by radio channel model, when the transmission distance is less than distance threshold, free space model is used, r = 2, if more than distance threshold, multipath attenuation model is used, r = 4. Energy consumption of receiving l bit is expressed as equation (4). (4) ERX (l, d ) = l × Eelec

ε

 Figure 1. The work process of LEACH protocol

D. Energy Model The energy model of LEACH protocol is the first order radio model [5] as shown in figure 2, this model hypothesizes wireless sensor should have the following properties: (1) Sensor node can't move after deploy. (2) Sensor node has the same type, the same and finite energy. (3) Base station is outside the wireless sensor network.

III.

THE SIMULATION AND ANALYSIS OF LEACH PROTOCOL BASED ON NS2

A. NS2 Introduction NS (Network Simulator) software is a kind of simulation software that is open source code, free, object-oriented, and driven by the event. NS2 uses split object model, which uses C + + and OTCL two languages. C + + language is used to describe the detail of network protocol, and OTCL language is used to configure the simulation parameters and establish interface to the user.

 Figure 2. Radio model

531

average energy consumption per round is larger. When forming seven cluster headers, because cluster header would receive and fuse the data sent by member nodes, and then send them to the base station, so the energy consumption of cluster header would be more than ordinary nodes. Forming more cluster headers will increase the energy consumption of network, and reduce the efficiency of data fusion.

B. Set Simulation Parameter Set monitoring area for a 100 * 100 rectangular area, the total number of nodes is 100, the first node's position is at the origin of coordinate (0, 0), whose two edges are the two coordinate axes. The monitoring area is located in the first quadrant, and base station is outside of the area for (50,175) .The simulation parameters are shown in table I. TABLE I.

SIMULATION PARAMETERS

Parameters

Values 50 nJ/bit

Eelec 5 nJ/bit/signal EDA

ε

10 pJ/(bit/m2)

fs

ε amp

0.0013 pJ/(bit/m4)

distance threshold d0

86.2 m

node initial energy simulation stop time switching time

2J 3600 s 20 s

Figure 3. Average energy consumption under different cluster header number

From the above we can see, the energy consumption is the lowest when the number of cluster headers is five, and LEACH simulation is performed in the following aspects for respective five and six cluster headers in order to prove that LEACH protocol under optimal number of cluster headers can improve network performance. 2) Energy Consumption Simulation The relationship between network energy consumption and time is shown in figure 4, energy curve represents for the energy consumption of five cluster headers, and energy6 curve represents for six cluster headers. From the figure, in the simulation time, the energy6 curve is always above the energy curve, which illustrates that LEACH protocol under five cluster headers can further reduce the energy consumption, in accordance with above simulation result.

C. LEACH Analysis Method After LEACH operation is finished there generates some result files in the list of ns-allinone-2.27\ns2.27\mit\leach_sims folder, including leach.energy, leach.alive, leach.data and etc, but these files can't be directly used, they need to be dealt with in order to extract the information for analysis. This paper uses shell command with awk process for simulation analysis. Shell is a command interpreter, which translates terminal input command into system instruction. Awk is a programming language tool used as text processing, and it is very good at dealing with text divided into several logic fields. After through the shell command and awk program to get the needed data, the NS2 drawing tool gnuplot is used to draw the graphic based on the data. Gnuplot is a commanddriven drawing software, it can convert data into easily observed graphic to help researcher analyze. D. LEACH Simulation and Analysis Through observing the change of network energy consumption under different number of cluster headers for LEACH protocol, we can find out what number of cluster headers is in the WSN when the network energy consumption is the lowest, which is the optimal number of cluster headers. Then LEACH protocol is analyzed from network energy consumption, survived node number and amount of data received by base station three aspects, which further proves that LEACH protocol can improve the performance of network under the optimal number of cluster headers. 1) Cluster Header Simulation From figure 3 can be seen, when there is only one cluster header, member nodes at the edge of the cluster are far away from cluster header, which causes member nodes consume more energy while sending data to cluster header, so the

Figure 4. Comparison on energy consumption

3) Survived Node Simulation The relationship between survived node number and time is shown in figure 5, alive curve represents for survived node number of five cluster headers, and alive6 represents for six cluster headers. From the figure, the alive curve begins to appear node death at about 400 s, and until about 550 s, there is almost no alive node in the network, while alive6 curve begins to appear node death at about 300 s, and at less than

532

the optimal number of cluster headers, LEACH protocol can attain the goal of reducing the energy consumption.

500 s nodes are almost completely dead. The simulation result shows that LEACH protocol under optimal number of cluster headers can prolong the network lifetime.

IV.

SUMMARY

This paper describes the work process and work characteristics of LEACH protocol for wireless sensor network, and discusses the influences the number of cluster headers has on the energy consumption of network. Base on that, this paper describes a conclusion that the optimal number of cluster headers can reduce the energy consumption of network, and illustrates that LEACH protocol under optimal number of cluster headers can improve the network performance, separately from the network energy consumption, survived node number, and amount of data received by base station three aspects, which is of great significance to the practical application. But in the fact, the number of cluster headers in LEACH protocol is not easy to determine, it also needs to consider other factors under different conditions, which still needs further study.

Figure 5. Comparison on alive node numbers

4) The Amount of Data Received by Base Station The relationship between the amount of data received by base station and time is shown in figure 6, data represents for the amount of data received by base station of five cluster headers, and data6 represents for six cluster headers. When there are six cluster headers, because of the failure of effective data fusion, cluster header will send more data to the base station, but at about 500 s, cluster header stop sending data for no survived node, while five cluster headers, data transmission continues at this time. In a word, LEACH protocol under optimal number of cluster headers can improve the working efficiency of network.

REFERENCES [1] [2]

[3]

[4]

[5]

[6] [7]

[8]

Figure 6. Comparison on the amount of base station receiving data

To sum up, the optimal number of cluster headers in LEACH protocol is five when the total sensor nodes are 100, and at this time the network energy consumption is the lowest, then the survived node number and amount of data received by base station are also better. Therefore, by setting

[9]

533

Cui Xun-xue. “Wireless Sensor Network Brief Tutorial”, Qing Hua University Press,Beijing,2009 He Mei-hong, Xu Cheng-qian, Zhang Dong-liang. “The simulation and analysis of LEACH protocol Based on NS2”, Electronic Measurement Technology,2009,vol.1,pp.40-42. Zhang Li. “The Improvement and Simulation of LEACH Clustering Routing Protocol for Wireless Sensor Network”, Wuhan University of Technology,June,2009. Wang Guo-fang. “The research and simulation of energysaving routing protocol for clustering wireless sensor network”, Wuhan University of Technology,June,2009. Song Li-jun. “The Improvement and Simulation of LEACH Routing Protocol for Wireless Sensor Network ”, Wuhan University of Technology,2010. Chen Lin-xing. “Wireless Sensor Network Technology and Application”, Electronic Industry Press,Beijing,2009. Wang Jiang-tao, Yang Kang, Chen Sheng-shou. “The security of LEACH routing protocol for wireless sensor network based on the optimal cluster header”, Journal of Nan Jing University of Posts and Telecommunication(Natural Science),2008,vol.3,pp.27-30. Li Li, Dong Shu-song,Wen Xiang-ming. An energy efficient clustering routing algorithm for wireless sensor networks. “The journal of China universities of posts and telecommunication”, 2006,pp.71~74 Wang Xiao-yun,Yang Li-zhen,Chen Ke-fei. “SLEACH:Secure LowEnergy-Adaptive Clustering Hierarchy Protocol for Wireless Sensor Networks”,2005,pp.127-131.

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF