• No results found

Indoor positioning system using ultrasound combined with multilateration

N/A
N/A
Protected

Academic year: 2021

Share "Indoor positioning system using ultrasound combined with multilateration"

Copied!
100
0
0

Loading.... (view fulltext now)

Full text

(1)

Teknik och samhälle Datavetenskap

Bachelor’s thesis 15 credits, basic level

Indoor positioning system using

ultrasound combined with multilateration

Inomhuspositioneringssystem som använder

ultraljud i kombination med multilateration

Jonas Eiselt

Danial Mahmoud

Degree: Bachelor of Science in Engineering Area: Computer Science

Final seminar date: 2018-08-21

Supervisor: Arezoo Sarkheyli-Hägele Examiner: Gion Koch Svedberg, Majid Ashouri Mousaabadi

(2)

Abstract

During the past decade, indoor positioning has gained more popularity and has become a focus of research and development as it provides practical possibilities to track and navigate objects and people in indoor environments. There is no overall solution for indoor positioning based on a single technology like the solution for outdoor positioning with its satellite-based global positioning system. Many indoor positioning technologies today face many challenges such as low positioning accuracy, expensive and large hardware. This thesis describes how a simple and cost-effective solution, that addresses the problem of accuracy and space cost with regards to hardware being used, was developed through an iterative research methodology. Our solution is an ultrasound-based passive receiver-transmitter system that combines multilateration as a positioning technique and time difference of arrival (TDOA) as a measuring principle. This combination is used to calculate a 3D position within a 4×2×2 m test area with an overall accuracy of 16 cm within a 95% confidence interval. We registered accurate TDOA values with a comparator circuit that acts as an amplitude trigger. This approach was much more simple than that of other related works which used sampling to process incoming signals from the transmitters. Keywords: indoor positioning, ultrasound, multilateration, time difference of arrival (TD-OA), time division multiple access (TDMA), comparator

(3)

Sammanfattning

Under det senaste decenniet har inomhuspositionering fått en ökad popularitet och stått i fokus för forskning och utveckling, eftersom det ger praktiska möjligheter till att spåra och navigera objekt och människor i inomhusmiljöer. Det finns ingen global lösning för inom-huspositionering baserat på en enstaka teknologi såsom det gör för utominom-huspositionering med sin satellitbaserade globala positioneringssystem. Många inomhusteknologier står inför många utmaningar såsom låg positioneringsnoggrannhet samt dyr och stor hårdvara. Den här uppsatsen beskriver hur en simpel och kostnadseffektiv lösning, som addresserar pro-blemen med noggrannheten och hårdvarukostnaden, genom en iterativ forskningsmetod, utvecklades. Vår lösning är ett ultraljudsbaserat passivt sändare-mottagare system som kombinerar multilateration som positioneringsteknik och tidsskillnad av ankomst (TDOA) som mätprincip för att beräkna en 3D-position inuti en 4×2×2 m testyta med en övergri-pande noggrannhet på 16 cm inom ett 95% konfidensintervall. Vi registrerade noggranna TDOA-värden med en komparatorkrets som fungerade som en amplitud-trigger. Det här tillvägagångssättet var mycket enklare än vad andra relaterade arbeten använde sig av, vilket var sampling för att bearbeta inkommande signaler från sändarna.

(4)

Acknowledgements

We want to direct our sincere gratitude to Bo Nyman and Philip Dahl at Svep Design Center AB for giving us the wonderful opportunity to work at such a vibrant company. We are truly grateful for all the experience we have gained.

We would also like to thank our supervisor Arezoo Sarkheyli-Hägele, our teacher Magnus Krampell, and our examiners Gion Koch Svedberg and Majid Ashouri Mousaabadi for the valuable feedback given on the report.

(5)
(6)

Contents

1 Introduction 1 1.1 Background . . . 1 1.2 Research aim . . . 1 1.3 Problem statement . . . 2 1.4 Limitations . . . 3 1.5 Outline . . . 3 2 Theory 4 2.1 Ultrasound . . . 4 2.2 Positioning techniques . . . 5

2.2.1 Trilateration based on TOA . . . 5

2.2.2 Multilateration based on TDOA . . . 7

2.3 Channel access methods . . . 17

3 Related work 19 3.1 Ens et al. – Unsynchronized Ultrasound System for TDOA Localization . . 19

3.2 Filonenko et al. – Indoor Positioning for Smartphones Using Asynchronous Ultrasound Trilateration . . . 19

3.3 Leng et al. – A passive method of positioning indoor target based on TDOA 20 3.4 Díaz et al. – Ultrasonic indoor positioning for smart environments: a mobile application . . . 20

4 Method 22 5 Implementation 24 5.1 Construct a conceptual framework . . . 24

5.1.1 User scenario . . . 24

5.1.2 Problem tree . . . 24

5.2 Develop a system architecture . . . 26

5.2.1 Requirement specification . . . 26

5.2.2 System overview . . . 27

5.3 Analyze and design the system . . . 29

5.3.1 Active vs passive system . . . 29

5.3.2 Receiver (prototype) . . . 29

5.3.3 Transmitter system . . . 41

5.3.4 User client . . . 49

5.4 Build the (prototype) system . . . 50

5.4.1 Physical overview . . . 50

5.4.2 Transmitter system . . . 50

5.4.3 Receiver (prototype) . . . 54

5.4.4 User client . . . 62

(7)

7 Discussion 69

7.1 Analysis of result . . . 69

7.2 Related work . . . 71

7.3 Evaluation of methodology . . . 71

7.4 Ethics . . . 72

8 Conclusion and future work 73 8.1 Answering the research question . . . 73

8.2 Contribution of this thesis . . . 74

8.3 Future work . . . 74 References 76 A System requirements 79 B Test results 80 C Analog filter 81 D Transmitter measurements 87 E Accuracy 88

F Sound pressure level 91

(8)

1

Introduction

This chapter gives a brief overview of the importance and practical use of indoor positioning systems. This chapter also presents this thesis’ research aim and research questions, its limitations, and a brief outline of its structure.

1.1 Background

Finding effective indoor positioning technologies has become an urgent and important matter today. Many human activities in indoor environments could derive great benefit from techniques for localization and navigation. For instance, it could help with security and surveillance indoors. There is no overall solution for indoor positioning based on a single technology, such as that provided outdoors by satellite-based navigation [1].

Various indoor positioning technologies have been developed over the past few decades. With many user requirements being crucial in the design of any indoor positioning system, these technologies face many challenges [2]. Important user requirements in many positio-ning systems are positiopositio-ning accuracy and cost-effectiveness with regards to the size of the hardware being used. These two performance parameters of an indoor positioning system can be key drivers for many applications [2].

Technologies that make use of mechanical (sound) waves are increasing. Ultrasound is gaining popularity as a technical approach in indoor positioning systems because of its ability to provide high positioning accuracy in centimeter range [2]. Other systems that use laser-, camera-, or radio-based technology increase the amount of hardware, while the use of ultrasound would reduce it significantly. Ultrasound-based systems, together with common positioning techniques such as lateration, make use of measuring principles, such as Time of arrival and Time difference of arrival to mathematically compute a position. But like all approaches, ultrasound has its drawbacks. It suffers from attenuation of the signal in air as well as having a poor obstacle penetration. This problem could be ame-liorated by having a clear line-of-sight and ultrasonic transmitters with a wide and long beam range, which are nowadays cheap and easily attainable.

The aim of this thesis is to find a simple and effective solution to the use of ultrasound in indoor positioning systems. This can be achieved with the right positioning technique and measuring principle combined together with a precise signal processing approach.

Taking into account the drawbacks facing ultrasound, this thesis illustrates a hypothetical application in which ultrasound can prove to be a suitable technical solution for position finding. The example is a user scenario in which a drone navigates its way through the hallways of a building by using the output data from our prototype. The drone could be used for surveillance or for other security reasons.

1.2 Research aim

