Sunteți pe pagina 1din 60

Mid Sweden University

The Department of Information Technology and Media (ITM)

Author: Shashank Tadakamadla


E-mail address: shta0500@student.miun.se
Study programme: Master of Science in Electrical Engineering, 20 points
Examiner: Prof. Bengt Oelmann, Bengt.Oelmann@miun.se
Tutor: Prof. Bengt Oelmann, Bengt.Oelmann@miun.se
Date: 2006-10-09

M.Sc. Thesis report


within Electrical Engineering D, Electronics Design
Programme, 20 points

Indoor Local Positioning System 
For ZigBee, Based On RSSI 

Shashank Tadakamadla
Indoor Local Positioning System
For ZigBee, Based On RSSI Abstract
Shashank Tadakamadla 10.10.2006

Abstract
 

This  thesis  report  describes  a  model  for  monitoring  the  presence  and 
movements  of  vehicles  and  humans  in  an  indoor  environment.  In  IEEE 
802.15.4 the Received Signal Strength Indicator is used to determine the quality 
of the communication from one node to another. By tagging vehicles/humans 
with  a  ZigBee  node  and  deploy  a  number  of  nodes  at  fixed  position  in  the 
room,  the  received  signal  strength  indicator  can  be  used  to  determine  the 
position  of  tagged  object.  This  system  operates  by  recording  and  processing 
signal  strength  information  at  multiple  base  stations  positioned  to  provide 
information  in the area of  interest. It combines Euclidean distance technique 
with  signal  strength  matrix  obtained  during  offline  measurement  to 
determine  the  location  of  user.  The  experimental  results  presented  in  this 
report demonstrate the ability of this system to estimate user’s location with a 
high degree of accuracy. 

Keywords: ZigBee based user location and tracking, RSSI, Euclidean distance 
technique, SENTIO. 

ii
Indoor Local Positioning System
For ZigBee, Based On RSSI Acknowledgements
Shashank Tadakamadla 10.10.2006

Acknowledgements
 

This  work  would  not  have  been  possible  without  the  support  of  my  friends 
and mentors. Specifically, I would like to thank my advisor, Bengt Oelmann, 
who has given me all the support and guidance I needed as a Master student. 
I am very grateful to have had trust in my ability, and I have often benefited 
from  his  insight  and  advice.  I  would  also  like  to  thank  Fredrik  Linnarsson, 
Niklas  Lepisto,  and  Cheng  Peng  from  whom  I  have  had  benefit  of  learning 
from.  I  also  owe  a  great  deal  of  thanks  for  their  time  and  advice,  which  is 
reflected in this thesis. 

Finally,  I  would  like  to  acknowledge  my  friends  and  parents,  who  have 
supported me through these efforts. 

iii
Indoor Local Positioning System
For ZigBee, Based On RSSI Table of Contents
Shashank Tadakamadla 10.10.2006

Table of Contents
Abstract ....................................................................................................................... ii
Acknowledgements .................................................................................................iii
Table of Contents..................................................................................................... iv
List of Tables............................................................................................................. vi
List of Figures .......................................................................................................... vii
Terminology / Notation ........................................................................................viii
1 INTRODUCTION...................................................................................................1
1.1 Introduction to the study ...........................................................................1
1.2 Background ..................................................................................................2
1.3 Objectives .....................................................................................................3
1.4 Research Questions.....................................................................................4
1.5 Scope .............................................................................................................4
1.6 Methodology................................................................................................5
1.7 Outline ..........................................................................................................6
2   LITERATURE REVIEW .......................................................................................8
2.1 Common components of indoor positioning system ............................8
2.2 Classification of Indoor positioning systems ..........................................9
2.3 Indoor local positioning using ZigBee based on RSSI .........................11
2.4 Protocols and Industry standards for WSN ..........................................14
3 RECEIVED SIGNAL STRENGTH (RSS).........................................................26
3.1 Parameters that affect RSS .......................................................................26
3.2 Related work analysis...............................................................................28
3.3 Properties of RSSI......................................................................................29
4 OBJECT TRACKING ...........................................................................................30
4.1 Introduction ...............................................................................................30
4.2 Overview of hardware product ..............................................................30
4.3 Experimental Testbed...............................................................................32
4.4 Obtaining data from the sensor network ..............................................33
4.5 Object tracking application: Testing and Evaluation...........................33
5 RESULTS ................................................................................................................38
5.1 Measurement setup ..................................................................................38
5.2 Number of samples test ...........................................................................39
5.3 0ne dimensional test .................................................................................40
5.4 Two dimensional test ...............................................................................41
5.5 Causes of error in location determination.............................................41
6 DISCUSSIONS......................................................................................................44
6.1 Summary and Conclusion .......................................................................44
6.2 Future work ...............................................................................................44

iv
Indoor Local Positioning System
For ZigBee, Based On RSSI Table of Contents
Shashank Tadakamadla 10.10.2006

APPENDIX 1 .............................................................................................................45
APPENDIX 2 .............................................................................................................46
APPENDIX 3 .............................................................................................................47
REFERENCES ...........................................................................................................49
 

v
Indoor Local Positioning System
For ZigBee, Based On RSSI List of Tables
Shashank Tadakamadla 10.10.2006

List of Tables
Table 1 Comparison of Indoor Positioning Systems [7] 3
Table 2 Performance comparison of Indoor Positioning Systems [7] 3
Table 3 Frequency bands and data rates for IEEE 802.15.4 based on the IEEE 
802.15.4 standard [18] 16
Table 4 Format based on the IEEE 802.15.4 standard [18] 17
Table 5 General MAC frame format: IEEE 802.15.4 standard [18] 17
Table 6 Beacon frame format [18] 18
Table 7 Data frame format [18] 18
Table 8 Acknowledgement frame format [18] 18
Table 9 Command frame format [18] 18
Table 10 Classification of factors the affect RSS [7] 27
Table 11 Accuracy of positioning system 37
Table 12 One dimensional position estimation results 41

vi
Indoor Local Positioning System
For ZigBee, Based On RSSI List of Figures
Shashank Tadakamadla 10.10.2006

List of Figures
Figure 1 Schema of thesis work 5
Figure 2 Block diagram representing hardware module 8
Figure 3 Taxonomy of positioning system [7] 10
Figure 4 Star and peer‐to‐peer topologies in LR‐WPAN [18] 15
Figure 5 WPAN architecture [18] 16
Figure 6 Example of super frame structure [18] 19
Figure 7 Communication from a device to a PAN coordinator in (a) a beacon‐
enabled network, and (b) a non‐beacon enabled network [18] 20
Figure 8 Communication from a PAN coordinator to a device in (a) a beacon‐
enabled network, and (b) a non‐beacon enabled network [18] 21
Figure 9 Overview of the coverage for different wireless communication 
standards [17] 21
Figure 10 IEEE 802.15.4/ZigBee stack [20] 22
Figure 11 IEEE 802.15.4/ZigBee stack [17] 23
Figure 12 ZigBee secure frame in MAC layer [17] 24
Figure 13 ZigBee secure frame in network layer [17] 24
Figure 14 ZigBee secure frame in application layer [17] 25
Figure 15 SENTIO Platform [8] 31
Figure 16 Layout of Masterʹs Room 32
Figure 17 Flow chart representing the algorithm of fixed sensors 35
Figure 18 Flow chart representing the algorithm of main sensor 37
Figure 19 Test bed for one dimensional test in Masters Room 38
Figure 20 Histogram plot of RSSI values at 1m and 4m 39
Figure 21 Histogram plot of RSSI values at 6m and 8m 39
Figure 22 Distance vs. RSSI 40
Figure 23 Error Rate vs. Number of samples 42
Figure 24 RSS distribution at 2:14 pm 42
Figure 25 RSS distribution at 1:00pm and 11:00 am 43

vii
Indoor Local Positioning System
For ZigBee, Based On RSSI Terminology / Notation
Shashank Tadakamadla 10.10.2006

Terminology / Notation
 

GPS  ‐ Global Positioning System 

RSSI  ‐ Received Signal Strength Indication 

MS  ‐ Mobile Station 

RF  ‐ Radio Frequency 

WSN  ‐ Wireless Sensor Network 

AP  ‐ Access Point 

RSS  ‐ Received Signal Strength 

PC  ‐ Personal Computer 

WLAN  ‐ Wireless local Area Network 

SNR  ‐ Signal to Noise Ratio 

RFD  ‐ Reduced‐Function Device 

WPAN  ‐ Wireless Personal Area Network 

FFD  ‐ Full Functional Device 

MAC  ‐ Medium Access Control 

LR‐WPAN  ‐ Low Rate WPAN 

PAN  ‐ Personal Area Network 

OSI  ‐ Open Systems Interconnection 

LLC  ‐ Logical Link Control 

SSCS  ‐ Service Specific Convergence Sub layer 

PHY  ‐ Physical Layer 

PPDU  ‐ PHY Protocol Data Unit 

viii
Indoor Local Positioning System
For ZigBee, Based On RSSI Terminology / Notation
Shashank Tadakamadla 10.10.2006

ED  ‐ Energy Detection 

CCA  ‐ Clear Channel Assessment 

LQI  ‐ Link Quality Indication 

ISM  ‐ Industrial, Scientific, and Medical 

DSSS  ‐ Direct‐Sequence Spread Spectrum technique 

LSB  ‐ Least Significant Bit 

SHR  ‐ Synchronization Header 

SFD  ‐ Start of Frame Delimiter 

PHR  ‐ PHY Header 

MPDU  ‐ MAC Protocol Data Units 

GTS  ‐ Guaranteed Time Slot 

MHR  ‐ MAC Header 

MFC  ‐ MAC Footer 

FCS  ‐ Frame Check Sequence 

CAP  ‐ Contention Access Period 

CFP  ‐ Contention Free Period 

ACL  ‐ Access Control List 

AES  ‐ Advance Encryption Standard 

MIC  ‐ Message Integrity Code 

CBC  ‐ Cipher Block Chaining 

ZDO  ‐ ZigBee Device Objects 

OS  ‐ Operating System 

LOS  ‐ Line of Sight 

NLOS  ‐ Non Line of Sight 

ix
Indoor Local Positioning System
For ZigBee, Based On RSSI Terminology / Notation
Shashank Tadakamadla 10.10.2006

FPGA  ‐ Field Programmable Gate Array 

BS  ‐ Base Station 

AOA  ‐ Angle of Arrival 

TDOA  ‐ Time difference of arrival 

TOA  ‐ Time of Arrival 

TOF  ‐ Time of flight 

x
Indoor Local Positioning System
For ZigBee, Based On RSSI 1 INTRODUCTION
Shashank Tadakamadla 10.10.2006

1 INTRODUCTION
1.1 Introduction to the study
Advancement in wireless sensing technologies has encouraged in developing 
a model for indoor object‐tracking application using low power IEEE 802.15.4 
compliant radios. Stimulus used in this model is RSS. This application is not 
only  limited to object  tracking  in an  indoor environment. Concierge  services 
enable  users  to  become  aware  of  nearest  supporting  facilities.  For  example, 
smart  home  applications  such  as  multimedia  appliances  that  forward 
multimedia stream to the nearest video screen can be  achieved with a  home 
positioning  system  [3].  In  the  field  of  robotics,  a  robot  can  navigate  by  itself 
using the assistance of indoor positioning system [2]. Granularity of location 
information  is  most  important  in  location  determination  applications.  For 
example,  to  locate  a  book  in  a  library  requires  coarse  grained  granularity 
whereas locating a user requires coarse grained granularity. 
  
Position estimation refers to a process used to obtain location information of 
a MS with respect to a set of reference positions within a pre‐defined space. A 
system deployed to determine or estimate the location of an entity is called a 
position  location  system  or  positioning  system.  A  wireless  indoor  positioning 
system  refers  to  a  wireless  network  infrastructure  that  provides  indoor 
location information to any requesting end user.  
 
One  of  the  key  technical  elements  allowing  the  realisation  of  this  vision  will 
be  the  knowledge  of  the  accurate  position  of  the  person/objects.  Already, 
today accurate location, mechanisms, such as GPS are commercially available. 
Many  more  will  become  part  of  our  daily  life  with  the  introduction  of  third 
generation mobile phones. But none of these techniques will allow the meter 
or sub‐meter level of accuracy within buildings, which is necessary for smart 
houses.  Hence,  this  report  introduces  an  object  tracking  application  in  an 
indoor environment using IEEE 802.15.4 compliant radios, which gives meter 
level accuracy. 
 
