Comparison and implementation of IPS Dan Helgesson Emelie Nilsson

Comparison and implementation of IPS Dan Helgesson Emelie Nilsson
LiU-ITN-TEK-A-14/034--SE
Comparison and implementation
of IPS
Dan Helgesson
Emelie Nilsson
2014-08-26
Department of Science and Technology
Linköping University
SE- 6 0 1 7 4 No r r köping , Sw ed en
Institutionen för teknik och naturvetenskap
Linköpings universitet
6 0 1 7 4 No r r köping
LiU-ITN-TEK-A-14/034--SE
Comparison and implementation
of IPS
Examensarbete utfört i Elektroteknik
vid Tekniska högskolan vid
Linköpings universitet
Dan Helgesson
Emelie Nilsson
Handledare Jingcheng Zhang
Examinator Qin-Zhong Ye
Norrköping 2014-08-26
Upphovsrätt
Detta dokument hålls tillgängligt på Internet – eller dess framtida ersättare –
under en längre tid från publiceringsdatum under förutsättning att inga extraordinära omständigheter uppstår.
Tillgång till dokumentet innebär tillstånd för var och en att läsa, ladda ner,
skriva ut enstaka kopior för enskilt bruk och att använda det oförändrat för
ickekommersiell forskning och för undervisning. Överföring av upphovsrätten
vid en senare tidpunkt kan inte upphäva detta tillstånd. All annan användning av
dokumentet kräver upphovsmannens medgivande. För att garantera äktheten,
säkerheten och tillgängligheten finns det lösningar av teknisk och administrativ
art.
Upphovsmannens ideella rätt innefattar rätt att bli nämnd som upphovsman i
den omfattning som god sed kräver vid användning av dokumentet på ovan
beskrivna sätt samt skydd mot att dokumentet ändras eller presenteras i sådan
form eller i sådant sammanhang som är kränkande för upphovsmannens litterära
eller konstnärliga anseende eller egenart.
För ytterligare information om Linköping University Electronic Press se
förlagets hemsida http://www.ep.liu.se/
Copyright
The publishers will keep this document online on the Internet - or its possible
replacement - for a considerable time from the date of publication barring
exceptional circumstances.
The online availability of the document implies a permanent permission for
anyone to read, to download, to print out single copies for your own use and to
use it unchanged for any non-commercial research and educational purpose.
Subsequent transfers of copyright cannot revoke this permission. All other uses
of the document are conditional on the consent of the copyright owner. The
publisher has taken technical and administrative measures to assure authenticity,
security and accessibility.
According to intellectual property law the author has the right to be
mentioned when his/her work is accessed as described above and to be protected
against infringement.
For additional information about the Linköping University Electronic Press
and its procedures for publication and for assurance of document integrity,
please refer to its WWW home page: http://www.ep.liu.se/
© Dan Helgesson, Emelie Nilsson
Abstract
Indoor positioning systems can advantageously be used in many applications, from hospitals to airports
and supermalls. This thesis cover many components necessary to construct an Indoor Positioning System
(IPS), and even a solution of how it can be done.
The thesis includes different techniques used for measurements, based at for example Received Signal
Strength Indication (RSSI) or dead reckoning. It also includes different positioning techniques used when
measurements are taken. Fingerprinting and triangulation are, among others, techniques that are to be
described. The most common technology to design an IPS upon is WiFi or Bluetooth Low Energy (BLE),
but in this thesis the ZigBee technology is used to construct an IPS solution.
The designed system, ZBeacon, is described and evaluated in the second part of this thesis. The system
is composed of two integrated systems: a Radio Frequency (RF) solution based on devices from the company
Wiotech and accelerometer data from a mobile phone. An estimated position is calculated with trilateration
based on RSSI measurements together with data from the accelerometer, and an accuracy of 3.33 m is
achieved.
Contents
I
Background study
4
1 Introduction
4
2 Measurement techniques
2.1 Received Signal Strength Indication
2.2 Angle of Arrival . . . . . . . . . . . .
2.3 Dead Reckoning . . . . . . . . . . . .
2.4 Time . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
4
4
4
5
5
3 Positioning Techniques
3.1 Topologies . . . . . . . . . . . .
3.2 Location estimation algorithms
3.3 Fingerprinting . . . . . . . . . .
3.4 Trilateration . . . . . . . . . .
3.5 Multilateration . . . . . . . . .
3.6 Triangulation . . . . . . . . . .
3.7 Cell of Origin . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
7
7
8
11
12
13
13
14
4 Technologies
4.1 Bluetooth . . . . .
4.2 WLAN . . . . . . .
4.3 Radar . . . . . . .
4.4 ZigBee . . . . . . .
4.5 GNSS . . . . . . .
4.6 RFID . . . . . . .
4.7 Camera . . . . . .
4.8 Ultrasound . . . .
4.9 GSM/UMTS/LTE
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
16
16
17
17
18
18
19
19
20
20
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
5 Summarization of already existing systems
21
II
22
ZBeacon
6 Indoor Position System
6.1 Background . . . . . .
6.2 Solution . . . . . . . .
6.3 System Verification . .
6.3.1 Device tests . .
6.3.2 System tests .
6.4 Results . . . . . . . . .
6.4.1 Device tests . .
6.4.2 System tests .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
22
22
22
25
25
26
28
28
31
7 Discussion
37
8 Conclusion
38
9 Future work
39
1
List of abbreviations
AoA
Angle of Arrival.
AP
Access Point.
BLE
Bluetooth Low Energy.
CoO
Cell of Origin.
CSMA/CA
Carrier Sense Multiple Access/Collision Avoidance.
CW
Continuous-Wave.
FMCW
Frequency-Modulated Continuous-Wave.
GPS
Global Positioning System.
GSM
Global System for Mobile Communications.
IPS
Indoor Positioning System.
LAN
Local Area Network.
LED
Light-emitting diode.
LOS
Line of Sight.
LTE
Long-Term Evolution.
M2M
Machine to Machine.
NFC
Near Field Communication.
OAoA
Optical Angle of Arrival.
PAN
Personal Area Network.
RF
Radio Frequency.
RFID
Radio-frequency Identification.
RSSI
Received Signal Strength Indication.
RTLS
Real Time Locating System.
SSR
Secondary Surveillance Radar.
TDOA
Time Difference of Arrival.
TOA
Time of Arrival.
UMTS
Universal Mobile Telecommunications System.
2
VLC
Visible Light Communication.
WLAN
Wireless Local Area Network.
3
Part I
Background study
1
Introduction
The ability to navigate has been of great importance in the cultivation of the modern world. The most
widespread positioning system is the Global Positioning System (GPS). Unfortunately GPS has poor coverage indoors, and that is why the research about similar systems to be used indoors is a hot topic in recent
times.
There are several different techniques used for the construction of an Indoor positioning system (IPS),
and the applications are even more. In time of writing, there is no universal positioning system for indoor
usage, that performs good accuracy independent of environment and application.
This thesis is subdivided into two parts: Part I present different useful techniques and technologies
used for construction of an IPS. It treats pros and cons of the most common techniques and includes a
summarization of existing IPSs. Out from what is presented and learned in the first section, an IPS is
designed, implemented and evaluated. This is what the second part describes.
2
Measurement techniques
There are different types of measurements that can be used in an IPS. The four most relevant measurement
techniques for RF devices are presented in this chapter. Combining those techniques can advantageously
enhance the accuracy of the measurements.
2.1
Received Signal Strength Indication
In most RF-transceivers the signal power can be measured. A measurement of the power presented in a
received signal is often called RSSI. The original purpose was to measure if the signal strength between
devices was sufficient, but that does not prevent engineers from using it to estimate distances. The RSSI
measurements are implemented in different ways for every device which the authors of [1] indicate as a
problem, especially when using Wi-Fi chipset for distance measurements. The authors also state that the
spectrum around 5 GHz is more stable than 2.4 GHz for RSSI measurements, which is logical since the 5
GHz-band is less used. As is well known, interference is an actual problem in wireless communications. RSSI
can be inaccurate since the device sees no difference between signals arriving directly from the source, and
noise. Therefore interference affects the RSSI value in an additive way, which means that large interference
will decrease the accuracy of an IPS based on RSSI. The author of [2] has demonstrated that performance
of measurements can be enhanced, even in somewhat noisy environments. When RF signals travels through
walls and obstacles the signal attenuation becomes dependent on more than distance, which is a problem
when estimating distances.
2.2
Angle of Arrival
Angle of Arrival (AoA) measurement is a technique where the direction of propagation of a RF wave is
determined. To measure the AoA usually two or more antennas are used. The most logical way to measure
AoA is to use a receiver with an array of antennas. More antennas will result in higher accuracy. The Time
Difference of Arrival (TDOA) between the antennas will entail a phase difference, which can be converted
to an angle measurement. An alternative solution is to take advantage of one or several rotating antennas
measuring RSSI, which the authors of [3] demonstrates.
4
Table 2: Expected position error depending on angle inaccuracy
Angle error
(degree)
0.1
0.5
1
2
2.3
Acceleration
(m/s/s)
0.017
0.086
0.172
0.344
Position at
10s (m)
1.718
8.592
17.184
34.363
Position at
1 min (m)
61.866
309.326
618.628
1237.1
Dead Reckoning
Dead reckoning is based on calculations with three parameters: distance, direction and time. The position
can only be calculated if the previous position or the primary position is known. Dead reckoning is not often
used as a standalone measurement technique when constructing an IPS, usually it is used as a complement
to other techniques. Accelerometers, gyroscopes and magnetometers are typical sensors that are frequently
used for positioning determination based on dead reckoning in robotics.
In theory the distance can be obtained if the linear acceleration, that is measured from an accelerometer,
is integrated with time. It seems simple, but it can be difficult to realize. An accelerometer is not able to
distinguish between actual acceleration of the sensor and the earths gravity, and with 3 axis the gravity g
will be distributed over those axes depending of the orientation of the sensor. Therefor to get rid of the g
component the orientation has to be known with accurate precision. This can be done with the aid of a three
axis gyro. With the orientation acquired from the gyro it is possible to calculate the gravity contribution
to each axis of the accelerometer, and with simple subtraction of that contribution the accelerometer becomes independent of g. It is a simple way of thinking, but there is quite heavy math behind those equations.
The angular velocity data from the gyro can be used to calculate the quaternion q, which then is used to
calculate the g’s contribution to the acceleration of each axis. Quaternions are well known in mathematics
since the 19th century. How it can be used to compute direction is shown in equation 1,

