OSTSim: On-site Tracking Simulator

Baljeet S. Malhotra and Alex A. Aravind

(malhotra, csalex)@unbc.ca

Computer Science Program

University of Northern British Columbia

British Columbia, Canada

Abstract

Software simulation tools are one of the important constituents of computer science curricula. In this paper, we discuss the design of a software tool that we built and call OSTSim, to simulate the On-site tracking problem in wireless sensor networks. We used UML to analyze and design the OSTSim. Based on our development experience of this tool, we demonstrate the usefulness and importance of the simulation and modeling based courses in the computer science curricula.

1. Introduction

Background

Wireless sensor networks(WSNs) are one of the active areas in computer science.These networks present a promising opportunity for realizing many practicalapplications which will become part of our daily lives[1].Many University level programs have started to includethese networks as an important constituent of distributed computing curricula.Small, inexpensive, intelligent devices equipped with processor, memory and radio components will worktogether in a coordinated fashion to report the physical phenomenon happening aroundthem. These miniature sized devices (generally referred to as sensor nodes) are characterized by their limited power source and ad-hoc deployment in abundance due to cost effectiveness.Deployment of a full scale or prototype of practical systems such as sensornetworks is difficult in the advent of many economical and practical challenges. This leaves us with the option of modeling and simulation to study and analyzethe practical systems. For example, in most of the WSN related simulation studiesa wide variety of simulation software are in commonuse. These simulation software include ns2[6], GloMoSim[7], Qualnet[8], Opnet[9], etc.

On-site tracking problem in wireless sensor networks has been proposed recently[4].In this particular type of tracking, the main objective is totrack the moving targets. A class of algorithms has beenproposed to solve the problem. This paper presents the architectureof OSTSim, a simulation software, which we built to evaluate theperformance of the proposed algorithms[4] and other approaches[2] that can solvethe On-site tracking problem. Based on our experience of developing this software,we reaffirm the importance of simulation and modeling based course in the academics.

Motivation

As mentioned previously there are manypublicly available software toconduct simulation studies in the wireless networks.Since most of these simulators were initially developed forspecific studies and then evolved there after by the contributions of otherresearchers in an ad hoc fashion, they lack structureand proper documentation. Their minimal documentation,increased size, and generality normally:

  1. Makes the learning curve steep,
  2. Incur huge execution time,
  3. Have less control for certain modifications and extensions, and
  4. Lack features required for specific studies.

These are our observations that we experienced with some of theexisting simulators. Therefore, we chose to develop our own simulation test-bed.The major advantage we have with this decision is a better understanding of the underlying design of the software that in fact provides us a better control over the simulator.

Scope of OSTSim

OSTSim is limited to conducting the performancestudy of the On-site tracking methodsin wireless sensor networks.For the On-site tracking methods, we are mainly interested inthe energy spent by the sensor nodes, and tracking time of the sink.We compute the energy expenditures based on themessages sent and received by the sensor nodes.For simplicity we assume that the communication network is reliable.

Organization

We start with the problem statement in section2, and next insection3we discuss theuse-case diagram. In section 4 detailed system specifications are given. ER diagram is drawn in section5. Identification of OSTSim objects, class diagramsand their further refinements are discussed in section6.Next, two activity diagrams are discussed in section7.Finally we conclude the paper in section8.

2. Problem Statement

A sensor network with specified a number of targets and sinks are assumed. For a given tracking approach for a specified set of parameterssuch as sink speed, desired distance, and area size, the simulator should compute the trackingtime of the sink and the energy consumption of the sensor nodes.We develop the simulation system through analysis and design.We start with the use-case diagram[3].

3. Use-Case Diagram

Constructing an use-case diagram involves:(i) identification of actors,(ii) identification of use-cases (the ways of using the system), and(iii) refining the use-cases and setting the relationships. Researcher,who is interested inevaluating the performance of the algorithms for the On-site tracking, is the only actor in the system.This actor can use the system by setting the parameters of thesimulator and getting the results on the defined metrics.Fig.1 represents the use-case diagram of the OSTSim.

4. Detailed System Specification

