Indoor Positioning Using Raspberry Pi With UWB - Portal

Transcription

U NIVERSITY OF B ERNB ACHELOR T HESISIndoor positioning using Raspberry Piwith UWBAuthor:Mischa W ENGERSupervisors:Jose C ARRERA,Zhongliang Z HAOHead of ResearchP ROFESSOR D R . T ORSTEN B RAUNCommunication and Distributed SystemsInstitute of Computer ScienceJanuary 16, 2019

iiiDeclaration of AuthorshipI, Mischa W ENGER, declare that this thesis titled, “Indoor positioning using Raspberry Pi with UWB” and the work presented in it are my own. I confirm that: This work was done wholly or mainly while in candidature for a research degree at this University. Where any part of this thesis has previously been submitted for a degree orany other qualification at this University or any other institution, this has beenclearly stated. Where I have consulted the published work of others, this is always clearlyattributed. Where I have quoted from the work of others, the source is always given. Withthe exception of such quotations, this thesis is entirely my own work. I have acknowledged all main sources of help. Where the thesis is based on work done by myself jointly with others, I havemade clear exactly what was done by others and what I have contributed myself.Signed:Date:

vUNIVERSITY OF BERNFaculty NameInstitute of Computer ScienceBachelor of Science in Computer ScienceIndoor positioning using Raspberry Pi with UWBby Mischa W ENGERAbstractMany indoor localization solutions rely on common radio signal strength indicationor on Inertial Measurement Units (IMU). In this work, we present a server-based indoor positioning algorithm based on time of flight measurements of ultra-wideband(UWB) signals for ranging, IMUs for movement detection, and floor plan information. We implemented a particle filter to fuse all the information to achieve highindoor localization performance. We evaluated our system, running on a centralized server connected to the target and anchor Raspberry Pi devices equipped withSequitur Pi UWB transmitters, in complex real indoor environments. Moreover, wecompared our system to the commercial indoor localization system Sequitur InGPSLite, distributed by UNISET. Results show that our algorithm could achieve an average tracking error of 0.45m and a 90% accuracy of 0.87m. Thus, our prototypecan keep up with the Sequitur InGPS Lite system and outperforms previous signalstrength implementations, which makes it highly promising for future research.

viiContentsDeclaration of AuthorshipiiiAbstractv1Introduction1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1.2 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1.3 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11222Related Work and Background Theory2.1 Overview of Localization System Research . . . . .2.1.1 Client-based and Server-based Architecture .2.1.2 Fingerprint Localization . . . . . . . . . . . .2.1.3 Range-based Localization . . . . . . . . . . .2.1.4 Pedestrian Dead Reckoning . . . . . . . . . .2.1.5 Hybrid Localization Approaches . . . . . . .2.2 Client and Server-based Localization . . . . . . . . .2.3 Fingerprinting Localization . . . . . . . . . . . . . .2.4 Range Based Localization . . . . . . . . . . . . . . .2.4.1 Propagation Models . . . . . . . . . . . . . .2.4.2 Time of Flight Based Models . . . . . . . . .2.4.3 Multilateration . . . . . . . . . . . . . . . . .2.5 Movement Detection . . . . . . . . . . . . . . . . . .2.6 Particle Filters for Localization . . . . . . . . . . . .2.6.1 Particle Filter: Prediction Phase . . . . . . . .2.6.2 Particle Filter: Observation Phase . . . . . .2.6.3 Particle Filter: Resampling Phase . . . . . . .2.7 Ultra Wideband Radio Technology . . . . . . . . . .3334444556679910111112123Localization System Overview153.1 Localization System Architecture . . . . . . . . . . . . . . . . . . . . . . 153.2 Localization Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164Localization System Implementation194.1 Localization Components Hardware . . . . . . . . . . . . . . . . . . . . 194.2 Localization Components Software . . . . . . . . . . . . . . . . . . . . . 194.3 Ultra Wideband Communication . . . . . . . . . . . . . . . . . . . . . . 225Performance Evaluation5.1 Experiment Setup . . . . . . . . . . . . . . . . .5.2 Experiment Results . . . . . . . . . . . . . . . .5.2.1 Localization Performance in Scenario 15.2.2 Localization Performance in Scenario 25.2.3 Result Analysis . . . . . . . . . . . . . .252526262829

