Design and Implementation of A Wifi-Based Local Locating System
Design and Implementation of A Wifi-Based Local Locating System
Abstract -This paper presents the design and implementation to provide location and navigation information for airplanes,
of a WLAN based system for locating and tracking receivers ships, and automobiles, however, they have a bad
inside buildings. It utilizes the WiFi access points existing in performance indoors because buildings block GPS
most modern office buildings, and is able to track multiple transmissions.
objects simultaneously. Experimental result shows that it RFID is a rising technique for identification and
provides a locating accuracy of about 5 m under indoor authentication, and some researchers adapt it for in-building
environment. positioning by measuring the angle and time of the RF
signals arriving at 3~5 RFID readers [2]. Along with its high
I. INTRODUCTION locating precision, these RFID readers have to be made very
complicated, therefore the cost is unacceptable.
With the rapid development of mobile computing devices
Systems for locating cellular telephones are considered
and wireless local area networks (WLAN), more and more
promising for years [3]. The technological alternatives for
attention is drawn to location-aware systems and services.
these systems include measuring the signal attenuation, the
Real Time Locating Systems (RTLS) continuously
angle of arrival (AOA), and the time difference of arrival
determine and track the real-time location of assets and
(TDOA). While these systems turn out to be effective in
personnel using active RF transponders. Local Locating
outdoor environments, their performances indoors are not so
Systems (LLS) is a particular type of RTLS, designed to
good because of the multiple reflection and attenuation of
track objects in a constrained indoor or outdoor area. LLS
RF signals.
readers are installed at key locations within a facility. Tags
The RADAR project [4] and our work are similar in some
typically broadcast their identity on a periodic basis (which
ways, but there are several significant differences: (1)
can be programmed to be several seconds, minutes or even
RADAR is based on the radio connection of two specialized
hours). Generally, a tag will be in range of two or more
WiFi network cards, rather than the general AP and WiFi
readers that can then estimate the tag's distance from each
receivers described in this paper; (2) RADAR did not take
reader and therefore determine its location with enough
the numbering or addressing of the WiFi base stations into
precision to enable personnel to visually locate the item.
consideration, therefore it cannot handle multiple WiFi
In this paper, we present a WiFi-based Local Locating
receivers at one time; (3) RADAR emphasize the empirical
System (WiFi-LLS) which uses Wireless LAN (WiFi)
method to estimate the position of mobile host by searching
access points (AP) as LLS readers. It has several significant
the signal strength data map constructed beforehand. These
advantages:
points are clarified in the following sections.
1. It gets a full utilization of ready-to-use devices without
any changes in the hardware and software of WiFi AP, and III. OVERVIEW
does not disturb the regular WLAN access service
provided by these AP. This section provides a brief overview of the WiFi-LLS
2. Any device with IEEE 802.11 WiFi radio can serve as a system. The WiFi-based local location system (WiFi-LLS)
WiFi-Tag, therefore the system can also be used to locate consists of three main parts: WiFi-Tags, AP, and Data Server,
laptops, PDAs, WiFi cell phones and other equipment that as illustrated in Fig. 1.
has integrated WiFi radios.
Our experiment result shows that WiFi-LLS has adequate
precision of locating, along with relatively low cost, which
suggests that WiFi-LLS will have wide applications, such as
tracking valuable assets in museums, exhibitions and so on.
1
1-4244-1039-8/07/$25.00 ©2007 IEEE
WiFi-Tags are targets for locating and tracking -- they in each practical situations. Since the WiFi-LLS system is
collect signal strength information of APs and send it to Data designed toward large-scale and low-cost applications, we
Server. AP transmits RF signals and provides network should reduce the complexity to some extent. Therefore, in
connections. Data Server calculates the position of target the WiFi-LLS system we reduced model (1) by substituting
WiFi-Tags out of these signal strength information. these effects of obstacles with a fixed empirical value OAF:
The signal propagation model of the AP is to be d
n
(2)
determined firstly, since the relationship between distance P (d )[dBm ] = P (d 0 )[ dBm] − 10 log − OAF
d0
and signal strength provides us the basic information for
location. With this model, if a WiFi-Tag receives three or Model (2) is expected to provide not-so-good but adequate
more AP’s signal, we are able to calculate its position from precision of distance prediction. The following experiment
these AP’s positions. is conducted to determine OAF: First we measured the
In order to tell these AP and WiFi-Tags from each other, signal strength with varying number of obstacles (walls and
an addressing mechanism is introduced to give each floors) between the AP and WiFi-Tag. Then we measured
device a unique id; therefore the WiFi-LLS system is able to the signal strength at the same distance without any
locating and tracking multiple WiFi-Tags simultaneously. obstacles. We computed the average of the differences
In the WiFi-LLS system, all WiFi-Tags are supposed to be between the former ones and the latter one. In a typical
in the cover area of at least one AP. However, three or more office building, the OAF is about 15 dBm according to our
APs in range are needed to guarantee adequate locating measurement.
accuracy. Each WiFi-Tag periodically detects the signal To determine the path loss exponent n and reference
strength (SS) of nearest AP (up to three), packs the SS data signal strength P(d0), we measured the signal strength when
along with these AP’s and the WiFi-Tag’s addresses into a the AP and WiFi-Tag had line-of-sight, therefore the effect
XML data packet, and then submits this packet to the Data of OAF could be omitted. The result is shown in Fig. 2.
Server. The Data Server parses the XML [5] data packet, Assuming the large-scale distribution in (2) is log-normal
fetches out the AP’s pre-measured coordinates for our data, we determined n and P(d0) using linear
corresponding to the addresses, and then calculates the regression, as shown in Fig. 3.
WiFi-Tag’s coordinate using the triangular positioning
30
method if there are three APs’ information, or the strongest
25
AP selection method if not.
Signal Strength (dBm)
20
15
IV. IMPLEMENTATION
10
A. AP Signal Propagation Model 5
In an indoor environment WiFi signals are affected by 0
-5
reflections, diffraction, and scattering, hence, the
-10
attenuation of WiFi signal does not totally depend on path
-15
loss. When a signal propagation model is introduced to
0 5 10 15 20 25 30 35 40 45
describe the attenuation process, different building layouts
should be taken into consideration as well as large-scale Distance (m)
path loss, such as described in [6] and [10]: Fig. 2 Signal strength as a function of distance
P Q
d
P(d )[dBm] = P(d 0)[dBm] −10log( ) n − ∑WAF( p) − ∑FAF(q) 40
d0 p=1 q=1
30
(1)
Signal Strength(dBm)
2
The result shows that n = 2.81 and P(d0) = 38.3 dBm.
These parameters are used to perform the Triangular
Positioning to be mention in Section IV-D.
B. AP and Tag Addressing
In order to locate and track multiple WiFi-Tags at one time,
we should give each WiF-Tag or AP a unique ID, therefore
Data Server is able to determine the source of the XML
packets containing signal strength data and the transmitters
of these signals. Since AP and WiFi-Tags are Ethernet
devices conforming to TCP/IP protocol, all of them have a
universal unique ID -- MAC address. MAC address is short
for Media Access Control address, a hardware address that
uniquely identifies each node of a network. Fig. 5 XML data packet used in WiFi-LLS
D. Triangular Positioning
When the Data Server receivers a XML packet, it extracts
the WiFi-Tag’s and the corresponding APs’ information with
the help of some XML library routines. If the server had not
received this Tag’s information before, it would derive a new
thread to deal with it; otherwise, it sent the information to the
corresponding thread.
If there is three APs’ information in the packet, we are
able to perform the triangular positioning. First, we get these
Fig. 4 MAC address on a Dell X30 PDA APs’ coordinates by querying a pre-established database
(a typical kind of WiFi-Tags) with the AP’s id. According to the AP signal propagation
We can take this convenience to identify our AP and model described in section IV-A, we can estimate the
WiFi-Tags by making MAC address serve as the unique id. distances between the WiFi-Tag and the APs with the signal
MAC address is easy to extract from the network card driver strength information, and name the results with DS1, DS2,
under all mainstream operating system. Fig.4 shows the and DS3 respectively.
MAC address of a Dell X30 PDA running Microsoft Pocket As shown in Fig. 6, we then draw three circles with the
PC 2003. Especially, the WiFi-Tag is able to get the MAC centers set as the AP’s coordinates, and the radiuses set as
address of the AP which it connects to, with the help of DS1, DS2 and DS3 respectively. Taking any two of these
WLAN drivers and wireless-tools [8] under linux operating three circles into account, there are two possible situations
system. Therefore, it is possible to associate one WiFi-Tag due to the simplicity of the propagation model:
with its nearest APs by packing their MAC addresses 1. Two circles cut each other. Then we get two intersection
together. points. Particularly, if two circles are tangential to each
other, the tangent point should be taken into account
C. Data Collection and Submission twice.
In our WiFi-LLS system, a WiFi-Tag performs an 2. Two circles stay apart from each other and do not cut.
AP-scanning every 5 seconds. From the scanning result, the Then we connect the centers of these two circles with a
WiFi-Tag picks up to three APs which have strongest signal straight line, which will cut these two circles respectively
strengths, extracts their signal strength information and and generates two intersection points.
MAC addresses, and packs them into a XML packet along Perform the same process on every two of these three
with the tag’s own MAC address. XML (Extensible Markup circles, and we will get six intersection points (names P1-P6
Language) [5] is a simple, very flexible text format designed respectively). Then, we estimate the WiFi-Tag’s position by
for data description and exchange on the network, especially calculating the mean value of these six points:
6 6
in web applications and IM (Instant Messenger) software. It
X = ∑ X Pi , Y = ∑ YPi (3)
is constructed with XML label pairs and corresponding i =1 i =1
values, as shown in Fig. 5.
With the network access provided by the nearest AP, the ( X , Y ) stands for the estimated coordinate of the
WiFi-Tag connects to the Data Server and submits the XML WiFi-Tag.
packet periodically.
3
20 m
AP1
AP2
70 m
Fig. 6 An Illustration of Triangular Positioning
E r = ( X − X ) 2 + (Y − Y ) 2 (4)
4
office buildings, and is able to track multiple objects
Triangular Positioning Strongest Selection Random Selection
simultaneously.
25
For future work, if the WiFi-Tags have the capability of
calculation, storage and display (such as PDAs), they can
20
perform the positioning processes themselves. Therefore,
this system can be adapted for outdoor locating and
Estimation Error (m)