Leach算法分析
基于LEACH路由的分簇算法研究
• 73•作为无线传感器网络的重要技术,WSN 路由协议是学术研究的热门话题。
LEACH 协议作为典型的的分簇算法它有很多的优点,但也有不足之处。
本文首先分析了原始的LEACH 算法。
缺点是没有考虑节点的剩余能量和位置。
在本文中,改进了缺陷,并将剩余的能量添加到考虑标准中,并且还增加了簇头之间的距离以避免形成热区域和簇头分布太密集。
通过Matlab 仿真,验证了改进的LEACH 算法可以使簇头分布更均匀,更能节省能耗,提高了网络生命周期。
1 LEACH协议LEACH (Low Energy Adaptive Clustering Hierarchy )全称是“低能耗自适应分簇型路由算法”,它是一种基于LEACH 协议的算法,因此被称作LEACH 算法,它作为层次型分簇路由算法,是无线传感器中很典型的代表(柳丽娜,无线传感器网络中LEACH 算法的研究和改进:吉林大学,2012)。
第一步,节点的初始化;第二步,选出网络中的簇头节点;第三步,正常部分成为簇头之后的初始化(基站的初始化,公共传感器节点的能量等),属于网络的建立阶段,并且选择簇头是在随机过程中生成的。
然后网络稳定来进行数据传输。
这属于一个循环,然后来回循环直到能量耗尽。
其中在选择簇头的过程中,首先会产生0到1的随机数值,如果产生的此数值比T(n)大,那么该节点就被选为簇首,T(n)就作为能否当选为簇头的标准。
T(n)的表达式为:(1)其中:P 是选举的簇头比例;r 是此时正在进行的轮数;G 是此时还没当选簇头的节点集合。
2 LEACH协议不足在分析了经典的LEACH 分簇算法过程中,虽然优点很多,但也存在一些缺点(唐甲东,蔡明,无线传感器网络路由协议研究-LEACH 路由协议的改进:计算机工程,2013):(1)簇头很容易产生在一些能量很低的节点上,从而会大大降低网络的寿命。
(2)簇头节点分布不均匀,有些过于集中,因此能量不能达到均衡状态。
LEACH路由协议技术的分析及改进
计算机与现代化 2009年第9期J I S UANJ I Y U X I A NDA I HUA总第169期文章编号:100622475(2009)0920081203收稿日期:2008209210作者简介:单晓娜(19822),女,山东日照人,南昌大学信息工程学院硕士研究生,研究方向:计算机网络;李力(19582),男,江西上高人,副教授,研究方向:计算机网络应用与安全,传感器网络。
LE ACH 路由协议技术的分析及改进单晓娜,李 力(南昌大学信息工程学院,江西南昌330031)摘要:无线传感器网络作为计算、通信和传感器三项技术相结合的产物,是一种全新的信息获取和处理技术。
本文在简要介绍无线传感器网络的基础上,分析了LE ACH 分级路由协议存在的一些问题以及如何解决这些问题。
关键词:无线传感器网络;网络层;层次路由协议;LACHS 协议中图分类号:TP393 文献标识码:A do i:10.3969/j .issn .100622475.2009.09.023Ana lysis and I m prove m en t of L EACH Routi n g Protocol TechnologySHAN Xiao 2na,L IL i(School of I nf or mati on Engineering,Nanchang University,Nanchang 330031,China )Abstract:A s a result of combinati on of m icr osens or technol ogy,l ow power computing and wireless net w orking,wireless sens or net w ork is a novel technol ogy about acquiring and p r ocessing inf or mati on .This paper briefly intr oduces the architecture of wireless sens or net w ork,analyzs s o me p r oble m s of the LE ACH r outing p r ot ocol and how t o s olve these p r oble m s .Key words:wireless sens or net w ork;net w ork layer;grading r outing p r ot ocol;LACHS p r ot ocol0 引 言无线传感器网络是由一组传感器节点以自组织的方式构成的无线网络,其目的是协作的感知、采集和处理网络覆盖区域中感知对象的信息,并将信息发送给观察者。
LEACH算法的学习摘要
LEACH算法的学习摘要一、LEACH的定义LEACH:低功耗自适应路由算法二、LEACH算法的工作流程1.总述LEACH路由协议主要分为两个阶段:即簇建立阶段(setup phase)和稳定运行阶段(ready phase)。
簇建立阶段和稳定运行阶段所持续的时间总和为一轮(round)。
为减少协议开销,稳定运行阶段的持续时间要长于簇建立阶段。
2.簇建立阶段在簇建立阶段,传感器节点随机生成一个0,1之间的随机数,并且与阈值T(n)做比较,如果小于该阈值,则该节点就会当选为簇头。
T(n)按照下列公式计算:式中:P为节点成为簇头节点的百分数,r为当前轮数,G为在最近的1/p 轮中未当选簇头的节点集合。
簇头节点选定后,广播自己成为簇头的消息,节点根据接收到的消息的强度决定加入哪个簇,并告知相应的簇头,完成簇的建立过程。
然后,簇头节点采用TDMA的方式,为簇内成员分配传送数据的时隙。
3.稳定阶段在稳定阶段,传感器节点将采集的数据传送到簇头节点。
簇头节点对采集的数据进行数据融合后再将信息传送给汇聚节点,汇聚节点将数据传送给监控中心来进行数据的处理。
稳定阶段持续一段时间后,网络重新进入簇的建立阶段,进行下一轮的簇重建,不断循环。
三、LEACH算法的优点1.LEACH算法属于分层路由协议,节点之间反应速度快,簇头进行轮转性选举,能够保证无线传感器网络中各个节点能量均衡的消耗,从而有效地延长无线传感网络的生命周期,低功耗的目的。
2.各个节点之间不再是无序的建立通信路由,数据信息的传递具有一定的规则,普通节点只能向上一级簇头传送数据信息,一级粗托只能向二级簇头传送数据信息。
很大程度上节省了能量,减少了能量的浪费。
3.相近的节点之间接收到的数据信息有可能相同或相近,这就需要簇头进行必要的数据融合。
更好的提升了能量的利用率。
4.每个簇头都要进行数据融合,因为每个簇头接收到的都是局部数据信息,所以数据信息都是比较相关,给数据的融合带来了较快的速度。
LEACH协议的算法结构及最新研究进展
LEACH协议的算法结构及最新研究进展1 LEACH协议算法结构LEACH这个协议的解释是:低功耗自适应集簇分层型协议。
通过名字,我们就能想到这个协议的大概作用了。
那么在这之中,我们先来研究一下它的算法。
该算法基本思想是:以循环的方式随机选择蔟首节点,将整个网络的能量负载平均分配到每个传感器节点中,从而达到降低网络能源消耗、提高网络整体生存时间的目的。
仿真表明,与一般的平面多跳路由协议和静态分层算法相比,LEACH协议可以将网络生命周期延长15%。
LEACH在运行过程中不断的循环执行蔟的重构过程,每个蔟重构过程可以用回合的概念来描述。
每个回合可以分成两个阶段:蔟的建立阶段和传输数据的稳定阶段。
为了节省资源开销,稳定阶段的持续时间要大于建立阶段的持续时间。
蔟的建立过程可分成4个阶段:蔟首节点的选择、蔟首节点的广播、蔟首节点的建立和调度机制的生成。
蔟首节点的选择依据网络中所需要的蔟首节点总数和迄今为止每个节点已成为蔟首节点的次数来决定。
具体的选择办法是:每个传感器节点随机选择0-1之间的一个值。
如果选定的值小于某一个阀值,那么这个节点成为蔟首节点。
选定蔟首节点后,通过广播告知整个网络。
网络中的其他节点根据接收信息的信号强度决定从属的蔟,并通知相应的蔟首节点,完成蔟的建立。
最后,蔟首节点采用TDMA方式为蔟中每个节点分配向其传递数据的时间点。
稳定阶段中,传感器节点将采集的数据传送到蔟首节点。
蔟首节点对蔟中所有节点所采集的数据进行信息融合后再传送给汇聚节点,这是一种叫少通信业务量的合理工作模型。
稳定阶段持续一段时间后,网络重新进入蔟的建立阶段,进行下一回合的蔟重构,不断循环,每个蔟采用不同的CDMA代码进行通信来减少其他蔟内节点的干扰。
LEACH协议主要分为两个阶段:即簇建立阶段(setup phase)和稳定运行阶段(ready phase)。
簇建立阶段和稳定运行阶段所持续的时间总和为一轮(round)。
LEACH算法讲解
LEACH算法讲解LEACH(low energy adaptive clustering hierarchy)算法是⼀种⾃适应分簇拓扑算法,它的执⾏过程是周期性的,其中定义了“轮”(round)的概念来实现周期性。
每轮循环分为族的建⽴阶段和稳定的数据通信阶段。
1、在簇的建⽴阶段,相邻节点动态地形成簇,随机产⽣簇头;2、在数据通信阶段,簇内节点把数据发送给簇头,簇头进⾏数据融合并把结果发送给汇聚节点。
由于族头需要完成数据融合、与汇聚节点通信等⼯作,所以能量消耗⼤。
LEACH算法能够保证各节点等概率地担任簇头,使得⽹络中的节点相对均衡地消耗能量。
1、簇头选举⽅法LEACH算法选举簇头的过程如下:节点产⽣⼀个0~1之间的随机数,如果这个数⼩于阀值T(n),则发布⾃⼰是簇头的公告消息。
在每轮循环中,如果节点已经当选过簇头,则把T(n)设置为0,这样该节点不会再次当选为簇头。
对于未当选过簇头的节点,则将以T(n)的概率当选;随着当选过簇头的节点数⽬增加,剩余节点当选簇头的阀值T(n)随之增⼤,节点产⽣⼩于T(n)的随机数的概率随之增⼤,所以节点当选簇头的概率增⼤。
当只剩下⼀个节点未当选时,T(n)=1,表⽰这个节点⼀定当选。
T(n)可表⽰为:其中,P是簇头数量占全部节点数量的百分⽐(⼀般会设为⼀个固定值,如 0.05 ),r是选举轮数,r mod (1/P)代表这⼀轮循环中当选过簇头的节点个数,G是在最后1/P轮中没有成为簇头的节点集。
2、数据通信当簇头选定之后,簇头节点主动向⽹络中节点⼴播⾃⼰成为簇头的消息。
接收到此消息的节点,依据接收信号的强度,选择它所要加⼊的簇,并发消息通知相应的簇头。
基于时分多址(Time Division Multiple Address,简称TDMA)的⽅式,簇头节点为其中的每个成员分配通信时隙,并以⼴播的形式通知所有的簇内节点。
这样保证了簇内每个节点在指定的传输时隙进⾏数据传输,⽽在其他时间进⼊休眠状态,减少了能量消耗。
leach低功耗自适应分簇算法
改进结果
随着时间的变化,节点存活的个数图。采用LEACH 算法,节点从第420 s 开始死亡,570 s 后所有节点死亡。采用改进的算法,第一个死亡节点出现 的时间推迟到了第 550s,到595 s 所有节点死亡全部死亡,改进的算法将第一 个节点死亡的时间向后推迟,因此延长了网络生存时间。这是因为簇头的 均匀分布可以避免各节点与簇头之间距离差异而引起的耗能的差距,并且 选取簇头时,依据节点的剩余能量水平,这样可以避免能量少的节点当选 为簇头。
E 34 26 22 16
显然,采用LEACH算法时,整个网络的生命周期将小于4轮。从 上面的分析不难看出,LEACH算法进行第四轮簇头选取时,没有 考虑到节点的剩余能量及其工作能耗,导致剩余能量小于工作能 耗的节点D当选为簇头,使节点D的能量过早衰竭,网络的生命周 期也随之结束。若结合考虑节点的位置信息,使靠近簇结构中心 位置且剩余能量较多的节点有更多机会成为簇头,无疑将有效延 长网络的生命周期。在改进方面我们考虑到能量的问题并作出了改进。
2 .未考虑节点分布密度时存在的问题
基站
应尽可能使密集分布区域中的节点比稀疏分布区域中的 节点具有更大当选为簇头的概率,使得密集分布区域比 稀疏分布区域产生更多簇头,并且每个簇中成员节点数 目大致相同,从而保证各簇头的工作能耗也相对均衡。
BACK
LEACH算法的改进
考虑了节点的剩余能量,为了避免节点在剩余能量 很小时也会被选为簇头节点。 1.簇头之间最优距离D 的计算 首先假设探测区域 A 是边长为L 的正方形区域,理想状态下k 个簇首节点应当完全覆盖区域A,则应该kπ(D/2)2 = C*L2。 其中C>=1 是一个常数,是为了充分保证群首节点能覆盖区域 A而设置的。由此得出平均意义下每个群首覆盖的区域半径应 该为
无线传感器网络中LEACH算法改进与分析_余海霞
器被价格低廉的金属谐振器所取代,这不仅满足了产品电性能指标,还实现了产品的低成本化要求,使所设计生产的产品在市场上更能满足客户需求,并且更具竞争力。
参考文献[1]Narrow-band multiple-coupled cavity synthesis.A.E.ATIA,MEMBER,IEEE,A. E.WILLIAMS,AND R.W.NEWCOMB,FELLOW,IEEE[2]General Coupling Matrix Synthesis Methods for Cheby-shev Filtering Functions”Richard J.Cameron,Senior Member,IEEE作者成果:孙尚传,男,一九六三年生,深圳市大富科技股份有限公司董事长兼总裁,安徽机电学院工业电气自动化专业学士,北京大学光华管理学院工商管理硕士,安徽省蚌埠市十佳科技工作者,由其本人或与他人合作共获专利授权80余项。
其中包括:序号专利名称专利号1缓冲装置ZL200910180230.X2螺钉装置及使用该螺钉装置的腔体滤波器ZL200910147645.73一种高能束焊接夹具ZL201120032743.94一种气体加速装置和高能束焊接用装置ZL201120032735.45一种高能束焊接装置ZL201120032733.56腔体滤波器、通信设备以及射频通信装置ZL201020681656.17一种射频通信设备ZL201020675524.88一种射频通信设备ZL201020675532.29腔体滤波器、信号处理模块及通信设备ZL201020695990.210一种腔体滤波器ZL201020696451.011一种射频通信设备ZL201020696454.412腔体滤波器及通信设备以及射频通信装置ZL201020679920.813室内覆盖模块ZL201020664060.014一种腔体四功分器内连接件及腔体四功分器ZL201020667057.415一种腔体三功分器内连接件及腔体三功分器ZL201020667018.416一种腔体二功分器内连接件及腔体二功分器ZL201020667048.517介质滤波器、介质谐振杆安装结构以及通信设备ZL201020646080.518一种功率分配装置及其壳体与盖板ZL201020695911.819一种功率分配装置及其耦合件ZL201020696026.120室内覆盖模块ZL201020692420.8无线传感器网络中LEACH算法改进与分析□余海霞凌永发安坤陈楠云南民族大学电气信息工程学院LEACH算法主要通过循环的方式随机选择簇头(Clusterhead),将整个网络的能量负载平均分配到每个传感器节点中,从而达到降低网络能源消耗、提高整个网络的生存时间的目的。
简述LEACH算法的基本原理。
简述LEACH算法的基本原理。
LEACH(Low Energy Adaptive Clustering Hierarchy)算法是一种无线传感器网络中常用的能量有效的数据聚集协议。
其基本原理是将传感器节点分为若干个簇,每个簇有一个簇头节点,簇头节点负责收集和汇总本簇内的数据并将其传输到基站,从而减少无线传输的能量消耗,延长网络寿命。
LEACH算法的具体实现步骤如下:
1. 初始阶段:每个节点随机选择一个数值作为阈值,若节点的能量水平高于该阈值,则该节点有可能成为簇头节点。
2. 簇头节点选择阶段:每个节点通过计算与其距离的平方和来确定与其最近的簇头节点,并将自己加入该簇头节点所在的簇中。
每个簇头节点根据自己的能量水平计算出一个概率值,该概率值与其他节点的能量水平成反比,能量水平越高的节点成为簇头节点的概率越小。
簇头节点将自己的概率值广播给其他节点,每个节点通过比较自己的概率值和簇头节点的概率值来决定是否成为簇头节点。
3. 簇内通信阶段:每个节点将数据发送给其所在的簇头节点,簇头节点负责汇总和压缩数据,并将数据传输到基站。
4. 轮换阶段:为了平衡能量消耗,每个簇头节点轮流充当簇头节点,其他节点
重新选择簇头节点。
LEACH算法的优点是能够有效地减少能量消耗,延长网络寿命,同时具有良好的可扩展性和自适应性。
但是由于其随机性较强,可能导致网络中出现簇头节点密集或稀疏的情况,从而影响网络性能。
无线传感网络中的能量优化算法
无线传感网络中的能量优化算法无线传感网络(Wireless Sensor Network, WSN)由大量分散的传感器节点组成,这些节点可以感知环境中的物理信息,并将数据通过无线信号传输到基站节点。
然而,传感器节点通常由于能源有限而导致寿命较短,因此能量优化算法在无线传感网络中起着至关重要的作用。
本文将介绍一些常见的能量优化算法,并对它们的原理和应用进行分析。
一、分簇算法1. LEACH算法LEACH(Low Energy Adaptive Clustering Hierarchy)是一种经典的分簇算法,在无线传感网络中得到广泛应用。
LEACH算法通过均匀地将传感器节点划分为多个簇来降低整体能耗。
每个簇由一个簇首节点负责进行数据聚合和传输,其他节点通过与簇首节点的短距离通信来减少能量消耗。
LEACH算法通过轮流选举簇首节点的方式,实现了能量的均衡分配,以延长整个网络的寿命。
2. HEED算法HEED(Hybrid Energy-Efficient Distributed Clustering)算法是一种改进的分簇算法,它根据节点的能量水平和节点之间的通信距离选择簇首节点。
HEED算法通过在能量消耗较低且距离较近的节点之间建立簇来实现能量的有效利用。
此外,HEED算法还引入了节点的剩余能量因素,以进一步优化簇首节点的选择过程。
二、路由算法1. SPAN算法SPAN(Sensor Protocols for Asynchronous Network)算法是一种经典的无线传感网络路由算法,它通过优化路由路径和节点的休眠机制来降低能源消耗。
SPAN算法使用浅度睡眠和深度睡眠的方式来控制节点的活跃时间,从而减少能量的消耗。
同时,SPAN算法还引入了数据预处理和数据融合的策略,以减少节点之间的通信量,从而降低了能源开销。
2. AODV算法AODV(Ad hoc On-Demand Distance Vector)算法是一种基于距离向量的路由协议,适用于无线传感网络中的动态拓扑环境。
leach协议簇头计算公式的详细计算过程
leach协议簇头计算公式的详细计算过程Leach 协议是一种用于无线传感器网络的分簇路由协议,其中簇头的选择是一个关键环节。
下面咱们就来详细聊聊 Leach 协议簇头计算公式的计算过程。
在 Leach 协议中,簇头的选择可不是随便定的。
它有一套自己的计算公式,这个公式的目的就是为了让网络中的节点能够相对公平、有效地承担起簇头的职责,从而优化整个网络的性能。
先来说说这个公式里涉及到的一些参数。
比如说,有节点成为簇头的概率 P,网络中节点的总数 N,还有已经轮数 r 等等。
具体的计算公式是这样的:T(n) = P / (1 - P * (r mod (1 / P))) ,当 n ∈ G这里面,T(n) 表示节点 n 成为簇头的阈值,G 是在这一轮还没有被选为簇头的节点集合。
那这个公式到底咋用呢?咱来举个例子哈。
比如说一个无线传感器网络里,一共有 100 个节点,设定节点成为簇头的概率 P 是 0.1,现在已经进行到第 5 轮了。
那咱们来算一算节点 20 这一轮成为簇头的可能性。
首先算 (r mod (1 / P)) ,也就是 5 mod (1 / 0.1) = 5 mod 10 = 5 。
然后算 1 - P * (r mod (1 / P)) ,也就是 1 - 0.1 * 5 = 0.5 。
最后算 T(20) ,也就是 0.1 / 0.5 = 0.2 。
如果随机生成的一个 0 到 1 之间的数小于 0.2,那节点 20 就在这一轮被选为簇头啦。
在实际的应用中,这个公式可不是光算算就行的。
比如说,网络中的节点分布不均匀,有的地方节点密集,有的地方稀疏。
在节点密集的区域,如果按照这个公式简单计算,可能会导致簇头过于集中,这样就会加重某些区域的通信负担,影响整个网络的性能。
我之前就碰到过这样一个情况。
在一个监测森林环境的无线传感器网络中,由于树木分布的影响,有些区域的节点比较集中。
按照最初的 Leach 协议簇头计算公式选择簇头,结果就发现那些节点密集的区域能耗特别快,数据传输也不太稳定。
LEACH协议簇头选择算法的改进与研究
LEACH协议簇头选择算法的改进与研究章春华;陈宏伟【摘要】LEACH is a typical level routing protocols which randomly set the clusterhead to balance energy consumption of the whole network.This paper presented a cluster head selection optimization method.Firstly,the energy consumption of the cluster head selection was calculated in the entire network,from which the optimal cluster head derived.Secondly,all nodes were grouped by distance relationship,ensuring that the number of group was equal to the expected number of the optimal cluster head,and the actual number cluster head was equal to the expected number of cluster head,which increased the network life and saved energy consumption of the network.%分簇式路由协议LEACH随机地将节点设置成首领节点均衡整个网络的能量消耗.提出一种簇头选择优化的方法,将簇首选择能耗计算到网络的整个能耗中,推导出最优簇首数,然后利用距离关系将所有节点群组化,使群组的数量与期望最优簇头个数相同,簇首的实际个数与期望的簇头个数相同,从而提高了网络生命周期,节省了网络能耗.【期刊名称】《湖北工业大学学报》【年(卷),期】2012(027)002【总页数】4页(P19-22)【关键词】无线传感器网络;分簇式层次路由协议;簇头选择【作者】章春华;陈宏伟【作者单位】湖北工业大学计算机学院,湖北武汉430068;湖北工业大学计算机学院,湖北武汉430068【正文语种】中文【中图分类】TP301无线传感器网络(WSN),在一个区域内布置无限个能量有限的传感器节点,形成一个无线网络且每个节点能够自行采集区域中的信息,发送站基站节点对信息进行处理.由于无线传感器自身的局限性[1],如:1)节点的分布广泛并且数目很多,每个节点想要维护整个网络的信息是不可能的;2)节点基本上采用电池供电,能量有限且存储空间有限;3)网络节点如果消耗能量过大,则容易造成无效节点,从而导致网络的部分瘫痪,无法有效传递信息.因此,传统的有限网络中的一些路由算法以及Ad Hoc网络中常用的DSDV、AODV等路由算法由于没有考虑到无线传感器网络节点的局限性,并不适合自身局限性过多的传感器网络.设计新的无线传感器路由协议势在必行.随着科技的不断发展,大量新的路由协议被提出,平面路由协议和层次路由协议是现有的比较流行的两类传感器路由协议.典型的平面路由协议[2]有:DD、SAR、SPIN 等,其优点在于协议简单,所有节点的地位平等,具有良好的健壮性.平面路由的最大缺点是网络中没有管理节点,难以对通信的资源进行优化管理,同时节点协同工作的算法复杂,不利于网络的动态拓扑.层次路由协议[3],将传感器网络中的节点按照某种算法分成一些小的集合,每一个集合都有一个领导节点和多个非领导节点,领导节点不断地收集非领导节点传递过来的信息并将信息传递给上一级的节点,层次路由协议也有很多不足,需要不断改进,使路由机制达到最大的利用率.本文提出对经典层次路由协议LEACH进行进一步的优化,重点在对LEACH簇头选择算法的改进,从而改进整个无线网络,提高网络的生命周期和数据传输成功率.1 Leach算法概述LEACH (Low Energy Adaptive Cl ustering Hierarchy)是典型的分层分簇路由协议.其基本思想是:以循环的方式随机选择簇首节点,将整个网络的能量负载均衡平均分配到每个传感器节点中,从而达到降低网络能源消耗、提高网络整体时间的目的.LEACH在运行的过程中不断地循环执行簇的重构过程,每个簇重构的过程可以用“轮”的概念来描述.每个轮可以分为两个阶段:簇的建立阶段和传输数据的稳定阶段.簇的建立过程又分为4个阶段:簇首节点的选择、簇首节点的广播、簇的建立和调度机制的生成[4].簇首节点具体的选择办法是:传感器网络会根据某些因素计算出一个阈值,那么当每一轮选举簇首节点的时候,每个传感器节点会随机在0~1之间选择一个值,如果传感器节点选择的值小于阈值那么这个节点会被选为簇首节点.式(1)中,p是网络中簇头数和总节点数的百分比;r是当前的选举轮数;G是最近1/p不是簇头的节点集.选定簇首节点后,将簇首节点的信息广播到整个网络.网络中的其他节点根据接收信号强度来决定加入哪个簇,并通知相应的簇首节点,完成了簇的建立.最后,簇首节点采用TDMA方式为簇中的每个节点分配向其传输数据的时间片.数据的传送是在稳定阶段开始的.传感器节点将数据传送到簇首节点后,簇首节点对簇中所有节点所采集的数据进行信息的融合,然后传送给BS(基站).2 簇头选择算法的改进2.1 算法的提出研究表明,簇头节点的个数对网络的生存周期和网络的总体能耗有很大影响.原有的LEACH协议簇头选择算法依赖于传感器节点所产生的随机数,随机数的不稳定性导致传感器节点数量和分布的区域位置都呈现极不稳定的状态.计算出来的最优簇头数目K opt是一个期望值,在现实的传感器网络环境中,簇头的个数可能会远远偏离期望值K opt,选出的簇头个数过少时,分层分簇的概念就没有了,簇首节点也会因为能耗问题提前死亡,无法平衡整个网络的能耗;反之,簇首数目过多,因为簇首节点要和基站进行数据的传输,增大了网络的节点的功耗.从上面的分析可知:如何得到最优的簇首数是协议的关键,其思想是在选择最优簇首的同时保证节点的能耗最小,并且,整个网络的能量损耗均匀地分布在所有节点上.本文将簇建立阶段产生的能耗考虑到整个网络的能耗中去,提出了一个新的最优簇头数目选择算法K opt G.2.2 算法的详细描述2.2.1 最优簇头数推导有N个节点分布在M×M的区域内,假设最优的簇头数目为K,代表传感器节点被划为K个簇,每个簇内有N/K个节点,其中,N/K-1个非簇首节点,一个簇头节点,传感器网络中的每个节点都有相同的处理能力和通信能力,且每个节点的发射功率是可控制的,节点每次传送1 bit的数据.在笔者提出的最优簇首数目算法中,整个网络的能耗分为两个部分.第一部分:选择阶段的能耗簇头节点的能耗式(2)中,第一个大括号表示簇头节点传送广播信息的能耗;第二部分是同一个簇内节点接收数据的能耗;第三部分是簇首节点告知非簇首节点TDMA和CDMA 消息的能耗.均匀分布的传感器网络,代入式(2)化简可得非簇首节点的能耗式(3)中,第一部分是接收簇首广播信息消耗的能耗;第二部分是相应的簇首节点,传输消息的能耗;第三部分是接收簇首节点确认消息的能耗. 将E代入式(3)可化简为第二部分:数据的传送阶段.在数据的传输阶段,一个簇头节点的能耗式(4)中,第一部分是从个非簇首节点接受数据的能耗;第二部分是数据融合的能耗;第三部分是簇首节点向基站传送数据的能耗,公式可以化简为非簇首节点将数据传送到簇首节点的能耗因此,在一个簇内消耗的能耗式中,第一部分是簇头选择消耗的能耗;第二部分是数据传送消耗的能耗.那么,K个簇消耗的总能耗为:将式(5)代入式(6)中,并对 K求导,即得最优簇头数目2.2.2 LEACHG算法思想通过以上的推导,得到最优的簇头数,下一步提出新的簇首选择算法LEACHG.思想是:利用距离关系将所有节点群组化,使得群组的数量和算法中期望的簇头个数相同,这样导致簇头的实际个数与期望的簇头个数相同. 无线传感器网络区域内的节点按下面的步骤被分为组,且成组的个数与最优簇头的个数相同,具体的实现方法(图1)如下:图1 成组算法流程图1)根据最优簇头个数K opt,决定成组的个数k;2)基站(BS)广播一条很短的信息包;3)网络中的节点一旦接受到基站发送来的信息,就将自己的当前信息,如位置和节点的ID号,回送给基站;4)根据节点信息回送给基站的时间片,基站选择一个信息返回时间最长的节点作为组头(Group Head),然后基站将组头的ID号,组内的成员个数发送给网络中的每个节点;5)组头节点再发送一个短信息包给WSN;6)当网络中的节点收到短信息后,反馈自己的节点信息;7)组头节点根据节点反馈信息时间片的长短,选取时间片最快的-1个节点作为自己的组内成员,同时组节点再发送一个信息包括组ID以及组内节点的ID号给WSN,一旦一个节点加入到组内,这个节点就不能再加入别的组内;8)组头(GH)节点根据节点反馈的信息,选择一个反馈时间片最长的节点作为下一个组头节点,同样发送组头ID和组ID号给WSN.重复5-8阶段,直到组的个数与K opt相等.当达到与K opt相等的组的个数后,各个组内的成员就根据相应的簇头选择算法选出簇头,然后进入数据的传输稳定阶段.3 仿真结果与分析本文的仿真基于NS2仿真平台.首先,设置相关的实验环境进行仿真,得到有用的leach.energy和leach.alive文件,leach.alive和leach.ener gy文件详细记录了仿真的过程以及每一节点的死亡、存活,节点能耗;然后,用提供的awk语言编写提取leach.alive和leach.energy文件信息数据的脚本文件;最后,利用NS自带的画图软件gnuplot生成图表,对生成的图表进行分析,比较改进后的LEACH 协议.仿真的过程中,为了更准确地比较提出算法的优劣,采用完全相同的参数和节点分布文件同时模拟LEACH、LEACHG协议,本仿真采用的网络模型是一个在100m×100 m的区域内随机地分布100个WSN节点,其部分实验参数设置:节点数,100;节点初始能量,2 J;仿真区域,100 m×100 m;信道带宽,1 Mb/s;发送/接收1bit能耗,50 nJ/bit;传输放大器能耗,10 pj/bit/m2;数据融合能耗,50 nJbit/signal;数据包大小,100 bytes.图2 网络生存周期图2显示了两种协议的网络生存周期.从图中的数据可以看出,第一个节点死亡时间LEACHG要晚于LEACH协议,当全部节点死亡时,LEACHG比LEACH多运行了几轮.新的LEACHG协议将簇首阶段的能耗考虑进去,并通过成组算法得出了最优的簇首数,导致传感器节点的能耗能更加均匀地分布到所有的节点中去,避免了单个节点因为能量的消耗过大而过早地死亡,从而影响了网络的生存周期.本实验只设置了100个节点,当传感器节点更多,WSN的规模更大时,LEACHG的效果会更佳.4 结论本文将簇首选举阶段的能耗计算到整个网络的能耗中去,得出了最优簇首个数的计算公式,而后提出了成组的簇首选择算法LEACHG,并在NS2仿真工具上进行了仿真.分析的结果表明,相比于原来的LEACH协议,LEACHG能够有效地平衡网络中的能耗,提高整个网络的生存周期.[参考文献][1]Al Karaki J N,Kamal A E.Routing techniques in wireless sensor networks[J].IEEE Wireless Communications,2004,11(6):6-28. [2]Mhatre V,Rosenber g C.Design guidelines for wireless sensor networks:communication,clustering and aggregation[J].Ad Hoe:Networ ks,2004,2(1):45-63.[3]Heinzel man W R,Chandrakasan A,Balakrishnan H.An applicationspecific protocol for wireless microsensor networks[J].IEEE Transactions on Wireless Communication,2002,1(4):660-670. [4]Wendi B,Heinzel man W R,Balakrishnan H.An application specificpr otocol architecture for wireless micr osensor networ ks[J].IEEE Transactions on Wireless Communications,2002,1(4):660-670. [5]Jan F,Akyildiz,Weilian S,etal.Asuivey on r outing protocols for wireless sensor networks[J].IEEE Communicaitons Magazine,2004,40(8):102-114.[6]Li Qing,Zhu Qingxin,Wang Mingwen.Design of distribute denergy efficient clustering algorithm for wirelesssensor networ ks[J].Co mputer communication,2006(29):2 230-2 237.。
低功耗分簇路由算法LEACH能耗论文
低功耗分簇路由算法LEACH的能耗分析摘要:文章对无线传感器网络低功耗分簇路由协议的代表性算法—leach的运行机制以及性能做了详细的研究,针对该算法的分簇阶段、簇的建立阶段以及稳定的数据传输阶段的相关原理和运行情况作了深入分析。
最后从正反两方面总结了leach协议的运行特性。
abstract: this article detailedly studies oprerating mechanism and performance of leach, a representative algorithm of wireless sensor networks low power clustering routing protocol, and analyzes relative principles and operating condition of its clustering stage, establishing stage and data transfering stage. finally, the article summarizes operating characteristics of leach from the pros and cons.关键词:无线传感器网络;分簇路由算法;leach算法key words: wireless sensor network;clustering routing algorithm;leach algorithm中图分类号:tp393 文献标识码:a 文章编号:1006-4311(2012)33-0186-020 引言无线传感器网络(wsn)是一种新型的网络,它由大量的传感器节点组成,融合了传感器技术、嵌入式计算技术、通信技术以及分布式信息处理技术等,通过大量部署在无人到达的监测区域内的传感器节点以相互协作地方式对各种监测对象的信息实时的监控、感知并采集,对数据信息融合之后以无线自组织的网络方式发送到汇聚节点。
基于LEACH的分簇优化及多跳传输算法
物联网技术 2023年 / 第7期460 引 言无线传感器网络(WSN )拥有感知、通信和数据处理的能力,重量轻,体积小,方便部署,是一种获取信息的全新平台。
它能够不间断地对分布在其网络区域内的对象进行监测并进行数据采集上传。
WSN 是一种动态网络,具有移动性和自组织性。
网络节点一般由电池供电,但是容量有限且电池更换和充电不够便捷。
本文着重考虑了网络运行过程中节点的剩余能量和到达基站的距离这两个因素,以便对能耗进行合理控制,进而提高传感器网络整体的运行时间。
WSN 路由协议分为平面路由协议和分簇路由协议。
平面路由协议在小范围检测的应用场合中有很大优势,部分节点的死亡不会影响整体网络的拓扑结构。
但是随着监测规模的扩大,传输时延、传输能耗也在不断增加,并且准确性也会下降。
因此就有了分簇路由协议,它是对平面路由协议在大规模网络监测中的改进。
LEACH 协议就是分簇路由协议中的典型代表[1],同时LEACH 协议也存在着诸多问题。
例如:簇头选举不合理,网络中节点能耗不均[2]。
文献[3]对经典LEACH 算法进行了改进,考虑了节点的剩余能量使得簇头选举更加合理。
文献[4]提出了一种新的LEACH 改进协议IMP-LEACH ,并改进了蚁群算法,找到最优路径实现数据转发。
文献[5]设计出一种多跳路由方法,簇首之间通过中继将数据转发到基站;引入了节点入簇参量,把簇成员个数作为入簇条件之一,大大降低了网络能耗;文献[6]提出了一种区域分簇的思想,利用基站进行逻辑分簇,将满足条件的相邻簇进行合并;文献[7]采用模糊C 均值聚类算法对网络节点进行聚类分簇,簇内考虑节点的剩余能量和位置信息进行簇首的选举;文献[8]采用粒子群算法将网络区域分成多个子区域,在子区域内考虑剩余能量的因素进行选举;文献[9]提出一种改进的LEACH_IMP 协议,考虑了节点的剩余能量、簇首间中继节点的选择,并改进了阈值公式,既保证了所选簇头的健壮性,又降低了远距离信息传输带来的损耗。
基于LEACH的无线传感器网络路由算法的分析与改进
基于LEACH的无线传感器网络路由算法的分析与改进基于LEACH的无线传感器网络路由算法的分析与改进一、引言随着无线传感器网络(Wireless Sensor Network, WSN)的发展,人们对于无线传感器网络路由算法的研究也日益增多。
在无线传感器网络中,路由算法对于网络的性能和能耗具有重要影响。
LEACH(Low Energy Adaptive Clustering Hierarchy)作为一种经典的无线传感器网络路由协议,具有较低的能耗和较好的性能。
本文将对LEACH算法进行分析,并提出一种改进方案。
二、LEACH算法的原理与优缺点分析1. LEACH算法原理LEACH算法是一种分簇式的路由算法,其基本思想是将网络中的节点划分为多个簇。
每个簇内有一个簇头节点负责管理簇内的通信,并将数据传输到基站。
LEACH算法主要包括两个阶段:簇头选择阶段和数据传输阶段。
在簇头选择阶段,每个节点根据阈值(摄取阈值)决定是否成为簇头节点。
节点通过计算能量消耗的阈值,来控制簇头节点的选择,以降低能耗。
簇头节点选定后,其他节点将成为其成员节点。
在数据传输阶段,节点将数据传输到簇头节点,簇头节点再将数据传输到基站。
为了减少能量消耗,簇头节点通常采取限制传输功率和路由选择的策略。
2. LEACH算法的优点与缺点LEACH算法具有以下优点:- 能量均衡性:通过轮流选取簇头节点和采用时分多路复用的方式,使得网络中的节点能量使用均匀,延长网络寿命;- 低延迟:数据通过簇头节点进行传输,减少了节点间的通信距离,缩短了数据传输的时间;- 无需全局信息:LEACH算法只需要节点之间的局部信息即可进行簇头节点的选择,无需全局信息的维护和通信。
然而,LEACH算法也存在以下缺点:- 随机性:簇头节点的选择过程采用随机算法,容易导致不同轮次簇头节点的能量不平衡;- 无线信号干扰:由于节点之间通信的无线信号干扰,导致网络性能下降。
LEACH算法原理详解
Copyright2000IEEE.Published in the Proceedings of the Hawaii International Conference on System Sciences,January4-7,2000,Maui,Hawaii. Energy-Efficient Communication Protocol for Wireless Microsensor Networks Wendi Rabiner Heinzelman,Anantha Chandrakasan,and Hari BalakrishnanMassachusetts Institute of TechnologyCambridge,MA02139wendi,anantha,hari@AbstractWireless distributed microsensor systems will enable the reliable monitoring of a variety of environments for both civil and military applications.In this paper,we look at communication protocols,which can have significant im-pact on the overall energy dissipation of these networks. Based on ourfindings that the conventional protocols of direct transmission,minimum-transmission-energy,multi-hop routing,and static clustering may not be optimal for sensor networks,we propose LEACH(Low-Energy Adap-tive Clustering Hierarchy),a clustering-based protocol that utilizes randomized rotation of local cluster base stations (cluster-heads)to evenly distribute the energy load among the sensors in the network.LEACH uses localized coordi-nation to enable scalability and robustness for dynamic net-works,and incorporates data fusion into the routing proto-col to reduce the amount of information that must be trans-mitted to the base station.Simulations show that LEACH can achieve as much as a factor of8reduction in energy dissipation compared with conventional routing protocols. In addition,LEACH is able to distribute energy dissipation evenly throughout the sensors,doubling the useful system lifetime for the networks we simulated.1.IntroductionRecent advances in MEMS-based sensor technology, low-power analog and digital electronics,and low-power RF design have enabled the development of relatively in-expensive and low-power wireless microsensors[2,3,4]. These sensors are not as reliable or as accurate as their ex-pensive macrosensor counterparts,but their size and cost enable applications to network hundreds or thousands of these microsensors in order to achieve high quality,fault-tolerant sensing networks.Reliable environment monitor-ing is important in a variety of commercial and military applications.For example,for a security system,acoustic,seismic,and video sensors can be used to form an ad hoc network to detect intrusions.Microsensors can also be used to monitor machines for fault detection and diagnosis.Microsensor networks can contain hundreds or thou-sands of sensing nodes.It is desirable to make these nodes as cheap and energy-efficient as possible and rely on their large numbers to obtain high quality work pro-tocols must be designed to achieve fault tolerance in the presence of individual node failure while minimizing en-ergy consumption.In addition,since the limited wireless channel bandwidth must be shared among all the sensors in the network,routing protocols for these networks should be able to perform local collaboration to reduce bandwidth requirements.Eventually,the data being sensed by the nodes in the net-work must be transmitted to a control center or base station, where the end-user can access the data.There are many pos-sible models for these microsensor networks.In this work, we consider microsensor networks where:The base station isfixed and located far from the sen-sors.All nodes in the network are homogeneous and energy-constrained.Thus,communication between the sensor nodes and the base station is expensive,and there are no“high-energy”nodes through which communication can proceed.This is the framework for MIT’s-AMPS project,which focuses on innovative energy-optimized solutions at all levels of the system hierarchy,from the physical layer and communica-tion protocols up to the application layer and efficient DSP design for microsensor nodes.Sensor networks contain too much data for an end-user to process.Therefore,automated methods of combining or aggregating the data into a small set of meaningful informa-tion is required[7,8].In addition to helping avoid informa-tion overload,data aggregation,also known as data fusion, can combine several unreliable data measurements to pro-duce a more accurate signal by enhancing the common sig-nal and reducing the uncorrelated noise.The classification performed on the aggregated data might be performed by a human operator or automatically.Both the method of per-forming data aggregation and the classification algorithm are application-specific.For example,acoustic signals are often combined using a beamforming algorithm[5,17]to reduce several signals into a single signal that contains the relevant information of all the individual rge en-ergy gains can be achieved by performing the data fusion or classification algorithm locally,thereby requiring much less data to be transmitted to the base station.By analyzing the advantages and disadvantages of con-ventional routing protocols using our model of sensor net-works,we have developed LEACH(Low-Energy Adaptive Clustering Hierarchy),a clustering-based protocol that min-imizes energy dissipation in sensor networks.The key fea-tures of LEACH are:Localized coordination and control for cluster set-up and operation.Randomized rotation of the cluster“base stations”or “cluster-heads”and the corresponding clusters.Local compression to reduce global communication. The use of clusters for transmitting data to the base sta-tion leverages the advantages of small transmit distances for most nodes,requiring only a few nodes to transmit far distances to the base station.However,LEACH out-performs classical clustering algorithms by using adaptive clusters and rotating cluster-heads,allowing the energy re-quirements of the system to be distributed among all the sensors.In addition,LEACH is able to perform local com-putation in each cluster to reduce the amount of data that must be transmitted to the base station.This achieves a large reduction in the energy dissipation,as computation is much cheaper than communication.2.First Order Radio ModelCurrently,there is a great deal of research in the area of low-energy radios.Different assumptions about the radio characteristics,including energy dissipation in the transmit and receive modes,will change the advantages of different protocols.In our work,we assume a simple model where the radio dissipates nJ/bit to run the transmit-ter or receiver circuitry and pJ/bit/m for the transmit amplifier to achieve an acceptableFor example,the Bluetooth initiative[1]specifies700Kbps radios that operate at2.7V and30mA,or115nJ/bit.Operationenergy loss due to channel transmission.Thus,to trans-mit a-bit message a distance using our radio model,the radio expends:(1) and to receive this message,the radio expends:(2) For these parameter values,receiving a message is not a low cost operation;the protocols should thus try to minimize not only the transmit distances but also the number of transmit and receive operations for each message.We make the assumption that the radio channel is sym-metric such that the energy required to transmit a message from node A to node B is the same as the energy required to transmit a message from node B to node A for a given SNR.For our experiments,we also assume that all sensors are sensing the environment at afixed rate and thus always have data to send to the end-user.For future versions of our protocol,we will implement an”event-driven”simulation, where sensors only transmit data if some event occurs in the environment.3.Energy Analysis of Routing ProtocolsThere have been several network routing protocols pro-posed for wireless networks that can be examined in the context of wireless sensor networks.We examine two such protocols,namely direct communication with the base sta-tion and minimum-energy multi-hop routing using our sen-sor network and radio models.In addition,we discuss a conventional clustering approach to routing and the draw-backs of using such an approach when the nodes are all energy-constrained.Using a direct communication protocol,each sensor sends its data directly to the base station.If the base sta-tion is far away from the nodes,direct communication will require a large amount of transmit power from each node (since in Equation1is large).This will quickly drain the battery of the nodes and reduce the system lifetime.How-ever,the only receptions in this protocol occur at the base station,so if either the base station is close to the nodes,or the energy required to receive data is large,this may be an acceptable(and possibly optimal)method of communica-tion.The second conventional approach we consider is a “minimum-energy”routing protocol.There are several power-aware routing protocols discussed in the literature[6, 9,10,14,15].In these protocols,nodes route data des-tined ultimately for the base station through intermediate nodes.Thus nodes act as routers for other nodes’data in addition to sensing the environment.These protocols dif-fer in the way the routes are chosen.Some of these proto-cols[6,10,14],only consider the energy of the transmitter and neglect the energy dissipation of the receivers in de-termining the routes.In this case,the intermediate nodes are chosen such that the transmit amplifier energy(e.g.,)is minimized;thus nodeA would transmit to node C through nodeB if and only if:(3) or(4) However,for this minimum-transmission-energy(MTE) routing protocol,rather than just one(high-energy)trans-mit of the data,each data message must go through(low-energy)transmits and receives.Depending on the rela-tive costs of the transmit amplifier and the radio electronics, the total energy expended in the system might actually be greater using MTE routing than direct transmission to the base station.To illustrate this point,consider the linear network shown in Figure2,where the distance between the nodes is.If we consider the energy expended transmitting a sin-gle-bit message from a node located a distance froma(6) Therefore,direct communication requires less energy than MTE routing if:(7)Using Equations1-6and the random100-node network shown in Figure3,we simulated transmission of data from every node to the base station(located100m from the clos-est sensor node,at(x=0,y=-100))using MATLAB.Figure4 shows the total energy expended in the system as the net-work diameter increases from10m10m to100m100 m and the energy expended in the radio electronics(i.e., )increases from10nJ/bit to100nJ/bit,for the sce-nario where each node has a2000-bit data packet to send to the base station.This shows that,as predicted by our anal-ysis above,when transmission energy is on the same order as receive energy,which occurs when transmission distance is short and/or the radio electronics energy is high,direct transmission is more energy-efficient on a global scale than MTE routing.Thus the most energy-efficient protocol to use depends on the network topology and radio parameters of the system.−25−20−15−10−5051015202505101520253035404550Figure 3.100-node random network.Figure 4.Total energy dissipated in the 100-node random network using direct commu-nication and MTE routing (i.e.,and ).pJ/bit/m ,and the mes-sages are 2000bits.Figure 5.System lifetime using direct trans-mission and MTE routing with 0.5J/node.It is clear that in MTE routing,the nodes closest to the base station will be used to route a large number of data messages to the base station.Thus these nodes will die out quickly,causing the energy required to get the remaining data to the base station to increase and more nodes to die.This will create a cascading effect that will shorten system lifetime.In addition,as nodes close to the base station die,that area of the environment is no longer being monitored.To prove this point,we ran simulations using the random 100-node network shown in Figure 3and had each sensor send a 2000-bit data packet to the base station during each time step or “round”of the simulation.After the energy dissipated in a given node reached a set threshold,that node was considered dead for the remainder of the simulation.Figure 5shows the number of sensors that remain alive after each round for direct transmission and MTE routing with each node initially given 0.5J of energy.This plot shows that nodes die out quicker using MTE routing than direct transmission.Figure 6shows that nodes closest to the base station are the ones to die out first for MTE routing,whereas nodes furthest from the base station are the ones to die out first for direct transmission.This is as expected,since the nodes close to the base station are the ones most used as “routers”for other sensors’data in MTE routing,and the nodes furthest from the base station have the largest transmit energy in direct communication.A final conventional protocol for wireless networks is clustering,where nodes are organized into clusters that communicate with a local base station,and these local base stations transmit the data to the global base station,where it is accessed by the end-user.This greatly reduces the dis-tance nodes need to transmit their data,as typically the local base station is close to all the nodes in the cluster.−25−20−15−10−5051015202505101520253035404550X−coordinateY −c o o r d i n a t eFigure 6.Sensors that remain alive (circles)and those that are dead (dots)after 180rounds with 0.5J/node for (a)direct trans-mission and (b)MTE routing.Thus,clustering appears to be an energy-efficient commu-nication protocol.However,the local base station is as-sumed to be a high-energy node;if the base station is an energy-constrained node,it would die quickly,as it is be-ing heavily utilized.Thus,conventional clustering would perform poorly for our model of microsensor networks.The Near Term Digital Radio (NTDR)project [12,16],an army-sponsored program,employs an adaptive clustering approach,similar to our work discussed here.In this work,cluster-heads change as nodes move in order to keep the network fully connected.However,the NTDR protocol is designed for long-range communication,on the order of 10s of kilometers,and consumes large amounts of power,on the order of 10s of Watts.Therefore,this protocol also does not fit our model of sensor networks.4.LEACH:Low-Energy Adaptive Clustering HierarchyLEACH is a self-organizing,adaptive clustering protocol that uses randomization to distribute the energy load evenly among the sensors in the network.In LEACH,the nodes organize themselves into local clusters,with one node act-ing as the local base station or cluster-head .If the cluster-heads were chosen a priori and fixed throughout the system lifetime,as in conventional clustering algorithms,it is easy to see that the unlucky sensors chosen to be cluster-heads would die quickly,ending the useful lifetime of all nodes belonging to those clusters.Thus LEACH includes random-ized rotation of the high-energy cluster-head position such that it rotates among the various sensors in order to not drain the battery of a single sensor.In addition,LEACH performs local data fusion to “compress”the amount of data being sent from the clusters to the base station,further reducing energy dissipation and enhancing system lifetime.Sensors elect themselves to be local cluster-heads at any given time with a certain probability.These cluster-head nodes broadcast their status to the other sensors in the network.Each sensor node determines to which clus-ter it wants to belong by choosing the cluster-head that re-quires the minimum communication energy .Once all the nodes are organized into clusters,each cluster-head creates a schedule for the nodes in its cluster.This allows the radio components of each non-cluster-head node to be turned off at all times except during its transmit time,thus minimizing the energy dissipated in the individual sensors.Once the cluster-head has all the data from the nodes in its cluster,the cluster-head node aggregates the data and then transmits the compressed data to the base station.Since the base station is far away in the scenario we are examining,this is a high energy transmission.However,since there are only a few cluster-heads,this only affects a small number of nodes.As discussed previously,being a cluster-head drains the battery of that node.In order to spread this energy usage over multiple nodes,the cluster-head nodes are not fixed;rather,this position is self-elected at different time intervals.Thus a set of nodes might elect themselves cluster-heads at time ,but at time a new set of nodes elect themselves as cluster-heads,as shown in Figure 7.The de-cision to become a cluster-head depends on the amount of energy left at the node.In this way,nodes with more en-ergy remaining will perform the energy-intensive functions of the network.Each node makes its decision about whether to be a cluster-head independently of the other nodes in the05101520253035404550Figure 7.Dynamic clusters:(a)cluster-head nodes =at time (b)cluster-head nodes=at time .All nodes marked with a given symbol belong to the same cluster,and the cluster-head nodes are marked with a .network and thus no extra negotiation is required to deter-mine the cluster-heads.The system can determine,a priori,the optimal number of clusters to have in the system.This will depend on sev-eral parameters,such as the network topology and the rela-tive costs of computation versus communication.We sim-ulated the LEACH protocol for the random network shown in Figure 3using the radio parameters in Table 1and a com-putation cost of 5nJ/bit/message to fuse 2000-bit messages while varying the percentage of total nodes that are cluster-heads.Figure 8shows how the energy dissipation in the system varies as the percent of nodes that are cluster-heads is changed.Note that 0cluster-heads and 100%cluster-heads is the same as direct communication.From this plot,we find that there exists an optimal percent of nodes that should be cluster-heads.If there are fewer than cluster-heads,some nodes in the network have to transmit their data very far to reach the cluster-head,causing the global energyFigure 8.Normalized total system energy dis-sipated versus the percent of nodes that are cluster-heads.Note that direct transmission is equivalent to 0nodes being cluster-heads or all the nodes being cluster-heads.in the system to be large.If there are more than cluster-heads,the distance nodes have to transmit to reach the near-est cluster-head does not reduce substantially,yet there are more cluster-heads that have to transmit data the long-haul distances to the base station,and there is less compression being performed locally.For our system parameters and topology,%.Figure 8also shows that LEACH can achieve over a fac-tor of 7reduction in energy dissipation compared to direct communication with the base station,when using the opti-mal number of cluster-heads.The main energy savings of the LEACH protocol is due to combining lossy compression with the data routing.There is clearly a trade-off between the quality of the output and the amount of compression achieved.In this case,some data from the individual sig-nals is lost,but this results in a substantial reduction of the overall energy dissipation of the system.We simulated LEACH (with 5%of the nodes being cluster-heads)using MATLAB with the random network shown in Figure 3.Figure 9shows how these algorithmscompare usingnJ/bit as the diameter of the net-work is increased.This plot shows that LEACH achieves between 7x and 8x reduction in energy compared with di-rect communication and between 4x and 8x reduction in energy compared with MTE routing.Figure 10shows the amount of energy dissipated using LEACH versus using di-rect communication and LEACH versus MTE routing as the network diameter is increased and the electronics energy varies.This figure shows the large energy savings achieved using LEACH for most of the parameter space.Network diameter (m)T o t a l e n e r g y d i s s i p a t e d i n s y s t e m (J o u l e s )Figure 9.Total system energy dissipated us-ing direct communication,MTE routing and LEACH for the 100-node random network shown in Figure 3.nJ/bit,pJ/bit/m ,and the messages are 2000bits.In addition to reducing energy dissipation,LEACH suc-cessfully distributes energy-usage among the nodes in thenetwork such that the nodes die randomly and at essentially the same rate.Figure 11shows a comparison of system lifetime using LEACH versus direct communication,MTE routing,and a conventional static clustering protocol,where the cluster-heads and associated clusters are chosen initially and remain fixed and data fusion is performed at the cluster-heads,for the network shown in Figure 3.For this exper-iment,each node was initially given 0.5J of energy.Fig-ure 11shows that LEACH more than doubles the useful sys-tem lifetime compared with the alternative approaches.We ran similar experiments with different energy thresholds and found that no matter how much energy each node is given,it takes approximately 8times longer for the first node to die and approximately 3times longer for the last node to die in LEACH as it does in any of the other protocols.The data from these experiments is shown in Table 2.The ad-vantage of using dynamic clustering (LEACH)versus static clustering can be clearly seen in Figure ing a static clustering algorithm,as soon as the cluster-head node dies,all nodes from that cluster effectively die since there is no way to get their data to the base station.While these simu-lations do not account for the setup time to configure the dynamic clusters (nor do they account for any necessary routing start-up costs or updates as nodes die),they give a good first order approximation of the lifetime extension we can achieve using LEACH.Another important advantage of LEACH,illustrated in Figure 12,is the fact that nodes die in essentially a “ran-Figure 10.Total system energy dissipated using (a)direct communication and LEACH and (b)MTE routing and LEACH for the ran-dom network shown in Figure 3.pJ/bit/m ,and the messages are 2000bits.Figure 11.System lifetime using direct trans-mission,MTE routing,static clustering,and LEACH with 0.5J/node.Table2.Lifetimes using different amounts ofinitial energy for the sensors.Energy Protocol Round last(J/node)node diesDirect1175Static Clustering673941090.5MTE42980LEACH1312Direct46815Static Clustering2401848-ing this threshold,each node will be a cluster-head at somepoint withinrounds.Thus the probability that the remainingnodes are cluster-heads must be increased,since there arefewer nodes that are eligible to become cluster-heads.Af-terrounds,all nodes are onceagain eligible to become cluster-heads.Future versions ofthis work will include an energy-based threshold to accountfor non-uniform energy nodes.In this case,we are assum-ing that all nodes begin with the same amount of energyand being a cluster-head removes approximately the sameamount of energy for each node.Each node that has elected itself a cluster-head for thecurrent round broadcasts an advertisement message to therest of the nodes.For this“cluster-head-advertisement”phase,the cluster-heads use a CSMA MAC protocol,and allcluster-heads transmit their advertisement using the sametransmit energy.The non-cluster-head nodes must keeptheir receivers on during this phase of set-up to hear the ad-vertisements of all the cluster-head nodes.After this phaseis complete,each non-cluster-head node decides the clusterto which it will belong for this round.This decision is basedon the received signal strength of the advertisement.As-suming symmetric propagation channels,the cluster-headadvertisement heard with the largest signal strength is thecluster-head to whom the minimum amount of transmittedenergy is needed for communication.In the case of ties,a random cluster-head is chosen.5.2Cluster Set-Up PhaseAfter each node has decided to which cluster it belongs, it must inform the cluster-head node that it will be a member of the cluster.Each node transmits this information back to the cluster-head again using a CSMA MAC protocol.Dur-ing this phase,all cluster-head nodes must keep their re-ceivers on.5.3Schedule CreationThe cluster-head node receives all the messages for nodes that would like to be included in the cluster.Based on the number of nodes in the cluster,the cluster-head node creates a TDMA schedule telling each node when it can transmit.This schedule is broadcast back to the nodes in the cluster.5.4Data TransmissionOnce the clusters are created and the TDMA schedule isfixed,data transmission can begin.Assuming nodes al-ways have data to send,they send it during their allocated transmission time to the cluster head.This transmission uses a minimal amount of energy(chosen based on the received strength of the cluster-head advertisement).The radio of each non-cluster-head node can be turned off un-til the node’s allocated transmission time,thus minimizing energy dissipation in these nodes.The cluster-head node must keep its receiver on to receive all the data from the nodes in the cluster.When all the data has been received, the cluster head node performs signal processing functions to compress the data into a single signal.For example,if the data are audio or seismic signals,the cluster-head node can beamform the individual signals to generate a compos-ite signal.This composite signal is sent to the base station. Since the base station is far away,this is a high-energy trans-mission.This is the steady-state operation of LEACH networks. After a certain time,which is determined a priori,the next round begins with each node determining if it should be a cluster-head for this round and advertising this information, as described in Section5.1.5.5.Multiple ClustersThe preceding discussion describes how the individual clusters communicate among nodes in that cluster.How-ever,radio is inherently a broadcast medium.As such, transmission in one cluster will affect(and hence degrade)toure13A’s transmission,while intended for Node B,corrupts any transmission to Node C.To reduce this type of interference, each cluster communicates using different CDMA codes. Thus,when a node decides to become a cluster-head,it chooses randomly from a list of spreading codes.It informs all the nodes in the cluster to transmit using this spreading code.The cluster-head thenfilters all received energy using the given spreading code.Thus neighboring clusters’radio signals will befiltered out and not corrupt the transmission of nodes in the cluster.Efficient channel assignment is a difficult problem,even when there is a central control center that can perform the necessary ing CDMA codes,while not nec-essarily the most bandwidth efficient solution,does solves the problem of multiple-access in a distributed manner.5.6.Hierarchical ClusteringThe version of LEACH described in this paper can be extended to form hierarchical clusters.In this scenario,the cluster-head nodes would communicate with“super-cluster-head”nodes and so on until the top layer of the hierarchy, at which point the data would be sent to the base station. For larger networks,this hierarchy could save a tremendous amount of energy.In future studies,we will explore the de-tails of implementing this protocol without using any sup-port from the base station,and determine,via simulation, exactly how much energy can be saved.6.ConclusionsIn this paper,we described LEACH,a clustering-based routing protocol that minimizes global energy usage by dis-tributing the load to all the nodes at different points in time. LEACH outperforms static clustering algorithms by requir-ing nodes to volunteer to be high-energy cluster-heads and adapting the corresponding clusters based on the nodes that choose to be cluster-heads at a given time.At different times,each node has the burden of acquiring data from the nodes in the cluster,fusing the data to obtain an aggregate signal,and transmitting this aggregate signal to the base sta-tion.LEACH is completely distributed,requiring no control information from the base station,and the nodes do not re-quire knowledge of the global network in order for LEACH to operate.Distributing the energy among the nodes in the network is effective in reducing energy dissipation from a global per-spective and enhancing system lifetime.Specifically,our simulations show that:LEACH reduces communication energy by as much as 8x compared with direct transmission and minimum-transmission-energy routing.Thefirst node death in LEACH occurs over8times later than thefirst node death in direct transmission, minimum-transmission-energy routing,and a static clustering protocol,and the last node death in LEACH occurs over3times later than the last node death in the other protocols.In order to verify our assumptions about LEACH,we are currently extending the network simulator ns[11]to simulate LEACH,direct communication,and minimum-transmission-energy routing.This will verify our assump-tions and give us a more accurate picture of the advantages and disadvantages of the different protocols.Based on our MATLAB simulations described above,we are confident that LEACH will outperform conventional communication protocols,in terms of energy dissipation,ease of configura-tion,and system lifetime/quality of the network.Providing such a low-energy,ad hoc,distributed protocol will help pave the way for future microsensor networks.AcknowledgmentsThe authors would like to thank the anonymous review-ers for the helpful comments and suggestions.W.Heinzel-man is supported by a Kodak Fellowship.This work was funded in part by DARPA.References[1]Bluetooth Project.,1999.[2]Chandrakasan,Amirtharajah,Cho,Goodman,Konduri,Ku-lik,Rabiner,and Wang.Design Considerations for Dis-tributed Microsensor Systems.In IEEE1999Custom In-tegrated Circuits Conference(CICC),pages279–286,May 1999.[3]Clare,Pottie,and Agre.Self-Organizing Distributed Sen-sor Networks.In SPIE Conference on Unattended Ground Sensor Technologies and Applications,pages229–237,Apr.1999.[4]M.Dong,K.Yung,and W.Kaiser.Low Power SignalProcessing Architectures for Network Microsensors.In Proceedings1997International Symposium on Low Power Electronics and Design,pages173–177,Aug.1997.[5] D.Dudgeon and R.Mersereau.Multidimensional DigitalSignal Processing,chapter6.Prentice-Hall,Inc.,1984. [6]M.Ettus.System Capacity,Latency,and Power Consump-tion in Multihop-routed SS-CDMA Wireless Networks.In Radio and Wireless Conference(RAWCON’98),pages55–58,Aug.1998.[7] D.Hall.Mathematical Techniques in Multisensor Data Fu-sion.Artech House,Boston,MA,1992.[8]L.Klein.Sensor and Data Fusion Concepts and Applica-tions.SPIE Optical Engr Press,WA,1993.[9]X.Lin and I.Stojmenovic.Power-Aware Routing in Ad HocWireless Networks.In SITE,University of Ottawa,TR-98-11,Dec.1998.[10]T.Meng and R.V olkan.Distributed Network Protocolsfor Wireless Communication.In Proc.IEEEE ISCAS,May 1998.[11]UCB/LBNL/VINT Network Simulator-ns(Version2)./ns/,1998.[12]R.Ruppe,S.Griswald,P.Walsh,and R.Martin.Near TermDigital Radio(NTDR)System.In Proceedings MILCOM ’97,pages1282–1287,Nov.1997.[13]K.Scott and N.Bambos.Routing and Channel Assignmentfor Low Power Transmission in PCS.In5th IEEE Int.Conf.on Universal Personal Communications,volume2,pages 498–502,Sept.1996.[14]T.Shepard.A Channel Access Scheme for Large DensePacket Radio Networks.In Proc.ACM SIGCOMM,pages 219–230,Aug.1996.[15]S.Singh,M.Woo,and C.Raghavendra.Power-Aware Rout-ing in Mobile Ad Hoc Networks.In Proceedings of the Fourth Annual ACM/IEEE International Conference on Mo-bile Computing and Networking(MobiCom’98),Oct.1998.[16]L.Williams and L.Emergy.Near Term Digital Radio-a FirstLook.In Proceedings of the1996Tactical Communications Conference,pages423–425,Apr.1996.[17]K.Yao,R.Hudson,C.Reed,D.Chen,and F.Lorenzelli.Blind Beamforming on a Randomly Distributed Sensor Ar-ray System.Proceedings of SiPS,Oct.1998.。
leach协议簇头计算公式的详细计算过程
leach协议簇头计算公式的详细计算过程协议书参与方:公司名称:____________________________地址:__________________________________联系人姓名:___________________________电话号码:_____________________________电子邮件:_____________________________第二部分:背景与目的本协议的背景和目的在于确定一种有效的协议簇头计算公式,以支持____________________________(填写具体背景和目的)。
第三部分:定义与术语协议簇头:_____________________________计算公式:_____________________________参数:_________________________________第四部分:协议簇头计算公式步骤1:_____________________________计算公式:_____________________________具体参数如下:参数1:_____________________________参数2:_____________________________计算过程详细描述:_____________________________步骤2:_____________________________计算公式:_____________________________具体参数如下:参数1:_____________________________参数2:_____________________________计算过程详细描述:_____________________________步骤3:_____________________________计算公式:_____________________________具体参数如下:参数1:_____________________________参数2:_____________________________计算过程详细描述:_____________________________第五部分:实施与执行时间表与进程:_____________________________监督与反馈:_____________________________第六部分:风险管理在实施过程中可能涉及的风险和应对措施包括但不限于:风险1:_____________________________应对措施:_____________________________风险2:_____________________________应对措施:_____________________________第七部分:结算与支付费用分担:_____________________________结算方式与周期:_____________________________第八部分:保密条款保密责任:_____________________________信息披露限制:_____________________________第九部分:变更与修订任何关于本协议的变更或修订须经双方书面同意。
leach算法的详细信息
翻译英文原文的LEACH算法的详细信息LEACH的运作以“轮”来实现,每一轮开始是簇头的建立阶段,其次传输数据到基站的稳态阶段。
为了尽量减少开销,稳态阶段比簇建立阶段时间长。
5.1簇选举阶段簇头选举初始阶段,每个节点根据所建议网络簇头的百分比(事先确定)和节点已经成为簇头的次数来确定自己是否当选为簇头。
每个节点产生一个0-1的随机数字,如果该数字小于阈值T(N),节点成为当前轮的簇头。
阈值T(n)=⎪⎩⎪⎨⎧∈-其它,0,)]/1mod([*1Gnprpp其中,P为预期的簇头百分比(例如,p= 0.5),r为当前轮数,G是最近1/p轮里没有成为簇头的节点的集合。
使用这个阀值,每个节点会在1/p轮的某一轮成为簇头。
在0轮(r = 0),每个节点都有一个成为簇头的概率P。
当选为簇头的节点不能在未来的1/ P轮当选为簇头。
因此,只有较少的节点有资格当选为簇头节点,剩余节点成为簇头的概率必然增加。
1/p-1回合后对任意还没当选为簇头的节点T(n)=1,可见,1/ P的回合后,所有节点都再次有资格成为簇头。
以后的工作中,我们会考虑到非均匀能量节点的以能量为基础的阀值。
在这种情况下,我们假设所有节点具有相同初始数量的能量,每个簇头也消耗大约相同的能量。
非簇头节点必须保持他们的接收器在此选举阶段听到所有的簇头节点的广告。
这一阶段完成后,每个非簇头节点决定在本轮中加入哪一个簇头节点。
这一决定是基于对广告的接收信号强度。
假设是对称的传播信道,收到发送的广告信号强度最大的簇头就是要加入的簇头,与其通信需要的能量最小。
稳定之后表示簇头的随机选举完成了。
5.2簇建立阶段在每个节点已决定它属于哪个簇之后,它必须告知簇头节点,它将成为该簇的成员节点。
每个节点再次使用CSMA MAC协议发送这个信息反馈给簇头。
在这个阶段,所有的簇头节点必须保持他们的接收器打开。
5.3 时间表的创建簇头节点收到所有想加入该簇的节点的消息。
基于这个簇的节点的数量,簇头节点创建一个TDMA时间表告诉所有节点什么时候能开始传输数据。
Leach算法分析
Leach算法分析leach_mit结构图从wireless.tcl⽂件中分析leach的具体流程在wireless.tcl⽂件中⾸先初始化了很多⽆限仿真的配置。
引⽤了⼀些外部脚本——source tcl/lib/ns-mobilenode.tcl(主要是包含移动节点类Node/MobileNode的⼀些otcl类函数的定义)、source tcl/lib/ns-cmutrace.tcl(trace⽂件的tcl脚本)、 sourcetcl/mobility/$opt(rp).tcl(将⼏种不同的协议的具体应⽤的外部脚本引⽤,$opt(rp)是协议名称)。
当⼀些变量初始化过后,通过elseif { [string compare $opt(rp) "leach"] == 0} {for {set i 0} {$i < $opt(nn) } {incr i} {leach-create-mobile-node $i建⽴我们仿真的节点,最主要的函数是leach-create-mobile-node(这个函数的定义在uamps.tcl中)分析uamps.tcl中是如何定义节点的在uamps.tcl中初始化了bsnode的应⽤类型(Application/BSApp)、定义了⼆个能量传输模型(⾃由信道和多径衰落、Efriss_amp和Etwo_ray_amp)和很多参数。
⽽真正创建节点是在函数leach-create-mobile-node中。
⽽这个函数中调⽤了uamps.tcl中的sens_init,这个函数的功能是清除上⼀次模拟时留下的trace⽂件。
在创建节点时候,sens_init函数调⽤⼀次。
leach-create-mobile-node函数解释如下:1、节点定义:if {$id != $opt(nn_)} {puts -nonewline "$id "set node_($id) [new MobileNode/ResourceAwareNode] #将前opt(nn_)-1个点定义为⼀般节点} else {puts "($opt(nn_) == BS)"set node_($id) [new MobileNode/ResourceAwareNode $BS_NODE] #将第opt(nn_)个节点定义为最终的sink节点$node_($id) label "BS"$node_($id) label-color red}2、初始化能量:if {$id != $opt(nn_)} { #如果节点的能量相等,就将所有普通节点的能量初始化为$opt(init_energy)。
简述LEACH算法的基本原理。
简述LEACH算法的基本原理。
LEACH算法(LowenergyAdaptiveclusteringhierarchy)是一种分布式无线传感器网络的节能协议。
它由斯坦福大学的梅里亚尼教授提出,用于减少能耗的层次式聚类算法。
LEACH算法的基本原理是:首先,LEACH算法假设每个传感器结
点都有可用的电池能量和处理能力,而这些传感器结点位于一个无线传感器网络中,这样可以减少网络中结点之间的能耗。
其次,每个传感器结点在协议结束之前要经历多个时间步骤,不断重组结点之间的联系。
每个结点使用随机预测和平均相关性来识别能量消耗最低的聚类头结点。
在这个过程中,每个传感器结点会发送消息给其他结点,询问是否可以成为聚类头结点。
最后,每个结点和其他可用的结点一起形成一个簇。
聚类头结点收集数据并将其发送给数据处理中心。
当非头结点收集到足够的数据后,它们也会发送给数据处理中心。
当结点聚类结束时,它们将依次进入休眠状态,以节约能量。
因此,LEACH算法的基本原理就是利用随机预测和平均相关性来识别能量消耗最低的聚类头结点,然后在结点之间建立联系,收集数据并发送给数据处理中心,最后进入休眠状态以减少结点之间的能耗。
- 1 -。