This document describes the TinyOS implementation of the fusion-based volcanic earthquake detection approach presented in [3,4]. The latest code package can be downloaded from
https://tanrui.github.io/code/volcano/volcano-20140615.tar.gz
We request that publication derived from the use of any part of the code package explicitly acknowledges by citing [3,4].
The package includes one segment of test data, seg3. It is in the testdata directory. seg3 has the seismic data traces collected by 12 wireless sensors deployed on an active volcano in 2009 [2]. The IDs of the nodes are {1, 2, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14}. This segment of data lasts for 10 minutes, during which a significant earthquake occurred. The visualization of this data segment can be found from testdata/html/seg3.html
This web page plots the signal energy and frequency spectrum measured by each node. It also shows the system detection decision fused from the detection results of all nodes (i.e., the first figure in the web page). This code package should be able to reproduce this result. The web page also draws the filtered system detection result by a morphological algorithm [3,4], and the result for picking the arrival time of primary wave (i.e., P-phase) at each node. This code package will not reproduce these two results.
I was able to compile this code package under the following environment1:
This is the script for setting up TinyOS environment (a.k.a. tinyos.sh [1])
#! /usr/bin/env bash # Here we setup the environment # variables needed by the tinyos # make system echo "Setting up for TinyOS 2.1.2" export TOSROOT= export TOSDIR= export MAKERULES= TOSROOT="/opt/tinyos-2.1.2" TOSDIR="$TOSROOT/tos" CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java/tinyos.jar MAKERULES="$TOSROOT/support/make/Makerules" export TOSROOT export TOSDIR export CLASSPATH export MAKERULES
This code package has four modules:
Issue the following command under the directory for each of the above four modules:
make telosb
If you encounter JAVA compilation errors complaining class SerialPacket undefined, make sure $TOSROOT/support/sdk/java/tinyos.jar is within the CLASSPATH.
I recommend to have 13 TelosB motes to reproduce the results. First, open a terminal and set up two environment variables:
export DATAROOT=<absolute path to the testdata folder> export SEGMENT=3
Install the testbed-basestation module to the BS with node ID 0:
make telosb reinstall.0 bsl,/dev/ttyUSB0
To download the data trace and detection algorithm into a node with ID x at /dev/ttyUSB0, call the installation script install.py in the root directory of the code package:
./install.py x /dev/ttyUSB0 # replace x with a number
The script will download data trace to the node and read the data out for verification. Moreover, the script will install the detection algorithm into the node. Wait for about 5 minutes for each node. If any exception occurs, try to re-issue the script. Note that the node ID you specify will correspond to the real node ID on the volcano, i.e., node 1 will have the data trace from node 1 on the volcano. Therefore, the node ID x must be within {1, 2, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14} and set up 12 nodes with these IDs using the script install.py.
Before running the detection algorithm, you may need to change some configuration in testbed-detect/FusionCenter.java. At the end of the JAVA file, there are some hard-coded configurations:
After appropriately setting them, re-compile the testbed-detect module by
make telosb
Turn on all nodes. After all nodes are booted (blue LED on), under the testbed-detect folder, run the fusion algorithm:
java FusionCenter
NSF CNS-0954039, CNS-0914371, CNS-0953067, CNS-1066391, CNS-1218475, OIA-1125163, OIA-1125165
This document was generated using the LaTeX2HTML translator Version 2008 (1.71)
Copyright © 1993, 1994, 1995, 1996,
Nikos Drakos,
Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999,
Ross Moore,
Mathematics Department, Macquarie University, Sydney.
The command line arguments were:
latex2html -split 0 -nonavigation -dir html volcano-code.tex
The translation was initiated by terry on 2014-06-15