First,  this  chapter  presents  the  background  of  indoor  positioning  systems, 
identifies  the  challenges  of  such  systems,  and  briefly  describes  the  scope  of 
indoor positioning systems based on location fingerprints. Next, the objective 
of  study,  the  overview  of  approaches  and  the  contributions  are  presented. 
Finally, the scope and organization of thesis work is outlined. 
 

1
Indoor Local Positioning System
For ZigBee, Based On RSSI 1 INTRODUCTION
Shashank Tadakamadla 10.10.2006

1.2 Background
The  success  of  outdoor  positioning  and  applications  based  on  the  GPS 
provides an incentive to the research and development of indoor positioning 
systems.  It  has  been  developed  over  several  decades  and  it  relies  on 
constellation  of  satellites.  Ranges  to  several  satellites  are  used  in  multi‐
lateration  procedure  to  infer  the  position  of  the  receiver.  This  localization 
scheme  requires  hardware  that  is  both  expensive  and  consumes  significant 
power.  As  a  result,  indoor  positioning  systems  require  alternative  means  to 
detect the MS location without relying on the direct signal from GPS satellites. 
Infrared, RF, and ultra sound signals are major technologies used for indoor 
positioning  systems.  Unlike  outdoor  areas,  the  indoor  environment  imposes 
different  challenges  on  location  discovery  due  to  the  dense  multi‐path  effect 
and  building  material  dependent  propagation  effect.  Thus,  an  in‐depth 
understanding  of  indoor  radio  propagation  for  positioning  is  crucial  for 
efficient design and deployment.  
 
The  existence  of  radio  connectivity  and  the  attenuation  of  radio  signal  with 
distance  are  attractive  properties  that  could  potentially  be  exploited  to 
estimate  the  positions  of  small  wireless  devices  featuring  low‐power  radios. 
RSSI, a standard feature in most radios, has attracted a lot of attention in the 
recent literature for obvious reasons. RSSI eliminates  the need for additional 
hardware  in  small  wireless  devices,  and  exhibits  favourable  properties  with 
respect  to  power  consumption,  size  and  cost.  As  mentioned  previously,  RF‐
based location tracking has been widely studied [5, 6]. Given a model of radio 
signal  propagation  in  a  building  or  other  environment,  RSSI  can  be  used  to 
estimate  the  distance  from  a  transmitter  to  a  receiver,  and  thereby  estimate 
the  position  of  a  mobile  node.  However,  this  approach  requires  detailed 
models  of  RF  propagation  and  does  not  account  for  variations  in  receiver 
sensitivity and orientation.  
 
Table 1 below briefly summarizes performance of existing indoor positioning 
system  based  on  location  fingerprints  and  WLAN’s.  All  the  systems 
mentioned below in table 1 follow IEEE 802.11 protocol standards. The major 
performance metrics studied by all systems are positioning accuracy which is 
a  form  of  error  measurement.  The  accuracy  of  the  location  information  is 
usually reported as an error distance between the estimated location and the 
actual  mobile  location.  However,  the  report  of  accuracy  should  include  the 
confidence  interval  or  percentage  of  successful  location  detection  which  is 
called  the  precision.  The  system  parameters  of  existing  systems  are 
summarized in table 1 and the best reported performance of these systems are 
listed in table 2.  

2
Indoor Local Positioning System
For ZigBee, Based On RSSI 1 INTRODUCTION
Shashank Tadakamadla 10.10.2006

System Spacing(m) Positions Samples/Pos AP's Orientation Environment


Non
RADAR [6] uniform 70 80 3 4 Hall-way
Saha et al [9] 3 19 1200 3 N/A 1-floor
Roos et al [10] 2 155 40 10 N/A 1-floor
Battiti et at [11] N/A 257 N/A 6 N/A 1-floor
Ladd et al [2] 3 11 1307 5 2 Hall-way
Prasithsangaree 2 to
et al [12] 1.5,3 60 40 7 4 1-floor
Youssef et al[13] 1.5 110 300 4 N/A Hall-way
Xiang et al [14] N/A 100 300 5 4 1-floor
Table 1 Comparison of Indoor Positioning Systems [7] 

System Algorithm Type Accuracy and Precision


RADAR [6] Nearest Neighbour within 7 feet, 38%
no specified accuracy,
Saha et al [9] Nearest neighbour & Neural Network 90%
Roos et al [10] Bayesian best within 8.28 feet, 90%
Neural Network & Weighted k-Nearest
Battiti et at [11] Neighbour all within 16-17 feet, 90%
Ladd et al [2] Bayesian within 5 feet, 77%
Prasithsangaree et al 25 feet at 75% & 40 fet at
[12] Weighted k-Nearest Neighbour 95%
within 7 feet, more than
Youssef et al [13] Bayesian 90%
Xiang et al [14] Bayesian with RSS distribution model within 6 feet, 90%
Table 2 Performance comparison of Indoor Positioning Systems [7] 

Based  on  the  study  of  results  obtained  in  various  positioning  systems  as  in 
table  2,  we  have  developed  a  model  for  an  indoor  positioning  system  using 
SENTIO [8] platform based on RSSI. 
 

1.3 Objectives
In  the  last  two  or  three  years  a  number  of  theoretical,  practical  and/or 
simulation  studies  were  done  on  the  topic  of  object‐tracking.  While  these 
studies  are  useful,  they  are  too  general  and  provide  little  guidance  for  the 
actual  deployment  of  sensor  networks  for  real  life  location‐tracking  of  an 
object. 
 
This  thesis  focuses  on  developing  an  object‐tracking  application  and 
prescribes sensor network configurations that work well with our algorithms. 
I  implemented  my  software  using  SENTIO  [8]  platform  for  sensor 
networking.  The  major  issue  addressed  in  this  project  are  the  accuracy  and 
precision in tracking an object in a real‐world application and efficient ways 
to  algorithmically  analyze  the  collected  raw  data  from  the  specific  wireless 
sensor product. 

3
Indoor Local Positioning System
For ZigBee, Based On RSSI 1 INTRODUCTION
Shashank Tadakamadla 10.10.2006

Although the focus is to develop a real‐world application using WSN, it also 
provides  great  opportunity  to  explore  the  new  area  of  wireless 
communication overall. 

1.4 Research Questions


My primary target is to find a method to determine the position of an object 
inside a building using ZigBee protocol standards based on RSSI. 
The study addresses the following questions. 
What is WSN? 
  What requirements do WSN need? 
  What are their main ideas and concepts? 
What are the associated technologies?  
What are the standards that sensor networks use?  
What  are  the  existing  hardware  implementations  that  use  this 
particular technology?  
How can we build our new applications using WSN?  
What do sensor network systems require for general or specific applications? 
Are they applicable? And what is the appropriate design for sensor network 
implementations in order to combine them with other existing systems?  
 
At this point we describe and evaluate the specific object‐tracking application 
to be built.  

1.5 Scope
The study area of the thesis is an overview of the WSN technology, study of 
SENTIO platform and implementation of an object tracking application. Thus 
the  study  is  divided  into  two  parts.  Part  one  is  an  overview  of  WSN;  it 
includes study of SENTIO platform and IEEE 802.15.4 protocol standards. The 
second  part  describes  the  implementation  of  the  object  tracking  algorithm. 
The object tracking application receives and uses the raw values returned by 
the sensor network system to produce clear and meaningful outputs. Schema 
of thesis work is as shown in figure 1. 
 

4
Indoor Local Positioning System
For ZigBee, Based On RSSI 1 INTRODUCTION
Shashank Tadakamadla 10.10.2006

Figure 1 Schema of thesis work 

1.6 Methodology
The “Indoor Local Positioning System for ZigBee based on RSSI “is based on 
“location  fingerprinting”  technique.  Location  fingerprinting  refers  to  a 
technique that exploits the relation between any measurable physical stimulus 
and a specific location. This approach uses empirical measurements of RSSI to 
estimate  location.  By  recording  a  database  of  radio  “signatures”  along  with 
their known locations, a mobile node can estimate its position by acquiring a 
signature  and  comparing  it  to  the  known  signatures  in  the  database.  All  of 
these  systems  require  the  database  of  signatures  which  should  be  collected 
manually  prior  to  the  system  installation,  and  rely  on  central  server  (or  the 
user’s mobile node) to perform location calculation. For example, in RADAR 
[6] technology, the RSSI is the stimulus. This type of positioning system does 
not  require  specialized  hardware  other  than  the  common  wireless  network 
interfaces  with  received  signal  strength  measurement  capability;  thus,  it  is 
simple  to  deploy  compared  to  other  techniques.  Unlike  outdoor  counterpart 
systems  which  can  use  AOA  and  TDOA  techniques  effectively,  indoor 
positioning systems encounter the problem of NLOS and the dense multi path 
effect  that  render  these  two  techniques  ineffective  or  complex  for  practical 
implementation. It is also difficult for a MS to always see three or more access 
points  or  base  stations  in  indoor  environment,  which  is  essential  for 
triangulation  by  AOA  and  TDOA.  Location  fingerprinting  can  also  be 
implemented  as  software  based  positioning  system  which  can  reduce 

5
Indoor Local Positioning System
For ZigBee, Based On RSSI 1 INTRODUCTION
Shashank Tadakamadla 10.10.2006

complexity  and  cost.  Generally,  the  deployment  of  fingerprinting  based 


positioning systems can be divided into two phases.  
 
First, in the off‐line phase, the locations where the fingerprints are required is 
pre‐determined, and then the fingerprints are collected by performing a site‐
survey  of  the  RSS  from  multiple  APs.  The  distance  between  two  closest 
positions  is  called  grid  spacing  and  usually  reported  in  meters  or  feet. 
However,  some  points  may  be  omitted  due  to  inaccessibility.  The  RSS  is 
measured at each predetermined location to create a database of RSS patterns 
of  the  indoor  environment.  The  database  of  RSS  patterns  is  called  a  radio 
map.  The  vector  of  RSS  values  at  a  point  on  the  grid  is  called  the  location 
fingerprint of that point.  
 
Second,  in  the  on‐line  phase,  a  MS  will  report  a  sample  measured  vector  of 
RSS from different APs to a base station. The base station uses a positioning 
algorithm  to  estimate  the  location  of  the  MS.  The  most  common  algorithm 
used  to  estimate  the  location  is  Euclidean  algorithm.  It  computes  the 
Euclidean distance between the measured RSS vector and each fingerprint in 
the  database  and  then  the  coordinates  associated  with  the  fingerprint  that 
provides  the  smallest  Euclidean  distance  is  returned  as  the  estimate  of  the 
position.  
 
It is clear from the above discussion that the designer should not start out to 
do  the  site  survey without proper system design objectives  and  guideline.  If 
the  performance  is  not  sufficient,  collecting  more  fingerprints  in  between 
previous  location  fingerprints  may  help.  It  is  a  problem  of  choice  as  to  how 
many  access  points  are  required  for  the  system  and  what  the  minimum 
distance between physical positions on the grid should be in order to provide 
a  good  position  resolution  and  best  system  performance.  The  system 
parameters  and  factors  that  improve  the  accuracy  and  the  precision 
performance are still not clear.  

1.7 Outline
Chapter 2 provides literature review of “Indoor Local Positioning System for 
ZigBee  based  on  RSSI”;  it  introduces  the  basic  components  required  for  a 
positioning  system,  general  classification  of  indoor  positioning  system. 
Finally, it explains “Location Fingerprint” technology used in this thesis work 
to  determine  the  position  of  an  object  in  a  real‐world  application.  It  briefly 
explains the protocols and industry standards for wireless sensor networks. 
 
Chapter 3 describes some properties of RSS which is a stimulus to determine 

6
Indoor Local Positioning System
For ZigBee, Based On RSSI 1 INTRODUCTION
Shashank Tadakamadla 10.10.2006

the position of an object. RSS relation with energy and on what parameters is 
the RSS value dependent. 
 
Chapter  4  describes  the  model  of  an  indoor  local  positioning  system  and  its 
probability  of  returning  the  correct  location.  It  also  explains  its  performance 
evaluation and its error distance distribution.  
 
Chapter 5 describes results obtained from the model of positioning system. 
 
Chapter  6  includes  conclusions  from  the  experimental  analysis  and  future 
work. 

