leach协议仿真问题记录

在ubuntu下安装leach协议进行仿真时,仿真图与网上相差甚远,请大家帮忙分析问题所在:

项目场景:

leach_test相关环境配置如下 簇头数5,基站位置(0,0):

topology_file="mit/uAMPS/sims/100nodes.txt"
# number of clusters we want.  It is recommended to use 5% of the total for LEACH and LEACH-C
# WARNING! - It is important to use 1 cluster for Pegasis
#   number of nodes in the scenario.
num_clusters=5
# energy values.  How much energy does each node have initially
eq_energy=1
init_energy=2
# stop is the time to stop the simulation if it is still running
stop=3600
# x,y 0is the size of the field
x=1000
y=1000
# bs_x, bs_y is the location of the base station in the field.
bs_x=0
bs_y=0
# Number of nodes.  WARNING!  This should be 1 higher then the number
#  of nodes generated in the scenario.
nn=101

在进行./test 操作之后,/mit/leach_sims目录下condition.txt文件内容如下:


USING LEACH-C: CENTRALIZED CLUSTER FORMATION

Simulation will stop after 3600 seconds.
Base station at (0, 0)
Each node starting with 2 Joules of energy.

Energy Model:
		RXThresh = 6e-9
		CSThresh = 1e-9
		Rb = 1e6
		Excvr = 50e-9
		Efriss_amp = 9.6741659015025702e-12
		Etwo_ray_amp = 1.3037037037037037e-15
		Ebf = 5e-9
		Pidle = 0
		Psleep = 0

Desired number of clusters = 5
Spreading factor = 6
Changing clusters every 20 seconds


问题描述

对生成的.alive .data .energy文件进行分析时,得到的图片blog.csdnimg.cn/direct/94a7e704d1b14a8d9878a24f555107d4.png)

但是老师文章中,结果应该是
在这里插入图片描述

以及这样
在这里插入图片描述


他们文章中仿真结果可以看出leach-c优于leach,对吗???
我总觉得自己的有问题。。。。不知道如何解决

在condition中有一个Spreading factor = 6 这个变量是什么意思,我看mit源文件的Spreading factor = 8

  • 8
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值