2 ∗ (q(2) ∗ q(4) − q(1) ∗ q(3))






2
∗
(q(1)
∗
q(2)
+
q(3)
∗
q(4))
g=




q(1)2 − q(2)2 − q(3)2 + q(4)2
(1)
where the vector g is gravity at each axis. Equation 2 shows a simple subtraction of the g to the raw
acceleration data in vector a. The A is the resulting acceleration without the contribution of the gravity.
A=a−g
(2)
A potential problem is the measurement inaccuracy which is a reality. A small error in the gyro would
give an even bigger error in the accelerometer data. This statement is strengthen by Table 2 where equation
1 and 2 is used to calculate what an error in angle affects the position.
2.4
Time
Even though time is relative, it is reliable in normal circumstances and can be used to determine the distance
between two units. The units can be communicating with e.g. RF or ultra sound. Measurements based on
time is practically AoA but can be performed in different ways. Time of Arrival (TOA) is one such way
and synced clocks is another. Devices based on ultra sound usually measure the time for a sent signal to be
reflected and return from target, then simply convert that measurement to a distance, which is easy since
5
those two parameters are linear. Radar works in a similar way, but with the difference that more signal
processing can be done to increase the accuracy of the measurements.
6
3
Positioning Techniques
When measurements are acquired the positioning is required. The positioning techniques are based on and
limited by the measurements in many ways. Some common positioning techniques for wireless RF-based IPSs
are covered and discussed in this section. To improve the position, algorithms can be used to handle small
errors in measurements, or involve history for a more probabilistic position. Also some different network
topologies for wireless systems will be discussed.
3.1
Topologies
A wireless network can be structured in different topologies, and the different nodes can have different
properties, which allows the designer to create a customized system. There are basically two categories of
network topologies: physical topologies and logical topologies. The physical refers to the cabling layout,
the location of the nodes, and the interconnections between the nodes and the cabling. The logical refers
to the structure of the signals interaction in the network, and describes the way that the data travels between nodes. The logical topology generally follow the same topology as the physical topology of the network.
A topology can be created with three different nodes: end devices, routers and coordinators. A coordinator is a device that relay messages in the network. It is the principal controller of a Personal Area Network
(PAN), and therefor there can only exist one coordinator in a network. The router acts as a coordinator, it
forward messages from one node to another, but is not the primary controller in the network. A router can
also take the role of an end device. An end device has fewest processing capabilities and features. It can
only communicate with its parent, which can be either a coordinator or a router.
There are eight basic topologies [30]: star, mesh, tree, point-to-point, bus, ring or circular, hybrid, and
daisy chain. Only the three first will be covered, for those are the most common when creating an IPS.
• In a star network, illustrated in Figure 1a, each node is connected to a central node with point-to-point
connections. Communication is allowed only between the central node and the peripherals.
• In a tree network, illustrated in Figure 1b, the devices have a parent-child relationship. The structure
is composed of a root node, intermediate nodes, and leaves. The root node is the main node, the leaves
are the last nodes, and the intermediate nodes are the nodes in between the root node and the leaves.
The leaves acts as child nodes to the intermediate node, just as the intermediate nodes are child nodes
to the root node. Each node in the network can only communicate with its mother node or child node.
• In a mesh topology (Figure 1c), each device can communicate directly with any other device, if the
devices are close enough to establish a successfull connection. All nodes can participate in relaying
messages resulting in all messages reaches the final destination in the network in fastest possible way.
The advantages and disadvantages of mesh can be sumarized as follows:
Advantages
– Every node can forward the information, and therefore the range of the whole network increases.
– Because every node forward the information, the range of a single end device does not have to be
large, which is energy-saving.
– Because of the topology, there are many different ways for the signal to take. This means that if
one node breaks, there is almost always another way for the packages to take.
– The package always reaches its destination in the shortest way.
Disadvantages
– The layout of a mesh topology is expensive to implement. But once implemented, the mesh
topology can pay off with time.
7
– The response time increases, because the packages often has to travel by several nodes instead of
direct to the correct device.
(a) A star network
(b) A tree network
(c) A mesh network
Figure 1: Typical network topologies for ZigBee
A wireless network can be structured in three different topologies used for positioning: network-based,
terminal-based and terminal-assisted [7]. The different positioning topologies are graphically shown in Figure
2a, 2b and 2c.
• Network-based topology consists of several Access Point (AP)s that receive broadcasts from a mobile
device. The information is then redirected to a central server, where the calculations are performed.
This topology requires that the positions of all stations are known, unless fingerprinting (covered in
Section 3.3) is used. A valuable advantage is that the mobile device e.g. smart phones, does not need
any additional hardware.
• Terminal-based topology has the exact opposite function than the network-based approach. The mobile device receives information from several APs and performs the calculations. The mobile device can
actively send out requests and wait for the APs to reply with information, or it can wait for broadcasts
from the APs without asking for it. Those modes are called active respectively passive terminal-based
topology.
• The Terminal-assisted approach is a mix of network-based and terminal-based topologies. The mobile
device receives data from APs and redirects the information to a central server, where calculations are
made.
3.2
Location estimation algorithms
This section will cover some useful algorithms which are often used when creating an IPS. Location determination would be an easily solved problem, and would be solved with trigonometry or a relatively simple
algorithm. But because of the inaccuracy in RSSI and because of that the relationship between RSSI and
distance is not straightforward, the location estimation often requires a more complex positioning algorithm.
The algorithm can be relatively simple but yet result in a relatively good estimation of the position.
Min-Max
The Min-Max algorithm is one of the simplest algorithm to implement when create a system for localization.
The algorithm uses incoming RSSI values from several beacons and calculates estimated distances from each
beacon. The algorithm places a squared box around each beacon, see Figure 3. The estimated distances for
8
AP
Mobile device
AP
AP
AP
Mobile device
Mobile device
positioning
AP
AP
AP
Central server
(a) Network-based
topology
AP
AP
(b) Terminal-based
topology
positioning
Central server
(c) Terminal-assisted positioning
topology
Figure 2: Different positioning topologies
the beacons is multiplied with two and set as the length of the box. The intersection of those boxes indicate
the position of the mobile device. The estimated position is assumed to be in the middle of this box of
intersection.
Figure 3: Determining position using Min-Max
Multilateration
Multilateration is an algorithm based on the properties of geometry. The system uses RSSI values for distance
estimation between beacons and the mobile device, and the algorithm creates circles having the euclidean
distance as radius around each beacon. In an ideal case the intersection of the circles identifies the position
of the mobile device, but often there are errors in the distance measurements which does not result in a
single intersection. If the area in where the position of the mobile device are to be determined is subdivided
into small cells of finite size, the algorithm can calculate the sum of the squared distance between the cell
and each circle. The position of the mobile device are then assumed to be in the center of the cell in where
the sum is lowest.
9
Least Squares
Least Squares (LS) method focuses on minimizing the value of the least square objective function, equation
3. (x, y) is the position of the mobile device that is to be determined, (xi , yi ) is the coordinate of the i-th
beacon and ri is the range measurement to respectively beacon. N is the total number of beacons.
[x̂LS , ŷLS ] = arg min
x,y
N p
X
( (x − xi )2 + (y − yi )2 − ri )2
(3)
i=1
ROCRSSI
The general idea of the ROCRSSI (Ring Overlapping based on Comparison of Received Signal Strength
Indicator) algorithm is to create a series of circles around each beacon, see Figure 4a, from which the mobile
device takes advantage of when estimate its position. The circles can be generated before or during the
positioning phase. If generated before, measurements of RSSI on different distances from each beacons has
to be done. The circles can also be generated at the same time as the positioning is to be determined, if
each beacon receives RSSI from another beacon.
The algorithm uses the circles to narrow down the possible area in which the estimated position is to be
determined. If the distance between A and the mobile device M is larger than the distance between the A
and B, but smaller than the distance between A and C, it can be assumed that the mobile device is within
those two circles that the distances B and C creates around the beacon. This is illustrated in figure 4a. If
one or more beacons are registered to be in range of the mobile device, the position of the mobile device is
estimated to be in the intersection of the areas created from the circles.
Circles can be created if the beacons receive RSSI from other beacons. In Figure 4b, A, B and C are
beacons and M is a mobile device. Let us call RSSIAM as the RSSI from a message that is transmitted from
A to M, and so on. If RSSIAB < RSSIAM < RSSIAC and RSSIBA < RSSIBM < RSSIBC , then M can
be assumed to be in the shadowed area. ROCRSSI assumes that the system uses omni-directional antennas.
(a) ROCRSSI with known distances B and C from beacon
A
(b) Example of ROCRSSI
Figure 4: Function of ROCRSSI algorithm
Maximum Likelihood
The Maximum Likelihood (ML) algorithm is a method of estimating parameters of a statistical model,
and is in positioning based on interference. Collected RSSI values from n beacons are stored in a vector, ρ = {ρ1 , ρ2 , ..., ρn } along with coordinates of respectively beacon, xb = {xB,1 , xB,2 , ..., xB,n } and
yb = {yB,1 , yB,2 , ..., yB,n }. For each possible position of the mobile device, the algorithm computes a prior
10
probability of receiving ρ. The position with the highest probability is assumed to be the estimated position.
3.3
Fingerprinting
Fingerprinting is as a method where the signal strength for different positions in a room are measured and
stored. Data for a specific point is called a fingerprint. The technique can in most cases be implemented
by software, without any additional hardware. This makes fingerprinting a cost effective and less complex
method compared to other techniques for IPSs. Another advantage with the fingerprinting method is that
no time synchronization between the stations is needed.
Fingerprinting typically consists of two phases: offline training, also called calibration-phase, and online
positioning determination.
In the first phase, data is gathered. Fingerprints, containing information about all fixed stations and their
RSSI is taken at a number of points in the area in where the positioning should later run. The fingerprint
often comprises numerous measurements taken over a certain time, often several minutes, to get the average
RSSI in that point. The fingerprint is often represented in form of a vector, containing the average signal
strength and the position. The size of the vector depends on the number of APs that are available at that
specific position. All the gathered fingerprints are stored in a database, called a radio map. An example of
how the signal strength spreads from APs are shown in Figure 5.
Figure 5: Example of signal strength from APs
Phase two is the actual position determination phase. The mobile device that should be located in the
11
recorded area measure the RSSI of all the current stations in range, and stores the data in a vector. This
vector is then compared to the vectors in the radio map, and the closest match represents the position of
the mobile device.
Because the quality of the RSSI is dependent on Line of Sight (LOS), changing the environment can
completely destroy the radio map. Introducing small ordinary objects in a room such as an extra chair will
not affect the radio map considerably. However, placing an object of metal close to an AP can be devastating
for the radio map. To improve this, information about the direction can be added to every fingerprint. The
calibration-phase takes longer time, but the result in the second phase improves. Using fingerprinting as a
method when constructing an IPS can generate meter-accuracy, but this depends on the density of the APs
and the fingerprints.
3.4
Trilateration
Trilateration is a method to determine the relative position of points by using measured distances and
geometry of circles or triangles. In a three dimensional case spheres will be used instead of circles. Since it
is a simple and very straight forward method to locate a point relative other points, trilateration is widely
used in Real Time Locating System (RTLS). Global Positioning System (GPS) are one of the most known
systems using 3D trilateration to determine the position of devices [4]. A simple two dimensional illustration
is shown in Figure 6 where there are three stationary points P1-P3, and three mobile devices m1-m3 whose
position needs to be determined.
Figure 6: Trilateration
Each of the stationary point has a maximum range of where mobile devices can detect the signal, represented as a circle with the stationary point in origin. If a mobile device m3, discover only one stationary
point as illustrated in the figure, the position cannot be determined more accurately than somewhere on the
radius of the Euclidian distance between P1 and m3 around P1. As seen in the figure, m1 is in the range of
both P1 and P3, which will narrow down the possible locations to two. For the case where a mobile device
m2, is in range of three or more stationary points the possible position can be only one. This is normaly
12
true for both the 3D and the 2D cases. The position is only determined relative the stationary points, but
an absolute position can easily be determined if the positions of the stationary points are known.
For an ideal case, where the distance is measured without error, the position can be determined exactly.
But reality is rarely so, and therefore the position will almost always have an error, even if it is small. The
big problems occur when the error is too large for satisfaction. The solutions are many, but with trilateration
there is one simple way; introduce additional stationary points. The standard deviation can be reduced by
adding more stationary points to the system, which will result in a more accurate location estimation.
3.5
Multilateration
Multilateration is a technique similar to trilateration in the way that both use distance for estimating the
position. It is the measurements that makes the techniques different from each other. Trilateration uses the
Euclidean distance between a stationary point and a mobile device while multilateration uses the difference
in distance from a mobile device to two different stationary points. When using RF communication, TDOA
is commonly used as measurement technique instead of distance difference. Since only the difference in
distance is measured and not the actual distance, the two stationary points will not give a finite number of
possible locations. The pattern of possible solutions can be realized as a hyperbolic curve. Because of this,
multilateration is also called hyperbolic navigation. Three hyperboloids intersecting are needed to determine
the location in 3D, i.e. at least four points are needed to get the 3D location. More than four will decrease
the error which occurs in a realistic environment.
Figure 7: Multilateration
Multilateration is mostly used to locate nearby airplanes by Secondary Surveillance Radar (SSR). A
simple illustration in 2D is shown in Figure 7 with three stationary points and one aircraft representing the
location to be determined. The hyperbolas represent the possible locations of the aircraft for each pair of
points, and together the intersection is the resulting estimation of the position.
3.6
Triangulation
Triangulation estimates the location with the use of geometrical properties of triangles. The exact position
of a mobile device, m1, can be calculated if the positions of two base stations and respectively angle (A1 and
A2) between the base stations and the mobile device are known, see Figure 8. The incident angle can be
obtained by AoA measurements. Assuming the coordinates of the two base stations are known, meaning that
also the length between them is known. When one length and two angles of a triangle are known parameters,
the lengths of the other two sides in the triangle can be calculated. This means that the position of the
mobile device can be obtained.
13
Figure 8: Triangulation
Triangulation can be deceptive in no LoS conditions, therefor at least two independent triangulation
determinations should be made to confirm the position of the mobile device.
3.7
Cell of Origin
Cell of Origin (CoO) is an inaccurate but simple method for positioning. The access point generating the
strongest RSSI value is identified and the position of the mobile device is assumed to be close to that access
point. The shapes of the cells that the net is constructed by can be approximated to for example squares,
triangles or circles, and an usual apporximation is hexagons, see Figure 9.
The accuracy of CoO is related to the density of access points. Because of the sometimes relatively
low accuracy, CoO is often used in conjunction with some other technology, such as TOA, when precision
is important. Although CoO is not as precise as other methods, it has unique advantages. It can quickly
identify the location, and it does not involve any complex location-tracking algorithm.
14
Figure 9: Structure of Cell of Origin
15
4
Technologies
A RTLS require some hardware/technology to perform the measurements. The choice of technology/technologies
is one of the most important choice, together with measurement technology which are in a way interdependent. Note that all measurement techniques are not applicable with all technologies.
Most of the technologies are based on wireless signals, but the increasing popularity of RTLS has resulted
in alternative technologies to be examined. The most frequently used are investigated in this section.
4.1
Bluetooth
Bluetooth is a standard that was developed by Ericsson as a wireless replacement to RS-232 cable. It operates in the unlicensed ISM band between 2.4-2.485 GHz. Today it is used to connect headsets, keyboards,
laptops, cell phones and other electronical devices. The maximum range is 1-100 meter depending on how
the transceiver is designed.
Bluetooth can be subdivided into three different classes, see Table 3. Typical implementations for class 1
is industrial use and devices without power limit. Class 2 and 3 are often used in battery charged implementations. The maximum ranges in the table depends on the conditions, such as LOS, antenna configuration
and material coverage.
Table 3: Maximum ranges and output power of different classes
Class
Class 1
Class 2
Class 3
Maximum range
100m
10m
1m
Maximum output power
100mW
2.5mW
1mW
Bluetooth uses a radio technology called frequency-hopping spread spectrum, which means that the frequency is switched in a random but predictable sequence during the transmission. The frequency switches
1600 times per second, and this technique reduces interference and shortening the transmission delay. Bluetooth use the same frequency band as WiFi, but because the use of frequency-hopping the two technologies
can operates simultaneously.
Bluetooth is subdivided into different profiles. Each profile defines possible applications, specifies general
behaviors and includes settings to parametrize and control the communication between Bluetooth devices.
Some of the advantages of Bluetooth technique is that it is cheap, has low power consumption and up to
255 devices can be connected together in the same Local Area Network (LAN).
BLE was introduced in 2011, and was specified as Bluetooth v4.0. BLE works like classic Bluetooth,
but have different characteristics and new features; among others, and maybe the most important, it has
extremely low power consumption. It consumes between 1/2 and 1/100 the power of classic Bluetooth technology. BLE transmit short bursts of data instead of a continuous stream which classic Bluetooth do, and
this is why BLE is so low-power consuming.
There are two types of BLE devices: single and dual mode. The single mode only supports BLE protocol,
while the dual mode supports both BLE and classic bluetooth. The dual mode stack has two independent
protocol, which share common RF blocks.
Positioning with Bluetooth is one of the more proven technology. It can be subdivided into two parts:
positioning using already existing devices and protocols, and positioning with the use of modified devices.
The positioning methods are limited with the use of existing devices, only proximity and RSSI-based methods
can be used, and the accuracy is not that high as with the use of modified devices. It is relatively simple to
construct an IPS with the use of a proximity method. The only needs are Bluetooth devices, an application
16
and a database containing the positions of the fixed Bluetooth devices. To increase the accuracy of an IPS
based on proximity methods, there can be more devices added to the system.
The authors in [5] have designed and implemented an IPS that is based on RSSI measurements. The
system achieves an accuracy of 3.76 meter. Because the system also is based on measurements of the received
power level, the accuracy of the system would increase if the Bluetooth devices are able to measure RSSI
more precisely.
The company SenionLab [25] has developed an IPS based on fusion of data from motion sensors, WiFi
and BLE. The system uses fingerprinting as positioning technique, and reaches an accuracy of 1-5 meter.
4.2
WLAN
The modern Wireless Local Area Network (WLAN) is called Wi-Fi, which is a network infrastructure based
on IEEE 802.11 standards and operates in the 2.4, 3.6, 5 and 60 GHz frequency bands. IEEE 802.11 is
subdivided into a couple of sub-standards with different properties.
A WLAN often consist of one or several APs and one or several clients that are connected to the APs.
The clients can for example be PCs, mobile phones or other things that supports WLAN. The connections
are based on Carrier Sense Multiple Access/Collision Avoidance (CSMA/CA) for path sharing, which is a
protocol for carrier transmission in 802.11 networks. In CSMA/CA the node which is about to send data
checks if the common channel is clear before the package is sent. If the channel currently is occupied by
another node transmitting data, the node that is about to send will wait a randomly chosen period, and
then check again if the channel is free.
Because of the popularity to use WLAN to offload the mobile networks, it can be found in almost
every building nowadays. An IPS built on WLAN is easy to create when no extra specialized equipment
is required. Another advantage is that it executes signal scanning quickly, and LOS is not necessary. The
range is also good compared to other technical solutions, 50-100 meters and sometimes up to 150 meters.
Although the range is good, using WLAN to create an IPS result in low positioning accuracy. The accuracy
is approximately 3 to 30 meter according to [9]. To compensate and improve, in addition to increase the
number of APs, complex positioning estimation is needed. The high energy consumption which follows
with WLAN will lower the lifetime of any battery based device. An IPS based on WLAN is also highly
infrastructure dependent [8]. The most common measurement method in WLAN based IPS is RSSI since
any other requires hardware modifications.
4.3
Radar
Radar is an acronym for Radio Detection and Ranging, and was developed to detect objects with RF signals.
Radar can not only detect objects but also determine the position and velocity of the object. When the radio
waves from the transmitting radar encounter a moving object the reflecting waves will have a slight change
of frequency which can be explained by the Doppler Effect. The returning power of the wave are affected by
parameters mentioned in the list of symbols below. Equation 4 shows the relationship to received power.
Pr =
Pt Gt Ar σF 4
(4π)2 R4
(4)
Range detection by radar gives high accuracy for the possible ranges, but heavy signal processing is
required which makes radar a complicated option for an IPS. A radar system can use pulses to determine the
range to an object. another alternative is to use a Continuous-Wave (CW) which consist of a single stable
frequency and is effective when determining speed. A Frequency-Modulated Continuous-Wave (FMCW) on
the other hand can provide both range and speed accurately. Both those two types of radar can be used to
17
List of symbols
Pr
Pt
Gt
Ar
σ
F
R
Received power
Transmitted power
Gain of transmitting antenna
Effective aperture (area) of the receiver antenna
radar cross section (measurement of how detectable the object are)
Pattern propagation factor
Distance from transmitter to targeted object
design a RTLS. This is done by the authors in [11].
An idea to use cognitive radar is formed by [12] which essentially means that the radar is learning by its
environment, and has the possibility to act based on those experiences. The advantages of using radar for
the construction of an IPS are probably too few to compensate for the drawbacks, but that depends on the
application.
4.4
ZigBee
ZigBee is a wireless technology developed to connect and control several different devices. It can be used
for everything from home appliance to applications in industries. The IEEE 802.15.4 standard protocol
was created and ratified by the ZigBee Alliance [13] and IEEE [14]. It has low data transmission, and is a
cost-effective and energy-efficient technique.
ZigBee is developed and adapted for Machine to Machine (M2M) communication, which means that the
devices can communicate without a device that coordinates the communication between them. A device
that can coordinate communication is only needed if the network is supposed be connected to internet or to
a network that operates in another technology. A huge advantage that overcomes most other technologies is
that ZigBee in theory supports more than 65 000 devices in the same network [15].
According to the protocol there are two different hardware nodes that can be used to create a network:
Full Function Devices (FFDs) and Reduced Function Devices (RFDs). A FFD is capable of performing all
the tasks in the IEEE 802.15.4 protocol, and can therefore accept any role in the network and can communicate with any other device in the network. A RFD has limited capabilities, and can only communicate with
a FFD device. Because of the limitations of a RFD, the processing power and memory size are normally less
than of a FFD.
ZigBee uses three different type of software defined nodes: coordinator, router and end device. Those are
earlier discussed in section 3.1. The protocol allows the devices to communicate in three different network
topologies: star, tree and mesh (discussed in section 3.1). The mesh topology is the most common topology
for ZigBee networks.
4.5
GNSS
GNSS, Global Navigation Satellite System, is a worldwide navigation system. The most known is GPS,
but the Russian GLONASS and the future European Galileo are two other GNSS systems. The systems
use satellites and pseudo-satellites (local ground based transceivers that operates commonly to satellites) to
navigate via trilateration.
Originally the system was used in the military, but these days it is used by civilians to navigate outdoors.
Almost every new cellphone is equipped with GPS. Because the system need line-of-sight, it does not work
inside buildings. The receiver requires a minimum number of four satellites to calculate the position, but
often there are more satellites available which increases the accuracy. The accuracy can then become around
18
a few meters.
An IPS can be build based on pseudo-satellites, also called pseudolites. One advantage is that the system
can be based on similar hardware to GPS. The system is therefore compatible with GPS, which means that
only one receiver is necessary when switching between outdoor and indoor environment. This also implies
that the size of the receiver decreases. Another advantage is that GPS receivers are relatively inexpensive
since a huge number are produced. There are of course some disadvantages with the use of pseudolites when
constructing an IPS: the near-far problem, which means that when a receiver is close to a pseudolite the
power of the signal from that pseudolite is so strong that the receiver has trouble detecting signals from
other pseudolites. Also interference and the dependence of LOS is a problem, and the integer ambiguity
resolution has to be resolved [16]. Integer ambiguity is a value of the length between the satellite and the
receiver expressed in number of wavelength. Carrier-phase measurement is a measure of the integer ambiguity, and can be done in two solutions: either the pseudolite or the receiver has to keep moving, or dual
frequency has to be used. Because of those problems, pseudolites are not so common when constructing IPSs.
Locata Corporation has developed the GPS-based IPS named Locata [21]. The system uses pseudolites
and reaches an accuracy at cm-level.
4.6
RFID
Radio-frequency Identification (RFID) is not a new technology, even though it has become well known in
recent years. The RFID standard have spawned a similar standard named Near Field Communication (NFC)
which has expanded so much that newer smart phones are equipped with a chip or a so called ”tag”. NFC is
well suited for access cards and small amount payments because of the very short range of less than 2 dm, and
therefore it is hard to pick up the signal. A passive RFID tag is powered by the electromagnetic field from
the transceiver that it is communicating with, which makes the tag literally powerless when taking away the
reader which it is communicating with. An active tag is on the other hand powered by a battery or another
external power source, which has its own advantages and disadvantages depending on implementation.
RFID is used in many cases to create RTLSs because of the inexpensive deployment of such systems and
because of that such a system can handle large quantities of tags. An active RFID tag can be read on distances of 100m with accuracy under one meter, which makes RFID RTLS quite usefull in some applications.
SpotON [22] is a three dimentional location system based on RFID and received signal strength analysis.
The system reaches an accuracy of 1 m.
4.7
Camera
An ordinary camera all by itself is quite useless as an IPS, but the remarkable progress in computer vision
can change such statements. A 3D camera combined with computer vision can be used to create a 3D map
of the surroundings, which is used to calculate its position. When Microsoft in 2011 released a software
development kit (SDK) for their Kinect, computer vision began to advance rapidly and still is.
There are more ways than using camera mapping to set up an IPS based on cameras. A 2D camera can
with the use of Visible Light Communication (VLC) act as an receiver for a Light-emitting diode (LED)
that transmitt signals with such a frequency human eyes are undisturbed. Then by mounting lots of LEDs
in the roof, each with an uniqe frequency, and use a camera as receiver, an IPS can be constructed. The
camera could advantageously be a smart phone which has the possibility to make it easy and cheap for a
user. Such systems are not cheap but has the possibility to be very accurate.
The author of [17] uses a device to measure Optical Angle of Arrival (OAoA) which results in an mean
error of 1.69 cm.
19
4.8
Ultrasound
Ultrasound can be used for many purposes such as in medical and science, but only ranging and detection
will be explained in this section. The frequencies used for ranging and detection usually span between 20
kHz to 40 kHz, which the human ear can not detect. An IPS based on ultrasound beacons needs a parallel
system, since ultrasound lack the ability of communication. A system based on sound waves could be preferable in some cases where electromagnetic fields should be avoided such as airplane cabins or close to sensitive
medical equipment. Because of slow propagation in air TDOA is a preferred choice of measurement technique.
The authors of [10] have constructed a system of ultrasound receivers for measurements and connected
nodes to a ZigBee network for communication. The sensor data is sent back to the ultrasound transmitter
where a computer perform the position calculations. With such simple system a root mean square error of
2 mm is achieved.
It is preferable in most cases to have a system that is compatible with modern smartphones. The
microphone in a smartphone have the capability to record not only acoustics, but also ultrasound. This
means that a smartphone in theory are able to act as receiver in an ultrasound RTLS.
4.9
GSM/UMTS/LTE
Global System for Mobile Communications (GSM) is a standard describing the protocols for the second generation (2G) digital cellular networks used by mobile phones. It is developed by ETSI, European Telecommunications Standards Institute. It is a global standard and is used in over 219 countries and territories,
and by more than 6 billion people [18]. GSM is as mentioned a cellular network, which means that the area
in which it operates are subdivided into cells, in which each cell is served by at least one fixed-location base
station. Each cell uses different frequencies than its neighboring cells. This avoids interference and provides
guaranteed bandwidth within each cell. The shapes of the cells are often hexagonal, but can be squares,
circulars or some other regular shape. Each cell in a GSM network has a size up to 35 km.
GSM-based IPSs have several advantages. It has good coverage, it is accepted by every cell phone which
means that no extra hardware is needed, it operates in a licensed frequency band which decreases the interference, and the channel to cell allocation is a complex and costly process. Its complex process might
be seen as a weakness for the system, but in fact it results in a stable network that can operate for a long
period before having to be recalibrated.
According to the authors in [19], their GSM based IPS reaches an accuracy of five meters indoor in a
large multi-floor building. The system is based on fingerprinting.
Universal Mobile Telecommunications System (UMTS) is the third generation (3G) wireless standards
and it is based on GSM. UMTS can not use the same base stations as GSM. However, UTMS operates in
a common core network that supports multiple radio-access networks, including among others GSM. This
network is called the UTMS multi-radio network.
Long-Term Evolution (LTE) is based on GSM and UMTS, and is also called 3.9G. LTE is the generation
after UMTS, and does not fulfill all the standards for LTE-advanced (4G), therefor it is known as 3.9G. The
first publicly available LTE was set up in Stockholm and Oslo in 2009, and it is now widespread globally. In
the same way that UMTS coexists with GSM, LTE coexist with UMTS and also GSM.
A LTE-based IPS was constructed by a team in South Carolina [20], and the system reaches an accuracy
of less than 6 meters. The system is based on TDOA.
20
5
Summarization of already existing systems
From all the techniques and technologies already discussed it is understandable that not all techniques
can be combined with all technologies. Todays situations often require handmade solutions, where different
technologies are suitable for different applications. Often the systems are hybrids of two or more technologies
or composed by two or more technologies working in parallel. Table 4 includes a summary of some existing
systems on todays market.
Table 4: Summary of some specifications for different technologies
System
Technology/Technique
Positioning Algorithm
Accuracy
Bluetooth
Local
Positioning
Application [5]
Bluetooth, RSSI
Propagation
Kalman filter
3.76m
RADAR [11]
WLAN, RSS
kNN, Viterbi-like
2-3m
TELIAMADE [10]
Ultrasound, ZigBee, timeof-flight, multilateration
Least squares method
2mm
GSM-based indoor
localization system
[19]
GSM, Fingerprinting
kNN
5m
SenionLab [25]
Wifi, BLE, Fingerprinting
NA
1-5m
HAIP [24]
WLAN, BLE, Angular estimation
NA
0.3-1m
Particle filter based
[20]
LTE, TDOA
Particle filter
5.35m
LOCATA [21]
GPS/GNSS
EKF (Extended Kalman
Filter)
20 cm
SpotON [22]
RFID, Signal Strength
Aggregation
1m
LANDMARC [23]
RFID
kNN
2m
TeleTracking [26]
IR, Ultrasound, RSSI, triangulation
NA
Several meters
model,
According to those comparisons, it is unusual that an IPS achieves an accuracy of better than 1 meter.
The most frequently used technologies are WiFi and BLE, and the better performing systems are based on
several technologies.
21
Part II
ZBeacon
6
Indoor Position System
This section will contain details about our own implementation of an IPS. The background will describe the
case and conditions for the system while solution will be the actual design and how the problem were solved.
The Results contains measurements and tests showing that the system actually works.
6.1
Background
When people go shopping at the supermarket, they sometimes buy a lot of food. In large supermarkets
people can struggle with finding all items on the shopping list, and it takes time. An IPS can be used to
facilitate and optimize peoples shopping routines, and especially: reduce the time for the customers being
in the store. The system can for example be implemented as an application for smart phones, where the
user add items before entering or when arriving to the supermarket. The application sort the items and
calculate the best way to pick up all products. The users can see on their screens in which direction to
go for finding the next item. As described so far, no supermarket would want such a system. This is
because a lot of spontaneously shopping would be avoided when all user concentrates on the directions on
the screen. Therefore an advertisement system could be implemented for the supermarkets special prices,
and pop up message noticing the user about it when passing by particular products. If the customer want
to add things on the list, the system recalculates the route. The possibilities are endless for both customer
and supermarket.
An IPS implemented in a supermarket only require the accuracy of a few meters, but enough for the user
to know for a certainty between which shelfs the user are positioned.
With regard to all the knowledge gained and presented in Part I we chose to implement and investigate
a RF solution with a fairly simple positioning algorithm to begin with. The most suitable RF equipment for
this were either BLE or ZigBee which both have their pros and cons. The main advantage of BLE is that it
already exist in mobile phones and tablets which makes it easy to utilize a customer’s own hardware which
in turn could reduce the cost of the system. The drawback of BLE is the network structure, which is one of
the strengths of ZigBee. The ability to communicate with all nodes and beacons in a system could be very
useful when nodes have to be reconfigured or monitored. It could also provide information about when it is
time to change battery in certain nodes or if any nodes are broken or malfunctioning. Both ZigBee and BLE
are very energy efficient, even though BLE is slightly more efficient. Since ZigBee were most convenient for
us the decision to use ZigBee were made. We acquired devices from the company Wiotech [27] which focus
on development of ZigBee WSN.
6.2
Solution
The measurement technique that was decided to be used is based on RSSI since it is simple and no hardware
modifications are needed. The RSSI values are processed and used as the input for calculations via trilateration and together with a simple algorithm an estimated position is calculated.
The beacons and mobile devices were designed to fit the terminal-based positioning topology in Figure
2b, with the modifications shown in Figure 10. The reason network-based positioning topology is not used
is because the connectivity from the AP’s to the central server would result in a lot more wireless data, and
therefor more interference. It is also a mater of energy savings, since AP’s would have to be routers, which
in turn require external power source or repeatedly battery replacement. The AP’s in the terminal-based
topology is comprised of end devices, which are beacons for the reason that power consumption of the system should be as low as possible. The beacons will be able to be powered by batteries and therefore make
the deployment and maintenance simpler. The terminal-assisted positioning topology is not suitable either
22
AP
Computer
AP
Accelerometer
AP
SmartRF05
Figure 10: Topology of ZBeacon system
because the information is requested by the mobile device and not by a central server. If the estimation of
the position can be done on board of the mobile device it is preferable, since it avoids the need of an extra
unit. The mobile device comprise of a computer interfaced with a Zigbee router and a mobile phone from
where accelerometer data are given.
The ZigBee chip on the devices are CC2531 created by Texas Instruments [28], TI. The program IAR
Embedded Workbench IDE (integrated development environment) from the company IAR Systems [29] is
used to program and debug the devices. The software is based on TI’s Z-stack which comes with the CC2531
chip. The system comprise of end devices that frequently sends out an ID number specific for that beacon.
The mobile devices in the system is programmed as routers, which receives data from the end devices if
in range. There is also a coordinator in the network, which initiate the network and invite routers. Both
coordinator and routers has the property to receive data from the end devices. A router when initiated has
the permission to initiate other routers and end devices, which means that the network does not need the
coordinator more than to initiate the network.
The end devices are programmed to frequently (every 100ms) send out a for each device individual ID
number. When a router or coordinator is in range of an end device it receives data from that end device,
included among others the ID of the end device. The RSSI is provided by the radio module for each package
received. When a ZigBee device transmits a message, the z-stack automatically add data required by the
protocol before transmitting over the air. The ID and the newly acquired RSSI of the signal is composed
into a new package which is transmitted serial via UART to a computer.
When measurement data are collected by the devices and received to the computer and MATLAB, the
RSSI values in dBm is converted to distances in meter. The conversion is done by firstly determine the path
loss exponent n through equation 5 [6]. The propagation constant is often assumed to be 4 indoors, but that
is very dependent on the environment since indoor is a very general expression. An improving operation to
get a more accurate position is to calibrate each node separately, to get an individual path loss exponent for
each node. If not calibrated for each node the estimated distance will definitely vary depending greatly on
its close environment.
n=−
RSSI − A
10log10 (d)
(5)
In equation 5, A is the RSSI value for 1m distance and RSSI is the measured RSSI at distance d. The
estimated distance can be calculated with equation 6 which is derived from equation 5.
d = 10
−RSSI+A
10n
23
(6)
The mobile device has to be in range of three as a minimum number of end devices to be able to calculate
a position of the device. When in range of three or more end devices, the estimated distances are processed
with different filters to achieve a better accuracy of the position.
The map in which the position is graphically displayed is manually created in MATLAB from a digital
image. The positions of the beacons are manually included and stored in an array in MATLAB.
24
6.3
System Verification
This section will describe how tests were done to verify the function of the system. It is important to execute
tests to detect the performance of the system. The tests are divided into two groups: tests of the devices
performed independently of the system and tests of the performance of the system.
6.3.1
Device tests
The tests described in this subsection are performance tests of the devices. Those tests had to be done partly
to get to know the devices, and partly to achieve different parameters that are to be used in the designing
of the system. But the most important factor of why tests of individual devices had to be done was to prove
and validate the idea that an IPS can be based on RSSI measurements.
Distance tests outdoors at a field
Distance tests on a field far from disturbances and interferences were done to validate that the devices can
be used to create an IPS. Two devices were tested, one with the function of a transmitter and one with the
function of a receiver. Respective device was attached to a stick with the length of 1 meter above ground,
faced vertically towards each other.
The transmitter is able to use 16 different output power between -28 and 4.5 dBm [31]. The transmitter
is programmed to send out 100 packages with each output power, resulting in a total of 1600 packages. A
package is sent every 100 ms. The transmitted message is a six byte long package, including the package
number and the output power. The receiver obtains the RSSI of the message and generates a new message
of nine bytes: package number, RSSI and output power. The package is thereafter sent to the computer
where it is stored for future calculations. The configuration for the distance tests can be seen in Figure 11.
Measurements was taken for every meter between 1 and 10 and at every 10 meters upp to 100m. Results
are shown in Table 5 and Figure 13 for measurements up to 10m, and Figure 14 for measurements up to
100m in section 6.4. Additional measurements were taken at a distance of one meter, when the RSSI of
those measurements was to be used in future calculation.
Figure 11: Configuration for distance testing outdoors
Rotating receiver
This test was done to evaluate how the arrival angle at the receiver device affect the RSSI, i.e. the directivity
of the receiver. Three beacons and one receiver were placed outside on a big field far away from disturbances.
Figure 12 shows the configuration. The beacons sent out a package containing an individual ID number every
100 ms. The receiver receives data from all three beacons, which it transmits to the computer where it is
plotted graphically. Both a device from Wiotech and a evaluation board from TI were used as receivers. The
25
result is presented in Figure 15 and Figure 16 in section 6.4.
Figure 12: Configuration for rotating receiver test
Test for antenna at transmitter
A similar test that the ones just described was done for the transmitter, to detect the directivity of the
beacon. A transmitter was placed in an wide open area far from metallic objects, programmed to send data
every 100 ms. The receiver was rotated around the transmitter, at a constant euclidean distance and with
the same side constantly faced towards the transmitter, in a half circle of 180 degrees. Result is shown in
Figure 17 in section 6.4.
Accelerometer test
The dead reckoning measurements produced by the accelerometer is investigated in accuracy and how
large errors that can be expected. The device was placed on a flat steady surface, for accuracy and standard
deviation measurements. When moving the device along the x-axis the resulting linearly integrated distance
and velocity are shown in Figure 18.
6.3.2
System tests
The tests described underneath are for the system in whole, and will serve as the basis for the description
of the accuracy of the system. It is important to perform thoughtful and proper tests of the system, in
advantage to achieve truthful and reliable results for descriptions of the accuracy.
Move along a predefined route
To evaluate the accuracy of the system we also chose to move with constant velocity along a straight line.
The error in distance was measured to the line of the predefined route that is shown in the Figure 21 in
the result Section 6.4. The system error is investigated without dead reckoning in Figure 19, however dead
reckoning is investigated separately in Figure 20.
Density of beacons
The accuracy can be improved if additional beacons are integrated to the system. To analyze the affect of
the density of beacons more beacons were added to the system, and the results were compared, se 6.4.
Lifetime of ZBeacon
The lifetime of the system is evaluated by measurements of the voltage used by the beacons. Because the
receiver is driven by an external source (a computer) the lifetime of the receiver is neglected. Ohms Law
in equation 7 is used to calculate the current consumption of the device. The voltage U is measured by an
oscilloscope over a given resistance R, and thus the current is derived. The capacity of a battery is usually
26
given in Ah (Ampere-hours), and by dividing with the current consumption, the life time remains. This is
illustrated in equation 8.
I = U/R
t=
battery capacity
current consumption
27
(7)
(8)
6.4
Results
This section have a similar structure as that of System Verification: tests of individual devices and tests of
parts of the ZBeacon system are presented in subsections.
6.4.1
Device tests
This subsection cover results from tests about the different devices and units that are later to be integrated
in the ZBeacon system. Each device is studied to investigate the capability of future designing of an IPS.
Distance tests outdoors at a field
The most important component in an IPS is the accuracy of the measurements. Therefore measurement
tests were performed early to investigate possible accuracy of a future system, but also to validate the idea
that an IPS can be based on RSSI measurements and simple algorithms. This validation is also claimed
possible by [32]. Firstly, measurements for the ideal case were performed, or as close as there could be to the
ideal case. The placed picked for the measurements was on a field far from any disturbances or interferences.
Figure 13 illustrates RSSI measurements for 1, 2, 5 and 10 meter distances. Different output powers were
used and a mean of every individual power was calculated. The result clearly shows that the RSSI decreases
with increasing distances.
The result in figure 14 indicates that packages from lower output power did not reach the receiver. At a
distance of 10 meter, all the different output power received to the receiver. At a distance of 30 meter, the
minimum output power that reached the receiver was the TxPower register setting 0x25, which corresponds
to -18dBm according to the CC2530 Datasheet, see [31]. The minimum output power reached at 60 respectively 100 meter distances was 0x55, which corresponds to -12dBm.
When a constant power of 0x35 was used, the data presented in Table 5 was given. The mean RSSI was
calculated, and so was the path component, n. The used value for the path component when calculating the
distance was decided to 2, because that is a proposed value for calculations with measurements outdoors.
The mean value of the path component was calculated to 2.0156 for distances every meter from 2 to 10.
Out of the measurements, it is clear that without interference the devices seems promising to use in an IPS
together with a good propagation model for the signal, at least for smaller distances.
Figure 13: Result from distance tests outdoors, 1, 2, 5 and 10 meters
28
Figure 14: Result from distance tests outdoors, 10, 30, 60, 100 meters
Rotating receiver
When the receiver from Wiotech was rotated around its own axis, result in Figure 15 was obtained. The
result indicates that the radiation of the antenna is not evenly distributed.
Figure 15: Result from Rotating receiver, Wiotech device
The receiver at SmartRF05 was rotated with the same conditions as the device from Wiotech, and the
results in Figure 16 is more promising.
29
Table 5: Result from Distance tests outdoors, power = 35
Meters
between
devices
Mean RSSI
Path loss (n)
Calculated distance
Error
1
-98.01
-
-
-
2
-104.03
1.9998
1.9999
0.0002
3
-109.33
2.3726
3.6813
0.6813
4
-109.17
1.8528
3.6141
0.3859
5
-110.63
1.8048
4.2756
0.7244
6
-112.01
1.7991
5.0119
0.9881
7
-116.62
2.2015
8.5212
1.5212
8
-118.01
2.2141
10.000
2.0000
9
-118.01
2.0959
10.000
1.0000
10
-116.01
1.8000
7.9433
2.0567
15
-122.65
2.0951
17.0608
2.0608
20
-125.16
2.0868
22.7772
2.7772
25
-123.52
1.8248
18.8582
6.1418
30
-124.03
1.7615
19.9986
10.001
Figure 16: Result from Rotating receiver, SmartRF05
Comparison of Figure 15 and Figure 16 shows the difference in directivity of the different antennas. The
RSSI from the device from Wiotech differ with 25dBm, when the antenna at the evaluation board differ
with 15dBm when rotating the antenna.
30
Test for antenna at transmitter
When the radiation of the transmitter was investigated, the result in Figure 17 was given. The result indicate
that a lying position of the transmitter is slightly better. The result from Figure 17a also indicates that the
top of the device should be rotated 90 degrees counterclockwise, to avoid the poor coverage in RSSI.
(a) Transmitter standing
(b) Transmitter lying
Figure 17: Radiation for transmitter
Accelerometer test
The acceleration of the movement in the x-axis is monitored and shown in Figure 18a. This is then
integrated and the result is shown in Figure 18b. The movement itself is shown in Figure 18c. Note that the
acceleration below is only considered in one axis.
(a) Acceleration output
(b) Calculated velocity
(c) Calculated distance
Figure 18: Result from accelerometer and gyro data
6.4.2
System tests
Result from tests when all units are integrated to the ZBeacon system are presented in this section.
Move along a predefined route
The result of the test when the receiver was moved along a specific route is illustrated in Figure 19 and Figure
20. The blue line along the corridor represent the actual route and the blue stars represent the estimated
positions, and the error in distance for every estimated coordinate is calculated as the closest distance to the
route (the blue line). The mean error in distance is calculated to 1.80 m when only ZigBee was used, and
4.01 m using only dead reckoning.
31
The accuracy of the system is calculated as the largest error in distance, which resulted in an accuracy
of 9.51 m for the system using only dead reckoning, and 3.23 m for the ZigBee system. Thus one can with
high probability say that the estimated position is within the accuracy.
Figure 19: Estimated position using ZigBee system only
32
Figure 20: Estimated position using dead reconing only
The final results, see Figure 21, is achieved when both ZigBee and dead reckoning are integrated to create
the ZBeacon system. The mean error in distance was calculated to 1.01 m, and the accuracy 3.33 m. The
results of the different tests are summarized in table 6.
33
Figure 21: Estimated position of ZBeacon system
Table 6: Summarized results
System
Mean error [m]
Accuracy [m]
ZigBee
1.08
3.23
Dead reconing
4.01
9.51
ZBeacon
1.01
3.33
Density of beacons
Figure 22a illustrates the result when a number of 6 beacons were used. The result is an mean error of 0.87
34
m. When the density of beacons was doubled (see Figure 22b), the mean error decreased to 0.42 m. The
result is shown in Figure 22, and the result is summarized in table 7.
(a) Result from Density of beacons, normal
(b) Result from Density of beacons, doubled
Figure 22: Density of beacons
Table 7: Summarized results from tests of density of beacons
Number fo nodes
Mean error [m]
Accuracy [m]
Normal
0.87
2.16
Doubled
0.42
3.60
Lifetime of ZBeacon
Figure 23 illustrates the power consumption of a beacon when a message is sent. The current consumption
was calculated from the data given in Table 8 with equation 7, given the resistance 10.05 Ω. The time of
each event was multiplied with the current consumption during that event, and the sum of those products
is the total power consumption for sending a message. The power consumption when the beacon is in sleep
mode is assumed to be zero, since it is just a few µA. A messages is sent every 100 ms, and the mean current
35
of the beacons was calculated to 1.53 mA. With a battery capacity assumed to be 1200 mAh, the life time
calculed with equation 8 result in approximately 782 hours, which is equal to 32.6 days.
Table 8: Result from oscilloscope
Event
Time [ms]
Voltage [mV]
Current [mA]
4
80
7.96
Prepare for sending message
0.75
300
29.85
Send message
1.3
650
64.68
Prepare for sleep
1.9
80
7.96
Wake up
Figure 23: Power consumption of beacon. Data from oscilloscope.
36
7
Discussion
The devices used to setup the IPS are not designed for the purpose they are used for in this thesis. The
devices were constructed as simple nodes in a WSN and therefor the components are chosen after the original
application, which does not suit an IPS completely. The most crucial component is the antenna, which in
the mobile device is important to get proper RSSI measurements. The antenna of the devices is not a good
choice for an IPS since the angle of the RF-signal affects the signal strength greatly at the receiver. This is
strengthen by the result in Figure 15 and 16. For an IPS it is more important with an good omnidirectional
antenna than good signal strength.
Since the devices only have one antenna the choice to use AoA were not possible. Therefor RSSI was
the only option of gathering data, which is well known to be inaccurate. A parameter that affects the RSSI
measurements is the temperature. Favorably the devices are meant to be placed indoors where the temperature are most often constant, but if the units should somehow be placed close to a window or in a draft
the measurements could vary depending on season. This is confirmed by [31] where the temperature has
been well investigated. However the most important thing to consider is the placement of the devices, with
reference to the surrounding objects. It is known that metallic objects is reflecting RF signals greatly, and
large metallic objects placed in the near field of the transmitter greatly affects the radiation pattern of the
transmitted signal.
One early idea in the designing of the ZBeacon was to utilize the capability of different output power.
By transmitting the same package but with different powers the receiver would receive all packages that it
is in range of receiving. The receiver can then get an approximate range to the transmitter. This is not
possible because there are only 16 different power levels available in the ZigBee devices, which would mean
that the accuracy would not be good enough. The capability of adaptive output power is useful only in
energy aspects for this purpose. In an adaptive system the beacons could adapt their power depending on
the distance to the mobile device, and thus minimize the power consumption. The sleep function of the
ZigBee device can be used in advantage when there are no mobile devices in the proximity.
An improvement of the system could be other type of devices, to be able to take advantage of and implement more measuring techniques. A device with dual antennas could use the RSSI and AoA measurements
simultaneously, which implies that in some ideal cases only one transmitter is necessary for determine the
position. Such a device could know both direction and distance to each beacon in a 2D plane. An even
better device could use four antennas divided in pairs, where the pairs are cross polarized. As proven in
earlier sections the measurements are inaccurate and full of errors. Therefor an antenna array could improve
a system significantly.
As seen in Figure 18 the accelerometer is not useless for measurement of distances. The total distance
moved was 3 dm and with integration of the acceleration approximation 2.9 dm was measured, which makes
it suitable for dead reckoning. With such good precision one could wonder why not use only dead reckoning.
The answer is that an accelerometer can not be completely trusted. Drifting errors in the accelerometer will
with time give huge errors, which is proved in Figure 20. Dead reckoning is supposed to give a better accuracy
of the system, which is contradicting the results in Figure 19 and 21 when introducing the accelerometer.
The method used for determining the error and accuracy is not the most accurate, and not even correct
in some sense. If the estimated error is large, but still close to the route, the error is still seen as the distance
to the route and therefor small. Figure 22b clearly illustrates this, especially close to the beacon pairs. The
density of the estimated points gathers around the beacon pairs even when the route is followed in a constant
velocity. The reason this method is used is solely because its simplicity.
37
8
Conclusion
An IPS is not as trivial to construct as one can think. There is a reason why indoor positioning is still an
area of research, it is currently impossible to satisfy the requirements for all different applications. RSSI
based trilateration, which this project have focused on, is fairly satisfying in wide open undisturbed areas,
and even in perfect environment hardware limits can cause inaccuracies in meters. It is impossible to answer
the question which system used for indoor positioning is the best, since it depends on initial conditions and
requirements on the final system. In some cases it is necessary to run multiple systems simultaneously to
reach the requirements.
The system designed, constructed and evaluated in this thesis is not the most accurate nor the cheapest,
but it works and it is relatively simple. The integration of the accelerometer could have been improved
if we possessed enough knowledge about sensorfusion. Currently when introducing the accelerometer the
estimated positions along the path gets an lower mean error but worse accuracy, and Figure 21 shows a
smoother following of the route.
38
9
Future work
The ZBeacon system can be improved in many ways. There would be interresting to se how different algorithm affect the performance of the ZBeacon system, and to find a better solution for integration of the
accelerometer. Another interresting thing to investigate is how much the output power affect lifetime and
coverage of the beacons.
The largest improvement would probably be to develop new devices, that are more suitable for an IPS.
The antenna integrated in Wiotech’s devices are not even close to be suitable for positioning, even though
they have advantages suited for other applications. One possible development is to construct an antenna
array, from which there can be added further measuring methods to be integrated in the system. There
would also be of interrest to customize the code used for the application in Z-stack, to make it more efficient.
39
References
[1] Gough Lui, Thomas Gallagher, Binghao Li, Andrew G. Dempster, and Chris Rizos Differences in RSSI
Readings Made by Different Wi-Fi Chipsets: A Limitation of WLAN Localization, Finland, 2011
[2] Gao Li-peng, and Jiang Han-wen, A Strong Anti-interference Capability Location Algorithm Based on
RSSI, China, 2012
[3] Hsieh-Chung Chen, Tsung-Han Lin, H. T. Kung, Chit-Kwan Lin, and Youngjune Gwon, Determining
RF Angle of Arrival Using COTS Antenna Arrays: A Field Evaluation, Florida, 2012
[4] Nardi S., Pachter M., GPS estimation algorithm using stochastic modeling, Florida, 1998
[5] Antti Kotanen, Marko Hännikäinen, Helena Leppäkoski, Timo D. Hämäläinen, Experiments on Local
Positioning with Bluetooth, Finland, 2003
[6] Erin-Ee-Lin Lau, Wan-Young Chung, Enhanced RSSI-based Real-time User Location Tracking System
for Indoor and Outdoor Environments, South Korea, 2007
[7] Andreas Schmidt-Dannert, Positioning Technologies and Mechanisms formobile Devices, Berlin, 2010
[8] Artur Baniukevic, Christian S. Jensen, and Hua Lu, Hybrid Indoor Positioning With Wi-Fi and Bluetooth:
Architecture and Performance, Denmark, 2013
[9] Hui Liu, Houshang Darabi, Pat Banerjee, and Jing Liu, Survey of Wireless Indoor Positioning Techniques
and Systems, 2007
[10] Carlos Medina, Jose’ Carlos Segura, A’ ngel De la Torre, Ultrasound Indoor Positioning System Based
on a Low-Power Wireless Sensor Network Providing Sub-Centimeter Accuracy, Spain, 2013
[11] Ruey-Hsuan Lee, Jen-Chieh Wu, Shao-Hsuan Chang, Sheng-Fuh Chang, Chia-Chan Chang, Yi-Ming
Chen, Radar Design for Wireless Indoor Positioning Applications, Germany, 2013
[12] Simon Haykin, Cognitive radar: a way of the future, 2006
[13] https://www.zigbee.org/, Acc. 2014-04-07
[14] http://www.ieee.org/index.html, Acc. 2014-04-07
[15] Kartik Rathod, Nilay Parikh, Aesha Parikh, and Prof. Vrushank Shah, ”Wireless Automation using
ZigBee protocols”, India, 2012
[16] Yoshihiro Sakamoto, Yui Totoki, Takuji Ebinuma, Kenjiro Fujii, and Shigeki Sugano, Indoor Positioning
based on Difference between Carrier-phases Transmitted from Proximately-located Antennas of a Multichannel Pseudolite, Japan, 2012
[17] Md. Shariful Islam, Richard Klukas, Indoor positioning through integration of optical angles of arrival
with an inertial measurement unit, South Carolina, 2012
[18] http://www.4gamericas.org/index.cfm?fuseaction=page&sectionid=2420, 2014-04-10
[19] Veljo Otsason, Alex Varshavsky, Anthony LaMarca, and Eyal de Lara, Accurate GSM Indoor Localization, 2005
[20] Christian Gentner, Estefanfa Munoz, Mohammed Khider, Emanuel Staudinger, Stephan Sand, and
Armin Dammann, Particle Filter Based Positioning with 3GPP-LTE in Indoor Environments, South
Carolina, 2012
[21] Chris Rizos, Gethin Roberts, Joel Barnes, and Nunzio Gambale, Experimental results of Locata: A high
accuracy indoor positioning system, Swizerland, 2010
40
[22] Jeffrey Hightower, Gaetano Borriello, and Roy Want, SpotON: An Indoor 3D Location Sensing Technology Based on RF Signal Strength, 2000
[23] Lionel M. Ni, Yunhao Liu, Yiu Cho Lau, and Abhishek P. Patil, LANDMARC: Indoor Location Sensing
Using Active RFID, Texas, 2003
[24] http://quuppa.com/, Acc. 2014-08-11
[25] http://www.senionlab.com/, Acc. 2014-08-11
[26] http://www.teletracking.com/, Acc. 2014-08-11
[27] http://www.wiotech.se/, Acc. 2014-08-11
[28] http://www.ti.com/, Acc. 2014-08-11
[29] http://www.iar.com/, Acc. 2014-08-11
[30] Bicsi, B., Network Design Basics for Cabling Professionals. City: McGraw-Hill Professional, 2002
[31] Texas Instruments, ”A True System-on-Chip Solution for 2.4-GHz IEEE 802.15.4 and ZigBee Applications”, CC2530 datasheet, Apr. 2009 [Revised Feb. 2011]
[32] Shi Shuo, Sun Hao and Song Yang, Design of an experimental indoor position system based on RSSI,
China, 2010
41
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising