You are on page 1of 5

Experimental Applications of Mapping Services in Wireless Sensor Networks

James Shuttleworth, Mohammad Hammoudeh, Elena Gaura, Robert Newman Cogent Computing Applied Research Centre Department of Creative Computing Coventry University, Coventry, UK. CV1 5FB {j.shuttleworth, aa2792, e.gaura, r.m.newman}@coventry.ac.uk

Fig. 1.

Height map from USGS data covering the Grand Canyon

Abstract Wireless sensor networks typically gather data at a number of locations. However, it is desirable to be able to design applications and reason about the data in more abstract forms than points of data. This paper examines one way in which this can be done. By bestowing the ability to predict inter-node values upon the network, it is proposed that it will become possible to build applications that are unaware of the concrete reality of sparse data. This interpolation capability is realised as a service of the network. We present an implementation of this service and discuss its merits and shortcomings. Additionally, we present an initial application of the service in the form of isopleth generation. That is, the delineation of contours of constant parameter value. Finally, we discuss the improvements required to create more sophisticated applications and services and examine the benets these improvements would bring.

be processed, aggregated, distilled and acted upon within the network, possibly with only selected data being reported back to a monitoring user. The wireless sensor nodes are usually more than capable of performing these tasks, as long as the application developer creates the required software, constructing specic functions from what has become increasingly generic hardware. There has been a consistent effort to change the mechanism of use of certain capabilities in wireless sensor networks, to simplify and abstract them, turning them into services of the network rather than being the result of coordinating the services of individual nodes. TinyDBs retrieval of data [1], for example, uses the abstraction of SQL to effectively hide the details of data collection, buffering, and transmission. Following on from such work and moving to a slightly higher level of abstraction, we propose a new network service: map generation. The primary purpose of wireless sensor networks is to collect and transmit data, but other capabilities have arisen to support this goal. Just as clustering, routing and aggregation allow for more sophisticated and efcient use of the network resources, a mapping service would support other network services and make many more applications possible with little extra effort. In this paper, we present our rst steps towards a general mapping service. We dene a simple service, discuss our simulation of networks that implement it and present an example application built on the service. II. B ENEFITS OF AN IN -N ETWORK M APPING S ERVICE We predict many benets to result from the development of an efcient and exible in-network mapping service. Networks of nodes are built to solve problems and many problems are essentially problems of interpolation between points and it is this set of problems that we intend to address with a mapping service. Dening lines of constant height or pressure, contours and isobars, for example, requires knowledge not just of measurements at a few scattered locations, but also the likely values between them. Contours and isobars are, in fact, specic types of isopleth and a very simple early implementation of isopleth determination is presented later in this paper.

I. I NTRODUCTION The purpose of any wireless sensor network is to gather data. In the most simple systems, the collected data might be instantly reported. In more complex systems, the data will

Another problem that is at heart simply a problem of interpolation is surface reconstruction. While mesh-based models are feasible and useful for specic applications int he context of WSNs [2], an interpolation-based model of surface reconstruction offers benets such as being locally applicable, of arbitrary detail and easily subjected to image processing techniques. Other aspects of wireless sensor networks that would benet from such a service include clustering, in which geographical context might be useful; deployment, for which the mapping service could provide information on network density related to terrain or phenomenon complexity, and so on. As well as these easy to identify benets, it is likely that having such a service would make new applications obvious, just as there has been as recent increase in new Internet applications combining existing services to produce new and until now unthought-of mashups. Of course, the efcacy and efciency of applications based on such a service are tied to how well the service is implemented. The implementation of the mapping service presented in this paper, and the example application built upon it, are not optimal. In short, they are inefcient and nave. However, while more sophisticated implementations of the algorithm are being devised and tested, this simple approach gives us an opportunity to investigate the usefulness and validity of its application. III. A LGORITHMS FOR M AP G ENERATION Map generation is essentially a problem of interpolation from sparse and irregular points. Given a set of known data points representing the nodes perception of a given measurable parameter of the phenomenon, what is the most likely complete and continuous map of that parameter? In the eld of computer graphics, this problem is known as an unorganised points problem, or a cloud of points problem. That is, since we assume that the position of the points in xy is known, the third parameter can be thought of as height and surface reconstruction algorithms can be applied. Simple algorithms use the point cloud as vertices in the reconstructed surface. These are not difcult to calculate, but can be inefcient if the point cloud is not evenly distributed, or is dense in areas of little geometric variation. Approximation, or iterative tting algorithms dene a new surface that is iteratively shaped to t the point cloud. Although approximation algorithms can be more complex, the positions of vertices are not bound to the positions of points from the cloud. For applications in WSNs, this means that we can dene a mesh density different to the number of sensor nodes, and produce a mesh that makes more efcient use of the vertices. Self organising maps are one of the algorithms that can be used for surface reconstruction [3]. This method uses a xed number of vertices that move towards the known data. Note that surface reconstruction on typical non-overlapping terrains is equivalent to sparse-data interpolation. This kind

