USF Libraries
USF Digital Collections

A platform for research on localization and tracking using wireless sensor networks

MISSING IMAGE

Material Information

Title:
A platform for research on localization and tracking using wireless sensor networks
Physical Description:
Book
Language:
English
Creator:
Rupanagudi, Sai Kiran
Publisher:
University of South Florida
Place of Publication:
Tampa, Fla
Publication Date:

Subjects

Subjects / Keywords:
Robotic platforms
Crickets
Stargate
Mapping
Trilateration
Dissertations, Academic -- Electrical Engineering -- Masters -- USF
Genre:
bibliography   ( marcgt )
theses   ( marcgt )
non-fiction   ( marcgt )

Notes

Abstract:
ABSTRACT: This research proposed the integration of wireless sensor networks, a mobile platform and a fixed station for the development of a test bed system to conduct research on localization, tracking, navigation and network mapping. The overall integrated system acts as a basis for future research on localization of wireless nodes in an indoor environment. The system enables the transfer of information from the sensor node on the platform to a distant computer through wireless communication. In addition, a robotic platform is proposed that uses the developed integrated system as well as other potential applications. The user interface to the system was developed using MATLAB and provides for tracking of the mobile platform. The application also possessed an option to simulate the output of Trilateration when using a setup similar to the one implemented for this research.
Thesis:
Thesis (M.A.)--University of South Florida, 2006.
Bibliography:
Includes bibliographical references.
System Details:
System requirements: World Wide Web browser and PDF reader.
System Details:
Mode of access: World Wide Web.
Statement of Responsibility:
by Sai Kiran Rupanagudi.
General Note:
Title from PDF of title page.
General Note:
Document formatted into pages; contains 70 pages.

Record Information

Source Institution:
University of South Florida Library
Holding Location:
University of South Florida
Rights Management:
All applicable rights reserved by the source institution and holding location.
Resource Identifier:
aleph - 001795299
oclc - 150900807
usfldc doi - E14-SFE0001557
usfldc handle - e14.1557
System ID:
SFS0025875:00001


This item is only available as the following downloads:


Full Text
xml version 1.0 encoding UTF-8 standalone no
record xmlns http:www.loc.govMARC21slim xmlns:xsi http:www.w3.org2001XMLSchema-instance xsi:schemaLocation http:www.loc.govstandardsmarcxmlschemaMARC21slim.xsd
leader nam Ka
controlfield tag 001 001795299
003 fts
005 20070703101145.0
006 m||||e|||d||||||||
007 cr mnu|||uuuuu
008 070703s2006 flu sbm 000 0 eng d
datafield ind1 8 ind2 024
subfield code a E14-SFE0001557
040
FHM
c FHM
035
(OCoLC)150900807
049
FHMM
090
TK145 (ONLINE)
1 100
Rupanagudi, Sai Kiran.
2 245
A platform for research on localization and tracking using wireless sensor networks
h [electronic resource] /
by Sai Kiran Rupanagudi.
260
[Tampa, Fla] :
b University of South Florida,
2006.
3 520
ABSTRACT: This research proposed the integration of wireless sensor networks, a mobile platform and a fixed station for the development of a test bed system to conduct research on localization, tracking, navigation and network mapping. The overall integrated system acts as a basis for future research on localization of wireless nodes in an indoor environment. The system enables the transfer of information from the sensor node on the platform to a distant computer through wireless communication. In addition, a robotic platform is proposed that uses the developed integrated system as well as other potential applications. The user interface to the system was developed using MATLAB and provides for tracking of the mobile platform. The application also possessed an option to simulate the output of Trilateration when using a setup similar to the one implemented for this research.
502
Thesis (M.A.)--University of South Florida, 2006.
504
Includes bibliographical references.
516
Text (Electronic thesis) in PDF format.
538
System requirements: World Wide Web browser and PDF reader.
Mode of access: World Wide Web.
500
Title from PDF of title page.
Document formatted into pages; contains 70 pages.
590
Adviser: Wilfrido A. Moreno, Ph.D.
653
Robotic platforms.
Crickets.
Stargate.
Mapping.
Trilateration.
690
Dissertations, Academic
z USF
x Electrical Engineering
Masters.
773
t USF Electronic Theses and Dissertations.
4 0 856
u http://digital.lib.usf.edu/?e14.1557



PAGE 1

A Platform for Research on Localization and Tracking Using Wireless Sensor Networks by Sai Kiran Rupanagudi A thesis submitted in partial fulfillment of the requirements for the degree of Master of Science in Electrical Engineering Department of Electrical Engineering College of Engineering University of South Florida Major Professor: Wilfrido A. Moreno, Ph.D. Miguel Labrador, Ph.D. James Leffew, Ph.D. Date of Approval: March 27, 2006 Keywords: robotic platforms, cricke ts, stargate, mapping, trilateration Copyright 2006, Sai Kiran Rupanagudi

PAGE 2

DEDICATION This thesis is dedicated to my family. Th e support of my family has always been the source of inspiration for my life.

PAGE 3

ACKNOWLEDGEMENTS I wish to express my sincere appreciati on to my major professor, Dr. Wilfrido Moreno, for his valuable guidance and support du ring this research. I thank Dr. Miguel Labrador and Dr. James Leffew for agreeing to serve on my supervisory committee. Special thanks are extended to the Wireless Sensor Network Group In particular, I thank Mauricio Castillo for helping me on various issues thr oughout my research. I thank my friends for their support and encouragement throughout this research.

PAGE 4

i TABLE OF CONTENTS LIST OF TABLES.............................................................................................................iv LIST OF FIGURES.............................................................................................................v ABSTRACT......................................................................................................................v ii CHAPTER 1 INTRODUCTI ON AND MOTIVATION.....................................................1 1.1 Introduction........................................................................................................1 1.2 Localization........................................................................................................2 1.2.1 Active Badges.....................................................................................3 1.2.2 Laser....................................................................................................3 1.2.3 Ultrasound...........................................................................................3 1.2.4 Global Positioning System, (GPS) .....................................................4 1.2.5 Radio Signal Strength Index, (RSSI) .................................................4 1.3 Overview of the Cricket System........................................................................5 1.4 Research Motivation..........................................................................................6 CHAPTER 2 BACKGROUND...........................................................................................8 2.1 Related Work.....................................................................................................8 2.2 Mobile Platforms.............................................................................................12 2.3 Understanding the Crickets..............................................................................14 2.3.1 The Crickets......................................................................................14

PAGE 5

ii 2.3.1.1 Operation of a Beacon.......................................................14 2.3.1.2 The Listener.......................................................................15 2.3.2 Component Graphs...........................................................................17 2.3.2.1 Cricket Component Graph.................................................18 2.3.2.2 Other Aspects of CricketM................................................21 2.3.3 Operation of the Cricket Application................................................22 2.3.3.1 Initialization Phase.............................................................22 2.3.3.2 Start-up Phase....................................................................23 2.3.3.3 Stop Phase..........................................................................23 2.3.3.4 Sending and Receiving a Beacon Message........................23 2.3.3.5 Calculations........................................................................24 2.3.3.6 Storage of Values...............................................................25 2.3.3.7 Serial Communication.......................................................25 2.4 Trilateration......................................................................................................26 CHAPTER 3 SYSTEM ARCHITEC TURE AND IMPLEMENTATION........................29 3.1 Proposed System Architecture.........................................................................29 3.2 Listener Stargate Interface.............................................................................30 3.3 Stargate Computer Interface Using the 802.11.............................................32 3.3.1 Accessing the Stargate Through a Remote Wireless Connection.....32 3.3.1 Communicating With the Cricket from a Remote Computer...........35 3.4 Powering the Stargate......................................................................................36 3.5 MATLAB GUI, (Graphical User Interface)....................................................36 3.5.1 Using Real Time Data.......................................................................38

PAGE 6

iii 3.5.2 Simulation.........................................................................................39 3.6 The System as a Whole....................................................................................43 3.7 Testing System Accuracy, Precision and Tracking Speed...............................44 3.8 The Complete Proposed Platform....................................................................48 3.9 Possible Uses of the Proposed System............................................................50 CHAPTER 4 CONCLUSION AND FUTURE WORK....................................................53 4.1 Conclusion.......................................................................................................53 4.2 Future Work.....................................................................................................54 REFERENCES..................................................................................................................55 APPENDICES...................................................................................................................58 Appendix A TOS_Msg..........................................................................................59 Appendix B Pin Configuration of th e 51-Pin Connector on the Stargate..............60 Appendix C User Guide for the Developed System..............................................62

PAGE 7

iv LIST OF TABLES Table 1: Experimental Results..........................................................................................48 Table 2: Pinouts of the Stargate Mote Connector.............................................................61

PAGE 8

