没有合适的资源?快使用搜索试试~ 我知道了~
首页Castalia Manual
资源详情
资源评论
资源推荐
Castalia
A simulator for Wireless Sensor Networks
Version 1.3
User’s Manual
Athanassios Boulis
January 2008
National ICT Australia
Contents
1 Introduction....................................................................................................................... 3
1.1 Why a new simulator?.............................................................................................. 4
2 Overview .......................................................................................................................... 4
2.1 Structure................................................................................................................... 5
3 Using Castalia................................................................................................................... 7
3.1 Running the first simulation..................................................................................... 7
3.2 Understanding the omnetpp.ini file.......................................................................... 9
3.3 Creating and managing your own simulations....................................................... 14
4 The Application – Inserting your own algorithm ........................................................... 16
4.1 Structure and functionality of the template application code................................. 16
4.1.1 Defines............................................................................................................... 16
4.1.2 Module initialization.......................................................................................... 17
4.1.3 The handleMessage method .............................................................................. 18
4.1.4 Module finish..................................................................................................... 20
4.2 Creating a new application module........................................................................ 21
5 Communications............................................................................................................. 25
5.1 The Wireless Channel ............................................................................................ 25
5.2 The Radio............................................................................................................... 28
5.2.1 Dynamically adjusting radio parameters from the application module ............. 29
5.3 The MAC ............................................................................................................... 31
5.3.1 Dynamically adjusting MAC parameters from the application module ............ 33
5.4 The Network (Routing) module............................................................................. 35
6 Sensing and the Physical Process ................................................................................... 37
6.1 The Physical Process.............................................................................................. 37
6.2 The Sensing Device ............................................................................................... 38
7 Computing Resources..................................................................................................... 40
7.1 The Resource Manager module ............................................................................. 40
8 References....................................................................................................................... 40
2
1 Introduction
Castalia is a Wireless Sensor Network (WSN) simulator based on the OMNet++
platform that can be used by researchers and developers who want to test their distributed
algorithms and/or protocols in a realistic wireless channel and radio model, with a realistic
node behaviour especially relating to access of the radio. Castalia can also be used to evaluate
different platform characteristics for specific applications, since it is highly tunable, and can
simulate a wide range of platforms. The main features of Castalia are:
• Advanced channel/radio model based on empirically measured data.
• Detailed state transition for the radio, allowing multiple transmission power levels.
• A highly flexible physical process model.
• Sensing device noise, bias, and power consumption.
• Node clock drift, CPU power consumption.
• Resource monitoring that goes beyond energy consumption (such as memory and
CPU time).
• A Medium Access Control protocol with a large number of parameters to tune.
• Designed for adaptation and expansion.
Concerning the last bullet, Castalia was designed right from the beginning so that the
users can easily implement/import their algorithms and protocols into Castalia while making
use of the features the simulator is providing. Proper modularization and a configurable,
automated build procedure help towards this end. The modularity, reliability, and speed of
Castalia is partly enabled by OMNeT++, an excellent framework to build event-driven
simulators
[OMNeT++ link].
What Castalia is not: Castalia is not sensor-platform specific. Castalia is meant to
provide a generic reliable and realistic framework for the first order validation of an algorithm
before moving to implementation on a specific sensor platform. Castalia is not useful if one
would like to test code compiled for a specific sensor node platform. For such usage there are
other simulators/emulators available (e.g., Avrora).
3
1.1 Why a new simulator?
There is a variety of simulators that WSN researchers are using to cover their needs.
Simulators that emulate a common processor found in sensor nodes (to test actual binary code
written for certain platforms), simulators written in C++ or Matlab to test some first order
property of an algorithm, or simulators used in traditional data networks modified in some
way to serve the WSN community. So why try to build a new one?
It all started from our own needs in a WSN project. We wanted to test some
communication patterns in simulation before moving in real systems. In order to do so we
wanted accurate enough radio/channel models so that the simulation results would become
meaningful and guide us in our search. We knew of the recent work by Zuniga et al.
[1] that
explained empirically measured data from WSN platforms (more specifically packet
reception rate as a function of distance) by combining known wireless channel and radio
models. We found that all the available WSN simulators were falling short of the current
state of the art modelling done in sensor networks. Especially in communication where the
impact to the result can be significant
[2], models remain simplistic or unsuitable for short
range low power communications despite the existence of proper models developed the last
couple of years. This was the major reason we decided to build our own simulator. Since we
started this effort we have decided to "up the ante", capture realistic node behaviour beyond
the channel and build an open expandable and reliable simulator that has a chance of
becoming a de facto standard for certain WSN simulation needs. More specifically, the need
for early stage, platform-independent, algorithm/protocol validation. This was/is our primary
need too, and we believe this is the area that WSN simulation lacks the most rigor. Castalia is
not actually built from scratch in the sense that is using OMNeT++ as the base to build a
reliable and fast event-driven simulator. Using OMNeT++ as our platform we implement
proper models for WSN based on recent literature.
2 Overview
Castalia is using OMNeT++ as its base so it is suggested that you have a fair
understanding of the basic concepts of OMNeT although this is not required, especially if you
want to use Castalia in a basic form (tune some parameters, build your own parameter-less
application).
OMNeT’s basic concepts are modules and messages. A simple module is the basic unit
of execution. It accepts messages from other modules or itself and according to the message it
executes a piece of code. The code can keep state that is altered and can send new messages
4
(or schedule new messages to be sent). There are also composite modules. A composite
module is just a construction of simple and/or other composite modules.
2.1 Structure
Castalia’s basic module structure is shown in the diagram below.
node
1
node
2
node
n
…
Physical process 1
Wireless Ch
annel 1
Figure 1: The modules and their connections in Castalia
Notice that the nodes do not connect to each other directly but through the wireless
channel(s) module(s). The arrows signify message passing from one module to another. When
a node has a packet to send this goes to the wireless channel which then decides which nodes
should receive the packet. The nodes are also linked through the physical processes that they
monitor. For one physical process there is one truth (one module) which the nodes sample in
space and time to get their sensor readings. There can be multiple physical processes,
representing the multiple sensing devices (multiple sensing modalities) that a node has, as
well as multiple wireless channels to represent the multiple radios (operating in an orthogonal
manner, e.g., different frequencies or different codes) that a node might have.
The node module is actually a composite one. Figure 2 shows the internal structure of
the node composite module. The solid arrows signify message passing and the dashed arrows
signify an interface between the modules with simple function calling. For instance, most of
the modules call a function of the resource manager to signal that energy has been consumed.
The Application module is the one that the user will normally change. For each different
algorithm that the user wants to change, a new application module must be built following the
5
剩余39页未读,继续阅读
zhuanglijun9024
- 粉丝: 1
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- 2023年中国辣条食品行业创新及消费需求洞察报告.pptx
- 2023年半导体行业20强品牌.pptx
- 2023年全球电力行业评论.pptx
- 2023年全球网络安全现状-劳动力资源和网络运营的全球发展新态势.pptx
- 毕业设计-基于单片机的液体密度检测系统设计.doc
- 家用清扫机器人设计.doc
- 基于VB+数据库SQL的教师信息管理系统设计与实现 计算机专业设计范文模板参考资料.pdf
- 官塘驿林场林防火(资源监管)“空天地人”四位一体监测系统方案.doc
- 基于专利语义表征的技术预见方法及其应用.docx
- 浅谈电子商务的现状及发展趋势学习总结.doc
- 基于单片机的智能仓库温湿度控制系统 (2).pdf
- 基于SSM框架知识产权管理系统 (2).pdf
- 9年终工作总结新年计划PPT模板.pptx
- Hytera海能达CH04L01 说明书.pdf
- 数据中心运维操作标准及流程.pdf
- 报告模板 -成本分析与报告培训之三.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0