7
Indoor Local Positioning System
For ZigBee, Based On RSSI 2 LITERATURE REVIEW
Shashank Tadakamadla 10.10.2006

2 LITERATURE REVIEW
This chapter reviews the literature on wireless indoor positioning system, as a 
means  of  providing  an  intellectual  background  for  the  thesis  work.  First  in 
section  2.1,  the  common  components  of  indoor  positioning  system  are 
described.  Then  in  section  2.2,  discusses  different  means  to  classify  indoor 
positioning  systems.  In  section  2.3,  reviews  of  all  relevant  literature  on 
location  fingerprint  technique.  Finally  in  section  2.4,  protocols  and  industry 
standards for wireless sensor networks are explained. 

2.1 Common components of indoor positioning system


Basically, a wireless local positioning system consists of at least two separate 
hardware  components:  a  measurable  unit  that  usually  carries  the  major  part 
of the system intelligence and a signal transmitter/receiver. The transmitter in 
the simplest case is just a beacon. Figure 2 represents basic hardware model of 
a positioning system. 

Figure 2 Block diagram representing hardware module 

First, the location sensing devices detect the signals transmitted by or received 
at  known  reference  points  using  radio  sensing  technologies.  The  sensing 
technique is based on signal strength level that converts the sensed signal into 
RSS.  Given  a  set  of  reference  points,  the  relative  position  of  the  MS  can  be 
derived  from  the  signal  characteristics  of  RSS.  The  signal  characteristics  of 
RSS are unique for a location. Then, the microcontroller processes the position 
algorithm and estimates the position of object and displays it on PC.  

8
Indoor Local Positioning System
For ZigBee, Based On RSSI 2 LITERATURE REVIEW
Shashank Tadakamadla 10.10.2006

2.2 Classification of Indoor positioning systems


Indoor  positioning  system  can  be  categorized  based  on  the  stimulus used  in 
particular application and measurement principle. 
 

2.2.1 Classification based on Stimulus


Based  on  the  stimulus  used  in  an  application,  WSN  inherit  certain 
characteristics  and  limitations  on  sensor’s  signal.  The  propagation  delay, 
diffraction, reflection and scattering are the basic signal characteristics which 
affect  all  signal  types.  The  effective  range,  available  bandwidth,  regulatory 
constraints,  interference,  power  constraints,  safety  and  cost  of  technology 
limitations.  The  wireless  signals  commonly  used  for  indoor  positioning 
systems are infrared, radio frequency and ultrasound. Brief descriptions of the 
three major technologies are as follows: 

Infrared:  Infrared  signal  is  an  electromagnetic  signal  of  a  wavelength 


longer than that of visible light, but shorter than that of radio waves. Infrared 
is  just  below  the  visible  spectrum  of  light  in  frequency  and  is  radiated 
strongly  by  hot  bodies.  Many  objects  such  as  people,  vehicle  engines  and 
aircraft  generate  and  retain  heat,  and  as  such,  are  especially  visible  in  the 
infrared  wavelengths  of  light  compared  to  objects  in  the  background.  It 
cannot  pass  through  walls  or  obstructions;  therefore,  it  has  a  rather  limited 
range of indoor environments. Thus, it requires a more sophisticated circuitry 
than ultrasound signals. Indoor lighting interferes with this type of signal and 
causes problems in accurate sensing. It generally has a range of around 5 m. 
The  infrared  devices  are  usually  small  in  size  compared  to  ultrasound 
devices. 
 
Radio  frequency:  The  RF  signal  can  penetrate  through  most  of  the 
building material; therefore, it has an excellent range in indoor environments. 
The  propagation  speed  is  also  high,  approximately  3*108  m/s.  There  are 
unlicensed  frequencies  available  freely  for  use.  This  type  of  signal  has  the 
longest  range  compared  to  infrared  and  ultrasound.  Since  the  propagation 
waves  are  of  higher  frequency  (2.4GHz),  interference  with  other  frequency 
components is less. 
 
Ultrasound:  Although  ultrasound  operates  at  low  frequency  bands 
(typical  40  kHz)  compared  to  the  other  two  signaling  technologies,  it 
possesses a good precision for location sensing at a slow propagation speed of 
sound  (343  m/s).  The  advantages  of  ultrasound  devices  are  their  simplicity 
and that they are inexpensive. However, ultrasound does not penetrate walls 

9
Indoor Local Positioning System
For ZigBee, Based On RSSI 2 LITERATURE REVIEW
Shashank Tadakamadla 10.10.2006

but reflects off most of the indoor obstructions. It has a short range around 3 
m to 10 m but has a 1 cm resolution of distance measurement. The operating 
temperature influences the performance of ultrasound. 
 

2.2.2 Classification based on measurement principle


Wireless positioning systems can be categorized by measurement techniques 
which  are  used  to  derive  the  position  of  mobile  stations.  Mainly,  three 
different measurement principles are used today: AOA, RSS and propagation‐
time based systems that can further be divided into two different sub‐classes: 
TOA and TDOA. Figure 3 shows taxonomy based on the technology and the 
technique classifications. 
 

Figure 3 Taxonomy of positioning system [7] 

In  AOA  systems,  the  position  is  calculated  via  goniometry.  With  the  use  of 
directional antennas or antenna arrays, the angle or bearing relative to points 
located at known positions is measured. The intersection of several measured 
directions  pointers  the  yields  the  position  value.  The  accuracy  of  this 
approach is limited by the possible directivity of the measuring aperture, by 
shadowing and by multi‐path reflections arriving from misleading directions.  
 
In  TOA  and  TDOA  techniques  rely  on  the  precision  of  timing  between  the 
signal  transmitter  and  the  receiver  in  order  to  use  the  propagation  delay  or 
TOF  to  calculate  the  distance  between  transmitter  and  receiver.  Therefore,  a 
precise synchronization is also very important in such systems. By combining 
at  least  three  distances  from  three  reference  positions,  triangulation  can  be 
used  to  estimate  the  mobile  stationʹs  location.  This  type  of  technique  will 

10
Indoor Local Positioning System
For ZigBee, Based On RSSI 2 LITERATURE REVIEW
Shashank Tadakamadla 10.10.2006

require  a  high  accuracy  clock  in  the  communication  system.  TDOA  is  more 
practical [1]. Examples of location‐sensing systems that use time of flight are 
GPS, the Active Bats [15], and the Cricket [16]. Besides these time delay‐based 
techniques,  the  distance  between  transmitter  and  receiver  can  also  be 
determined from signal strength attenuation and direct distance measurement 
(such as dead reckoning). 
 
Fingerprinting  or  Location  Pattern  Matching,  this  technique  generally 
requires only measurement of RSS or other non‐geometric features at several 
locations  to  form  a  database  of  location  fingerprints.  To  estimate  the  mobile 
location,  the  system  needs  to  first  measure  the  received  signal  strength  at 
particular  locations  and  then  search  for  the  pattern  or  fingerprint  with  the 
closest  match  in  the  database.  This  technique  does  not  require  the  mobile 
station to see at least three base stations or access points in order to determine 
the  location.  The  disadvantage  of  this  technique  is  that  it  is  very  time‐
consuming to perform an exhaustive data collection for a wide area network 
such as in outdoor positioning systems.

2.3 Indoor local positioning using ZigBee based on RSSI


This section reviews relevant RF‐based indoor positioning systems which can 
be  used  to  locate  stationary  objects  and  track  mobile  users.  The  impressive 
growth  of  IEEE  802.15.4  wireless  PANs  (WPAN)  in  recent  years  suggests  an 
interesting  future  for  the  location  fingerprinting  technique.  The  system  is 
quite  flexible  because  system  designers  can  select  whether  to  have  a 
centralized positioning server or let the mobile to determine its own position. 
However,  the  fingerprinting  technique  requires  a  training  phase  (off‐line 
phase)  to  collect  location  fingerprints  for  all  positions  in  the  operating  area, 
before the actual deployment (on‐line phase) [7]. 
 
The  following  discussion  is  divided  according  to  the  positioning  system 
components.  First,  the  common  form  of  location  fingerprinting  and  its 
relationship with physical locations are explained. Finally, location estimation 
algorithm is reviewed. 
 

2.3.1 Location Fingerprint


A location fingerprint based on RF characteristics such as RSS is the basis for 
representing  a  unique  location.  It  is  created  under  the  assumption  that  each 
position or location inside a building has unique RF signature [4]. Generally, a 
fingerprint  F  is  labelled  with  a  location  information  L.  The  location 
fingerprints  and  their  labels  (e.g.  location  information)  are  maintained  in 

11
Indoor Local Positioning System
For ZigBee, Based On RSSI 2 LITERATURE REVIEW
Shashank Tadakamadla 10.10.2006

database and used during the on‐line phase to estimate the location. The label 
and fingerprint are usually denoted as a tuple of (L, F). Battiti et al [11] point 
out that the location information L for indoor location can be recorded in two 
forms  as  either  a  tuple  of  coordinates  or  an  indicator  variable.  The  tuple  of 
real  coordinates  can  vary  from  one  dimension  to  five  dimensions  which 
include the three dimension space and two orientation variables expressed in 
spherical coordinates. For instance, a location information of a two‐dimension 
system with an orientation could be expressed as a triplet L = {(x, y, d) | x, y є 
R 2, d є {North, East, South, West}}.  
 
The RSS was found to be more location‐dependent than the SNR because the 
noise  component  is  rather  random  in  nature.  However,  the  RSS  itself 
fluctuates over time for each access point and location. Each RSS element can 
be considered as a random variable; therefore, it can be captured by recording 
its  descriptive  statistics  parameters,  approximating  its  distribution,  or 
maintaining  the  whole  measurement  dataset.  These  approaches  of  RSS 
representation  result  in  different  procedures  for  location  estimation 
algorithm.  Regardless  of  the  approach,  the  location  fingerprint  is  usually 
denoted as an array or vector of signal strength (random variables) received at 
any  position  in  the  location‐based  service  area.  The  size  of  the  vector  is 
determined by the number of access points that can be heard. 
 
To  create  a  basis  fingerprint  such  as  in  a  number  of  samples  of  vectors  of 
signal  strength  are  collected  over  a  window  of  time  for  each  position.  This 
basis  is  called  a  prototype.  Then,  the  average  RSS  of  each  access  point  is 
calculated and recorded as an element in the location fingerprint. For an area 
that can receive  signals from N access  points, the location fingerprint can be 
expressed as a vector of average RSS elements βi:     
F = (β1, β2… βN)T 
Besides  the  basis  location  fingerprint,  the  samples  of  location  fingerprint 
measured  during  the  on‐line  phase  are  also  important  for  the  system  that 
tracks  the  mobile  object.  The  number  of  samples  should  be  selected 
appropriately to represent the location fingerprint for the mobile application. 
A step in statistical analysis method called pre‐processing is another important 
issue  needed  to  be  considered  because  it  can  impact  the  estimation  of 
dependency between location fingerprint and the location information easier. 
The  pre‐processing  refers  to  a  step  that  cleans  the  raw  data  (in  this  case  the 
training  set)  before  any  further  operations  or  analysis.  The  cleaning  may 
consist of encoding, dimensionality reduction (reduce unnecessary elements), 
feature extraction/selection, clustering, and outlier elimination. Roos et al [10] 
point  out  that  the  pre‐processing  enables  faster  location  estimation  and 

12
Indoor Local Positioning System
For ZigBee, Based On RSSI 2 LITERATURE REVIEW
Shashank Tadakamadla 10.10.2006

reduce the noise from the training data. The process that creates the basis of 
location  fingerprint  discussed  above  could  be  considered  as  a  part  of  pre‐
processing. 
 

2.3.2 Location Estimation Algorithm


Location estimation algorithms or positioning algorithms are procedures that 
exploit  dependency  between  location  information  and  location  fingerprint 
basis in order to determine a position or location from samples of RSS signals. 
Position algorithms can be classified into deterministic and probabilistic types 
based  on  the  approaches  that  model  the  relationship  between  location 
fingerprints  and  location  information.  The  deterministic  type  of  algorithms 
are  those  that  based  in  the  nearest  neighbour  classifiers  and  neural  network 
classifiers. The probabilistic type of algorithms is those that are based on the 
Bayesian  inference  and  statistical  learning  theory  such  as  support  vector 
machines (SVR). The algorithm used in this project is discussed briefly: 
 
