ns/tcl/lib/ns-default.tcl 里有设置默认值的,传输距离250米
更改发射功率,或者接收阀值均能改变通信距离,计算公式在mobile/tworayground.cc里
ns-default.tcl 中的代码如下:
Phy/WirelessPhy set CSThresh_ 1.559e-11
Phy/WirelessPhy set RXThresh_ 3.652e-10
这个是默认的设置,默认的为通信距离为250米
修改步骤:
To set communication radius, you have to set the receiving threshold value, RXThresh_. This can be obtained by running the program ~ns/indep-utils/propagation/threshold.cc
(compile using g++ and the option –lm) and specifying the propagation model and the desired radius. Then in your script, before creating the simulator, use the command “Phy/WirelessPhy set RXThresh_ ”. Ideally, you would also like to set the transmission power,
Pt_ and the carrier sensing threshold, CSThresh_. But I still don’t know how to obtain their values. Some standard values for Pt_ are: 7.214e-4 for 100m, 8.5872e-4 for 40m. Also note that the effectiveness of the radius depends on the propagation model. While
it works perfectly for FreeSpace, it might not work as well for the other two.
[compile threshold.cc]
$ cd ns/indep-utils/propagation/
$ g++ -lm threshold.cc -o threshold
[example]
$ threshold -m TwoRayGround 250
distance = 250
propagation model: TwoRayGround
Selected parameters:
transmit power: 0.281838
frequency: 9.14e+08
transmit antenna gain: 1
receive antenna gain: 1
system loss: 1
transmit antenna height: 1.5
receive antenna height: 1.5
Receiving threshold RXThresh_ is: 3.65262e-10
$
参靠柯老师网站:http://140.116.72.80/~smallko/ns2/11b.htm
In
NS-2, the default transmitting power Pt is 0.28, and thus the
transmission range (TX_range) and
physical carrier sensing range (PCS_range) are calculated as 250 meters and 550 meters
p.s. (0.28183815×1.52×1.52) / (2504)=3.652e-10
分享到:
相关推荐
AODV路由ns2 tcl脚本,30节点。
NS2下随机节点移动通信tcl文件及场景配置
ns2仿真ns与网络模拟的源码,路由器代码,节点链路,几个简单的ns2实例
简单的节点程序,用于模拟ns2中的各个节点,且可以用于进行网络模拟,流量测量
分析延迟/ns2/可以用在在多个节点间无线网络的仿真,分析延迟、吞吐量、丢包率
ns2中无线节点创建原理及过程,涉及部分otcl源码
隐藏终端是指在接收接点的覆盖范围内而在发送节点的覆盖范围外的节点。隐藏终端由于听不到发送节点的发送而可能向相同的接收节点发送分组,导致分组在接收 节点处冲突。冲突后发送节点要重传冲突的分组,这降低了...
随机生成位置的节点再网络中运动,用nam动画显示,最后给出吞吐量的gif
非常好的无线网络ns2仿真教程 非常好的无线网络ns2仿真教程 非常好的无线网络ns2仿真教程 非常好的无线网络ns2仿真教程 非常好的无线网络ns2仿真教程
通常在NS2仿中,如果网络参数变化,需要手动修改TCL脚本中设置的参数,然后在重新运行TCL文件获得仿真结果。如此比较麻烦,如何自动修改网络参数并运行仿真,且自动保存运行结果?此处代码实现如下功能:每一次仿真...
关于ns2中通信距离的设置问题,需要的朋友可以下载
详细阐述了ns2中无线通信距离的仿真原理和设定方法。
基于NS2的无线网络隐藏节点问题仿真实验.pdf
ns3水声通信模块,适合需要在ns3做网络仿真的同学,水声通信
在NS2中,无论使用什么队列管理机制都可以输出队列长度!只需修改一些源代码,在make一下即可!
为解决上述问题,一种基于NS2 的通用的、可扩展的P2P模拟平台NDP2PSim 得以提出。该平台可为各类P2P 协议的模拟提供真实且通用的模拟环境,同时实现了P2P 系统的一些通用功能并以模块形式提供以便于使用。介绍了该...
《NS2仿真实验:多媒体和无线网络通信》一书以实验为基础,兼顾教学需要,介绍了NS2及TCL语言,同时为使学生在学习理论之后能够有所实践,提供了各种NS2实验过程。《NS2仿真实验:多媒体和无线网络通信》共有26个实验...
NS2 网络模拟 原理和应用 pdf NS2网络模拟器的原理和应用 内容简介 本书要介绍的是由UC Berkeley设计、起初由VINT Project团队维护的一套网络仿真软件NS2(Network Simulator-Version 2,简称NS2)。NS2是一个面向...
NS2仿真实验_多媒体和无线网络通信 源代码 书籍另外下载
《NS2仿真实验--多媒体和无线网络通信》全部26个实验的实验代码