Wireless sensor networks consists of a large number of small computers, sensor nodes, like the one below that can sense its environment, compute, store information and communicate wirelessly. You can find more background and what we are doing with such a sensor network here. In this lab we are going to simulate a small network of MicaZ sensor nodes.You can get data about them from the manufacturers homepage, but it's not needed for the lab. RoutingIn general, at the deployment of a sensor network it is not known where individual sensors are going to end up. Therefore the sensors needs to form the network ad hoc and set up all needed services in the setting they ended up in. Routing of messages is one important service and that is the topic of this lab. Sensor node limitationsThese sensor nodes run on batteries. To ensure a long life of the network it is therefore important to conserve battery power. Of all mechanisms of a sensor node, sending messages is clearly the one that uses the power. Therefore battery usage is a very important variable in getting a good routing algorithm Practical detailsAccountsThe lab is done on the computer csmisc19.cs.chalmers.se. To get a username and password, do an empty submission to Account Request in Fire (i.e. press the submit button for the "lab" in Fire named Account Request, without uploading a file or if you get problems with some empty file).FilesTinyOS with all sources for libraries and everything is installed at/opt/tinyos-2.1.0 . There you find
Rout.tar.gz . Unpack that into your home directory (at the
server) and do the assignment from there.
Assignment backgroundYou will be given a program that performs very basic routing and you are going to improve it so that battery power is conserved better to get as long life of the network as possible (measured as the number of collected messages by the sink during the simulation). Write a report describing your improvements and presenting the algorithm and results from your simulations. See details about the report further down. The settingNodes are places in a grid and have already performed some localization algorithm so they know where nodes of different ID:s are. In this lab the location is based on the ID in fact, but in a realistic setting to calculate relative location is a more complicated matter. A simple radio model is used where all messages comes through even when to a node that is transmitting at the same time. This is highly unrealistic, but makes it much easier to compare the different algorithms. The battery modelThe very simple battery model only takes sending of messages into account. The cost of sending a message is the quadratic distance between the sender and the receiver (where the distance of two neighboring nodes in the same row or column is 1). The cost of broadcasting is set to MAXDISTANCE (the maximum quadratic distance a message can reach). Basic procedure
Some tips and pointers
ResourcesYou can probably figure out how to do the assignment without having to look in any documentation. However, to understand what is going on the Tutorials are the easiest way to get a basic understanding on how things works.TopologiesThe nodes are always placed in a rectangular grid. The number of columns need to match the constantCOLUMNS in Rout.h The
nodes are numbered 0 to COLUMNS-1 on the first row, COLUMNS to
2*COLUMNS-1 on the second and so on. Nodes can be removed from a
topology using the removenodes.py script to create more interesting
topologies. The removed nodes will still be run but have no one to
communicate with. You can build topologies on your own using
buildtopo.py to get a grid and then remove some nodes to get some
interesting formation.
The FilesThe files that you most likely want to do changes to are emphasized.The application
Simulation
Scripts
The AssignmentPart 1 – improve the basic routingImplement something better than the basic routing algorithm. The battery level is something that is known to a node, so feel free to use that in your algorithm. If you need to send more information in your announcement messages you can add field to the message struct in Rout.h. You should write a report where you:
make sure that you keep a copy of part 1 before you do the changes of part 2 (see below at the submission section). Part 2 – Clustered data aggregationIn the current setting each sensor node sends their information in a message that is routed to the sink. It is very expensive to rout all individual messages. Instead information is often collected and processed and aggregated within an area in the network. This summarized information can then be sent and routed over the network. In the current algorithm the content messages have a value that is always set to one. To aggregate many messages these values could be summed up and sent in one message. Of course it would be easy for every node along the way to sum up messages that arrives to it, but in a more realistic situation the information sent is something more meaningful that cannot be summarized far from the nodes that sent the information. In this setting we want many nodes in an area to send their information to the same node, a cluster head, that do the summarization and then sends a message that is to be routed towards the sink. That message should be routed normally. Which node is the cluster head? A simple algorithm is for every node with a certain probability announces itself to be a cluster head. Then the nodes that did not announce themselves as cluster nodes pick the best, in some respect, cluster head and sends their message to it. The cluster head adds up the content information and sends a message with the aggregated data. Implement an algorithm to do this. Feel free to base the decision on if you are a cluster head and which cluster head to pick on any parameters you like, battery level of the node, battery level of neighbors, anything you find useful. If you want to use random numbers in any way, use random() in RoutC.nc. Feel free to add more message types if you need that. It is not allowed for a cluster head to store content for more than one round though. We assume that the sink needs regular updates. You should add to the report:
On your resultsThere are no fixed limits for what you need to achieve. Try out some different ideas until you feel you have reached a good result. The experimentation is the most important part, not the exact results.Submission and presentationYour results should be presented at the lecture slot at Monday, March 7, 2011. The presentation should take no more than 3 minutes where you present how your routing algorithm works and what results you got. You are supposed to do this in groups of two.Files on your accountWhen you submit your code you should, in your home directory on the lab machine, place:
Note that you should submit your code and report to Fire as usual as well. Deadline: March 4, 2011 The labs will be reported using the Fire system as usual but also arranged on your account in the way described above. Fire can be found at: https://fire.cs.chalmers.se:8039/cgi/Fire-ds2. Make sure that both members of the group are added before submitting. A tar.gz file with the following is what is supposed to be submitted:
|