Euclidean  distance  method:  The  Euclidean  distance  method  is  a 
deterministic approach of position estimation because they require only a set 
of  constant  location  fingerprints  which  includes  mean  vectors.  In  order  to 
determine  the  location,  a  form  of  discriminate  function  is  used  to  classify  a 
sample of RSS fingerprint into a position. The mean or average RSS vector is a 
centre of a mass which represents each class of location fingerprint Suppose, a 
set  of  l  location  fingerprints  is  denoted  by  {F1,  F2…  Fl}  exist  and  each 
fingerprint  has  a  one‐to‐one  mapping  to  a  set  of  positions  {L1,  L2…  Ll}.  A 
sample of an RSS fingerprint measured during an on‐line phase is denoted as 
S which can be another mean or average RSS vector of small window of RSS 
samples.  Assuming  that  an  indoor  positioning  system  only  considers  the 
average RSS from N access points as a location fingerprint, the sample of RSS 
vector is S = (s1, s2, ……, sN)T and each location fingerprint i in the database can 
be expressed as Fi = (β1 , β2,…….., βN)T. The simplest closeness metric is a distance 
measurement  in  signal  space  denoted  as  the  Dist  (·)  function  [6].  Thus,  the 
simple procedure of nearest neighbour algorithm is expressed as picking the 
fingerprint j that has the shortest signal distance:  
Dist(S, Fj) ≤ Dist(S, Fk), for all k ≠ j. 
A  generalized  weighted  distance  Lp  summarized  by  [12]  can  be  used  to 
calculate different forms of distance in signal space as: 
N
Lp = 1/N  (∑ 1 / Wi | Si − Pi | p )1 / p  
i =1
where N is the number of access points, wi is a weighting factor (wi ≤ 1), and p 
is  the  norm  parameter  starting  from  1.  The  weighting  factor  wi  is  a  bias 

13
Indoor Local Positioning System
For ZigBee, Based On RSSI 2 LITERATURE REVIEW
Shashank Tadakamadla 10.10.2006

parameter  that  can  demote  or  promote  an  important  RSS  component  in  the 
fingerprint. 
 

2.4 Protocols and Industry standards for WSN


Although  many  applications  for  WSN  are  proposed,  the  communication 
protocols  supporting  them  remain  mainly  unexplored  and  diverged.  This  is 
because  the  area  of  interest  is  new,  each  implementation  is  application 
specific,  and  the  components  of  WSN’s  have  a  lot  of  constraints.  Wireless 
sensor  networks  use  the  wireless  medium  to  communicate.  However,  the 
traditional  communication  protocols  that  support  wireless  communications, 
especially  ad‐hoc  mesh  networks,  may  not  be  well  suited  for  them.  WSN 
communication is an active research area, and many algorithms and protocols 
have already been proposed. This section introduces two proposed standards: 
the IEEE 802.15.4 and the ZigBee. The IEEE 802.15.4 covers the physical layer 
and the MAC layer of low‐rate WPAN. The ZigBee is “an emerging standard 
that  is  based  on  the  IEEE  802.15.4  and  adds  network  construction  (star 
networks,  peer‐to‐peer/mesh  networks,  and  cluster‐tree  networks), 
application services, and more”.  

2.4.1 IEEE 802.15.4


Holger  and  Willig  (2005)  [17]  mention  home  automation,  home  networking, 
and  home  security  as  possible  applications  for  IEEE  802.15.4.  They  add  that 
“most of these applications require only low‐to‐medium bitrates (up to some 
few hundreds of kbps), moderate average delays without too stringent delay 
guarantees,  and  for  certain  nodes  it  is  highly  desirable  to  reduce  the  energy 
consumption to a minimum.”  
 
The IEEE 802.15.4 standard (2003) defines the device types that can be used in 
a LR‐WPAN. A device can be a FFD or a RFD. The RFD can be used in simple 
applications in which they do not need to transmit large amounts of data and 
they  have  to  communicate only  with a specific  FFD.  The FFD can work as a 
PAN coordinator, as a coordinator, or as a simple device. It can communicate 
with either another FFD or a RFD.  
 
In  keeping  with  the  application  requirements,  the  LR‐WPAN  operates  in  a 
star  or  peer‐to‐peer  topology  (figure  4).  In  the  star  topology  the  RFD 
communicates  with  a  single  controller,  the  PAN  coordinator.  The  PAN 
coordinator  can  perform  the  same  function  as  the  RFD,  but  it  is  also 
responsible  for  controlling  the  PAN;  “it  initiates,  terminates,  or  routes 
communication  around  the  network”  [18].  The  peer‐to‐peer  topology 

14
Indoor Local Positioning System
For ZigBee, Based On RSSI 2 LITERATURE REVIEW
Shashank Tadakamadla 10.10.2006

supports ad‐hoc mesh multi‐hop networking. Any device in the peer‐to‐peer 
topology  can  communicate  with  any  other  device  within  its  communication 
range; however, this topology also has a PAN coordinator. All the devices in a 
LR‐WPAN have a unique 64‐bit address. This or a short address, allocated by 
the PAN coordinator, can be used inside a PAN. Additionally, each PAN has 
a  unique  identifier.  The  combination  of  the  PAN  identifier  and  the  sort 
addresses  allows  communication  across  different  PANs  (IEEE  802.15.4 
Standard, 2003).  
 

Figure 4 Star and peer‐to‐peer topologies in LR‐WPAN [18] 
 
The  LR‐WPAN  based  on  the  OSI  seven‐layer  model  has  the  layered 
architecture  presented  in  figure  5.  The  application  and  the  network  layer  are 
the  upper  layers  in  the  LR‐WPAN  architecture,  but  are  outside  the  scope  of 
the  IEEE  802.15.4  standard.  Only  the  physical  layer,  “which  contains  the  RF 
transceiver along with its low‐level control mechanism,” and the MAC layer 
“that  provides  access  to  the  physical  channel”  are  included  in  the  standard 
and will be introduced in the following sections. Finally, the Type I 802.2 LLC 
and the SSCS are intermediate sub layers supporting communication with the 
above layers (IEEE 802.15.4 Standard 2003).  

Physical Layer 
The 802.15.4 standard specifies two different services that the PHY provides. 
The  PHY  data  service  controls  the  radio,  and  thus,  the  transmission  and 
reception of the PPDUs. In addition, the management service performs ED in 
the channel. The management service also performs CCA before sending the 
messages and provides LQI for the received packets. 

15
Indoor Local Positioning System
For ZigBee, Based On RSSI 2 LITERATURE REVIEW
Shashank Tadakamadla 10.10.2006

Figure 5 WPAN architecture [18] 

Three  different  bands  are  defined  by  the  standard.  The  868‐868.6  MHz  for 
Europe,  the  902‐928  MHz  for  North  America,  and  the  2400‐2483.5  MHz 
worldwide.  All  of  them  belong  in  the  ISM  radio  bands  and  they  are  using 
DSSS. Each of the bands supports different a data rate and it uses a different 
modulation  technique,  chip  rate,  and  number  of  channels.  Moreover,  if  the 
system does not use the 2450 MHz frequency, it operates in both the 802 MHz 
and 902 MHz frequencies. Table 3 summarizes the supported bands and data 
rates (IEEE 802.15.4 standard, 2003).  

PHY Frequency Band Bit


(MHz) (MHz) Modulation Rate Number of Channels
868-868.6 BPSK 20 1
868 / 915 902-928 BPSK 40 10
2450 2400-2483.5 O-QPSK 230 16
Table 3 Frequency bands and data rates for IEEE 802.15.4 based on the IEEE 
802.15.4 standard [18] 

The physical layer uses PPDU packets to communicate. Table 4 demonstrates 
its  structure.  The  LSB  is  always  transmitted  and  received  first.  The  SHR, 
contains  the  preamble  and  the  SFD  fields,  which  helps  receiver 

16
Indoor Local Positioning System
For ZigBee, Based On RSSI 2 LITERATURE REVIEW
Shashank Tadakamadla 10.10.2006

synchronization.  The  8‐bytes  preamble  contains  only  zero  and  is  used  for 
synchronization.  The  SFD  contains  a  specific  sequence  of  one  and  zeros  and 
specifies  the  beginning  of  the  frame.  The  PHR  contains  the  payload  length. 
Packets with a length of 9 or more bytes are MPDU, as the next section further 
explains.  Packets  with  length  5  are  used  for  MPDU  acknowledgements.  The 
payload part of the PPDU encloses the MAC layer packet. Finally, the PPDU 
size can be up to 127 bytes [18].  

4 bytes 1 byte 1 byte Variable


Frame length Reserved Payload
Preamble SFD (7 bits) (1 bit) (PSU)
SHR PHR PHY Payload
Table 4 Format based on the IEEE 802.15.4 standard [18] 

MAC Layer
The MAC layer is the interface between the SSCS and the PHY layer. Similar 
to the PHY layer, the MAC layer supports two services. The MAC data service 
is  responsible  for  the  transmission  and  reception  of  the  MPDUs  through  the 
PHY  data  service.  The  MAC  management  service,  if  the  device  is  a 
coordinator,  manages  the  network  beacons.  It  is  also  responsible  for  PAN 
association  and  disassociation,  frame  validation,  and  acknowledgment 
providing  “a  reliable  link  between  two  peer  MAC  entities.”  In  addition,  it 
uses  the  CSMA‐CA  for  channel  access  and  handles  and  maintains  the  GTS 
mechanism. Finally, it supports device security [18].  
 
The  IEEE  802.15.4  standard  defines  four  different  frame  types:  the  beacon, 
data, acknowledgment, and MAC command frame. All frame types are based 
on the general MAC frame format (table 5). The frame control field describes 
and specifies the above different frame types. Every MAC frame comprises a 
MHR,  which  consists  of  a  frame  control,  sequence  number,  and  the 
information  field.  It  also  contains  the  MAC  payload;  different  frame  types 
have different MAC payload fields. The acknowledgment type does not have 
a  payload.  Finally,  each  frame  includes  a  MFR,  which  contains  a  FCS.  The 
data  in  the  MPDU  follows  the  same  order  as  the  PPDU:  the  least  significant 
bits are left in the frame and are transited first.  
Octets:2 1 0/2 0/2/8 0/2 0/2/8 Variable 2
Source
Destination Destination PAN Source
Frame Sequence PAN Identifier Address Identifier Address Frame
Control Number Addressing Field Payload FCS
MAC
MHR Payload MFR
Table 5 General MAC frame format: IEEE 802.15.4 standard [18] 

17
Indoor Local Positioning System
For ZigBee, Based On RSSI 2 LITERATURE REVIEW
Shashank Tadakamadla 10.10.2006

Table  6,  7,  8  and  9  present  the  four  different  MAC  frame  types.  The  beacon 
frame  is  transmitted  periodically  by  the  PAN  coordinator.  It  provides 
information  about  the  network  management  through  the  super  frame  and 
GTS  fields,  which  are  analyzed  later  in  the  section.  It  also  synchronizes  the 
network  devices  and  indicates  the  proper  communication  period  for  them. 
The  data  frame  payload  encapsulates  data  from  the  higher  layers.  When  a 
device  receives  a  packet,  it  is  not  obliged  to  response  with  an 
acknowledgement  packet.  Finally,  the  command  frame  identifier  and 
command payload fields of the command frame are used for communication 
between  the  network  devices.  The  command  identifier  specifies  actions  like 
association, disassociation, and data, GTS or beacon request.  

Octets:2 1 4/10 2 Variable Variable Variable 2


Pending
Frame Sequence Addressing Super frame GTS Addressing Beacon
Control Number Fields Specification fields Fields Payload FCS
MHR MAC Payload MFR
Table 6 Beacon frame format [18] 

Octets :2 1 Variable 2
Frame Sequence Addressing Data
Control Number Field Payload FCS
MAC
MHR Payload MFR
Table 7 Data frame format [18] 

Octets :2 1 2
Frame Sequence
Control Number FCS
MHR MFR
Table 8 Acknowledgement frame format [18] 

Octets:2 1 1 Variable 2
Frame Sequence Addressing Command Frame Command
Control Number Fields Identifier Payload FCS
MHR MAC Payload MFR
Table 9 Command frame format [18] 
 
