Cooperative localization algorithms in ultra-wideband systems for indoor positioning FERRAN PEDRERA RUBIO Master’s Degree Project Stockholm, Sweden July 2012 XR-EE-SB 2012:016 Abstract Indoor positioning has become an important research field in recent years. This is due to the potential services or products that can be offered, which would be very useful for users in several applications, and the interesting commercialization possibilities. But nowadays the most developed positioning systems are used outdoors, and for example GNSSs do not provide indoor coverage, so the efforts are focused on other local radio technologies. In particular, ultra-wideband is the object of this thesis. In this thesis a set of cooperative algorithms are presented and intended for use in the localization phase of an ultra-wideband positioning system. Different approaches and points of view are shown in the literature related to the localization problem. Here there is a revision of the main concepts as well as some software implementations and their results in MATLAB, always trying to evaluate which is the best option in each situation. The Ultra-Wideband system considered in this thesis consists of a set of nodes, some of which have unknown positions that have to be estimated by the algorithms. These nodes have the ability of calculating distances between each other by measuring the round-triptime of ultra-wideband pulse signals. The distances are used as inputs to the algorithms to calculate the estimated positions of the nodes as outputs. The most remarkable detail is the cooperation, which means that the distances between any pair of nodes is used even when both have unknown positions, taking advantage of that information. The results show that using the cooperation, the algorithms can be very precise even in very demanding conditions when nodes can not communicate with the whole network due to a range limitation of the technology or physical obstacles. Therefore, cooperative algorithms represent a way to further investigate and improve the solutions for indoor positioning. Contents 1 INTRODUCTION 1.1 Historical background and 1.2 Problem statement . . . . 1.3 Applications . . . . . . . . 1.4 Thesis outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 2 3 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 5 5 7 7 3 LOCALIZATION ALGORITHMS 3.1 Statistical classification . . . . . . . . . . 3.2 Distributed . . . . . . . . . . . . . . . . . 3.2.1 LS and ML distributed . . . . . . 3.2.2 Nonparametric Belief Propagation 3.3 Centralized . . . . . . . . . . . . . . . . . 3.3.1 Multidimensional scaling . . . . . . 3.3.2 Maximum Likelihood Centralized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 9 10 10 13 21 21 23 4 ALGORITHM EVALUATION 4.1 Convergence criterion . . . . . . . 4.2 Simulations . . . . . . . . . . . . . 4.2.1 Ranging models . . . . . . . 4.2.2 Small/Medium networks . . 4.2.3 Large networks . . . . . . . 4.3 Emulations . . . . . . . . . . . . . 4.3.1 Ranging emulation . . . . . 4.3.2 Small network emulation . 4.3.3 Medium network emulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 25 25 26 27 45 47 48 49 54 5 CONCLUSIONS 5.1 Future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 62 LIST OF TABLES 63 LIST OF FIGURES 65 BIBLIOGRAPHY 67 motivation . . . . . . . . . . . . . . . . . . . . . 2 PROBLEM DEFINITION 2.1 Scenario . . . . . . . . . . . . . 2.2 Technology and way to perform 2.3 Algorithms . . . . . . . . . . . 2.4 Measurement environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 1 INTRODUCTION The introductory chapter will provide the reader with an historical background and motivation of the positioning problem, a little explanation of the scenario and some applications of this project, as well as the structure and content of the document. 1.1 Historical background and motivation During the last century, a large number of systems and technologies have been developed focused on the positioning problem. The initial motivation to work on these projects was the need of something to help the militaries during the navigation. So this is how the modern radio positioning systems were born basically during the Second World War and in the following years. An extensive presentation and description of most of these systems is published in [1]. These systems were based on terrestrial base stations emitting signals to be processed by the receivers and find their own position. A few names of this family of radionavigation systems are for example Omega, Loran, Decca, etc. The majority of them began as military tools, but afterwards they became even more useful for civilian use. The most popular example of this is the Global Navigation Satellite Systems (GNSS). The GNSSs are systems of satellites that provide global coverage around the whole earth. Almost everybody has heard about the NAVSTAR Global Positioning System (GPS), which belongs to the United States, or the Global’naya Navigatsionnaya Sputnikovaya Sistema (GLONNAS), which was developed by the Soviet Union and now belongs to Russia. Nowadays there are new systems in development like for example the Galileo project, which is considered the European Union’s alternative to GPS and the Compass system, which is developed by China. The GNSSs are different from the ones above, because they are not based on terrestrial base stations but on satellites, however the idea is more or less the same. In conclusion, there are many positioning systems and for example GPS is useful and available to everybody on the whole earth, but it is only useful in outdoor environments. In indoor environments there are some problems, for example an accuracy of 3 meters is enough when a person is driving and using his GPS receiver, because this error is small versus the environment around him. But if it is needed to position something in a little environment, better accuracy is required. Another problem in indoor environments are the losses suffered by the GPS due to the walls. Then another type of technology or system has to be used, more specific for indoor environments. An important area of research for indoor positioning is focused on ultra-wideband (UWB) technology, which 1 CHAPTER 1. INTRODUCTION can provide a good accuracy, even arriving to a resolution of 0.1 m [2]. But the accuracy is not everything, as mentioned in [2] UWB tags have a low power consumption in comparison with other conventional radio frequency (RF) tags and there is no possibility of interference between them either, because of the differences in signal and spectrum. These are a few reasons that motivate the research on UWB technology for indoor positioning, even though it is not the only possibility and some other technologies can be used. A first alternative is GPS-enhancing solutions, for example using pseudosatellites or a new GPS weak signal tracking technology, GPS navigation is possible in interiors. Some other alternatives are RFID (Radio Frequency IDentification), Cellular-Based solutions, WLAN (Wireless Local Area Network - IEEE 802.11), Bluetooth (IEEE 802.15) and some other options that are explained in more detail in [2]. After reading the information in [2], the conclusion is that the UWB technology provides the best accuracy in most scenarios. However, the other technologies mentioned above are more widespread and therefore cheaper to deploy. Thus, depending on the accuracy required by the application, their use might be suitable. 1.2 Problem statement The scenario considered in this thesis consists of multiple nodes in an indoor environment. Some of them have known positions and the rest need to be located, which is in fact the aim of this work. They have to find their own position like a GPS receiver, but measuring distances to the rest of nodes with ultra-wideband pulses, this measurement phase is represented in Figure 1.1. After measuring distances, all this information has to be processed to obtain the estimated positions of the nodes, either in a distributed way in each node or in a centralized way in an individual processor. This signal or data processing is what is studied in this thesis. Different algorithms are analyzed, implemented and compared, to know which is the best way to proceed. This is going to be explained better in the next chapter and it is possible to find more information in [3]. Figure 1.1: Example of a simple scenario, where nodes 1,3 and 5 have known positions and nodes 2 and 4 need to be located. Each arrow represents a distance measurement between a pair of nodes. 2 CHAPTER 1. INTRODUCTION 1.3 Applications Maybe the reader could ask which is the utility of an indoor positioning system, let us see a few examples. Imagine an emergency situation where people like fire-fighters or police have to enter a building on fire. If every person is equipped with a small localization node, it would be easy to know where everyone is at anytime and someone with the role of coordinator can control and command the whole team, increasing the chances of success. For example in this case of emergency, one can not rely on any pre-installed infrastructure and every person is a little part of the network, then cooperative localization is very important. More information about this particular kind of utility is available in [4]. A second scenario could be an industrial floor where all the activity is done by robots. It would be very important to know where they are at anytime, just to control them in a more efficient way or even avoid dangerous situations. Another application in logistics is presented in [5], where the importance of wireless sensors is exposed. Using sensors that are wireless makes the monitoring and control of the activity more dynamic and reduces the cost of cabling, but the localization of the sensors is important for the system to be meaningful. And there is another advantage using sensors with localization capability when they are installed on the equipment. If something is lost or urgently required, it is quick to locate it thus avoiding wasting time. A third application can be found in animal tracking for biological research [5]. Localization can be useful to study the behavior and interactions between animals, but it is very expensive because of the high power consumption of the current practices based for example on VHF transmitters or GPS collars. Solutions based on sensors networks can solve this problem and improve the research. There are many other applications to apply indoor positioning to such as emergency 911 services, health-care monitoring, location detection of medical personnel or equipment in a hospital, detecting the location of police dogs trained to find explosive, location detection of products stored in a warehouse, etc [2] [3]. 1.4 Thesis outline The report has a classical scientific report layout. The introduction explains the background and structure of the problem and its possible applications. The second chapter focus on the scenario of the problem, the technologies used to solved it and a general explanation about the localization algorithms. In chapter three, the localization algorithms are individually introduced and briefly explained together with some observations or assumptions to implement them. Chapter four presents some results from the simulations and emulations done with the implemented algorithms, basically their performance and characterization. In the final chapter the thesis will finish with some conclusions and possible future work. 3 Chapter 2 PROBLEM DEFINITION This chapter introduces all the information related to the localization problem, except the particular explanation of each algorithm, which is explained in the next chapter. First of all the scenario and its components are explained, followed by the technology used and how it works. Then it is shown some properties and classification of the algorithms and some information about the measuring environment. 2.1 Scenario Like it has been said before, the better way to begin explaining the problem is to introduce and understand the scenario. It consists of an indoor environment where there are multiple nodes. Two types of nodes can be distinguished: slaves and masters. The first type can be called both slaves [6] or anchors [3] along this work. Slaves are reference nodes with fixed positions. The others are masters [6] or agents [3], which are nodes with an unknown position, in fact the aim of this work is how to determine or estimate these locations based on node-to-node distance measurements. Looking at Figure 1.1, nodes 1,3 and 5 are slaves and nodes 2 and 4 are masters. It is important to say that the presence of reference nodes is only required if absolute localization is needed. In the absence of sufficient number of slaves, the localization would be relative. Just to comment that to absolutely locate nodes in 2D, at least three reference nodes are required in the network. 2.2 Technology and way to perform The operation of the network can be classified in two phases, the measurement and the location-update phase [3]. During the measurement phase, information is exchanged between neighboring nodes in the network, to obtain the distances between pairs. The two basic alternatives to measure distances are the ones focused on Received Signal Strength (RSS) or the ones focused on propagation time [3]. RSS estimates distances from the difference between power emitted and power received due to propagation. Measurements based on propagation time are normally better and in this project Round-Trip-Time (RTT) is used, which is explained below. Once all the possible distances are estimated, the location-update begins. This phase basically uses all the measurements done as inputs to obtain the estimated positions of the masters as outputs. The combination and 5 CHAPTER 2. PROBLEM DEFINITION scheduling of both phases in the localization process is illustrated in Figure 2.1 Measurement phase All nodes have the ability to connect with each other. Communication in nodes is needed to measure distances between pairs. The way to measure distances is to use UWB technology. A system can be considered UWB when its bandwidth is bigger than 50% of its absolute frequency or its bandwidth equal or greater than 500 MHz [6]. The reasons to use UWB are its accurate delay resolution, simple implementation and capability of penetrating through obstacles. Maybe the reader is wondering how UWB technology can measure distances. When a master wants to know the distance to a particular node, it sends a UWB pulse shorter than 1 ns to this node. When the pulse is received, that node sends back the pulse after a fixed known time (∆t). Once the master gets its pulse back, it computes the RTT. This measurement correspond to the time spent between the pulse is sent by the master and received it back. To have the RTT is equivalent to have the distance. RT T = tprop + ∆t + tprop = 2tprop + ∆t RT T − ∆t 2 tprop dist = c tprop = (2.1) (2.2) (2.3) It is only needed to subtract the fix delay that takes to the node to send back the pulse, divide by two and the propagation speed (c). So if the ranging measuring system is accurate enough, the performance of the whole network will depend mainly on the algorithms used to compute the estimated positions. Another thing that sometimes has to be done in this phase is to broadcast the estimated positions or any other equivalent information. This happens basically in the distributed algorithms, because each master works iteratively and always needs the results obtained by its neighbors in the last iteration. Location-update phase The localization algorithms come after the measurement phase. Like it has been explained before, the inputs of the algorithms are all the possible distance measurements between pairs of nodes and the outputs are the estimated positions of the masters. There are many articles in the literature explaining different types of algorithms and ways to focus in the location-update phase. An extensive survey may be found in [3]. All this information comes from the field of statistics and sometimes the mathematics can be heavy. Figure 2.1: Diagram showing the steps of localization process 6 CHAPTER 2. PROBLEM DEFINITION 2.3 Algorithms The most remarkable aspect of the used algorithms here is the fact of being cooperative. But what does cooperative mean? To be cooperative consists in sharing information or connection between masters, so not only the distances between slaves and masters are used. This characteristic permits to have less reference nodes/slaves to be able to locate each master. Cooperation is also needed because of the range limitation of the nodes. Depending on this limit, it would be impossible to have communication between all pair of nodes because some of them would be too far away from others. Then since it would be almost impossible for a master to measure distances to all slaves, it has to take advantage of the cooperation to have enough information when applying an algorithm. A possible classification applicable to the localization algorithms is found in [3], where centralized and distributed algorithms are considered. Centralized algorithms In a centralized version, all the distance measurements are gathered in a central and maybe external node/processor. This external node has to process all the information together. So this kind of algorithm needs a high computational effort in an individual node. Distributed algorithms A distributed version is just the opposite idea. Each node only works with the information collected by itself. It means that every node gathers information and measures the distance to its neighbors inside the range limitation. Then it tries to estimate its own position working for example with a gradient descent algorithm. This approach implies less computational effort for a single node, however each node has to be smarter. In the next chapters both kind of algorithms will be explained as well as all the assumptions needed to implement and evaluate them. 2.4 Measurement environment Regarding the environment some information can be found in [3], where there are some characterizations of real scenarios, so it could be possible to simulate a real scenario just to evaluate the algorithms. In that paper probability density functions (pdf) of distance measurements are fitted with a mixture of Gaussian pdf’s, providing the means and variances as second grade functions of the true distance. However in spite of always using this model, what is used too in this work is a simpler model. It consist of an additive Gaussian noise with zero mean and a standard deviation depending linearly on the true distance. This measurement model is derived from experimental tests conducted on the hardware platform described in [6]. 7 Chapter 3 LOCALIZATION ALGORITHMS In this chapter the reader can find a brief explanation of different localization algorithms, both centralized and distributed. The aim is to show and understand different approaches and techniques, and then make some evaluations in the next chapter. The other point of the chapter is to comment on the assumptions considered to develop each algorithm, in our case in MATLAB. During the explanations, the parameters x and X refer to the position of the masters individually or in matrix respectively. An individual position means the location of a single node, while a position matrix consists of the locations of all the nodes together in a matrix. 3.1 Statistical classification Apart from the classification of the algorithms between centralized or distributed as explained in Section 2.3, the ones developed in this thesis can be classified according to statistics between Bayesian or Non-Bayesian as shown in Figure 3.1. ! LS -> Least Squares ML -> Maximum Likelihood MDS -> Multidimensional scaling NBP -> Nonparametric Belief Propagation Figure 3.1: Classification of the implemented algorithms. 9 CHAPTER 3. LOCALIZATION ALGORITHMS Non-Bayesian algorithms do not consider any statistical knowledge about the variable they want to estimate and only work with the information obtained from the measurements and its statistics. On the other hand, Bayesian algorithms always assumes a statistical knowledge of the variable to estimate, apart from the statistics of the measurements. 3.2 Distributed The three distributed algorithms developed are Least Squares (LS), Maximum Likelihood (ML) and Nonparametric Belief Propagation (NBP). The first two are very similar and it is possible to explain them together, because they are only different in the evaluation of a cost function. The last one is called NBP and it is a very complex algorithm compared with the first two and it has to be explained separately because there are plenty of concepts to understand. 3.2.1 LS and ML distributed LS and ML are both non-Bayesian estimators, which means that they treat x as a deterministic unknown parameter. The information shown now comes basically from [3]. LS makes the following assumption about the vector of distance measurements z = f (x) + n, where f (·) is a function applied to x and n the noise vector. Specifically in LS, its objective is to obtain an estimated x̂LS as: x̂LS = arg min kz − f (x)k2 x (3.1) One can observe very quickly that the equation above does not exploit any knowledge of the noise statistics, it only tries to minimize the norm of the difference between the true measurements and the estimations done by f (·). On the other hand there is ML, which exploits the nature of the noise, obtaining x̂M L as: x̂M L = arg max pZ|X (z|x) x (3.2) where pZ|X (z|x) is the probability density function of the measurements conditioned by the true position of the masters, which is also known as the likelihood function. It is very easy to observe above that the noise statistics knowledge is contained in the probability function. Implementation Both cost functions LS and ML written before are the basic equations of least squares and maximum likelihood, but since distributed algorithms are deployed, they need to be expressed in other ways. These other expressions have to contain terms only related to pairs of nodes during a time slot, because the algorithms are distributed and iterative. 10 CHAPTER 3. LOCALIZATION ALGORITHMS So the LS cost function in a certain time slot t is given by: (t) CLS (x) = N X X i=1 j∈S (t) →i kzj→i − f (xi , xj )k2 (3.3) Meanwhile the ML cost function in a timeslot t is given by: (t) CM L (x) = − log p(z(t) |x) =− N X X i=1 j∈S (t) →i log p(zj→i(t) |xi , xj ) (3.4) where: • N is the number of masters. • f (xi , xj ) is a function that calculates the norm of xi − xj : f (xi , xj ) = kxi − xj k (3.5) (t) • zj→i is the measured distance between nodes i and j. (t) • S→i is the set of nodes j that have connectivity with i. In a general way, both cost functions can be written in a common form just to not have to specify which one we are talking about. This form is: C (t) (x) = − N X X (t) cj→i (zj→i ; xi , xj ) (3.6) i=1 j∈S (t) →i In that way, it is easy to see there is a sum of terms for every pair of nodes as a function of the measured distance between them and their estimated positions. As the objective is to minimize the cost function, it is needed to set the derivative equal to zero: (t) X ∂cj→i (zj→i X ∂ci→k (z (t) ; xk , xi ) ; xi , xj ) ∂C (t) i→k = + ∂xi ∂x ∂x i i (t) (t) j∈S→i (3.7) k∈Si→ But there is a little problem with the last expression, if the algorithms have to be distributed and each node only have the information measured by itself from the others, the second part of the derivative can not be evaluated, therefore not considered. Then the derivative is as follows: (t) X ∂cj→i (zj→i ; xi , xj ) ∂C (t) = ∂xi ∂xi (t) (3.8) j∈S→i Once all the theory has been presented, it is time to write the iterative algorithm (extracted from [3]): 11 CHAPTER 3. LOCALIZATION ALGORITHMS Algorithm: Cooperative LS and ML Localization (0) 1: given x̂i , ∀i 2: for t=1 to T do {time slot index} (t,0) (t−1) 3: set x̂i = x̂i 4: for l=1 to Niter do {iteration index} 5: nodes i=1 to N in parallel (t,l−1) 6: broadcast current location estimate x̂i 7: receive estimate from neighbors (t,l−1) (t) x̂j , j ∈ S→i 8: update location estimate only for masters/agents (t,l) (t,l−1) (t,l) P (t,l−1) x̂i = x̂i + δi (t) ψ j∈S→i j→i 9: end parallel 10: end for (t) (t,N ) 11: set x̂i = x̂i iter 12: end for where (t) (t,l−1) ψj→i , (t,l−1) ∂cj→i (zj→i ; xi , x̂j ∂xi ) (3.9) (t,l) δi is the update step of node i in iteration l and time slot t. It controls the speed and the convergence of the algorithm because in fact they are connected. As the reader can observe very quickly, it consists of a distributed, cooperative and gradient descent algorithm. In each iteration all nodes construct their own cost functions based on the distance measurements gathered and the estimated positions broadcasted by the others. Then each node tries to find a minimum of the cost function moving to the opposite side of the gradient. Even though the algorithm is well developed, there is no guarantee to always reach the correct solution of the problem. The reason comes from the cost function, because depending on the geometry of the scenario sometimes there will be more than one minimum. Then in this situation if the initialization is close to the absolute minimum, the algorithm will converge to it but if the initial point is near any other minimum, the algorithm will go to this wrong one. Assumptions / Observations Now the intention is to present some assumptions needed to implement both algorithms, once all the theory and expressions have been presented. All the comments are valid for both LS and ML, except the last one. (0) • x̂i ∀i is assumed as an uniform distribution around all the environment. At the beginning absolutely nothing is known about the positions of the masters. • Since movement is not considered for the nodes in this thesis, only the iteration loop is needed. So the time slot index can be eliminated. • In the update step (8), a fixed value δ is used during all the iterations and for all nodes. (t) • For ML, the probability function p(zj→i |xi , xj ) corresponds to a Gaussian variable with mean kxi −xj k evaluated at the measured distance zj→i . There is an important 12 CHAPTER 3. LOCALIZATION ALGORITHMS detail related to the variance of this Gaussian. The point is that each node has an inverted bell as a cost function. If we introduce a little value for the variance, these bells will be very sharp and the values of the cost function far away from the minimum will be incredibly high. In our case MATLAB is not able to work with these values, so to make the algorithm more robust, it is necessary to lie to it putting in this case a high constant value. A drawback would be the speed of the algorithm, to do it more robust it will be slower because the bells will be wider and their derivatives smaller. Another disadvantage of this assumption is the fact of not using the same model in the ranging and in the cost function, because the results will be worse. 3.2.2 Nonparametric Belief Propagation NBP is an algorithm totally different from all the others developed, it comes from Bayesian statistics theory while ML and LS are the opposite. Much more information can be found in [3] and [7], in fact in the first of the references there is plenty of information related to this Bayesian estimation, but here only the most necessary part is explained. The idea of all Bayesian estimators is to obtain the posteriori probability function pX|Z (x|z) instead of pZ|X (z|x) like in non-Bayesian estimation. Once it is obtained, there are two options to end the estimation: • MMSE (Minimum Mean Square Error) estimator: calculates the mean of the posteriori distribution. Z x̂MMSE = x pX|Z (x|z)dx (3.10) • MAP (Maximum A-Posteriori Probability) estimator: finds the mode of the posteriori distribution. x̂MAP = arg max pX|Z (x|z) (3.11) x Then the principal and more important objective is how to determine this posteriori distribution. Sequential Estimation First of all and before talking about how to estimate the posteriori distribution, two Markovian assumptions need to be done: p(x(t) |x(0:t−1) ) = p(x(t) |x(t−1) ) (3.12) p(z(t) |x(0:t−1) ) = p(z(t) |x(t) ) (3.13) The first equality means that the probability of the current state only depends on the previous one, and the second means that the observation only depends on the current state, understanding state as the current estimation and observation as a measurement. After that, the posteriori distribution can be written in different terms: Z (t) (1:t) p(x |z ) = p(x(t) , x(t−1) |z(1:t) )dx(t−1) (3.14) After some Bayesian modifications: p(x(t) |z(1:t) ) ∝ p(z(t) |x(t) )p(x(t) |z(1:t−1) ) (3.15) 13 CHAPTER 3. LOCALIZATION ALGORITHMS where p(x(t) |z(1:t−1) ) = Z p(x(t) |x(t−1) )p(x(t−1) |z(1:t−1) )dx(t−1) (3.16) All these equations can be interpreted as a sequential estimation with a simple argumentation: p(x(t−1) |z(1:t−1) ) ⇒ p(x(t) |z(1:t−1) ) ⇒ p(x(t) |z(1:t) ) (t−1) (3.17) (1:t−1) In a certain time t − 1 the posteriori distribution p(x |z ) is available. Then with the term p(x(t) |x(t−1) ) it is possible to make a prediction of the posteriori distribution in instant t still having the observations until t − 1 (p(x(t) |z(1:t−1) )). Finally after the prediction step the estimation is corrected with the likelihood function p(z(t) |x(t) ). So step by step and assuming the knowledge of the two needed terms at anytime, the posteriori distribution can be obtained periodically. And in the beginning an initialization is needed p(x(t) |z(1:t) )|t=0 = p(x(0) ). Factor Graphs It is possible to explain and represent this sequential estimation with graphs and messages moving through them, as exposed in [3]. Let us assume the posteriori distribution can be factorized in factors φk depending on groups of variables xk . pX|Z (x|z) = M 1 Y φk (xk ) Q (3.18) k=1 In a factor graph every factor φk is represented by a vertex and every variable xk is an edge between vertexes. All the edges connected to a vertex are the variables on which the factor depends. Intuitively the reader can assume that approximately the variables are the estimated locations after the prediction and correction steps, and the factors are the probability functions used to predict and correct the estimations as shown before. Once the structure of the factor graph is understood, now is the moment to introduce the concept of the messages. A message is basically information flowing between factors through the graph, this is what it is called Sum Product Algorithm in [3]. To compute an outgoing message from a vertex (µφ→Xi (xi )), the next equation can be used: Z Y µφ→Xi (xi ) ∝ φ(x1 , ..., xD ) µXk →φ (xk )dx1 ...dxi−1 dxi+1 ...dxD (3.19) k6=i That means that the outgoing messages depend on the factor of the vertex and all the incoming messages coming from the other edges. To better understand how factor graphs work, a little and simple example is shown later because the explanation is too abstract. Implementation(I) Before beginning the implementation, it is important to comment a simplification or modification of all the theory explained before. In this master thesis, only the distance measurements are used in a static environment, so the term p(x(t) |x(t−1) ) is irrelevant and the prediction operation does not exist. This is not a problem and all the information continues being valid only considering p(x(t) |x(t−1) ) as a Dirac delta function δ(x(t) −x(t−1) ). 14 CHAPTER 3. LOCALIZATION ALGORITHMS If the reader is interested in including movement or inertial information, in [3] a prediction algorithm to combine both in the estimation is provided. It is also available the correction operation algorithm, which it is called Sum Product Algorithm over a Wireless Network (SPAWN): Algorithm: SPAWN Correction operation 1: nodes i=1 to N in parallel (0) 2: initialize b (t) (·) = µh(t−1) →X (t) (·) Xi i i 3: end parallel 4: for l=1 to Niter do iteration index 5: nodes i=1 to N in parallel (l−1) 6: broadcast b (t) (·) Xi (l−1) 7: receive b 8: convert b µ 9: (l) (t) (t) (·) from neighbors j ∈ S→i Xj (l−1) (t) (·) to a distribution over Xi using (3.19) R (t) (t) (t) (t) (l−1) (t) (t) p(zj→i |xi , xj ) b (t) (xj )dxj (t) (xi ) ∝ (t) Xj φj→i →Xi Xj compute new message using (3.19) (t) (t) Q (l) (l) b (t) (xi ) ∝ µh(t−1) →X (t) (xi ) j∈S (t) µ Xi i i →i 10: end parallel 11: end for 12: nodes i=1 to N in parallel 13: determine outgoing message: (Niter ) µX (t) →h(t) (·) = b (t) (·) i i 14: end parallel (t) (t) φj→i →Xi (xi ) Xi where: • b (0) (t) xi (·) = µh(t−1) →X (t) (·) is the pdf of the node xi after the prediction operation at i i time (t) and iteration (0). (t) • S→i is the set of nodes that have connectivity with node i. (t) • µφj→i →X (t) (xi ) is a message from node j to node i. i • b (l) (t) xi (t) (xi ) is the estimated pdf of node xi at time (t) and iteration (l). • µX (t) →h(t) (·) = b i i operation. (Niter ) (t) Xi (·) is the estimated pdf of node xi at the end of the correction Example To better understand how the algorithm works, now is the moment to show a very simple example in a little scenario step by step. The scenario consists of two masters and three slaves in a square area of 50 × 50 m2 . In this example, the most important fact is to show the cooperation between masters when they do not have connectivity with at least three reference nodes, but with other masters instead. There are five nodes in the example, nodes 1,3 and 5 are slaves and nodes 2 and 4 are masters, as shown in Figure 3.2. Cooperation is needed because there is not full connectivity between masters and 15 CHAPTER 3. LOCALIZATION ALGORITHMS slaves, node 2 is not able to receive signal from node 5 and node 4 the same with 1. In the next paragraphs the example will show how the algorithm performs always from the point of view of node 2. 50 Slaves Masters Connect. 45 y coordinate [m] 40 35 Node 3 30 25 Node 1 20 Node 2 Node 4 Node 5 15 10 5 0 0 10 20 30 x coordinate [m] 40 50 Figure 3.2: Example scenario showing the location of masters and slaves and their connectivity. The factor graph for this simple scenario has an individual branch for each node beginning from the vertexes fi , which represents the initial states, as represented in Figure 3.3. For slaves the initial states are their true positions, but for the masters are uniform distributions around the whole environment. Then for each variable xi , the algorithm works separately with each branch applying the prediction operation hi if it exists (not in this thesis). (t) After the individual operations (predictions), the correction operation p(zrel |x(t) ) mixes all the branches, sending messages between nodes and including the cooperation between masters too. In this scenario, the slaves send messages to the masters if they have connectivity and the masters communicate between themselves too, exactly represented in Figure 3.4. The scheduling is always similar even for very complex scenarios, the only difference in a factor graph is the number of individual branches and the number of messages exchanged during the correction operation. Once the scheduling is explained for this example, let us begin explaining how node 2 applies it to compute its own location. At the beginning masters do not have knowledge about their positions, so only the slaves are sending messages to masters (Figure 3.5.a). As both masters receive only messages from two slaves, at first they have an ambiguity in their position when they compute the marginals or posteriori distributions (Figure 3.5.b). In a second iteration, masters know something about their true location (bimodal distribution), then they are able to send messages to cooperate (Figure 3.5.c). The messages between masters are quite special, as it can be seen in (Figure 3.5.c) the message from node 4 to 2 is formed by two spread rings. There 16 CHAPTER 3. LOCALIZATION ALGORITHMS are two due to the ambiguity and they are spread because of the location uncertainty apart from the measurement uncertainty. Finally the ambiguity disappears because there is only one area where the three messages sent to each master intersect, resulting in an estimated posteriori distribution around the true location (Figure 3.5.d). Figure 3.3: Factor graph of the example scenario in Figure 3.2, showing both how information flows in the graph and the operations applied to update it. Figure 3.4: Exchange of messages between different nodes during the correction operation in the scenario showed in Figure 3.2. 17 CHAPTER 3. LOCALIZATION ALGORITHMS (b) 40 3 20 1 2 4 5 y coordinate [m] y coordinate [m] (a) 0 3 20 1 2 4 5 0 20 40 x coordinate [m] (c) 40 3 20 1 2 4 5 0 0 y coordinate [m] 0 y coordinate [m] 40 20 40 x coordinate [m] (d) 40 3 20 1 2 4 5 0 0 20 40 x coordinate [m] 0 20 40 x coordinate [m] Figure 3.5: Messages received by node 2 (a) and (c), and estimated posteriori distributions (b) and (d) in iterations 1 and 2 respectively. Implementation (II) At this point the theoretical performance of the algorithm has been explained and even shown in a simple example, but the practical implementation is a little more complicated. The algorithm consists in sending messages which can be seen as rings and finding their intersection to obtain the most accurate posteriori distribution, but how is it possible to send and compute this messages with discrete tools as for example MATLAB? The solution is to work with samples both for the location distributions of the nodes and for the messages. This idea is presented in [7], where NBP is exposed as the way to compute the probability density functions of the location of nodes and messages with a set of samples with their weights. This approach is quite similar to the Particle Filter (PF) [8], where probability density functions are approximated by particles instead of samples. But while in NBP each sample is a two dimensional Gaussian variable, in PF each particle is a Dirac delta function. The way to compute and weight the samples is very different from the one used with the particles, because the concept of messages is used in the first case, but somehow the feeling is similar. And even for example both algorithms can use the same resampling algorithm, which is explained below. In [7], only an algorithm based on the correction operation is explained. In fact when prediction does not exist, the SPAWN algorithm of [3] can be considered equal to NBP. Basically the idea is the same, but in the practice an adaptation which can be implemented is needed. The 18 CHAPTER 3. LOCALIZATION ALGORITHMS implemented algorithm is presented below as well as all the explanation for all the new notation as it is introduce in [7]. Algorithm: NBP (i) (i) Compute NBP messages: Given M weighted samples {wt , xt } from p̂n (xt ), construct an approximation to mntu (xu ) for each neighbor u ∈ Γt : • If otu =1 (we observe inter-sensor distance dtu ), approximate with a Gaussian mixture: – Draw random values for θ(i) ∼ U [0, 2π) and v (i) ∼ pv (i) (i) – Means: mtu = xt + (dtu + v (i) )[sin(θ(i) ; cos(θ(i) ))] (i) (i) (i) (i) n−1 – Weights: wtu = Po (mtu )wt /mut (xt ) – Variance: Σtu = M −1 3 (i) · Covar[mtu ] • Otherwise, use the analytic function: (i) (i) – mtu (xu ) = 1 − Σi wt Po (xu − xt ) Compute NBP marginals: Given several Gaussian mixture messages (i) (i) mnut = {mut , wut , Σut }, u ∈ Γot , sample from p̂n+1 (xt ): • For each observed neighbor u ∈ Γot , – Draw kM |Γo t| (i) samples {xt } from each message mnut (i) (i) (i) – Weight by wt = Πv∈Γt mnvt (xt )/Σv∈Γot mnvt (xt ) • From these kM locations, re-sample by weight (with replacement) M times to produce M equal-weight (with replacement) M equal-weight samples. where: (i) (i) • {xt , wt } is a set of samples and weights of the estimated location pdf of node t at time n p̂n (xt ). • otu is an indicator variable, 1 means connectivity between node t and u, and 0 the opposite. (i) • mtu is a sample of the message from node xt to node xu , where dtu is the measured distance between them and v (i) is a random noise value. (i) (i) • wtu is the weight assigned to the sample mtu . • Σtu is the covariance of the samples. In this case it will be approximated as Σtu = σv2 I, the same as in the samples v (i) . • The function Po (·) is the probability of connectivity between a pair of nodes. In [7] an exponential behavior is used, but here it is assumed as 1 or 0 depending on a threshold distance (range limitation). It is the same for us as otu , but not in [7]. (i) (i) • mntu is a Gaussian mixture message created with all the samples {mut , wut , Σut }. (i) It means each sample is a two dimensional Gaussian variable with mean mtu and variance Σtu , so the Gaussian mixture is the weighted mean of all the variables. Using the two dimensional Gaussian pdf expression, it is possible to evaluate the whole mixture in a given point like is needed in the algorithm. 19 CHAPTER 3. LOCALIZATION ALGORITHMS • Γt is the set of neighbors of node t and Γot are only the neighbors observed. • k ≥ 1 is a parameter of the sampling, the greater the parameter , the slower the processing and more information is used from the messages and vice versa. • A re-sample by weight (with replacement) is useful when given a set of M samples and their weights, only a subset is significant because the others have very low weights in comparison. Then applying the re-sample finally there are M samples equal-weighted and significant. More information about the re-sample algorithm applied can be found in [9]. Apart from the equations and the formal explanation, the performance of the algorithm can be understood at a basic level. When a node is intending to send a message, it generates samples around the place it thinks it is, at a distance equal to the measured plus noise. After that, each sample of the message is weighted based on the past messages and the weight of the sample of the marginal. All these samples, together and weighted, form the Gaussian mixture. Then when a node wants to compute its marginal, it takes a subset of samples from all the received messages, re-weights them mixing all the information from the messages, which consists in giving higher weights to samples near the intersection of all the messages, and then finally with the re-sample it obtains the M equal-weighted samples that best fit the marginal distribution of the nodes. Assumptions / Observations Here are listed some assumptions or observations decided on during the development of the algorithm to make it easier or possible: • Once the algorithm finishes its performance, the estimated location of each node is obtained by calculating the weighted mean of the samples of the marginal distribution, which can be called or is equivalent to MMSE. • When a master only has connectivity with less than three nodes, we consider the following: – If it is isolated, the algorithm does the MMSE to all the samples of an uniform distribution, so the estimation will end up around the center. Since the node has not any information about the environment around it, the uniform distribution can not be improved. – If it has connectivity with only one node, the best it can be done is to estimate its position in a ring. Actually it acts like MAP algorithm, choosing the sample with the highest weight. – If it has connectivity with two nodes, the posteriori distribution is like a bimodal variable. Doing the weighted mean, the estimation would always be in the middle of the bimodal distribution. Therefore the best option is MAP estimation, sometimes the greatest sample would be in the correct point and sometimes not. It is better to estimate sometimes the true location than decide always a wrong estimation. samples from • When a master is computing marginals, in the step of choosing kM Γo t each message, the best idea is to choose the ones with greatest weights. • Po is similar to a Heaviside step function, it is equal to 1 with connectivity and 0 without. 20 CHAPTER 3. LOCALIZATION ALGORITHMS • At the beginning all masters assume an uniform distribution in the whole scenario. Because of this only the slaves are able to send messages in the first iteration. • Only masters that have received at least two messages are able to send messages. Otherwise it is impossible to distinguish any kind of ring. • NBP needs a heavy computational effort and because of this it has been tried to reduced the number of operations to make it faster and more practical. The slowest operation of the algorithm is the evaluation of a point in a Gaussian mixture, and it has to be done faster. It consists in evaluating the point in all the Gaussian variables of a message and sum. But for example the evaluation of a point which is far away from a sample is very low, negligible and wastes time. The idea is to avoid the evaluations when the samples of a message are further than a certain distance from the evaluated point. In the implementation of the algorithm, the dimension of this region around the point has been introduced as a tuning parameter. 3.3 Centralized Two centralized algorithms have been developed. The first one is called Multidimensional Scaling (MDS) and the second Maximum Likelihood centralized. This last one has been developed during this master thesis based on the knowledge of the other algorithms, it means using some previous concepts. 3.3.1 Multidimensional scaling MDS is a centralized algorithm which has its root in mathematical psychology. However, it is very useful in many others situations like in our case. There are many sources of information related to MDS and of course referring to the localization problem. In this thesis, the algorithm is developed from the information in [10] and [11]. In [10], the authors refer to the version developed here as metric MDS-MAP. To introduce the reader into metric MDS-MAP, the best way is to divide it in three basic steps: 1. Obtain distance matrix D First of all a matrix of measured distances (D) is needed to apply the algorithm. It consist of: • Each element dij of the matrix D corresponds to the distance from node xi and xj ∀i, j. • Each dij contains the true distance between pairs plus a measurement noise term. • Matrix D has to satisfy the conditions of non-degeneracy and triangular inequality. The first one means dii = 0 ∀i and the second dij + djk ≥ dik . • Use of a shortest path algorithm. Due to the range limitation of the nodes sometimes not all dij can be measured, but the algorithm needs a full matrix D. In such case the easiest alternative is to use a shortest path algorithm to fill the matrix like Floyd or Dijkstra algorithms. In the implementation of this thesis Dijkstra algorithm has been used, which calculates for each node the 21 CHAPTER 3. LOCALIZATION ALGORITHMS shortest paths to the other ones. The information of Dijkstra algorithm can be obtained easily both in specialized literature or in general information on the Internet, for example a pseudo code is available in [12]. 2. Apply MDS to the distance matrix Once the matrix D is full, the next step is to apply the MDS to obtain the relative coordinates of the masters. It can be shown that: n n m n n X 1X 2 1X 2 1 XX 2 1 dij − dij + 2 xik xjk dij ) = − (d2ij − 2 n j=1 n i=1 n i=1 j=1 (3.20) k=1 where: • n is the number of nodes (slaves plus masters). • m is the dimension of the coordinates (in this case two). The previous equality is present in almost all literature of MDS [10], but the possibility exists to find it in another form. Specifically in [11] it is possible to find the equality in matrix notation, which makes the implementation easier. 1 1 1 B , − [In×n − 11T ]D2 [In×n − 11T ] = XXT 2 n n (3.21) where: • In×n is an identity matrix of n dimensions. • 1 is a vector of dimensions n × 1 full of ones. • X is the matrix of coordinates of the nodes. • B is a double centered matrix, symmetric and positive semidefinite. To obtain the matrix of coordinates from B, one can apply a Single Value Decomposition (SVD). Once the SVD is done, it is very easy to arrive to X: 1 B = VΛVT = XXT ⇒ X = VΛ 2 (3.22) where V is the matrix of eigenvectors and Λ the diagonal matrix of eigenvalues of B. Arrived at this point matrix X has dimension n × n, but we are interested in 2D coordinates. To reduce the dimensions of the solution, only the two largest eigenvalues and its eigenvectors have to be retained. This is why this algorithm includes the term dimensional scaling in its name and this is the reason for the estimation errors too. 3. Transform relative localization to absolute After step 2 the matrix of coordinates contains only relative localization between nodes, that means all nodes are well located but not in a fix reference coordinate system. To do this transformation it is necessary to use the well known coordinates of the slaves. In 2D localization, three or more reference nodes are needed to execute this step. Basically one has to find the transformation (scaling, rotation and reflection) that best fits the estimation of the slaves with their true positions. Once this transformation has been found, it has to be applied to the coordinates of the masters too, and then the algorithm is finished. 22 CHAPTER 3. LOCALIZATION ALGORITHMS Assumptions / Observations Apart from all the theory explained above, there are some comments to show before work with the algorithm and evaluate results: • The information found related to MDS is normally applied to large sensors networks, but here is going to be used more focused on little/medium networks like for example the firefighters’ scenario explained during the introduction. Even so there will be a little evaluation with data from large sensors networks provided by [3]. • Above has been commented that the errors of the algorithm are caused by the dimensional scaling, but another source of error is the Dijkstra algorithm. When it is impossible to measure a distance, Dijkstra usually estimates a bigger distance because it is obtained adding the measured distances during different hops between a pair of nodes. 3.3.2 Maximum Likelihood Centralized This centralized algorithm is very similar to LS and ML distributed, but of course it has some peculiarities. The objective is to estimate the position of the nodes by maximizing the likelihood function: θ̂T = arg max {zi } m+n Y Y i=1 j∈H(i) j<i 1 √ − 2 (cTi,j −d(zi ,zj )) 1 2σ e Ti,j 2πσT i,j 2 (3.23) But in fact the maximization of the likelihood is equivalent to the minimization of the absolute value of the sum of exponents once the logarithm is applied (log-likelihood), and then the estimation can be calculated as follows in the next equation extracted from [13]: θ̂T = arg min {zi } m+n X X i=1 j∈H(i) j<i (cTi,j − d(zi , zj ))2 (3.24) where: • θ̂T is the estimation of the coordinates. • Ti,j is the time that takes a pulse to travel between nodes i and j and corresponds to a measurement. • n is the number of masters and m the number of slaves. • d(zi , zj ) is the distance between the estimated positions zi and zj : d(zi , zj ) = kzi − zj k. • H(i) is the set of nodes that have connectivity with node i. • c is the speed of light. • σTi,j is the standard deviation of the measurement Ti,j . 23 CHAPTER 3. LOCALIZATION ALGORITHMS Implementation This cost function is like LS distributed cost function, but grouping the cost functions of all nodes in one. Although in [13] the general cost function is provided, there is no explanation about how to minimize it. The first idea during the research was a brute force approach, it was very inefficient and heavy to execute. After developing all the other algorithms, another idea came from them. It consists in applying the same gradient descent as in LS and ML distributed. A priori there is no difference between applying a gradient descent to two coordinates (two dimensions per node) and to do it to fifty for example. But there is a little difference related to the minimum. We need to be sure the algorithm will converge to the absolute minimum and not to all the possible local minimums. The solution is very easy now that the MDS algorithm has been explained. Before applying the gradient descent, the estimation can be initialized with MDS just to be around the absolute minimum. After all these arguments, the algorithm implemented looks like: Algorithm: ML centralized gradient descent 1: MDS initialization 2: for l=1 to Niter do iteration index 3: for i=1 to 2 × N in parallel 4: Update every coordinate (l) (l−1) ĉi = ĉi + δψil−1 5: end for 6: end for where: • A coordinate ci is a dimension of a node. Then each node has two coordinates x (horizontal) and y (vertical). • δ is the step size of a gradient descent algorithm. (l−1) • ψi is the derivative of the cost function with respect to ci , evaluated with the estimated positions of the previous iteration. Assumptions / Observations The following assumptions / observations support the performance of the algorithm: • After the MDS initialization, the estimated locations are always near the absolute minimum of the cost function. • The step size δ is fixed for all the iterations and for all the coordinates. • In this particular case, LS and ML centralized criteria is the same. In fact the cost function is more similar to the LS distributed one than to the ML, but in [13] it is called centralized ML. 24 Chapter 4 ALGORITHM EVALUATION In this chapter, the performance of the algorithms is evaluated in different conditions and scenarios. All the algorithms presented in the previous chapter have been implemented in MATLAB, being simple to characterize and test them. The evaluations are done both from simulations and emulations. Simulations use scenarios created artificially with a ranging model, while emulations use real data measured with the Ubisense Location platform available in the department [14]. 4.1 Convergence criterion For those algorithms that are iterative, it is needed to define a criterion of convergence to avoid unnecessary iterations and to compare the computational complexity. In this case, the execution of an algorithm is terminated when the root mean square (rms) of the errors in distance of the masters decreases less than 1% between two consecutive iterations. This criterion is not the most appropriate in a realistic situation because there is no way to calculate the errors, but since these are only simulations and characterizations, the criterion is valid and simpler to implement. In a real implementation the criterion needs to be a little more complex. Instead of looking at a single value (erms ), a possibility is to look at the estimations of the locations. If they do not change more than a threshold percentage, the algorithm will stop. 4.2 Simulations As mentioned above, simulations use a ranging model to reproduce the distance measurement step given an scenario. A couple of ranging models are used here, which are explained in the following subsection. Related to the scenario, there are two different types simulated. On the one hand are small/medium networks with up to fifteen masters, very similar to the firefighters’ scenario mentioned in the introduction for example. On the other hand there are large networks with up to one hundred masters. This last type of scenario is not the principal objective of the thesis, but it seems appropriate to better know the algorithms. An application of this are for example large sensors networks larger than the firefighters’ situation. 25 CHAPTER 4. ALGORITHM EVALUATION The outage probability used in the presentation of the results is defined as: Pout (e) = Ne N (4.1) where Ne the number of estimations with an error greater than the value e and N the total number of estimations. The number of executions/trials has to be large enough to make this probability meaningful. 4.2.1 Ranging models It is easy to generate random positions for the nodes and depending on their geometry the algorithms would perform better or worse. But if the geometry is bad, that does not mean that the scenario is not realistic, because all the geometries are physically possible. The most important aspect, to make the scenario realistic, is the ranging model. It would try to add the noise in the distance measurements introduced by the environment. To execute the following simulations a couple of ranging models are proposed. The first one can be called linear model and the second Wymeersch model. The linear model consists of an additive Gaussian noise model with zero mean and linear standard deviation depending on the distance. This model has been derived from experimental measurements on a custom hardware test bed in [6]. So the estimated distance dˆ can be expressed in an environment ε as: ˆ ε) = d + N (0, (σo + kσ × d)2 ) p(d|d, (4.2) where σo and kσ are constant values. It assumes the further the nodes are, the greater will be the deviation of the noise, but the mean continues being the true distance. The Wymeersch model comes from [3], where the authors propose a realistic model based on experiments using a commercial UWB platform. Specifically the model used here is the first proposed LIDS-LOS (Laboratory for Information and Decision systems - Line of sight). In [3], the proposed ranging models look like: ˆ ε) = N ˆ(Pε,µ,2 (d), Pε,σ2 ,2 (d)) p(d|d, d (4.3) where the mean and the variance of the Gaussian variable are expressed as second-order polynomials (αd2 + βd + δ). The proposed coefficients in the document are: α -0.0003 α 0 Pε,µ,2 (d) β δ 1.0075 -0.0298 Pε,σ2 ,2 (d) β δ 0 0.0007 Table 4.1: Wymeersch ranging model coefficients The measurements of the distance have a mean almost linear and not very far from the true distance and a little constant variance. For more information about this ranging model or others similar, the reader can look at [3]. 26 CHAPTER 4. ALGORITHM EVALUATION 4.2.2 Small/Medium networks This is the most extensive part in this section. Three main types of analyses can be found here. First of all a characterization of the errors is done. The second one is a characterization of the algorithms, changing the conditions of different parameters to see how they change their accuracy. Finally there is a little study related to the time of execution of each algorithm, to have a comparative view between them. Regarding the scenario in these simulations, four slaves are always fixed around a square environment (50 × 50 m), as shown in Figure 4.1 and masters are located randomly inside. This slave configuration has been chosen because according to [15], to obtain the best accuracy using four slaves the deployment has to look like a square. And they are on the walls because when the masters are inside the slave configuration, the possibilities of having more than one minimum in the cost functions of the gradient descent algorithms decrease. 50 Fixed slaves y coordinate [m] 40 30 20 10 0 0 10 30 20 40 x coordinate [m] 50 Figure 4.1: Slaves location during simulations in an environment of 50 × 50 m. A Errors characterization For all the algorithms, the errors are presented applying both ranging models and after that some conclusions are extracted. The simulations are done with fifteen masters randomly spread with an uniform probability distribution around the environment, assuming full connectivity between all the nodes and the histograms and plots correspond to 100 trials. Whenever possible it will be tried to adjust the histograms with Gaussian or Rayleigh distributions, as represented by a red line in Figure 4.2 for example. Respecting to the linear ranging model, its parameters still need to be set and the values chosen are σo = 0.1m and kσ = 0.01m. On the other hand the parameters of the Wymeersch ranging models are totally fixed in [3] and nothing else have to be set. A.1 MDS No other parameter of MDS needs to be set apart from the general parameters commented above. Then the results of the simulations are shown directly below in Tables 4.2, 4.3 and Figures 4.2, 4.3 for both ranging models. 27 CHAPTER 4. ALGORITHM EVALUATION Mean 1.6899 St. dev 1.1089 Error characterization [m] eRM S X mean X st. dev. 2.0211 0.0149 1.4542 Y mean -0.0651 Y st. dev. 1.4030 Table 4.2: Error characterization MDS using linear ranging model (100 trials, 4 slaves and 15 masters). Mean 1.6436 St. dev 1.0706 Error characterization [m] eRM S X mean X st. dev. 1.9613 0.0263 1.3991 Y mean -0.0489 Y st. dev. 1.3743 Table 4.3: Error characterization MDS using Wymeersch ranging model (100 trials, 4 slaves and 15 masters). MDS outage probability MDS Distance error histogram 100 200 150 Pout 10−1 100 10−2 50 0 0 2 6 4 Error [m] MDS X error histogram 200 8 10−3 0 1 3 4 2 Error [m] MDS Y error histogram 5 250 200 150 150 100 100 50 50 0 −5 0 Error [m] 5 0 −5 0 Error [m] 5 Figure 4.2: Error characterization of MDS algorithm using linear ranging model (100 trials, 4 slaves and 15 masters). 28 CHAPTER 4. ALGORITHM EVALUATION MDS outage probability MDS Distance error histogram 100 200 150 Pout 10−1 100 10−2 50 0 0 2 6 4 Error [m] MDS X error histogram 200 8 10−3 0 1 3 4 2 Error [m] MDS Y error histogram 5 250 200 150 150 100 100 50 50 0 −5 0 Error [m] 5 0 −5 0 Error [m] 5 Figure 4.3: Error characterization of MDS algorithm using Wymeersch ranging model (100 trials, 4 slaves and 15 masters). A.2 Centralized ML Apart from the general parameters, ML centralized needs a parameter to be set, the step size. It has been fixed experimentally and set to δ = 0.05. Results are available below in Tables 4.4, 4.5 and Figures 4.4, 4.5 for both ranging models. Mean 0.2974 St. dev 0.2061 Error characterization [m] eRM S X mean X st. dev. 0.3618 -0.0099 0.2524 Y mean -0.0207 Y st. dev. 0.2583 Table 4.4: Error characterization ML centralized using linear ranging model (100 trials, 4 slaves and 15 masters). Mean 0.2778 St. dev 0.1997 Error characterization [m] eRM S X mean X st. dev. 0.3421 0.0031 0.2285 Y mean -0.0052 Y st. dev. 0.2547 Table 4.5: Error characterization ML centralized using Wymeersch ranging model (100 trials, 4 slaves and 15 masters). 29 CHAPTER 4. ALGORITHM EVALUATION ML cent. Distance error histogram 200 ML cent. outage probability 100 150 Pout 10−1 100 50 0 10−2 10−3 0 10−4 1 1.5 0.5 Error [m] ML cent. X error histogram 250 250 200 200 150 150 100 100 50 50 0 −1 −0.5 0.5 0 Error [m] 0 0 −1 1 0.5 1.5 1 Error [m] ML cent. Y error histogram −0.5 0 0.5 Error [m] 1 Figure 4.4: Error characterization of ML centralized algorithm using linear ranging model (100 trials, 4 slaves and 15 masters). ML cent. Distance error histogram 250 ML cent. outage probability 100 200 10−1 Pout 150 100 10−3 50 0 10−2 0 0.5 1.5 1 Error [m] ML cent. X error histogram 10−4 250 250 200 200 150 150 100 100 50 50 0 −1 −0.5 0 0.5 Error [m] 1 0 0 −1 0.5 1 1.5 Error [m] ML cent. Y error histogram −0.5 0.5 0 Error [m] 1 Figure 4.5: Error characterization of ML centralized algorithm using Wymeersch ranging model (100 trials, 4 slaves and 15 masters). 30 CHAPTER 4. ALGORITHM EVALUATION A.3 LS distributed The experimental step size fixed in this case is δ = 0.01. As the reader can observe in Table 4.6 and Figure 4.6, the algorithm sometimes does not converge, it basically depends on the random initialization. But despite this occasional non-converge effect, most of the time it works properly. Hence it seems logical to do some post-processing once the algorithm has been executed a certain number of times, to reject and re-execute the outliers. Specifically what is done is the rejection of an execution if the eRM S is to high, considering that it does not converge. Like it is explained in Section 4.1, to look at eRM S is not a real possibility but easier, equivalent and valid in a simulation. In a future and real implementation this post-processing would focus in a batch of estimations and reject the ones which are far away from the majority, e.g considering the mode of the empirical distribution. The results applying the post-processing correspond to Tables 4.7, 4.8 and Figures 4.7, 4.8. Mean 5.3768 St. dev 11.4937 Error characterization [m] eRM S X mean X st. dev. 12.6857 0.0059 8.1657 Y mean 0.0387 Y st. dev. 9.7136 Table 4.6: Error characterization LS distributed using linear ranging model and without outliers post-processing(100 trials, 4 slaves and 15 masters). LS dist. outage probability LS dist. Distance error histogram 1200 100 1000 Pout 800 600 400 200 0 0 40 60 80 Error [m] LS dist. X error histogram 0 20 1500 1500 1000 1000 500 500 0 20 −60 −40 −20 0 Error [m] 40 60 2 3 5 4 Error [m] LS dist. Y error histogram 1 0 −60 −40 −20 0 20 Error [m] 40 60 Figure 4.6: Error characterization of LS distributed algorithm using linear ranging model, with outliers (100 trials, 4 slaves and 15 masters). 31 CHAPTER 4. ALGORITHM EVALUATION Mean 0.1909 St. dev 0.1020 Error characterization [m] eRM S X mean X st. dev. 0.2165 -0.0078 0.1513 Y mean -0.0072 Y st. dev. 0.1546 Table 4.7: Error characterization LS distributed using linear ranging model and with outliers post-processing(100 trials, 4 slaves and 15 masters). Mean 0.1202 St. dev 0.0619 Error characterization [m] eRM S X mean X st. dev. Y mean 0.1352 -0.0013 0.0951 9.3003e-004 Y st. dev. 0.0961 Table 4.8: Error characterization LS distributed using Wymeersch ranging model and with outliers post-processing(100 trials, 4 slaves and 15 masters). LS dist. outage probability LS dist. Distance error histogram 150 100 100 Pout 10−1 50 0 10−2 0 0.5 1.5 1 Error [m] LS dist. X error histogram 10−3 200 200 150 150 100 100 50 50 0 −1 −0.5 0.5 0 Error [m] 1 0 0 −1 0.5 1 1.5 Error [m] LS dist. Y error histogram −0.5 0 0.5 Error [m] 1 Figure 4.7: Error characterization of LS distributed algorithm using linear ranging model, without outliers after post-processing (100 trials, 4 slaves and 15 masters). 32 CHAPTER 4. ALGORITHM EVALUATION LS dist. Distance error histogram 150 LS dist. outage probability 100 10−1 Pout 100 50 0 10−2 10−3 0 1 1.5 0.5 Error [m] LS dist. X error histogram 10−4 150 150 100 100 50 50 0 −1 −0.5 0 0.5 Error [m] 1 0 0 −1 0.5 1.5 1 Error [m] LS dist. Y error histogram −0.5 0 0.5 Error [m] 1 Figure 4.8: Error characterization of LS distributed algorithm using Wymeersch ranging model, without outliers after post-processing (100 trials, 4 slaves and 15 masters). A.4 ML distributed The step size set experimentally is δ = 0.01. Results are presented in Tables 4.9, 4.10 and Figures 4.9, 4.10. The reader should pay attention in the simulations using the Wymeersch ranging model, because a strange phenomenon is occurring and it is visible specially in the histogram. A possible explanation or interpretation of that is written in the Subsection 4.2.2 A.6, where the results are analyzed. Mean 0.1327 St. dev 0.0967 Error characterization [m] eRM S X mean X st. dev. 0.1641 -0.0027 0.1141 Y mean -0.0018 Y st. dev. 0.1181 Table 4.9: Error characterization ML distributed using linear ranging model(100 trials, 4 slaves and 15 masters). Mean 0.2385 St. dev 0.1010 Error characterization [m] eRM S X mean X st. dev. 0.2590 0.0012 0.1846 Y mean 0.0019 Y st. dev. 0.1818 Table 4.10: Error characterization ML distributed using Wymeersch ranging model(100 trials, 4 slaves and 15 masters). 33 CHAPTER 4. ALGORITHM EVALUATION ML dist. Distance error histogram 300 ML distributed outage probability 100 250 10−1 Pout 200 150 100 10−3 50 0 10−2 0 10−4 0.5 1 1.5 Error [m] ML dist. X error histogram 250 250 200 200 150 150 100 100 50 50 0 −1 −0.5 0 0.5 Error [m] 0 0 −1 1 1.5 0.5 1 Error [m] ML dist. Y error histogram −0.5 0 0.5 Error [m] 1 Figure 4.9: Error characterization of ML distributed algorithm using linear ranging model (100 trials, 4 slaves and 15 masters). ML distributed outage probability 100 ML dist. Distance error histogram 200 150 Pout 10−1 100 10−2 50 0 0 1.5 0.5 1 Error [m] ML dist. X error histogram 10−3 150 150 100 100 50 50 0 −1 −0.5 0.5 0 Error [m] 1 0 0 −1 0.5 1 1.5 Error [m] ML dist. Y error histogram −0.5 0.5 0 Error [m] 1 Figure 4.10: Error characterization of ML distributed algorithm using Wymeersch ranging model (100 trials, 4 slaves and 15 masters). 34 CHAPTER 4. ALGORITHM EVALUATION A.5 NBP The particular parameters of NBP used in the simulations are k = 1.5, Nsamples = 400 and Σtu = σv2 I = 0.01I. Results for both ranging models are in Tables 4.11, 4.12 and Figures 4.11, 4.12. Mean 0.3165 St. dev 0.1983 Error characterization [m] eRM S X mean X st. dev. 0.3735 -0.0044 0.2645 Y mean 0.0045 Y st. dev. 0.2637 Table 4.11: Error characterization NBP using linear ranging model(100 trials, 4 slaves and 15 masters). Mean 0.2368 St. dev 0.1614 Error characterization [m] eRM S X mean X st. dev. 0.2865 -8.9045e-004 0.2044 Y mean -0.0043 Y st. dev. 0.2009 Table 4.12: Error characterization NBP using Wymeersch ranging model(100 trials, 4 slaves and 15 masters). NBP dist. outage probability NBP dist. Distance error histogram 250 100 200 10−1 Pout 150 100 10−2 50 0 0 1 0.5 1.5 Error [m] NBP dist. X error histogram 10−3 250 250 200 200 150 150 100 100 50 50 0 −1 −0.5 0 0.5 Error [m] 1 0 0 −1 0.5 1.5 1 Error [m] NBP dist. Y error histogram −0.5 0 0.5 Error [m] 1 Figure 4.11: Error characterization of NBP algorithm using linear ranging model (100 trials, 4 slaves and 15 masters). 35 CHAPTER 4. ALGORITHM EVALUATION NBP dist. Distance error histogram 250 NBP dist. outage probability 100 200 10−1 Pout 150 100 10−3 50 0 10−2 0 0.5 1.5 1 Error [m] NBP dist. X error histogram 250 10−4 0 0.5 1 1.5 Error [m] NBP dist. Y error histogram 300 200 200 150 100 100 50 0 −1 −0.5 0.5 0 Error [m] 1 0 −1 −0.5 0.5 0 Error [m] 1 Figure 4.12: Error characterization of NBP algorithm using Wymeersch ranging model (100 trials, 4 slaves and 15 masters). A.6 Discussion of the results Looking at the previous histograms one can see the dominant profiles in the distributions of the errors, which are mainly Gaussian and Rayleigh. It is widely known that the Rayleigh distribution appears as the norm of two Gaussian distributions and this is exactly what is happening here, because the errors in both vertical and horizontal directions look like Gaussian with zero mean and similar deviation. In fact some of the distributions do not fit exactly with the Rayleigh and the Gaussian distributions but it seems mostly produced by the tails of the histograms, which sometimes are a little bit too heavy. The errors of the ML distributed using the Wymeersch ranging model need a special mention. For an unknown reason the errors in the horizontal and the vertical direction are not Gaussian but a strange mix of two biased distributions, which ends up in a distribution with a peak on the right when the norm is applied. A possible explanation can be found in the cost function. If the reader remember the last of the assumptions explained in Subsection 3.2.1, to make the algorithm more robust, the variance of the cost function is fixed as a high constant value. This big difference between the noise profile introduced in the measurements and the noise model used in the cost function seems to be the main reason of this strange performance. On the other hand it is needed to talk about the accuracy of the algorithms in addition to the distributions of the errors. Numerical results are summarized in Tables 4.13, 4.14. First of all it is necessary to comment the difference between the ranging models. It is easy to see that except in ML distributed, the results are slightly better using the Wymeersch ranging model. Comparing the mean and variance of both models ( Linear : µ = d, σ 2 = 36 CHAPTER 4. ALGORITHM EVALUATION (0.1 + 0.01d)2 ; W ymeersch : µ = −0.0003d2 + 1.0075d − 0.0298, σ 2 = 0.0007 ) it can be seen that in the first case the errors are introduced only by the variance/deviation, but in the second case basically the biased mean produces the errors. The fact of having a comparatively big deviation in the linear model and a moderate bias in the Wymeersch, makes the second one a little more optimistic model. If lower coefficients were chosen in the linear model, the results would be better. So the comparison between ranging models is useful to know the profiles of the errors rather than to evaluate the accuracy, because the coefficients of the models change in every environment and depending on the specific ranging device used. MDS ML cent. LS dist. ML dist. NBP Mean 1.6899 0.2974 0.1909 0.1327 0.3165 St. dev 1.1089 0.2061 0.1020 0.0967 0.1983 Error characterization [m] eRM S X mean X st. dev. 2.0211 0.0149 1.4542 0.3618 -0.0099 0.2524 0.2165 -0.0078 0.1513 0.1641 -0.0027 0.1141 0.3735 -0.0044 0.2645 Y mean -0.0651 -0.0207 -0.0072 -0.0018 0.0045 Y st. dev. 1.4030 0.2583 0.1546 0.1181 0.2637 Table 4.13: Summary table of the errors using linear ranging model for all the algorithms. MDS ML cent. LS dist. ML dist. NBP Mean 1.6436 0.2778 0.1202 0.2385 0.2368 St. dev 1.0706 0.1997 0.0619 0.1010 0.1614 Error characterization [m] eRM S X mean X st. dev. 1.9613 0.0263 1.3991 0.3421 0.0031 0.2285 0.1352 -0.0013 0.0951 0.2590 0.0012 0.1846 0.2865 -0.0008 0.2044 Y mean -0.0489 -0.0052 0.0009 0.0019 -0.0043 Y st. dev. 1.3743 0.2547 0.0961 0.1818 0.2009 Table 4.14: Summary table of the errors using Wymeersch ranging model for all the algorithms. What is useful to evaluate the accuracy is the comparison between algorithms in the same conditions. As it is available in the tables or in the outage probability plots, MDS is the algorithm that produces the roughest estimations, with mean errors around 1 and 2 meters and deviations in the same range. At a second level in accuracy are ML centralized, which improves MDS estimations, and NBP. They produce errors around the 30 cm in mean with deviations under 20 cm. And finally LS and ML distributed produce errors almost always under 0.5 m with means under 15 cm and deviations in the same range. Another point of view to evaluate the accuracy can be taken from the outage probability plots, for example fixing a certain percentage, which is the maximum error that can be reached. To make the comparison easier for the reader, Table 4.15 shows for all the algorithms the value from which the errors obtained are below about 90% of the time. After showing the results, the reader can wonder why ML centralized performs worse than LS and ML distributed, when in fact it has more information and the method is the same but using a different approach. The reason of this strange effect seems to come from the initialization step and the cost function. Due to the complexity of the cost function, it has several local minimums and some of them can be very close to the absolute. To 37 CHAPTER 4. ALGORITHM EVALUATION MDS ML cent. LS dist. ML dist. NBP Max. error [m] Linear ranging model Wymeersch ranging model 3.26 3.12 0.56 0.53 0.32 0.20 0.25 0.34 0.57 0.43 Table 4.15: Values from which the errors obtained are below about 90% of the time. avoid ending up in one of those minimums, the MDS initialization has been used before applying the gradient descent minimization, but sometimes the local minimums are so close to the absolute that the accuracy of MDS is not enough, as shown in Figure 4.13. A brute-force grid-search approach would solve this problem, but the large number of dimensions of the cost function makes it unfeasible. Figure 4.13: Graphic example showing why ML centralized has an accuracy worse than expected This hypothesis has been proved using the true positions instead of the MDS estimations as initialization and checking that the centralized version converges to the true position, thus the accuracies of the distributed and the centralized versions are approximately the same. Before ending this part the conclusions can be summarized saying that LS and ML distributed are the best algorithms working in these conditions, followed by NBP and ML centralized and MDS is the worst by far, basically due to the nature of the approximation introduced by the multidimensional scaling procedure. B Sweep analyses This part analyzes how the algorithms work in different conditions by looking at the evolution of the eRM S . Three parameters have been chosen to be swept: the constant term of the deviation in the linear ranging model (σo ), the number of masters and the range limitation. There is no analysis changing the Wymeersch model because we understand this is a fixed model which does not have to be changed. The parameters used in the algorithms during the simulations are the same used in the previous part. Regarding the following plots, each point consists of 25 trials to make it meaningful. 38 CHAPTER 4. ALGORITHM EVALUATION B.1 Noise sweep In scenarios with 4 slaves and 15 masters and using the parameters fixed before, the results show the evolution of the eRM S while the value σo of the linear ranging model is increasing. Results are shown in Table 4.16 and Figure 4.14. Algorithm MDS ML cent. LS dist. ML dist. NBP 0 1.8483 0.2830 0.1513 0.1482 0.3661 0.1 1.8582 0.3116 0.2306 0.1629 0.3736 σo [m] 0.2 0.3 1.8709 1.8863 0.3472 0.3882 0.2441 0.3157 0.2134 0.2599 0.4165 0.4916 0.4 1.9045 0.4321 0.3924 0.2967 0.5846 0.5 1.9253 0.4779 0.3943 0.3304 0.6475 Table 4.16: Results of eRM S [m] for all the algorithms sweeping σo Errorrms vs σo 2 1.8 MDS ML cent. LS dist. ML dist. NBP 1.6 1.4 erms [m] 1.2 1 0.8 0.6 0.4 0.2 0 0 0.05 0.1 0.15 0.2 0.25 σo [m] 0.3 0.35 0.4 0.45 0.5 Figure 4.14: Evolution of eRM S sweeping σo in the linear ranging model. The errors are respectively in the same range as before but now one can observe an approximate linearity between σo and the errors. Therefore the conclusions of this part are the same as in Subsection 4.2.2 A.6, but adding this linear dependence when using the linear ranging model. 39 CHAPTER 4. ALGORITHM EVALUATION B.2 Number of masters sweep Now the scenarios have 4 slaves but the number of masters changes. Apart from the number of masters, the rest of the parameters are fixed like before. Results are shown in Tables 4.17, 4.18 and Figures 4.15, 4.16. Algorithm MDS ML cent. LS dist. ML dist. NBP 1 1.5976 0.3741 0.4971 0.4603 0.4245 3 1.8929 0.4665 0.2618 0.2920 0.5300 Number of masters 6 9 2.0289 2.0899 0.4854 0.4184 0.2390 0.2189 0.2295 0.1953 0.4692 0.4432 12 2.1171 0.3691 0.2263 0.1809 0.3872 15 1.8582 0.3116 0.2306 0.1629 0.3736 Table 4.17: Results of eRM S [m] for all the algorithms sweeping the number of masters and using the linear ranging model. Errorrms vs number of masters 2.5 2 MDS ML cent. LS dist. ML dist. NBP erms [m] 1.5 1 0.5 0 0 5 Number of masters 10 15 Figure 4.15: Evolution of eRM S sweeping the number of masters and using the linear ranging model. Firstly the first sweep point in the graphs needs to be commented, it corresponds to a scenario with only one master and then there is only communication between slaves and the master, this is why this particular result is so different. Apart from this first point and except MDS, specially using the linear model it is appreciable a tendency to decrease the error while the number of masters increases. 40 CHAPTER 4. ALGORITHM EVALUATION Algorithm MDS ML cent. LS dist. ML dist. NBP 1 1.1742 0.1880 0.2552 0.2591 0.2956 3 1.6858 0.3783 0.2019 0.2644 0.3271 Number of masters 6 9 1.8583 2.0293 0.3548 0.3404 0.1644 0.1508 0.2553 0.2578 0.3447 0.3110 12 2.0362 0.2984 0.1470 0.2583 0.3213 15 1.8119 0.3069 0.1422 0.2619 0.2886 Table 4.18: Results of eRM S [m] for all the algorithms sweeping the number of masters and using the Wymeersch ranging model. Errorrms vs number of masters 2.5 2 MDS ML cent. LS dist. ML dist. NBP erms [m] 1.5 1 0.5 0 0 5 Number of masters 10 15 Figure 4.16: Evolution of eRM S in meters sweeping the number of masters and using the Wymeersch ranging model. What happens in MDS can be understood because it is an algorithm that works better having a rich network with a large number of nodes, and until arriving to a certain number of masters the error does not stop increasing. Anyway it is not easy to obtain clear conclusions from these results but just a few comments. 41 CHAPTER 4. ALGORITHM EVALUATION B.3 Range limitation sweep Now the scenario returns to 15 masters and only the range limitation is swept. Otherwise all the parameters continue being the same as the last simulations. Results are shown in Tables 4.19, 4.20 and Figures 4.17, 4.18. Algorithm MDS ML cent. LS dist. ML dist. NBP 10 32.8002 32.7321 21.9022 26.8579 20.4448 20 11.2117 10.4992 13.5309 17.1878 15.6761 Range limitation [m] 30 40 50 3.1035 2.0828 1.9081 1.9227 0.5787 0.3409 9.1711 0.2518 0.2121 12.6080 11.6125 6.7363 0.3632 0.3909 0.3416 60 1.8511 0.3052 0.2258 0.1629 0.4036 70 1.8582 0.3116 0.2306 0.1629 0.3736 Table 4.19: Results of eRM S [m] for all the algorithms sweeping the range limitation and using the linear ranging model. Errorrms vs range limitation 35 MDS ML cent. LS dist. ML dist. NBP 30 erms [m] 25 20 15 10 5 0 10 20 30 40 50 Range limitation [m] 60 70 Figure 4.17: Evolution of eRM S sweeping the range limitation and using the linear ranging model. Until now all the results had corresponded to scenarios without any kind of range limitation, but in real platforms it is very important. Basically these nodes do not have unlimited coverage, which it is equivalent to have less communications between pairs of nodes. It is fundamental to know which algorithms work better given a range limitation, because it means they can perform with less information. The results are very clear and visible in the plots, NBP is the best one because it is working perfectly with a range limitation of 30 m while the others have not converged. MDS and its evolution ML centralized are not very far from NBP but they need a little more to converge. After that come the 42 CHAPTER 4. ALGORITHM EVALUATION Algorithm MDS ML cent. LS dist. ML dist. NBP 10 32.8634 32.7945 21.8912 26.8578 20.4448 20 11.2728 10.5541 13.2682 17.1896 15.1234 Range limitation [m] 30 40 50 3.0915 2.0671 1.8682 1.8852 0.5478 0.2952 8.4611 0.0734 0.1250 12.6292 11.6170 6.7489 0.2513 0.2405 0.2702 60 1.8186 0.2987 0.1406 0.2619 0.2961 70 1.8119 0.3069 0.1422 0.2619 0.2886 Table 4.20: Results of eRM S [m] for all the algorithms sweeping the range limitation and using the Wymeersch ranging model. Errorrms vs range limitation 35 MDS ML cent. LS dist. ML dist. NBP 30 erms [m] 25 20 15 10 5 0 10 20 30 40 50 Range limitation [m] 60 70 Figure 4.18: Evolution of eRM S sweeping the range limitation and using the Wymeersch ranging model. non-Bayesian algorithms LS and ML distributed. LS still can handle the range limitation more or less acceptable but ML never converges to a global correct solution without full connectivity. This last sweep analysis allows to redefine the classification made earlier. ML is only the best algorithm when full connectivity is considered, otherwise NBP is the best distributed algorithm and ML is the best centralized. 43 CHAPTER 4. ALGORITHM EVALUATION C Timing analysis A simple timing analysis has been performed to provide an idea about how long it takes for the algorithms to converge (Section 4.1). Given the scenario showed in Figure 4.19 with full connectivity, 15 masters and 4 slaves, the time of one trial/execution of each algorithm has been measured and results are shown in Figure 4.20. 50 y coordinate [m] 40 30 20 10 Slaves Masters 0 0 10 30 20 x coordinate [m] 40 50 Figure 4.19: Scenario used for the timing analysis. These times are more relevant in comparison between them than in an absolute way, because depending on the geometry of the scenario or how the algorithms are implemented in a real platform the times will change substantially but the relation will be similar. Another aspect to take into account is the difference between the centralized and the distributed ones. In the centralized these results are the times of execution of a single node, while the distributed are the times of execution of all the individual nodes in parallel. There are basically two reasons that define how long it takes an algorithm to perform. The first one is the processing itself and the second is the amount of data to process. Regarding the second reason, the amount of data to store and process is very different depending on the algorithm. MDS only needs the matrix of distances and the position of the slaves. ML centralized needs the same as MDS and also the estimated position of each master in each iteration. In LS and ML distributed each master needs the vector of distances to all the nodes it has connectivity with and their true or estimated positions. NBP needs to store the vector of distances too and all the samples and weights of each message received. For example in the scenario simulated before it is easy to do some numbers. In MDS the matrix of distances have 361 coefficients ((15 masters + 4 slaves)2 ) and the position of the slaves 8 coefficients (4 slaves × 2 coordinates), in total 369 coefficients. In ML centralized the same plus 30 coefficients (15 masters × 2 coordinates) from the estimated positions of the masters, in total 399 coefficients. In LS and ML distributed each master stores the vector of distances with 18 coefficients and the positions of the rest of nodes with 36 coefficients (18 nodes × 2 coordinates), in total 54 coefficients. In NBP each master 44 CHAPTER 4. ALGORITHM EVALUATION 12 10.5906 Time of execution [s] 10 8 6 4 2 0 0.077299 0.26703 MDS 0.10071 0.09615 ML cent. LS dist. ML dist. NBP Figure 4.20: Times of execution for each algorithm. receive 18 messages with 400 samples each one, in total 21600 coefficients (18 messages × 400 samples × (2 coordinates + 1 weight)). Looking at these values it is easy to understand why NBP takes so much time in comparison with the other four algorithms, because it has to process much more data. 4.2.3 Large networks Even though this master thesis is not focused exactly in scenarios with a large number of nodes, it is not bad to test the implemented algorithms just to compare the results with some others presented in the literature. The scenarios used to execute these simulations have not been created specifically for the situation but are provided by the authors of [3], where some results are shown too. To be exact 40 scenarios are provided consisting of 13 slaves, 100 masters and the matrix of measurements of each one. An important detail is the fact of having only a matrix of measurements per scenario, because in iterative algorithms the same measurements have to be used in all the iterations and the idea was to use a new measurement in each iteration. All the nodes are in an environment of 100 × 100 meters, with a range limitation of 10 meters. The Wymeersch ranging model is used to simulate the measurements and there is a little difference regarding the position of the slaves, now they are spread around the environment and not only on the walls. One of this forty scenarios is shown in Figure 4.21, just to give an idea to the reader. After applying all the algorithms to the 40 scenarios, it is the moment to compare our results with the ones in [3]. In Figure 4.22 it is possible to compare the results of applying SPAWN and all our algorithms. There are no results for ML distributed algorithm because it has been impossible to make it converge to any solution in this type of scenario and for example there is not any result in [3] even though the algorithm is explained and developed. In the same paper there is a plot with results of LS distributed but the data 45 CHAPTER 4. ALGORITHM EVALUATION 100 Slaves Masters Connectivity 90 80 y coordinate [m] 70 60 50 40 30 20 10 0 0 10 20 30 40 50 60 70 x coordinate [m] 80 90 100 Figure 4.21: One of the scenarios provided in [3]. is not provided as is done for example with the SPAWN results, so the reader can look at the paper to better compare the results, although some comments are written below. The results of SPAWN and NBP are very similar, but there are some particular differences that have an explanation. For example in the first case with a probability of 1% there are errors greater than 0.5 m, while in the second case the errors can be greater than 1 m. On the other hand the probability of having errors greater than approximately 1.5 meters is smaller in the second case with the same probability. This difference between the SPAWN and the NBP results can be due to a couple of reasons. The first one could be the intra-node messages used in SPAWN. The second one is the noise model, in our implementation of the algorithm the covariance of the noise added to the samples is considered for simplicity as an identity matrix multiplied by a constant, as suggested as a possible solution in [7], and maybe in [3] the Wymeersch model is included inside, so both ranging models (the one in the environment and the one inside the algorithm) fit perfectly. Another conclusion is the incredible difference between SPAWN/NBP and the rest of the algorithms when the cooperation is extremely needed. Regarding LS distributed, our results are worse than the ones in [3], arriving to twice the probability given a certain error. Since the algorithm has been implemented following the steps in [3], the difference may come from the assumptions decided during the implementation. A possibility is the assumption of the prior, ours assumes an uniform distribution for each node before applying the algorithm and maybe in [3] some knowledge a priori is assumed. About MDS and ML centralized there is not much to say, they work better than LS but continue being far from NBP, which can be considered the best cooperative algorithm after all. 46 CHAPTER 4. ALGORITHM EVALUATION 100 Pout 10−1 SPAWN NBP MDS LS dist. ML cent. 10−2 0 0.5 1 1.5 2 2.5 3 Error[m] 3.5 4 4.5 5 Figure 4.22: Outage probability after applying all the algorithms to the 40 scenarios provided in [3]. 4.3 Emulations To complete this master thesis it seems appropriate and even necessary to take one more step and test the algorithms with real data. But it is not possible to do it directly because the experimental platform described in [6] does not provide a sufficiently large number of nodes and an evolution of that platform is currently under development at the department. Instead of applying the algorithms directly, it is possible to use a commercial platform available at the department and do some emulations to do these tests. The Ubisense Location System [16] is an UWB system too, but works in a different way with respect to the idea of this thesis. It consists of 8 sensors with fixed and known positions and several tags. In order for a tag to be located, it sends pulses, which are received by all sensors, then the position is estimated based on TDoA (Time-Difference-of-Arrival) and AoA (Angle-of-Arrival) applying a kind of LS algorithm. It is important to know too that the sensors are connected by cable and there is no communication between tags. All these reasons force us to do some intermediate steps to be able to test the algorithms with the data from the Ubisense platform. To do these tests it is possible to use some data collected during a measurement campaign in the Signal Processing Lab department at KTH [14]. The purpose of the campaign was to study the accuracy of the Ubisense positioning system. The measurements were taken in the reactor hall R1 at KTH, the sensors were located on the walls and the tags were spread around. After hundreds of executions of the Ubisense system, there are plenty of location estimations for each tag. Apart from the estimations, a laser system was used to obtain the true position of each UWB tag. To have an idea of the environment, the reader can look at Figure 4.23. 47 CHAPTER 4. ALGORITHM EVALUATION Figure 4.23: Left: Total station placed in the center of the R1 hall. Right: Topcon reference measurement prism and UWB tag (white). Photo: Peter Johansson, FOI. 4.3.1 Ranging emulation Once the measurements are available, the emulation consists in calculating the distance measurements from the estimated positions, just the opposite process with respect to what has been explained from the beginning of this thesis. This step assumes that the ranging noise is inside the location estimations, which is not strictly true but it is the only way to perform. Given a set of measurements, at first it has to be chosen which tags are going to be slaves and masters. Arrived at this point slaves are represented by the true positions gathered by the laser system and each master by a cloud of points generated by the Ubisense system during several executions. In each execution only one point of each cloud of points is used, being able to do many executions as points in the clouds. Here it occurs the same problem as in the large network simulations, there is a limited number of measurements and to do a large number of trials the same distance measurements have to be used in all the iterations of an algorithm execution. Before beginning with some emulated scenarios, it is interesting to show the behavior of the emulated ranging. To do this little characterization a true position from the laser system has been taken as a slave and two clouds of points as masters. The distance between slave and master in each execution is calculated as the distance between the slave and one point of the cloud. Otherwise the distance between masters is calculated as the distance between a couple of points in the clouds. The procedure can be better understood looking at Figure 4.24. Figure 4.24: Graphic explanation of the emulated ranging model. Left: Distances slave-master. Right: Distances master-master. Black marker: true position of a slave. White marker: estimated positions of masters. The emulated measurements have an approximate Gaussian profile (Figure 4.25) with a good and moderate deviation, but are biased (Table 4.21). Some other characterizations have been done and more or less the deviation is in the same range but the bias sometimes can be under the true distance and others over or sometimes very little and others higher. The bias and the deviation basically depend on the pair of tags, because depending on the geometry the estimations are better or worse. 48 CHAPTER 4. ALGORITHM EVALUATION Error Mean [m] 0.1581 0.1349 Slave-Master Master-Master Deviation [m] 0.0442 0.0646 Table 4.21: Characterization of the emulated ranging model. Range charac. master-master Range charac. slave-master 20 15 10 True distance 25 True distance 25 20 15 10 5 5 0 6.2 0 3.7 6.3 6.4 6.5 Distance [m] 3.8 3.9 4 Distance [m] Figure 4.25: Histogram of the emulated distance measurements compared with the true distance. 4.3.2 Small network emulation The first set of measurements consists of five tags located only in a part of the reactor hall, as in Figure 4.26. Two hundred points of each tag are collected and used to emulated a couple of scenarios. 25 y coordinate [m] 20 15 10 tagD 5 tagB tagA 0 tagE 0 tagC 5 10 x coordinate [m] Figure 4.26: First set of measurements taken in the reactor hall at KTH. Each asterisk corresponds to an estimated position provided by the Ubisense system. 49 CHAPTER 4. ALGORITHM EVALUATION A Scenario 1 In this first scenario (Figure 4.27), TagB has connectivity with three slaves but tagA only with two due to a range limitation of 8 m. The scenario is ideal to show how tag B takes advantage of the cooperation. Results are shown in Table 4.22 and Figures 4.28, 4.29. Scenario 1 12 Slaves Masters Connectivity y coordinate [m] 10 tagE tagD 8 6 4 tagB 2 0 tagC tagA 0 2 4 6 8 10 x coordinate [m] 12 Figure 4.27: Map of scenario1. Scenario 1 ML cent. Scenario 1 MDS 150 100 100 50 50 0 0 0.5 1 Error [m] Scenario 1 NBP 1.5 100 0 0.4 0.6 Error [m] Scenario 1 LS dist. 0.2 100 50 0 0.2 0.6 0.4 0.8 Error [m] Scenario 1 ML dist. 1 0 0 2 6 4 Error [m] 8 150 100 TagA TagB 50 0 0 2 6 4 Error [m] 8 10 Figure 4.28: Histograms of the errors for each algorithm in scenario 1. 50 0.8 150 50 0 0 10 CHAPTER 4. ALGORITHM EVALUATION TagA TagB Mean [m] St. dev. [m] Mean [m] St.dev. [m] MDS 0.9756 0.0756 0.3982 0.0756 ML cent. 0.4187 0.0524 0.0934 0.0450 NBP 0.7093 0.0787 0.1512 0.0712 LS dist. 6.8238 3.4991 1.1740 3.4991 ML dist. 7.0422 3.6753 1.2314 1.1995 Table 4.22: Mean errors and deviations of scenario 1. y coordinate [m] Scenario 1 ML cent. 10 5 0 10 5 0 10 0 5 x coordinate [m] 0 5 10 x coordinate [m] Scenario 1 NBP Scenario 1 LS dist. y coordinate [m] y coordinate [m] y coordinate [m] Scenario 1 MDS 10 5 0 0 5 10 x coordinate [m] 10 5 0 0 5 10 x coordinate [m] y coordinate [m] Scenario 1 ML dist. Slaves Masters Mean of estimations Individual estimation 10 5 0 0 5 10 x coordinate [m] Figure 4.29: Map of estimations for each algorithm in scenario 1. B Scenario 2 In the second scenario (Figure 4.30), the masters are tags D and E and cooperation is more necessary because both of them only have connectivity with two slaves, using the same range limitation as before 8 meters. Results are shown in Table 4.23 and Figures 4.31, 4.32. 51 CHAPTER 4. ALGORITHM EVALUATION Scenario 2 12 Slaves Masters Connectivity y coordinate [m] 10 8 tagE tagD 6 tagB tagC 4 2 0 tagA 0 2 4 10 6 8 x coordinate [m] 12 Figure 4.30: Map of scenario 2. Scenario 2 MDS Scenario 2 ML cent. 100 60 40 50 20 0 0.8 1 1.2 1.4 1.6 0 0 Error [m] Scenario 2 NBP 60 150 40 100 20 50 0 0 0.2 0.4 0.6 0.8 Error [m] Scenario 2 ML dist. 1 0 0 0.2 0.4 0.6 0.8 8 10 Error [m] Scenario 2 LS dist. 2 4 6 Error [m] 200 TagD TagE 100 0 0 5 10 15 Error [m] Figure 4.31: Histograms of the errors for each algorithm in scenario 2. C Discussion of the results Firstly, LS and ML results need to be commented because the mean and the deviation of the errors are very high. Due to the geometry and the range limitation both algo52 CHAPTER 4. ALGORITHM EVALUATION TagD TagE Mean [m] St. dev. [m] Mean [m] St.dev. [m] MDS 1.0454 0.0618 1.0470 0.0598 ML cent. 0.2905 0.0609 0.5134 0.0822 NBP 0.1716 0.1156 0.3845 0.1211 LS dist. 1.9840 2.2804 2.5470 2.7297 ML dist. 1.3480 2.3265 1.4253 2.4626 Table 4.23: Mean errors and deviations of scenario 2. y coordinate [m] Scenario 2 ML cent. 10 5 0 10 5 0 0 5 10 x coordinate [m] 0 5 10 x coordinate [m] Scenario 2 NBP Scenario 2 LS dist. y coordinate [m] y coordinate [m] y coordinate [m] Scenario 2 MDS 10 5 0 0 5 10 x coordinate [m] 10 5 0 5 0 10 x coordinate [m] y coordinate [m] Scenario 2 ML dist. Slaves Masters Mean of estimations Individual estimation 10 5 0 5 0 10 x coordinate [m] Figure 4.32: Map of estimations for each algorithm in scenario 2. rithms have a cost function with more than one minimum. The ambiguity generated is so great that even in scenario 1 tagA is estimated most of the time in the wrong minimum. Meanwhile in scenario 2 most of the time both tags are well estimated, but still there are some outliers as can be seen in the histograms. Nothing can be done in scenario 1 because the geometry is bad, but in scenario 2 a post-processing similar to what was explained in Subsection 4.2.2 A.3 for LS can be applied. For LS the problem is the same as before, depending on the initialization of the algorithm sometimes there are outliers and 53 CHAPTER 4. ALGORITHM EVALUATION the execution can be repeated to obtain a better result. Otherwise for ML the problem comes more from the difficulty of handling the range limitation imposed than from the initialization and then it is better to reject the bad executions than execute them again. Regarding the other algorithms, the deviations are quite good reaching around 10 cm in the worst case. MDS continues being the worst algorithm and ML cent. and NBP perform more or less at the same level. A detail to take into account is that in scenario 1 the errors of tagA are significantly greater than the ones of tagB because of a couple of reasons. The first one is due to the geometry because tagB is just in the middle and the second is because it has connectivity with three slaves while tagA only with two. 4.3.3 Medium network emulation The second set of measurements has been taken from more than twenty tags but only 17 are useful for emulations, because they are in the same two dimensional plane while the rest are not at the same height. The tags are spread around the reactor hall as in Figure 4.33. Two hundred points per tag are going to be used again. 25 P16 20 P10 P6 Q5 y coordinate [m] Q6 Q7 15 Q4 Q3 Q8 Q1 P4 10 5 Q2 P5 P1 0 P11 P7 0 P2 5 10 x coordinate [m] Figure 4.33: Second set of measurements taken in the reactor hall at KTH. Each asterisk corresponds to an estimated position provided by the Ubisense system. A Scenario 3 Now it is possible to locate 4 slaves on the walls and have a better geometry as shown in Figure 4.34. A range limitation of 9 m has been imposed in the emulated ranging model. With this limitation most of the masters have connectivity with two slaves except four tags that only can communicate with one. This is therefore a scenario where cooperation is needed to work. Results are shown in Table 4.24 and Figures 4.35, 4.36. 54 CHAPTER 4. ALGORITHM EVALUATION Scenario 3 Slaves Masters Connect. 25 y coordinate [m] 20 15 10 5 0 0 5 10 x coordinate [m] Figure 4.34: Map of scenario 3. Scenario 3 MDS Scenario 3 ML cent. 300 600 200 400 100 200 0 0 0.5 1.5 2 Error [m] Scenario 3 NBP 1 2.5 0 1 1.5 Error [m] Scenario 3 LS dist. 2 5 10 Error [m] 15 0.5 1000 300 200 500 100 0 0 0 0.5 1 Error [m] Scenario 3 ML dist. 1.5 0 0 600 400 200 0 0 5 10 Error [m] 15 20 Figure 4.35: Histograms of the errors for each algorithm in scenario 3. 55 CHAPTER 4. ALGORITHM EVALUATION Mean [m] St. dev. [m] MDS 1.0638 0.5564 ML cent. 0.3657 0.2485 NBP 0.3413 0.1855 LS dist. 1.9950 2.4386 ML dist. 2.8592 3.3646 Table 4.24: Mean errors and deviations of scenario 3. Scenario 3 ML cent. 25 20 20 20 15 10 5 y coordinate [m] 25 0 15 10 5 0 5 10 x coordinate [m] 0 5 10 x coordinate [m] Scenario 3 LS dist. Scenario 3 ML dist. 25 25 20 20 15 10 5 15 10 5 0 0 y coordinate [m] y coordinate [m] Scenario 3 NBP 25 y coordinate [m] y coordinate [m] Scenario 3 MDS 0 5 10 x coordinate [m] Slaves Masters Mean of estimations Individual estimation 15 10 5 0 0 0 5 10 x coordinate [m] 0 5 10 x coordinate [m] Figure 4.36: Map of estimations for each algorithm in scenario 3. B Scenario 4 Now the scenario is the same as before, but there is an emulated wall in the middle like in Figure 4.37. This obstacle decreases the communication between masters but not between masters and slaves. Now the cooperation needs to work better than before because there is less communication between masters. Results are shown in Table 4.25 and Figures 4.38, 4.39. 56 CHAPTER 4. ALGORITHM EVALUATION Scenario 4 Slaves Masters Wall Connect. 25 y coordinate [m] 20 15 10 5 0 0 5 10 x coordinate [m] Figure 4.37: Map of scenario 4. Scenario 4 MDS Scenario 4 ML cent. 400 400 200 200 0 0 1 3 2 Error [m] Scenario 4 NBP 4 0 400 2000 200 1000 0 0 1 2 Error [m] Scenario 4 ML dist. 3 10 Error [m] 20 0 0 0 2 Error [m] Scenario 4 LS dist. 3 4 Error [m] 8 1 2 6 1000 500 0 0 5 15 Figure 4.38: Histograms of the errors for each algorithm in scenario 4. 57 CHAPTER 4. ALGORITHM EVALUATION Mean [m] St. dev. [m] MDS 1.8763 0.8688 ML cent. 1.3033 0.3696 NBP 0.4460 0.3244 LS dist. 0.3966 0.5899 ML dist. 2.8592 3.3646 Table 4.25: Mean errors and deviations of scenario 4. Scenario 4 ML cent. 25 20 20 20 15 10 5 y coordinate [m] 25 15 10 5 0 5 10 x coordinate [m] 0 5 10 x coordinate [m] Scenario 4 LS dist. Scenario 4 ML dist. 25 20 20 y coordinate [m] 25 15 10 5 15 10 5 0 0 0 y coordinate [m] Scenario 4 NBP 25 y coordinate [m] y coordinate [m] Scenario 4 MDS 10 0 5 x coordinate [m] Slaves Masters Mean of estimations Individual estimation 15 10 5 0 0 10 0 5 x coordinate [m] 0 5 10 x coordinate [m] Figure 4.39: Map of estimations for each algorithm in scenario 4. C Discussion of the results In scenario 3 the results are very good using ML cent. and NBP, taking into account the level of cooperation required and the emulation assumptions. LS and ML distributed continue having the same problem with the outliers and a post-processing could be appropriate. MDS for example continues performing like always, being an algorithm more appropriate to initialize other algorithms than to estimate alone. 58 CHAPTER 4. ALGORITHM EVALUATION In scenario 4 the performances of MDS, ML cent. and NBP are worse than in scenario 3, but it seems normal because due to the wall the algorithms have less information during the cooperation. ML dist. continues working like before, it means that there are too many outliers without using a post-processing. On the other hand LS dist. works surprisingly well with the presence of the wall and without any post-processing, having only a few outliers. A possible reason is that the new configuration and connectivity of the network fortunately improves the cost functions of the nodes, reducing the effect of the local minimums. 59 Chapter 5 CONCLUSIONS In this thesis, five cooperative localization algorithms have been implemented intended for estimating the positions of the nodes in an UWB system. They all work from the same basis, first obtain the distance measurements between nodes and then each one processes data differently. The algorithms have been characterized by extensive simulations, and finally tested in a few emulations using real data. As shown in the results, each algorithm can be more or less useful depending on the situation. For example LS and ML distributed are the best ones only in case of full connectivity. But once the range limitation decreases, they begin having convergence problems, especially ML. That means that when the cooperation is extremely needed, they can not work properly. In that situation the best options are ML centralized and NBP. If the network is formed by 10-15 masters, both have a similar performance and due to the complexity of NBP, ML centralized would be the first option. Otherwise when networks are very large with a hundred of nodes, NBP is the best by far using the cooperation. Regarding MDS, it has to be said that the algorithm is robust, since it always provides reasonable results, even in very demanding conditions, but its accuracy is very poor in comparison with the others. It can be considered an initialization for ML centralized more than an algorithm itself. However, sometimes the initial estimates provided by MDS are so poor that ML centralizes cannot converge to the true solution. Even though NBP seems to be the most balanced algorithm in all the situations, the accuracy is not everything. The reader has to take into account that it is a distributed algorithm and its time of processing and memory requirement are significantly larger than in the others. Therefore each node needs to be smarter and the power consumption higher. This is the main advantage of a centralized version, which instead needs to process everything in a single processor and in large networks it can be impractical. The conclusions can not finish without mentioning the results obtained from the emulations. It was important to test the algorithms with some real data, and the available measurements obtained from the Ubisense system were the only option until then. The ranging emulation is very similar to the models used in the simulations, therefore the results are meaningful. The level of cooperation needed increases in each emulated scenario, even so the algorithms perform very well in general, only with a couple of exceptions. 61 CHAPTER 5. CONCLUSIONS 5.1 Future work Indoor positioning in wireless networks is a very interesting field of research nowadays, and many research efforts are focused on it. The work done in this thesis is only a small part of what can be done. Below are explained a few ideas to continue the work begun in this project. A first idea to improve the algorithms could be to find a clever way to adjust the step size δ used in the gradient descent method. Until now, all nodes use the same step size from the beginning until the end of the estimation, but it would be better if it is adjusted individually for each node and changing along the process. With this change, the convergence, accuracy and speed of the algorithms would improve together. Another possible extension is to include knowledge about the movement of the nodes in the algorithms. To do this, it would be interesting to fuse the estimations delivered by the implemented algorithms with information coming from inertial sensors. This improvement would increase the range of applications significantly, because in some scenarios the nodes need to move around the environment. For example returning to the firefighters’ scenario, the inclusion of movement and inertial sensors could even make possible not to use slaves/reference nodes. Since in a dangerous situation it is not easy to install slaves due to a matter of time, the fact of not requiring reference nodes would make the application more feasible and efficient. Therefore the research can continue in this line. A possibility is to use a GPS initialization when firefighters enter a building and then rely on the relative localization obtained from the fusion of the UWB system with the inertial sensors. Finally, a potential further development is to implement the algorithms in the real UWB round-trip-time ranging platform, currently under development at the department, and perform some tests similar to the simulations and emulations presented here. 62 LIST OF TABLES 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10 4.11 4.12 4.13 4.14 4.15 4.16 4.17 4.18 4.19 4.20 4.21 4.22 4.23 4.24 Wymeersch ranging model coefficients . . . . . . . . . . . . . . . . . . . . Error characterization MDS using linear ranging model (100 trials, 4 slaves and 15 masters). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Error characterization MDS using Wymeersch ranging model (100 trials, 4 slaves and 15 masters). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Error characterization ML centralized using linear ranging model (100 trials, 4 slaves and 15 masters). . . . . . . . . . . . . . . . . . . . . . . . . . Error characterization ML centralized using Wymeersch ranging model (100 trials, 4 slaves and 15 masters). . . . . . . . . . . . . . . . . . . . . . Error characterization LS distributed using linear ranging model and without outliers post-processing(100 trials, 4 slaves and 15 masters). . . . . . . Error characterization LS distributed using linear ranging model and with outliers post-processing(100 trials, 4 slaves and 15 masters). . . . . . . . . Error characterization LS distributed using Wymeersch ranging model and with outliers post-processing(100 trials, 4 slaves and 15 masters). . . . . . Error characterization ML distributed using linear ranging model(100 trials, 4 slaves and 15 masters). . . . . . . . . . . . . . . . . . . . . . . . . . Error characterization ML distributed using Wymeersch ranging model(100 trials, 4 slaves and 15 masters). . . . . . . . . . . . . . . . . . . . . . . . . Error characterization NBP using linear ranging model(100 trials, 4 slaves and 15 masters). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Error characterization NBP using Wymeersch ranging model(100 trials, 4 slaves and 15 masters). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary table of the errors using linear ranging model for all the algorithms. Summary table of the errors using Wymeersch ranging model for all the algorithms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Values from which the errors obtained are below about 90% of the time. . Results of eRM S [m] for all the algorithms sweeping σo . . . . . . . . . . Results of eRM S [m] for all the algorithms sweeping the number of masters and using the linear ranging model. . . . . . . . . . . . . . . . . . . . . . Results of eRM S [m] for all the algorithms sweeping the number of masters and using the Wymeersch ranging model. . . . . . . . . . . . . . . . . . . Results of eRM S [m] for all the algorithms sweeping the range limitation and using the linear ranging model. . . . . . . . . . . . . . . . . . . . . . Results of eRM S [m] for all the algorithms sweeping the range limitation and using the Wymeersch ranging model. . . . . . . . . . . . . . . . . . . Characterization of the emulated ranging model. . . . . . . . . . . . . . . Mean errors and deviations of scenario 1. . . . . . . . . . . . . . . . . . . Mean errors and deviations of scenario 2. . . . . . . . . . . . . . . . . . . Mean errors and deviations of scenario 3. . . . . . . . . . . . . . . . . . . 26 28 28 29 29 31 32 32 33 33 35 35 37 37 38 39 40 41 42 43 49 51 53 56 63 LIST OF TABLES 4.25 Mean errors and deviations of scenario 4. . . . . . . . . . . . . . . . . . . 64 58 LIST OF FIGURES 1.1 Example of a simple scenario, where nodes 1,3 and 5 have known positions and nodes 2 and 4 need to be located. Each arrow represents a distance measurement between a pair of nodes. . . . . . . . . . . . . . . . . . . . . 2 2.1 Diagram showing the steps of localization process . . . . . . . . . . . . . . 6 3.1 3.2 Classification of the implemented algorithms. . . . . . . . . . . . . . . . . Example scenario showing the location of masters and slaves and their connectivity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Factor graph of the example scenario in Figure 3.2, showing both how information flows in the graph and the operations applied to update it. . . Exchange of messages between different nodes during the correction operation in the scenario showed in Figure 3.2. . . . . . . . . . . . . . . . . . . Messages received by node 2 (a) and (c), and estimated posteriori distributions (b) and (d) in iterations 1 and 2 respectively. . . . . . . . . . . . . 9 3.3 3.4 3.5 Slaves location during simulations in an environment of 50 × 50 m. . . . . Error characterization of MDS algorithm using linear ranging model (100 trials, 4 slaves and 15 masters). . . . . . . . . . . . . . . . . . . . . . . . . 4.3 Error characterization of MDS algorithm using Wymeersch ranging model (100 trials, 4 slaves and 15 masters). . . . . . . . . . . . . . . . . . . . . . 4.4 Error characterization of ML centralized algorithm using linear ranging model (100 trials, 4 slaves and 15 masters). . . . . . . . . . . . . . . . . . 4.5 Error characterization of ML centralized algorithm using Wymeersch ranging model (100 trials, 4 slaves and 15 masters). . . . . . . . . . . . . . . . 4.6 Error characterization of LS distributed algorithm using linear ranging model, with outliers (100 trials, 4 slaves and 15 masters). . . . . . . . . . 4.7 Error characterization of LS distributed algorithm using linear ranging model, without outliers after post-processing (100 trials, 4 slaves and 15 masters). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8 Error characterization of LS distributed algorithm using Wymeersch ranging model, without outliers after post-processing (100 trials, 4 slaves and 15 masters). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.9 Error characterization of ML distributed algorithm using linear ranging model (100 trials, 4 slaves and 15 masters). . . . . . . . . . . . . . . . . . 4.10 Error characterization of ML distributed algorithm using Wymeersch ranging model (100 trials, 4 slaves and 15 masters). . . . . . . . . . . . . . . . 4.11 Error characterization of NBP algorithm using linear ranging model (100 trials, 4 slaves and 15 masters). . . . . . . . . . . . . . . . . . . . . . . . . 4.1 4.2 16 17 17 18 27 28 29 30 30 31 32 33 34 34 35 65 LIST OF FIGURES 4.12 Error characterization of NBP algorithm using Wymeersch ranging model (100 trials, 4 slaves and 15 masters). . . . . . . . . . . . . . . . . . . . . . 4.13 Graphic example showing why ML centralized has an accuracy worse than expected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.14 Evolution of eRM S sweeping σo in the linear ranging model. . . . . . . . . 4.15 Evolution of eRM S sweeping the number of masters and using the linear ranging model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.16 Evolution of eRM S in meters sweeping the number of masters and using the Wymeersch ranging model. . . . . . . . . . . . . . . . . . . . . . . . . 4.17 Evolution of eRM S sweeping the range limitation and using the linear ranging model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.18 Evolution of eRM S sweeping the range limitation and using the Wymeersch ranging model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.19 Scenario used for the timing analysis. . . . . . . . . . . . . . . . . . . . . . 4.20 Times of execution for each algorithm. . . . . . . . . . . . . . . . . . . . . 4.21 One of the scenarios provided in [3]. . . . . . . . . . . . . . . . . . . . . . 4.22 Outage probability after applying all the algorithms to the 40 scenarios provided in [3]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.23 Left: Total station placed in the center of the R1 hall. Right: Topcon reference measurement prism and UWB tag (white). Photo: Peter Johansson, FOI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.24 Graphic explanation of the emulated ranging model. Left: Distances slavemaster. Right: Distances master-master. Black marker: true position of a slave. White marker: estimated positions of masters. . . . . . . . . . . . . 4.25 Histogram of the emulated distance measurements compared with the true distance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.26 First set of measurements taken in the reactor hall at KTH. Each asterisk corresponds to an estimated position provided by the Ubisense system. . . 4.27 Map of scenario1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.28 Histograms of the errors for each algorithm in scenario 1. . . . . . . . . . 4.29 Map of estimations for each algorithm in scenario 1. . . . . . . . . . . . . 4.30 Map of scenario 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.31 Histograms of the errors for each algorithm in scenario 2. . . . . . . . . . 4.32 Map of estimations for each algorithm in scenario 2. . . . . . . . . . . . . 4.33 Second set of measurements taken in the reactor hall at KTH. Each asterisk corresponds to an estimated position provided by the Ubisense system. . . 4.34 Map of scenario 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.35 Histograms of the errors for each algorithm in scenario 3. . . . . . . . . . 4.36 Map of estimations for each algorithm in scenario 3. . . . . . . . . . . . . 4.37 Map of scenario 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.38 Histograms of the errors for each algorithm in scenario 4. . . . . . . . . . 4.39 Map of estimations for each algorithm in scenario 4. . . . . . . . . . . . . 66 36 38 39 40 41 42 43 44 45 46 47 48 48 49 49 50 50 51 52 52 53 54 55 55 56 57 57 58 BIBLIOGRAPHY [1] B. Forssell, Radionavigation Systems, ser. GNSS Technology and Applications Series. Artech House, 2008. [2] H. Liu, H. Darabi, P. Banerjee, and J. Liu, “Survey of Wireless Indoor Positioning Techniques and Systems,” Systems, Man, and Cybernetics, Part C: Applications and Reviews, IEEE Transactions on, vol. 37, no. 6, pp. 1067 –1080, nov. 2007. [3] H. Wymeersch, J. Lien, and M. Win, “Cooperative localization in wireless networks,” Proceedings of the IEEE, vol. 97, no. 2, pp. 427 –450, feb. 2009. [4] J. Rantakokko, J. Rydell, P. Stromback, P. Händel, J. Callmer, D. Tornqvist, F. Gustafsson, M. Jobs, and M. Gruden, “Accurate and reliable soldier and first responder indoor positioning: multisensor systems and cooperative localization,” Wireless Communications, IEEE, vol. 18, no. 2, pp. 10 –18, april 2011. [5] N. Patwari, J. Ash, S. Kyperountas, I. Hero, A.O., R. Moses, and N. Correal, “Locating the nodes: cooperative localization in wireless sensor networks,” Signal Processing Magazine, IEEE, vol. 22, no. 4, pp. 54 – 69, july 2005. [6] A. De Angelis, J. O. Nilsson, I. Skog, P. Händel, and P. Carbone, “Indoor positioning by ultra wide band radio aided inertial navigation,” Metrology and Measurement Systems, vol. 17, no. 3, pp. 447–460, 2010. [7] A. Ihler, I. Fisher, J.W., R. Moses, and A. Willsky, “Nonparametric belief propagation for self-localization of sensor networks,” Selected Areas in Communications, IEEE Journal on, vol. 23, no. 4, pp. 809 – 819, april 2005. [8] M. Arulampalam, S. Maskell, N. Gordon, and T. Clapp, “A tutorial on particle filters for online nonlinear/non-Gaussian Bayesian tracking,” Signal Processing, IEEE Transactions on, vol. 50, no. 2, pp. 174 –188, feb 2002. [9] F. Gustafsson, Statistical Sensor Fusion. Utbildningshuset/Studentlitteratur, 2010. [10] Y. Shang, W. Ruml, Y. Zhang, and M. P. J. Fromherz, “Localization from mere connectivity.” in MobiHoc. ACM, 2003, pp. 201–212. [11] K. V. Deun and L. Delbeke, “Multidimensional Scaling,” http://www.mathpsyc.uni-bonn.de/doc/delbeke/delbeke.htm. Jan 2000, [12] Wikipedia, “Dijkstra’s algorithm Wikipedia, The Free dia,” 2012, [Online; accessed 2-March-2012]. [Online]. http://en.wikipedia.org/wiki/Dijkstra’s algorithm EncyclopeAvailable: 67 BIBLIOGRAPHY [13] N. Patwari, I. Hero, A.O., M. Perkins, N. Correal, and R. O’Dea, “Relative location estimation in wireless sensor networks,” Signal Processing, IEEE Transactions on, vol. 51, no. 8, pp. 2137 – 2148, aug. 2003. [14] A. De Angelis, P. Händel, and J. Rantakokko, “Measurement report. Laser total station campaign in KTH R1 for Ubisense system accuracy evaluation.” KTH Royal Institute of Technology Tech. Rep., Stockholm Sweden, 2012. [Online]. Available: http://urn.kb.se/resolve?urn=urn:nbn:se:kth:diva-98046. [15] Y. Chen, J.-A. Francisco, W. Trappe, and R. Martin, “A Practical Approach to Landmark Deployment for Indoor Localization,” in Sensor and Ad Hoc Communications and Networks, 2006. SECON ’06. 2006 3rd Annual IEEE Communications Society on, vol. 1, sept. 2006, pp. 365 –373. [16] Ubisense Ltd. (2011) The Ubisense Precise Real-time Location System - Series 7000 Sensor. [Online]. Available: http://www.ubisense.net/ 68
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
advertisement