of geometric parameter interpolation has been shown to work well for reconstructing underlying geography when the entire network has been queried [2]. However, It does not extend well to variable surfaces or overlapping local mapping, since it requires a complete data set to dene the surface. A more general method is interpolation by inverse distance and, specically, Shepard [4] interpolation which improves on it. The simple inverse distance algorithm, used in WSN applications before [5], is dened as: N du zi i=1 i if d = 0 for all Di N f (P ) = u di i=1 if di = 0 for some Di zi Where, P is the point at which the interpolated value is required, di is the distance from P to the point numbered i in the N known points and zi is the known value at point i. The exponent, u, is used to control the smoothness of the interpolation. High values lead to sharp edges between regions while low values lead to soft edges. Shepard [4] devised a number of improvements to this basic algorithm to limit the effect of distant points, make use of the direction of the relationship between known points and the point to be interpolated and to incorporate information on the slope between known points. The algorithm, including the rst two of these renements, has been implemented to interpolate between sensor readings and is discussed further here. IV. S IMULATION WITH S EN S OR In order to implement our mapping approach and study its properties, we have extended an in-house sensor network simulator called SenSor [6]. SenSor is a realistic and scalable Python based simulator, in which each sensor node runs in its own thread and communicates using the same protocols as its physical counterpart. Sensors have a xed API, with customisable internals. This enables us to experiment with different algorithms for managing the network topology, simulating fault management strategies and so on, within the same simulation. Sensors are modelled as a pool of concurrent, communicating threads. Individual sensors are able to: 1) Gather and process data from a model environment 2) Locate and communicate with their (geographically or otherwise) nearest neighbours 3) Determine whether they are operating correctly and act accordingly to alter the network topology Separate interfaces gather information from the network and display it. This partitioning allows us to experiment with different ways of processing individual node data into information. Using this simulation framework, we implement our mapping services. For our experiments, we provided SenSor with interpolation capabilities and developed a plug-in to do draw the isopleths.

For the purposes of the experiment reported here, nodes are designated into logical groups called clusters where each cluster is managed by a master node called cluster-head, as in LEACH [7]. The use of clusters improves network performance and reliability by localising network trafc. Also, cluster-head nodes run a time aggregation function to reduce redundancy and minimise energy consumption by decreasing the number of transmissions. In this algorithm, robustness is achieved by storing multipath and electing backup node(s) that can substitute for the cluster-head when the current cluster round ends or in some failures. During the set-up phase nodes will select to belong to the nearest cluster-head using the number-of-hops metric. The use of this metric will result in a more fair distribution of nodes among clusters and establish shorter paths, hence reducing the energy expenditure since bridging the distance between the node and its cluster-head will be less expensive. Because of the random transmission delays and synchronisation errors, we use a back-off waiting scheme, similar to one used in [8], to lessen these effects. When a node receives an advertisement message it waits for a constant time to gather more set-up messages; when the timer expired it rebroadcasts the message with the best metric and resets the back-off timer. The number-of-hops metric together with the back-off time will help to reduce the set-up messages and create more uniform clusters. During the transmission phase, sensing nodes transmit data to their cluster-head which retransmit messages to the querying node. All nodes were given a virtually innite supply of energy and the protocol was allowed to run until it converged. Since the energy is unlimited we have used other metrics to measure energy consumption like the number of messages sent. For our experiments, we created an 600-node network in such a way that nodes are scattered randomly in area of 256 256 m2 . Figure 2 shows a random topology of 600 nodes scattered over a terrain where the edges represent communication neighbours. The power of the sensor radio transmitter is set to cover all nodes within a 50m radius. The processing delay for transmitting a message is randomly chosen between 0 and 5 seconds, simulating real-world characteristics of low-power radio transmission. Using this network conguration we gathered the data to interpolate the landscape and draw the isopleths from the interpolated output. The landscape image is fed to the simulator and sensors will perceive the colour intensity at the xy position of the landscape image corresponding to their coordinates as gathered sense data. After cluster-heads are selected and paths are established, an external observer can choose to query any node to collect the information necessary to interpolate the surface from the network. Every node responds to the query message by sending its sense value and position through the cluster head. This collected information could then be used to build the network surface using the interpolation algorithm. With this framework in place, we were able to experiment with isopleth generation.