viii6Conclusion and Further Work336.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336.2 Further Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33A Trajectories35A.1 Figures of the Trajectories used in the Experiments . . . . . . . . . . . . 35Bibliography39

ixList of Figures2.12.22.32.4Two Way Ranging . . . . .Time Difference of ArrivalTrilateration . . . . . . . .UWB Frequency Spectrum3.13.2System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Localization Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164.1Minimal Two Way Ranging . . . . . . . . . . . . . . . . . . . . . . . . . 225.15.25.35.45.55.65.75.85.95.105.11Anchor Node Positions of Scenario 1 . . . . . . .Trajectory 5 . . . . . . . . . . . . . . . . . . . . . .Zone Definition . . . . . . . . . . . . . . . . . . .Trajectories 2-4 . . . . . . . . . . . . . . . . . . . .Localization Results of Trajectory 1 and 2 . . . .Localization Results of Trajectory 3 and 4 . . . .Positioning Results Trajectory 5 . . . . . . . . . .CDF Scenario 1 and 2 . . . . . . . . . . . . . . . .CDF Scenario 2 . . . . . . . . . . . . . . . . . . .Bounding Box and Checkpoints for Trajectory 1Trajectory 5 with Bounding Box . . . . . . . . . y 1 . . . . .Trajectory 2 . . . . .Trajectory 3 . . . . .Trajectory 4 . . . . .Trajectory 5 . . . . .WiFi Access Points.353536363737. 8. 9. 10. 13

xiList of Tables2.1Relationship of Pulse Rates and Communication Distance . . . . . . . 134.14.2Hardware Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Spectral Occupation of Predefined Channels. . . . . . . . . . . . . . . . 235.15.25.3Arithmetic Mean of Errors in Trajectories 1 to 4 (meter). . . . . . . . . . 28The Arithmetic Mean of Errors in Trajectory 5 (meter). . . . . . . . . . . 29Comparison of Scenario 1 and 2 . . . . . . . . . . . . . . . . . . . . . . . 29

xiiiList of SDS-TWRSDTAGTDOAToFTWRUDPUWBACKnowledgementAnchor NodeApplication Programming InterfaceCommunication Distributed SystemdeciBellGigaHertzGeneral Purpose Input OutputGlobal Positioning SystemGaussHeuristic Drift EliminationInertial Measurement UnitsInternet of Thingskilo bit per secondK Nearest NeighborLog-normal Distance Path LossMega bit per secondMonte Carlo LocalizationMagnetic FieldMegaHertzMachine LearningMachine 2(to) MachineNon-Line-Of-SightNon-Linear RegressionOperating SystemParticle FilterPulse Repetition FrequencyReal Time Locating SystemRound Trip TimeReceived Signal Strength IndicationSymmetrical Double Sided - Two Way RangingStandard DeviationTArGetTime Difference Of ArrivalTime of FlightTwo Way RangingUser Datagram ProtocolUltra WideBand