v LIST OF FIGURES Figure 1: Localization Using the Spotlight System, [25] ..................................................3 Figure 2: The Cricket Mote ................................................................................................5 Figure 3: Depiction of a Context Aware System ...............................................................6 Figure 4: Active and Passive Mobile Architectures, [9] ....................................................9 Figure 5: Lego Mindstrom Robot With the Stargate and Mica Motes, [10] ....................10 Figure 6: The Garcia Robot, [11] .....................................................................................11 Figure 7: Stargate Network Gateway ...............................................................................12 Figure 8: Time Difference of Arrival Procedure, (TDOA) ..............................................16 Figure 9: Operation of the Crickets .................................................................................16 Figure 10: Component Graph for the Cricket Application ..............................................18 Figure 11: Basic Diagram of the System .........................................................................30 Figure 12: The 51-Pin Connector ....................................................................................31 Figure 13: Compact Flash Card .......................................................................................32 Figure 14: HyperTerminal Displaying the Wireless Settings of the Stargate ..................33 Figure 15: Testing the Wireless Conn ection Established With the Stargate ...................34 Figure 16: Cywin Session Showi ng the Stargate Command Prompt ..............................35 Figure 17: Flowchart of the MATLAB Application Developed for Localization ...........37 Figure 18: An Experiment Using the Developed System ................................................39

PAGE 9

vi Figure 19: PDF of the Intervals Between th e Transmissions of Two Successive Beacon Pulses When Using One Beacon ........................................................40 Figure 20: PDF of the Intervals Between th e Transmissions of Two Successive Beacon Pulses When Using Three Beacons ...................................................40 Figure 21: The Actual Position, (g round truth), of the Random Motion .........................42 Figure 22: The Results of Trilateration Using Distance ..................................................42 Figure 23: The Filtered Result of the Trilateration ..........................................................43 Figure 24: The Developed System a nd an Experiment Using the System ......................44 Figure 25: Test for Stationa ry Accuracy and Precision ...................................................45 Figure 26: Variation in the Trilaterated Output ...............................................................45 Figure 27: Testing Accuracy and Precision During Motion ............................................46 Figure 28: Testing the Tracking Speed ............................................................................47 Figure 29: Experiment With Motion along a Curved Path ..............................................48 Figure 30: The PPRK Robotic Base, [17] ........................................................................49 Figure 31: Brainstem Se rvo Controller Connected to the Stargate, [17].........................50 Figure 32: Simulation With Rando m Deployment of the Crickets ..................................51 Figure 33: Result of a Signal from the Fixed Station to the Stargate ...............................64 Figure 34: Wireless Settings on the Stargate ....................................................................65 Figure 35: Stargate Wireless Login and Cricketd .............................................................66 Figure 36: Data from the Beacon With ID USF-1 ............................................................68 Figure 37: MATLAB Application ....................................................................................69

PAGE 10

vii A PLATFORM FOR RESEARCH ON LOCALIZATION AND TRACKING USING WIRELESS SENSOR NETWORKS Sai Kiran Rupanagudi ABSTRACT This research proposed the integration of wireless sensor networks, a mobile platform and a fixed station for the developmen t of a test bed system to conduct research on localization, tracking, navigation and network mapping. Th e overall integrated system acts as a basis for future research on lo calization of wireless nodes in an indoor environment. The system enables the transfer of information from the sensor node on the platform to a distant computer through wi reless communication. In addition, a robotic platform is proposed that uses the developed integrated system as well as other potential applications. The user interface to th e system was developed using MATLAB and provides for tracking of the mobile platform. The application also possessed an option to simulate the output of Trilateration when usi ng a setup similar to the one implemented for this research.

PAGE 11

1 CHAPTER 1 INTRODUCTION AND MOTIVATION 1.1 Introduction In this thesis a platform is described that acts as a basis for future research on the localization of wireless nodes in an indoor environment. The platform enables the transfer of information from the wireless node on the platform to a distant computer through wireless communication. Wireless Sensor Networks, with their huge potential to influence a wide range of fields in the near future, has become a major area for research. With everyday improvements in the technology a ssociated with this field, th e list of applications using wireless sensor networks is on an exponen tial rise. However, a major concern that industry and the research community is trying to address is Lo calization of the network. The knowledge of the position of each node woul d greatly enhance various aspects of the network. A position aware network can be of great use for improving network performance and finding the location of a node where some event has occurred. The vision of ideal localization will provide the ability to address each node with its position in physical space. The problem of localization has been addressed in a different form for locating aircraft and, currently, even cars. However, the problem of localization in the case of wireless sensor networks is still in the research stage and a comprehensive solution is not available. The possibility of the use of wireless sensor networks, in most

PAGE 12

2 fields, in the near future makes a strong case for research on localization of such networks. 1.2 Localization The problem of localization of a network or even a node is concerned with the ability of a node or network to determine its current location with respect to the given surroundings. This problem can be approach ed in from several points of view. The process of determining the positions of i ndividual nodes can be defined by three basic procedures, [26]: 1. Determine the distances between unknown and anchor nodes, 2. Derive for each node a position from its anchor distances, 3. Refine node positions using inform ation about the range, (distance), to and positions of neighboring nodes. Each of these procedures has developed in to independent resear ch areas. Various technologies have been proposed to find th e distances between nodes. These distance measuring systems include: The Spotlight system, [25], The Active Badges, [24], The Active Bats, [23], The Cricket System, [1]. All these technologies are based on the us e of lasers, ultrasound, GPS and RSSI measurements.

PAGE 13

1.2.1 Active Badges system The Active Badges uses infrared for obtai ning cellular proximity readings, [24]. This was one of the first badge systems devel oped for indoor use. However, this system could now be considered obsolete. 1.2.2 Lasers The use of lasers for localization is a cost intensive option and requires special equipment for implementation. The Spotlight system uses an airborne node equipped with a laser. The laser ge nerates light events that are sensed by nodes on the ground, which send out a message to the airborne node, [25]. The nodes on the ground are assigned coordinates through a re ply message. This localizati on procedure is pictured in Figure 1. Figure 1: Localization Using the Spotlight System, [25] 1.2.3 Ultrasound Ultrasound was initially used in the Activ e Bats system for localization, [23]. However, new cricket systems have been de veloped that utilize the method of Time 3

PAGE 14

4 Difference of Arrival, (TDOA), to measure distances between nodes, [1]. Ultrasound based localization procedures, especially for indoor applications, have found favor within the research community. The associated system crickets were used in this research for development of the localization platform. A detailed functional description of the crickets is presented in sections specifically related to the topic. 1.2.4 Global Positioning System, (GPS) The GPS system uses the time taken for a signal transmitted from a satellite to reach the receiver on the ground as a measure of the distance. Once signals from three satellites are received, triangulation is performed using the known position of the satellites to determine the ex act latitude and longitude c oordinates of the receiver. However, the GPS system is extremely power intensive. In addition, GPS cannot be used indoors and is highly error prone in metr opolitan areas with high rise structures. 1.2.5 Radio Signal Strength Index, (RSSI) This localization procedure, due mainly to its simplicity, has captivated the interest of a large po rtion of the research community. This method uses the radio signal strength as an indicator of the distance be tween the two nodes in consideration. However, the radio signals are susceptible to interf erence and complex fields of distribution. Systems developed using such a procedure n eed to be calibrated repeatedly due to changing fields. Some researchers have sugge sted that it would neve r be possible to use this technology, in its current form, for accura te localization, [27]. However, methods

PAGE 15

have been suggested for controlling the envi ronment, which would provide an increased degree of accuracy, [28]. 1. 3 Overview of the Cricket System The cricket mote was developed as a part of Project Oxygen, which was supported by large enterprises such as Acer Nokia, Philps, HP and DARPA, [22]. The vision or goal of Project Oxygen was to have pervasive, sensor-based, computing environments. The crickets use the method of Time Difference of Arrival, (TDOA), to arrive at distance measurements. The crickets employ a combination of RF and ultrasound pulses to arrive at distance measurements. Figure 2: The Cricket Mote A cricket is a wireless sensor node with the capability of m easuring distance to other crickets. Crickets are built on the same platform as the now widely used Berkeley motes, [29]. They can be used to form a network of wireless sensor nodes that can 5

PAGE 16

communicate with each other and possess the additional advantage that the distances between any one node and the other nodes can be measured, which aides in the localization of the network. Such networks have been used under controlled conditions in order to demonstrate various localization algorithms, [6]. 1.4 Research Motivation Consider the scenario where everyone lives in a world of context aware applications. The television nearest to a pers on displays that persons choice of channels. The person is carrying a PDA like device, which displays the location of different people, which are in the same building, from its phone book. Robots are available, which are able to navigate freely to bring a requested style of lunch. A PDA also provides directions for navigating in unfamiliar situations such as providing nearest exit information when in attempting to leave an unfamiliar building. A de piction of this scenario is presented in Figure 3. Figure 3: Depiction of a Context Aware System 6

PAGE 17