The aim of this thesis is to provide a simple and cost-effective solution for ultrasound-based indoor positioning systems that fulfills the two following performance parameters: accuracy and cost-effectiveness with regards to the hardware being used, especially on the mobile station.

(9)

We came in contact with the Swedish consulting firm Svep Design Center AB, that was in search of a prototype for indoor positioning system. Svep has purchased an indoor posi-tioning system from Marvelmind Robotics [3]. We signed a non-disclosure agreement with the company and are therefore not allowed to reveal Svep’s intention with the system and with our results. The system consists of an active mobile station (MS) which is tracked using four synchronized base stations consisting of ultrasonic receivers coupled with radio modules. The MS actively transmits a radio signal along with ultrasound signals to the statically fixed base stations which receive the radio signal instantaneously. Since the ult-rasound signals travel much slower, the base stations can, once the signals are received, register their time of arrival.

The size of the hardware on the MS was considered to be too big. The desired design change would be to invert the system’s structure: if the focus of receiving ultrasonic pulses and calculating position of the MS was shifted to the MS, its size could be made significantly smaller, resulting in a more cost-effective mobile station. Its current size is 55×55×65 mm. The reason its size could become smaller is because the amount of hardware on it can be reduced through this design change. At current state, the MS has five ultrasonic sensors and a radio module on it. If it is turned into a receiver then this hardware is replaced with only a microprocessor and a device that can receive sound. Svep desired that the following requirements were to be fulfilled:

R1: The mobile station should be receiving and not transmitting ultrasound.

R2: The mobile station should neither transmit to or receive a radio signal from the transmitter system.

R3: The mobile station should be able to identify which signal has arrived from which of the four different transmitters.

These requirements gave us insight into how we could formulate our own research aim (which was stated above) because we derived ideas from them concerning how we could design our own positioning system.

1.3 Problem statement

Among the most common problems facing indoor positioning systems are the accuracy and the cost-effectiveness with regards to the size of the hardware of the systems. These two parameters are important user requirements that depend on the positioning technique and measuring principle that the positioning system applies. In general, not many indoor positioning systems today put focus on giving an effective combination of these two para-meters for the end user. That is, they do not strike a proper balance between the amount of hardware they carry and the level of accuracy that they give. For example, camera systems are able to provide mm-level accuracy. However, these systems are in most cases very expensive due to the hardware costs that can amount to several thousand USD [1]. This is further illustrated in appendix G.

Research questions

Given the theoretical user scenario of an indoor self-tracking drone, our main research question is as follows: how can we design an ultrasound-based indoor positioning system

(10)

that gives a good positioning accuracy and is cost-effective with regards to the size of the hardware it uses?

To help us solve our research question we will attempt to answer the following sub-questions as well:

RQ1: Which distance-based positioning technique together with its associated measuring principle can be used and why?

RQ2: What is the overall positioning accuracy of the system?

RQ3: How is the cost-effectiveness of the system compared with that of Svep’s purchased Marvelmind system?

Positioning techniques based on distance measurements refer to lateration-techniques [1] which are the only form of techniques that are based solely on distance measurements and are hence used in ultrasound-based systems.

The reason we compare the cost-effectiveness of our system with that of Svep’s is because the hardware that their system consists of is very typical for ultrasound-based system. It can hence be used as a sort of benchmark for comparison.

1.4 Limitations

This thesis is limited to the transmission of ultrasound and a passive prototype that needs line-of-sight for the propagation of the ultrasonic waves between the transmitters and the receiver. This thesis’ user scenario, where a flying drone navigates itself down a hallway, is used when discussing the different design choices for the design of the passive prototype. Due to this scenario being a theoretical one, the testing with an actual drone was not possible and it is therefore subject of future work.

1.5 Outline

Chapter 1 introduces indoor positioning and some of the challenges facing it. Chapter 2 explains the theory behind important concepts involved in the study. The chapter also introduces some background that is necessary to understand different technologies and methods which are mentioned later on. Chapter 3 presents related works that discuss various important approaches and challenges to the use of ultrasound in indoor positio-ning systems. Chapter 4 presents the thesis’ research methodology for solving the research questions formulated in chapter 1. Chapter 5 presents, among other things, the solution architecture and its implementation based on the selected methodology. Chapter 6 presents the final results from the last step of the chosen research methodology. In chapter 7 we discuss and evaluate our solution and results, and also discuss some ethical aspects of our system. At last, in chapter 8 we attempt to answer our research questions based on the evaluation and we conclude the thesis with some proposals on further development.

(11)

2

Theory

In this part we present and explain how ultrasound is used in indoor positioning systems today along with fundamental techniques and measuring principles commonly used in ultrasound-based indoor positioning systems. There are concepts presented here that are important for understanding the content of later chapters.

2.1 Ultrasound

In this section we describe the use of ultrasound as an approach to indoor positioning. We also present certain challenges and drawbacks of ultrasound-based systems.

Sound is a wave that propagates through some medium, e.g. air. Sound has two attributes: amplitude and frequency. The amplitude, which is related to the intensity of the sound, is commonly measured in decibels (dB). The human ear can perceive frequencies from 20 Hz to 20 kHz [4]. Sound with frequency components above 20 kHz is called ultrasound and this type of sound is utilized in this thesis. Sound, including ultrasound, travels with a velocity of 343.6 m/s in air when the temperature is 20°C [5].

Positioning, using sound waves, can be done by locating mobile stations attached to objects or human users, based on distance measurements to base stations. The base stations, which usually are mounted on walls or ceilings, are immovable whereof the name of this device. Passive vs active systems

There are two system architectures for ultrasound-based systems: passive and active. In a passive system several transmitters are fixed at known locations. They emit ultrasound to one or more mobile passive devices which receives the signal. The mobile devices are passive because they only receive signals and do not send anything to the transmitters. The position can be computed locally on board the device. In an active device system, the architecture is inverted. The mobile device actively transmit signals to fixed receivers deployed at known locations.

To make a receiver-transmitter system functional, the coordinates of the base stations (i.e. transmitters in a passive system, receivers in an active system) need to be known in advance. Because the accuracy of the station coordinates should be at least as good as the ultrasound positioning system itself, time consuming manual positioning methods are required.

Challenges of ultrasound-based systems

There are some drawbacks that exist with ultrasound-based systems. These challenges are due to signal attenuation in air and multipath propagation. Attenuation occurs due to the decay of signal strength due to traveled distance [6].

According to Yazici et al. multipath is a problem which should not be taken lightly [7]. The ultrasound signals do not leave the transmitting antenna in just one direction; the signals leave the transmitting antenna in many directions. This means that the signals may certainly not arrive at the receiving antenna at the same time. Along the transmission path there may be objects, such as walls, that make a signal take a different and a longer path [6]. What follows is that copies of the transmitted signal can be created due to

(12)

multipath. Another problem is the near-far problem: the transmitting signals that arrive at the receiver have such different signal power that the weaker signal cannot be encoded [1].

2.2 Positioning techniques

This thesis has encountered a couple of commonly used positioning techniques used in ultrasound-based systems during its pre-study. The most notable among these are trilate-ration and multilatetrilate-ration. A positioning technique could be described as a mathematical approach for finding a mobile station’s position relative to a number of other base stations, and it is always combined with a measuring principle.

The techniques below are lateration-based techniques. Concerning the meaning of the term lateration, the word seemingly does not appear alone in any positioning literature, and hence has no official definition. Nonetheless it is taken to mean positioning techniques that are range-based, i.e. based on distance measurements [1].

2.2.1 Trilateration based on TOA

Trilateration is a positioning technique where the distance between a receiver and a trans-mitter is known. We will look at trilateration in a passive device system. The exact same principles apply to an active system only with the transmitter-receiver structure inverted. To know the distance, one needs to know when each transmitter starts transmitting a signal and when the signal is received by the receiver, that is, the Time of arrival, or just TOA, needs to be known. TOA is basically measuring the absolute travel time it takes for an ultrasound signal sent by the transmitter to arrive at the receiver. After obtaining this time, the distance between the two devices can be calculated by multiplying the known speed of the signal with the time of arrival.