1Chapter 1IntroductionIn the past few years a new market of mobile gadgets and connected devices, summedup as Internet of Things (IoT), has evolved. In 2017, more than 20 billion deviceswere connected to the Internet. Forecasts predict more than 70 billion in 2025 [23].This increase in mobile computing has also increased the demand for accurate realtime positioning systems, which led to an active research mainly in indoor positioning system technologies, as there are established solutions for outdoor positioning.In the following, we will shortly present our motivation for this work, our contribution and an overview of the remainder of this document.1.1MotivationLocation-based applications can be applied in many different indoor contexts, suchas entertainment, health, logistic etc. Due to the environmental indoor conditions,with heavy walls armoured with steel and other interferences, a big signal loss is encountered, which makes it hard to detect and decode GPS - the established outdoorglobal positioning system (GPS) - signals [4]. This means that we are forced to usealternative technologies that provide higher accuracy indoors. Although there aremany different approaches to do indoor positioning, it can still be considered as anopen challenging problem, which made it an attractive and active research field.Multilateration positioning using radio signals is one of the most widely used indoor localization approach. Radio-based multilateration positioning uses the emitted radio signal power from several transmitters to estimate the position of a target.Most often, WiFi signals are used because they are already omnipresent in indoorenvironments. However, the radio signal strength is severely affected by environmental conditions, such as furniture, heavy walls etc.Many devices have various embedded inertial sensors - such as most modernsmartphones - or can be equipped with additional sensors. These sensors, e.g. accelerometer, gyroscope and magnetic field sensors, are used to register relative movements of the target. However, relative measurements accumulate errors over time,which leads to extensive long-term errors.Some positioning systems improve the accuracy by using both techniques, absolute radio-based tracking and relative - inertial measurement unit (IMU) based tracking. By combining these two approaches, it is possible to minimize the positioning errors, as the absolute measures can eliminate long-term accumulated errorsof the relative system.Positioning systems can either be client-based, server-based or a hybrid of clientand server-based. Most of the positioning systems - especially for smartphones - areclient-based, such that the position estimation is done on the target device itself. In aserver-based tracking system, the target device sends all recorded data to an externalserver. The server processes the data and transmits the target position to the client.

2Chapter 1. IntroductionIn a hybrid system, the computations are distributed over the client and the server.An accurate indoor positioning system encounters challenging problems. Thenoise in low-cost IMUs, as well as the environmental conditions affecting radiosignals will introduce errors in the tracking process. Moreover, many positioningsystems are client-based, they run directly on the target device with limited computational power and limited energy source, which adds another difficulty.1.2ContributionsIn this thesis, we present a real-time indoor tracking system for continuous positioning and tracking. Our server-based approach provides high accuracy by combiningradio, IMU and floorplan information, which is processed in an enhanced particlefilter algorithm. We fused UWB radio ranging information with IMU motion detection and room recognition using UWB and WiFi fingerprinting.We prototyped our approach on Raspberry Pi devices as anchors and as clients.The localization algorithms were implemented in an external, centralized server.Evaluation results show that our system can keep up with commercial tracking systems. It can achieve an average positioning error of 0.49m and a standard deviationof 0.24m.Our main contributions are: We fused UWB ranging information, IMU sensor data, floorplan constraintsas well as WiFi and UWB room recognition fingerprinting in a particle filter toprovide high localization performance. We implemented a centralized, server-based real-time indoor localization system. We evaluated our server-based system in a real complex indoor scenario, wherewe placed several anchor nodes in a real building and collected data on severalindoor trajectories.1.3OverviewOur work compounds of the following chapters: Chapter 2 provides related workand presents the theoretical background. Chapter 3 highlights our system architecture. In chapter 4 we explain our implementation. The experiment setup and evaluation of our experiments can be found in section 5. Finally, chapter 6 concludes thework, where our findings are summarized.

3Chapter 2Related Work and BackgroundTheoryAccurate indoor localization has been examined for a long time. Many differentsolutions have been developed and presented, using different approaches regardingsystem architecture and localization method. Within these solutions, mostly clientbased architectures can be seen. Moreover, most research focuses on radio-basedlocalization or sensor-based tracking.In this section, we first give a short overview of the different types of localizationsystems used in related work. Afterwards we briefly introduce the different system architectures and the different localization techniques. In this second part of thechapter we distinguish between client and server-based system architectures, we introduce fingerprinting-based and range-based localization techniques, as well as theprinciples of movement detection. The process of information fusion from differentdata sources and the radio technology of ultra wideband is explained in the last partof this section.2.1Overview of Localization System ResearchLocalization systems can either be grouped according to their client, server or hybridarchitecture or according the type of localization technique they use. The differenttypes of localization techniques are: Fingerprinting, range-based approaches, movement recognition-based or hybrid solutions.2.1.1Client-based and Server-based ArchitectureLocalization algorithms can either run on a centralized server or on the client deviceitself. A server-based localization system can be interesting, as it does not requirea specific target device hardware, which makes it fairly scalable. Coordination ofthe different system components and data processing can be done on the server [9].In [5] the system runs on a commodity smartphone, with the benefit of eliminatingfurther communication to an external entity. Such client-based localization systemscan often be deployed without any additional hardware when for example WLANaccess points are already available. The authors of [1] use a hybrid of server andclient-based architecture - ranges are calculated on the client device while networkcontrol and the database are managed on a server. However, their approach stronglyrelies on high-band acoustic signals, which are highly sensitive to ambient noise andinterferences. Furthermore, the long-term exposure of acoustic beacons to humansand animals was not tested, even though some animal species could probably evenhear the beacon sound.

