Sensor Module - Mamma Sim 李 李 李 695430070
Introduction Wireless Sensor Network (WSN), an emerging
technology comprising of sensing, computing, and internetworking, was nominated as one of the ten most potential technologies changing our world by MIT technology Review.
A WSN tends to be composed of hundreds or thousand of sensor nodes, which are launched over an environment to form a wireless ad hoc network.
The goal of a WSN is to monitor and sometimes to control an environment.
Wireless multimedia sensor networks
Is it feasible ? High bandwidth demand
Power consumption
Application-specific QoS requirements Ex: picture, media stream, real-time …
Multimedia coverage
Integration with other wireless technologies
…
Wireless multimedia sensor networks
If it is feasible. Task scheduling In-network processing
Multimedia source coding techniques
…
My goal in this lesson
1. 找個 sensor module for NS2 (MannaSim)
2. 測試所提出的網路架構對多媒體 ( 影音串流 ) 的效能影響,找個影像程式加到 sensor module (MyEvalVid)
3. 實際傳送影像來分析其效能
Why MannaSim ? 安裝簡單 提供 Script Generator Tool 自動產生 TCL 程式碼 (u
se Java, like nsBench) 有提供 flat 跟 hierarchical 的網路架構 容易擴充
Downloading and installing MannaSim Framework The MannaSim Framework is provided in tw
o flavors : ns-2.29 Patch MannaSim Source Code
ns-2.29 Patch This is the simplest way to install Mannasim in an
unmodified ns-2.29 distribution. 1. Get ns-2.29 all-in-one package from ns site.
http://sourceforge.net/project/showfiles.php?group_id=149743&package_id=169689&release_id=371538
2. Get MannaSim Framework ns-2.29 patch. http://www.mannasim.dcc.ufmg.br/download/mannasim-patch-ns2.29.tar.gz
3. Type the following command on the ns-allinone-2.29 folder: patch -p1 < mannasim-patch.diff
4. Install ns-2.29 as usual typing ns-allinone-2.29 folder: ./install
MannaSim Source Code This version is intended for users whose NS-2.2
9 distribution has already been changed. 1. Get ns-2.29 all-in-one package from ns site.
2. Get MannaSim Framework tar.gz file. http://www.mannasim.dcc.ufmg.br/download/mannasim-src-ns2.29.tar.gz
3. Unpack the tar.gz file into ns-2.29 main folder (if using ns all-in-one distribution ns-allinone-2.29/ns-2.29 folder). Inside mannasim/ folder just created look for a ns-modified-files/ folder. where ns-2.29 modified files are stored.
MannaSim Source Code (con.)
4. Substitue ns-2.29 files listed bellow by it's MannaSim version stored in ns-modified-files/ folder in mannasim/ directory.
ns-2.29/apps/udp.cc ns-2.29/common/ns-process.h ns-2.29/common/packet.cc ns-2.29/common/packet.h ns-2.29/mac/mac-802_11.cc ns-2.29/tcl/lib/ns-lib.tcl ns-2.29/tcl/lib/ns-default.tcl ns-2.29/Makefile.in
5. In ns-2.29 main folder re-run configuration script and then re-compile the system: ./configure./make
Install problem MannaSim 附的 mac-802_11.cc 可能有問題,如果
安裝失敗,用原始的 mac-802_11.cc 覆蓋過去,再重新 make
void Mac802_11::send(Packet *p, Handler *h){ ... if(mhBackoff_.busy() == 0) { if(is_idle()) { ... if((u_int32_t)ETHER_ADDR(dh->dh_ra) == MAC_BROADCAST){ mhBackoff_.start(cw_, is_idle()); }else{ if(mhDefer_.busy() == 0) { rTime = (Random::random() % cw_) * (phymib_.getSlotTime()); mhDefer_.start(phymib_.getDIFS() + rTime); } ...
This code permits that MAC still uses backoff in the case of MAC idles and broadcasting.Guarantee in an On Demand network simulation the sensor nodes don't loose broadcast messages.
MannaSim classes Sensor Node DataGenerator TemperatureDataGenerat
or TemperatureAppData Processing SensedData
OnDemandData OnDemandParameter SensorBaseApp CommonNodeApp ClusterHeadApp
Important Class Sensor Node Class
It extends NS-2 MobileNode class adding specific sensor nodes characteristics as power consumption for sensing and processing activities.
DataGenerator Class With methods to adjusts sensing interval and sensing ty
pe. Type : PROGRAMED 、 CONTINUOUS 、 ON_DEMAND 、 EVENT_DR
IVEN TemperatureDataGenerator and CarbonMonoxideDataGenerat
or inherit DataGenerator class.
Important Class (con.)
Battery Class It extends NS-2 EnergyModel class. The class contains methods to turn sensor node on and of
f, put it into sleep and wake it up. Also contains methods to decrease energy when a sensing, processing or disseminating job is performed by the sensor node.
SensedData Class It acts as dissemination message for processed data witc
h is stored in a data buffer. The class provides networking information such as sourc
e node identification, message type, message priority among others.
OnDemandData inherit SensedData
Extension 將簡單環境擴展到複雜環境
Sensor NodeWireless
Access PointVideo Server
Internet
Sensor node
BS
User
Internet
Extension (con.)
加入 real-time scheduling Techniques for allocating and scheduling tasks on proces
sors to ensure that deadlines are met. Ex: rate-monotonic (RM) scheduling algorithm 、 earliest
deadline first (EDF) algorithm …
補充 MyEvalvid 結合了 Evalvid 和 NS2 這兩個工具 Evalvid 是一套由德國人發明的多媒體品質評估工具,
主要功能是讓研究人員可以經過實際網路或模擬去驗證所提出來的網路相關技術對多媒體串流品質的影響