• No results found

Outdoor localization in long range WSN using trilateration

N/A
N/A
Protected

Academic year: 2021

Share "Outdoor localization in long range WSN using trilateration"

Copied!
62
0
0

Loading.... (view fulltext now)

Full text

(1)

Department of Science and Technology Institutionen för teknik och naturvetenskap

Linköping University Linköpings universitet

g n i p ö k r r o N 4 7 1 0 6 n e d e w S , g n i p ö k r r o N 4 7 1 0 6 -E S

LiU-ITN-TEK-A--17/045--SE

Outdoor localization in long

range WSN using trilateration

Tom Karlsson

Mike Persson

(2)

LiU-ITN-TEK-A--17/045--SE

Outdoor localization in long

range WSN using trilateration

Examensarbete utfört i Elektroteknik

vid Tekniska högskolan vid

Linköpings universitet

Tom Karlsson

Mike Persson

Handledare Qin-Zhong Ye

Examinator Adriana Serban

(3)

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

extra-ordinä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/

(4)

Abstract

This thesis report investigates how good position estimations that can be done outdoors with received signal strength indication (RSSI) trilateration for sub 1-GHz radio nodes. A custom network and an empirical distance model have been created as well as a technique for weighting multiple distance estimations, using wrapped normal probability density functions. The developed localization system was tested on an open area of one square kilometer, to estimate a node’s position on various locations. To evaluate the localization system, mean and median error of the estimated positions were calculated.

(5)
(6)

Contents

Abstract I 1 Introduction 1 1.1 Background . . . 1 1.2 Task . . . 1 1.2.1 Research Questions . . . 2 1.3 Method . . . 2 1.3.1 Pre-study . . . 2 1.3.2 Software implementation . . . 2 1.3.3 Mathematical models . . . 2 1.4 Limitations . . . 3 1.5 Report Outlines . . . 3 2 Trilateration 5 3 Signal Propagation 7 3.1 Free space . . . 7 3.1.1 Sub-1 GHz . . . 7 3.2 Physical parameters . . . 8 3.2.1 Reflections/refraction . . . 9 3.2.2 Diffraction . . . 10 4 Method 11 4.1 Hardware . . . 11 4.2 Network . . . 12

4.2.1 Connection and node identification . . . 13

4.2.2 RSSI Measurements . . . 15

4.2.3 User interface and data logging . . . 16

4.3 Global positioning system . . . 16

4.3.1 GPS Test . . . 16

4.3.2 Military Grid Reference System . . . 16

4.4 Distance model . . . 17

4.5 Trilateration . . . 18

4.5.1 Wrapped NPDF . . . 19

4.5.2 Test . . . 22 III

(7)

5 Results 23 5.1 GPS measurements . . . 23 5.1.1 Discussion . . . 24 5.2 Distance model . . . 25 5.2.1 Discussion . . . 28 5.3 Trilateration tests . . . 29 5.3.1 Discussion . . . 46 6 Conclusion 47 6.1 Thesis work summary . . . 47

6.2 Future Work . . . 47

(8)

List of Figures

2.1 Illustration of two Anchor nodes’ distance estimation circle intersections. . 5

2.2 Illustration of three Anchor nodes’ distance estimation circle intersections. 6 3.1 Geometry for reflection and refraction . . . 9

3.2 Huygen’s Principle for a spherical source . . . 10

3.3 Knife edge diffraction geometry . . . 10

4.1 Top view of CC1310 LAUNCHXL board. . . 11

4.2 Illustration of a successful connection to the Coordinator. . . 14

4.3 Illustration of a failed connection to the Coordinator. . . 15

4.4 Example MGRS string. . . 17

4.5 Ideal annuli intersection . . . 18

4.6 Non-ideal cases of annuli intersection . . . 19

4.7 Visual example of a wrapped NPDF level surface. . . 20

4.8 Visual example of the sum of wrapped NPDFs level surface. . . 20

4.9 Trilateration test positions. . . 22

5.1 GPS measurements. . . 23

5.2 Measurement positions. . . 25

5.3 All RSSI measurements. . . 26

5.4 Log-distance path loss model. . . 27

5.5 Non log-distance model. . . 28

5.6 Wrapped NPDF and annuli trilateration test 1 result. . . 30

5.7 Wrapped NPDF and annuli trilateration test 2 result. . . 31

5.8 Wrapped NPDF and annuli trilateration test 3 result. . . 32

5.9 Wrapped NPDF and annuli trilateration test 4 result. . . 33

5.10 Wrapped NPDF and annuli trilateration test 5 result. . . 34

5.11 Wrapped NPDF and annuli trilateration test 6 result. . . 35

5.12 Wrapped NPDF and annuli trilateration test 7 result. . . 36

5.13 Wrapped NPDF and annuli trilateration test 8 result. . . 37

5.14 Wrapped NPDF and annuli trilateration test 9 result. . . 38

5.15 Wrapped NPDF and annuli trilateration test 10 result. . . 39

5.16 Wrapped NPDF and annuli trilateration test 11 result. . . 40

5.17 Wrapped NPDF and annuli trilateration test 12 result. . . 41

5.18 Wrapped NPDF and annuli trilateration test 13 result. . . 42

5.19 Wrapped NPDF and annuli trilateration test 14 result. . . 43

5.20 Wrapped NPDF and annuli trilateration test 15 result. . . 44

5.21 Wrapped NPDF and annuli trilateration test 16 result. . . 45 V

(9)
(10)

List of Tables

4.1 EasyLink packet frame structure . . . 12

4.2 Packet types . . . 13

4.3 Netw Status flags . . . 14

5.1 GPS measurements . . . 24

5.2 Unsuccessfully received packets . . . 26

5.3 Input parameters for the sum of wrapped NPDFs algorithm . . . 29

5.4 Test 1 radii for anchor annuli . . . 30

5.5 Test 2 radii for anchor annuli . . . 31

5.6 Test 3 radii for anchor annuli . . . 32

5.7 Test 4 radii for anchor annuli . . . 33

5.8 Test 5 radii for anchor annuli . . . 34

5.9 Test 6 radii for anchor annuli . . . 35

5.10 Test 7 radii for anchor annuli . . . 36

5.11 Test 8 radii for anchor annuli . . . 37

5.12 Test 9 radii for anchor annuli . . . 38

5.13 Test 10 radii for anchor annuli . . . 39

5.14 Test 11 radii for anchor annuli . . . 40

5.15 Test 12 radii for anchor annuli . . . 41

5.16 Test 13 radii for anchor annuli . . . 42

5.17 Test 14 radii for anchor annuli . . . 43

5.18 Test 15 radii for anchor annuli . . . 44

5.19 Test 16 radii for anchor annuli . . . 45

5.20 Sum of wrapped NPDFs algorithm test summary . . . 46

(11)
(12)

Acronyms

API Application Programming Interface. 2, 12, 13

GPS Global Positioning System. IV, V, 1, 13, 16–18, 23, 24, 27, 28, 48 IDE Integrated Development Environment. 2

ISM bands Industrial, Scientific and Medical radio bands. 7 LOS Line-of-sight. 8, 10, 47

MCU Microcontroller unit. 1, 11, 21

MGRS Military Grid Reference System. 16, 17, 22 NLOS Non-line-of-sight. 29

NPDF Normal Probability Density Function. III, V, VII, 3, 19–21, 25, 29–47 PCB Printed Circuit Board. 11, 48

RMSE Root Mean Square Error. 16–18, 23, 24, 27, 28, 46

RSSI Received Signal Strength Indicator. I, III, V, 2, 12, 13, 15–17, 22, 23, 26–28, 47, 48

SDK Software Development Kit. 2

TI-RTOS Texas Instruments Real-Time Operating System. 2 UI User Interface. 12, 16

UTM Universal Transverse Mercator. 16, 17, 24 WSN Wireless Sensor Network. 1, 2, 8, 47

(13)
(14)

1

Introduction

This section introduces the thesis report with a background of the assignment, what the assignment goals are, what questions are intended to be answered and how it was executed.

1.1

Background

Wireless sensor networks (WSN) are specialized wireless networks for data collection of sensors and are constructed to have low power consumption, at the cost of low throughput. The network is built up on several nodes equipped with a radio, a microcontroller and sensors. It can e.g. be distributed outdoors for agricultural or military applications, in buildings for smart home applications or in industries for increased automation. They can have different types of topologies but are in general controlled from one coordinator node connected to a gateway.

Since the purpose of a WSN is to collect data, it is often necessary to know from what physical position the data is measured. This can, in many applications, be solved manually if the nodes are placed by hand and in small scale. However, in special applications like military, the nodes could be distributed from air and the physical positions are therefore unknown. Another example is a large farm where many sensors are distributed to take measurements on the soil, for e.g. irrigation. To enter coordinates manually for a large amount of units in a such case would be very time consuming.

In other words, there are cases where automatic localization systems are optimal and sometimes even the only possible implementation. The most trivial and maybe most precise solution is to put a GPS transceiver on every node, this is however more expensive.

1.2

Task

The main task of the thesis is to investigate how good estimations that can be made of a node’s physical position in a long range WSN, based on received signal strength trilateration. This is accomplished by creating a WSN with Texas Instruments CC1310 LAUNCHXL boards to gather necessary data to analyze and develop mathematical mod-els. The mathematical models are used to produce an algorithm that is compatible with the CC1310 MCU. This thesis has been done in collaboration with Etteplan in Link¨oping.

(15)

2 Chapter 1. Introduction

1.2.1

Research Questions

This thesis should answer the following research questions:

• Is it possible to estimate physical positions of a WSN’s nodes using only Received Signal Strength Indication (RSSI) to calculate distance?

• How precise and within what range is the solution valid.

• How is the developed localization system affected by obstacles between nodes.

1.3

Method

To perform the task, a number of implementations had to be created. These steps are described briefly in this section. The final implementations were tested at Br˚avalla airfield by placing the anchors in an equilateral triangle to estimate the unknown node at different places around it. For a detailed description see the Method chapter.

1.3.1

Pre-study

The initial step of the thesis work is a pre-study of the subject and what types of possible solutions there are. That includes the theory of trilateration, and physics behind signal propagation.

1.3.2

Software implementation

The software will be written in C using Texas Instruments’ IDE Code Composer Studio 7.2.0, for implementing the WSN trilateration application as well as test bench tools. MATLAB R2015 is used for analyzing and creating empirical models of test data and display figures of results. Some figures are created in the Internet browser application draw.io.

To implement the RSSI measurement network in the CC1310 LAUNCHXL boards, a network application software was needed. In WSNs, such applications are commonly im-plemented in application layers of protocols like ZigBee, 6LoWPAN and Sigfox. In this thesis, it was decided to use the EasyLink API, developed by Texas Instruments for cus-tomers to implement their own protocols [1]. It was found more suitable for the task than a complete protocol, as it allows more customization of the communication flow and struc-ture. Further, the EasyLink API uses Texas Instruments Real-Time Operating System (TI-RTOS). Software for both these subsystems are included in the CC13x0 SimpeLink SDK version 1.30.00.06, which was used in this thesis.

1.3.3

Mathematical models

An empirical model for converting RSSI to meters was created, using regression analysis on field test measurements. Two techniques of position estimation with RSSI trilateration are evaluated. The first technique uses the distance model’s fit to the measurements

(16)

1.4. Limitations 3

plus/minus its standard deviation as margins, creating an annulus. The second technique does also use the model’s fit to the measurements but use it in a normal probability density function (NPDF) to wrap around its radius. This is, to the best of our knowledge, the first paper testing this technique for RSSI localization.

1.4

Limitations

The localization system is limited to only two dimensions, neglecting height differences outdoors. The trilateration tests and distance model measurements have only been per-formed in one environment.

1.5

Report Outlines

The report is divided into three following major parts. The initial part is Chapter 2-3, which describe the pre-study of theory behind the trilateration technique and signal propagation physics. This includes the theory that the final algorithm and propagation model is based on. Chapter 4 describes how all parts in the assignment have been created: the methods that were used, how the implemented network application works, how the models were created and how the tests have been executed with the network and the algorithm. Thereafter, Chapter 5, test results are presented as well as all parameters for the models. The last part of the report, Chapter 6, is a conclusion of what has been accomplished, including a discussion about the results and future work.

(17)
(18)

2

Trilateration

Trilateration is a range based localization technique, which indicates that it uses distance from three nodes with known positions to a node with unknown position, to estimate that node’s location. In this chapter, the concept of trilateration is described.

Assume that, in a cartesian coordinate system, one node called Anchor node, has known position and another node, called Unknown node, has unknown position. The Anchor node estimates the distance d to the Unknown node and thereby knows that there is a node somewhere at the distance d from itself, i.e. along a circle with its own coordinates as center and the radius d. If one more Anchor node is added to the system and estimates its distance to the Unknown node, there are two circles of possible positions for the Unknown node. If the Anchor nodes now combine their information they will notice two intersection points on their circles. This is illustrated in Figure 2.1, where A1 and A2 represent the

Anchor nodes, d1 and d2the Anchor nodes’ distances to the Unknown node and P indicate

an intersection point and hence an estimated position for the Unknown node.

Figure 2.1: Illustration of two Anchor nodes’ distance estimation circle intersections.

Although the amount of estimated positions now have been reduced to two, one more Anchor node needs to be added to the system to determine which one of these estimated positions that is the most probable one. So, a third Anchor is added which, estimates its distance to the Unknown node and combine that information with the other two Anchor nodes’ information to estimate the point where all circles intersect. Figure 2.2 illustrates an extension of Figure 2.1 with a third Anchor node, A3 together with its estimated

(19)

6 Chapter 2. Trilateration distance d3 to the Unknown node. Notice that the amount of estimated positions now are

reduced to one.

Figure 2.2: Illustration of three Anchor nodes’ distance estimation circle intersections.

This is an ideal example of trilateration in two dimensions, since all three circles of distance estimation intersect in the same place. A non-ideal case would be where the three circles do not intersect at the same position, which can happen if at least one distance estimation is faulty. Those cases will demand an extension of the technique.

Trilateration can be done for three-dimensional systems, where the same approach is applied with the difference that a distance estimation corresponds to a sphere of estimated positions, hence, at least four Anchor nodes must be used to reduce the amount of probable positions to one. This is sometimes referred to as multilateration.

(20)

3

Signal Propagation

The purpose of this chapter is to give the reader a brief understanding of the major properties of signal propagation and also give an example of it under ideal conditions.

3.1

Free space

The most ideal model for signal propagation is Friis law, it describes how the signal strength attenuates from the transmitter to the receiver in free space, which is shown in (3.1).

Pr =

GtGrλ 2

(4πR)2Pt (3.1)

Pr and Pt are the receive and transmit power. Gr is the receive antenna gain and Gt is

the transmit antenna gain. λ is the wavelength of the radio signal and can be rewritten as λ = vp

f , where vp is the phase velocity of the signal and f is the frequency. R is the

distance between the transmit and the receive antenna [2].

How much the signal has been attenuated can be described by the path loss quotient. It is the reduction in power density of an electromagnetic wave as it propagates through space. It is measured by the logarithmic ratio of power transmitted and power received:

Pl =

Pr

Pt

(3.2) Equation (3.2) can together with Friis equation (3.1) and assuming isotropic antenna gain, be described as

Pl= 20 log

λ

4πR (3.3)

3.1.1

Sub-1 GHz

Sub-1 GHz is a term for wireless networks that run in ISM bands below 1 GHz, typically 868 MHz in Europe and 915 MHz in the USA. Compared to networks in the 2.4 GHz band like WiFi and Bluetooth, the Sub-1 GHz networks have due to its lower frequency, higher transmission range to power ratio and are therefore preferable for wireless sensor networks in outdoor environments. The lower frequency also implies lower attenuation through obstacles as well as higher ability of bending over corners.

The higher transmission range to power ratio of Sub-1 GHz compared to 2.4 GHz can be 7

(21)

8 Chapter 3. Signal Propagation proven by frequency values inserted in (3.1). Assuming that the phase velocity, received power, distance and antenna gains are equal for both network frequencies, leads to the relationship in (3.4),

Pt1 = 0.13Pt2 (3.4)

Pt1is the required transmit power for f = 868 MHz and Pt2for f = 2.4 GHz. Similarly, for

a fixed transmit power, received power, antenna gain and phase velocity, the transmission distance can be compared. The relationship can be seen in (3.5),

R1 = 7.65R2 (3.5)

R1 is the possible transmission distance when f = 868 MHz and R2 when f = 2.4 GHz.

Friis law (3.1), can be used to calculated the theoretical maximum distance between two nodes. CC1310 has a carrier frequency of 868 MHz, a maximum transmit power of 14 dBm, -124 dBm sensitivity and the antennas are assumed to radiate isotropically, the result can be seen in (3.6).

Rmax = 1 4π s Pt Pr GtGrc2 f2 ≈ 218 km (3.6)

Since the Sub-1 GHz frequency band is not used as much commercially, it does not have as much traffic as the 2.4 GHz band. Therefore, less signal interference is expected in the Sub-1 GHz networks. If there is a lot of signal interference or noise, a higher transmit power might be needed to avoid packet loss between devices. Sub-1 GHz WSNs can therefore be effective even at shorter ranges.

3.2

Physical parameters

Friis law is a special case of line-of-sight (LOS) in free space and is useful for understanding the behavior of signal power propagation in theory, but propagation is in reality more complicated. LOS is rare over long distances and the propagation medium is random as well as time and frequency varying. Multiple factors have an impact on the attenuation. This section will describe the physical phenomenon of reflections/refraction and diffraction which are fundamental properties for signal propagation.

Scattering is also a fundamental property which occur when the signal reflects on obstacles smaller than the signals wavelength. Scattering is however outside this report’s scope since it is described by quantum mechanics. It will therefore not be explained in detail.

(22)

3.2. Physical parameters 9

3.2.1

Reflections/refraction

Reflections occur when incident signals impinge the boundary of two mediums with dif-ferent permeabilities µ and permittivities ε. The result for these situations is that two new waves are created with the same frequency as the incident wave. Both waves are directed in the same plane as the incident wave propagation direction and the surface’s normal, called scattering plane. The first wave, the reflected wave, will move away from the second medium with the angle θr, which has the same magnitude as the incident

wave angle θi. The second wave, the refracted/transmitted wave, will move through the

second medium with the angle θt. Figure 3.1 illustrates the geometry of reflections and

refractions. [3]

Figure 3.1: Geometry for reflection and refraction

The relationship of the incident and refracted waves are described by Snell’s law (3.7). cos θi

cos θt

= n2 n1

(3.7) n1 and n2 are the refraction index for medium 1 and 2. The refraction index is the ratio

of the free space velocity and the medium’s phase velocity, n = c/vp. [3]

The amplitude relationship of the incident, transmitted and reflected waves is described by Fresnel’s reflection and transmission coefficients (3.8),(3.9). These coefficients are expressed as the ratio between the transmitted and reflected electric fields to the incident electric field, or the intrinsic impedances of the mediums for plane waves and angles. The reflection coefficient is denoted R and the transmission coefficient is denoted T. The coefficients are indexed with their polarization, parallel or orthogonal to the scattering plane. [3] R|| = Er|| Ei|| = Z1cos θi− Z2cos θt Z2cos θt+ Z1cos θi , R= Er⊥ Ei = Z2cos θi − Z1cos θt Z2cos θi+ Z1cos θt (3.8)

(23)

10 Chapter 3. Signal Propagation T|| = Et|| Ei|| = 2Z2cos θi Z2cos θt+ Z1cos θi , T = Et⊥ Ei⊥ = 2Z2cos θi Z2cos θi+ Z1cos θt (3.9)

3.2.2

Diffraction

One important property of waves is their ability to go around corners. The reason why someone can hear sound coming from many rooms away, or why sunlight can go beyond the horizon are due to diffraction. This is the same for radio waves. The reason for this is called the Huygen’s principle, which says that all wavefronts are composed of an infinite number of secondary wave sources. Figure 3.2 illustrates Huygen’s principle. [3]

Figure 3.2: Huygen’s Principle for a spherical source

With the knife-edge diffraction model in Figure 3.3, it is easy to understand how this is important for radio waves propagating around large objects when there is no clear LOS.

(24)

4

Method

This chapter describes the process to create the solution for the thesis assignment. It starts with an overview of the used hardware and how the network has been implemented. It explains the tests for evaluating the solution of the thesis task and also describes the software and mathematical models that were used for measurements and tests.

4.1

Hardware

The hardware used in this thesis is the Texas Instruments CC1310 LAUNCHXL board. It is an embedded system consisting of one CC1310 SimpleLink™ Ultra-Low-Power Sub-1 GHz Wireless MCU, one TM4C1294NCPDT 32-bit ARM® Cortex®-M4F based MCU and an integrated PCB trace 38x25 mm monopole antenna [4]. A picture of CC1310 LAUNCHXL board can be seen in Figure 4.1

Figure 4.1: Top view of CC1310 LAUNCHXL board.

The CC1310 Wireless MCU is a system-on-chip that handles radio communication. It has an ARM® Cortex®-M0 Radio Controller that handles low-level RF protocol commands that are stored in ROM or RAM. It has an ARM® Cortex®-M3 as main CPU, running at a maximum clock frequency of 48 MHz, and a Sensor Controller that can work while the main CPU is in sleep mode. [5]

(25)

12 Chapter 4. Method

4.2

Network

The RSSI measurement network’s assignment is to gather RSSI measurement data from three Anchor nodes and display the values to the user. To implement this, an overview of the needed functionalities was produced. It was decided that the network needs a main node/unit, in this report denoted Coordinator, that associates the network’s every node and controls them. The association also includes identification of every node’s type. The other node types were decided to be Anchor node and Unknown node. The RSSI mea-surements are performed by the Anchor nodes and the Coordinator, thus the Coordinator also has the functionalities of an Anchor node, which implies that four nodes would be used in total: the Coordinator, two Anchor nodes and one Unknown node. Further, it was decided to use the PuTTY serial console on a laptop, connected to the Coordinator serially, as user interface (UI) and tool for logging data.

The software of the network application is divided into different projects, for each node type, that were built upon the EasyLink API example projects: rfWsnNode and rfWs-nConcentrator. These example projects provide a star network topology, with the so called Concentrator as main node/unit and the so called Node(s) as end device(s). In this example network, the Concentrator only listens for packets and, upon receiving a packet, it handles the packet data. If it considers the packet valid, it responds the sender with an acknowledgement packet, or simply ack packet. The Nodes have the reversed functionality as they send data, to the Concentrator, when they have something to share, e.g. collected sensor data. After sending a packet, the Node waits for an ack packet for a specified time of 160 ms, which upon exceeding causes a timeout. A send operation causing a timeout results in a maximum of two resend operations. To identify packet types, both applications share a setup of different flags that are placed in the beginning of a packet payload. The beginning of the packet payload also contain the sender’s address, i.e. the source address. The EasyLink packet frame structure for the examples can be seen in Table 4.1. The same frame structure is used in the implemented network of this thesis.

Table 4.1: EasyLink packet frame structure

1Byte 1-64bit 2-128Bytes Packet length Destination Address Payload

The different packet types that where used in the RSSI measurement network are listed in Table 4.2, together with a short description of when the packets are used and/or what they contain.

(26)

4.2. Network 13 Table 4.2: Packet types

Value Packet type Description

0 ACK PACKET An empty packet only indicating acknowledgment.

1 INIT PACKET A packet that is sent to associate with the Coordinator. For Anchor nodes, it also contains two floating point values, representing GPS coordinates. 2 NETW STATUS PACKET Contains a status flag.

3 MEAS PACKET An empty packet that is sent to the unknown node, to indicate RSSI measurement.

4 DOUBLE PACKET A packet containing a chosen amount of floating point values.

The EasyLink API also provide software functions for hardware settings, e.g. trans-mit power and transmission mode, where the maximum transtrans-mit power available is 14 dBm and the different transmission modes have bit rates of 50 kbps, 5 kbps and 625 bps. The transmission modes imply sensitivity levels of -110 dBm, -119 dBm and -124 dBm respectively. The sensitivity level indicates the lowest RSSI that can be received by the radio controller. To be able to send packets as long as possible and to get a large span of RSSI values, the transmit power was set to 13 dBm and the bit rate to 625 bps. It was attempted to set the transmit power to 14 dBm, but without success.

The following sections describe in more detail how the different functionalities work through the network. It was decided to use the rfWsnNode example as base for the Coordinator and Anchor node applications, and the rfWsnConcentrator example as base for the Unknown node application. Further, the applications are developed to cause as little radio signal interference as possible.

4.2.1

Connection and node identification

The connection and node identification is the first event in the network. The Coordinator application firstly waits for two Anchor nodes to connect, i.e. listens for a total of two Init packets containing the node type flag for Anchor nodes. When receiving such a packet, the Coordinator handles the information of the packet, saves the source address temporarily and sends back a Status packet, with appropriate status flag, to that address. When the Anchor node receives the Status packet, it sends back an Ack packet. If no packets were lost, and the connections were successful, the Coordinator saves the Anchor nodes’ addresses to a table of connected Anchor nodes. Thereafter, it waits for an Unknown node to connect and the same process goes for that as for an Anchor node, except that the Unknown nodes address is saved in a table of connected Unknown nodes, upon successful connection. When these connections or associations are done and successful, the network’s nodes are ready for RSSI measurements. The different Netw Status flags can be seen in Table 4.3, together with descriptions. A successful connection example is illustrated in Figure 4.2.

(27)

14 Chapter 4. Method Table 4.3: Netw Status flags

Value Netw Status Description

0x00000400 CONNECT FAIL If a timeout occur during Status packet transmit operation, or if the node type flag of an Init packet does not fit the ones accepted by the Coordinator.

0x00000800 CONNECT SUCCESS Connection to Coordinator succeeded.

0x00010000 ALREADY CONNECTED The node trying to connect is already in a table of connected nodes.

Figure 4.2: Illustration of a successful connection to the Coordinator.

If a node fails to connect to the Coordinator it will retry until it is connected. But if a connection Ack packet is lost, the Anchor node thinks that it is connected and the Coordinator does not know if the Anchor node received the Status packet. The Coordinator will timeout and wait for a new Init packet, but the Anchor node will not send any. Therefore, the only solution is to restart the network at this point. The scenario is illustrated in Figure 4.3. However, the scenario is quite unlikely to happen. Because, if the first packets are sent and received correctly, the path between the nodes should not be a problem. But if the problem persists for a node on a specific location, a solution would be to move it, and then restart the network.

(28)

4.2. Network 15

Figure 4.3: Illustration of a failed connection to the Coordinator.

4.2.2

RSSI Measurements

A node can only perform half duplex radio operations, i.e. it can transmit or receive, at a time. This implies that, to make sure no transmissions interfere and cause unnecessary packet losses or variations in signal strength, only one node at a time may perform an RSSI measurement at the Unknown node. To accomplish this, the Anchor node application was implemented so that an Anchor node needs permission from the Coordinator to start a measurement.

When all the necessary nodes for all RSSI measurements are connected, the Coordinator alerts the user, via PuTTY, to press the Enter key to start an RSSI measurement; the Unknown node and Anchor nodes listen for incoming packets. As the Enter key is pressed, the Coordinator sends a Netw Status packet, with status flag GET TARGET and the address of the Unknown node, to the Anchor node listed first in the table of connected Anchor nodes. The Anchor node saves the target address that is in the packet payload, responds with an Ack packet and then starts an RSSI measurement to the target address, which represents the Unknown nodes address. When the Coordinator receives the Ack packet, it starts to listen for the measurement result. As the Anchor node is done with its measurement, it sends the result to the Coordinator which sends back an Ack packet and displays the values via PuTTY. The Coordinator then tells the next Anchor node to perform a measurement and the same process goes for that one. Finally, the Coordinator itself performs a measurement.

One measurement was implemented to contain 240 RSSI values and works as follows. An Anchor node sends a Meas packet to the Unknown node, which saves the RSSI value of the packet, that is measured by its radio controller. The Unknown node then puts the saved RSSI value into an Ack packet payload and sends that Ack packet to the Anchor

(29)

16 Chapter 4. Method node that sent the Meas packet. The Anchor node saves the RSSI value that is inside the Ack packet’s payload as well as the measured RSSI value of the Ack packet. Hence two RSSI values are collected. This procedure is performed 120 times with a delay of approximately 0.5 seconds between them. When all 240 RSSI values are collected, the Anchor node calculates the average RSSI value of the packets that went the same direction. The two average values are displayed and logged via PuTTY.

4.2.3

User interface and data logging

As mentioned, PuTTY serial console was used as UI. This was implemented by connecting the Coordinator to a laptop via USB, and transfer data with the Universal Asynchronous Receiver/Transmitter (UART) serial protocol, which is supported by both PuTTY and the CC1310 MCU. The Coordinator is programmed to send eventual debug messages, measurement data and various strings, e.g. ”Press ’Enter’ to start an RSSI measurement”, to the laptop that are displayed in the PuTTY serial console window. PuTTY also supports logging. Log files have therefore been created for various tests, to simplify the handling of data.

4.3

Global positioning system

As described in Chapter 2, the trilateration technique demands three anchor nodes that has pre-known positions. To accomplish this, each anchor node can either be combined with a GPS transceiver or be fed with GPS coordinates at deployment, provided that the anchors are not moved afterwards. In this thesis, the GPS coordinates were collected with a Google Nexus 5X smart phone, together with the application Google Maps, and loaded into the anchor nodes manually.

4.3.1

GPS Test

The precision of the mobile phone’s GPS is estimated by tests on multiple straight 100 m running tracks. By collecting the coordinates of the start and end points on the track, the distance between the coordinates is calculated with the Universal Transverse Mercator (UTM) method, see section 4.3.2 for explanation. These measurements are performed at different times during the day and at different running tracks, because the GPS satellites can be in either better or worse positions in relation to the smart phone at different time instants, and the accuracy of the measurements might differ on different locations depending on surrounding environment. With all measurements the average error from 100 m is calculated as the Root Mean Square Error (RMSE) as well as the average. The test result can be seen in Figure 5.1 and Table 5.1.

4.3.2

Military Grid Reference System

Since GPS uses the geographical coordinate system, represented as longitude and latitude in degrees, they will need to be converted to the cartesian coordinate system represented as X and Y in meters, to be able to work with propagation models. This is done with the Military Grid Reference System (MGRS) which is used by the NATO militaries. MGRS

(30)

4.4. Distance model 17

is based on the Universal Transverse Mercator (UTM) system, but divides the Earth into sub-zones of 100 km by 100 km. The MGRS coordinates are represented by a string of up to 15 signs, depending on precision. The first three signs (two digits and one letter) represents the UTM zone, the following two signs (two letters) represents the MGRS sub-zone. The remaining 10 signs (digits) represents the X and Y coordinates in meters, starting in the south west corner of the MGRS zone. The coordinates have a theoretical precision of one meter. An example of a MGRS coordinate string can be seen in Figure 4.4. [6]

Figure 4.4: Example MGRS string.

4.4

Distance model

The Log-distance path loss model is an empirical model based on Friis Law (3.1) which is compressing all types of constant losses like antenna gain and frequency into one constant, measured at a reference distance. The distance path loss factor η is in free space equal to two. Due to e.g. ground reflections and even diffraction of the Earth’s curvature, makes the path loss factor larger. The model is by multiple measurements over distance esti-mated by a regression analysis, being between 2 < η < 5 depending on the environment. [7] The same equation is valid for estimating the signal strength, with the difference that the constant and η are constructed for received signal strength instead of loss, see (4.1).

PR(d) = PR(d0) − η · 10 · log

 d d0



(4.1) To get as good propagation model as possible, field measurements were made over the zone where the localization tests were performed. This gave the best conditions for evaluating the localization system. The field measurements were done by setting up a two node test system at 90 cm above ground, that sent messages containing each other’s RSSI values, as described in Section (4.2.2), as the distance between them was increased for every measurement over a straight line. The amount of steps between each measurement doubled for every 10th measurement, starting with 3 steps. 240 RSSI measurements (120 for each node) for 43 distances were taken. However, the first three distances were not used due to the RMSE of the GPS, which made it possible to get negative distances. If a packet was not successfully received, it was ignored by noting it as NaN (Not a Number).

The mean of every 240 measurements at every distance were computed and the distances were converted into 10-based log form, before they were used with MATLAB’s Curve Fit tool to obtain a linear regression model. The regression model’s fit is represented with an RMSE value that implies a confidence interval of 66 %. The regression model’s slope and constant were used in (4.1). The final equation was created by solving it for the distance variable. The final equation can be seen in (4.2).

(31)

18 Chapter 4. Method d(RSSI) = d0· 10  RSSI−PR(d0) η·10  (4.2)

4.5

Trilateration

The final equation was used for distance estimation with both the model’s RMSE and the RMSE of the GPS used as upper and lower limit, creating an annulus. The centroid point of the common intersection area of the three Anchor’s annuli, is the Unknown node’s estimated position. An example of this can be seen in Figure 4.5.

-2 0 2 4 6 8 10 1 2 3 4 5 6 7 8 9 10

Figure 4.5: Ideal annuli intersection

This works in ideal cases but are rare in reality. The measurements can be distorted by unpredicted obstacles, causing the annuli to not have a common intersection or not even intersect at all. This makes it hard to find a general algorithm that can get the most probable bounded area. Figure 4.6a - Figure 4.6b illustrates some of the non-ideal cases the Anchor annuli can make.

(32)

4.5. Trilateration 19 -2 0 2 4 6 8 10 1 2 3 4 5 6 7 8 9 10

(a) No common intersection

-4 -2 0 2 4 6 8 10 -2 0 2 4 6 8 10 (b) No intersection Figure 4.6: Non-ideal cases of annuli intersection

A way to obtain an estimated position for the unknown node will therefore not be based on this technique. It will however be used to make sure an alternative technique works as intended.

4.5.1

Wrapped NPDF

The problems of finding a good algorithm that can confine the most probable area for the annuli was solved by using a continuously weighted technique. It uses the normal probability density function (NPDF) which the distance estimation model is based on. It wraps the NPDF around the radius of each Anchor’s estimate value. (4.3) shows the equation of the wrapped NPDF and Figure 4.7 gives a visual example. The sum of all the wrapped NPDFs are used as weight to decide the estimated position for the Unknown node. A visual example is illustrated in Figure 4.8.

Z(x, y) =√ 1 2πσ2e −( √ (x−a)2+(y−b)2−µ)2 2σ2 (4.3)

(33)

20 Chapter 4. Method

Figure 4.7: Visual example of a wrapped NPDF level surface.

Figure 4.8: Visual example of the sum of wrapped NPDFs level surface.

(34)

4.5. Trilateration 21

work within a unit with limited memory, e.g. the CC1310 MCU. Therefore, few values are stored within the algorithm. The algorithm is shown in Algorithm 1. The algorithm calculates the sum of NPDFs for each x and y value stepped within an area, based on chosen side lengths, and constantly stores the largest value that has been calculated as well as the x and y coordinates of that value. The step lengths are determined by the area’s side lengths and the chosen amount of steps. The amount of steps define the resolution i.e. a larger amount of steps increases the accuracy of the calculations at the cost of higher calculation time. The algorithm takes input parameters: length of x, length of y, step amount for x, step amount for y, start value for x and start value for y.

Algorithm 1: Sum of wrapped NPDFs algorithm.

Input: Length of x, length of y, step amount for x, step amount for y, start value for x and start value for y

Result: The x and y coordinates of the largest sum of wrapped NPDFs value are calculated.

step sizes for x and y are calculated;

current largest sum of NPDFs is initialized to 0;

foreach stepped x coordinate along the interval for x do foreach stepped y coordinate along the interval for y do

calculate the sum of wrapped NPDFs for the current x and y coordinates; if the sum is larger than the currently stored largest sum then

store the newly calculated sum as the currently largest sum; store the current x and y coordinates;

end end end

(4.4) shows the time complexity of the algorithm in Big Oh notation.

T (M, N ) = cf (M, N ),

cf (M, N ) = (comparisons + sumCalculation)M · N

⇒ T (M, N ) = O(M · N) (4.4)

where M and N corresponds to the amount of steps taken in x and y, respectively, c are the amount of noteworthy operations in the inner loop, i.e. additions, subtractions, divisions, multiplications and comparisons, that does not change with the amount of steps. The amount of constant operations outside the inner loop are neglected as it is a considerably smaller amount than that of the inner loop. For the resulting time complexity in Big Oh notation only the growth rate matters [8], hence the result in (4.4).

(35)

22 Chapter 4. Method The working storage needed by the algorithm does not change with the step amounts, hence the space complexity is constant, in Big Oh notation referred to as 1. (4.5) shows the space complexity of the algorithm.

S(M, N ) = O(1) (4.5)

4.5.2

Test

Tests were performed to evaluate the techniques and models. They were done at Br˚avalla airfield, the same location as the RSSI measurements were done. The Anchor nodes were separated about 200 m and 60◦ between them, creating an equilateral triangle. This was

done to evaluate the importance of surrounding environment, since the expected result would be equal signal strength around an equilateral triangle. Signal strength collection, procedure described in Section 4.2.2, were done at 16 positions around and inside the triangle, two outside each corner and two outside each side, one inside each side and one at the centroid. The radio nodes’ antennas were vertically orientated and with the front facing the triangle centroid. A picture of the test locations can be seen in Figure 4.9. The Axes are graded with MGRS coordinates, the black rings with yellow stars represents Anchor nodes and the colored dots are positions of the Unknown node.

(36)

5

Results

This chapter presents all the tests of GPS and RSSI measurements, the creation of the distance model and the trilateration tests. The results are presented in both figures and tables and with their conditions explained. Each result section ends with a discussion or analysis of the corresponding result.

5.1

GPS measurements

The GPS measurements as well as their mean and RMSE are presented in Figure 5.1 and Table 5.1. The GPS longitude and latitude are presented in degrees.

0 5 10 15 20 25 30 Measurement Number 85 90 95 100 105 110 115 120 125 Distance [m] RMSE Figure 5.1: GPS measurements. 23

(37)

24 Chapter 5. Results Table 5.1: GPS measurements

Longitude (Start) Latitude (Start) Longitude (Stop) Latitude (Stop) Distance

59.2812817 18.0727381 59.28075776 18.07420328 101.891 m 59.28130414 18.07249536 59.28080914 18.07414914 109.2120 m 59.2813642 18.07259295 59.28091995 18.0740235 95.3862 m 59.28152453 18.07246658 59.28087787 18.07396013 111.5214 m 59.28136888 18.07246663 59.28088915 18.07388763 97.0404 m 59.281389 18.07244954 59.28099849 18.074037 100.4022 m 59.24068819 18.08318972 59.24133311 18.08154923 90.3697 m 59.24064421 18.08346752 59.241176 18.08161904 105.3435 m 59.24067023 18.08322125 59.2412434 18.08153822 98.3330 m 59.24070212 18.08321746 59.24115508 18.08172732 91.3580 m 59.24075634 18.08316432 59.24116419 18.08176767 101.5692 m 59.24067288 18.08318246 59.24120474 18.08172769 92.9008 m 59.26514533 18.02081514 59.26443504 18.02199113 100.7690 m 59.2652399 18.02071386 59.26442826 18.02196309 115.7796 m 59.26513183 18.02085257 59.26445584 18.02194206 92.3592 m 59.26519201 18.02080606 59.26435085 18.02197976 103.5847 m 59.26518268 18.02087626 59.26448963 18.02184168 101.9497 m 59.26511696 18.02083219 59.26430464 18.0221581 100.0934 m 59.29685039 18.10569608 59.29625153 18.10676607 118.0085 m 59.29702463 18.10563298 59.2961936 18.10651542 120.9865 m 59.29634769 18.10676037 59.29696931 18.10553497 115.3345 m 59.29636829 18.10676855 59.29694334 18.10562529 98.8837 m 59.29631782 18.10677128 59.29699837 18.10558487 91.7450 m 59.29634842 18.10679258 59.29696502 18.10569469 101.9946 m 59.28633388 18.12126163 59.28544958 18.12163438 103.7228 m 59.28630914 18.12127513 59.28529809 18.12174624 115.1092 m 59.28624105 18.12133313 59.28543362 18.12170149 97.6269 m 59.28629012 18.12131959 59.28538069 18.12169892 115.1537 m 59.28629928 18.12133468 59.28540546 18.12171934 94.8240 m 59.28631797 18.12127359 59.28544917 18.12172188 117.9242 m Estimate value = 103.3726 m RMSEGPS = 9.5331 m

Figure 5.1 and Table 5.1 shows that the combination of the phone’s GPS and the UTM coordinate conversion gives an overestimation of the distance. The overestimation is however regarded as small and is neglected. The RMSEGPS is still used to compensate

for the low precision.

5.1.1

Discussion

The GPS measurements’ result presented in Table 5.1 shows an RMSEGPS of 9.53 m.

This can be a problem at shorter distances, since the RMSEGPS, in proportion to a short

distance, can be quite large. At longer distances, the RMSEGPS can be neglected as it is

small compared to a longer distance. Figure 5.4 shows this as the margins are larger at shorter distances and converges into the model’s RMSE at longer distances.

(38)

5.2. Distance model 25

5.2

Distance model

The steps for creating the distance model and its margins is described in this section. Final models used for the wrapped NPDF and annuli techniques are presented last, in (5.1) and (5.3). 0 5 10 15 20 25 30 35 40 45 Measurement Number 0 100 200 300 400 500 600 700 Distance [m]

Figure 5.2: Measurement positions.

Figure 5.2 shows where the measurements were taken. It started at 33V05647616497514 and ended at 33V05646506496863, giving a total distance of 660 m with an average of 1.11 m step size.

(39)

26 Chapter 5. Results

Figure 5.3: All RSSI measurements.

Table 5.2: Unsuccessfully received packets Measurement No Distance Lost packets

31 260 m 2 35 366.8 m 2 38 446.8 2 40 500.2 m 68 41 553.6 m 64 42 607 m 22 43 660.4 m 22

Figure 5.3 shows all RSSI measurements taken. At every distance, 240 packets were taken, 120 from both units with 0.5 s delay. The amount of unsuccessfully received packets are presented in Table 5.2. Unsuccessfully received packets always come in pairs, since it just takes one to break the connection for both. The distances that are not shown in Table 5.2 did not have any unsuccessfully received packets. Take notice in the increase of unsuccessfully received packets from 500 m and further. The analysis of measurements will therefore be restricted to only use measurements from distances shorter than 500 m.

(40)

5.2. Distance model 27 1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3 Log-distance [log(m)] -120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 RSSI [dBm] Regression Regression RMSE

Regression RMSE + GPSRMSE

Figure 5.4: Log-distance path loss model.

PR(d) = −42.03 − 3.815 · 10 · log  d 13.01  (5.1) PR(d) = −42.03 − 3.815 · 10 · log  d 13.01  ± 1.837 (5.2) PR(d) = −42.03 − 3.815 · 10 · log d ± 9.5331 13.01  ± 1.837 (5.3)

(5.1) shows the specific log-distance RSSI model, also presented in Figure 5.4. It has been made by a regression analysis in MATLAB’s Curve fit tool, by using the first order polynomial fit. The model has an RMSE of 1.837 and its margins are represented by the peach dotted lines (5.2). The teal dotted lines (5.3) represents the summed margins of both RMSE and the RMSEGPS.

(41)

28 Chapter 5. Results -110 -100 -90 -80 -70 -60 -50 -40 -30 RSSI [dBm] 0 100 200 300 400 500 600 700 Distance [m] Regression Regression RMSE

Regression RMSE + GPSRMSE

Figure 5.5: Non log-distance model.

d(RSSI) = 13.01 · 10(RSSI−42.03−3.815·10 ) (5.4)

d(RSSI) = 13.01 · 10(RSSI−42.03±1.837−3.815·10 ) (5.5)

d(RSSI) = 13.01 · 10(RSSI−42.03±1.837−3.815·10 ) ± 9.5331 (5.6)

(5.4) shows the final distance model, also presented in Figure 5.5. It is the non-log version of (5.1) solved for d. As for the log-distance RSSI model, the peach dotted lines (5.5) represent the model’s RMSE margins and the teal dotted lines (5.6) represent the combined margins of RMSE and RMSEGPS. (5.4) is the model used as estimated distance

for the wrapped NPDF technique, while (5.6) is used as the annuli’s inner and outer radii.

5.2.1

Discussion

The distance model has similar results for the characteristics and η as previous results in literature [2]. But the range for CC1310 is shorter than expected, compared to Texas Instruments distance estimations with same settings and antenna orientation [9]. The estimated distance could possibly be more precise with longer range. However, the drastic increase of unsuccessfully received packets from 500 m and further is probably due to a small hill in front of that area. Since the nodes are only located at 90 cm height above

(42)

5.3. Trilateration tests 29

ground, small height variations in the path environment can cause NLOS.

As mentioned in Section 4.2, it was not managed to set the transmit power to maximum for the network nodes. Even though the difference between the maximum and the current transmit power is 1 dBm, it is possible that it would slightly improve the distance model. higher transmit power would improve the distance model.

5.3

Trilateration tests

This section presents all results for the trilateration tests. Each test has a figure of the wrapped NPDF technique with the anchor nodes’ and unknown node’s positions and the estimated position marked in it. Each test figure also have the intersection of annuli in it, to easier visualize the concept and to also have as reference for evaluating the wrapped NPDF’s behavior. Table 5.4 - Table 5.19 presents the tests’ annuli radii. This section ends with Table 5.20, which presents all the coordinates, estimated distances as well as the errors, followed by a discussion of the these results.

The wrapped NPDF equation used for the tests is presented in (5.7). Its estimated value ˆ

µ is calculated with (5.4). Its standard deviation ˆσ is equal to 10RM SE = 101.837 = 68.71,

since the function is no longer in log-form. Z(x, y) =√ 1 2π · 68.712e −( √ (x−a)2+(y−b)2− ˆµ)2 2·68.712 (5.7)

The input parameters that were used in the sum of wrapped NPDFs algorithm is shown in Table 5.3. Note that the x and y start values are the distance from the MGRS zone’s origin in meters.

Table 5.3: Input parameters for the sum of wrapped NPDFs algorithm Start value for x 64100 m

Start value for y 96700 m

Length of x 1000 m

Length of y 1000 m

Amount of steps for x 300 Amount of steps for y 300

(43)

30 Chapter 5. Results

Figure 5.6: Wrapped NPDF and annuli trilateration test 1 result.

Table 5.4: Test 1 radii for anchor annuli Radius Anchor 1 Anchor 2 Anchor 3 Inner 265.91 m 264.12 m 80.33 m Outer 352.31 m 350.08 m 120.66 m

As can be seen in Figure 5.6, test 1 represents an ideal case. Estimated distances of Anchor 1 and 2 can be approximated to be the same and are longer than the estimated distance of Anchor 3, making all annuli have a common intersection. The wrapped NPDF technique works as intended and has a position error of 21.07 m.

(44)

5.3. Trilateration tests 31

Figure 5.7: Wrapped NPDF and annuli trilateration test 2 result.

Table 5.5: Test 2 radii for anchor annuli Radius Anchor 1 Anchor 2 Anchor 3 Inner 345.07 m 384.72 m 179.59 m Outer 451.13 m 500.62 m 244.57 m

(45)

32 Chapter 5. Results

Figure 5.8: Wrapped NPDF and annuli trilateration test 3 result.

Table 5.6: Test 3 radii for anchor annuli Radius Anchor 1 Anchor 2 Anchor 3 Inner 241.35 m 80.73 m 143.43 m Outer 321.66 m 121.17 m 199.44 m

Figure 5.8 shows that test 3 is an ideal case, with a position error of 60.91 m. Take notice in the placement of the Unknown node which in this case is positioned at the side of the Anchor triangle.

(46)

5.3. Trilateration tests 33

Figure 5.9: Wrapped NPDF and annuli trilateration test 4 result.

Table 5.7: Test 4 radii for anchor annuli Radius Anchor 1 Anchor 2 Anchor 3 Inner 228.47 m 180.83 m 288.21 m Outer 305.58 m 246.12 m 380.15 m

The result of test 4 indicates an ideal case with all annuli having a common intersection, according to Figure 5.9. However, Anchor 3 has too large estimated distance, which makes the annuli intersect at wrong location. The position error is 413.79 m.

(47)

34 Chapter 5. Results

Figure 5.10: Wrapped NPDF and annuli trilateration test 5 result.

Table 5.8: Test 5 radii for anchor annuli Radius Anchor 1 Anchor 2 Anchor 3 Inner 433.02 m 133.71 m 593.09 m Outer 560.91 m 187.30 m 760.72 m

As can be seen in Figure 5.10, both Anchor 1 and 3 have too large estimated distances and there is no common intersection. The estimated position error is 523.45 m. Take notice in both test 4 and test 5 having the largest and second largest error of the tests.

(48)

5.3. Trilateration tests 35

Figure 5.11: Wrapped NPDF and annuli trilateration test 6 result.

Table 5.9: Test 6 radii for anchor annuli Radius Anchor 1 Anchor 2 Anchor 3 Inner 332.47 m 173.07 m 624.03 m Outer 435.41 m 236.43 m 799.34 m

Test 6 is the first test when the sum of wrapped NPDFs technique does not work as intended, as can be seen in Figure 5.11. Anchor 3 has too large estimated distance, which gives the result of no common intersection. However, Anchor 1 and 2 have a common intersection close to the Unknown node but there are multiple positions with equal sum. The position error is 226,99 m.

(49)

36 Chapter 5. Results

Figure 5.12: Wrapped NPDF and annuli trilateration test 7 result.

Table 5.10: Test 7 radii for anchor annuli Radius Anchor 1 Anchor 2 Anchor 3 Inner 108.99 m 88.45 m 322.32 m Outer 156.44 m 130.80 m 422.73 m

As Figure 5.12 shows, test 7 has no common intersection, but the annuli are close, which implies a small position error of 24.60 m.

(50)

5.3. Trilateration tests 37

Figure 5.13: Wrapped NPDF and annuli trilateration test 8 result.

Table 5.11: Test 8 radii for anchor annuli Radius Anchor 1 Anchor 2 Anchor 3 Inner 139.05 m 139.58 m 619.62 m Outer 193.97 m 194.62 m 793.84 m

Test 8 has no common intersection due to too large estimated distance of Anchor 3. However, as can be seen in Figure 5.13, Anchor 1 and 2 do have two common intersections with similar characteristics. This is a similar case to Test 6, as the sum of wrapped NPDFs algorithm could have chosen the other intersection area. The position error is 62.31 m.

(51)

38 Chapter 5. Results

Figure 5.14: Wrapped NPDF and annuli trilateration test 9 result.

Table 5.12: Test 9 radii for anchor annuli Radius Anchor 1 Anchor 2 Anchor 3 Inner 70.80 m 241.22 m 451.63 m Outer 108.77 m 321.51 m 584.14 m

Test 9 has the best result of all tests, a position error of 9.77 m. Again, this is a case where there is a risk of the sum of wrapped NPDFs technique to not work as intended, since Anchor 2 intersect with both Anchor 1 and Anchor 3. The test result is shown in Figure 5.14.

(52)

5.3. Trilateration tests 39

Figure 5.15: Wrapped NPDF and annuli trilateration test 10 result.

Table 5.13: Test 10 radii for anchor annuli Radius Anchor 1 Anchor 2 Anchor 3 Inner 196.64 m 338.54 m 355.55 m Outer 265.86 m 442.98 m 464.21 m

As can be seen in Figure 5.15, test 10 has a common intersection and hence is an ideal case. The position error is 40.99 m.

(53)

40 Chapter 5. Results

Figure 5.16: Wrapped NPDF and annuli trilateration test 11 result.

Table 5.14: Test 11 radii for anchor annuli Radius Anchor 1 Anchor 2 Anchor 3 Inner 103.77 m 314.09 m 166.68 m Outer 149.92 m 412.46 m 228.45 m

Test 11 has a common intersection, according to Figure 5.16 and hence is an ideal case. The position error is 68.31 m.

(54)

5.3. Trilateration tests 41

Figure 5.17: Wrapped NPDF and annuli trilateration test 12 result.

Table 5.15: Test 12 radii for anchor annuli Radius Anchor 1 Anchor 2 Anchor 3 Inner 276.19 m 578.61 m 272.21 m Outer 365.15 m 742.65 m 360.17 m

As can be seen in Figure 5.17, test 12 does not have a common intersection and Anchor 1 and 3 annuli have double intersections. This time, one of the intersection points is close to the annulus of Anchor 2, whose wrapped NPDF contribute to that intersection enough to make it the most probable position. The position error is 108.13 m.

(55)

42 Chapter 5. Results

Figure 5.18: Wrapped NPDF and annuli trilateration test 13 result.

Table 5.16: Test 13 radii for anchor annuli Radius Anchor 1 Anchor 2 Anchor 3 Inner 53.70 m 158.31 m 108.22 m Outer 87.42 m 218.00 m 155.48 m

Test 13 is an ideal case, with a common intersection. This is the first test with the Unknown node inside the Anchor triangle. the position error is 50.30 m. The test result can be seen in Figure 5.18.

(56)

5.3. Trilateration tests 43

Figure 5.19: Wrapped NPDF and annuli trilateration test 14 result.

Table 5.17: Test 14 radii for anchor annuli Radius Anchor 1 Anchor 2 Anchor 3 Inner 130.44 m 78.14 m 112.24 m Outer 183.22 m 117.94 m 160.50 m

Test 14 has a common intersection, as seen in Figure 5.19. The position error is 22.53 m.

(57)

44 Chapter 5. Results

Figure 5.20: Wrapped NPDF and annuli trilateration test 15 result.

Table 5.18: Test 15 radii for anchor annuli Radius Anchor 1 Anchor 2 Anchor 3 Inner 64.70 m 106.35 m 206.06 m Outer 101.15 m 153.14 m 277.61 m

Test 15 has a common intersection, as can be seen in Figure 5.20. However, the intersection point is far from the actual position of the unknown node. The position error is 89.91 m.

(58)

5.3. Trilateration tests 45

Figure 5.21: Wrapped NPDF and annuli trilateration test 16 result.

Table 5.19: Test 16 radii for anchor annuli Radius Anchor 1 Anchor 2 Anchor 3 Inner 63.38 m 112.24 m 134.51 m Outer 99.50 m 160.50 m 188.29 m

Test 16 has a common intersection, as can be seen in Figure 5.21. The position error is 50.72 m.

(59)

46 Chapter 5. Results Table 5.20: Sum of wrapped NPDFs algorithm test summary