7 Such a scenario may sound like science fi ction. However, the current rate of development of the wireless sensor network fi eld is fuelling such visions. Practically, there is a need to develop systems that are context awar e in both indoor and outdoor environments. The necessary first step in realizing context aware systems is the development of the ability to to accurately localize the sensor nodes, which already have the ability to communicate among themselves. This served as the main motivation for this research, which provided a basic plat form for research on various aspects of localization techniques to s upport on-going efforts related to the design of context aware systems. This thesis is dedicated to a detailed desc ription of the locali zation platform that was developed during this rese arch. Architecture for a mob ile robot is suggested, which uses such a system. In addition, an analysis of the possible uses for the system is presented.

PAGE 18

8 CHAPTER 2 BACKGROUND In this chapter, previous work related to the development of mobile localization platforms is discussed. In addition, a discrete description of the components that were used in the system is presented. 2.1 Related Work The idea to build robots or platforms us ing motes has been around ever since the technology was envisioned. Sibl ey et al., in their paper on Robomote used motes as controllers for tiny robots, [8]. However, given the constraints of the processing capabilities available and the current battery life of the motes such a network of small robots, which was discussed in the Sibley paper, is not very feasible. Adam Smith et al., defined two types of architectures for localization, [9]. An active mobile architecture is defined as the architecture of a system with moving devices that emanate signals and a netw ork of fixed receivers that es timate the distances. Such architectures would suit centralized systems for localization. A passive mobile architecture consists of a mobile platform that calculates distance estimates from the signals received from a fixed network. Basic diagrams, illustrating the architectures of active and passive networks are presented in Figure 4.

PAGE 19

Figure 4: Active and Passive Mobile Architectures, [9] The passive mobile architecture scales we ll when compared to the active mobile architecture. The passive mobile architecture was used in the system during this research. In the Smith paper a hybrid system is also described. The hybrid system also detects a bad state in the reception of signals from th e overlaying network and emits a chirp to find distance estimates from the network. Th erefore, the hybrid system possesses an active and a passive mode of operation. The use of such a network is currently an area of active research. Bulusu et al., used a stargate for localiz ation using RSSI meas urements, [10]. The stargate was mounted on top of a Lego Minds torm robot. The Lego Mindstorm robot is pictured in Figure 5. 9

PAGE 20

Figure 5: Lego Mindstrom Robot With the Stargate and Mica Motes, [10] A similar configuration was utilized duri ng this research. In this research, crickets were utilized instead of regular motes. However, the use of RSSI measurements was still not precise due to various sources of interference that exist in indoor wireless channels. Also the calculations required to arrive at a reasonable estimate for the location of the robot are computationa lly intense and require excessive convergence times, which are of the order of 2 minutes, when running on a stargate. The Bulu su configuration can be used for delay tolerant networks. Howeve r, it would not be suitable for real time applications such as thos e described in section 1.4. The Garcia robot is pictured in Figure 7. The Garcia robot uses a stargate as its central control along with various other sens ors for its movement, [11]. Using these robots for research would significantly increas e the fiscal burden as compared to the system developed during this research. Additionally, the Garcia robot lacks the degrees of freedom of motion possessed by the Palm P ilot Robot Kit, (PPRK), base unit, which was used in this research. 10

PAGE 21

Figure 6: The Garcia Robot, [11] Peter Corke et al., in their paper C oordinating Aerial Robots and Sensor Networks for Localization and Navigation, ( 2004), described the use of a flying robot, which was connected to a mote, to aid in lo calization and navigation using sensors on an underlying network of nodes, [12]. Corke used a Pentium-III based Linux machine to operate the robot and connected the mote throug h a serial port. Powerful processing units such as the Pentium-III may be required for us e in platforms that control a flying robot. The purpose of this research was the developm ent of a less powerful system to perform a similar localization function was intended. In their document Experiments with Robots and sensor networks for Mapping and Navigation, Keith Kotay et al., described the use of an ATRV-Mini robot extended with a mote sensor for navigation through de bris using navigation maps developed from the sensor readings, [2]. These papers discussed above were concer ned with systems that utilized mobile robotic platforms with sensor networks. A similar platform was utilized during this research. 11

PAGE 22

2.2 Mobile Platforms Small mobile computing units, which are configured with a range of communication capabilities such as PDAs and a Stargate, are being used as controllers for mobile robotic units, [10], [11], [13]. The stargate, see Figure 4, is a fully functional Linux device and was chosen for the system due to its current availability. In addition, the stargate possesses the ability to function as a network gateway for a wireless sensor network using Mica motes, [29]. The starga te possesses certain features that are not available with conventional PDAs such as the USB and the Ethernet connectors. The various features of the stargate, which were used for the proposed robotic platform, are discussed in this section. The stargate used during this rese arch is pictured in Figure 7. Figure 7: Stargate Network Gateway The stargate hosts a range of peripherals The peripherals can be connected to build a variety of systems. The stargate is made up of two boards, which are termed the mother board and the daughter board. The Ar m processor, which is the main processing unit of the stargate, is located on the mother board. The mother board also has other 12

PAGE 23

13 peripherals such as the PCMCIA slot and the compact flash card slot. The daughter board possesses a processing unit that handles the various communi cation peripherals. The motes connect to a 51-pin female connect or on the motherboard that connects to and a 51 pin male connector, which is used for communication with the daughter board. The daughter board possesses onboard peripherals th at deal with other communication ports that form a part of a complete stargate. The stargate has a seri al, RS232, connector that provides a connection to a computer through a Null Modem cable. Such a configuration provides a view of the console during a hyper terminal session. In addition, the daughter board possesses a USB connector, which can be used to connect devices such as a webcam or additional memory sticks as storage devices. This capability was implemented in the ROSA, (Rapid Organizatio n and Situation Assessment), project, [7]. The stargate also possesses an Ethernet por t to connect the stargate in a LAN or to the internet. The JTAG port on th e daughter card is used primarily to install a completely new version of the boot loader. The boot loader must be installed prior to the installation of the operating system. In the event the boot loader already exists, the existing operating system can be removed and a new one in stalled through the RS232 connection to the computer. The daughter also possesses two pi ns to connect a battery in order to supply power to the entire stargate. However, th e Power Jack present on the daughter board is most often used to power the stargate.

PAGE 24

14 2.3 Understanding the Crickets The crickets are TinyOS based and were developed using the Mica Mote as a platform. TinyOS is an operating system de veloped for running on the motes, which are limited by their memory, processing capability a nd power consumption capabilities, [14]. TinyOS was developed with the use of a language called ne sC, which was developed at University of California, Berkeley. The ma jor parts of any TinyO S application are the various component blocks required to build th e application. For any TinyOS application there are two types of components that n eed to be understood or constructed. The required components are: 1. The Configuration files, 2. The Module Files. The configuration file in Ti nyOS is a file that contains code for binding together different components, which are used to deve lop the system. Therefore, an application can be developed by simply using different c onfiguration files that are already present. The Module file consists of the actual im plementation of various functions that it provides to other files, which are co nnected through the configuration file. 2.3.1 The Crickets 2.3.1.1 Operation of a Beacon A beacon sends out an RF pulse and im mediately afterwards sends out an ultrasound pulse. The difference in time requi red for the pulses to reach the receiver is used as a measure of the distance between them. The beacon employs random back-off to avoid collisions of pulses. Back-off requi res the beacon to listen for a short duration of

PAGE 25

15 time before sending out an RF pulse. If dur ing this period, any pulse is received, the beacon reschedules its RF pulse transmissi on by a random time period and the repeats the process. 2.3.1.2 The Listener Meanwhile, the listener, as the name suggests, listens all the time. When the listener receives an RF pulse it waits for the ultrasound pulse from the beacon. The possibility of an ultrasound arrival from a di fferent beacon is very remote, since the RF pulses from the different beacons must precede their ultrasound pulses. In the event that an RF pulse from a second beacon is received prior to the arrival of the ultrasound pulse emitted by the first beacon, the timers are reset. Resetting of the listener timer precludes any measurements for a period of time equal to twice the ultrasound time of flight. When the ultrasound pulse is received, the listener uses the difference in time between the reception of the Ultrasound pulse and the RF pulse as a measure of the distance between the beacon and the listener. For small distan ces, the time taken by the RF pulse to reach another node is negligible with respect to the time taken by th e ultrasound pulse. Therefore, the time of flighe of the RF pulse is to be zero. The difference between the time of arrival of the RF and Ultrasound pul ses, which are used as a measure of the distance between the beacon and the lis tener as illustrated in Figure 8.

PAGE 26

Figure 8: Time Difference of Arrival Procedure, (TDOA) Various adjustments in the distance calcula tions, which are used to arrive at a more precise value for the distance between a beacon and a listener, are required. The adjustments incorporate the delay incurred due to processing and changes in the speed of sound associated with the ultrasound. Th e basic operation of a cricket beacon and listener is presented in Figure 9 Figure 9: Operation of the Crickets 16

PAGE 27