In the LR‐WPAN, every PAN has its own coordinator. The PAN coordinator 
manages the communication in the local area; it has two options, to use or not 
use  the  super  frame  structure.  The  super  frame  (figure  6)  uses  network 
beacons.  If  the  coordinator  does  not  want  to  use  a  super  frame  structure,  it 
suspends  the  beacon  transmission.  However,  the  beacon  is  important  for 
device  association  and  disassociation.  If  the  coordinator  wishes  to  maintain 
close communication control in the PAN, and to support low‐latency devices, 
it  usually  uses  the  super  frame.  A  super  frame  determines  a  specific  time 

18
Indoor Local Positioning System
For ZigBee, Based On RSSI 2 LITERATURE REVIEW
Shashank Tadakamadla 10.10.2006

period; beacons bound it. The beacon is transmitted in the first of the sixteen 
equal  time  slots  that  the  super  frame  has.  It  is  used  to  “synchronize  the 
attached  devices,  to  identify  the  PAN,  and  to  describe  the  structure  of  the 
super  frame.”  The  super  frame can  have  active  and  inactive  periods.  All  the 
communications  have  to  be  finished  inside  the  super  frame  period.  In  the 
inactive periods the devices can switch to the sleep mode, but they have to be 
ready for the next beacon. The active period is further divided into a CAP and 
a  CFP.  During  the  CAP,  any  device  can  communicate,  competing  with  the 
other  devices  in  the  PAN  using  slotted  CSMA‐CA.  The  CFP  contains  GTSs 
and  follows the CAP. A CFP may  maintain up to seven  GTSs and each GTS 
can  reserve  more  than  one  time  slot.  However,  the  CAP  should  always  be 
sufficient  to  allow  new  devices  t  join  the  PAN.  The  GTSs  are  allocated  to 
specific  devices.  All  the  transactions  must  be  completed  inside  the  assigned 
time period (CAP, GTS, and CFP) (IEEE 802.15.4 standard, 2003).  

Figure 6 Example of super frame structure [18] 

In accordance with the 802.15.4 standard (2003), three different types of data‐
transfer exist. In addition, the types differ if the coordinator uses or does not 
beacons. Data transfer from a device to the PAN coordinator is the first type 
(figure  7).  For  a  “non‐beacon‐enable  network,”  it  first  senses  the  medium  by 
using “un‐slotted CSMA‐CA” and then a simple transmit to the data frame. In 
a “beacon‐enabled network,” the sender waits for the beacon; when it finds it, 
“the  device  synchronizes  to  the  super  fame  structure.”  In  the  specified  time 
frame, the sender again senses the medium by using “slotted CSMA‐CA” and 
transmits  the  data  to  the  coordinator.  In  either  case,  the  coordinator  has  the 
option to acknowledge or not acknowledge the data reception; after that, the 
transaction is completed.  

Data transfer from the coordinator is the next type described in the standard 
(figure  8).  In  a  beacon‐enabled  network  the  coordinator  indicates  a  pending 
message through the beacon. The message’s target device receives the beacon 
and  if  the  message  is  pending,  it  responses  with  a  MAC  command  request 

19
Indoor Local Positioning System
For ZigBee, Based On RSSI 2 LITERATURE REVIEW
Shashank Tadakamadla 10.10.2006

message,  using  slotted  CSMA‐CA.  the  coordinator  may  or  may  not 
acknowledge  the  command  message  and  through  slotted  CSMA‐CA  sends 
the  pending  message.  The  device  acknowledges  the  received  message.  After 
that, the coordinator removes the message from the beacon’s pending list and 
completes  the  transaction.  In  a  non‐beacon  enable  network  the  device 
periodically  sends  a  MAC  command‐request  frame  to  the  coordinator.  The 
coordinator acknowledges the data request. Then, by using un‐slotted CSMA‐
CA, if it has a pending message it transmits it. If it has not it respond with a 
data  frame  with  a  “zero‐length  payload.”  To  complete  the  transaction  the 
device acknowledges the data reception.  

Figure 7 Communication from a device to a PAN coordinator in (a) a 
beacon‐enabled network, and (b) a non‐beacon enabled network [18] 

Peer‐to‐peer  is  the  last  type  of  data  transfer.  In  this  situation  the  devices  are 
free to communicate with any other device within their communication range. 
In  a  peer‐to‐peer  PAN  the  devices  can  “either  receive  constantly  or 
synchronize  with  each  other.”  If  they  are  receiving  constantly,  to  transmit 
data they use un‐slotted CSAM‐CA. In the second case, synchronization must 
be achieved first (IEEE 802.15.4 standard [IEEE, 2003]).

The  IEEE  802.15.4  (2003)  standard  establishes  MAC  and  PHY  standards  for 
low‐cost, low‐power, and high‐density node deployments. In addition to the 
above  PHY  and  MAC  characteristics,  IEEE  802.15.4  provides  a  security 
baseline,  including  “the  ability  to  maintain  an  ACL  and  use  symmetric 
cryptography” for data encryption. The algorithm that is used for encryption 
is the AES. However, the higher level layers decide when security is need. The 
upper  layers  are  in  general  responsible  for  device  authentication  and  key 
management.  The  next  section  introduces  the  ZigBee  standard,  which 

20
Indoor Local Positioning System
For ZigBee, Based On RSSI 2 LITERATURE REVIEW
Shashank Tadakamadla 10.10.2006

encapsulates  the  IEEE  802.15.4  and  provides  additional  standardization  for 


the higher levels.  

Figure 8 Communication from a PAN coordinator to a device in (a) a 
beacon‐enabled network, and (b) a non‐beacon enabled network [18] 
 
2.4.2 ZigBee
Heily  (2004)  defines  ZigBee  as  “a  rapidly  growing,  worldwide,  non‐profit 
industry  consortium”  whose  mission  is  “to  define  a  reliable,  cost‐effective, 
low‐power,  wirelessly  networked,  monitoring  and  control  product  based  on 
an open global standard.” Figure 9 illustrates the areas of interest for different 
wireless communication standards.

Figure 9 Overview of the coverage for different wireless communication 
standards [17] 

21
Indoor Local Positioning System
For ZigBee, Based On RSSI 2 LITERATURE REVIEW
Shashank Tadakamadla 10.10.2006

ZigBee,  a  new  standard  which  became  publicly  available  in  June  2005,  is 
based on the IEEE 802.15.4 standard. It expands the IEEE 802.15.4 by adding 
the  framework  for  “the  network,  security  and  application”  (Craig,  2005). 
Figure  10  presents  the  IEEE  802.15.4/ZigBee  stack  and  the  areas  of 
responsibilities.  

Figure 10 IEEE 802.15.4/ZigBee stack [20] 

Craig  (2005)  mentions  three  networking  topologies  that  the  standard  covers: 
the star, mesh, and cluster tree (figure 11). The ZigBee standard works on top 
of the IEEE 802.15.4 addressing schema by using the standard 64‐bit and the 
short 16‐bit addressing. Kinney (2005) summarizes the ZigBee network layer 
responsibilities:  the  successful  establishment  of  a  new  the  network,  and 
successful  new  device  configuration,  addressing  assignment,  network 
synchronization, frames security, and message routing.  
 
ZigBee  further  distinguishes  the  concept  of  the  physical  devices  (RFD,  FFD) 
by using the notion of “logical devices.” “ZigBee Coordinator” is the first type 
of logical devices. It is responsible for initializing, maintaining, and managing 
the  network.  Under  the  coordinator  in  the  network  hierarchy  is  the  “ZigBee 
router,” which is responsible for controlling the message routing between the 
nodes. Finally, the “ZigBee End Device” acts as the end point of the network 

22
Indoor Local Positioning System
For ZigBee, Based On RSSI 2 LITERATURE REVIEW
Shashank Tadakamadla 10.10.2006

structure.  The  tasks  that  an  end  device  can  perform  are  specified  in  the 
“Application Profiles” (Craig, 2005).  

Figure 11 IEEE 802.15.4/ZigBee stack [17] 

The ZigBee specifications (2005) summarize the security services provided by 
ZigBee:  “key  establishment,  key  transport,  frame  protection,  and  device 
management.”  ZigBee  builds  its  security  mechanism  using  symmetric  key 
cryptography. The security services also depend on the associated layer, thus 
as  the  figure  10  shows,  the  security  mechanism  covers  the  network  and  the 
application layer. In addition, if a MAC frame needs security  protection, the 
MAC layer is able to secure it. Moreover, the notion of end‐to‐end security is 
supported;  the  source and destination  devices have access and use  the same 
share key.  

In the MAC layer the 802.15.4 AES mechanism provides the proper security. 
The mechanism protects “the confidentiality, integrity, and authenticity of the 
MAC frames” (Kinney,  2005).  An  auxiliary  header field  in  front  of the MAC 
payload indicates if the frame is encrypted or not. The MAC frames’ integrity 
is supported by calculating and using a MIC at the end of the MAC payload. 
In  addition  to  the  AES,  nonce  is  used  to  provide  MAC  confidentiality  and 
authenticity.  Figure  12  illustrates  a  MAC  frame  with  security.  For  different 
security  aspects  the  MAC  layer  uses  different  mode  of  the  AES:  for  the 
encryption it uses the AES in Counter (CTR) mode, and for the integrity, the 

23
Indoor Local Positioning System
For ZigBee, Based On RSSI 2 LITERATURE REVIEW
Shashank Tadakamadla 10.10.2006

CBC‐MAC.  Finally,  the  combination  (CCM)  of  the  above  two  modes  is 
available, providing both encryption and integrity (Kinney, 2005).  

Figure 12 ZigBee secure frame in MAC layer [17] 

In  the  network  layer  the  CCM*  (a  modified  MAC  layer  CCM  mode)  is  used 
for encryption. Because the network layer uses only the CCM* mode, a single 
key  is  used  for  all  different  security  options.  The  network  layer  security 
message  format  is  similar  to  the  MAC  frame;  it  is  presented  in  the  figure  13. 
Finally,  although  the  network  layer  is  responsible  for  securing  its  layer 
messages,  the  above  layers  specify  the  keys  and  the  CCM*  option  for  each 
frame (Kinney, 2005).  

Figure 13 ZigBee secure frame in network layer [17] 

Security  in  the  application  layer  works  similar  to  the  network  and  MAC 
layers. It uses the “link key” or the “network key” to secure the message and 
then encapsulate it inside a set of fields similar to the network format (figure 
14).  Other  security  responsibilities  that  the  application  layer  has  are  to 
provide the ZDO and the applications with device management services, key 
establishment, and key transport (ZigBee specifications, 2005).  

24
Indoor Local Positioning System
For ZigBee, Based On RSSI 2 LITERATURE REVIEW
Shashank Tadakamadla 10.10.2006

Figure 14 ZigBee secure frame in application layer [17] 

The  ZigBee  application  layer  contains  the  manufacturer‐defined  application 


objects,  the  ZDO  and  the  application  sub‐layer.  In  addition  to  the  security 
responsibilities, the application sub‐layer binds devices based on their duties 
and  needs,  maintains  the  binding  tables,  and  forwards  messages  between 
them.  The  application  sub‐layer  also  discovers  the  neighbour  devices  for  a 
given device. The ZDO is responsible for determining the device’s duty in the 
network,  for  communicating  using  binding  requests,  and  for  supporting 
security,  as  was  mentioned  above.  The  sub‐layer  that  implements  the  actual 
application is the manufacturer‐defined application object (Kinney, 2005).  

The  ZigBee  specifications  are  a  great  step  toward  the  wireless  sensors 
networks standardization. They cover all the OSI layers, from the physical to 
the  application  providing  guidance  to  the  developers.  The  specifications  are 
the product of the ZigBee alliances, a consortium of companies and academic 
institutes. Thus they not only produce the specifications, but also are the first 
use  them.  The  next  section  goes  beyond  the  layer  architecture  and 
standardization  and  introduces  the  OS  field,  another  crucial  element  of 
WSNs.  

25
Indoor Local Positioning System 3 RECEIVED SIGNAL STRENGTH
For ZigBee, Based On RSSI (RSS)
Shashank Tadakamadla 10.10.2006

3 RECEIVED SIGNAL STRENGTH (RSS)


