在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文件进行分析时,得到的图片
但是老师文章中,结果应该是
他们文章中仿真结果可以看出leach-c优于leach,对吗???
我总觉得自己的有问题。。。。不知道如何解决
在condition中有一个Spreading factor = 6 这个变量是什么意思,我看mit源文件的Spreading factor = 8