The sensor networkconsists of the following.

  1. A geographical region of area size a.
  2. A set of p sensor nodes with a communication range r.
  3. A set of n targets with a maximum speed of vmt, and with a random mobility pattern.
  4. A set of m sinks with aspeed vmut.

We make the following system assumptions.

  1. The geographical region is a two-dimensional rectangular plane without obstacles.
  2. The sensor nodes are suitably deployed to cover the network region.
  3. The targets never cross the network boundary.
  1. We assume the same radio model as referred in [5],in which

Es = 50 + .1 x R2 nJ/bitand Er = 50 nJ/bit.

Fig.2 represents the setup of threemain constituents in theOSTSim system.Following are themainactivities involved in the system.

  1. Sensor nodes collect and store the information of the targets.
  2. Sensor nodes supply the information about the targets when the sinksrequest them.
  3. The system (simulator) collects statistics.

The system is initialized as follows.

  1. The size of the geographical region is an input parameter.
  2. The number of sensors required is computed based on the networkarea and the transmission range of a sensor node.
  3. The initial position of the sinksand the targets is determined randomly.

The input parameters for the system areas follows.

  1. Size of the network region i.e. a.
  2. Sink and Target speeds i.e. vmutand vmt. respectively.
  3. Desired Distance, δ.
  4. Number of simulation runs.

Next we construct the entity relationship (ER) diagram for the system.

5. Entity Relationship (ER) Diagram

The design of the ER diagram involves:

(i)identification of the entities,

(ii)identification of the characteristics of various entities,

(iii) Identification of relationships existing among various entities.

Fig.3 represents the ER Diagram of system.Next, based on the use-case diagram, system specifications, and the ER diagram, we constructthe class diagram.

6. Class Diagram

Class diagram depicts the structural aspect of the system. A class essentiallyhas three logical components: member attributes, operations that invokeservicesfrom other classes, andoperations to access the member attributes.Its development involves mainly five stepsthat are discussed next.

  1. Identification of the objects and their member attributes. This can beobtained by analyzing the problem specification, the use-case diagram, and the ER diagram.
  2. Abstraction of the objects into the classes.
  3. Identification of the relations amongthe objects (referred to aslinks)and abstracting them into the relations among thecorresponding classes (referred toas associations). This involvesfinding the relations, labeling it properly, and determining itscardinality.
  4. Refine the class diagrams to identify the main operations usingsuitable interaction diagrams.
  5. Further refining the class diagrams to get a final class diagram.

Identification of Objects

Mainly there are three types of objects involved inthe system. These are:

  1. Objects in the simulation system
  • SimulationInterface,
  • Scheduler,
  • Statistics Collector,
  • Simulation Clock, and
  • Event Queue.
  1. Objects in the sensor network
  • Sensor node.
  1. Objects in the On-site tracking
  • Mobile Target, MT and
  • Mobile Sink, MUT.

Abstraction of Classes

In the OSTSim system, every object has its corresponding class.Description of these classes is represented inTable 1.Following is the list of the classes that are designed based on the objects described previously.

  • SimulationInterface,
  • Scheduler,
  • StatisticsCollector,
  • SimulationClock,
  • EventQueue,
  • SensorNode,
  • MT, and
  • MUT.

Class / Member Attributes
Simulation Interface / int: NofNodes, NofSimulations, NofMT, NodSink
float:Length, Breadth, SenssingRange, CellSize, DesiredDistance
Scheduler / Object:EventQueue, Clock, StatisticalData
Statistic Collector / Object: StatisticalData
Sensor Node / int: NodeID, NodexPos, NodeyPos
Object: TargetData
MT / int: MTID
float: MTxPos, MTyPos, MTNewxPos, MTNewyPos, MTSpeed
bool: MTCaptured
Object: StatisticalData
MUT / int: MUTID
float: MUTxPos, MUTyPos, MUTNewxPos, MUTNewyPos, MUTSpeed
Object: StatisticalData

Identification of Associations

Table 2 contains the association among the various classes.This table facilitates us to draw the first level of class diagram representing the association among the various classes, as shown in Fig.4.A class in this diagram containsthe main member attributes. The next step is to identifythe operations of the classes, which invoke services from other classes.This can be achieved through building and analyzing interactiondiagramthat we do in the next section.From the Table2, we draw the incompleteclass diagramas shownin Fig.4 representing the associationsamong various classes.