Majority  of  the  existing  methods  leverage  the  existence  of  IEEE  802.11  base 
stations  with  powerful  radio  transmit  powers  of  approximately  100mW  per 
base  station.  Such  radios  are  in  a  different  class  from  the  low  power  IEEE 
802.15.4 compliant radios that typically transmit at low power levels ranging 
from  52mW  to  29mW  [19].  The  wide  availability  of  larger  number  of  IEEE 
802.15.4 radios in the research community has revived the interest for signal 
strength  based  localization  in  sensor  network.  Despite  of  rapidly  increasing 
popularity of IEEE 802.15.4 radios and signal strength localization, there is a 
lack  of  detailed  characterization  of  the  fundamental  factors  contributing  to 
large signal strength variation. 

This  chapter  investigates  some  of  the  properties  of  RSS  observed  during 
testing  and  analysis  of  research  work  collected  during  the  period  of  thesis. 
The analysis of RSS values is needed to understand the underlying features of 
location dependent RSS patterns and location fingerprints. An understanding 
of  the  properties  of  the  RSS  values  for  location  fingerprinting  can  assist  in 
improving the design of positioning algorithms and in deployment of indoor 
positioning systems. 
  

3.1 Parameters that affect RSS


Different  factors  that  affect  the  indoor  RSS  are  the  user’s  presence/absence, 
his/her orientation, time of the day, building type and material, distance from 
transmitter,  and  type  of  radio.  These  factors  are  by  no  means  exhaustive. 
Other  possible  factors  are  antenna  orientation,  directionality  and  type.  Table 
10 classify the parameters which affect RSS [7]. 

26
Indoor Local Positioning System 3 RECEIVED SIGNAL STRENGTH
For ZigBee, Based On RSSI (RSS)
Shashank Tadakamadla 10.10.2006

 
Effect on   Factors  Options 
  1. Proximity of user  User’s presence or 
  absence 
Data Collection  2. Orientation of user  North, East, South, West 
and terminal 
3. Make of Radio   
  4. Time of measurement  Time of day & days of 
  week 
  5. Period of  Second, minute, hour 
Statistics  measurement 
7. Interference  Co‐channel/ adjacent co‐
channel 
8. Building environment  Small offices or large 
hall. 
Table 10 Classification of factors the affect RSS [7] 

Transmitter variability: Different transmitters behave differently even 
when they are configured exactly in the same way. In practice, this means that 
when  a  transmitter  is  configured  to  send  packets  at  a  power  level  of  d  dBm 
then the transmitter will send these packets at a power level that is very close 
to  d  dBm  but  not  necessarily  exactly  equal  to  d  dBm.  This  can  alter  the 
received signal strength indication and thus it can lead to inaccurate distance 
estimation. 
 
Receiver  variability:  The  sensitivity  of  the  receivers  across  different 
radio chips is different. In practice, this means that the RSSI value recorded at 
different  receivers  can  be  different  even  when  all  the  other  parameters  that 
affect the received signal strength are kept constant. 
 
Antenna  orientation:  Each  antenna  has  its  own  radiation  pattern  that 
is  not  uniform.  In  practice,  this  means  that  the  RSSI  value  recorded  at  the 
receiver  for  a  given  pair  of  communicating  nodes  and  for  a  given  distance 
between them varies as the pair wise antenna orientations of the transmitter 
and the receiver are changed. 
 
Multi‐path  fading  and  shadowing  in  the  RF  channel:  In  indoor 
environments  the  transmitted  signals  get  reflected  after  hitting  on  the  walls 
and/or on other objects in the room such as furniture. Both the original signal 
and the reflected signal reach the receiver almost at the same time since they 
both travel at the speed of light. As a result of this, the receiver is not able to 

27
Indoor Local Positioning System 3 RECEIVED SIGNAL STRENGTH
For ZigBee, Based On RSSI (RSS)
Shashank Tadakamadla 10.10.2006

distinguish  the  two  signals  and  it  measures  the  received  signal  strength  for 
both of them.

3.2 Related work analysis


A  number  of  indoor  location  tracking  systems  have  been  proposed  in  the 
literature,  based  on  RF  signals,  ultrasound,  infrared  and  some  combinations 
of  these.  As  mentioned  previously,  RF  based  positioning  system  are  widely 
studied as  shown in  Table 2. Given a model  of radio  signal propagation in  a 
building  or  other  environment,  RSS  can  be  used  to  estimate  the  distance 
between  the  transmitter  and  receiver.  Most  of  the  algorithms  (Table  2)  have 
been evaluated in practice using 802.11b compliant wireless radios and seem 
to  produce  a  location  error  of  15ft  to  20ft  for  an  indoor  network  area  of 
approximately  225ft  x  144ft.  According  to  the  results  of  this  study  all  the 
localization techniques produce approximately the same location error over a 
range  of  environments.  Ecolocation  [22],  Mote  Track  [5]  are  two  of  the  few 
localization algorithms that have been evaluated on a real sensor network that 
uses  a  low  power  wireless  radio.  Ecolocation  reports  a  location  error  of  10ft 
for  a  very  small  outdoor  network  deployment  area  (26ft  x  49ft)  Mote  Track 
reports  a  location  error  of  approximately  13ft  for  an  indoor  network 
deployment area of 18751ft2.  

In  general,  the  RSSI  based  localization  algorithms  can  be  divided  into  two 
broad  categories:  the  map  based  and  the  distance  (or  area)  prediction  based 
algorithms.  In  the  case  of  the  map  based  algorithms,  the  deployment  area is 
divided  into  a  large  set  of  sample  points  that  cover  the  whole  area.  Most 
techniques collect one or more signal strength measurements from all visible 
beacon nodes and for each sample point. Each sample point is then mapped to 
either  a  signal  strength  vector  or  a  signal  strength  probability  distribution. 
This process generates an RSSI fingerprint map which is unique with respect 
to  the  beacon  locations  and  the  deployment  area.  This  fingerprint  map  is 
stored to a central base station. A node that is not aware of its location collects 
one or more signal strength measurements from all the visible beacon nodes 
and creates its own RSSI fingerprint that is sent to the central base station. The 
base  station  computes  node’s  location  as  the  sample  point’s  location  whose 
RSSI  fingerprint  distance  from  the  unknown  node’s  RSSI  fingerprint  is  the 
minimum  among  all  the  sample  points.  Despite  the  fact  that  the  map  based 
RSSI  localization  methods  produce  relatively  small  location  errors,  they  are 
not  attractive  mainly  because  they  require  an  excessive  amount  of  profiling 
data  and  because  they  are  not  fully  distributed.  The  detailed  profiling  of  a 
building  is  a  major  holdback  because  it  is  complex,  time  consuming  and 
depends on beacon locations. Therefore, for different buildings or even for the 

28
Indoor Local Positioning System 3 RECEIVED SIGNAL STRENGTH
For ZigBee, Based On RSSI (RSS)
Shashank Tadakamadla 10.10.2006

same building and different beacon locations different RSSI maps have to be 
obtained.  
 
The  second  category  of  RSSI  based  algorithms  are  the  distance  (or  area) 
prediction  algorithms  which  focus  on  minimizing  the  amount  of  profiling 
data.  In  distance  prediction  based  methods,  raw  RSSI  data  are  directly 
mapped  to  distances  through  a  signal  propagation  model.  In  some  cases, 
distances  are  not  explicitly  measured  but  they  are  taken  into  consideration 
through assumptions on the underlying distributions. In the case of outdoor 
deployments, where there are no obstacles, a single signal propagation model 
is all the profiling data required. In the case of indoor deployments the same 
applies  but  now  the  signal  propagation  model  might  be  different  across 
different buildings with different furniture and wall arrangements. Given an 
underlying  signal  propagation  model,  raw  RSSI  data  can  be  mapped  to 
specific  distances.  These  distances  can  be  either  used  directly  in  order  to 
perform  localization  or  assigned  a  probability  and  used  in  a  learning 
based/probabilistic  localization  algorithm.  Obviously,  the  accuracy  of  the 
distance  prediction  based  methods  depends  heavily  on  the  accuracy  of  the 
signal propagation model used for translating RSSI values to distances.  
 

3.3 Properties of RSSI


Changes in signal due to propagation indoors are difficult to predict because 
of  dense  environment  and  propagation  effects  such  as  reflection,  diffraction 
and  scattering.  The  multi‐path  fading  effect,  which  is  the  result  of  either 
constructive  or  destructive  combination  of  multiple  signal  copies  at  the 
receiver,  causes  the  received  signal  to  fluctuate  around  a  mean  value  at  a 
particular location. The received signal is usually modelled by the combined 
effects  of  large‐scale  fading  and  small‐scale  fading.  The  large‐scale  fading 
component  describes  the  signal  attenuation  as  the  signal  travels  over  a 
distance and is absorbed by material such as walls and floors along the way to 
the receiver. This component predicts the mean of the RSS and usually has a 
lognormal distribution. On the other hand, the small scale fading component 
explains  the  dramatic  fluctuation  of  the  signal  due  to  multi‐path  fading.  On 
the  other  hand,  the  small  scale‐fading  component  explains  the  dramatic 
fluctuation  of  the  signal  due  to  multi‐path  fading.  If  there  is  no  LOS 
component,  the  small‐scale‐fading  is  often  modelled  with  a  Rayleigh 
distribution.  Such  scenarios  are  commonly  called  NLOS.  If  there  is  a  LOS 
component;  the  small‐scale‐fading  is  typically  modelled  by  a  Rician 
distribution. Note that when the RSS is measured, the measurement averages 
out the small‐scale‐fading effects.  

29
Indoor Local Positioning System
For ZigBee, Based On RSSI 4 OBJECT TRACKING
Shashank Tadakamadla 10.10.2006

4 OBJECT TRACKING
4.1 Introduction
This  chapter  presents  the  object‐tracking  application,  the  main  objective  of 
this  thesis  work.  The  application  is  an  algorithmic‐software  implementation 
written  in  Embedded  C,  which  is  capable  of  receiving  data  messages  and 
generating object position estimation data. The implementation of the object‐
tracking  application  makes  use  of  the  SENTIO  platform  and  uses  the 
background knowledge introduced in the preceding chapters. The motivation 
for the object‐tracking application is to determine the position of an object in 
indoor environments (E.g. Home). The application acts as an interface which 
collects the raw data that the sensors generate (numerical values). It makes the 
proper comparisons and algorithmic processes to identify and track the object 
while  it  is  static  inside  the  area  covered  by  the  wireless  sensor  network. 
Finally,  with  the  detection  and  tracking  data,  it  alerts  the  user  or  another 
system.  The  following  sections  provide  an  overview  of  the  object‐tracking 
application.  

4.2 Overview of hardware product


Before describing the object tracking application, it is important to know the 
characteristics of hardware product. The SENTIO platform (figure 15) is built 
in modular fashion and has the following key features [8]: 
Flexibility: This platform is very flexible in such a way that it is made 
easy to add or change the hardware for each sensor task depending on 
the requirement in the WSN. For a specific platform this can be hard or 
sometimes even impossible to accomplish.  
Sensor resources: Resources in a sensor module includes the ability of 
usage  of  controller’s  resources  as  much  as  possible,  such  as  ADC‐
channels,  interrupts  and  digital  Input‐Output’s.  Local  voltage 
regulation  should  also  be  possible  since  many  sensors  require  higher 
supply voltages than digital Integrated Circuits do. Further, support of 
a shut‐down mechanism to power down the sensor modules when not 
needed.  
Computation  and  memory  The  processor  module  based  on 
microcontroller  should  support  many  devices  in  a  microcontroller 
family and support different power supply voltages enabling full range 
of clock frequencies. All power‐down modes of the devices should be 

30
Indoor Local Positioning System
For ZigBee, Based On RSSI 4 OBJECT TRACKING
Shashank Tadakamadla 10.10.2006

supported.  The  platform  should  support  different  processor  modules 


including FPGA’s and very simple microcontrollers.  
Communication  The  focus  should  be  on  enabling  an  IEEE  802.15.4 
compliant communication interface. With or without ZigBee stack, this 
will  provide  a  flexible  platform  for  exploring  different  network 
topologies.  Support  for  power‐down  of  the  entire  communication 
module should be supported.  
Cost  and  form  factor  High  flexibility  is  in  conflict  with  low  cost  and 
small  size.  The  primary  objective  should  be  flexibility  but  the  size 
should  be  considered  in  order  to  enable  sensor  device  integration  in 
systems where space is limited.  
Communication
Module

Processing Module
Antenna

