现在的位置: 首页 > 综合 > 正文

ns2无线节点的通信范围设置

2013年03月31日 ⁄ 综合 ⁄ 共 2511字 ⁄ 字号 评论关闭

  NS中可以用户可以在网络接口中通过设定接收阈值来指定通信范围,比如:

      Phy/WirelessPhy set RXThresh_ <value>

 一个单独的用来计算接收阈值的C程序:~ns/indep-utils/propagation/threshold.cc.

编译后(g++ -lm threshold.cc -o threshold)

按下述方计算阈值

threshold -m <propagation-model> [other-option] distance


USAGE: find receiving threshold for certain communication range (distance)


SYNOPSIS: threshold -m <propagation-model> [other-options] distance

<propagation-model>: FreeSpace, TwoRayGround or Shadowing


[other-options]: set parameters other than default values:

Common parameters:
-Pt <transmit-power 发射功率>
-fr <frequency 频率>
-Gt <transmit-antenna-gain 发射天线增益>
-Gr <receive-antenna-gain 接收天线增益>
-L <system-loss 系统损耗>

For two-ray ground model:
-ht <transmit-antenna-height 发射天线高度>
-hr <receive-antenna-height 接收天线高度>

For shadowing model:
-pl <path-loss-exponent 路径损耗指数>
-std <shadowing-deviation 阴影方差>
-d0 <reference-distance 参考距离>
-r <receiving-rate 正确接收的速率>


例如计算TwoRayGround传播模型下通信距离为250m所需对应的参数,
~/ns-allinone-2.34/ns-2.34/indep-utils/propagation$ ./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

上面几个参数均是默认值,当改变通信距离时 只需在tcl脚本里将RXThresh设置成相应的值即可。

如果是物理层使用的是Phy/WirelessPhyExt,则怎么做?

无线传播模型与能量模型有什么关系?

      Phy/WirelessPhy set RXThresh_ <value>

 一个单独的用来计算接收阈值的C程序:~ns/indep-utils/propagation/threshold.cc.

编译后(g++ -lm threshold.cc -o threshold)

按下述方计算阈值

threshold -m <propagation-model> [other-option] distance


USAGE: find receiving threshold for certain communication range (distance)


SYNOPSIS: threshold -m <propagation-model> [other-options] distance

<propagation-model>: FreeSpace, TwoRayGround or Shadowing


[other-options]: set parameters other than default values:

Common parameters:
-Pt <transmit-power 发射功率>
-fr <frequency 频率>
-Gt <transmit-antenna-gain 发射天线增益>
-Gr <receive-antenna-gain 接收天线增益>
-L <system-loss 系统损耗>

For two-ray ground model:
-ht <transmit-antenna-height 发射天线高度>
-hr <receive-antenna-height 接收天线高度>

For shadowing model:
-pl <path-loss-exponent 路径损耗指数>
-std <shadowing-deviation 阴影方差>
-d0 <reference-distance 参考距离>
-r <receiving-rate 正确接收的速率>


例如计算TwoRayGround传播模型下通信距离为250m所需对应的参数,
~/ns-allinone-2.34/ns-2.34/indep-utils/propagation$ ./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

上面几个参数均是默认值,当改变通信距离时 只需在tcl脚本里将RXThresh设置成相应的值即可。

如果是物理层使用的是Phy/WirelessPhyExt,则怎么做?

无线传播模型与能量模型有什么关系?

抱歉!评论已关闭.