42.1.2Chapter 2. Related Work and Background TheoryFingerprint LocalizationFingerprint localization is a range-free localization method, where radio signals andother measurements that are highly affected by environmental conditions are fingerprinted and stored in a map. The position is estimated by comparing a currentfingerprint to the existing map. The authors of [24] provided a room-based ensemblelearning technique for localization. Their room detection uses averaged coordinateoutputs of a k-NN estimator. In publication [29], the authors propose a discriminative learning method for indoor localization based on a hidden markov model.Their approach is a zone recognition algorithm based on magnetic field and WiFi fingerprints brought together with transition probabilities between zones. Their workonly focused on room level localization, which seems like a big restriction for someindoor applications, where localization within a room can be important.2.1.3Range-based LocalizationIn range-based localization systems, the range is defined as the propagation distancebetween the target and anchor nodes (AN). First, the propagation distances are calculated. Afterwards, many different algorithms can be used to find the absoluteposition of the target. In [28] a received signal strength indicator is used to estimatethe range during the ranging process. A different method to do ranging is usedin [7], where the authors calculated distances by the elapsed time between sending and receiving radio messages. Range-based algorithms are often much lighterand computationally less expensive than fingerprinting methods, as the big effort ingenerating, storing and processing a radio map falls away. However, only relyingon different arrival times of messages can lead to strong influences of environmentalconditions, especially non-line-of-sight (NLOS) connections can strongly differ fromline-of-sight connections.2.1.4Pedestrian Dead ReckoningPedestrian Dead Reckoning (PDR) relies on inertial measurement unit (IMU) readings to find the new position. PDR systems are often not able to calculate absolutepositions, but can calculate relative position changes. This leads to an accumulation of errors over time, which are in most systems eliminated by adding a differentsource of information, such as WiFi signals or floorplan information. Different IMUsensor readings are used to obtain a stride length estimation, a heading direction estimation and step recognition. In [3] gyroscope data is used to determine the headingorientation while accelerometer readings provide the displacement. They defined amethod called Heuristic Drift Elimination (HDE) to minimize the accumulated errors, by adding a specialized sensor deployed on the foot of the pedestrian. Anothermethod to find the heading direction is used in [13], where the authors use a kind ofdigital compass by measuring magnetic field energy. Based on accelerometer readings they classified the movement into a walking and into a running mode. A disadvantage of their strong focus on pedestrians is that these localization techniquescannot easily be adapted for other types of movement than walking and running,like driving.2.1.5Hybrid Localization ApproachesThe different characteristics of different types of localization methods make it obvious, that combined localization systems could achieve higher accuracy. In combined

