djstein.com | projects | Wireless Sensor Network Simulator

Wireless Sensor Network Simulator

Abstract: This application is a simulation of a wireless sensor network. Such a network is used to detect and report certain events across an expanse of a remote area - e.g., a battlefield sensor network that detects and reports troop movements. The idea behind this network is that it can be deployed simply by scattering sensor units across the area, e.g. by dropping them out of an airplane; the sensors should automatically activate, self-configure as a wireless network with a mesh topology, and determine how to send communications packets toward a data collector (e.g., a satellite uplink.) Thus, one important feature of such a network is that collected data packets are always traveling toward the data collector, and the network can therefore be modeled as a directed graph (and every two connected nodes can be identified as "upstream" and "downstream.")

A primary challenge of such a network is that all of the sensors operate on a finite energy supply, in the form of a battery. (These batteries can be rechargeable, e.g. by embedded solar panels, but the sensors still have a finite maximum power store.) Any node that loses power drops out of the communications network, and may end up partitioning the network (severing the communications link from upstream sensors toward the data collector.) Thus, the maximum useful lifetime of the network, at worst case, is the mnimum lifetime of any sensor.

Much research has been devoted to maximizing this maximum lifetime. One potential improvement is in making packet-routing decisions that extend the life of the network. The concept is that any node may be connected to more than one downstream node, and it may be more desirable to use one than the other. For instance, if several nodes are connected to downstream bottleneck node that is rapidly exhausted, the lifetime can be extended by reducing the traffic going through it (i.e., upstream nodes preferentially use alternative downstream nodes.)

Of course, given that data generation rates are unpredictable - since it is not known in advance whether any sensor will detect little or much activity - the routing process must be dynamic. Therefore, it is useful for each node to recalculate its routing decisions periodically, based on the energy reserves of each downstream node. An algorithm for doing so was developed by Jae-Hwan Chang and Leandros Tassiulas (IEEE/ACM Transactions of Networking, Vol. 12, No. 4, August 2004.)

This application is a simulation of the wireless sensor network described hereinabove. The network may be deployed based on a wide range of parameters: network size (number of nodes), communications distance, energy costs for transmitting and receiving packets, etc. The network can then be used to simulate the detection of vectors traveling across the sensor network field. In this simulation, when a vector trips the sensor of a network node, the node generates a data packet and sends it to a downstream network node. The packets are routed appropriately until they reach a sensor within the "uplink zone" (the right side of the map, designated with a striped pattern.) Each node also simulates an energy store, which is depleted by sending receiving packets, and by detecting vectors. Since the nodes have finite energy, they will eventually power down and drop out of the communications network, causing network failure.

The application has the ability to run successive tests on a network and report the mean network lifetime across 1,000 trials. The network routing parameters (described in the Chang and Tassiulas paper) can be tweaked to allow testing of different network configurations.

Version: 1.1 - last updated Friday, December 01, 2006

Links: Download (Contents: Executable (Windows), Source Code (C#))

Screenshots: