Honours Project Report - University of Cape Town

advertisement
Honours Project Report
Use of Wireless Local Area Networks as Positioning Technology for
Tracking WLAN Devices
Julian Hulme
Supervised by
Audrey Mbogho (PH.D)
Hanh Le (PH.D)
1
2
3
4
5
6
7
8
Software Engineering/System Analysis
Theoretical Analysis
Experiment Design and Execution
System Development and Implementation
Results, Findings and Conclusion
Aim Formulation and Background Work
Quality of Report Writing and Presentation
Adherence to Project Proposal and Quality of
Deliverables
9 Overall General Project Evaluation
Total marks
0
0
0
0
10
0
80
University of Cape Town
1
0
0
20
10
10
10
10
10
10
10
10
10
10
Department of Computer Science
2009
15
25
20
15
20
80
Abstract
2
Acknowledgements
3
TABLE OF CONTENTS
List of Figures .......................................................................................................................................................................... 5
List of Tables............................................................................................................................................................................ 5
Section 1 – Introduction .................................................................................................................................................... 6
Section 2 - Background ...................................................................................................................................................... 6
Section 2.1 – Basic theory of triangulation and fingerprinting .............................................................. 7
Section 2.1.1 Triangulation ........................................................................................................................................ 7
Section 2.1.2 Fingerprinting ...................................................................................................................................... 7
Section 2.2 – Review of work done in WLAN device localization .......................................................... 8
Section 2.3 – Comparison of the reviewed techniques .............................................................................. 10
Section 2.4 – Summary of the experiments and techniques reviewed ............................................. 11
Section 3 Methodology ..................................................................................................................................................... 13
Section 3.1 Technique ................................................................................................................................................. 13
Section 3.2 The K Nearest Neighbour Algorithm.......................................................................................... 13
Section 3.3 Software Design ..................................................................................................................................... 14
Section 4 Implementation .............................................................................................................................................. 14
Section 4.1 The Learn Function .............................................................................................................................. 15
Section 4.2 The Track Function.............................................................................................................................. 17
Section 5 Experiment........................................................................................................................................................ 21
Section 5.1 Preparation .............................................................................................................................................. 21
Section 5.2 Training phase ....................................................................................................................................... 22
Section 5.3 Positioning................................................................................................................................................ 23
Section 5.4 Outcome of Experiment..................................................................................................................... 25
Section 6 Results ................................................................................................................................................................. 26
Section 6.1 Repeatability ........................................................................................................................................... 27
Section 6.2 Reorientation .......................................................................................................................................... 28
Section 6.3 Simultaneous Tracking Results .................................................................................................... 29
Section 7 Discussion of Results ................................................................................................................................... 30
Section 7.1 Repeatability ............................................................................................................................................... 31
Section 7 Analysis of Results ........................................................................................................................................ 33
Section 8 Conclusion ......................................................................................................................................................... 33
4
Section 9 Further Research ........................................................................................................................................... 33
References .............................................................................................................................................................................. 34
Appendix A: Comparison of reviewed experiments........................................................................................... 35
Appendix B: Flowchart encapsulating the process of capturing the signal strength values
from the Wireless card hardware using Wireless Tools .......................................................................... 36
Appendix C: Map of the Molly Blackburn Hall with measurements .................................................. 37
LIST OF FIGURES
Figure 1:
Triangulating a mobile user
Figure 2:
Structure of a fingerprint record
Figure 3:
A typical room, or indoor environment, showing reference points, Access Points and
signal paths. Notice that some signal paths will experience interference due to obstacles such as walls
and pillars.
Figure 4: A flow chart encapsulating the learn function process
Figure 5:
A sample inputrouters.txt file
Figure 6: The output file of the learn function – The stored form of the Lookup Table used to locate
a device.
Figure 7:
A flow chart encapsulating the track function process
Figure 8:
Sample output.txt file
Figure 9:
Sample test results file
Figure 10:
Photo of a sticker used to mark the floor to represent the exact location of a coordinate
Figure 11:
Map of the Molly Blackburn Hall at the University of Cape Town showing reference
points and routers. The 13 circled reference points were not used on Day 1.
Figure 12:
Photo of the HP Compaq in training phase at coordinate (12, 1)
Figure 13:
Photo of both the Acer and the HP setup for the simultaneous tracking test
Figure 9:
Photo of both the Acer and the HP setup for the simultaneous tracking test
LIST OF TABLES
Table 1:
Table 2:
Table 3:
Table 4:
Table 5:
address
Summarized version of results of Deterministic Fingerprinting localization
Probability of device being within 1.5 meters of the correct location for 22 RPs
Mutually exclusive localization performances techniques
Laptops and their respective wireless network cards
List of routers used in the experiment, showing Model, firmware version and MAC
address
5
SECTION 1 – INTRODUCTION
Positioning technology is one of the key issues to be addressed in location based services. A LBS is a
mobile application that relies on a user’s location to provide context aware functionality [4]. The most
popular and well known LBS is the Global Positioning System (GPS), which is extensively used in vehicle
tracking. Implicitly, LBSs require positioning technology. GPS makes use of satellites orbiting around the
earth. Unfortunately GPS is not suited for an indoor environment because the enclosing architecture of
the building cuts off access to the satellites’ signals [4]. An alternative position technology to GPS is
therefore required for indoor positioning. Industry forecast for this service predicts huge market growth
and revenue [3].
A Wireless Local Area Network (WLAN) is aimed at providing local wireless access in fixed network
architectures. WLAN is extremely popular as a communication medium for trafficking general
information in computer networks and is today the industry standard [4]. It is used in outdoor public
areas too [3]. The IEEE 802.11 working group initially published a wireless networking protocol in 1999,
named 802.11b and later, 802.11g. Most of the WLAN products are based on 802.11b and operate in
the 2.4GHz radio band.
WLAN can not only be used for communication, but indirectly for positioning [1,2]. As WLAN technology
is already popular in indoor environments, it is an attractive technology to use for indoor asset tracking,
as no extra network infrastructure is needed. WLAN, implicitly, is only appropriate for positioning
electronic devices that support the WLAN protocol. Today, the popularity of WLAN (also known as just
“Wireless” or “Wifi”) means that there are many devices that can be tracked using this technology.
In this paper, experiments are conducted to test how well 2 wireless laptops can be located (tracked) in
an indoor testbed.
Section 2 gives the state of the art in WLAN positioning and gives a background to the techniques used
to position devices in an indoor environment. Sections 3 and 4 explains the methodology and design
respectively used to implement Wireless tracking in the conducted experiments, which is described in
Section 5. The results are provided in Section 6 and the success of the experiments conducted is
analysed in section 7 by an analysis of the results. The paper is concluded in Section 8 and suggested
further research to be conducted is provided in section 9.
SECTION 2 - BACKGROUND
Several techniques have been implemented for locating wireless nodes, that are irrespective of what
technology is being used to locate them. Most techniques fall into two categories, triangulation and
fingerprinting. These categories are explained in section 2.1, for the purposes of comprehension later in
the paper. Section 2.2 reviews previous work done in the field of WLAN tracking techniques and is
followed by a comparison of the work reviewed in section 2.3. Section 2.4 is a summary with respect to
the experiments and techniques reviewed.
6
SECTION 2.1 – BASIC THEORY OF TRIANGULATION AND FINGERPRINTING
SECTION 2.1.1 TRIANGULATION
The triangulation approach is a relatively easy (but less effective) technique. Three or more Access
Points (APs) are positioned in the environment and their coordinates are recorded. If the distance r from
the AP to a mobile user can be measured, a circle with radius r can be drawn that will represent the
possible position where the mobile user is located. With two other AP’s forming two more circles, the
location of the mobile user can be identified as the geometrical coincident point [4]. See Figure 1.
Figure 1: Triangulating a mobile user1
The triangulation technique consists of 2 steps [4]: The first step is to determine the average signal
strength over a short period of time between the 3 AP’s and the mobile user. The second step is to
compute the location based on the distances derived from the SSs of the 3 AP’s.
The fundamental principle of this technique is that the signal strength between the AP and the wireless
node can be translated into the distance between them.
The difficulty with a plain triangular approach is that the distance is hard to accurately determine from
the signal strength in an indoor environment as signal strength can be hindered by several factors [5]:



penetration losses from travelling through walls and floors
multipath propagation, the distortion or cancellation of a signal due to the effects of it arriving
via multiple paths due to reflection off surfaces [8]
basic attenuation due to distance travelled
SECTION 2.1.2 FINGERPRINTING
The abovementioned problems are due to specific environmental aspects. Overcoming these factors is
what fingerprinting addresses. By testing the received SS at known locations, the hindering of the SS due
to constant interferences can be accommodated [4]. The apparent location based on SS received at a
location is now pre-mapped to the true observed location, termed the training phase. The use of
1
Picture adapted from [5]
7
reference points (RPs) means the training phase becomes a significant task in terms of labour and time
[5].
Problems that pertain to mobile user localization in general, is the interference from other devices such
as microwave ovens, Bluetooth devices, cordless phones [4] and people moving inside the building [3].
The fingerprinting technique cannot directly alleviate such interferences. Probabilistic algorithms can be
used to reduce such sources of inaccuracy, as done by Ladd et al [3], which is discussed later.
The fingerprinting technique consists of two phases: training and positioning. The objective of the
training phase is to build a fingerprint database of identifiable reference points (RPs) that have been
carefully preselected in the environment. At each RP the signal strengths of all the APs are measured
and the characteristic signal strengths representing that point is identified [4]. In the positioning phase,
the mobile user’s signal strengths are measured and compared to those in the database. An appropriate
search/matching algorithm localizes the mobile user to the associated RP [4].
Search/matching algorithms of SS data that have been used to date can be broken down into
deterministic and probabilistic methods [4].
The deterministic approach uses a relatively simple database [4]. The database houses each RP and
associates x received signal strengths with it, where x is the number APs used. When localizing a mobile
user, the signal strengths of the x readings obtained in real time is compared to the tuples in the
database and the “nearest” reference point is selected.
The probabilistic method, as the name suggests, gives a result location on a probabilistic basis, which
means that it admits that the result will be wrong a certain percentage of the time. It extends upon the
deterministic method in 2 ways. During training, the SS variance with respect to time needs to be
recorded as well; therefore the training phase needs to be run at every reference point for a longer
period of time to capture more data. This provides sufficient information to apply Bayesian theory.
Bayesian inference algorithm is possibly the most powerful localization algorithm to date [3]. The
Bayesian inference algorithm relates the conditional and marginal probabilities of two random events.
Using probabilistic algorithms can exploit knowledge of how the signal strength will fluctuate and
accommodate error and increase the accuracy. Fingerprinting has received a lot of attention [1-7] in
particular with respect to probabilistic approaches to dealing with received signal strength. As proved by
Youssef et al. [6], probabilistic methods outperform deterministic methods all round, but are
computationally more expensive.
SECTION 2.2 – REVIEW OF WORK DONE IN WLAN DEVICE LOCALIZATION
Li et al. [4] tested the triangulation and deterministic fingerprinting approaches on a stationary device.
The simplicity of the triangulation approach was apparent. Tested within the same environment as the
experiment done in the fingerprint experiment, the accuracy was between 4-5 meters. The fluctuation
of the accuracy is due to signal strength variation between the remote node and the AP. In the
deterministic fingerprinting experiment, several selection algorithms for which RP best represents the
position of the user were tested: the Nearest Neighbour algorithm (NN) [1], K Nearest Neighbour (KNN)
for k = 2 – 6 and k Weighted Nearest Neighbour (KWNN) for k = 2 – 5. A NN algorithm selects the closest
8
RP to the apparent location [4]. A KNN algorithm localizes the mobile user to the coordinates that
represent the mean of k NNs [4]. KWNN applies KNN but the resultant coordinate is the weighted mean
of the k NNs [4].
In this experiment accuracy as low as the abovementioned 1.19 meters distance error (132 RPs, 4
WKNN) was achieved. Despite the relative computational simplicity of the NN techniques, they have
proved to be very effective [2]. Although 1.19 meters is the highest accuracy, 132 RPs requires a lot of
time to train. An accuracy of 1.64 meters was achieved by simply lowering the number of RPs to 33. This
result was obtained using the 4NN algorithm. A summarized version of the results is shown in Table 1.
There were 5 APs available in the environment.
NN (m)
4NN
(m)
4WNN
(m)
Test1 (132
RPs)
1.75
1.23
1.19
Test2
(99
RPs)
1.63
1.31
1.27
Test3
(66
RPs)
1.74
1.60
1.49
Test4
(33
RPs)
1.78
1.72
1.64
Test5
(16
RPs)
2.55
2.98
2.45
Table 1: Summarized version of results of Deterministic Fingerprinting localization
Ladd et al. [3] tested the probabilistic fingerprinting approach on both moving and stationary WLAN
devices.
Their experiments were done in an empty corridor that was 32.5 meters long. There were 5 APs within
the device’s range, but the exact coordinates were not given. Their experiments were done with no
persons allowed to be within the area where their experiments were conducted. 1 of the 4 approaches
they tested was the use of sensor fusion. Sensor fusion is the combination of multiple independent
observations to obtain a more robust and precise estimate of the measured variables [3]. Although one
may think the use of multiple APs is the use of sensor fusion, it is in fact the implementation of much
more technical use of the variance data of multiple APs. Their work included the following 4
experiments:
1) Static localization using the position of maximum probability as calculated by Bayes’ rule.
2) Static localization using the position of mean maximum probability as calculated by Bayes’ rule
over 1 second.
3) Localizing a moving device using the position of maximum probability as calculated by Bayes’
rule.
4) Localizing a moving device using the position of maximum probability as calculated by Bayes’
rule and implementing sensor fusion.
9
The summarized results of the above experiment are presented in Table 2. As extensive testing was
done, I suppressed the results to the probabilities derived for the position error being within 1.5 meters
of the true location. 22 RPs were used. Although the results are reasonably good, the experiment was
not a good indication of a typical indoor setting. There were no people present in the environment and
the test-bed was a preselected open space.
Probability
Experiment
(%)
1
77
2
83
3
70
4
83
Table 2: Probability of device being within 1.5 meters of the correct location using 22 RPs
Li et al. [2] experimented with the methodology of the direction based deterministic approach. Their
methodology suggests that at a static location, the direction (limited to North, South, East and West)
that the device’s antenna is facing gives a unique level of signal noise. Their methodology suggests that
the mobile user’s orientation has a significant impact on the received signal strength from an access
point. This suggestion is easy to prove [2]. The purpose of their experiment was to demonstrate that by
recording the signal strength of the mobile device at each AP facing four different directions can
improve the accuracy of the localization. The approach naturally requires an excessive amount of man
hours in the RP training phase. Their results consisted of 20 test cases where the direction based-based
method was correct 95% of the time. They achieved this result by only implementing simple
deterministic fingerprinting with directional data included. This should be compared to not using
directional data; the localization was correct 55% of the time.
The implication of this for identifying RPs is significant. A device located at an RP can give differing signal
strength data, depending on orientation. In the context of tracking a person holding a wireless enabled
cell phone, the error due to varying orientation of the device would be a continuous burden,
unfortunately.
SECTION 2.3 – COMPARISON OF THE REVIEWED TECHNIQUES
A table comparing the techniques is attached as Appendix A. The following characteristics were used to
compare the techniques:
Technique Scalability (TS): the degree to which the experiment took place in an area that represented a
normal indoor environment. Criteria for this characteristic included:



the number of APs used for the size of the environment
the extent to which multiple rooms were covered
whether people were present in the environment
Cost: What hardware or materials were needed to localize a WLAN node?
10
Computational complexity (CC): the level of computational performance that was required to execute
the technique.
Required training time (RTT): the degree to which the technique needed offline data sampling before
localization could be executed. In terms of training RPs, all such offline sampling was considered
irrelevant as the number of RPs are always variable.
Static localization performance (SLP): It was difficult to benchmark the static and mobile performance of
the different methods, as every experiment was conducted in a unique environment. The numbers of
RPs used were consistent for all experiments and the locations of APs were bound to what the
environments presented. It is also not directly possible to benchmark deterministic and probabilistic
techniques, but for relative purposes the static localization performance for deterministic techniques is
the localization accuracy for at most 33 APs. The static localization performance for probabilistic
techniques is the probability of the localization error being less than 1.5 meters using 33 RPs.
Mobile localization performance (MLP): The same approach was used as for static localization
performance.
SECTION 2.4 – SUMMARY OF THE EXPERIMENTS AND TECHNIQUES REVIEWED
Research done in the field concludes that a WLAN node can be tracked within 1.5 meters with
reasonable confidence. Direct comparison of techniques based on the exact same environment
conditions, such as location of APs and database of RP locations cannot be done with the experiments
reviewed. However many different techniques to improve localization error were tested in the above
experiments and it cannot go unnoticed that some of these techniques are mutually exclusive. For
example, the direction based approach proved that localization error can be lowered by taking into
account the direction the node was facing at database training time. There is no reason to exclude real
time optimizations such as probabilistic fingerprinting and sensor fusion. The list of techniques and
algorithms reviewed can be separated, into mutually exclusive groups as shown in Table 3.
Localization
method
Use of
directional
information
Directional RP
Non-directional
RP
Use of sensor
fusion
Triangulation
Sensor fusion
Deterministic
No sensor fusion
fingerprinting
Probabilistic
fingerprinting
(raw positional
result)
Probabilistic
fingerprinting
(average
positional result
Table 3: Mutually exclusive localization performances techniques
11
An optimal performance scheme gauged from the experiments reviewed would be probabilistic
fingerprinting using the mean result of Bayes’ algorithm over 1 second for RP classification, a database
of directionally verbose RPs and sensor fusion. The scheme is shaded in grey in table 3. The
combinations of averaging output of Bayes’ algorithm and sensor fusion would result in especially high
computational complexity requirements. The training phase would be no longer than with a directional
deterministic fingerprinting approach as tested by Li et al. [2]. This suggests a new experiment not
implemented in the reviewed literature should be conducted.
12
SECTION 3 METHODOLOGY
This paper implements a system that would allow for a laptop to be tracked using the deterministic
fingerprinting technique. This is addressed in section 3.1. A K-nearest neighbour algorithm is applied to
extract reference points from the database which is explained in Section 3.2. Open source software was
modified to implement the program and to test the algorithms. An overview of this software is detailed
in section 3.3.
SECTION 3.1 TECHNIQUE
When the laptop gets fingerprinted at a reference point in the training phase, it measures the strengths
of the signals it has with each of the n access points. This data are placed into a data structure as shown
in Figure 2. This unit of information can be defined and will from here on be referred to as,
synonymously to the concept of point in a fingerprinted map, a reference point.
Figure 2: The structure of a reference point record.
This data structure is then in turn placed into the lookup table to eventually containing all the RPs
(Figure 3). Based on the concept of triangulation stated in section 2.1.1, this data unit should be unique
when 3 or more access points are used. However, due to the obstructive nature of an indoor
environment to signal strength propagations, 4 access points are used in the current experiment’s
implementation. Therefore the data unit should represent a fairly unique identifier for the location, or
the location’s reference point. The training algorithm is explained in the Design section.
Figure 3: The Structure of the RP lookup table. The lookup table is simply a collection of reference point
items. When a new reference point is learnt, it is added to the lookup table.
SECTION 3.2 THE K NEAREST NEIGHBOUR ALGORITHM
The fingerprinting technique relies on a search/matching algorithm to localise the laptop on the
testbed [4]. The KNN algorithm is such an algorithm.
13
It must be clearly re-established that during the positioning phase, the only information gathered is
the the received signal strengths from the 4 AP. The observed set of signal strengths [SS1 , SS2 , SS3 ,
SS4] are to be compared to each RP’s set of signal strengths [ss1 , ss2 , ss3 , ss4] and a “nearness”
indicator needs to be created. In this paper, the nearness is calculated by the Euclidian distance in
signal space between them. The equation is provided below.
𝐿𝑥 = √∑4𝑖=1(𝑠𝑠i − SSi )2
The smaller the value for Lx, the closer the apparent location is to RPx.
Therefore the nearest neighbour would be the RP with the smallest value for L and the 2nd nearest
neighbour would be the RP with the 2nd smallest L value, etc.
When multiple nearest neighbours are used to calculate the coordinate, the centroid of the formed
polygon must be determined [k]. This is achieved by taking the mean average of the K x and y coordinate
values [j].
SECTION 3.3 SOFTWARE DESIGN
The project was developed in the Linux operating system making use of open source software. A Linux
package known as Wireless Tools was the foundation of the software development in this project. The
purpose of the Wireless Tools software is to provide command line tools that allow one to set or
monitor the operating system’s wireless configuration in a structured way [l]. It forms part of many
Linux operating system distributions.
Written in C code, the Wireless Tools package operates on memory that gets set by the wireless
hardware driver itself [h]. It functionally makes low level information provided by the driver available.
The software provides tools to view the available access points with their respective configurations and
to connect/disconnect to available wireless networks.
The wireless-tools source code was fully applicable to use for implementing wireless tracking and was
well documented for programmer level customization. The new version of the Wireless Tools package
created in this paper can be used on any Linux distribution that already supports Wireless Tools.
SECTION 4 IMPLEMENTATION
Location fingerprinting consists of two stages: ‘training’ and ‘positioning’ [4]. The training stage is
executed first and creates a database of reference points. This is then used in the positioning stage
to locate a device. The “learn” function presented in this paper represents the algorithm
encapsulating the training stage and is detailed in section 4.1. The positioning stage is the stage
where tracking actually needs to occur. The “track” function, encapsulating the laptop positioning,
is the command line function implemented to establish the location, or more relevant, the
localization error, for analysis. The “track” function is presented in section 4.2.
14
SECTION 4.1 THE LEARN FUNCTION
Once the wireless device, in this case, a wireless laptop, has strategically been placed at a selected
reference point, the learn function is ready to be run. The algorithm for the learn function is
accompanied graphically by a flow chart (Figure 4).
Figure 4: A flow chart encapsulating the learn function process
The learn function executes for about 5 to 10 seconds. The training stage consists of placing the
laptop at a reference point, running the learn function, moving the laptop to the next reference
point and so on. The command line function, the Wireless Tools iwlist command, is executed as
follows:
15
$ sudo iwlist interface learn rp_label output_filename
For example: mode
$ sudo iwlist wlan0 learn 3x2 mollyblackburnhall.txt
First of all, due to accessing restricted memory set by the WLAN hardware, the command needs to
be run as root. [M]. The first argument is the network interface to use [M]. On most machines that
only have 1 wireless network card plugged in, the interface would be wlan0. The second argument
is “learn”, the command the user wishes to perform using this Wireless Tool. “learn” is the
command added to the source code that will run the fingerprint training algorithm presented in this
paper. Argument number 3 is the user specified label for the reference point about to be
fingerprinted. Labels such as “3x2” for example can be employed to represent a coordinate in the
room. The final argument is the filename that you want the data to be written to. This file, serves
as the lookup table when tracking the laptop in the positioning stage.
Figure 5: A sample inputrouters.txt file
An implicit input file in the program is the {project root}/input/inputrouters.txt file (Figure 5). The
learning function starts by reading from this file. The number of access points to be used in the
experiment is extracted, followed by reading the access points’ MAC addresses. For each line that
contains a MAC address, a descriptive label may be appended to the line for personal reference
purposes and does not get parsed by the program.
The MAC addresses are required as each AP needs to uniquely be identified. Also, it is more than
likely that there will be other stray APs in wireless range during the experiment that need not be
included. In theory, it would not hurt to use them as additional sources of AP reference information
to fingerprint a location. However, due to the lack of control over the configuration of such APs,
they were not included in the experiment.
An output file stream is also initialized at this point in time that will be used later in the algorithm to
output data to file.
The learning algorithm makes use of a data structure created called the window. The window is just
an array of signal strength readings captured at the current RP (See figure 3).
16
The next step in the algorithm is a step shared with the track function, capturing the signals from
the hardware. This step is explained in detail in section 4.3. The window is filled with 10 signal
strength readings from each AP obtained from the network card.
After the window has been populated with fingerprint records, the data can be used to create the
RP data structure for the current location (See Figure 2). The RP for the location the laptop is
positioned at is taken by averaging (mode average) the signal strength value captured for each
router (which was stored in the window in the previous step). By taking the mode average for each
router’s received signal strength at the current location, the most accurate fingerprint can be
obtained. The learn function terminates by appending the new RP to the output file specified in the
command line. A sample of an output file of the learn function is given in Figure 6. This file serves as
the RP lookup table data, when executing the track function.
Figure 6: The structure of the fingerprint database file. This file is the output file of the learn
function.
SECTION 4.2 THE TRACK FUNCTION
The track algorithm is very similarities to the learn algorithm, as they share the same end goal: to obtain
signal strength readings from the network card. The flow chart for the track algorithm is shown in Figure
7.
The same Wireless Tool command is used to execute a track run. However, the 2nd argument is naturally
changed to track instead of learn. The 3rd argument is a fingerprint lookup table, as generated by the
learn function. The 4th argument captures a label that is used to define the true location of the test in
17
the experiment. This will be needed when analysing the positioning error in the KNN algorithm. The
usage of the command is exemplified below:
$ sudo iwlist interface track Lookup_tabel_file test_label
Figure 7: A flow chart encapsulating the track function
As with the learn function algorithm, the routers MAC addresses are captured from file to identify which
APs in wireless range form part of the experiment. The window is then initialised and again 10 signal
strength readings from each AP are captured from the network card (Please note the “Add fingerprint to
window” step for accessing the network card is provided in Figure 8).
As the window gets populated with fingerprints, the fingerprint data can be exported to file (see
Figure 8). The purpose of this output is to view what the 10 fingerprints were that were captured in
18
the experiment. Information such as the variation of the signal strengths with respect to time can
be observed from this output.
Figure 8: Flow chart encapsulating the process of obtaining a fingerprint from the low level
hardware from the use of Wireless Tools
19
The same technique to take the median average of the 10 signal strengths from each AP is used to give a
resulting location of the test. The test label, specifying the true location of the test and the signal
strengths for the 4 APs are written to file as shown in Figure 9.
Output the results of KNN algorithm to ../results/test_label.txt
Initialise resulting_fingerprint = [router_count] = obtained median signal strength
Perform KNN algorithm on resulting_fingerprint and output results to ../results/test_labe.txt
Figure 9: Sample test results file
20
SECTION 5 EXPERIMENT
SECTION 5.1 PREPARATION
The experiments were conducted in the Molly Blackburn Hall at the University of Cape Town (UCT). In
preparation for the experiment, all furniture, including tables and chairs, was removed from the venue.
Initially, the hall’s layout was captured, by measuring the distances and shape of the hall with measuring
tape. The map with measurements is provided as Appendix B. The hall was used for testing on two
occasions, which will be referred to as Day 1 and Day 2.
Figure 10: A photo of a sticker used to mark the floor to represent the exact location of a coordinate
For the purposes of generating known locations in the hall, it was necessary to mark coordinates out on
the floor. Stickers were used to mark out 2 meter squares, with exception to points on the floor where
pillars were positioned. These marked locations functioned as reference point testing locations and
implicitly to mark exact coordinates for repeat testing. Figure 9 shows such a sticker. On the first
experiment day, 54 reference point locations were used and on Day 2, the same 54 locations with an
additional 13 were marked. The marking of the floor and router locations are displayed in Figure 7.
21
Figure 11: Map of the Molly Blackburn Hall at the University of Cape Town showing reference points and
routers. The 13 circled reference points were not used on Day 1.
2 laptops were used in the experiment, a Hewlett Packard (HP) Compaq nx7400 and an Acer Aspire One.
The machines were both running the Ubuntu 9.04 operating system from a live CD. The exact same
version of the source code was copied onto the machines and compiled locally using GNU 4.3. Table 4
lists the laptops and their wireless network cards.
Laptop
WLAN card
Hewlett Packard Compaq nx7400
Intel PRO/Wireless 3945ABG
Broadcom 4311BG
Acer Aspire One
Table 4: Laptops and their respective wireless network cards
4 Access Points (WLAN Routers) were used in the experiment and the model, firmware version and MAC
address are shown in Table 5. The 2 Cisco routers were already present and mounted on the walls of the
hall, whereas the Netgear routers were brought in and placed at opposite sides of the room. This layout
was picked so that routers were placed adequately apart.
Router Model
Netgear DG834G
Cisco 2.0 Model 1252AG
Cisco 2.0 Model 1252AG
Netgear DGN2000
Firmware Version
V4.01.37
V5.09.01
V5.09.01
V1.01.01
MAC Address
00:14:6C:A7:B5:06
00:17:DF:A8:95:E1
00:21:A0:0F:E3:E0
00:24:B2:39:A6:D8
SECTION 5.2 TRAINING PHASE
Once the above preparations were carried out, the training stage could be performed. Whilst training,
the laptops were placed centrally on a table as shown in Figure 10, which thus fixed the height. The
height of the table is 1.15 meters. The laptop was always orientated the same way, squarely facing a
wall. The wall the laptops faced was the South facing one.
22
Figure 12: Photo of the HP Compaq in training phase at coordinate (12, 1)
The training stage was executed as follows:
1) Place table with laptop on a coordinate, by placing the centre of the base of the table on the
relevant sticker
2) Ensure the laptop is squarely facing the south wall
3) Run the training algorithm (sudo iwlist wlan0 learn molly.txt coordinate), ensuring that your
body is not in direct line of sight of the laptop and any of the 4 APs
4) Stand idly and wait for program to finish (approximately a 6 second wait)
5) Move the table to the next coordinate and repeat until all reference points have been visited
On Day 1, the above steps were performed at each of the 55 reference points created (points along
coordinate line Y = 4 were not marked). Only the HP was available for use. On Day 2, the training
occurred on all 67 reference points shown in Figure 7 and both laptops were used on Day 2, following
the same procedure. The laptops performed the training procedure independently whilst the other
laptop was switched off.
SECTION 5.3 POSITIONING
23
On Day 1, the HP was positioned at 19 different locations. The 19 test locations were selected to
represent a balanced spread over the test area. The following test procedure was performed:
1) Place table with laptop on a coordinate, by placing the centre of the base of the table on the
relevant sticker
2) Ensure the laptop is facing the south wall
3) Run the positioning algorithm (sudo iwlist wlan0 track ../input/coordinate_maps/molly.txt),
ensuring that your body is not in direct line of sight of the laptop and any of the 4 APs
4) Stand idly and wait for program to finish (approximately a 6 second wait)
5) Move the table to the next coordinate and repeat until all test points have been visited
Also on Day 2, 2 additional tests were performed for both laptops, creating 3 test scenarios for each
laptop. Each test on Day 2 was done on 10 different coordinates, again, selected to represent a balanced
spread over the test area. Test 1 was as described for Day 1 above. For test 2, the same procedure was
used (as well as the same coordinate positions), however the orientation of the laptop was east facing.
This was done to provide results that would indicate whether orientation is significant when tracking the
laptop. The 3rd and final test, was to run the tracking program on both machines, simultaneously and in
close proximity. This would provide data that would indicate how effective the tracking algorithms are
when multiple devices are accessing the routers. Figure 11 shows a photo of both machines setup for
test 3.
24
Figure 13: Photo of both the Acer and the HP setup for the simultaneous tracking test
SECTION 5.4 OUTCOME OF EXPERIMENT
After both days of testing, 3 sets of training data were obtained.
For the HP laptop, the hall was learnt twice on 2 separate days, creating the first 2 training sets of data.
Ideally, one would expect that the signal strengths should be the same for the 54 corresponding
reference points used on both Day 1 and Day 2. The consistency of signal strengths required to
implement effective tracking would thus be validated.
On Day 2, the same environment was learnt on 2 different laptops with different WLAN cards. This
allows both laptops to be tested for various fingerprint tracking algorithms. The different training data
sets for each laptop can also be compared, to validate whether a universal fingerprint database could be
used for any wireless enabled device.
The list of training data sets are given is Table 5.
Dataset Laptop
1
HP Compaq nx7400
2
HP Compaq nx7400
Day Number of reference points captured
1
54
2
67
25
3
Acer Inspire One
2
67
Table 5: List of different Training fingerprint lookup tables obtained during experiment
Over the course of the experiment, 7 different positioning data sets were obtained that are
considered the results of the experiment.
The data sets can be divided into 7 different sets because the conditions in which the tracking
occurred were changed: The laptop used (Acer or HP) and the test type. The test types were of
three different examinable objectives: Repeatability, Reorientation and Simultaneous Tracking. It is
important to understand the definition of these terms as they are used to discuss the results. These
terms are explained in detail below.
The repeatability test was a test to see if the laptop, positioned at a coordinate once trained into the
fingerprinting database, can receive the exact same signal strength values that were captured when
the coordinate was learnt. The repeatability test literally tests if the signal strength fingerprint of
the location will repeat at a later point in time. This is also referred to as the control test when
compared to other test sets. This was presumably accomplished through conducting test 1 in the
experiment.
The reorientation test tests to see how accurately the laptop can be localized if the laptop is
orientated differently as to how it was orientated when the location was learnt. This reflects on the
real application for asset tracking as the exact orientation the device will almost certainly not be
constant.
The simultaneous tracking test tests how much worse the localization error is if multiple devices
are accessing the routers simultaneously. The list of tracking data sets are given is Table 6. Note that
the HP Compaq used a new fingerprint lookup table on Day 2.
Dataset Laptop
Day Test Type
Number of points the test were
perform at
1
HP Compaq nx7400 1
Repeatability
19
2
HP Compaq nx7400 2
Repeatability
10
3
Acer Inspire One
2
Repeatability
10
4
HP Compaq nx7400 2
Reorientation
10
5
Acer Inspire One
2
Reorientation
10
6
HP Compaq nx7400 2
Simultaneous Tracking 10
7
Acer Inspire One
2
Simultaneous Tracking 10
Table 6: List of different positioning result data sets obtained during experiment
SECTION 6 RESULTS
In total, 79 tests were conducted over 7 different tracking conditions as listed in Table 6. The
average error of each dataset is given in table 7.
For each test, the KNN algorithm was applied for K = 1 to 8. Therefore for each test, 8 locations
were generated representing 8 different answers as to where the laptop was perceived to be. The
26
difference between the true location and the apparent location (the localization error) as predicted
by the 8 KNN algorithms was calculated.
1
HP
1
Repeatability
K=1
5.46
Average Localisation Error Obtained
When Using KNN algorithm for K = 1 to 8
K=2 K=3 K=4 K=5 K=6 K=7
5.06
4.95
4.59
4.57
4.70
4.70
2
HP
2
Repeatability
8.43
7.32
7.38
7.50
7.37
7.21
6.98
7.00
3
Acer
2
Repeatability
8.72
7.85
6.95
7.55
7.48
7.48
7.12
7.23
4
HP
2
Reorientation
7.75
6.37
6.13
5.99
6.33
6.02
5.71
5.88
5
Acer
2
Reorientation
3.10
4.12
4.65
4.42
4.32
4.43
4.55
4.82
6
HP
2
Simultaneous
Tracking
7
Acer
2
Simultaneous
Tracking
Table 7: Results of the experiment
7.46
6.10
6.13
5.99
6.33
6.02
5.71
5.88
7.75
6.37
6.13
5.99
6.33
6.02
5.71
5.88
Dataset Laptop Day
Test Type
K=8
4.40
SECTION 6.1 REPEATABILITY
From the 3 repeatability test sets, a total of 39 repeatability tests were obtained. Figure 12 shows
the average localization error and standard deviation of the tests when the nearest neighbour
algorithm is applied for K varying from 1 to 8. The average error generally stays around 5.5 meters.
However the standard deviation drops as K increases. This shows that results become less variant
as the number of neighbours is increased and so more accurate.
Error (m)
6
Average
Standard
Deviation
4
2
Average
Error
0
1 2 3 4 5 6 7 8
K
Figure 14: Graph of average error and standard deviation for all repeatability tests conducted for
each nearest neighbour algorithm.
As opposed to results from reviewed literature [Lib et al 2006], the distance error did not decrease
when K was increased. Figure 13 and Figure 14 show the average error and standard deviation
respectively for each of the 3 repeatability tests separately.
27
10
7
6
8
4
2
0
Error (m)
Error (m)
5
6
HP Day 1
1
2
3
4
5
6
7
4
3
2
HP Day 1
HP Day 2
1
HP Day 2
Acer Day 2
0
Acer Day 2
8
1
2
3
4
K
5
6
7
8
K
Figure 13: Graph of average localization error
for each repeatability test as K increases
Figure 14: Graph of standard deviation for
each repeatability test as K increases
SECTION 6.2 REORIENTATION
From the orientation experiment, a total of 20 tests were conducted, 10 from each laptop. The
reorientation tests were conducted at exactly the same coordinates as the control test
(repeatability test). The average localization error and error standard deviation for K = 1 to 8 of the
HP and Acer laptops are shown in Figures 15 and 16 respectively.
10
8
8
Average Error
6
6
Average Error
4
4
Standard
Deviation of
Error
2
0
Standard
Deviation of
Error
2
0
1 2 3 4 5 6 7 8
K
1
2
3
4
5
6
7
8
K
Figure 15: Average Error and Standard
Deviation of the Reorientation test results for
the HP
Figure 16: Average Error and Standard
Deviation of the Reorientation test results for
the Acer
28
SECTION 6.3 SIMULTANEOUS TRACKING RESULTS
10 tests were conducted where both laptops ran the track function at the same time. The average
error and standard deviation over the 10 tests for the HP and Acer for K = 1 to 8 are shown in
Figure 17 and 18 respectively.
10
8
8
Average
Error
6
Average
Error
6
4
4
Standard
Deviation
of Error
2
0
Standard
Deviation
of Error
2
0
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8
Figure 17: Average Error and Standard
Deviation of the Simultaneous Tracking Test
Results for the HP
Figure 18: Average Error and Standard
Deviation of the Simultaneous Tracking Test
Results for the Acer
29
Section 6.4 Benchmark
It is important to compare the results achieved to some sort of benchmark. For each of the 3
repeatability tests with their respective fingerprint databases, the tests were rerun. On this occasion,
the received signal strengths at each location were randomly generated. The average localisation error
for each of the 3 randomised test sets are shown in Figures 19, 20 and 21 with their respective
repeatability test respectively.
10
10
8
8
HP Day 1
6
HP Day 2
6
4
4
Randomly
Generated
Signals
2
Randomly
Generated
Signals
2
0
0
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8
Figure 19: Graph of Average Error of the HP
Day 1 Repeatability Test and Randomly
Generated Signal Strengths Test of the HP Day
1 Fingerprint Database
Figure 20: Graph of Average Error of the HP
Day 2 repeatability test and Randomly
Generated Signal Strengths Test of the HP Day
2 Fingerprint Database
12
10
Acer Day 2
8
6
Randomly
Generated
Signals
4
2
0
1 2 3 4 5 6 7 8
Figure 21: Graph of Average Error of the Acer Day 2 Repeatability Test and Randomly Generated
Signal Strengths Test of the Acer Day 2 Fingerprint Database
SECTION 7 DISCUSSION OF RESULTS
30
Overall, it can be seen that localization results were better as K is increased. The result of the
repeatability test on day 2 for the Acer was an exception to this rule and the localisation error was
higher when K was increased. The best average error result of all 7 tests was in fact with the Acer
during the repeatability test when K = 1. The average error of the 10 localisations was 3.09 meters
and on 2 occasions the resulting single nearest neighbour was the exact coordinate.
SECTION 7.1 REPEATABILITY
It was naturally assumed that the results for the repeatability experiments would be the most
accurate. By definition, the repeatability test at a coordinate was an assessment to see whether the
laptop would receive the exact same signal strength fingerprint when positioned and orientated in
the exact same way as it located during the training phase. It is clear that this is
31
32
SECTION 7 ANALYSIS OF RESULTS
SECTION 8 CONCLUSION
SECTION 9 FURTHER RESEARCH
33
REFERENCES
[1]
Bahl, P, Padmanabhan, VN (2000) RADAR: An in-building RF-based user location and tracking
system, IEEE Infocom 2000, Tel Aviv, Israel, 26-30 March, vol. 2, pp. 775-784
[2]
Binghao Li, Jeffery Kam, Jonathan Lui, Andrew G. Dempster “Use of
Directional Information in Wireless LAN based indoor positioning”,
Proc IGNSS, Sydney, Dec 4-6 2007
[3]
Ladd, A.M., Bekris, K.E., Rudys, A., Marceau, G., Kavraki
L.E., & Dan, S., “Robotics-based location sensing using
wireless Ethernet”, Eighth ACM Int. Conf. on Mobile Computing
& Networking (MOBICOM)
[4]
Li, B, Salter, J, Dempster AG, Rizos, C (2006) Indoor Positioning Techniques Based on Wireless
LAN, First IEEE International Conference on Wireless Broadband and Ultra Wideband
Communications, Sydney, Australia, 13-16 March, paper 113.
[5]
Li, B., Dempster, A.G., Rizos, C., & Barnes, J., “Hybrid method for localization using WLAN”,
Spatial Sciences Conference, Melbourne, Australia, 12-16 September 2005
[6]
Youssef, M., and Agrawala, A. On the Optimality of WLAN Location Determination Systems. In
CommunicationNetworks and Distributed Systems Modeling and Simulation
Conference (January 2004).
[7]
Youseff M., Agrawala A. and Shankar A.U., WLAN location determination via clustering and
probability distributions, in: Proc. of the IEEE International Conference on Pervasive Computing and
Communications (PerCom), Forth Worth, TX (March 2003) pp. 143–150
[h] Jean Tourrilhes. (25 July 07 ). Wireless LAN resources for Linux. Available:
http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/. Last accessed 2 November 2009
[i] Paul Bourke. (July 1988). Calculating the Area and Centroid of a Polygon. Available:
http://local.wasp.uwa.edu.au/~pbourke/geometry/polyarea/. Last accessed 2 November
2009
[k] Sharma, N. K. 2006. A weighted center of mass based trilateration approach for locating wireless
devices in indoor environment. In Proceedings of the 4th ACM International Workshop on Mobility
Management and Wireless Access (Terromolinos, Spain, October 02 - 02, 2006). MobiWac '06. ACM,
New York, NY, 112-115. DOI=http://doi.acm.org/10.1145/1164783.1164804
[l] Jean Tourrilhes. (2008). wireless(7) - Linux man page. Available:
http://linux.die.net/man/7/wireless. Last accessed 2 November 2009
[M] Jean Tourrilhes. (2008). iwlist(8) - Linux man page. Available:
http://linux.die.net/man/8/iwlist. Last accessed 2 November 2009.
34
APPENDIX A: COMPARISON OF REVIEWED EXPERIMENTS
Triangulation
Deterministic fingerprinting
Probabilistic fingerprinting (static,
max probability)
Probabilistic fingerprinting (static,
mean probability)
Probabilistic fingerprinting
(mobile, max probability)
Probabilistic fingerprinting
(mobile, sensor fusion)
Direction based deterministic
fingerprinting
Cost
low
low
Computational
Complexity
low
moderate
Required
Training
Time
none
moderate
Static
Localization
Performance
4-5 m
1.19 m
Mobile
Localization
Performance
NA
NA
Bad
low
high
moderate
77%
NA
Bad
low
high
moderate
83%
NA
Bad
low
high
moderate
NA
70%
bad
low
very high
moderate
NA
83%
good
low
low
high
95%
NA
Technique
Scalability
very good
Good
35
APPENDIX B: FLOWCHART ENCAPSULATING THE PROCESS OF CAPTURING THE SIGNAL
STRENGTH VALUES FROM THE WIRELESS CARD HARDWARE USING WIRELESS TOOLS
36
APPENDIX C: MAP OF THE MOLLY BLACKBURN HALL WITH MEASUREMENTS
Main Hall:
37
West Lobby:
38
Table 7: The coordinates at which the 19 repeatability tests were conducted on the HP Compaq on
Day 1
Test
Actual
Test
Actual
Number Coordinate Number Coordinate
1
13x3
6
7x3
2
12x1
7
5x1
3
10x3
8
5x3
4
9x0
9
3x3
5
8x2
10
1x1
Table 8: The actual coordinates for the 10 repeatability tests conducted on the HP Compaq on Day 2
Test
Actual
Test
Actual
Number Coordinate Number Coordinate
1
13x3
6
7x3
2
12x1
7
5x1
3
10x3
8
5x3
4
9x0
9
3x3
5
8x2
10
1x1
Table 9: The actual coordinates for the 10 reorientation tests conducted on the HP Compaq on Day
2
Test
Actual
Test
Actual
Number Coordinate Number Coordinate
1
1x1
6
7x3
2
3x0
7
7x1
3
3x2
8
10x2
4
2x2
9
8x2
5
7x2
10
12x2
Table 10: The actual coordinates for the 10 simultaneous tracking tests conducted on the HP
Compaq on Day 2
Test
Actual
Test
Actual
Number Coordinate Number Coordinate
1
1x1
6
8x2
2
3x3
7
9x0
3
5x3
8
10x3
4
5x1
9
12x1
5
7x3
10
13x3
Table 11: The actual coordinates for the 10 repeatability tests conducted on the Acer Aspire on Day
2
Test
Number
1
2
3
Actual
Coordinate
13x3
12x1
10x3
Test
Number
6
7
8
Actual
Coordinate
7x3
5x1
5x3
39
4
9x0
9
3x3
5
8x2
10
1x1
Table 12: The actual coordinates for the 10 reorientation tests conducted on the Acer Aspire on Day
2
Test
Actual
Test
Actual
Number Coordinate Number Coordinate
1
3x0
6
7x2
2
1x1
7
8x2
3
2x2
8
10x2
4
3x2
9
12x0
5
7x1
10
12x2
Table 13: The actual coordinates for the 10 simultaneous tracking tests conducted on Acer Aspire
on Day 2
40
Download