17 2.3.2 Component Graphs A component graph can be generated in TinyOS to show the manner in which various components are connected to form the entire system from the top level configuration file in the application. A component gra ph of the cricket application is presented in Figure 10. The application is open source and available for download from the internet, [30].

PAGE 28

Figure 10: Component Graph for the Cricket Application 2.3.2.1 Cricket Component Graph 18 CricketM is the component that controls the functioning of all other components in the cricket application. Functions such as turning on the required LEDs, completing

PAGE 29

19 the structure of the message to be sent if th e cricket is a beacon and enabling or disabling the RS-232 chip are implemented in this com ponent. CricketM monitors all the functions of the cricket, which are sub-components of CricketM. A complete explanation of the function of CricketM is presented after the analysis of all the sub-components of the system. The simple time component is used by the cricket to keep a measure of the amount of time that the system has been in the on condition. The simple time component uses the TimerC component, which ac ts as the base for various times that can be implemented. The internal is used to read and write data to the EEPROM of the cricket. The actual application and the current configuration are st ored in the EEPROM. EEPROMC is utilized if the current settings for the cric ket have been changed and the change is to be stored permanently. For example, crickets that are configured as lis teners can have their configuration changed to make them act as beacons. However, if the cricket configuration is not saved to the EEPROM the cricket will return to being a listener when it is rebooted. The SerialId component is used to retrie ve the hardwareId of the cricket when required. ThSerialId component is utilized when the user requests information. Such requests can be honored when the cricket is connected to the computer through an RS232 connection or wirelessly. The UltrasoundControlM component is one of the most important subcomponents of the cricket. It is used to control the sending and se nsing of the ultrasound signals from the crickets. The Ultras oundControlM responds to commands from

PAGE 30

20 CricketM to start or stop the de tector, to send a pulse, to se t the gain and also sends out messages when a pulse is detected or the detector hastimed out. The Onboardtemp component is used primarily to compensate for changes in the speed of sound due to a change in the ambien t temperature. However, the Onboardtemp component can be used strictly as a pur e temperature sensor. The Onboardtemp component is used only if there is an onboard sensor, which was not the case with the current crickets. The Onboardtemp compone nt accesses the ADC component in order to retrieve readings from the sensor. BeacManageM is another major sub-component that is used to manage the crickets in the beacon mode. This component is used to set the beacon Id and to reset the beacon Id. The BeacManageM component also retrieves measurements from the beacons, which are displayed for the user if the component is connected to a computer. In addition, BeaconManageM stores a list of beacons that were detected during the initial sensing phase in order to avoid collisions. An age timer is used to manage the stored list of beacons. The RandomLFSR component is used to gene rate the random number that acts as the timer period for the beacon to transmit. This component is also used for the random backoff procedure when a collision is detect ed during the initial listening phase of a beacon. The SerialM component is used as an inte rface to send readings and to monitor or alter the cricket function when it is connected through the serial port. It is also used to set the receive buffer size for the serial connection. The SerialM component uses

PAGE 31

21 HPLUARTC, which is a standard system comp onent to control the actual hardware for sending and receiving data. The RadioCRCPacket component is used to send and receive the messages that are sent out or received pr ior to the Ultrasound pulse. This component uses other standard system components to actually send out a message. The form of the message that is sent is derived from the normal TOS_ Msg structure, which is the standard message structure in wireless sensor networks that use TinyOS. TimerC, LedsC and HPLUARTC are all standard system components of TinyOS that are used by the various components. 2.3.2.2 Other Aspects of CricketM When the application is downloaded to the crickets they are configured as listeners by default. Their operation can be changed to beacon-mode. The cricket configuration is set with the de fault mode as listene r through the instance of the structures CricketConfig_s and CricketConfig Various global constants such as the speed of sound and the maximum number of beacons are declared in the Cricketconfig global configuration. The values of the constant s retrieved from a header file termed Cricket.h The beacon message, which is the RF signal th at is sent out by the beacon before the emission of the ultrasound pulse is named beaconmsg and is and instance of the structure TOS_Msg, see Appendix A. The beacon message follows the active message model, which is characterisitic of the li nk layer protocol in TinyOS. A structure Becondata is an instance of the structure CricketBeacon, which is found in Cricket.h contains the space identificat ion of the beacon and the XYZ

PAGE 32

22 coordinates, if assigned, of th e beacon by the user. The data related to a Beacon is stored in the data field of the beaconmsg. 2.3.3 Operation of the Cricket Application 2.3.3.1 Initialization Phase This initialization phase is started when the cricket is first activated. The phase is activated by a command from Main to start th e initialization of vari ous components. The crickets components that ar e initialized include the Leds, the on-board RS-232, the random number generator, the radio control, the serial port and the on-board temperature sensor if it exists. The cricket has another sw itch, which can be used to turn on or off the on-board RS-232 in order to save power. However, this switch has to be changed before the initialization phase. Prior to activation of the cricket the positi on of the power save switch is checked to insure that the RS-232 chip, on the cricket, will be enabled or disabled as desired. This is especially useful for saving power when the beacons are placed in the ceiling. The beacons need not be connected to the computer and can be disabled through the use of the power save sw itch. In the initialization phase the beacon message is prepared and the structure of the message is defined on the TOS_Msg structure, see Appendix A. The structure of the message contains the length of the message and the address where the message ha s to be sent to, wh ich is the Broadcast address in most cases. Once the initializati on phase is successfully completed, a report is sent to the Main and th e start-up phase begins.

PAGE 33

23 2.3.3.2 Start-up Phase The start-up phase is initiated after the initialization phase when the application receives the start command from the Main. In this phase, various functions, which are designated by the configuration of the cricket, are started. The use of the temperature sensor, if it exists, and the run-mode, which dictates whether the cricket has to run as a beacon or listener, depend on the configuration that has been sa ved in the cricket EEPROM. If the run-mode is Beacon, then th e beacon-timer is started. If the run-mode is listener, then radio-contro l and beacon-control are started. These commands are sent to the respective components. When this operation is successfully completed a success signal is sent to the Main. 2.3.3.3 Stop Phase The stop phase is initiated when the stop co mmand is received from the Main. In this phase a stop sequence is in itiated for all the components that were started during the start-up phase and a succe ss signal is returned to the Main upon completion. 2.3.3.4 Sending and Receiving a Beacon Message Once the process of sending out the beac on message is started, the beacon listens for an arbitrary period of time, which is computed by adding a random number from the random number generator to the ultrasound maxi mum time of flight. This sniffing of the medium is performed in order to prevent collisions between beacon messages. If the ultrasound channel is not clear, random b ack off is invoked to reschedule the transmission of the message. If the beac on finds a valid slot for sending a message it

PAGE 34