The receiver needs to know exactly when the transmitters starts sending ultrasound pulses, therefore TOA relies on precise synchronization of transmitter and receiver clocks, as even one nanosecond error in synchronization translates into a distance error of 30 cm if radio frequency signals are used. This synchronization is done with radio signals: each base station transmits a radio wave at the same time it transmits ultrasound. [1] Since radio waves propagate by the speed of light it travels much faster than sound, which tells the receiver that the transmission of an ultrasonic signal has started. The receiver can thus calculate the time it took for the ultrasound to arrive (i.e. time of arrival) using for instance a timer since it knows the time of flight (i.e. the start time of the signal transmission). Since the transmitters need to emit a signal at the same time they need to be synchronized in time. This can be done through for example radio modules, where for instance one transmitter sends a radio signal to the rest thus enabling them all to start an individual timer simultaneously.

To know the position of a mobile station in a 2D space, one needs to know the distances between a mobile station and three differently placed base stations. If only one base station (e.g. T1 as seen in figure 1) is used, the mobile station (R) gets an infinite number of solutions. R could be anywhere on the circle’s border, such as (2,0), (0,2), and (0,−2). When adding one base station (T2) one drastically decreases the number of solutions for R

(13)

to only two solutions: (1.5,1.5) and (1.5,−1.5). These solutions are given by the intersections of the two differently formed circles. Adding another base station (T3) returns one solution (1.5,1.5).

Figure 1: Trilateration, where the distance between mobile station (R) and each transmitter (T1–T3) is known

Figure 1 illustrates an ideal situation where the circles intersect in one point, R. Normally, especially in systems that utilize ultrasound, this ideal case never occurs when trying to find the intersection due to various problems, such as multipath (explained in 2.1 Ultrasound). Since it is possible that the circles do not intersect in a unique point, due to among other things inaccurate TOA registration, there are mathematical methods that use a numeric approach (see 2.2.2 Gauss-Newton method) to decimate the error caused by the gap, as seen in figure 2.

(14)

Figure 2: A trilateration case where the circles do not intersect in one point which gives a slight positioning error

Finding the position of a mobile station in a 3D space requires a fourth base station. Geometrically, one has to imagine a sphere, instead of a circle, in order to find the position of a mobile station.

2.2.2 Multilateration based on TDOA

Multilateration is a positioning technique where the distance between a receiver and a transmitter is not known. In other words, one does not know when a transmitter starts its transmission. Instead, the time of arrival of one transmitter relative to another transmitter is known, that is, the time differences of arrival, or just TDOA, is known.

Taking time differences of TOA measurements has the advantage that the receiver and transmitters do not need to be synchronized once a signal transmission of ultrasound starts. In contrast to TOA, the receiver does not need to know the absolute time at which a pulse was transmitted – only the time difference of arrival from synchronized transmitters is needed.

Finding the intersection between several circles in a 2D environment (or spheres if 3D) is something that is impossible to do in a multilateration-based indoor positioning system; applying the measuring principle of trilateration will not work. We do not know, in our case, when the base stations (transmitters) start transmitting. In the example below we have four different unknown time of arrivals (when each of the four transmitters arrive at the mobile station): ti, tj, tk, and tl. By starting a timer at ti (at the receiver) one can get

(15)

the different time difference of arrivals, as seen in figure 3.

Figure 3: Example of signals arriving at different points in time. The time of arrivals are unknown whereas the example’s time difference of arrivals are known: ti,l, ti,k, and tk,l

By knowing the different time difference of arrivals one cannot geometrically imagine cir-cles to be formed. Instead, one has to imagine a formation of a hyperbola between two transmitters. This can be illustrated with a simple example of how the equation for the hyperbolas are formed based on TDOA between two transmitters, T1 and T2:

Figure 4: Coordinate system showing two transmitters

They are pulsing at the exact same rate. These signals will arrive at a different time at the receiver because the signal from T1 has a shorter distance to travel than the signal

from T2. If we know that difference in time between receiving the signals we can figure out

what kind of hyperbola the receiver is on. With more hyperbolas from more transmitters we can figure out what hyperbola it lives from theirs and thus pinpoint the receivers exact location. At least three hyperbolas are needed as shown in figure 6.

The distance between the two transmitters in this example is 10.26 cm. So from the center of the coordinate system to the transmitters the distance is 5.13 cm. Suppose that the time difference of arrival at the receiver is 200 µs. The foci of the hyperbolas are located at the transmitters coordinate positions, T1 and T2:

(16)

Figure 5: Figure shows the hyperbolas that are formed

Each point of the hyperbola has the property that d1 minus d2 is always constant. We

know that distance equals velocity multiplied by time. We assume that the signals from the transmitters are sound waves (it may very well be radio signals): s = v·t = 363 m/s·200 µs = 7.26 cm.

In the figure below, subtracting c from the distance d will hence give 7.26 cm. The same applies to subtracting e from f:

This means that the transversal length of the line at the middle of the symmetry line must have the length 7.26 cm. So the vertexes of the hyperbolas are located at half that distance, 3.13 cm. This constant is called a, which gives us the following formula for the hyperbola:

x2 a2 − y2 b2 = x2 3.132 − y2 b2 = 1 (1)

We do not know b. But we do know where the focus is (i.e. T1). The formula for focus is

c2= a2+ b2 ⇒ b2 = 16.52.

We now have the complete formula from the hyperbola derived from the time difference of arrival between the transmitters:

(17)

x2 3.132 −

y2

16.522 = 1 (2)

Moving along, the intersection between three hyperbolas as seen in figure 6, formed by three transmitters (T1, T2, and T4), returns the position of the receiver in a 2D space. Adding another transmitter lets one to determine the position of the receiver in a 3D space (imagine a hyperboloid instead of a hyperbola). In other words, the receiver’s location (in 3D) is a fix position where four hyperboloids intersect [1].

Figure 6: Multilateration, where only the time difference of arrival is known, resulting in hyperbolas

In the next section we describe the derivation of a solution for such a position by apply-ing a hyperbolic positionapply-ing algorithm [8]. But before we embark on that, we present a common mathematical method that we encountered in our study of related works. This mathematical method has an effective way of reducing positioning errors.

Gauss-Newton method

During the localization process of a mobile station in a 3D system a resulting non-linear estimation problem occurs. It is not possible to solve this problem solely with an analy-tical or algebraic solution, so certain papers, such as [9] which make use of the numerical

(18)

methods, such as the iterative Gauss-Newton (GN) method for the non-linear squares that represent the hyperbolas which are formed due to applying TDOA. GN is an example of a numerical method while the hyperbolic position algorithm presented below is an example of an algebraic method. The description of the GN-algorithm is too complex and there-fore outside the scope of this thesis but it can be useful for the reader to know that the GN-algorithm is an iterative approach to solving these problems. The algorithm provides very fast convergence of the hyperboloids and accurate estimates for good initial position values of the MS, i.e. it reduces initial errors in the calculation of a position that is given by an analytical or algebraic solution when these two approaches are combined together (i.e. numerical and analytical/algebraic).

Derivation of the Hyperbolic Position Algorithm

To calculate a 3D position of a receiver when using multilateration as a positioning tech-nique requires solving the complex equations for three unknowns in 4. In this section we will describe all the steps of the algorithm that gives this solution.

To find the 3D position of the mobile station we need to know the mathematical repre-sentation of the distance between two (coordinate) points: (x1, y1, z1) and (x2, y2, z2). The

distance (d) between the two points in a 3D environment is (using Pythagoras’ theorem in 3D)

d = q

(x2− x1)2+ (y2− y1)2+ (z2− z1)2

d = v · t, v = velocity, t = time of arrival

(3) Since we now know this mathematical representation we can set up four equations where each equation represents the distance between each base station and the mobile station. In this thesis we are labeling the base stations according to the characters of i, j, k, and l which [8] also does.

di = q (xi− x)2+ (yi− y)2+ (zi− z)2 dj = q (xj− x)2+ (yj− y)2+ (zj− z)2 dk= q (xk− x)2+ (yk− y)2+ (zk− z)2 dl= q (xl− x)2+ (yl− y)2+ (zl− z)2 (4)

At a first glance, we can see in equation 4 that we have at least three unknown variables: the variables forming the coordinate of the mobile station (x, y, z). However, we do not know the different distances (di– dl) between each base station and the mobile station.

The reason for this is that we do not know the time it takes for each base station to arrive at the mobile station, even when the velocity (v) is known.

In order to solve this problem we need to set up expressions formed by the different time difference of arrivals. To repeat, the time difference of arrival is formed between two base stations and is expressed as the difference between each base station’s time of arrival, as seen in the equation below. The equation below gives us a glimpse of how we can solve

(19)

equation 4 by forming the distance difference of arrival between base station i and base station j.

di,j = di− dj

di,j = (v · ti) − (v · tj) = v · (ti− tj) = v · ti,j

(5) Based on this approach we can form the resulting equation system in order to solve for (x, y, z). In this thesis we form – as does [8] – four different distance difference of arrivals: di,j, di,k, dk,j, and dk,l.

di,j = q (xi− x)2+ (yi− y)2+ (zi− z)2− q (xj − x)2+ (yj− y)2+ (zj− z)2 di,k = q (xi− x)2+ (yi− y)2+ (zi− z)2− q (xk− x)2+ (yk− y)2+ (zk− z)2 dk,j = q (xk− x)2+ (yk− y)2+ (zk− z)2− q (xj − x)2+ (yj− y)2+ (zj− z)2 dk,l = q (xk− x)2+ (yk− y)2+ (zk− z)2− q (xl− x)2+ (yl− y)2+ (zl− z)2 (6)

These four equations is what gives rise to the hyperboloids (hyperbolas in 3D) that intersect each other in a unique point, as seen in previous section. To get to the equations where the equations represent intersecting hyperboloids more needs to be done including the task of linearizing the equation above. If the equation above is linearized we will then be able to find a solution for x, y, and z.

From now on we will only present the calculation related to the distance difference di,j. The

reason for this is simply to space the calculations, related to the other distance differences (di,k, dk,j, and dk,l), would otherwise occupy. The exact same calculations are done for all

distance differences. To illustrate this we proceed by moving one square root term in each line of equation 6 to the other side, as presented in equation 7 below.

di,j − q (xi− x)2+ (yi− y)2+ (zi− z)2 = − q (xj− x)2+ (yj− y)2+ (zj− z)2 di,k− q (xi− x)2+ (yi− y)2+ (zi− z)2= − q (xk− x)2+ (yk− y)2+ (zk− z)2 dk,j− q (xk− x)2+ (yk− y)2+ (zk− z)2 = − q (xj− x)2+ (yj− y)2+ (zj− z)2 dk,l− q (xk− x)2+ (yk− y)2+ (zk− z)2= − q (xl− x)2+ (yl− y)2+ (zl− z)2 (7)

Note that the same calculation is done for all distance differences which is illustrated in equation 7. To proceed, we square both sides of the first line in equation 7. To iterate, this is done for the other lines as well but this is done behind the scenes.

 di,j− q (xi− x)2+ (yi− y)2+ (zi− z)2 2 =  − q (xj− x)2+ (yj − y)2+ (zj− z)2 2 ⇔ d2i,j− 2 · di,j q (xi− x)2+ (yi− y)2+ (zi− z)2+ (xi− x)2+ (yi− y)2+ 2 2 2 2 (8)

(20)

Expanding the squared terms to right of the squared root term yields d2i,j− 2 · di,j q (xi− x)2+ (yi− y)2+ (zi− z)2+ (x2i − 2xix + x2) + (y2i − 2yiy + y2) + (zi2− 2ziz + z2) = (x2j − 2xjx + x2) + (y2j − 2yjy + y2) + (zj2− 2zjz + z2) (9)

By moving the terms x2, y2, and z2 from one side of equation 9 to the other side results

in an elimination of these terms. The elimination results in the following arrangement: d2i,j − 2 · di,j

q

(xi− x)2+ (yi− y)2+ (zi− z)2+ x2i − 2xix + y2i − 2yiy+

zi2− 2ziz = x2j − 2xjx + y2j − 2yjy + zj2− 2zjz

(10) Moving all terms but the square root term to the right side yields

−2 · di,j q (xi− x)2+ (yi− y)2+ (zi− z)2 = xj2− 2xjx + yj2− 2yjy + zj2− 2zjz −di,j2 − x2i + 2xix − yi2+ 2yiy − z2i + 2ziz ⇔ q (xi− x)2+ (yi− y)2+ (zi− z)2 = (xj2− 2xjx + yj2− 2yjy + zj2− 2zjz −d2i,j− x2i + 2xix − yi2+ 2yiy − z2i + 2ziz)/(−2 · di,j) ⇔ q (xi− x)2+ (yi− y)2+ (zi− z)2 = (−xj2+ 2xjx − yj2+ 2yjy − zj2+ 2zjz +d2i,j+ x2i − 2xix + yi2− 2yiy + zi2− 2ziz)/(2 · di,j) ⇔ q (xi− x)2+ (yi− y)2+ (zi− z)2 = (d2i,j+ xi2− x2j + yi2− yj2+ zi2− zj2− 2xix + 2xjx − 2yiy + 2yjy − 2ziz + 2zjz)/(2 · di,j) (11)

Equation 11 can be now simplified. The expression −2xix + 2xjx can be simplified to

2xj,ix. Doing this for the similar expressions yields

q

(xi− x)2+ (yi− y)2+ (zi− z)2 = (d2i,j+ xi2− x2j + yi2− y2j + zi2− z2j+

2xj,ix + 2yj,iy + 2zj,iz)/(2 · di,j)

(12) Assuming that the steps of equations 8–12 have been done for all the other distance diffe-rences this will then result in the following equations below.

q

(xi− x)2+ (yi− y)2+ (zi− z)2= (d2i,k+ xi2− x2k+ y2i − yk2+ z2i − zk2+

2xk,ix + 2yk,iy + 2zk,iz)/(2 · di,k)

(13)

q

(21)

q

(xk− x)2+ (yk− y)2+ (zk− z)2= (d2k,l+ xk2− x2l + yk2− yl2+ zk2− z2l+

2xl,kx + 2yl,ky + 2zl,kz)/(2 · dk,l)

(15) The equations 12–15, when squared, are the expressions for intersecting hyperboloids [8]. Bucher et al. equate equations 12 and 13 (see equation 16) in order to obtain a plane equation in the form of y = Ax + Bz + C.

(d2i,j+ x2i − x2j + yi2− yj2+ zi2− z2j + 2xj,ix + 2yj,iy + 2zj,iz)/(2 · di,j) =

(d2i,k+ x2i − x2

k+ yi2− y2k+ zi2− zk2+ 2xk,ix + 2yk,iy + 2zk,iz)/(2 · di,k)

(16) In the equations below the terms are arranged in the form of the plane equation.

di,k· (d2i,j+ x2i − x2j + y2i − y2j + zi2− zj2+ 2xj,ix + 2yj,iy + 2zj,iz)/2 =

di,j· (d2i,k+ x2i − x2k+ y2i − yk2+ z2i − zk2+ 2xk,ix + 2yk,iy + 2zk,iz)/2

(17)

di,k · (d2i,j+ x2i − x2j + yi2− yj2+ zi2− zj2)/2 + di,k · (2xj,ix + 2yj,iy + 2zj,iz)/2 =

di,j· (d2i,k+ x2i − x2k+ y2i − yk2+ zi2− zk2)/2 + di,j· (2xk,ix + 2yk,iy + 2zk,iz)/2