Node type MGRS Est. MGRS Est. dist. 1 Est. dist. 2 Est. dist. 3 ∆ Position U. Node, Test 1 33VWE6480697306 33VWE6482697299 307.22 m 305.22 m 99.88 m 21.07 m U. Node, Test 2 33VWE6488097374 33VWE6487397419 395.67 m 439.96 m 210.79 m 45.67 m U. Node, Test 3 33VWE6478297121 33VWE6475297068 279.78 m 100.33 m 170.39 m 60.91 m U. Node, Test 4 33VWE6486997095 33VWE6447196981 265.39 m 212.17 m 332.13 m 413.79 m U. Node, Test 5 33VWE6465096959 33VWE6412796944 493.92 m 159.53 m 672.77 m 523.45 m U. Node, Test 6 33VWE6464996862 33VWE6483696991 381.59 m 203.50 m 707.33 m 226.99 m U. Node, Test 7 33VWE6450297089 33VWE6450597065 131.91 m 108.96 m 370.25 m 24.60 m U. Node, Test 8 33VWE6442597035 33VWE6447897068 165.49 m 166.07 m 702.41 m 62.31 m U. Node, Test 9 33VWE6444597263 33VWE6445597265 89.24 m 279.65 m 514.72 m 9.77 m U. Node, Test 10 33VWE6434997298 33VWE6431797272 229.83 m 388.37 m 407.37 m 40.99 m U. Node, Test 11 33VWE6461697331 33VWE6456297372 126.06 m 361.05 m 196.36 m 68.31 m U. Node, Test 12 33VWE6460797428 33VWE6460897536 318.71 m 656.59 m 314.26 m 108.13 m U. Node, Test 13 33VWE6463797206 33VWE6460297242 70.13 m 187.01 m 131.06 m 50.30 m U. Node, Test 14 33VWE6466297164 33VWE6466297141 155.88 m 97.45 m 135.54 m 22.53 m U. Node, Test 15 33VWE6461397161 33VWE6452897131 82.42 m 128.95 m 240.36 m 89.91 m U. Node, Test 16 33VWE6463997176 33VWE6458897175 80.94 m 135.54 m 160.41 m 50.72 m Anchor 1 33VWE6453497223 Anchor 2 33VWE6464497059 Anchor 3 33VWE6473097243 Mean = 113.72 m Median = 55.81 m

5.3.1

Discussion

As can be seen in Figures 5.6-5.21, the trilateration field tests gave various results. Ob-structions, like small hills, did affect each anchor differently in many cases. This cause in some tests, like Figure 5.10 and Figure 5.14, the annuli to not have a common intersection and therefore multiple equally large sums of NPDFs. The idea was to use the wrapped NPDF technique to make a continuous weight for solving this problem. However, the RMSE for the NPDF was small which made the weight quickly go down close to zero. In those cases the non-intersected annulus was far away, it did not give much contribution to the summed weight, like Figure 5.11. In other cases when the non-intersected annulus was close, it did contribute and it worked as intended to solve that kind of problem, like Figure 5.12. The tests of unknown nodes placed inside the anchor triangle did all have a common intersection and the position error was never very large. However, the position error was similar to the tests with unknown nodes placed outside the anchor triangle, for the cases where there was a common intersection. The mean is about twice the median which is explained especially by the large position errors of Test 4 and 5. Even if some of the problems caused by obstructions could be solved with further development, it is uncertain if that would help if the nodes were placed in a terrain with a lot of obstacles.

(60)

6

Conclusion

This chapter ends the thesis report with a summary of what has been done as well as a conclusion of what has been accomplished in this thesis. It also points out things that can be done for future improvements.

6.1

Thesis work summary

The task of this thesis was to investigate how good estimations that can be made of a node’s physical position in a long range WSN, based on RSSI trilateration. To accomplish this task, a custom network and an empirical distance model have been created, as well as a technique for weighting multiple distance estimations, using wrapped NPDFs. The developed localization system was tested on an open area of one square kilometer, to estimate a node’s position on various locations. The localization system was evaluated by analyzing the mean and median error of estimated positions.

The results show that the developed distance model for estimating distance, using only RSSI as input parameter, works in environments implying a LOS path. However, some results also show that, obstructions like small hills, can affect the signal strength of radio packets dramatically, leading to faulty distance estimations and packet losses. Hence, it can be concluded that: using RSSI to estimate distance is dependent on LOS.

The conclusion in the paragraph above, leads to the same conclusion about the localiza-tion system’s posilocaliza-tion estimalocaliza-tion, as the localizalocaliza-tion system uses the distance estimalocaliza-tion model. However, in some of the test results, the developed localization algorithm indi-rectly corrects distance estimation errors.

6.2

Future Work

The wrapped NPDF technique do solve some of the wanted problems. However, it do not work as intended when the non-intersecting annuli is too far away from any of the other two intersections. This could be solved by complementary algorithms that can determine which of the non-common intersection maxima that is closest to the non-intersecting annuli, to pick that maxima.

When developing a complete localization system, the system’s location is likely to not be known. This can be a problem for the distance estimation model which could benefit from an adaptive model. An adaptive model could be implemented by sending RSSI measurement messages to the other anchors, before the localization process is started.

(61)

48 Chapter 6. Conclusion Since the anchors know their position from GPS, the true distance can be compared with the RSSI values, to make adjustments in the model.

Since the CC1310 LAUNCHXL boards comes with a monopole PCB antenna, it could be beneficial to attach an external omni-directional antenna to the board’s SMA connection.

(62)

Bibliography

[1] Texas Instruments, ”SimpleLink-EasyLink”. http://processors.wiki.ti.com/index.php/SimpleLink-EasyLink

[2] David M. Pozar, Microwave and RF Design of Wireless Systems. John Wiley & Sons, 2000.

[3] Simon Saunders and Alejandro Arag´on-Zavala. Antennas and Propagation for Wireless Communication Systems. John Wiley & Sons, 2nd Edition, 2007, pages: 37-40, 51-52. [4] Texas Instrumets, Design note DN024. Version: SWRA227, Feb 2013,

http://www.ti.com/lit/an/swra227e/swra227e.pdf

[5] Texas Instruments, ”CC1310 SimpleLink™ Ultra-Low-Power Sub-1 GHz Wireless MCU”. CC1310 datasheet, Sept. 2015 [Revised Oct. 2016].

[6] IBM, Coordinate conversions made easy. August 28, 2007, https://www.ibm.com/developerworks/library/j-coordconvert/index.html

[7] Kamilo Feher. Wireless Digital Communications. Prentice Hall PTR, 1995, pages: 66-70.

[8] Weiss M.A. Data Structures and Algorithm Analysis in C++. Pearson, 4th Edition, 2014, pages: 69-70.

[9] Texas Instruments, Range Estimation for Indoor and Outdoor Rev 1.17, https://e2e.ti.com/cfs-file/

key/communityserver-discussions-components-files/538/Range-Estimation-for-Indoor-and-Outdoor-Rev1 5F00 17.xlsm

References

Related documents

46 Konkreta exempel skulle kunna vara främjandeinsatser för affärsänglar/affärsängelnätverk, skapa arenor där aktörer från utbuds- och efterfrågesidan kan mötas eller

För att uppskatta den totala effekten av reformerna måste dock hänsyn tas till såväl samt- liga priseffekter som sammansättningseffekter, till följd av ökad försäljningsandel

The increasing availability of data and attention to services has increased the understanding of the contribution of services to innovation and productivity in

Generella styrmedel kan ha varit mindre verksamma än man har trott De generella styrmedlen, till skillnad från de specifika styrmedlen, har kommit att användas i större

Parallellmarknader innebär dock inte en drivkraft för en grön omställning Ökad andel direktförsäljning räddar många lokala producenter och kan tyckas utgöra en drivkraft

Närmare 90 procent av de statliga medlen (intäkter och utgifter) för näringslivets klimatomställning går till generella styrmedel, det vill säga styrmedel som påverkar

I dag uppgår denna del av befolkningen till knappt 4 200 personer och år 2030 beräknas det finnas drygt 4 800 personer i Gällivare kommun som är 65 år eller äldre i

Detta projekt utvecklar policymixen för strategin Smart industri (Näringsdepartementet, 2016a). En av anledningarna till en stark avgränsning är att analysen bygger på djupa