Sensing Module

    
Figure 15 SENTIO Platform [8] 
The  communication  subsystem of  the  SENTIO  sensor  node  was  designed  so 
that  the  correct  operation  of  the  radio  chip  is  ensured.  The  radio  chip  is 
powered  by  the  on‐board  voltage  regulator  and  thus  fluctuations  in  the 
battery  voltage  level  do  not  affect  the  operation  of  the  communication 
subsystem.  
 
This platform uses Chipcon CC2420 IEEE 802.15.4 radio transceiver operates 
in  the  2.4GHz  ISM  band  and  includes  a  digital  direct  sequence  spread 
spectrum (DSSS) modem providing a spreading gain of 9dB and an effective 
data  rate  of  250Kbps.  It  was  specifically  designed  for  low  power  wireless 
applications  and  supports  8  discrete  power  levels:  0dBm,  −1dBm,  −3dBm, 
−5dBm, −7dBm, −10dBm, −15dBm and −25dBm at which its power consumption 
varies from 29mW to 52mW [21]. A built‐in received signal strength indicator 
gives an 8‐bit digital value: RSSIVAL. The RSSIVAL is always averaged over 8 
symbol periods (128μs) and a status bit indicates when the RSSIVAL is valid 
(meaning  that  the  receiver  was  enabled  for  at  least  8  symbol  periods).  The 

31
Indoor Local Positioning System
For ZigBee, Based On RSSI 4 OBJECT TRACKING
Shashank Tadakamadla 10.10.2006

power  P  at  the  RF  pins  can  be  obtained  directly  from  RSSIVAL  using  the 
following 
equation: 
P = RSSIVAL + RSSIOFFSET [dBm]  
where the RSSIOFFSET is found empirically from the front‐end gain and it 
is approximately equal to −45dBm. In the next sections when we refer to the 
RSSI value we refer to the RSSIVAL and not the power P unless otherwise 
stated.

4.3 Experimental Testbed


The experimental test bed for object tracking application is as shown in figure 
16. Experiment was conducted in Master’s room at Mid Sweden University. A 
DELL  laptop  is  connected  to  SENTIO  platform  and  software  were  primarily 
used  to  collect  samples  of  RSS  from  AP’s.  The  software  monitors  IEEE 
802.15.4 radio frequency channels which operate in the 2.4GHz band. 
AP 3
AP 1
BC - 10/30

BC - 10/30
BC - 10/30

BC - 10/30
BC - 10/30

BC - 10/30

BC - 10/30 BC - 10/30
BC - 10/30

BC - 10/30

BS BC - 10/30 BC - 10/30 BC - 10/30 BC - 10/30


BC - 10/30

AP 2

BC - 10/30 BC - 10/30
BC - 10/30
BC - 10/30

D KAR P AC

TT HE W L E

AP 4

Figure 16 Layout of Masterʹs Room 

A  three  dimensional,  scalable  testbed  is  used  for  indoor  sensor  network 
deployments. The testbed illustrated in figure 16 is a 3‐D structure measuring 
16m (L) x 12m (W) x 3m (H) and it is designed to host a large number of static 
nodes  as  shown  in  figure  16.  Arrow  marks  in  the  above  figure  represent  the 
location where fingerprints were taken. The centrepiece of our infrastructure 

32
Indoor Local Positioning System
For ZigBee, Based On RSSI 4 OBJECT TRACKING
Shashank Tadakamadla 10.10.2006

is  the  SENTIO  sensor  node  [8],  an  open‐source  general  purpose  sensing 
platform  designed  with  AT  Mega  128  microprocessor  and  the  IEEE  802.15.4 
compliant CC2420 radio from Chipcon [19].  
 

4.4 Obtaining data from the sensor network


The next important step in the development of the object tracking application 
is to obtain the data from the sensor network and send it to the base station. 
From there the data is transmitted through a serial port to the computer that 
runs the object tracking application. When the data arrives at the serial port, 
the application must capture it. 
 
This  paragraph  gives  a  brief  explanation  of  how  and  what  kind  data  is 
transmitted by the static object, fixed sensors and how this data is being used 
to estimate the position of the object. First, the static object transmits Beacon 
packet  continuously  which  is  received  by  all  the  fixed  AP’s.  The  beacon 
packet format is as shown in table 6. Then, the fixed AP’s calculates the 8‐bit 
value of RSSI from the transmitted beacon packet and then sends the resultant 
RSSI  value  as  a  form  of  data  packet  (table  7)  to  the  BS  which  calculates  the 
position and sends back to the object.  
 

4.5 Object tracking application: Testing and Evaluation


The  purpose  of  this  section  is  to  discuss  and  evaluate  the  object  tracking 
application. Finally, we are ready with the experimental testbed as shown in 
figure 16.  
 
As shown in figure 16, AP1, AP2, AP3 and AP4 are the fixed sensors placed at 
the  corners  of  the  master’s  room.  BS  is  placed  at  the  centre  of  the  room 
connected  to  a  PC.  All  the  nodes  are  power  connected  before  an  actual 
measurement  takes  place.  At  first,  the  object  is  placed  at  random  position 
inside  the  room  and  transmits  beacon  packets  continuously.  Then,  these 
packets  are  received  by  the  fixed  AP’s  which  calculate  the  RSSI  from  the 
packet  and  then  averages  it,  until  it  receives  50  beacon  packets  and  then 
transmits the data to the BS (figure 17). Then the BS waits until it receives the 
data  from  all  the  AP’s.  Once  it  receives  from  all  the  AP’s  it  calculates  the 
position of the object (figure 18). 
 
The application was developed to demonstrate a real world use of a WSN in 
object  tracking.  In  evaluating  the  final  position  obtained  with  respect  to  the 
actual position, we conclude that the object‐tracking was successful. Although 

33
Indoor Local Positioning System
For ZigBee, Based On RSSI 4 OBJECT TRACKING
Shashank Tadakamadla 10.10.2006

it is a research prototype, object tracking application is a simple, stable, stand‐
alone  system  capable  of  demonstrating  an  important  application  of  WSN.  It 
takes  raw  data  from  the  WSN,  aggregates  it,  evaluates  it,  and  based  on  the 
evaluation,  tracks  the  object.  The  accuracy  of  estimating  the  position  is  less 
than 5m. Table 11 below shows a log of readings taken during test 

Start

Intialize micro‐controller and 
transeciever in receieve mode

No
If 
B received_packet=
Beacon?

Yes
Average RSSI values

Increase the counter

No
If counter
B
>10,000/50

Yes
A

34
Indoor Local Positioning System
For ZigBee, Based On RSSI 4 OBJECT TRACKING
Shashank Tadakamadla 10.10.2006

Reset counter

Set transceiever in transmit mode

Transmit averaged RSSI to Main sensor and 
set it back to receive mode

10,000 samples   ‐ Offline 
50 samples          ‐ Online

Figure 17 Flow chart representing the algorithm of fixed sensors 

35
Indoor Local Positioning System
For ZigBee, Based On RSSI 4 OBJECT TRACKING
Shashank Tadakamadla 10.10.2006

Start

Intialize micro‐controller and 
transeciever in receieve mode

No
Received 
RSSI values 
from all fixed 
Sensors?

Yes
Open radio map

Calculate Euclidean distance between obtained 
RSSI values from fixed sensors and fingerprints 
in radio map 

Bubble sort for least error in signal strength values

36
Indoor Local Positioning System
For ZigBee, Based On RSSI 4 OBJECT TRACKING
Shashank Tadakamadla 10.10.2006

Get the location of the object from the radio
using the least error value

Display location of object on PC

End

Figure 18 Flow chart representing the algorithm of main sensor 
 

 
Table 11 Accuracy of positioning system 

37
Indoor Local Positioning System
For ZigBee, Based On RSSI 5 RESULTS
Shashank Tadakamadla 10.10.2006

5 RESULTS
This chapter presents how the system parameters such as number of samples, 
mean  or  median  etc…are  finalized?  All  the  tests  are  performed  in  master’s 
room  at  Mid  Sweden  University.  This  chapter  is  divided  into  three 
subsections. First in Section 5.1 it reviews results obtained from samples test. 
Section  5.2  discusses  one  dimensional  test  results  and  finally  section  5.3 
discusses results of two dimensional tests. 

5.1 Measurement setup


A  Dell  laptop  was  connected  to  a  SENTIO  platform  and  is  loaded  with 
software  (Appendix  2). This setup was used  to determine number of samples 
required  during  object  tracking,  mean  or  median,  position  estimation 
algorithm and one dimensional test. The setup is as follows:  
 
BC - 10/30

BC - 10/30
BC - 10/30

BC - 10/30
BC - 10/30

BC - 10/30

BC - 10/30 BC - 10/30

AP 2
AP 1
BC - 10/30

BC - 10/30

BS BC - 10/30 BC - 10/30 BC - 10/30 BC - 10/30


BC - 10/30

BC - 10/30 BC - 10/30
BC - 10/30
BC - 10/30

D KAR PAC
TT LE HEW

Figure 19 Test bed for one dimensional test in Masters Room 
 
Two  SENTIO  nodes  (AP1  and  AP2,  as  shown  above)  were  separated  by  a 
distance of 10 meters and these sensors are known as fixed sensors which are 
fixed to the ceiling such that there antenna is faced towards the ground. They 
are linear is position. A BS was connected to Dell laptop and it was placed in 
such a way that its antenna was faced towards the ceiling. Another SENTIO 

38
Indoor Local Positioning System
For ZigBee, Based On RSSI 5 RESULTS
Shashank Tadakamadla 10.10.2006

node  was  used  as  an  object  and  its  orientation  was  same  as  BS.  Figure  19 
represents  the  complete  setup  for  object  tracking  application.  Mobile  node 
was  moved  between  these  fixed  ones  at  regular  intervals  of  one  meter  and 
RSSI values were logged at each interval. 
 

5.2 Number of samples test


This  test  was  performed  to  determine  number  of  samples  required  for 
accurate positioning  and either  mean of the  obtained  RSSI values  or  median 
of them. Figure 19 represents the setup for number of samples test. Once the 
setup is ready the measurements are taken as follows: 
1. An  object  was  tagged  with  SENTIO  node  and  was  placed  stationary 
linear to the fixed sensors. 
2. 10,000 samples (RSSI) were taken at regular intervals of 1 meter up to 
10 meters. 
3. The sample values were logged at every interval. 
4. Using these logged samples, I have plotted graphs such as distribution 
of RSS values (figure 20, 21), mean/median at intervals of 1 meter using 
MATLAB. 
5. The mean and median for various numbers of samples is as shown in 
figure 22. 

 
Figure 20 Histogram plot of RSSI values at 1m and 4m 

 
Figure 21 Histogram plot of RSSI values at 6m and 8m 

39
Indoor Local Positioning System
For ZigBee, Based On RSSI 5 RESULTS
Shashank Tadakamadla 10.10.2006

Figure 22 Distance vs. RSSI 
From the above graphs, following conclusions were made. 
1. From the histogram plots we can observe that the distribution of RSSI 
values follow Gaussians distribution law. 
2. As  we  can  see  from  figure  22,  that  median  curve  has  drastic  changes 
when  compared  to  mean  curve.  Hence  mean  is  considered,  while 
estimating the position. 
3. From  the  observations  we  conclude  that  the  number  of  samples  does 
not matter since mean curve tends to be same for various numbers of 
samples. 
4.  Hence, 10,000 samples are considered in order to get a proper location 
fingerprint  during  off‐line  phase  and  during  online  phase  50  samples 
are enough to estimate the position of object. 

5.3 0ne dimensional test


Measurement setup for one dimensional test is as shown in figure 19. This test 
was  conducted  to  check  the  performance  of  algorithm  and  how  accurate  it 
was. At first, i.e. during offline phase fingerprints at each interval averaging 
10,000  samples  were  taken.  During  online  phase,  Euclidean  algorithm  was 
used estimate the position averaging 50 samples of RSSI. From the results, we 

40
Indoor Local Positioning System
For ZigBee, Based On RSSI 5 RESULTS
Shashank Tadakamadla 10.10.2006

can realize that the error was less than 2 meters. Table 12 shows the result of 
location estimation in one dimensional case. 
 

Table 12 One dimensional position estimation results 

5.4 Two dimensional test