(18)

di,k· (d2i,j+ x2i − x2j+ y2i − yj2+ zi2− zj2)/2 + di,k · (xj,ix + yj,iy + zj,iz) =

di,j· (d2i,k+ x2i − x2k+ y2i − yk2+ zi2− zk2)/2 + di,j· (xk,ix + yk,iy + zk,iz)

(19)

di,k· (d2i,j+ x2i − xj2+ yi2− y2j + zi2− z2j)/2 − di,j· (d2i,k+ x2i − x2k+ y2i − y2k+

z2i − zk2)/2 = di,j· (xk,ix + yk,iy + zk,iz) − di,k · (xj,ix + yj,iy + zj,iz)

(20)

di,j · (xk,ix + yk,iy + zk,iz) − di,k· (xj,ix + yj,iy + zj,iz) ⇔

(di,j· xk,ix + di,j· yk,iy + di,j· zk,iz) − (di,k · xj,ix + di,k· yj,iy + di,k· zj,iz) ⇔

di,j· xk,ix − di,k· xj,ix + di,j· yk,iy − di,k· yj,iy + di,j· zk,iz − di,k · zj,iz ⇔

x (di,jxk,i− di,kxj,i) + y (di,jyk,i− di,kyj,i) + z (di,jzk,i− di,kzj,i)

(21)

x (di,jxk,i− di,kxj,i) + y (di,jyk,i− di,kyj,i) + z (di,jzk,i− di,kzj,i) =

di,k· (d2i,j+ x2i − xj2+ yi2− y2j + zi2− z2j)/2 − di,j· (d2i,k+ x2i − x2k+ y2i − y2k+

zi2− zk2)/2

(22)

y (di,jyk,i− di,kyj,i) = −x (di,jxk,i− di,kxj,i) − z (di,jzk,i− di,kzj,i)+

di,k· (d2i,j+ x2i − xj2+ yi2− y2j + zi2− z2j)/2 − di,j· (d2i,k+ x2i − x2k+ y2i − y2k+

zi2− zk2)/2

(22)

y (di,jyk,i− di,kyj,i) = x (di,kxj,i− di,jxk,i) − z (di,kzj,i− di,jzk,i)+

di,k· (d2i,j+ x2i − xj2+ yi2− y2j + zi2− z2j)/2 − di,j· (d2i,k+ x2i − x2k+ y2i − y2k+

zi2− zk2)/2

(24)

Equation 25 is now in the form of the plane equation y = Ax + Bz + C, where A = di,kxj,i− di,jxk,i

di,jyk,i− di,kyj,i, B =

di,kzj,i− di,jzk,i

di,jyk,i− di,kyj,i, and

C = di,k(d 2 i,j+ x 2 i− x 2 j+ y 2 i− y 2 j+ z 2 i − z 2 j) − di,j(d2i,k+ x 2 i− x 2 k+ y 2 i − y 2 k+ z 2 i − z 2 k)

2 (di,jyk,i− di,kyj,i)

(25)

In the same manner, we can equate equations 14 and 15 in order to get a second plane equation in the form of y = Dx + Ez + F , where

D = dk,lxj,k− dk,jxl,k dk,jyl,k− dk,lyj,k , E = dk,lzj,k− dk,jzl,k dk,jyl,k− dk,lyj,k , and F = dk,l(d 2 k,j+ x 2 k− x 2 j+ y2k− y 2 j+ zk2− z 2 j) − dk,j(d2k,l+ x 2 k− x 2 l + y 2 k− y 2 l + z 2 k− z 2 l) 2 (dk,jyl,k− dk,lyj,k) (26)

Equating the plane equations 25 and 26 yields a linear equation for x in terms of z. Ax + Bz + C = Dx + Ez + F ⇔ Ax − Dx = Ez − Bz + F − C ⇔ x (A − D) = z (E − B) + F − C ⇔ x = zE − B A − D + F − C A − D (27) x = Gz + H, where G = E − B A − D, and H = F − C A − D (28)

In order to solve for y in terms of z Bucher et al. substitute equation 28 into the first plane equation (y = Ax + Bz + C). This yields a linear equation for y as seen in equation 30.

y = A (Gz + H) + Bz + C ⇔

y = AGz + AH + Bz + C ⇔ y = z (AG + B) + AH + C (29)

y = Iz + J, where I = AG + B, and J = AH + C (30)

What is left to do is to find the equation for z. This is done by substituting x and y in equation 13 with their respective equation (equations 28 and 30).

(23)

q

(xi− (Gz + H))2+ (yi− (Iz + J ))2+ (zi− z)2= (di,k2 + x2i − x2k+ y2i − yk2+

zi2− zk2+ 2xk,i(Gz + H) + 2yk,i(Iz + H) + 2zk,iz)/(2 di,k)

(31) The term (xi− (Gz + H))2 can be rearranged like the following

(xi− (Gz + H))2 ⇔ x2i − 2xi(Gz + H) + (Gz + H)2

x2i − 2xiGz − 2xiH + G2z2+ 2GzH + H2⇔

G2z2+ 2GzH − 2xiGz + x2i − 2xiH + H2⇔

G2z2− 2Gz(xi− H) + (xi− H)2

(32)

Rearranging the other terms and moving 2 di,k to the left side of the equation result in

2 di,k

q

(G2z2− 2Gz(x

i− H) + (xi− H)2) + (I2z2− 2Iz(yi− J ) + (yi− J )2) + (z2i − 2ziz + z2)

= d2i,k+ x2i − x2

k+ y2i − yk2+ z2i − zk2+ 2xk,i(Gz + H) + 2yk,i(Iz + H) + 2zk,iz

(33) The right side can be arranged to the linear equation Lz + K, where

L = 2(xk,iG + yk,iI + 2zk,i)and

K = di,k2 + x2i − x2k+ yi2− yk2+ zi2− zk2+ 2xk,iH + 2yk,iJ

(34) Now we are in a perfect position to remove the square root by squaring both sides, in order to linearize equation 33. The result from squaring both sides is given by

4d2i,k(G2z2+ I2z2+ z2− 2Gz(xi− H) + 2Iz(yi− J ) − 2ziz + (xi− H)2+

(yi− J )2+ z2i) = L2z2+ 2KLz + K2

(35) By factorizing the left side of the above equation we get

4d2i,k(G2+ I2+ 1)z2− 8d2

i,k(G(xi− H) + I(yi− J ) + zi)z+

4d2i,k((xi− H)2+ (yi− J )2+ zi2) = L2z2+ 2KLz + K2

(36) By rearranging equation 36 into a binomial equation (as seen in equation 37) we can solve for z.

M z2− N z + O = 0where M = 4d2i,k(G2+ I2+ 1) − L2, N = 8d2i,k(G(xi− H) + I(yi− J ) + zi) + 2LK, and

O = 4d2i,k((xi− H)2+ (yi− J )2+ zi2) − K2

(24)

As can be seen below, z can assume two solutions. One of the two solutions assumes a value which is outside the defined height ranges (0 to zi–zl m).

z = N 2M ± s  N 2M − O M 2 (38) By substituting z with its solution in the linear equations 28 and 30 we can solve for x and y.

2.3 Channel access methods

We find the theory about some of the existing channel access methods (CAM) to be very important because using a CAM helps us to answer how the transmission between the transmitter system and the receiver should be maintained. In other words, a CAM helps us define the protocol or scheme used for the transmission.

We have encountered three different CAMs that have been used in indoor positioning systems: time division multiple access (TDMA), frequency division multiple access (FD-MA), and code division multiple access (CDMA). These techniques are actually used in cellular networks for wireless transmission of signals [10, p. 278] but we find the principles of these techniques relate to our problem of transmission.

TDMA