2.2. Client and Server-based Localization5approaches, especially relative and absolute measurements are fused to have the advantages of both methods. The authors of [16] used a fingerprinting-based solutionin combination with a digital compass. [5] is a particle filter approach that fusesPDR and radio-based ranging, as well as floorplan information into the localizationprocess. Errors in the PDR system are mitigated by the ranging estimations and viceversa. This makes these approaches highly interesting in the research.With our hybrid localization system presented in this work, we tried to overcomethe different disadvantages by fusing information from various sources, all usingalready established technologies, such as radio signal transmitting etc. We also keptour system rather unspecific, such that it does not rely on a special type of locomotion or special movement patterns, in order to be usable in many applications.2.2Client and Server-based LocalizationFor many applications, the system architecture is very important. The environmental conditions, the underlying hardware and also dogmatic thoughts are taken intoaccount for real applications to determine the system architecture. There are twomain types of system architectures - client-based or server-based - that can be distinguished. However, systems using computational resources of both client and serversare possible, where a clear distinction is no longer possible.Client-based architectures have the huge advantage that no additional serverhardware and no additional communication is needed. The client device collectsdata used for the localization and processes it to estimate its own position. A clientbased localization should be used, when standardized target devices with enoughcomputational power and enough energy supply are localized. As all computations are done on the device itself, no further communication to a seperate serveris needed. This ensures that no other application can access the position estimationand it reduces the communication overhead.A server-based system, however, can be more powerful and computationallycomplex than client-based systems, as there are no big hardware restrictions. Theapplication itself runs on a centralized server, whereas the client-device is only involved in the data collection process. Therefore, the client-hardware does not needmuch computational power, which allows also to use different, non-standardizeddevices as a target. Especially when position estimations are not used in applications running on the target device, a server-based architecture is beneficial becauseof the unlimited server capacity. Often, multiple targets are tracked, which is easilypossible with a centralized server approach, as the data of several target devices isdirectly available on the server and can be further processed.2.3Fingerprinting LocalizationFingerprinting localization, also known as radio map based technique, uses a densepositioning of anchor nodes in the indoor area of interest. A set of measurements,often received signal strength information (RSSI), serve as a fingerprint at each location. Measurements are not limited to radio signals, other sources such as magneticfield data can also be used. The more unique these measurements are, the better isthe localization accuracy. Fingerprinting often consists of an offline phase to generate the radio map and an online phase to retrieve the position with a given fingerprint.

6Chapter 2. Related Work and Background TheoryIn the offline phase, a radio map is generated with several fingerprints. The radio map can either consist of different fingerprint measurements at given referencepoints (landmarks) that are used to cover the whole area homogenously, or of fingerprints measured in predefined zones in the area of interest. After this phase, forevery location in the grid, a tuple (location, fingerprint) with a unique fingerprintshould be available.The online phase consists of an observed fingerprint at the target’s location, onwhich the localization algorithm can be applied to associate the fingerprint to similarradio map entries. This association is then used to estimate the target’s location. Theresult can either be a concrete position estimation built on the presence of referencepoints or it can be a probability of the target being in a recognized zone.2.4Range Based LocalizationRange based localization systems depend on an infrastructure in the area of the localization: Target Node (TAG) is the device that is localized. Anchor Nodes (AN) are placed on carefully chosen points in the building toencounter the best coverage of the whole area.The key idea of range-based positioning is to measure the distance between TAGand ANs. With the use of these distances, the exact position of the TAG can beevaluated using multilateration or similar mathematical models. Several differentapproaches are possible to determine the distance to an anchor node. They can beclassified into two groups. In the one hand, there are algorithms using propagation models, which rely on the reduction in power density of electromagnetic wavespropagating through space. On the other hand, algorithms make use of known propagation velocities for radio signals by measuring the time of flight of transmittedwaves.2.4.1Propagation ModelsAn electromagnetic wave loses power when travelling through space. In free space,formula 2.1 explains the relationship between distance and signal strength [25]:Pr Pt (λ/4πr )2 ,(2.1)where Pr is the received signal strength and Pt the transmitted signal strength. λis the wavelength and r the radius, or in other words the distance from the transmitter to the receiver. As this formula is restricted to free-space and often in real indoorenvironments various kinds of obstacles are present, several other approximationsfor the relationship between distance and signal power exist. Many indoor positioning algorithms use received signal strength indication (RSSI) to calculate distancesto the anchor nodes. RSSI is mainly in use because it can be applied to almost everytype of transmitted signal, since RSSI uses universal applicable theory. Two approximations are widely used to take care of the non-free-space environments indoors.A commonly used model for the relationship of distance and RSS is known asLog-normal Distance Path Loss (LDPL), where the path loss in Decibel (dB) is defined as [2]:dPL PL0 10γlog10 ( ) Xg(2.2)d0

