02.08.2013 Views

Modeling of Sensor Nets in Ptolemy II

Modeling of Sensor Nets in Ptolemy II

Modeling of Sensor Nets in Ptolemy II

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

This paper describes a subclass <strong>of</strong> the DE model<strong>in</strong>g framework<br />

<strong>in</strong> <strong>Ptolemy</strong> <strong>II</strong> that is specifically <strong>in</strong>tended to model sensor networks.<br />

It largely preserves DE semantics, but changes the<br />

mechanism for connect<strong>in</strong>g components. In particular, it<br />

removes the need for explicit connections between ports, and<br />

<strong>in</strong>stead associates ports with channels by name (e.g. “Radio-<br />

Channel”). Connectivity can then be determ<strong>in</strong>ed on the basis <strong>of</strong><br />

the physical locations <strong>of</strong> the components. The algorithm for<br />

determ<strong>in</strong><strong>in</strong>g connectivity is itself encapsulated <strong>in</strong> a component<br />

as a channel model, and hence can be developed by the model<br />

builder.<br />

Figure 1. Typical DE model <strong>in</strong> <strong>Ptolemy</strong>, represented as a block diagram.<br />

Such block diagram representations are not well-suited to sensor network model<strong>in</strong>g.<br />

Figure 2. Example <strong>of</strong> a sensor node def<strong>in</strong>ed as a composite actor<br />

us<strong>in</strong>g a block diagram <strong>in</strong> the <strong>Ptolemy</strong> <strong>II</strong> discrete-event doma<strong>in</strong>.<br />

<strong>Sensor</strong> nodes themselves can be modeled <strong>in</strong> Java, or more<br />

<strong>in</strong>terest<strong>in</strong>gly, us<strong>in</strong>g more conventional DE models (as block<br />

diagrams) or other <strong>Ptolemy</strong> <strong>II</strong> models (such as dataflow models,<br />

f<strong>in</strong>ite-state mach<strong>in</strong>es or cont<strong>in</strong>uous-time models). For<br />

example, a sensor node with modal behavior can be def<strong>in</strong>ed by<br />

sketch<strong>in</strong>g a f<strong>in</strong>ite-state mach<strong>in</strong>e and provid<strong>in</strong>g ref<strong>in</strong>ements to<br />

each <strong>of</strong> the states to def<strong>in</strong>e the behavior <strong>of</strong> the node <strong>in</strong> that<br />

state. This can be used, for example, to model energy consumption<br />

as a function <strong>of</strong> state, enabl<strong>in</strong>g potential representation<br />

<strong>of</strong> sensor nodes us<strong>in</strong>g resource <strong>in</strong>terfaces [3].<br />

Sophisticated models <strong>of</strong> the coupl<strong>in</strong>g between energy consumption<br />

and media access control protocols become possible.<br />

1.1 Related Work<br />

A number <strong>of</strong> frameworks for<br />

model<strong>in</strong>g wireless systems are<br />

available.<br />

Ns-2[15] is a well-established,<br />

open-source network simulator<br />

with many contributors at<br />

several <strong>in</strong>stitutions <strong>in</strong>clud<strong>in</strong>g<br />

LBL, Xerox PARC, UCB, and<br />

USC/ISI. It is a discrete event<br />

simulator with extensive<br />

support for simulat<strong>in</strong>g TCP/IP,<br />

rout<strong>in</strong>g, and multicast<br />

protocols over wired and<br />

wireless (local and satellite)<br />

networks. The wireless and<br />

mobility support <strong>in</strong> ns-2 comes<br />

from the Monarch project at<br />

CMU [14], which provides<br />

channel models and wireless<br />

network layer components <strong>in</strong><br />

the physical, l<strong>in</strong>k, and rout<strong>in</strong>g<br />

layers. It provides a radio<br />

propagation model based on<br />

the two ray ground reflection<br />

approximation and a shared<br />

media model <strong>in</strong> the physical<br />

layer; it implements the<br />

IEEE802.11 MAC protocol <strong>in</strong><br />

the l<strong>in</strong>k layer; it implements<br />

the dynamic source rout<strong>in</strong>g<br />

protocol, etc. <strong>in</strong> the rout<strong>in</strong>g<br />

layer.<br />

<strong>Sensor</strong>Sim[17], from UCLA,<br />

also builds on ns-2 and claims<br />

power models and sensor channel<br />

models. A power model<br />

consists <strong>of</strong> an energy provider<br />

(the battery) and a set <strong>of</strong><br />

energy consumers (CPU, radio,<br />

and sensors). An energy consumer<br />

can have several modes,<br />

each correspond<strong>in</strong>g to a different<br />

trade-<strong>of</strong>f between performance<br />

and power. For<br />

example, the radio may have a<br />

number <strong>of</strong> transmit modes<br />

us<strong>in</strong>g different symbol rates<br />

and transmit power. The sensor<br />

channels model the dynamic<br />

<strong>in</strong>teraction between the physi-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!