TDMA is a scheme where transmissions are sent one at a time. To clarify, let us say that we have four ultrasonic transmitters, where each transmitter is emitting 50 kHz sound waves. The options that we have at hand, are either to let one transmitter emit at a time or let all transmitters emit at the same time. So, what we mean by TDMA is the option where the transmitters emit one at a time [10, p. 314]. By letting the transmitters emit one at a time, you can tell the transmissions apart, due to the time of each transmission. However, letting each transmitter emit at the same time it is impossible to tell the transmissions apart. The unique id of the transmissions in a TDMA scheme is the time of the transmission.

FDMA

FDMA is a scheme where transmissions are sent all at once. The issue that rises is how you can tell the transmissions apart if they all sent at the same time. FDMA solves this issue by letting each transmission to be sent with a unique frequency. This would mean, with regards to our indoor positioning system, a transmitter system where each transmitter emits at its own frequency. Each transmitter is allocated a certain portion of a bandwidth for its transmission. Hence, the unique id of the transmissions in a FDMA scheme is the frequency of the transmission [10, p. 278].

CDMA

CDMA is a scheme where transmissions are sent at the same time meanwhile they are sent with the same frequency. CDMA helps you tell the transmissions apart by a particular code that the transmissions are using. Applying CDMA for transmissions requires e.g. when transmitting ultrasound, a unique code to be modulated with a specific modulation

(25)

process to tell transmission apart. On the receiver end, the received signal needs to be demodulated in order to extract the unique code. In [11] the authors modulate a unique code with binary phase-shift keying to tell the different transmitters apart. The unique id of the transmissions, especially in telecommunications, is the unique code that has been modulated onto a signal with a particular modulation process.

(26)

3

Related work

In this chapter we take a closer look at the contribution and work done by others in the field of ultrasound-based indoor positioning. The aim of this chapter is to show others’ attempts to solve similar technical problems, such as the choice and implementation of positioning techniques and measuring principles, which we encountered in our prototype development as well as the practical difficulties that arise in an ultrasound-based system.

3.1 Ens et al. – Unsynchronized Ultrasound System for TDOA Locali-zation

This paper [12] is relevant to our thesis because Ens et al. present and examine an approach to indoor localization based on both TOA and TDOA. The paper is also relevant because it also presents an approach to signal processing which is an important part of our system solution. The authors process incoming signals from the ultrasonic transmitters by sampling them with an analog-to-digital converter.

The authors chose not to synchronize the transmitters. There nonetheless is a protocol for the transmitter-system based on a channel-access method: frequency division multiple access (FDMA). Multiple unsynchronized beacons, installed on the ceiling, are used to track the position of a moving receiver. To distinguish between more than one transmitter, the transmitted signals need additional information of the signal origin and therefore the identification of the transmitter. Then the receiver can determine the origin of the signal and map the time of arrival to the transmitter. Beacons can be distinguished by giving each transmitter a different frequency band for the data communication (i.e. FDMA). Another aspect of the paper relevant to our thesis is how they cope with a difficulty facing ultrasound: absorption and attenuation by air. The authors deal with this by using lower frequencies, around 40 kHz since attenuation increases with the frequency.

3.2 Filonenko et al. – Indoor Positioning for Smartphones Using Asynch-ronous Ultrasound Trilateration

This paper [13] is relevant to our thesis because it can help us better understand the accuracy-level that can be gained from available positioning techniques and measuring principles. As we have stated before, the choice of positioning technique and measuring principle are important to the positioning accuracy of a positioning system. The paper shows the results gained from using trilateration combined with TDOA as an approach in an ultrasound system. The paper also illustrates possible drawbacks and shortcomings of using ultrasound in a positioning system.

This paper [13] presents an indoor positioning approach for smartphones that uses the innate ability of mobile phones to produce ultrasound with the built-in microphone hard-ware, combined with Time difference of arrival (TDOA) asynchronous trilateration. The authors evaluated the indoor positioning approach in order to determine its absolute ac-curacy through a range of experiments and measurements. Calculation of the unknown position of a mobile phone was made using trilateration with TDOA in a room with four control points; microphone positions which act as receivers of ultrasonic signals.

(27)

in weaker, less stable signal detection. Another shortcoming that they discovered was the poor obstacle penetration of low frequency ultrasound. Maintaining a direct line-of-sight between the phone and all four microphones is important in order to achieve best accuracy. All in all, they achieved an accuracy below 10 cm. Ultrasound trilateration was therefore identified as a very promising approach for indoor mobile positioning of non-moving objects.

3.3 Leng et al. – A passive method of positioning indoor target based on TDOA

The paper [14] is relevant to this thesis because the authors show a way of calculating the TDOA values between the received signals in an ultrasound system. They derive a positio-ning algorithm through algebraic calculus and use it for mathematical calculation of a 3D position. The paper is also important for us as it gives us insight into how they make use of both multilateration and trilateration as positioning techniques. The authors compare the results gained from applying the associated measuring principles of each technique. The paper presents a passive target localization method. The system consists of four wi-reless transmitters and a receiver target that passively receives the signals from the four transmitters and then calculates the TDOA values between any two transmitter by de-riving the time shifts between the signals relative to each other. They chose one of the signals as a reference, and then compared the time of arriving at the target with the ot-her three emitted signals so that three time differences can be obtained. A 3D coordinate (x, y, z) can then be attained through a geometric and algebraic arithmetic calculation of the hyperbolas formed.

The positioning error of the system, using TDOA method, was within 6 cm, which was much smaller than the error using TOA method (authors make no mention of it). They concluded that sampling the input signals put limitations on the positioning accuracy of the method due to the sampling rate.

3.4 Díaz et al. – Ultrasonic indoor positioning for smart environments: a mobile application

This paper [11] is relevant to this thesis because it shows how to receive the ultrasound signals with hardware components in an ultrasound-based positioning system that uses TDOA as a measuring principle. Since we are going to conduct tests to determine the positioning accuracy of our system this paper can be useful because it shows how an approach to this can be done.

Díaz et al. [11] built an indoor positioning system with focus on a portable prototype as a mobile station. The portable prototype consists of a MEMS microphone, a microcontroller, and a smartphone. The microphone captures 41 kHz signals that are amplified with a gain that can be adjusted in the smartphone. The ultrasound signals are encoded with a unique code depending from which sender the signal was emitted from. The code is modulated with binary phase-shift keying. A TDMA scheme for sending the signals is in place. The microcontroller’s tasks are to sample the incoming signals, store the samples utilizing direct memory access, and to send the stored samples over a USB connection to a smartphone. This means that the microcontroller does not compute any position whatsoever. Instead, it is the smartphone which calculates the position. Besides calculating the position of the

(28)

portable prototype, the smartphone also displays the 2D position on a Android-based user interface component.

The system utilizes TDOA to estimate a position. The authors decided to implement TDOA with the assistance of the Gauss-Newton algorithm, which is an algorithm that is explained in 2 Theory.

With five senders, one receiver, a USB connection between a microcontroller and a smartp-hone, etc., the system manages to estimate positions in real time. 5 test points, within a 5×6 m test area, were selected and 40 measurements at each test point were conducted. The senders were placed together in the middle of the test area on the ceiling (at the height 3 m). The measurements yielded an average error that were less than 5 cm in 85% of the cases. The test point that was close to the wall was most affected by multipath and resulted in a greater error compared to the test points in the middle. The test point that resulted in the greatest error in the test area was the one farthest away from the senders.

(29)

4

Method

In this chapter we will describe the research methodology chosen to develop the positioning system. The chosen research methodology comes from Nunamaker and Chen’s suggestion [15] regarding system development. The main characteristic of this methodology is that it consists of five different iterative stages (see figure below).

Figure 7: Nunamaker and Chen’s suggestion of research methodology which is suitable for system development. Source: Adapted from [15]

Nunamaker and Chen’s method for system development was chosen mainly because deve-loping a prototype is an iterative process. Its stages are necessary for the work conducted in this thesis. Testing different ideas and solutions to arrive at the correct one is a form of an iterative process which is what drove the development process forward in our work as can be seen in 5 Implementation. An example of an iteration we made, is the approaches we switched between in our attempt to find the optimal solution for the signal processing part of the system.