24 toggles the green light. The red led is turned on in the event no transmission slot is available. Once the message is sent out, th e radio related component sends back a reply indicating that the RF message was sent. Recei pt of the RF message sent reply initiates transmission of the ultrasound pulse through the UltrasoundControlM component. When the listener receives an ultrasound pulse, a timer is started. The maximum value for the timer can be set in the cricket.h header file. The header file also contains various other values such as the speed of sound, which are used in the application. The listener stops looking for the ultrasou nd pulse when the timer times out. 2.3.3.5 Calculations Distance information is obtained by multiply ing the speed of sound with the value of the timer minus the timer offset. The timer offset is the delay for calculations. The distance calculation is given by: distance = ((timer-CricketConfig.tim er_offset) speed_of_sound) (2.1) If the Onboard temperature sensor is use d, then the value for the speed of sound is properly adjusted before being used in the formula for distance calcu lations, Equation 2.1. The value of the temperature obtained from the temperature sensor is stored in CricketConfig.local_temp The speed of sound is calcula ted in feet per second and in meters per second by: speed_of_sound(ft/sec) = ((1087*sqrt(273+Cr icketConfig.local_temp))/16.52 (2.2)

PAGE 35

25 speed_of_sound(m/sec) = (331.4+0.60*Crick etConfig.local_temp)/1000 (2.3) 2.3.3.6 Storage of Values The values of the last readings from di fferent beacons are stored using command calls to BeaconManageM.nc. All beacon readings are compared with the existing measurements and the existing Id s. If the value of distance for a given Id is new the old distance value is replaced using a command call to BeacManageM.nc. If a new Beacon is found by the listener, a command call is issued to add a new Beacon id and the associated distance measurement. The maximu m number of beacons that can be allowed is specified in the Cricket.h header file and can be changed. 2.3.3.7 Serial Communication The serial communication capability is perhaps the most important and distinguishing feature of the cricket. The serial communi cation of the cricket is not known to be implemented as a normal communication feature of a Berkeley mote. The serial communication feature provides a abilit y to receive distance readings from the cricket by connecting the cricket to a com puter through a HyperTerminal session. When the user sends messages to the mote through the RS-232 connection, th e cricket views the message reception as an event, which causes the incoming data to be buffered for parsing. Depending upon the command that is sent to the cricket, selective processing is performed and the required output printed. Vari ous settings of the cricket can be changed by sending commands through the serial interface.

PAGE 36

26 Once an analysis of the various components used to obtain the required distance readings is performed, the question of actua l position estimation ar ises. Trilateration, using the received distance measurements, is performed to determine the spatial position of the object. Many different methods have been suggested for the performance of Trilateration. The next section discusses the Trilateration methods used in this research for localization of the platform. 2.4 Trilateration Trilateration in 3-dimensions is the estimation of the Euclidean position of an object whose distances from three known points is given. In the system developed, the coordinates of the beacons are known and the li stener, which is attached to the stargate, estimates its distances from each of the beacons Trilateration was then performed using the data as input to a MATLAB applic ation developed during this research. Given the coordinates an d distances, the position can be obtained by finding the point of intersection of the spheres formed by the coordinates of the fixed beacons and their distances from the listener. This can be accomplished mathematically by solving the linearly independent system of eq uations representing three spheres as: (x-x 1 ) 2 + (y-y 1 ) 2 + (z-z 1 ) 2 = d 12, (2.4) (x-x 2 ) 2 + (y-y 2 ) 2 + (z-z 2 ) 2 = d 22, (2.5) (x-x 3 ) 2 + (y-y 3 ) 2 + (z-z 3 ) 2 = d 32 (2.6)

PAGE 37

The B i beacon center is represented by (x i y i z i ) and the distance from the listener di, which represents the radius of the sphere, ar e given. The system of quadratic equations can be solved by subtracting equations (2.5) and (2.6) from (2.4) to obtain two linear equations and one quadratic. These resulting equations can be reduced further by solving the linear equations for x and y in terms of z and substituting the results back into equation (2.4) to obtain the valu e of z. These manipulations result in two values for z. One value for z has to be eliminated base d on the actual conditions. This type of computation is computationally inefficient. A commonly used me thod to calculate the position using Trilateration described by Manol akis is widely considered to be computationally the most efficient, [15], [1 6]. A new method has been suggested, which uses Cayley-Menger determinants and barycentr ic coordinates, [16]. The use of CayleyMenger determinants results in using sim ilar computational res ources as the method suggested by Manolakis. Cayley-Menge r determinants provide a geometric understanding of the final formula for calcu lation of Trilaterati on, [16]. The CaleyMenger determinant is given by: ),(),(),(1 ),(),(),(1 ),(),(),(1 111 10 2 1 2)...;,...,(2 1 2 22 12 1 21 11 1 1 nn n n n n n n nqpDqpDqpD qpDqpDqpD qpDqpDqpD qqppD (2.7) where D(p1, q1) represents the square of th e distance between the two points p1 and q1. The formula for Trilateration is obtain ed by using barycentric coordinates to analyze the tetrahedron formed by the fourth point and the three point s of reference, p1, 27

PAGE 38

p2 and p3. The distances are known from p2 to p1and p3 to p1. These distances are presented in equations (2.8) and (2.9) by: );(),,;,,( );(),,;,,(4,2,13,2,1 421321 4,3,13,2,1 431321ppDppppppD ppDppppppD (2.8) ))(),,,();();(( ),,( 1214321 24,2,13,2,1 14,3,13,2,1 321 14vvppppDvppDvppD pppD pp (2.9) where v1, v2 are (p2 p1) and (p3 p1) respectively. 28

PAGE 39

29 CHAPTER 3 SYSTEM ARCHITECTURE AND IMPLEMENTATION 3.1 Proposed System Architecture The system architecture used was base d on a set of requirements for the proposed localization system. The system requirements for the development of the platform were: The system must be compatible with existing mote technology of enabling further research in the field of wireless sensor networks, The integrated system to be developed must be composed of a mobile network gateway, three reference beacons, a listen er and a fixed station for localization research, Communication between the mobile node s and the fixed station must be through a wireless channel, The system must possess capabili ties to control a robotic base, The fixed station must host an applica tion to enable the user to track the mobile platform. The selected architecture for the system that meets the above requirements is presented in Figure 11. The stargate, which is connected to the listener, receives RF and ultrasound pulses from the system of beacons. The stargate is connected, peer to peer, to a remote workstation through a wireless channel. The stargate gate runs an application to open a TCP port to the serial port of the list ener. Once the wireless channel has been

PAGE 40

established, the messages or data packets ge nerated by the listener are sent through the channel to the remote station. The remote station runs a MATLAB application to receive and analyze the data and perform Trilateration on the distance readings obtained from the data. The result of the Trilateration is displa yed to the user on a Graphical User Interface. Figure 11: Basic Diagram of the System The system envisioned required the in tegration of various components. A description of each of the components required to build the system is presented in the following sections. 3.2 Listener Stargate Interface The cricket, as described in Chapter 2, normally uses a RS-232 port to connect to the host. However, the RS-232 connector in the stargate is configured for use of the console, which means it is normally used by the computer to view the prompt of the Linux operating system on the stargate. Once connected through the serial port, the stargate can be configured to allow access to it through a wireless channel. Given that 30

PAGE 41

the stargate is to be used as a mobile platform to be accessed wirelessly, if the cricket is connected to the RS-232 of the stargate and th e wireless connection to the stargate is lost, no way to monitor the stargate would exist. Therefore, other options for serial communication with the crickets were explored. The 51-pin connector, which is on both the stargate and the crickets, has two pins for serial communication. As shown in Figure 12, pins 16 and 17 support a serial connection with no flow control and can be used for TX and RX respectively. The data that is sent to the RS-232 can also be obtained from the serial pins on the 51-pin connector. The complete pin configuration for the 51-pin connector is specified in Appendix-A. Figure 12: The 51-Pin Connector An extension cable was used to connect the cricket to the stargate since the ultrasound equipment on the motes did not physically allow it to be directly connected to the stargate. 31

PAGE 42

3.3 Stargate Computer Interf ace Using the 802.11 Protocols 3.3.1 Accessing the Stargate Through a Remote Wireless Connection The first phase required the stargate to be connected remotely using the 802.11 protocols. Logging into the stargate remotely provides the ability to startup or change things on the stargate remotely. This met hod provides access, for manipulation purposes, to the file system on the stargate. To enable a peer to peer wireless connection between the stargate and the computer, both the starga te and the computer had to be configured. In order for the stargate to be able to de tect the wireless compact flash card, which was used, it had to be in place before activa ting the stargate. Once the user logged into the stargate, it was checked to verify if the st argate has detected the flash card. The flash card is pictured in Figure 13. Figure 13: Compact Flash Card The connection settings for the wireless ch annel had to be altered to provide the stargate with an IP address. The mode of connection also had to be changed to Ad-Hoc mode. The network id could be changed if required. Additionally, for security purposes, a key was assigned to the network to enable on ly users with access to the key the ability to log onto the stargate. The setti ngs used are presented in Figure 14. 32

PAGE 43

Figure 14: HyperTerminal Displaying th e Wireless Settings of the Stargate The TCP/IP settings on the computer re quired alteration in order to assign the computer a fixed IP to enable easier connec tion to the stargate. At this stage it was possible to ping to and from the stargate a nd to obtain packet information. The configuration at this stage is presented in Figure 15. The stargate was assigned the IP 192.168.1.3 and the computer was assigned the IP 192.168.1.2. 33

PAGE 44

Figure 15: Testing the Wireless Connec tion Established With the Stargate In order to login to the stargate remote ly, which enables remote monitoring of the stargate, a freeware Secure Shell program was used. The process is presented in Figure 16. Figure 16 also shows the operation of the cricketd application. 34

PAGE 45

Figure 16: Cywin Session Showing the Stargate Command Prompt 3.3.2 Communicating With the Cric ket from a Remote Computer In order to connect to the serial port of the cricket through the wireless channel, an application was used, which opened a TCP/IP port to the serial port. The application utilized a light weight TCP server that ma kes it possible for higher level applications on PCs to connect to the crickets serial port. The application requi red recompilation with the arm-gcc compiler. The compiler develope d the executables, which were required to run on the stargate. Once the application is in stalled on the stargate it can be run from a remote computer by logging into the stargate using the procedure described in section 3.3.1. After login, applications on the remote computer can be connected to the cricket through the TCP/IP connection. During this research, MATLAB was used to make the connection, send data and receive data from the cricket, which was connected to the stargate. 35

PAGE 46

36 3.4 Powering the Stargate The requirement demanding platform mobility forced the use of battery power for the stargate. The stargate is normally power ed from a 5V, 1.5A adapter. The adapter steps down and converts the available AC s upply to the proper DC requirements. The amount of power consumed depends on the nu mber of peripheral devices connected to the stargate. Assuming that al l peripherals are connected, the current sink of the stargate was approximately 700mA. The stargate has an onboard voltage regulator, which can accommodate input voltages up to a maximum of 8V. However, when running with peripherals, the voltage regulator tends to overheat when higher voltages are used as inputs. In order to prevent a thermal collapse of the on board regulator, an external voltage regulating circuit was used. The external regulator consiste d of a 5V, 2A voltage regulato r, (LM-309), with the input derived from a 7.2V, 2000mAh standard RC car battery with a capacitor at the output. The power supply from a battery to a st argate can be provided from the normal input or from the J7 pins on the daughter board. The normal input was used during this research. 3.5 MATLAB GUI, (Graphical User Interface) Once the Peer to Peer connection was established between the computer and the cricket, communication with the cricket had to be made using MATLAB in order to get the distance readings and parse them for establ ishing the location of the stargate. The use of MATLAB allowed the gathered data to be processed in a language that is familiar to a

PAGE 47

much larger group of engineers. The pro cess of opening the TCP/IP connection and processing the data was performed by the fl ow charted steps presented in Figure 17. Figure 17: Flowchart of the MATLAB Application Developed for Localization 37 The Simulation of the conditions of the Beacons and Listeners provided an opportunity to make changes to the model, incorporate another model or use the Trilateration model of motion for the object.

PAGE 48

38 3.5.1 Using Real Time Data Selection of real time data in the MATLA B application, for tracking the listener on the stargate, opens a TCP/IP port to the seri al port of the Listener through the wireless channel to the stargate. Thereafter, the a pplication scans this por t for incoming data. When a data packet is received, it is checked for usab ility. As connections are established, the stargate transmits data that indicates the start of data collection. The valid data packet is used for parsing to retrieve the required information. A check is performed to determine if the packet contains the distance field, if not, the packet is discarded and the program looks for the next packet. The distance field may not exist if the listener receives an RF pulse and does not receive an ultrasound pulse. The parsing block then sends the data obtained from the packet, which is the ID, distance and Timestamp to be stored in a structure. In the case of simulation, the simulation passes the values to a similar structure. The next st age of picking beacons, when there are more than three is a process with a scope for future research. During this research the process was simplified by using the first three beac ons. These three beacons were used to trilaterate. The results of the Trilateration were displa yed in the front end of the application. Figure 18 presents the results of one of the experiments. The beacons were located at (0, 0, 0), (100, 0, 0) and (0, 100, 0), which are depicted by small blue dots. The position of the listener was tracked as it is move d in the pattern displayed in the Figure 18.

PAGE 49

Figure 18: An Experiment Using the Developed System 3.5.2 Simulation The simulation part of the MATLAB applic ation allows provides the ability to test both standard and nonstandard components by emulating the function of the beacons. For this purpose several readings were take n with one and three beacons in different experiments to replicate the random nature of the beacon movement while sending pulses. The time interval between each pulse was us ed to obtain the distributions using one beacon in Figure 19 and three beacons in Figure 20. 39

PAGE 50

Figure 19: PDF of the Intervals Between the Transmissions of Two Successive Beacon Pulses When Using One Beacon Figure 20: PDF of the Intervals Between the Transmissions of Two Successive Beacon Pulses When Using Three Beacons 40

PAGE 51

41 In the case of the single beacon, the m ean was found to be 1.12ms. In the case where three beacons were active at the sa me time, which would be the case when trilaterating, the mean was found to be 363 ms. Once the distribution was determined, similar distributions were used to sample data randomly in order to simulate beacon behavior. The outputs of the simulation applicati on as a result of random motion inputs are presented in Figures 21, 22 a nd 23. Figure 21 displays the actual position of the random motion generator. Figure 22 presents the out put of the Trilaterati on performed from the outputs of the beacons in the simulator, wh ich sampled the actual random motion with the distribution similar to the one presented in Figure 18. Figure 23, presents the output of a Butterworth type filter applied to th e output of the Trilateration. The filter eliminated the sudden changes that were observe d in the actual Trilater ation output. This filter was not applied to the real time portion of the application.

PAGE 52

Figure 21: The Actual Position, (ground truth), of the Random Motion Generated by a Random Motion Block in the Simulation Figure 22: The Results of Trilateration Using Distance Measurements from the Simulated Beacons 42

PAGE 53

Figure 23: The Filtered Result of the Trilateration Presented in Figure 21 The MATLAB application can be utilized to model new systems and to develop algorithms. A complete platform was envisi oned with this kind of an application. 3.6 The System as a Whole The complete system is presented in Figur e 24. It consists of the stargate, which is free from its wired connections by pr oviding it with a battery power supply and connecting to it wirelessly. The RC car base shown in the figure can be replaced by a better robotic base, which is de scribed later. The listener connected to the stargate can receive the readings from beacons and this mobile platform is able to send this data to a computer connected through the wireless channe l. The data received is processed and used for Trilateration to find the position of the platform. Therefore, the mobile robot acts as a development platform for the comple te system proposed in the next section. 43

PAGE 54

Figure 24: The Developed System and an Experiment Using the System 3.7 Testing the System Accuracy, Precision and Tracking Speed Testing of the system was performed in or der to analyze the ability of the system to track the mobile platform. Figure 25 pr esents the results for the test that was performed in order to check the precision of the system when the platform was stationary. The actual position of the platform is indicate d by the Black spot. Using data from over 200 samples, with the system at the poin t indicated by the blac k spot, the distance calculated by the system deviated from th e actual position by an av erage of 1.53cm with a standard deviation of 1.04cm. Figure 26 presents the variation in the x and y coordinates of the trilaterati on output with the va riation in the values of the distance readings from the beacons. The two extreme values shown by the sudden dip in the curve are not seen on the graph and were not used to calculate the mean and deviation. 44

PAGE 55

Figure 25: Test for Stationa ry Accuracy and Precision -200 -150 -100 -50 0 50 100 150 200 250 300 350 SamplesDistance in cm Beacon1 Beacon2 Beacon3 Trilat-x Trilat-y Figure 26: Variation in the Trilaterated Output The Figure 27 presents the results from th ree different experiments that were performed while the system was moving in a straight line at an average speed of 0.1m/s. 45

PAGE 56

The actual path is indicated by the black line. The data from the experiments shows that the mean distance of the trilaterated value fr om the actual position for experiment (a) was 1.64cm, the mean distance of the trilater ated value from the actual position for experiment (b) was1.53cm and the mean distance of the trilaterated value from the actual position for experiment (c) was1.72cm. The values of the standard deviations were 1.12cm for experiment (a), 1.02cm for experime nt (b) and 1.2cm for experiment (c). The data confirm that the system developed during this research is very accurate with respect to position measurement. Figure 27: Testing Accuracy and Precision During Motion Figure 28 presents the results of three different experiments when the robot was moved at three different speeds along the same path. Experiment (a) presents the results of trilateration for a robot speed of 0.1m/s. The resultant mean of the deviation distance from the actual path was 1.64cm with a standa rd deviation of 1.12cm. Experiment (b) presents the results of trilateration for a robot speed of 0.3m/s. The resultant mean of the deviation distance from the actual path was 2. 51cm with a standard deviation of 1.94cm. Experiment (c) presents the re sults of trilateration for a robot speed of 0.6m/s. The 46

PAGE 57

resultant mean of the deviation distance from the actual path was 2.55cm with a standard deviation of 4cm. This data shows that as the speed of motion increa ses the deviation, of the output from trilateration, from the true value increases. This error was not extreme and could be corrected to some extent by filtering the output of trilateration. However, the data demand that future research with the develope d system should investigate predictive methods, in general, for the purpos e of improving the precision of the system in situations where the velocity of the robot could increase above 0.6 m/s. Figure 28: Testing the Tracking Speed The response of the system with respect to movement of the robot along a curved path was tested. The speed of the robot for the curved path experiment was 0.1m/s. The results of the curved path experiment are pr esented in Figure 29. The mean distance from the actual path, (black line), was 2.14cm with a standard deviation of 1.56cm. The standard deviation was slightly higher than the standard devia tion obtained for the straight line path experiment at the same speed of 0.1m/s. The results from the actual experiment follow the trend observed in simu lations. In simulations the error from trilateration was greater for motion of the robot along curved paths than the error from trilateration for motion of the robot along straight line paths. 47

PAGE 58

Figure 29: Experiment With Motion along a Curved Path The Table 1 presents the results obtaine d for the difference of the tracked position from the actual path and the standard devi ation associated with those differences. Table 1: Experimental Results Average Distance from the Actual position (cm) Standard Deviation of the Readings from the Average (cm) Stationary 1.53 1.04 Straight line path at 0.1m/s 1.64 1.12 Straight line path at 0.3m/s 2.51 1.94 Straight line path at 0.6m/s 2.55 4 Curved path 2.14 1.56 3.8 The Complete Proposed Platform The platform that was built can be expa nded for use as a mobile robot, which is capable of utilizing all the feat ures of a stargate. In this section the integration of this system with other components to produce a mobile platform that can aid research in wireless sensor networks is described. Robotic bases, for the proposed system, were researched. The base that was most suitable, in terms of freedom of movement and compatibility with the platform to be 48

PAGE 59

constructed, was the PPRK robotic base. The PPRK robotic base was designed at Carnegie Mellon, [17]. The PPRK robotic base is pictured in Figure 30. The platform utilizes holonomical motion, which means th at it can move in any direction while simultaneously controlling rotational speed. Figure 30: The PPRK Robotic Base, [17] The controller for the servos in the PP RK robotic base is a Brainstem GP 1.0 servo controller. The Brainstem controller can be connected to a stargate to manipulate the motion of the robot. The connection of th e Brainstem controller to the stargate is presented in Figure 31. 49

PAGE 60

Figure 31: Brainstem Ser vo Controller Connected to the Stargate, [17] A Philips webcam can be attached to the USB connector of the daughter board on the stargate. Drives for the webcam for arm pr ocessor architecture are easily available. The webcam enables the user to have a view of the location, of the stargate, from the perspective of the robot. These images can be sent to the stationary computer for processing as an aid in their analysis. Another feature of the stargate that coul d be utilized effectively is the cellular card slot, (PCMCIA). This feature has been used in earlier projects to transmit data across an internet connection, [7]. The ability to provide control over the internet would enable control of the robot from places outside the reach of the 802.11 connection. 3.9 Possible Uses of the Proposed System Various position algorithms we re developed and tested us ing crickets. Two of the more popular ones were the Anchor Free Local ization in Sensor Networks and Robust Distributed Network Localizat ion with Noisy Range Measurements, [18], [19]. The 50

PAGE 61

Anchor Free Localization system uses fold free graph assignment and mass-spring based relaxation, [20]. The Robust Distributed Network Localization system uses robust quadrilaterals as the building unit for the gra ph. Both of these localization algorithms require the nodes to be capable of making distance measurements to the adjacent nodes at all angles. However, such a requirement would not be suited for the crickets. The simulation performed, using the crickets cone angle, with respect to distance measurement highlighted the limitation of limitation of such measurements for the crickets. The simulation for the crickets distance measuring capability as a function of angle is presented Figure 32. Figure 32: Simulation With Rando m Deployment of the Crickets The simulation generated a random position for the motes in a field of defined size. The cones represent the cone of covera ge of the crickets. It was discovered that, 51

PAGE 62

52 when randomly distributed, very few motes fe ll in the cone of at least three beacons, which ruled out the possibility of direct Trilateration. However, by careful alignment of the beacons the crickets can be used to emulate the algorithms suggested. Additionally, the co ncept of indoor localization, as presented in section 1.4, would require a map of the bu ilding to be generated along with the map of the network. Roshan, in his thesis Ra pid Coordinate System Creation and Mapping Using Crickets, proposed a method to enable mapping of the network in order to localize an indoor node, [22]. An L shaped board with crickets on the corners was used to localize each beacon before building a comple te map of the beacons and the room in which they were placed by using a laser pointer. An algorithm is discussed, in Chapter 4, that attempts to make coordinate creati on and network mapping eas ier and without the human involvement required by the L board.

PAGE 63

53 CHAPTER 4 CONCLUSION AND FUTURE WORK 4.1 Conclusion The integration of wireless sensor networ ks with a mobile platform and a fixed station was successfully accomplished and shown to be a viable vehicle to conduct research on localization in an indoor environment. Further developments in technology leading to a different mote, with better rangi ng capabilities, than the crickets could also enable the system to be used in outdoor environments. The developed system enabled the transfer of information from the sensor node on the platform to a distant computer through wireless communication. The localization of the mobile unit was accomplished using a trilateration technique implemented in MATLAB. In addition, a user interface was developed that allowed the mobile unit to be tracked and an analysis was performed on the accuracy with which the platform could be tracked. The platform developed during this resear ch was intended for use in continuing research on localization, track ing, navigation and mapping of wireless sensor networks. The platform also provides opportunities for ro botics research. As the wireless sensor networks technology becomes more affordable, the number of potential applications will increase dramatically. Many more uses can be envisioned for such a system to make the vision of pervasive computing a reality.

PAGE 64

54 4.2 Future Work The robotic platform described can be used with the developed system to aid the development of various navigational algorithms Further research could involve the use of sensor boards along with the crickets to obtain a variety of measurements while localizing the system. The PCMCIA card could be used with the stargate to get the information from the system across a cellular network to enable m onitoring of the system from distances much greater than those possible by using the 802.11 connection. Tests performed with the system show that the system performs well at lower speeds. However, the deviation of the trac ked path from the actual path increases at higher speeds. Methods need to be developed that will enable tracki ng of the system at higher speeds. Algorithms need to be developed, which will create a coordinate map of the network of beacons on the ceiling and assign coordinates to the beacons automatically.

PAGE 65

55 REFERENCES 1. Nissanka B. Priyantha, Anit Chakrabort y and Hari Balakrishnan, The Cricket Location-Support System, 6th ACM International Conference on Mobile Computing and Networking, Boston, MA, August 2000 2. Keith Kotay, Ron Peterson and Daniela Rus, Experiments with Robots and Sensor Networks for Mapping and Navi gation, International Conference on Field and Service Robotics, Port Douglas, Australia, 2005 3. Maxim A, Batalin and Gaurav S. Sukhatme, Mobile Robot Navigation using a Sensor Network, IEEE International Conference on Robotics and Automation, New Orleans, LA, April 26 May 1, 2004 4. Christopher Taylor, Ali Rahimi, Jona than Bachrach and Howard Shrobe, Simultaneous Localization And Tracki ng In An Ad Hoc Sensor Network, International Symposium on Informati on Processing in Sensor Networks, UCLA, Los Angeles, California, 2005 5. Nirupama Bulusu, John Heidemann, Deborah Estrin and Tommy Tran, SelfConfiguring Localization Systems; Design and Experimental Evaluation, ACM Transactions on Embedded Compu ting Systems, February 2004 6. David Moore, John Leonard, Daniela Ru s and Seth Teller, Robust Distributed Network Localization with Noisy Range Me asurements, SenSys, Baltimore, Maryland, USA, November 2004 7. Wilfrido Moreno et al., Rapid Orga nization Situation Assessment, Project Report to Global Center for Disaster Management and Humanitarian Action, August 2005 8. Gabriel T Sibley, Mohammad H Rahimi and Gaurav S Sukhatme, Robo-mote: A Tiny Mobile Robot Platform for Larg e-Scale Ad-Hoc Sensor Networks, International Conference on Robotics and Automation, Washington D. C., 2002 9. Adam Smith, Hari Balakrishnan, Michel Goraczko and Nissanka Priyantha, Tracking Moving Devices with the Cr icket Location System, MobiSYS'04, Boston, Massachusetts, USA, June 2004

PAGE 66

56 10. Pubudu N. Pathirana, Nirupama Bulusu, Andrey V. Savkin and Sanjay Jha, Node Localization Using Mobile Robots in Delay-Tolerant Sensor Networks, IEEE Transactions on Mobile Computing, Vol. 4, June 2005 11. The Garcia Robot: http://www. acroname.com/garcia/garcia.html 12. Peter Corke, Ron Peterson and Daniela Rus, Localiza tion and Navigation Assisted by Cooperating Networked Sensor s and Robots, International Journal of Robotics Research, Vol. 24, September 2005 13. Stargate Manual http://www.xbow.com/Support/Support _pdf_files/Stargate_Manual.pdf 14. David Gay, Phil Levis, Rob von Behren, Matt Welsh, Eric Brewer and David Culler, The nesC Language: A Holistic Approach to Networked Embedded Systems, Proceedings of Programming Language Design and Implementation, June 2003 15. Dimitris E. Manolakis, Efficient Solution and Performance Analysis of 3-D Position Estimation by Trilateration, IEEE Transactions on Aerospace and Electronic Systems, October 1996 16. Federico Thomas and Llus Ros, Revisiting Trilateration for Robot Localization, IEEE Transactions on Robotics, February 2005 17. The PPRK Robot Base: h ttp://www.cs.cmu.edu/~pprk/ 18. Nissanka B. Priyantha, Hari Balakr ishnan, Erik Demaine and Seth Teller, Anchor Free Distributed Localization in Sensor Networks, Tech. Rep. 892, MIT Lab. for Comp. Sci., April 2003 19. David Moore, John Leonard, Daniela Ru s and Seth Teller, Robust Distributed Network Localization with Noisy Range Me asurements, SenSys, Baltimore, Maryland, USA November 2004 20. Neal Patwari, Joshua N. Ash, S pyros Kyperountas, Alfred O. Hero III, Randolph L. Moses and Neiyer S. Corre al, Locating the Nodes, IEEE Signal Processing Magazine, July 2005 21. Roshan Bantwal Baliga, Rapid C oordinate System Creation and Mapping Using Crickets, M Eng. Thesis, Massachusetts Institute of Technology, June 2004 22. Project Oxygen: http://www.oxygen.lcs.mit.edu/

PAGE 67

57 23. Andy Harter, Andy Hopper, Pete Steggles, Any Ward and Paul Webster, The Anatomy of a Context-Aware App lication, Proceedings of the 5 th Annual ACM/IEEE International Conference on Mobile Computing and Networking (Mobicom 1999), ACM Press, Seattle WA, August 1999 24. Roy Want, Andy Hopper, Veronica Falcao and Jon Gibbons, The Active Badge Location System, ACM Transactions on Information Systems, 10(1):91-102, January 1992 25. Radu Stoleru, Tian He, John A. Stankovic and David Luebke, A HighAccuracy, Low-Cost Localization System for Wireless Sensor Networks, SenSys, San Diego, California, November 2, 2005 26. Koen Langendoen and Niels Reijers, D istributed Localizat ion in Wireless Sensor Networks: A Quanti tative Comparison, The International Journal of Computer and Telecommunications Networ king Archive, Vol. 43, Issue 4, November 2003 27. Eiman Elnahrawy, Xiaoyan Li and Richard P. Martin, The Limits of Localization Using Signal Strength: A Comparative Study, First IEEE International Conference on Sensor and Ad hoc Communications and Networks (SECON 2004), Santa Clara, CA, October, 2004 28. Hongchi Shi, Xiaoli Li, Yi Shang and Dianfu Ma, Cramer-Rao Bound Analysis of Quantized RSSI Based Local ization in Wireless Sensor Networks, Proceedings of the 11th International Conference on Parallel and Distributed Systems, 2005 29. Jason Hill, Robert Szewczyk, Alec Woo, Seth Hollar, David Culler and Kristofer Pister, System Architecture Directions for Networked Sensors, ASPLOS-IX, Cambridge, MA, November, 2000 30. The Cricket System: http://nms.lcs.mit.edu/projects/cricket/

PAGE 68

58 APPENDICES

PAGE 69

59 Appendix A TOS_Msg The TOS_Msg structure defined below, in nesC, describes the structure of the message that is sent from one node to other using TinyOS in the Berkeley mote architecture. The cricket used the same arch itecture. Therefore, the cricket used the same format for the beacon message that was sent. typedef struct TOS_Msg { /* The following fields are transmitted/received on the radio. */ uint16_t addr; uint8_t type; uint8_t group; uint8_t length; int8_t data[TOSH_DATA_LENGTH]; uint16_t crc; /* The following fields are not actually transmitted or received on the radio. These fields ar e used for internal accounting only. The reason they are in this structure is that they are used and they are required to be a part of the TOS_Msg that is passed to send/receive operations. */ uint16_t strength; uint8_t ack; uint16_t time; uint8_t sendSecurityMode; uint8_t receiveSecurityMode; } TOS_Msg;

PAGE 70

60 Appendix B Pin Configuration of th e 51-Pin Connector on the Stargate The Pinouts for the mote connector on the Stargate are presented in Table 2. Pin number 16 and 17 are used for serial communication.

PAGE 71

Appendix B (Continued) Table 2: Pinouts of the Stargate Mote Connector 61

PAGE 72

62 Appendix C User Guide for the Developed System The system developed acts as a basis for future research on localization in an indoor environment. The system enables the tr ansfer of information from the sensor node on the platform to a distant computer through wireless communication. The system consists of three components: The Crickets: for Beacons and a Listener, The Stargate, The MATLAB application. This guide describes how the three component s need to be interfaced in order for the system to function. The Crickets are based on the Mica Mote architecture and are connected to the stargate through a 51-pin connect er. The pin configuration for the 51-pin connecter is described in Appendix B. The Stargate can be viewed as a fully functional Linux computer. The Stargate is connected to a fixed station, which runs the MATLAB application through an 802.11, peer-topeer, wireless connection. The MATLAB application gathers data from the listener attached to the stargate and displays the position of the stargate, with the listener, relative to three beacons that are used for obtaining the distance measurements required for trilateration. The stargate connects to a computer through a RS232 port using a null modem cable. The console for the stargate ca n be viewed from a hyper-terminal session initialized with the settings:

PAGE 73

63 Appendix C (Continued) 1. Bits per second: 115200, 2. Data bits: 8, 3. Parity: 0, 4. Stop bits: 1, 5. Flow control: None. Once the hyper-terminal session has been esta blished, the user logs in with the stargate as the root. If a wireless connection has to be established, which is a primay requirement for the system to function, the 802.11 card has to be insert ed into the stargate before power up. In addition the cricket li stener must be connected to the stargate through the 51-pin connector be fore power up. Once the wi reless connection has been established and the listner has been connected to the stargate, a wireless connection must be established between the stargate and the fixed station. In or der to establish the wireless connection between the stargate and the fixed station, the following actions must be completed: 1. After power up, check to see if the wire less card has been detected by typing at the prompt (#), the following command: cardctl ident 2. Assign the stargate any preferred IP address using ifconfig wlan0 192.168.1.3 3. Assign a network ID, (essid), for the wirele ss network. The default is test using iwconfig wlan0 essid [network id 4. Change the mode of the wireless network to Ad-Hoc using iwconfig wlan0 mode Ad-Hoc

PAGE 74

Appendix C (Continued) 5. Set a Password, if desired, using iwconfig wlan0 key s:[network key] 6. At the Remote Station, assign a fixed IP for the station by changing the TCP/IP properties for the wireless network. 7. Connect to the peer to peer networ k with the ID specifi ed in step (4). These actions established a wireless connecti on between the stargate and the computer. The computer and stargate can be signaled, from each to the other, as displayed in Figure 33. The wireless settings on the stargate shou ld match those presented in Figure 34. The setup can be checked by typing iwconfig at the prompt of the stargate. Figure 33: Result of a Signal from th e Fixed Station to the Stargate 64

PAGE 75

Appendix C (Continued) Figure 34: Wireless Settings on the Stargate Login to the stargate is possible once the communication channel has been established. In order to accomplish a login complete the following actions: 1. After a wireless connection has been se tup between the starga te and the remote station, use a secure shell a pplication to log into the stargate as root@IPaddress. Enter the password for the starga te, is set, when prompted. 2. The stargate prompt should appear in the secure shell window that is in use as displayed in Figure 35. 65

PAGE 76

Appendix C (Continued) Figure 35: Stargate Wireless Login and Cricketd Once login to the stargate is possible fr om the fixed station through the wireless channel, the application to open the TCP/IP port to the remote computer must be run. At the prompt type the commands cd/ cd cricketd cricketd p/dev/tts/2 z in order to change the prompt to the cricketd directory and run the application for opening the TCP/IP port to the serial port of the cricket. This action will run the application cricketd which resides in the root directory of the stargate. Figure 37 displays that a TCP/IP port to the se rial port of the stargate is open. After the TCP/IP connection is establishe d, the connection can be tested through a hyper-terminal session, which can check if the cr icket data is being received remotely. In 66

PAGE 77

67 Appendix C (Continued) order to test the connection, the hyper-termi nal session requires th e following actions to be preformed: 1. Arrange the Beacons in the required positions on the roof and activitate them. 2. Open hyper terminal and select TCP/IP in connection properties. 3. In the IP box, enter the IP assigned to the stargate. 4. In the TCP port box, enter the port number, (2947), that the application running on the stargate has opened to the serial port of the cricket. 5. The data from the cricket can be viewed in the hyper terminal session by pressing the r key on the keyboa rd, (Register (Enable)). 6. The incoming data should be the same as that presented in Figure 36, which displays the data from one cricket. 7. Press the r key on the keyboard again to stop receiving data from the crickets, (Register (Disable)).

PAGE 78

Appendix C (Continued) Figure 36: Data from the Beacon With ID USF-1 Once the connection has been established, the MATLAB application must be run in order for the system to be tracked. The application consists of two parts: 1. Simulation, 2. Tracking using Real time data. In order to run the MATLAB application, while using Real time data, three actions must be performed: 1. Make sure that the path of the applic ation with all its file s is visible to the MATLAB application. This visibili ty is accomplished by right clicking on the folder containing the applica tion and selecting Add to path. 2. Make sure that cricketd is still running on the stargate. 3. Select Real Time in the MATLA B application and press Start. 68

PAGE 79

Appendix C (Continued) The MATLAB application will track the motion of the Listener and display the tracked motion on the screen as presented in Figure 37. Figure 37: MATLAB Application The simulation part simulates the worki ng of the crickets by sampling a given motion at random intervals of time. To run the simulation, select the Simulation mode in the dropdown menu on the front panel of th e application. Press the start button to activate the simulation. Various parameters for the simulation such as the path and the method of trilateration can be changed by repl acing the relevant labeled blocks in the block diagram of the simulink model, Wa ndering_robot, which was developed for the simulation. This can be found in the director y labeled Tracking along with all the other files required for the application to run. 69

PAGE 80

70 Appendix C (Continued) The system is now ready to be run. Various experiments can be performed to test the different aspects of the system. The syst em can be used for research on Localization and Tracking by providing tools to simulate the function of the crickets and also to track the system using real time data.