Fig. 2. SenSor, the WSN simulator, showing information transmission between nodes and a visualisation of the interpolated surface

Fig. 3. Interpolated eld generated from 600 simulated nodes randomly distributed on the surface from Figure 1

V. E XPERIMENTAL A PPLICATION The determination of isopleths or contours is useful in a number of applications and the ability to nd the edges of a phenomenon has been put forward before as a useful operation [9]. Such an ability would enable the systematic nding and delineation of the borders of phenomena such as gaseous emissions or freezing conditions, creating height contour maps, calculating lines of sight, and so on. To highlight this potential use of an in-network mapping service, we present an implementation of isopleth generation. This is a simple implementation, with little regard for efciency, but nevertheless provides a genuinely useful output for the purposes of visualisation or phenomenon edge delineation. With no optimisation or renement to reduce communica-

Fig. 4.

A contour at 116 units drawn over Figure 1

Fig. 5.

A contour at 116 units drawn on the interpolated eld in Figure 3

tion costs, the algorithm is very simple. A request is made to any node, giving the value of the required isopleth. A height of 120 metres, for example, if contours of height were needed. This node is then responsible for collecting the information needed to produce the result. A threshold gure is also given, t, so that values t are included. The simple algorithm presented here causes this node to then query every other node in the network for their value of the parameter in question. Once all data is collected, the interpolation is performed as described in Section III, and every value matching the required isopleth is recorded as being part of that isopleth. This algorithm has been implemented using the simulation software SenSor and the simple API described in Section IV. Figure 1 shows a height map of a section of the Grand Canyon, taken from data recorded by the US Geological Survey [10]. If we apply the isopleth generation algorithm to this data directly, we are left with a result such as that shown in Figure 4. This contour was generated for a height of 116 units and a threshold of 1. To present the result of generating isopleths on interpolated elds as described above, Figure 5 shows the result of generating an isopleth with the same parameters as in Figure 4, on the interpolated eld shown in Figure 3. Clearly the interpolated terrain is similar to the real surface. Determining exactly how close the similarity is, and what the algorithmic limits to the accuracy of the representation, is a problem we are currently investigating. Consider, though, that the information used to reconstruct the surface in Figures 3 and 5 is just 600 points, while the original is recorded as 65,536. Taking the position of the nodes into account as extra information, the reconstruction is built using less than 3% of the original data.

In a more advanced implementation, this algorithm would be replaced by one that begins with an efcient search for the rst matching value and then a process of extending the search along the isopleth as it is discovered. VI. N EXT S TEPS We have presented, above, our very early research into mapping and the applications of mapping in wireless sensor networks. Leading directly from the work in this paper, there are a number of avenues that need to be followed. The nave approach above collects all of the data in a central location and processes it there. In networks of a few nodes, this might even be the most sensible solution. However, in networks of nodes large enough to be useful, the number of transmissions needed to accomplish the task would become so large as to require a more intelligent solution. The cost of communication in this initial system is very high because the interpolation step, the mapping service, is fairly simple and requires that all data is collected to a point. For the most simple case, in which the node collecting data is in direct communication with all other nodes in the network, the number of hops is simply N 1, for N nodes. However, this is an unlikely situation in any real world application. The likelihood is exponential growth with N . Although the cost, in terms of power of transmission of data in wireless sensor networks far outweighs the usual processing load, the nodes are most often power-limited devices with, at best, a xed schedule of battery replacement, and so computational drain on this resource cannot be completely overlooked. For small collections of data of around 50 nodes interpolating 65,536 points (a square eld 256 256) takes very little time, just a few seconds, on a desktop computer and would take just a little more on modern sensor nodes.