Construct a conceptual framework

The purpose of this stage is to formulate ideas about how the research questions can be solved. Through discussions in the group and consultations with experts at Svep, an idea was formed to build a prototype for indoor positioning based on ultrasound. Based on these meetings, a literature study was conducted in this stage to help us gain more understanding into what different approaches that existed. Afterwards, a research question was defined in order to solve a research problem related to the domain of ultrasound-based indoor positioning (see 1.3 Research questions). In addition, a theoretical example of a user scenario was defined to demonstrate the practical use of the ideas brought forward. The main problem of the thesis, which has been formulated in this stage, was divided into smaller problems which subsequently formed a larger problem tree. Further details on the results from this stage can be found in 5.1 Construct a conceptual framework.

Develop a system architecture

At this stage the system architecture was developed, its various subsystems were defined along with their different functionalities. The interactions between these subsystems were outlined. Measurable requirements, which are validated at the system’s evaluation stage (see 4 Observe and evaluate the system), were defined in this stage as well. As a result of discussion and brainstorming ideas in the group we decided upon certain system- and user requirements important to the user scenario which was defined in the previous stage. When this stage was completed, a basic understanding of the system’s functionalities, requirements, and its particular application area (i.e. user scenario) existed. These results are presented in 5.2 Develop a system architecture. The user scenario is presented in 5.1.1 User scenario.

(30)

Analyze and design the system

At this stage different solutions to implement the various subsystems were proposed and examined through an iterative development process. These solutions related for example to different methods of processing a signal (sampling vs interrupt-triggered) and different use of channel access methods (FDMA vs TDMA). These solutions were analyzed and the most optimal was chosen. This decision was made based on which solution we considered to best conform to our system requirements and the aim presented in the first chapter of this thesis (see 1.2 Research aim). Also, at this stage, necessary hardware was bought. The designed system, with its subsystems, was illustrated in the shape of diagrams. These diagrams were inspired by the 4+1 architectural view model [16] to describe systems. It is a good way to describe and illustrate the different views of a system. We found only the logical and physical view relevant for describing and designing the system. These two type of views were illustrated in the form of UML diagrams such as activity- and sequence diagrams. The results from this stage, along with the diagrams, are presented in 5.3 Analyze and design the system.

Build the (prototype) system

During this stage the system was built based on the analysis and the design of the sy-stem during the previous stage. We began building the receiver, implementing the signal processing and the positioning algorithm. After that we built the transmitter system and synchronized them, and implemented the TDMA-based protocol. Lastly the user client sy-stem was constructed. The result from this stage is presented in 5.4 Build the (prototype) system.

Observe and evaluate the system

In this last stage of Nunamaker and Chen’s method, the system and its subsystems were evaluated against the system requirements and tested for performance in terms of positio-ning accuracy. The result from this evaluation is presented in 6 Result.

This thesis’ testing strategy has been inspired by the modes of approach in some of the academic papers that are presented in 3 Related work. We tested the system chiefly for positioning accuracy because there is a high demand for it in localization systems and because it fits our research aim. A 4×2×2 m test area was used and multiple test points in this area were defined.

(31)

5

Implementation

In this chapter we will describe the implementation process of the positioning system. The results from the first four different stages of Nunamaker and Chen’s research methodology presented in this chapter, whereas the results of the last stage is covered in 6 Result.

5.1 Construct a conceptual framework

In this section the research problem is divided into smaller subproblems with a description following each problem. We arrived at these conclusions based on a literature study and an investigation of available information on indoor positioning systems, as seen in 3 Related workand 2 Theory. To begin with, we propose an example of a user scenario in which this positioning system can be used.

5.1.1 User scenario

The following user scenario is a theoretical example of how the work of this thesis can be applied. Centimeter-level accuracy given by our positioning system can be used by a drone traveling in the hallways of a building to locate its own position so as to navigate correctly. The drone could be equipped with a camera to be used for instance for indoor surveillance or security. This leads to the following requirements:

1. The receiver should have an update rate of at least 1 Hz, assuming that the traveling speed of the drone is 30 cm/s.

2. The receiver should be light and small, assuming that it sits on top of the drone body. 3. The positioning accuracy of the system should be at most 15 cm, assuming that the drone is 30 cm in width and that it travels through a door with the width of 80 cm.

5.1.2 Problem tree

In order to solve the research problem it is broken down into more manageable subproblems, starting with the main problem (see 1.3 Problem statement). Here we explain what the problem means, what role it plays for the system, and motivate why we consider it a problem.

Figure 8: Overview of the breakdown of this thesis’ main problems

Based on our research and study of previous works in the field of ultrasound-based indoor positioning systems, we have concluded that an ultrasound system can be divided into two

(32)

main components: a transmitter system and a receiver. In a passive system, the receiver component calculates the position. With these ideas in mind we manage to derive more ideas that provide us with a conceptual framework that is used in the subsequent stages of Nunamaker and Chen’s research methodology.

Transmitter system

The problem of designing a transmitter system is broken down into three subproblems, as seen in figure 9: hardware, channel access method, and synchronization.

Figure 9: The transmitter system has three important aspects that require a solution The hardware problem is important because choosing appropriate hardware (e.g. transmit-ter) could affect the system’s performance when it comes to for instance accuracy, which is an important user requirement mentioned in our problem statement. Another problem that arises is how the transmission should be carried out. The choice of CAM provides a pro-tocol for the receiver-transmitter communication. Lastly, there is the question of whether to synchronize the transmitters and if doing so, how this should be implemented. Possible difficulties that arise in solving this problem is that a very precise synchronization of all emitters is crucial for the system performance.

Receiver (prototype)

The figure below illustrates the problem breakdown for the receiver (prototype). This helps us understand its purpose and actions.

(33)

Figure 10: Problem tree for receiver part of the positioning system

Redirecting a position denotes the receiver’s ability and action of transmitting relevant positioning information to an external unit such as a computer-based application. This could be done for example through wireless transmission.

Receiving the signal means that the prototype acts as a system that takes an input signal from an external device, i.e. a transmitter. This is an important aspect of the prototype since it is based on the signals that a position is calculated. A difficulty in solving this problem lies in finding the adequate hardware capable of receiving the emitted signals. Processing signals signifies the approach for deriving the necessary information from the received signals that is used in the positioning algorithm for calculating a position. Its solution depends on the positioning technique and measuring principle that the system makes use of. Hence addressing this problem is a way for us to find an answer to two of the thesis’ research subquestions.

Lastly, calculating the position means finding out the position of the receiver inside a defined area. The calculation is done with a mathematical positioning algorithm. The algorithm solution depends on the positioning technique and measuring principle used in the system.

5.2 Develop a system architecture

In this section we present the results from 4 Develop a system architecture. This is the stage where we gained a clear picture of the solution architecture, its various subsystems and their interrelationships, by defining various system requirements.

5.2.1 Requirement specification

The requirements below were arrived at during a brainstorming session preceded by brow-sing relevant information, such as reading academic papers on indoor positioning systems. We realized after a thorough reading of Mautz Rainer’s thesis on indoor positioning techno-logies [1] that the way to design the optimal positioning system for a particular area lies in defining the relevant user requirements for the specific application. In our case, due to this thesis’ user scenario, we have concluded that accuracy and cost-effectiveness, with regards

(34)

to hardware, are key parameters for the application of our system. With this vision, taken together with the problem breakdown, we were able to lay out our requirement specification to clarify for ourselves the functionalities and purpose of our positioning system.

Functional requirements

1. The positioning system should be able to provide a position with a valid data format (such as 3D coordinates) inside a defined test area.

2. The positioning system should use a valid measuring principle (such as TDOA or TOA) and positioning technique (such as multilateration or trilateration) in deter-mining a position.