Simulation Interface / Scheduler / Statistic Collector / Sensor Node / MT / MUT
Simulation Interface / Setup(1-1) / Setup(1-1) / Setup(1-1) / Setup(1-n) / Setup(1-1) / Setup(1-1)
Scheduler / Setup(1-1) / Update(1-m) / Update(1-m) / Update(1-m)
Statistic Collector / Update(1-1) / Update(1-1)
Sensor Node / Setup(m-1) / Update(m-1) / Capture(m-m) / Report(m-m)
MT / Setup(m-1) / Update(m-1) / Capture(m-m)
MUT / Setup(m-1) / Update(m-1) / Request(m-m)

Interaction Diagrams

Interaction diagrams illustrate the dynamic behavior of the system.That is, representing the interactions among the various objects. In the OSTSim systemonly the objects that have non-trivial interactions are considered.Objects considered in the interaction diagram are:(1) Nodes (2) Mobile Target, MT, (3) Mobile Sink, MUT, and (4) System Interface.The various interactions existing among theseobjectsare depicted inFig.5.

Refinement of Classes

Based on the interactions amongthe various objects as shown in Fig.5, we refine the classesto include the operations. After the first refinement, and including theoperations, the class diagram is presented inFig.4.Further refinement involves carefully walking through the operations givenin this class diagramto check their completeness. By doing this we achieve the second stage of class diagram as shown in Fig.6.

Complete class diagram can be obtained by listing all the requiredoperations (methods) needed to perform the operations aslisted in the previous Fig.6.Class diagramwith a complete list of operations, and the member variablesis depicted in Fig.7.

7. Activity Diagrams

Finally, we identify and expand the key functions of thesystem in terms of activity diagrams. Next, we draw such activity diagrams for the following:

  1. Scheduler (Fig.8)
  2. Mobility of MT (Fig.9)

8. Conclusions

We built this model using Java 2 (SDK, SE v1.4.2.03). We chose Javafor its extensive support for thread programming, which we used for buildingthis model. We simulate the proposed protocols as well as the existing approachesfor the comparison study.Though OSTSim provided a limited scope of a network simulator, it proved very useful for the simulation study of the On-site tracking application.

In the future OSTSim can be extended to acquire morefunctionality to achieve the specific tasks.Development of OSTSim encouraged us to practice the simulation and modeling course as an effective tool for building simulation software that canrepresent the practical systemssuch as sensor networks.

References:

[1] I. F. Akyildiz, W. Su, Y. Sankarasubramaniam, and E. Cayirci. “Wireless Sensor Networks:A Survey”, Computer Networks (Elsevier), Vol. 38, pp. 393-422, March 2002.

[2] Haiyun Luo, Fan Ye, Jerry Cheng, Songwu Lu, Lixia Zhang.“TTDD: Two-Tier Data Dissemination in Large-scale Sensor Networks”, Proc. of Eighth Annual Int. Conf. on Mobile Computing and Networking (MOBICOM'02), Atlanta, Georgia, USA, ACM Press, pp. 148-159, Sept. 2002.

[3] Hans-Erik Erikson and Magnus Penker. ”UML Toolkit”, Wiley Computer Publications. John Wiley and Sons, Inc. 1998.

[4] Baljeet. S. Malhotra and Alex. A. Aravind. “Energy-Efficient On-Site Tracking of Mobile Targetin Wireless Sensor Networks”, Proc. of the Intl. Conf. on Intelligent Sensors, Sensor Networks and Information Processing (ISSNIP '04), Melbourne, Australia, pp. 43-48, 14-17 Dec. 2004.

[5] W. H. Heinzelman, A. Chandrakasan, and H. Balakrishnan. “Energy-EfficientCommunication Protocol for Wireless Microsensor Networks”, Proc. of the Hawaii Intl. Conf. on System Sciences, Maui, Hawaii, USA, pp. 1-10, Jan. 2000.

[6]TheNetwork Simulator ns-2,

[7]GloMoSim, Global Mobile Information SystemsSimulator Library,

[8] QualNet Network Simulator by Scalable Network Technologies,

[9] Opnet,

1