In a real deployment, the number of sensor nodes might easily exceed 1,000, depending upon the required density, drastically increasing computational expense. The acceptability of such a computational load in a wireless sensor network is debatable, but in this case would probably be unacceptable for most deployments. The simplest improvement is to develop a complete implementation of Shepards renements and assess how this affects the accuracy of the interpolated eld when compared to a known real surface or phenomenon. Although the algorithm presented by Shepard [4] is decades old, it is often only implemented in its most simple form and it would be of great benet to have empirical evidence of the performance of the various improvements to this suggested by Shepard, when applied to data likely to be perceived by sensor networks. A particularly interesting feature of the renements is that they deal with limiting the data included in the weighted average, or adjusting weights based on context. These improvements might be instantly applicable as ways to reduce communication costs as well as improve the quality of the interpolation. That is, if local information is required, then only local nodes need be queried. Taking this idea further, we arrive at the idea of a mapping service that allows for local querying. Our proposed solution, currently being developed, is an application of the more advanced mapping service outlined above. An isopleth for a given parameter at a given value can be found by a step-by-step search for the next point in the map at the same level. That is, a single point is used as the start of the isopleth and the next is found by searching the neighbourhood in progressively more detail. The process is repeated until the end of the isopleth moves out of the mapped region or meets the beginning. The highest level of detail that is searched will determine how ne the isopleth is. The same improvements intended to decrease the cost of transmission also reduce the cost of computation. The change from global to local area interpolation reduces the number of transmissions and makes the task of interpolation signicantly smaller. Additionally, since the local interpolation could be performed by local nodes, the computational cost is not just reduced, but also distributed. That is, rather than individual nodes taking big losses in battery life and becoming unusable quickly, the entire networks batteries degrade at a more constant rate. VII. C ONCLUSIONS In this paper we have described a mapping service for wireless sensor networks which turns the network to an entity rather than a collection of separated nodes. This mapping service uses only existing data and network capabilities of a classical sensor network at different levels depending on the application. Future work may apply the mapping services to other network exposures such as barriers that might cause discontinuities in the interpolated map, contours, or many other sophisticated applications.

We feel that this area of research is pertinent to modern wireless sensor networks, and in this paper we have taken initial steps towards exploring it. We have identied applications, such as isopleth generation, that the service would make simple to develop, and challenges that need to be met before such a service is feasible. Challenges such as local interpolation, required to make the service efcient enough to be deployed. This paper is not the result of a completed project, but the exposition of the start of one. The problems and limitations described above are the opportunities we intend to take and the lines we intend to follow. The work presented above has been useful in a number of ways. Firstly, it allowed us to extend SenSor so that it is capable of simulating networks with complex predened variations of parameters over space. This is a useful advance, since it allows for precise control over the parameters of the virtual deployment. Secondly, it gave us an opportunity to examine the applicability of Shepard interpolation in the reconstruction of a parameter map from sparsely sampled data. The experience gained here is proving to be invaluable in developing more sophisticated implementations of the service and its applications. Finally, we have been able to identify limitations and problems as well as potential extensions and solutions that would otherwise have been missed until later iterations. R EFERENCES
[1] J. M. Hellerstein, W. Hong, S. Madden, and K. Stanek, Beyond average: Towards sophisticated sensing with queries, in Proceedings of the 2nd International Workshop on Information Processing in Sensor Networks (IPSN 03), 2003. [2] J. K. Shuttleworth, E. I. Gaura, and R. M. Newman, Surface reconstruction: Hardware requirements of a som implementation, in Proceedings of the ACM Workshop on Real-World Wireless Sensor Networks (REALWSN06), June 2006, pp. 9596, aCM ISBN: 1-59593431-6. [3] Y. Yu, Surface reconstruction from unorganized points using selforganizing neural networks, in Proceedings of IEEE Visualization, 1999, pp. 6164. [4] D. Shepard, A two-dimensional interpolation function for irregularlyspaced data, in Proceedings of the 1968 23rd ACM national conference. New York, NY, USA: ACM Press, 1968, pp. 517524. [5] R. Tynan, G. OHare, D. Marsh, and D. OKane, Interpolation for wireless sensor network power management, in Proceedings of the International Workshop on Wireless and Sensor Networks (WSNET-05). IEEE Press, June 2005. [6] S. Mount, R. Newman, and E. Gaura, A simulation tool for system services in ad-hoc wireless sensor networks, in Proceedings of NSTI Nanotechnology Conference and Trade Show (Nanotech05), vol. 3, May 2005, pp. 423426. [7] W. Heinzelman, A. Chandrakasan, and H. Balakrishnan, Energyefcient communication protocols for wireless microsensor networks, in International Conference on System Sciences, January 2000. [8] L. Xia, X. Chen, and X. Guan, A new gradient-based routing protocol in wireless sensor networks, in Proceedings of ICESS 2004, 2004, pp. 318325. [9] M. Elmusrati, R. Jantti, and H. Koivo, Distributed sensor network data fusion using image processing, in Proceedings of Systems Communications, August 2005, pp. 383388. [10] USGS and C. McCabe, Grand canyon terrain, Georgia Institute of Technology Large Geometric Models Archive. http://wwwstatic.cc.gatech.edu/ projects/large models/ index.html, 1998.

You might also like