3. The transmitter part of the positioning system should use a valid channel access method (such as TDMA or FDMA) for emitting signals.

4. The transmitter part of the positioning system should be synchronized in time. 5. The receiver part of the positioning system should be able to receive and process

ultrasound signals from the transmitters.

6. The receiver part of the positioning system should be able to calculate and specify (i.e. valid format such as x, y, z) a position based on information derived from received signals through signal processing.

Non-functional requirements

1. The positioning system should be able to provide a positioning accuracy that is equal to or less than 10 cm.

2. The positioning system should have an update rate of at least 1 Hz, i.e. provide a position at least once a second.

3. The positioning system should be cost-effective with regards to hardware employed compared to Svep’s Marvelmind system.

4. The positioning system should not pose a health risk to humans or indoor animals by producing an ultrasound decibel level that exceeds a level that has reported bad health effects.

5.2.2 System overview

As mentioned in 4 Develop a system architecture, we illustrate our ultrasound-based posi-tioning system based on two views, a physical and a logical view, in order that the reader may gain a clearer understanding of the positioning system and its subsystems.

(35)

Physical overview

Figure 11: Physical overview of the system with a theoretical example of a drone being positioned

Transmitter system: The transmitter system consists of four synchronized transmitters that emit ultrasound signals. The distances between the transmitter form the test area in which the drone is traveling.

Receiver (prototype): The receiver that is to be positioned, is supposed to be mounted on top of the drone in an abstract use case scenario. It receives and processes the emitted signals from the transmitters.

User client: The user client is connected to the receiver via a wireless technology. The purpose of the user client is to display the position of the receiver to a potential user. This is done by wireless reception of the position data from the receiver.

Logical overview

Transmitter system: The transmitter system consists of a master device which keeps in-terlinked slave devices synchronized. The master device notifies the slave devices when to start a signal transmission.

Each slave device is connected to a transmitter which it controls. Each slave device receives a signal from the master device which notifies it to trigger the transmitters.

The transmitter itself is used to generate ultrasound waves with a certain frequency which is configured by the connected slave device.

Receiver (prototype): The receiver includes a hardware component that is able to recei-ve emitted ultrasound from the transmitter system. The hardware conrecei-verts the receirecei-ved signals to a form of data that can be processed and analyzed by the microcontroller.

(36)

Figure 12: Logical overview (flow) of the sy-stem

The microcontroller is used to process the signals received from the transmitters to extract important information that is used to calculate a position in accordance with a positioning technique.

The receiver redirects the calculated posi-tion by means of a wireless module. The wireless module transmits the position da-ta calculated by the microcontroller to an external device, such as a PC.

User client: The user client is a software ap-plication on a particular hardware, such as a PC or a smartphone. The software appli-cation together with the hardware obtains position data from the wireless module on the receiver (prototype). The software ap-plication renders the received position on a graphical user interface, so that a user can view the position of the receiver (prototy-pe).

5.3 Analyze and design the system

In this stage of Nunamaker and Chen’s methodology we present the development process, the various problems encountered and the different stages that led to the final system design. We begin by explaining how the receiver part of the system (i.e. the prototype) was developed and then we go on to present the transmitter system in a systematic fashion.

5.3.1 Active vs passive system

Indoor positioning systems are of two kinds: active and passive. We chose to design a passive system because it suits both our aim of creating a more cost-effective system and the thesis’ user scenario. Assuming that the drone is self-tracking it would need to know its own position. Therefore calculating the position has to be done exclusively on-board the receiver. The receiver, since it is not active, does not send anything back to the transmitters which eliminates the need for extra hardware such as radio modules, thus making it more cost-effective.

5.3.2 Receiver (prototype)

Here we demonstrate how the various subsystems of the receiver were designed through an iterative process of testing, analysis and evaluation. In developing certain subsystems and functionalities, such as the signal processing, alternative solutions had their advantages and disadvantages weighed against each other in order to determine the most suitable solution for our research problem.

(37)

5.3.2.1 Choice of microcontroller

The microcontroller is an essential part of the positioning system since it is responsible for all the computations, especially calculating a position. These calculations can be complex and hence require a powerful processor. Our first choice was the SAM4E16E, developed by Microchip Technology, whereas the second choice was the Teensey 3.2 microcontroller. Both these alternatives had undesirable features.

The SAM4E16E processor came with an evaluation kit and a board that was too big for our receiver. In addition, its debugging-capabilities, especially writing to the terminal window, were unnecessarily intricate. But one advantage, which we discovered later, was inbuilt filter system that could be applied to a sampled input signal and also an analog comparator circuit. The Teensey processor had a data sheet that was very unprofessional in its descriptions of processor functions. Getting bogged down for too long in reading a data sheet was not so pragmatic. In addition, the Teensy processor could not be programmed in pure C-code inside Atmel Studio. Hence we decided to go with a much more practical choice: Arduino Due. We were previously familiar with the board and had already programmed it inside Atmel Studio. The Due’s onboard-processor, SAM3X8E, is a powerful processor which we considered could serve our aim well.

5.3.2.2 Choice of positioning technique and measuring principle

Multilateration, which uses the measuring principle TDOA, was chosen for this thesis because this positioning technique does not require the transmitters and the receiver to be synchronized in time. This means that the receiver does not need additional hardware for knowing when the transmission starts.

Trilateration, which uses the measuring principle TOA, was considered but it was not chosen because it requires that the receiver knows when the transmitters start transmitting. The transmitter would then need a module, such as a radio module, for notifying the receiver when it starts transmitting. The receiver would require a corresponding module for receiving that notification. This would ultimately cause the receiver to be less efficient with regards to hardware cost and energy consumption.

Triangulation, which uses the measuring principle AOA, was also considered. This posi-tioning technique was not chosen because it would require an array of microphones to determine the angle of arrival of the incoming transmission. This means additional hard-ware (additional microphone circuits) for each microphone which ultimately be detrimental for our aim of creating a system that is cost-effective with regards to hardware. Triangu-lation would however not require the receiver to be synchronized with the transmitters which makes this technique a more attractive candidate than trilateration.

In simple terms, the selection of an appropriate positioning technique boiled down to whet-her the technique would require maintaining a time synchronization between the receiver and the transmitters which we deemed as redundant. Moreover, it also depended on whet-her the technique would require additional hardware or not, which is a relevant aspect of our problem statement and research aim.

Figure

Figure 1: Trilateration, where the distance between mobile station (R) and each transmitter (T1–T3) is known
Figure 2: A trilateration case where the circles do not intersect in one point which gives a slight positioning error
Figure 6: Multilateration, where only the time difference of arrival is known, resulting in hyperbolas
Figure 7: Nunamaker and Chen’s suggestion of research methodology which is suitable for system development
+7

References

Related documents

The ranging accuracy was tested by placing the Tmote Sky modules at different distances, as shown in Figure 8, and recording the RSSI values.. Figure 8: The setup for measuring

In this research, LSTM network, MLP network, Gradient Boosting, XG boosting, and Ada boosting regression models are identified as appropriate algorithms to track office equipment in

We made an attempt to evaluate the Bluetooth Low Energy protocol in conjunction with Smartphones, the way it works in indoor environments, how it is affected by multipath and

Gemensamt för forskare som undersöker bilden i medierna är att de fokuserar på vad för sorts nyheter som rapporteras, hur dessa nyheter rapporteras, vilka som

As a project aiming for building an experimental system, the result is presented as an assessment of the reliability of the system. The system implementation result mainly focuses

På grund av att syftet med arbetet inte är att besvara hur säkerhetskulturen påverkas av personalbristen i alla flygunderhållsenheter i Försvarsmakten är detta inte

Using the experimental results, we can now answer the question if it is better to equip sensor nodes with directional antennae or to deploy additional base stations to achieve a

In order to span the forbidden zone, nodes need to know the following information which can be provided in the packet header: location of source and sink, a bit denoting if the