Wireless Sensor Network Simulator
Project Document
by
Ben Stroud
As Part of the Requirements for the Degree of
Master of Science in Computer Science
University of Colorado at Colorado Springs
Committee Members and Signatures
Approved by / DateProject Advisor: Dr. Edward Chow
Committee Member: Dr. Jugal Kalita
Committee Member: Dr. Roy Lewis
Table of Contents
I. MASTERS PROJECT GOAL4
II. INTRODUCTION4
III.BACKGROUND4
IV.NEED5
V.PROJECT OVERVIEW5
VI.SILVERLIGHT6
A) Introduction6
A.1) What is Silverlight?6
A. 2) Brief History of Silverlight6
B) Exploration of How Silverlight Works7
B.1) Overview7
B.2) Architecture 7
B.2.a) Components of the Presentation Core8
B.2.b) Components of the .NET Framework8
C) Building an Application with Silverlight9
C.1) Development Environments9
C.1.a) Eclipse4SL9
C.1.b) Visual Studios10
C.1.c) Expression Blend10
C.2) Languages10
C.3) Deployment10
D) How Silverlight is Currently Being Used10
D.1) Video Rendering10
D.2) Site Content 11
D.3) Mobile Devices11
D.4) Install Base11
E) Performance Comparisons11
E.1) Rendering12
E.2) Computational 13
F) Open Source Implementation13
G) Future Directions13
G.1) Implementation on More Platforms13
G.2) Take More Advantage of GPUs 14
G.3) More Comprehensive Networking Capabilities14
G.4) Support Java Driven Silverlight Applications14
VII.RELATED WORK14
A) Wireless Network Simulators14
A.1) Generic Network Simulators14
A.1.1) Sensor Network Component Based Simulator15
A.1.2) J-SIM15
A.2) Wireless Sensor Network Simulators15
A.2.1) ns-215
A.2.2) TOSSIM15
A2.3) Current UCCS Wireless Sensor Network Simulator16
A.3) Summary16
B) Bloom’s Taxonomy - Evaluating Effectiveness of Educational Techniques16
C) Discovery Learning17
C.1) Pure Discovery Learning17
C.2) Combining Discovery Learning and Traditional Teaching Techniques18
D) Wireless Sensor Network Algorithms18
D.1) Center at Nearest Source19
D.2) Greedy Incremental Tree19
D.3) Cluster Node Formation19
D.4) Shortest Paths Tree19
E) Effectiveness of Software in Education19
VIII.PROJECT IMPLEMENTATION20
A) The Exam/Survey20
A.1) Knowledge20
A.2) Comprehension21
A.3) Application21
A.4) Analysis 21
A.5) Synthesis22
A.6) Evaluation22
B) The Application22
B.1) Overview22
B.2) Installation22
B.3) Using the Application23
IX.LESSONS LEARNED24
A) Deeper Understanding of Wireless Sensor Networks24
B) Educational Techniques24
B.1) Limitations of Discovery Learning24
B.2) Bloom’s Taxonomy24
C) New Technologies25
X.CHALLENGES25
A) Designing and Building the Application25
A.1) Interface Design25
A.2) Software Design25
A.3) Utilizing New Technology25
B) Researching and Understanding Educational Theory26
C) Creating a Meaningful Survey26
XI.MISTAKES MADE26
A) Assuming the Value of an Educational Theory Prior to Extensive Research26
B) Expecting Voluntary Student Participation Outside of the Classroom26
C) Not Enough Focus on Early Detailed Software Architectural Design27
D) Expecting Silverlight Development to be Similar to Java Swing Development27
XII.FUTURE WORK27
A) Additional Algorithms27
B) More Realistic and Complex Simulations27
C) Lesson Plan27
D) Integrate Survey with Application27
XIII.PROJECT DELIVERABLES28
XIVCONCLUSION28
XVREFERENCES29
XVIAPPENDIX32
A) Design Documentation32
B) User Documentation35
C) Software Requirements36
Benjamin Stroud – Wireless Sensor Network SimulatorPage 1 of 36
- MASTERS PROJECT GOAL:
To create a Wireless Sensor Network Simulator that will be used as a teaching aid to further a computer science student's understanding of a Wireless Sensor Network’s capabilities and limitations.
This tool will have an intuitive and approachable GUI that will educate rather than intimidate students who are interested in gainer a deeper appreciation of wireless sensor networks and the unique challenges they present.
This software learning tool will contain multiple approaches or algorithms for forming a wireless sensor network from which the student will be able customize by manipulating various variables within the context of the scenario.
The application will be simple to install and web accessible. Silverlight is the chosen technology to accomplish this goal. Later sections explore Silverlight in detail.
The project will result in an effective demonstration of wireless sensor network deployment, formation and execution in an educational context. The goal of the project is not to evaluate algorithms – as is discussed in later sections this has already been accomplished - but to further the Computer Science student’s understanding of this important topic.
To quantify the effectiveness of the project I will create a survey meant to gauge both the student’s understanding and their confidence level with the material in the wireless sensor networking lesson both before and after using the application, so that the Computer Science Educator can gauge the effectiveness of the application.
- INTRODUCTION
The project being proposed will create a Wireless Sensor Network Simulator which will function as an educational tool by clearly demonstrating the unique considerations of this type of network and presenting current approaches to address those considerations.
Wireless Sensor networks have recently become a topic of great interest to Computer Science researchers. This interest has largely been sparked by the dramatic drop in cost, size, and an increase in range and sensing capability of wireless sensor devices. These developments allow for a world where numerous, large, distributed networks of wireless sensors are a reality[18]. With this new reality comes a series of interesting computing challenges that will engage Computer Scientists in both the academic and commercial realms for years if not decades to come.
- BACKGROUND
A wireless sensor network is composed of many individual sensor “nodes”, sometimes referred to as “motes”, each with their own individual power, computing, environment sensing, and wireless communication hardware. The sensors are often scattered at random around a geographically diverse terrain and will then activate and begin to form communication networks with the intent of transmitting a complete “picture” of the environment back to a central location for analysis[18].
A wireless sensor network has much in common with a traditional mobile ad-hoc network, in that networks consisting of N nodes are formed organically and both involve multi-hop communications. It is the significant differences, however, which make wireless sensor networks such an interesting problem to study. Wireless sensor networks must deal with global considerations that arise from the limitations of the individual sensors. Since each sensor is completely wireless, it depends heavily on its personal power source. Once key nodes in the network begin to run out of power and die, then the entire network can be compromised. This power limitation leads to the conclusion that data transmission needs to be kept to a minimum (fewer packets sent means less power consumed). The pressure to minimize data in order to maximize the life span of the network leads to a desire to form the network in an intelligent way such that redundant data transmissions are minimized [18].
A “best” solution to these and many other interesting problems are not to be addressed within this project. My goal is simply to create a tool that will reflect and demonstrate these constraints and concerns in a tangible way, therefore educating and stimulating the user to consider how they would approach such solving problems.
- NEED
Because of this emerging area of computing, many educators in computer science wish to introduce the concepts of wireless sensor networks and the challenges they present to their students. As is often the case, software can aid us in this endeavor. A wireless network simulator that is interactive, intuitive, and easy to use can be a wonderful teaching tool for both beginner and advanced students. Unfortunately, most wireless sensor network simulators that exist today are intended for advanced and in-depth research and are therefore complex, cumbersome, and likely intimidating to a novice student[21][6][7].
My goal is to create an approachable and user friendly teaching tool that will allow students to discover and learn independently with minimal intervention from the educator. To accomplish this, the application will be written in Silverlight and accessible via the web with very little, if any setup required on the part of the user. Since the application will be web based, users will be able to run it from any machine with web access – even without administrative privileges. The application will allow users to select one of several algorithms for forming a network and also allow users to modify many variables affecting the network such as, but not limited to, node count, GPS capability, sensor range, and sensor power levels.
- PROJECT OVERVIEW
This project will be a thoughtfully designed, well commented, and object oriented application. It will consist of a GUI front end written using Microsoft Silverlight. The “back-end” code that will be doing most of the non GUI oriented work will be written in C#. The application will allow the user to select one of three (at minimum) methodologies for forming wireless sensor networks. The application will also allow the user to quickly and easily change key variables pertaining to the network such as node count and power level – more detail is presented below. Once the algorithm is selected and the parameters are chosen, then the application will demonstrate the random scattering of nodes, followed by the formation and subsequent lifespan of the network the user has configured. The application will be modular and will allow future developers to add additional network formation algorithms with minimal effort. The application will be web based and simple to install and configure.
The application will allow the user to modify via the GUI (at minimum):
- The Network Formation Algorithm
- Node count
- Node power level
- Node communication range
In addition to researching Silverlight and C# technology, I will be conducting research into the various proposed algorithms for forming wireless sensor networks. I will select at least three algorithms to implement and demonstrate in a step-by-step graphical manner within the proposed application.
An additional research area will be into the overall value and effectiveness of software in education was well as the value of discovery learning and how to balance directed and discovery learning in the classroom.
- SILVERLIGHT
A) Introduction
A.1)What is Silverlight?
Silverlight is a multi-platform application framework which allows for rich interactive multimedia on the front end with a powerful traditional application or web oriented back-end. The Silverlight platform is primarily designed for web based applications, but can support stand-alone desktop applications that run outside of a browser [34]. Its capabilities resemble those of Adobe's Flash product who is its most direct competitor. In later sections I present some comparison data contrasting both platforms.
A. 2) Brief History of Silverlight
Silverlight was first released in early 2007 by Microsoft[33]. It was originally called Windows presentation Foundation / Everywhere [17]. The first version was somewhat limited in capability and only supported JavaScript to drive its user interfaces. It was a unique solution in that developers could make rich internet applications that were compatible with Microsoft's multimedia technologies (Windows Media Services)[17], but with the lack of a robust language to drive the back end, it had limited success.
Version 2 of Silverlight addressed this issue by vastly expanding the languages that could be used with Silverlight. The second version of Silverlight supported the .NET Framework and .NET compliant languages such as C#, Visual Basic, Python, and Ruby [17]. By moving in this direction Silverlight was able to further distinguish itself from similar technologies by offering the developer a very powerful back-end application oriented framework that could accomplish very complex and data intensive tasks with a dynamic web oriented front-end GUI. Version 3 and 4 have built on this idea and have focused on improving the speed and power of the platform.
B) Exploration of How Silverlight Works
B.1) Overview
Silverlight web application is a compiled, client executed component that is downloaded when the web page with the embedded Silverlight application is accessed. The client user must have a Silverlight browser plug-in installed to use the application. The server does not require any special software if no server side functions are included in the program [29].
B.2)Architecture
The Silverlight platform consists of two main components with an additional installer/updater module. These two components are the Core Presentation Framework and the .NET Framework for Silverlight [29].
The Core Presentation Framework consists of all the components and services that Silverlight needs to present the GUI of the application. This includes user input, interface interaction and manipulation, media control, Digital Rights Management (DRM), vector graphics, text, and images. This framework also includes the specialized XML used to specify the application's GUI layout XAML (Extensible Application Markup Language) [29].
The .NET Framework for Silverlight is a subset of Microsoft's full .NET Framework which allows for the use of .NET compatible languages as mentioned above. This module includes base class libraries, networking, data integration, and the Common Language Runtime (CLR). The CLR is the heart of the .NET solution. It provides the execution environment for .NET applications including memory management, garbage collection, type checking, exception handling and more[29]. At compile time the .NET compatible languages are converted into a Common Intermediate Language which is then Just In Time compiled at runtime. This abstraction allows for multiple languages to be used within the same application[8].
The installer/updater module simply provides a mechanism for the Silverlight application to be installed on the client's system the first time the application is accessed and provides an avenue for subsequent updates.
Figure 1 is a graphical representation of the Silverlight architecture. I will explore some of the details of the components in the following paragraphs.
B.2.a) Components of the Presentation Core: The Presentation Core includes the UI core, which manages the UI rendering of vector graphics, images, animations, and text. The Media component allows for the management and playback of various formats, most notably for users of Windows Media Services (which is a component of Windows Server) the WMA or windows media formats [29]. This allows for greater flexibility for those who are already using Windows Server for their server platform.
The Presentation Core also provides modules that handle the Digital Rights Management of media, the linking of data objects to UI components, and a XAML parser which is used to interpret the XAML based layout specification of the UI. The XAML code is also the primary way that the .NET framework interacts with the Presentation Layer. It allows for the programmatic manipulation of the UI via .NET compatible languages [29].
B.2.b)Components of the .NET Framework: The .NET Framework component of Silverlight is what gives it the vital ability to support true application level development using languages and tools that many developers are already familiar with. The CLR or Common Runtime Language execution engine is the key component that gives the Framework its power. The .NET component also includes a Dynamic Language Runtime or DLR which allows for the execution of scripting languages such as JavaScript, Iron Ruby or Iron Python. This component also includes a plug in interface to allow the use of other scripting languages with Silverlight [29].
One of the other tools laid out in the above diagram include the BCL or Base Class Library which provides useful programming modules such as threading, string handling, collections and even some cryptography libraries [29].
The .NET Framework also includes the WPF (Windows Presentation Foundation) controls which include GUI oriented buttons and interfaces designed to simplify the development of GUI driving applications [29].
The WCF or Window Communication Foundation gives the developer tools to manage remote data and services. It includes HTTP request and reply objects, an embedded browser object, support for RSS/Atom feeds, as well as support for JSON (JavaScript Object Notation)[15], POX (Plain Old XML)[25], and SOAP (Simple Object Access Protocol) [20] services. This module also includes support for cross domain HTTP requests [29].
The Silverlight .NET Framework also includes a Data module which attempts to simplify the process of working with different sets of data from different sources. It also allows data to be handled via XML and serialization classes[29].
The GUI elements of the Silverlight application are programmatically managed by the .NET Framework portion of the application, but they can also be managed via an external tool also created by Microsoft called Expression Blend which allows for a visual manipulation of the GUI elements and animations used in building an application[29]. The next section explores in more detail how applications are created using tools such as Expression Blend in combination with tools such as Visual Studios.
C) Building an Application with Silverlight
C.1) Development Environments:
A developer has several options when considering which development environment to use to build a Silverlight application. This paper explores the three most prominent options, the free, open source solution from Eclipse, or the closed source pay version of Microsoft's Visual Studios 2010 and Microsoft's Expression Blend. A exploration of both solutions is presented in the following paragraphs.
C.1.a) Eclipse4SL: The open source solution is called eclipse4sl (Eclipse for Silverlight). It is built on top of the existing Java based IDE Eclipse which is very popular in the open source world, especially in the Linux community. This plug-in however, is only available for Windows and Mac users so this implementation does not allow for Linux based development. The goal of this project is to not only provide a free open source IDE for developing Silverlight applications, but also to also improve the way that data is exchanged between Java based web services and Silverlight. The plug-in does not add Java as a supported language for Silverlight development, but it does make exchanging data with existing external Java based applications easier [11].
The major advantages of this IDE for Silverlight development is that it is free and open source. The biggest disadvantage of this solution is that it will always be a bit behind Microsoft’s products in the versions of Silverlight that it supports. Currently it only supports Silverlight Version 2 (version 4 was recently released). Silverlight 3 support is still in development. It also does not support all of the .NET languages that can be used to develop Silverlight applications; it supports mainly C# and JavaScript [11].
C.1.b)Visual Studios: Visual Studios is Microsoft's flagship IDE. It is, not surprisingly, the recommended development environment for Silverlight applications. Like Eclipse4SL it is primarily intended for writing the programmatic elements of the application. It supports all the .NET languages that can be used by Silverlight and its debugging capabilities support Silverlight applications[30].