Agilla's Network Topology

From Cyber-Physical Systems Laboratory
Revision as of 19:51, 10 December 2007 by Liangfok (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Sometimes there is not enough space, time, or debugging resources to deploy a truly multi-hop WSN. For this reason, Agilla provides a mechanism that simulates a multi-hop network by filtering messages sent from specific nodes. Nodes are arranged in a grid and their location within the grid is calculated based on their TinyOS address.

The following notes apply to Agilla versions 2.x and 3.x. Note that Agilla 2.x enforces the grid topology whereas Agilla 3.x does not (the user can disable the grid topology by setting both ENABLE_NEIGHBOR_LIST_FILTER and ENABLE_GRID_ROUTING to be 0 in $TOSROOT/contrib/wustl/apps/Agilla/Makefile.Agilla). Agilla 1.x users should see this page.

Description

Agilla creates an artificial multi-hop sensor network arranged in an n x m grid by filtering out messages from non-neighbors. A node can only communicate with its immediate neighbors based on the grid topology, i.e., each node in the grid can communicate with its immediate horizontal, vertical, and diagonal neighbors, for a maximum of 8 neighbors. A node is identified by its (x,y) location, which is calculated based on its address. Only one node can be located at a particular (x,y) location at a time. The network grid is arranged in row-major order starting with location (1,1) at the corner. The mote connected to the base station is treated like a regular node, it can be at any valid grid location and its neighbors are based on its position in the grid. Note that this differs from Agilla 1.x where the base station was treated as a special case with an address of (0,0) and the entire first row as its immediate neighbors. In Agilla 2.x, the base station can move and is treated like any other node.

A node's address related to its grid location as follows:

ID = (x - 1)+ (y - 1) * (number of columns)

The following equations calculate the x and y coordinates from the Node ID:

x = [(ID) mod (number of columns)] + 1
y = (ID – x + 1)/(number of columns) + 1

For example, nodes would have the following IDs and locations in a 4x4 network:

The grid coordinates and node IDs in a 4x4 WSN

Agilla implements a simple routing protocol based on greedy-forwarding where each agent simply forwards a message to whichever neighbor is closer to the message's ultimate destination. If there are no neighbors closer to the destination, the message will be dropped. The current routing protocol does not adapt to node failures very well.

Customizing

The default grid size is specified by the number of columns. It is specified by DEFAULT_NUM_COLUMNS in $TOSROOT/contrib/wustl/apps/Agilla/types/Agilla.h and by NUM_COLUMNS in $TOSROOT/contrib/wustl/tools/java/edu/wustl/mobilab/agilla/variables/AgillaLocation.java. After changing the default number of columns, the Agent Injector and the Agilla middleware both have to be recompiled and the middleware needs to be re-installed on all the motes.

After the middleware is deployed, you can always change the grid topology and node's location wirelessly. You can start the AgentInjector with a "-col NUM_COL" option, which will change the default number of columns within the AgentInjector. You can change the number of columns within the sensor network by going to the WSN menu and selecting ""Change Grid Topology," or by hitting ctrl+g. To change a node's location. Note that the grid size within the network MUST match the grid size within the AgentInjector java application.