2.4. Range Based Localization7with γ as the path loss exponent, PL0 a path loss measurement at reference distance d0 and Xg a zero-mean Gaussian noise. This generic model can be applied tomany different environments. It can even be simplified by defining useful referencedistances like done in [15].LDPL has shown to be rather inaccurate for indoor environments, which led toa path loss model based on Non-Linear Regression (NLR) as used in [6]. In thisapproach, the distance to RSS relationship is modelled with the equation:di αi e βi RSSi .(2.3)di is the distance between the i-th AN and the TAG, RSSi the measured signalstrength at the i-th AN and αi , β i specific coefficients obtained in the area of interest.These two coefficients are rather important for the performance of this approach.They are defined due to extensive calculations based on preliminary measurementsas described in [15].2.4.2Time of Flight Based ModelsA totally different technique to get distance estimations are time of flight based models. Their key idea is that we know the travelling velocity of radio waves, which isapproximately the speed of light (2.997 924 58 108 m s 1 ). When measuring thetime between sending and receiving a radio signal, we can easily convert this timeof flight (ToF) to a distance estimation. Time of flights are determined by gatheringround-trip times (RTT) in radio signal communication. For accurate RTT results thehardware of transmitter and receiver as well as the operating firmware are very important. For the two presented RTT-measuring techniques, the key characteristicsare either a quick responding time or extremely well synchronized sender and receiver.Two way ranging (TWR) is one of these methods to retrieve an accurate roundtrip time. An illustration of the TWR process can be seen in Figure 2.1. When operating in TWR mode, the TAG transmits a message to the ANs and registers the exacttime of transmission. As soon as the message arrives at its destination, the firmwareof the AN instantly captures another timestamp. In an acknowledgement (ACK)message, the timestamp of reception and a timestamp of sending the response istransmitted. When this message arrives at the TAG, again a timestamp is registered.With equation 2.4, the time of flight can now be evaluated [22].To achieve higher accuracy, the communication can be extended with a final message containing two additional timestamps of the requester. This is called symmetrical double-sided two-way ranging (SDS-TWR) [27] and is indicated as optional inFigure 2.1.The time of flight for TWR is evaluated by the following formula:ToF [( TRA TSP ) ( TSA TRP )]/2(2.4)Similarly, the time of flight for SDS-TWR can be evaluated by the formula:ToF [( TRA TSP ) ( TSA TRP ) ( TRF TSA ) ( TSF TRA )]/4(2.5)The timestamps used in formula 2.4 and in formula 2.5 are also indicated in Figure 2.1. The timestamps are defined as: TSP as time of Poll-sending, TRP as time ofPoll-reception, TSA as time of ACK-sending, TRA as time of ACK-reception, TSF as

8Chapter 2. Related Work and Background TheoryF IGURE 2.1: Illustration of TWR and SDS-TWR communicationtime of Final-sending and TRF as time of Final-reception.A second approach for RTT determination is called time difference of arrival(TDOA). While TWR does not need further synchronization between the devices,TDOA requires very precise synchronization of the anchor nodes. This is normallydone by specifying a master node per three to five anchors. For bigger scenarios often multiple dedicated sync masters are used. The master nodes transmit repeatedlyclock synchronization messages, such that every AN gets at least one sync message.An AN can also receive sync messages from multiple masters. In that case it willstore multiple differently synchronized times. To evaluate the time of flight, a TAGin range will broadcast a blink message. This blink message will initialize the ranging process. Every AN that receives this blink, will capture a timestamp of the timeof arrival (or when holding more than one synctime, capture multiple timestamps).These timestamps are forwarded to the server together with a synch ID and a blinktransmitter identity. When a server received at least three timestamps with the samesynch ID, it can estimate the position based on the time of arrival of the initial blinkmessage at each AN. A huge benefit of TDOA is the fact, that the TAG only needsto send one blink message per time interval and will not have to communicate withevery AN separately, as

indoor localization performance. We evaluated our system, running on a central-ized server connected to the target and anchor Raspberry Pi devices equipped with Sequitur Pi UWB transmitters, in complex real indoor environments. Moreover, we compared our system to the commercial indoor localization system Sequitur InGPS Lite, distributed by UNISET.