This  test  is  the  final  stage  of  my  thesis  work.  Experimental  testbed  for  this 
stage  is  as shown  in figure 16. AP1,  AP2,  AP3  and  AP4  are the fixed  sensors 
fixed at the corners of the room and a BS at the centre of the room. There are 
18  pre‐determined  locations  where  the  fingerprints  (RSSI)  were  taken.  The 
fingerprints  are  as  shown  in  Appendix  1.  All  the  readings  were  taken  in 
presence of user’s. The algorithm for position estimation is shown in Appendix 
2. Position estimation test is performed as follows: 
Tagged object is placed at random inside the master’s room. 
All the sensors including the base station and object are switched on. 
Using  the  algorithm  (Appendix  2)  the  BS  estimates  the  position  of  the 
object and displays it on the PC. 
This test was performed using various numbers of samples to test which has a 
better accuracy. Figure 23, represents the error rate using various numbers of 
samples.  From  figure  23,  we  can  conclude  that  50  numbers  of  samples  is 
enough to estimate the position of object with an accuracy of 3m. 
 

5.5 Causes of error in location determination


The  randomness  of  RSS  is  the  major  cause  of  error  in  any  indoor 
positioning system that uses the RSS for location inference. If there is 
no  randomness  in  the  RSS  and  its  location  fingerprint,  every  indoor 
positioning systems of this type will have no location detection error. 
For  example,  I  have  recorded  RSS  at  one  particular  location  during 
different times of the day. From figures 24 and 25, you can observe that 
RSS values are different at different times of day. 
The performance of indoor positioning systems depends greatly on the 
separation  of  location  fingerprints.  A  location  fingerprint 

41
Indoor Local Positioning System
For ZigBee, Based On RSSI 5 RESULTS
Shashank Tadakamadla 10.10.2006

corresponding to a location can be identified  correctly if it  is  difficult 


to classify it as another fingerprint by a pattern classifier. 
Path  loss  is  one  of  the  basic  signal  propagation  properties  of  the  RSS 
that  best  describes  attenuation  of  transmit  signal  power  over  a 
distance between an access point and a mobile device. 
Presence of User’s or user’s orientation affects RSS. 

Figure 23 Error Rate vs. Number of samples 

Figure 24 RSS distribution at 2:14 pm 

42
Indoor Local Positioning System
For ZigBee, Based On RSSI 5 RESULTS
Shashank Tadakamadla 10.10.2006

Figure 25 RSS distribution at 1:00pm and 11:00 am 

43
Indoor Local Positioning System
For ZigBee, Based On RSSI 6 DISCUSSIONS
Shashank Tadakamadla 10.10.2006

6 DISCUSSIONS
6.1 Summary and Conclusion
While empirical results and performance studies of positioning systems based 
on  location  fingerprint  have  been  presented  in  this  report,  analytical  model 
that  can  be  used  as  a  framework  for  efficiently  designing  the  positioning 
systems are  not available. This  thesis design  work  uses general  principles  of 
position  estimation such as position  estimation of sensors, grid  spacing etc... 
This design work focuses on accuracy and precision. 
 
The  concept  of  location  fingerprint  technique  based  on  RSS  us  explained  in 
detail  in  chapter  2.  It  is  found  that  RSS  is  random.  It  is  possible  to 
approximate  the  RSS  as  being  normally  distributed.  While  the  RSS  random 
process is non‐stationary, the mean is more or less constant and could be used 
as the fingerprint of the location. 
 
Model  designed  for  position  estimation  is  as  shown  in  chapter  4.  Accuracy 
and precision are the two major performance matrices in this study. Uniform 
grid spacing has been used. From the experimental analysis, I have obtained 
an accuracy of 3 meters and 35% precision. 
 
The  sensitivity  analysis  among  the  system  parameters  and  the  performance 
matrices were done using the model as shown in chapter 4. For instance, our 
study found that the minimum distance between two adjacent positions also 
affects  the  positioning  performance.  This  is  due  to  the  randomness  of  RSS 
patterns induced by the ever changing indoor environment.  

 
6.2 Future work
The  research  in  this  thesis  provides  a  ground  work  for  the  future  study  of 
efficient  design  of  indoor  positioning  system.  The  RSSI  based  position 
estimation still has limitations. First, the RSSI value is time dependent. Thus, 
the future study should address this issue. Second, the movement of object is 
not  considered.  Third,  orientations  of  sensors  affect  the  performance  which 
should  be  taken  care  off.  Fourth,  to  improve  the  performance  of  the  system 
we  need  to  find  a  solution  to  deal  with  those  incomplete  or  missing  data 
during the off‐line and the on‐line phase. Fifth, position estimation on multi‐
floor and three‐dimensional coordinates is not available. 

44
Indoor Local Positioning System
For ZigBee, Based On RSSI APPENDIX 1
Shashank Tadakamadla 10.10.2006

APPENDIX 1

Location Fingerprints of Master's Room


Time : 13:15 Observation Time: 20 minutes Number of Samples: 10,000
People Presence
S.No Co-ordinates AP1 (0x0001) AP2 (0x0002) AP3 (0x0004) AP4 (0x0008)
1 1,1 -24 -16 -27 -33
2 1,3 -26 -8 -34 -31
3 1,5 -43 -9 -39 -25
4 3,2 -21 -11 -27 -33
5 6,1 -6 -23 -32 -28
6 6,4 -20 -31 -25 -34
7 3,5 -23 -35 -29 -38
8 3,7 -29 -35 -22 -27
9 3,9 -38 -29 -21 -27
10 6,7 -27 -23 -20 -23
11 6,11 -26 -29 -23 -30
12 6,13 -35 -32 -2 -31
13 5,13 -34 -31 -20 -26
14 1,1 -39 -22 -29 -17
15 2,12 -37 -42 -28 -31
16 -2,12 -38 -33 -29 -6
17 -2,1 -42 -29 -33 -19
18 -3,8 -40 -23 -35 -22

45
Indoor Local Positioning System
For ZigBee, Based On RSSI APPENDIX 2
Shashank Tadakamadla 10.10.2006

APPENDIX 2

A
Begin

Open radio map and raw data


files for write Check if data
is No
Received from
all
Intialize radio map in memory sensors?

Yes

Check whether
Estimate the position of static
the
Packet is data or No
Beacon packet,
If data packet ? Display the position on PC

Yes End

Save the data to register

Flow chart representing the main algorithm for position estimation 

46
Indoor Local Positioning System
For ZigBee, Based On RSSI APPENDIX 3
Shashank Tadakamadla 10.10.2006

APPENDIX 3

47
Indoor Local Positioning System
For ZigBee, Based On RSSI APPENDIX 3
Shashank Tadakamadla 10.10.2006

Distribution of RSSI 

48
Indoor Local Positioning System
For ZigBee, Based On RSSI REFERENCES
Shashank Tadakamadla 10.10.2006

REFERENCES
[1]  T.  S.  Rappaport,  J.  H.  Reed,  and  B.  D.  Woerner,  “Position  location  using 
wireless  communications  on  highways  of  the  future,ʺ  IEEE  Commun.  Mag., 
vol. 34, no. 10, pp.33‐41, Oct. 1996. 
[2] A. M. Ladd, K. E.  Bekris, G. Marceau, A. Rudys, L. E. Kavraki, and D.  S. 
Wallach,  ”Robotics‐based  location  sensing  using  wireless  ethernet,ʺ  in  Proc. 
ACM  International  Conference  on  Mobile  Computing  and  Networking 
(MOBICOMʹ02), 2002, pp. 227‐238. 
[3] I. Ramani, R. Bharadwaja, and P. V. Rangan, “Location tracking for media 
appliances  in  wireless  home  networks,ʺ  in  Proc.  International  Conference  on 
Multimedia and Expo (ICMEʹ03), July 2003, pp. 769‐772. 
[4]  K.  Pahlavan,  X.  Li,  and  J.  P.  Makela,  “Indoor  geolocation  science  and 
technology,ʺ IEEE Commun. Mag., vol. 40, no. 2, pp. 112‐118, Feb. 2002. 
[5]  Konard  Lorincz  and  Matt  Welsh,  “Mote  Track:  A  Robust,  Decentralized 
Approach to RF‐Based Location Tracking”. 
[6] Paramvir Bahl and Venkata N. Padmanabham, “RADAR: An In‐Building 
RF‐based User Location and Tracking System”. 
[7]  Kamol  Kaemarungsi,  “Design  of  Indoor  positioning  system  based  on 
location fingerprint techinique”. University of Pittsburgh, 2005. 
[8]  Fredrik  Linnarsson,  Cheng  Peng  and  Bengt  Oelmann,  “SENTIO:  A 
Hardware Platform for Rapid Prototyping of Wireless Sensor Networks”. 
[9]  S.  Saha,  K.  Chaudhuri,  D.  Sanghi,  and  P.  Bhagwat,  “Location 
determination of a mobile device using IEEE 802.11b access point signals,ʺ in 
Proc.  IEEE  Wireless  Communications  and  Networking  Conference  (WCNCʹ03), 
New Orleans, LA, Mar. 2003, pp. 1987‐1992. 
[10]  T.  Roos,  P.  Myllymaki,  H.  Tirri,  P.  Misikangas,  and  J.  Sievanen,  “A 
probabilistic  approach  to  WLAN  user  location  estimation,ʺ  International 
Journal of Wireless Information Networks, vol. 9, no. 3, pp. 155‐164, July 2002. 
[11]  R.  Battiti,  M.  Brunato,  and  A.  Villani,  “Statistical  learning  theory  for 
location  fingerprinting  in  wireless  LAN’s,ʺ  Technical  Report,  Oct.  2002. 
[Online]. Available: http://rtm.science.unitn.it/»battiti/archive/86.pdf 
[12] P. Prasithsangaree, P. Krishnamurthy, and P. K. Chrysanthis, “An indoor 
position  location  with  wireless  LANs,ʺ  in  Proc.  IEEE  International  Symposium 
on  Personal,  Indoor,  and  Mobile  Radio  Communications  (PIMRCʹ02),  Lisbon, 
Portugal, Sept. 2002. 
[13]  M.  A.  Youssef,  A.  Agrawala,  and  A.  U.  Shankar,  “WLAN  location 
determination  via  clustering  and  probability  distributions,ʺ  in  Proc.  IEEE 

49
Indoor Local Positioning System
For ZigBee, Based On RSSI REFERENCES
Shashank Tadakamadla 10.10.2006

International  Conference  on  Pervasive  Computing  and  Communications 


(PerComʹ03), Dallas‐Fort Worth, TX, Mar. 23‐26, 2003, pp. 23‐26. 
[14]  Z.  Xiang,  S.  Song,  J.  Chen,  H.  Wang,  J.  Huang,  and  X.  Gao,  “A  wireless 
LAN‐based  indoor  positioning  technology,ʺ  IBM  Journal  of  Research  and 
Development, vol. 48, no. 5/6, pp. 617‐626, Sept./Nov. 2004. 
[15] R. Want, A. Hopper, V. Falcao, and J. Gibbons, “The active badge location 
system,ʺACM  Transactions  on  Information  Systems,  vol.  40,  no.  1,  pp.  91‐102, 
Jan. 1992. 
[16]  N.  B.  Priyantha,  A.  Chakraborty,  and  H.  Balakrishnan,  “The  cricket 
location‐support  system,ʺ  in  Proc.  ACM  International  Conference  on  Mobile 
Computing and Networking (MOBICOMʹ00), Boston, MA, Aug. 2000, pp. 32‐43. 
[17]  Holger,  K.,  Willig  A.  (2005).  Protocols  and  Architectures  for  Wireless 
Sensor Networks. London. 
[18]  IEEE.  (2003).  Part  15.4:  Wireless  Medium  Access  Control  (MAC)  and 
Physical  Layer  (PHY)  Specifications  for  Low‐Rate  Wireless  Personal  Area 
Networks (LR‐WPANs). New York 
[19] Chipcon: CC2420 802.15.4 compliant radio. http://www.chipcon.com. 
[20] ZigBee Specification v1.0, ZigBee Alliance. 
[21] Dimitrios Lymberopoulos, Quentin Lindsey and Andreas Savvides, “An 
Empirical  Analysis  of  Radio  Signal  Strength  Variability  in  IEEE  802.15.4 
Networks using Monopole Antennas”. 
[22] Kiran Yedavalli,  Bhaskar Krishnamachari, Sharmila Ravula and Bhaskar 
Srinivasan,  “Ecolocation:  A  sequence  based  technique  for  RF  localization  in 
wireless  sensor  networks”.  Robert  Bosch  Research  and  Technology  Centre, 
Palo Alto, CA. 

50

S-ar putea să vă placă și