首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Cooja模拟的参数设置

Cooja模拟的参数设置
EN

Stack Overflow用户
提问于 2019-05-09 00:23:33
回答 1查看 818关注 0票数 0

我正在尝试使用Contiki 3.0和Cooja模拟器对RPL协议进行一些模拟。我正在使用天空微尘,我想看看DODAG是如何形成的,并使用Collect View监控网络的参数。我有几个问题:

1)我可以在哪里以及如何更改目标函数?

2)我的传感器有1 My的能耗,我认为对于实际应用来说太多了,因为传感器需要工作几年。

3)我可以在哪里更改模拟的其他参数?比如Tx/Rx数据包?

4)如何解释collect视图中给出的路由指标?

5)我注意到当我改变一个节点的位置时,网络检测移动的速度太慢了,RPL不是很快,但是在Cooja中它需要太多的时间,这可能吗?你对模拟移动传感器有什么建议吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-05-19 00:54:50

1)您可以从contiki/core/net/rpl/rpl-conf.h设置更改目标函数

根据您的需求进行编辑:

代码语言:javascript
复制
/*
 * The objective function (OF) used by a RPL root is configurable through
 * the RPL_CONF_OF_OCP parameter. This is defined as the objective code
 * point (OCP) of the OF, RPL_OCP_OF0 or RPL_OCP_MRHOF. This flag is of
 * no relevance to non-root nodes, which run the OF advertised in the
 * instance they join.
 * Make sure the selected of is inRPL_SUPPORTED_OFS.
 */
#ifdef RPL_CONF_OF_OCP
#define RPL_OF_OCP RPL_CONF_OF_OCP
#else /* RPL_CONF_OF_OCP */
#define RPL_OF_OCP RPL_OCP_MRHOF
#endif /* RPL_CONF_OF_OCP */

/*
 * The set of objective functions supported at runtime. Nodes are only
 * able to join instances that advertise an OF in this set. To include
 * both OF0 and MRHOF, use {&rpl_of0, &rpl_mrhof}.
 */
#ifdef RPL_CONF_SUPPORTED_OFS
#define RPL_SUPPORTED_OFS RPL_CONF_SUPPORTED_OFS
#else /* RPL_CONF_SUPPORTED_OFS */
#define RPL_SUPPORTED_OFS {&rpl_mrhof}
#endif /* RPL_CONF_SUPPORTED_OFS */

/*
 * Enable/disable RPL Metric Containers (MC). The actual MC in use
 * for a given DODAG is decided at runtime, when joining. Note that
 * OF0 (RFC6552) operates without MC, and so does MRHOF (RFC6719) when
 * used with ETX as a metric (the rank is the metric). We disable MC
 * by default, but note it must be enabled to support joining a DODAG
 * that requires MC (e.g., MRHOF with a metric other than ETX).
 */
#ifdef RPL_CONF_WITH_MC
#define RPL_WITH_MC RPL_CONF_WITH_MC
#else /* RPL_CONF_WITH_MC */
#define RPL_WITH_MC 0
#endif /* RPL_CONF_WITH_MC */

2) Contiki为节点的长期运行提供无线电占空比(RDC)机制。默认值为nullrdc,其中节点始终保持打开状态,因此生命周期较短。设置ContikiMAC以最小化节点功率。转到contiki/core/contiki-default-conf.h并根据您的需求进行编辑。

例如:

代码语言:javascript
复制
#ifndef NETSTACK_CONF_RDC
/* #define NETSTACK_CONF_RDC   nullrdc_driver */
#define NETSTACK_CONF_RDC   contikimac_driver 
#endif /* NETSTACK_CONF_RDC */

3) Tx/Rx可以从Network visualizer本身设置。您可以右键单击任意节点并编辑tx/rx范围和成功率。您也可以在.csc (模拟)文件中对其进行编辑。

代码语言:javascript
复制
    <radiomedium>
      org.contikios.cooja.radiomediums.UDGM
      <transmitting_range>100.0</transmitting_range>
      <interference_range>120.0</interference_range>
      <success_ratio_tx>0.9</success_ratio_tx>
      <success_ratio_rx>0.9</success_ratio_rx>
    </radiomedium>

4)您需要计算各种性能指标。为此,你有自己的代码脚本文件(困难的部分)。或使用这些链接https://github.com/iloveyii/contiki_rpl/tree/master/perl

https://pdfs.semanticscholar.org/d319/4d5f43f1cd3995ba7c9e99776ac8f150d445.pdf

5)使用移动性插件模拟各种移动性模型。

https://anrg.usc.edu/contiki/index.php/Mobility_of_Nodes_in_Cooja

http://vrajesh2188.blogspot.com/2016/04/mobility-in-contiki-2.html

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56045118

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档