accurate smartphone indoor positioning using a wsn infrastructure and non-invasive audio for tdoa...

21
Accepted Manuscript Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audio for TDoA estimation ergio I. Lopes, Jos´ e M.N. Vieira, Jo˜ ao Reis, Daniel Albuquerque, Nuno B. Carvalho PII: S1574-1192(14)00155-2 DOI: http://dx.doi.org/10.1016/j.pmcj.2014.09.003 Reference: PMCJ 533 To appear in: Pervasive and Mobile Computing Received date: 3 April 2014 Revised date: 15 July 2014 Accepted date: 5 September 2014 Please cite this article as: S.I. Lopes, J.M.N. Vieira, J. Reis, D. Albuquerque, N.B. Carvalho, Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audio for TDoA estimation, Pervasive and Mobile Computing (2014), http://dx.doi.org/10.1016/j.pmcj.2014.09.003 This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.

Upload: nuno-b

Post on 07-Feb-2017

213 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audio for TDoA estimation

Accepted Manuscript

Accurate smartphone indoor positioning using a WSN infrastructureand non-invasive audio for TDoA estimation

Sergio I. Lopes, Jose M.N. Vieira, Joao Reis, Daniel Albuquerque,Nuno B. Carvalho

PII: S1574-1192(14)00155-2DOI: http://dx.doi.org/10.1016/j.pmcj.2014.09.003Reference: PMCJ 533

To appear in: Pervasive and Mobile Computing

Received date: 3 April 2014Revised date: 15 July 2014Accepted date: 5 September 2014

Please cite this article as: S.I. Lopes, J.M.N. Vieira, J. Reis, D. Albuquerque, N.B. Carvalho,Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audiofor TDoA estimation, Pervasive and Mobile Computing (2014),http://dx.doi.org/10.1016/j.pmcj.2014.09.003

This is a PDF file of an unedited manuscript that has been accepted for publication. As aservice to our customers we are providing this early version of the manuscript. The manuscriptwill undergo copyediting, typesetting, and review of the resulting proof before it is published inits final form. Please note that during the production process errors may be discovered whichcould affect the content, and all legal disclaimers that apply to the journal pertain.

Page 2: Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audio for TDoA estimation

Pervasive and Mobile Computing 00 (2014) 1–20

Pervasiveand MobileComputing

Accurate Smartphone Indoor Positioning using a WSNInfrastructure and Non-Invasive Audio for TDoA Estimation

Sérgio I. Lopes∗a,b,c, José M.N. Vieiraa,c, João Reisd, Daniel Albuquerquea,c,Nuno B. Carvalhoa,d

aDepartment of Electronics, Telecommunications and Informatics, University of Aveiro, PortugalbInstituto Politécnico de Viana do Castelo, Portugal

cInstituto de Engenharia Electrónica e Telemática de Aveiro, PortugaldInstituto de Telecomunicações, Aveiro, Portugal

Abstract

In this paper we propose a reliable acoustic indoor positioning system fully compatible with a conventional smartphone. Theproposed system takes advantage of the smartphone audio I/O and its processing capabilities to perform acoustic ranging in theaudio band using non-invasive audio signals and it has been developed having in mind applications that require high accuracy,such as augmented or virtual reality, gaming or audio guiding applications. The system works in a distributed operation mode,i.e. each smartphone is able to obtain its own position using only acoustic signals. In order to support the positioning system, aWireless Sensor Network (WSN) of synchronized acoustic beacons is proposed. To keep the infrastructure in sync we developedan Automatic Time Synchronization and Syntonization (ATSS) protocol that ensures a sync offset error below 5 µs. Using animproved Time Difference of Arrival (TDoA) estimation approach (that takes advantage of the beacon signals’ periodicity) andby performing Non-Line-of-Sight (NLoS) mitigation, we were able to obtain very stable and accurate position estimates with anabsolute error of less than 10 cm in 95% of the cases and a mean absolute standard deviation of 2.2 cm for a position refresh periodof 350 ms.

c© 2014 Published by Elsevier Ltd.

Keywords:LPS, IPS, smartphone positioning, WSN synchronization, location-aware.

1. Introduction

GPS is the most widely used method for outdoor localization and it provides global coordinates with an accuracywithin 10 meters [1]. GPS signals could also be used indoors when special hardware is considered and powerful digi-tal signal processing techniques are used to extract the Time-of-Flight (ToF) information from the noisy signals beforea position estimate could be computed [2] [3]. Nevertheless, due to its low accuracy, GPS is not suited for indoorcentimeter-level applications. Moreover, effective indoor positioning methods normally use Radio-Frequency (RF)or acoustic signals [4]. Received Signal Strength (RSS), Fingerprinting (FP) and Ultra-Wideband (UWB) are well

∗Corresponding author. Tel.: +351 234 370 355; fax: +351 234 378 157.E-mail addresses: [email protected] (S.I. Lopes), [email protected] (J.M.N. Vieira), [email protected] (J. Reis), [email protected] (D. Albuquerque),[email protected] (N.B. Carvalho).

1

Page 3: Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audio for TDoA estimation

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–20 2

known and widely used RF methods. RSS, is commonly used in low accuracy applications and works by measuringthe power of the received signals to estimate the distance to the transmitters, based on prior knowledge of the trans-mitted power and in the path loss model [5]. FP uses an off-line calibration process to build a map of "fingerprints"that are empirically obtained by taking exhaustive RSS measurements inside a building. When operating a positionestimate is obtained by matching online measurements with the best position in a database that approaches the pre-computed "fingerprint" [6]. UWB positioning systems use narrow pulses with very short duration (subnanosecond)resulting in widely spread radio signals in the frequency domain [7] and in Time of Arrival (ToA) measurements withincreased accuracy, when compared with other RF methods [8] [4]. However, UWB systems need high accuracytiming measurements resulting in complex and costly hardware.

In range-based positioning systems, time measurements are used to estimate the ToA or the Time-Difference-of-Arrival (TDoA) in order to compute a position estimate [9]. UWB systems normally present heavy timing constraintsonly reachable using specific synchronization methods in order to keep all the intervenient nodes in sync, i.e. underthe same universal clock. On the other hand, by using acoustic signals, a time resolution in the order of µs can beeasily achieved using only common off-the-shelf components.

This paper describes an indoor acoustic positioning system that takes advantage of a WSN (Wireless SensorNetwork) infrastructure and non-invasive audio pulses for low-cost ranging which enables effective indoor localizationof conventional smartphones with an absolute error of less than 10 cm in 95% of the cases. The system uses animproved TDoA estimation approach, by taking advantage of the beacon signals’ periodicity and by performing Non-Line-of-Sight (NLoS) mitigation to obtain accurate ranging measurements. This way mobile devices do not need tobe synchronized with the positioning infrastructure. Moreover, a WSN of synchronized acoustic beacons is used tosupport the positioning system and Time Division Multiple Access (TDMA) is used to share the medium in a downlinkmode. Tests using an iPhone 4s were performed in order to evaluate the proposed system in real applications. Fouracoustic beacons were used in a room of approximately 100 m2. Two experiments were taken in order to evaluatethe system performance. The first experiment was held to obtain a quantitative evaluation of the overall system bymeasuring the position estimated in a grid of points in a regular room and a second experiment was taken to obtain aqualitative evaluation of the positioning system when a person equipped with a mobile device is in a moving trajectory.Very stable 2D position estimates were obtained (absolute mean standard deviation less than 2.2 cm when four acousticbeacons were used) and a position refresh rate of 350 ms was achieved.

The paper is organized as following. Section II outlines the overall proposed system including specifications,requirements and system architecture. Section III describes the WSN infrastructure, the acoustic beacon design andthe proposed synchronization method. Section IV describes the positioning approach, i.e., medium access, signaldesign and positioning algorithm. Section V presents the system prototype. Section VI describes the experimentalvalidation and presents a critical error analysis. Section VII is reserved for the results discussion. Finally, further stepsare discussed in conclusions.

2. System Architecture

The proposed system has been developed having in mind applications that require increased accuracy, in the centimeter-level, such as augmented or virtual reality, gaming or audio guiding applications. To achieve these requirements wefocused on the following criteria:

1. Indoor Operation: This requirement limits the use of GPS systems, due to attenuation, multipath and interfer-ence that RF signals suffer when used indoors.

2. Smartphone Compatibility: The system must be compatible with conventional smartphones. This restricts theselection of the sampling frequency of the acoustic signal to the smartphone hardware constraints. Commer-cially available smartphones allow a maximum sampling rate of 44.1 kHz therefore limiting the useful acousticupper band to the Nyquist frequency, i.e. 22.05 kHz. In addition, to avoid synchronization with the beaconsinfrastructure, TDoA measurements should be used in order to perform hyperbolic positioning.

3. High Doppler Tolerance: The system should work when mobile stations are moving with velocities up to2 m/s. This criterion imposes the usage of doppler resilient acoustic signals.

4. Centimeter-level Accuracy: To satisfy this criterion a range-based positioning system based on ToF measure-ments is needed. Moreover, an infrastructure of acoustic beacons with known positions must be used, in orderto circumvent the lack of accuracy of mutual positioning systems.

2

Page 4: Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audio for TDoA estimation

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–20 3

5. Low-Cost Infrastructure: A low density WSN should be used with at least three beacons per room in order toobtain 2D position estimates. The system infrastructure must be based in low-cost and comercial-off-the-shelfcomponents. Once TDoA will be used for ranging, an automatic time synchronization protocol to keep thebeacons in sync must be addressed.

6. System Scalability: The system must work in downlink mode (GPS-like). Furthermore, the WSN infrastructureshould use a star topology per room and rooms must be interconnected through a main router.

In Figure 1 is presented the overall architecture of the proposed positioning system. Due to the modular architec-ture, multiple rooms with unique IDs can be added depending on the needs. Each room forms a star network centeredto an access point acoustic beacon (APAB) that connects to the remaining acoustic beacons (AB) in the room. Agateway node (GW) is used as a bridge to interconnect the system to a 802.11 router. The information about theconfiguration of the system infrastructure and the actual position of each mobile device is stored in a remote databasethat may be accessed in a browser through a common internet connection.

Access Point Acoustic Beacon

Acoustic Beacon

Mobile Device

APAB0AB0

AB1 AB2 AB3 AB4

MD0

MD1 MD2

MD3

Room 1 Room 2

WWW

DB

Positioning Server

Wi-FiRouter

PC

Remote Configuration System Backend

AB5 APAB1

Wi-Fi

WSN APAB2AB6

AB7 APB2 AB9 APAB3

MD4

MD5MD6

MD7

Room 3 Room 4

AB10 AB11

Legend:

Application Server

DB

WSN Gateway

Figure 1: Overall system architecture.

3. WSN Positioning Infrastructure

The positioning infrastructure uses a low-cost WSN infrastructure built with synchronized acoustic beacons speciallydesigned to operate in low density indoor scenarios. The proposed acoustic beacon uses comercial-off-the-shelfcomponents and runs an Automatic Synchronization and Syntonization (ATSS) protocol allowing effective ToA/TDoAranging.

3.1. Acoustic Beacon Design

In Figure 2 is presented the proposed acoustic beacon architecture. The acoustic beacon uses a System-on-Chip (SoC)low-power microcontroller (CC1110) with a built-in low-power RF transceiver. This SoC is compatible with severalRF networking protocol stacks and is widely used with the SimpliciTI (a Texas Instruments proprietary stack) andother IEEE 802.15.4 based stacks. We opted to use the SimpliciTI protocol which enabled us to use the 433 MHzband. This way it was possible to communicate for increased distances with reduced building interferences due toincreased wavelength of the RF signals.

The piezo-tweeter used as the transmitter (Kemo L10) and the microphone used as receiver (WM-61A) are thesame as used in [10] and its frequency response can be observed in detail in Figure 2. Looking at the frequencyresponse of the piezo-tweeter is possible to observe a useful band above 80 dBSPL, in the interval 18 kHz to 22 kHz.

3

Page 5: Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audio for TDoA estimation

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–20 4

For the proposed band, the microphone sensitivity is always above -35 dB. A microphone was added to the beacon toenable mutual location in future releases. This way it will be possible to simplify and automate the system setup in anew room. A Brüel & Kjær 4954A reference microphone was used for measurement and calibration.

uCMSP430F5638

Driver

DAC

Piezo Tweeter

Amp

ADC

DC/DCConverterBatteries

Microphone

Serial Interface

3.3V

3.3V

D1

D2

3.3V

3.3V

RadioTransceiver

CC1110

ExINT

D3

ON/OFF

Antenna3.3V

0 10 20 30 40 50 6030

40

50

60

70

80

90

Frequency (KHz)SP

L/V

@ 1

m (R

e 20

+Pa

)0 10 20 30 40 50 60

�

�

�

�

�

�

�

�

�

Frequency (KHz)

Sens

itivi

ty (d

B)

a) b)

WM-61A Frequency ResponseKemo L10 Frequency Response

Figure 2: Acoustic beacon architecture with transmitter and receiver frequency responses.

3.2. WSN Beacon Synchronization

One major problem faced in synchronization of a distributed WSN comes from the local oscillator used in eachnode. Slight differences in the physical environment and in the hardware itself introduce significant changes in thelocal oscillators thus resulting in deviations of the local frequency of oscillation and consequently in clock drifts overtime [11]. Moreover, Medium Access Control (MAC) delays and packet buffering result in non-deterministic packetdelivery times, thus impeding WSN network protocols to be used to synchronize distributed events [12]. To evade thisproblem, actual WSN range-based acoustic positioning systems use an additional RF transceiver to transmit broadcastsynchronization pulses to all intervenient beacons in a centralized architecture, see [13], [14] and [15]. This commonapproach increases the hardware complexity and its cost.

To avoid this additional RF transceiver we developed a reliable synchronization protocol that achieves a clockoffset error of less than 5 µs. This resulted in ranging measurements with an error standard deviation less than 1 cm.The proposed beacon uses only the built-in RF transceiver for both communication and synchronization tasks. Themain advantages of this approach include: simple hardware design (less components used), reduced cost (uses onlyone radio), reduced RF interference (less bands used) and increased security (sync data could be encrypted).

3.3. Automatic Time Synchronization and Syntonization Protocol

The IEEE 1588 standard [16] was developed thinking in distributed networks requiring a better precision than offeredby the Network Time Protocol (NTP) when a GPS module is not available, due to indoor use or cost constrains. Withthis protocol, it is possible to create a distributed network using a single GPS module to provide a time reference forthe network while maintaining accuracies with orders of magnitude of nanoseconds, see [17] and [18].

The proposed Automatic Time Synchronization and Syntonization (ATSS) protocol presents an internal architec-ture that relies in two main blocks, see Figure 3. The SimpliciTI protocol enables data connectivity between beaconsallowing the creation of star networks. Some changes have been made to allow recording the time of transmission andreception of messages as close as possible to its occurrence. The "Time Sync" block is responsible for managing theexchange of synchronization messages. This way the process of clock synchronization is performed transparently tothe rest of the application. The "Time Trigger" block enables the creation of coordinated events between units witha resolution of 1 ms, but aligned in phase with the remaining units and is also responsible in the adjustment of thesyntonization period. In a higher layer runs the application that has access to the communication channel to exchangemessages, generate timestamps for events detected and schedule events to be triggered in coordination with otherunits.

The IEEE 1588 standard specifies the type of message using a message ID byte with only five types defined[16]: Sync (ID 0), Delay Request (ID 1), Follow Up (ID 2), Delay Response(ID 3) and Management (ID 4), being

4

Page 6: Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audio for TDoA estimation

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–20 5

Application Layer Application Layer

SimpliciTISimpliciTI

RF Transceiver RF Transceiver

Time Trigger

Time Sync

Data Message

Sync Message

Time Trigger

Time Sync

Reference Beacon Generic Beacon

ATSS protocol

Figure 3: Beacon communication layers for synchronization and data exchange with the ATSS protocol included.

the ID’s between 5 and 255 reserved for future implementations. Due to physical limitations in the WSN nodes, asimple version comprised by the set of the first four previous defined messages (IDs from 0 to 3), see Figure 4, wasimplemented. To achieve the best possible results, timestamps should be generated in hardware or as close as possibleto the hardware and the transmitted messages should be composed by the minimum information necessary to proceedwith the time synchronization. The overall synchronization process occurs as follows:

1. Sync [ID 0]: The synchronization process starts with the transmission of a broadcast "Sync" message, in whichis contained a timestamp estimate of the reference beacon, that all the remaining beacons use to register thetime t2.

2. Follow Up [ID 2]: Simultaneously, the reference beacon registers the time t1 after sending the Sync messageand sends its value in the "Follow Up" message.

3. Delay Req(uest) [ID 1]: Later the generic beacon sends the "Delay Req" message and registers the time t3.4. Delay Resp(onse) [ID 3]: When the "Delay Req" message is received, the t4 is registered and transmitted back

in the "Delay Resp" message.

∆tɸ ∆t

t1

ReferenceBeacon

GenericBeacon

t2 t3

t4

Sync Delay Req

t

t

reference timestamp

reference timestamp

t2 - t1 = 8 - 3 = 5 t4 - t3 = 11 - 10 = 1

ɸ

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

Follow Upcontains t1 reference

timestamp

Delay Respcontains t4 reference

timestamp

Figure 4: ATSS protocol message exchange in each synchronization point.

Based on "Sync" and "Follow Up" messages and in its own clock, the generic beacon computes the time differencebetween its own clock and the reference clock. The path delay propagation time is determined in a second transmissionprocess between the beacons using the "Delay Req" and "Delay Resp" messages. The generic beacon can then correctits clock and adapt it to the current path delay propagation time. Assuming a symmetric communication, the pathdelay can be obtained by ∆t = 1

2 [(t2 − t1) + (t4 − t3)], and the offset value (φ) between the clock of the reference andthe synchronized beacon is obtained by φ = (t2 − t1) − ∆t.

The clock syntonization was performed by conducting small periodic corrections as shown in Figure 5. This waythe absolute value of the offset error is considerably reduced. The syntonization correction value (cv) used dependsessentially on the level of accuracy required by the application. The smaller this value is, the greater will be the

5

Page 7: Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audio for TDoA estimation

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–20 6

number of adjustments needed to be performed between synchronization points. The number of necessary corrections(Nc) is related with the offset error after syntonization by φs =

φNc

, see Figure 5.

Reference Time [s]

Offset Error [s]

Syncronized clock Syntonized clock

Synchronization Points

ɸs

ɸ

Figure 5: Improvement of clock offset error when using the ATSS protocol.

3.4. Protocol Evaluation

The presented protocol was evaluated using two beacons configured with a syntonization correction value of 1 µs andboth connected to a pulse generator. For each transmitted pulse from the generator both units record the instant thatthe pulse arrives as a timestamp which is right away transmitted to a PC through a USART/USB connection. Twothousand measurements were taken in order to evaluate the protocol for the synchronization periods of 5 s and 30 s,see offset sync error histograms in Figure 6. A mean absolute sync error of 0.24 µs with a standard deviation of 0.92 µsand a maximum absolute sync error of 4.55 µs were obtained for a sync period of 5 s and a mean absolute sync errorof 0.56 µs with a standard deviation of 0.80 µs and a maximum absolute sync error of 3.23 µs were obtained for async period of 30 s.

−5 −4 −3 −2 −1 0 1 2 3 4 50

5

10

15

20

Offset Sync Error (µs)

% o

f th

e c

ases

(a) Sync period of 5 s.

−5 −4 −3 −2 −1 0 1 2 3 4 50

5

10

15

20

Offset Sync Error (µs)

% o

f th

e c

ases

(b) Sync period of 30 s.

Figure 6: Histograms for measurements of the ATSS protocol offset sync error using a syntonization correction value of 1 µs.

4. Positioning Approach

Positioning can be split in three main stages [19]: coordination, measurement and position estimation. Normally,before ranging, network nodes coordinate with each other typically for synchronization purposes. Depending on themethod used in positioning, time synchronization is a problem that cannot be ignored. The coordination stage isnormally related to synchronization purposes. Synchronization is important in the measurement stage because it isused to notify all the intervenient nodes that a measure will be taken.

4.1. Coordination

In this work, TDMA was used based in a centralized architecture with all the acoustic beacons in sync. In Figure 7is presented the time slot structure used in the coordination process when K beacons are used. For each beacon isreserved a specific time slot for signal transmission. Considering K beacons transmitting, each time slot can be split

6

Page 8: Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audio for TDoA estimation

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–20 7

in three distinct intervals, namely:

S (k) - signal transmission intervalL(k) - listening intervalG(k) - guard time interval

where the time slot duration for beacon k is given by T (k)s = S (k) + L(k) + G(k).

The signal transmission interval (S (k)) is the time that the transmitter needs to send the acoustic pulse. The listeninginterval (L(k)) is the time slice used by the mobile device to estimate the range measurement. For example, using alistening period of 30 ms results in distance measurements up to 10 m. The guard time interval (G(k)) was added toreduce the impact of the room reverberation. Slot synchronism for K beacons is obtained using a slightly bigger guardtime period in the last transmitted signal in the TDMA structure, i.e. G(K−1) > G(k) when 0 ≤ k < K − 1.

L(K-1)S(1)L(0) S(K-1) G(K-1)S(0) ...G(0) L(1) G(1)

Ts(K-1)Ts(0) Ts(1)Time

Figure 7: Proposed TDMA structure.

4.2. Measurement

The measurement stage is based on TDoA estimation by each mobile device. Acoustic beacons were programmed toperiodically transmit frequency modulated pulses, i.e. chirp pulses. The usage of chirp pulses overcomes most of theproblems when compared to the use of pure sine tones such as, poor resolution, low environment noise immunity, shortrange and low robustness to the Doppler effect. The probability of detection of a transmitted chirp is directly relatedwith the signal-to-noise ratio (SNR) rather than the exact waveform of the received signal [20]. Cross-correlation,i.e. matched filtering, between the transmitted and received signals is used to maximize the SNR at the output ofthe correlator, when a known signal plus noise are passed throughout the correlator. Another advantage of usingcross-correlation is the pulse compression rate obtained after correlation, which means that the time resolution in thepeak position estimation can be greatly improved (when compared to a pure sinusoidal tone) thus resulting in distancemeasurements with higher accuracy.

4.2.1. Pulse designSignals with time and frequency diversity, e.g. chirps, are well known in RADAR and represent a case where time andfrequency are booth used to increase the probability of detection. Time bandwidth product (TBP) gives us the relationbetween the time duration of a signal and the range of frequencies (Bandwidth) necessary to its reconstruction. InRADAR, chirps with large TBP are used to obtain narrow compressed peaks and SNR maximization, resulting insignals with increased probability of detection, but also when Doppler tolerance is needed. By increasing TBP andusing adequate weighting in the signal design it is possible to increase: the SNR, the pulse compression (bettertime resolution) and the Doppler tolerance, which highly improves the probability of detection in static and dynamicpositioning scenarios [20].

The ambiguity functions of a BPSK pulse and a chirp pulse using the same frequency band (18 kHz to 22 kHz)and the same duration are compared in Figure 8. The BPSK pulse for a moving speed higher than 0.5 m/s almostdisappears making BPSK pulses useless in systems with mobile stations moving at higher speeds. On the otherhand, chirp pulses can achieve up to ±B/10 Doppler tolerance [21] which improves the detection probability for largeDoppler shifts and thus making them preferable for systems with fast mobile stations, such as humans walking fast orrunning or even fast robots.

Time domain weighting is used to modulate in amplitude the transmitted pulse. Furthermore, a non-invasive audiochirp pulse must be carefully designed in order to avoid spectral spreading that normally appear when fast transientsoccur. In our approach we focused in time domain weighting in order to modulate in amplitude the transmittedsignal thus smoothing its transients and keeping the pulses non-invasive. However this approach leads to a significantreduction in the transmitted power, and therefore a considerable SNR reduction at the output of the correlator. A

7

Page 9: Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audio for TDoA estimation

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–20 8

(a) (b)

Figure 8: Doppler tolerance. a) Ambiguity function for a BPSK pulse with a bandwidth of 4 kHz (18 kHz-22 kHz) and pulse duration of10 ms modulated with a 63 bit Kasami sequence. b) Ambiguity function of a chirp pulse of same bandwidth 4 kHz (18 kHz-22 kHz) andsame duration.

proposed combined weighting window is used to modulate the transmitted chirp pulse in amplitude using two distinctparts. Both parts could be generated using a tapered cosine window (i.e. Tukey window). A Tukey window is arectangular window with the first and last 100.r/2 percent of samples equal to parts of a cosine, were r is a realnumber between 0 and 1. Note that a Hanning window can be seen as a particular case of the Tukey window, whenr = 1. In this case, the proposed window uses the left half of a Hanning window, concatenated with the second halfpart of a Tukey window with r = 0.05, see Figure 9 for a chirp pulse duration of 10 ms.

0 1 2 3 4 5 6 7 8 9 100

0.2

0.4

0.6

0.8

1

Time (ms)

Hanning Window Tukey Window (r = 0.05)

Figure 9: Proposed combined window.

In Figure 10 it is possible to compare other weighting windows with the proposed one and extract five figuresof merit for better evaluation. Two of them, namely the compression ratio (CR) and the peak-sidelobe-level (PSL),evaluate the pulse compression gain. For the proposed weighting pulse, i.e., column (e), CR presents a value of0.40 ms. This value was measured looking to the time interval that the autocorrelation peak drops 6 dB. The PSLvalue represents the difference between the autocorrelation peak and the nearest side-lobe peak and was measuredwith 16.6 dB.

The proposed window enabled the increase of the peak level (PL) energy at the output of the correlator in morethan 5 dB at the cost of a significative reduction of the PSL, see Figure 10, but with the advantage of an increasedpulse compression ratio, see Table 1.

Chirp Weighting B CR PSL PLPulse Window (kHz) TBP (ms) (dB) (dB)

a) Rectangular 2 60 0.60 14.1 0.0b) Hanning 2 60 1.34 46.0 -8.5c) Rectangular 4 120 0.30 13.6 0.0d) Hanning 4 120 0.62 46.4 -8.5e) Combined 4 120 0.40 16.6 -3.5

Table 1: Figures of merit of the chirp pulses presented in Figure 10.

8

Page 10: Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audio for TDoA estimation

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–20 9

0 2 4 6 8 10−1

−0.5

0

0.5

1

t (ms)

Rectangular Window

20 20.5 21 21.5 22

−40

−20

0

f (KHz)

dB

−1 −0.5 0 0.5 1−50

−40

−30

−20

−10

0

t (ms)

dB

0 2 4 6 8 10−1

−0.5

0

0.5

1

t (ms)

Hanning Window

20 20.5 21 21.5 22

−40

−20

0

f (KHz)

−2 −1 0 1 2−100

−50

0

t (ms)

0 2 4 6 8 10−1

−0.5

0

0.5

1

t (ms)

Rectangular Window

18 19 20 21 22

−40

−20

0

f (KHz)

−0.5 0 0.5−50

−40

−30

−20

−10

0

t (ms)

0 2 4 6 8 10−1

−0.5

0

0.5

1

t (ms)

Hanning Window

18 19 20 21 22

−40

−20

0

f (KHz)

−1 −0.5 0 0.5 1−100

−50

0

t (ms)

0 2 4 6 8 10−1

−0.5

0

0.5

1

t (ms)

Combined Window

18 19 20 21 22

−40

−20

0

f (KHz)

−1 −0.5 0 0.5 1−50

−40

−30

−20

−10

0

t (ms)

(a) (b) (c) (d) (e)

Chirp (20-22 kHz) Chirp (18-22 kHz)

Figure 10: Chirp Pulse design. a) and b) columns correspond to a chirp pulses with frequencies raising from 20 to 22 kHz; c), d) and e)columns are related to chirp pulses with frequencies raising from 18 to 22 kHz. First line of plots represents the weighted pulses in thetime domain, second line represents its frequency response and the third line represents its autocorrelation function in time near the centralpeak.

To analyse the audibility of the proposed chirp pulse, a transmitter and a receiver were placed at 1 m distance andan audio capture was performed for each distinct chirp pulse. This experiment was performed using the transmitterand receiver selected in the design of the acoustic beacon, see Figure 2. For each chirp pulse a measure was takenin a regular room with acoustic noise below 40 dBSPL. In Figure 11 is plotted at left the frequency response ofthe three captured pulses and at right is presented for each distinct chirp pulse its correspondent spectrogram. Inall spectrograms is possible to observe the room interference, mainly the multipath effect. In Figure 11 is possibleto compare the spectrogram of the proposed weighting window (Combined Window) with the rectangular windowchirp pulse. By comparing the frequency responses and its spectrogram representations is possible to observe a heavyspectral spreading in fast transients in the rectangular window chirp pulse. This behaviour results in audible spectralcontent (audio clicks) with considerable power in the band from 5 kHz to 18 kHz. On the other hand for the proposedweighting window this phenomenon is heavily mitigated by the use of a combined window that smoothes the transientsthus maintaining a compromise between the energy of the transmitted chirp pulse and its non-invasiveness.

4.2.2. Pulse Instant of Arrival EstimationAfter correlation, a decimated energy estimator Ex based on the L2-norm of the correlated signal Rxs is computed, seeEquation 1.

Ex[i] =

√√√D−1∑

n=0

|Rxs[n + i.D]|2, ∀i ∈ [0,N − 1] (1)

where D represents the size of the L2-norm estimator, i is the frame index in the time domain and N is the totalnumber of frames to process.

Additionally, an adaptive threshold method is used to increase the algorithm performance. The method uses aFIFO buffer, that contains NF samples of the energy estimator Ex. Due to the signal periodicity we selected a valuefor NF that allows the inclusion of all the data needed to compute a position estimate using TDMA. This way, we areable to compute a time-varying Peak-to-Average-Ratio (PAR), see Equation 2, that is defined as the ratio between themaximal and the average signal power values. The dynamic threshold (γ) is directly obtained from PAR and is setto be 15 dB above PAR which based on the Receiver Operator Characteristic (ROC) of the matched filter enables a

9

Page 11: Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audio for TDoA estimation

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–20 10

5 10 15 20 25−45

−40

−35

−30

−25

−20

−15

−10

−5

0

Frequency (kHz)

Ma

gn

itu

de

(d

B)

Rectangular Window

Hanning Window

Combined Window

(a)

Time (ms)

Combined Window

10 20 30 40 50 60 70 80 90 1005

10

15

20

25

Fre

quency

(kH

z)

Hanning Window

5

10

15

20

25

Rectangular Window

5

10

15

20

25

(b)

Figure 11: a) Frequency response and b) spectrogram for each individual weighted chirp pulse measured at the receiver when it is placedat 1 m distance of the transmitter. The correspondent chirp pulses are presented in Figure 10 in columns c) d) and e), respectively.

probability of detection of 0.972 for a probability of false alarm of 10−3 [22].

PAR[i] =maxi≤i<i+NF−1 |Ex[i]|2

1NF

∑NF−1j=0 |Ex[ j − i]|2 , ∀i ∈ [0,N − 1] (2)

Using the decimated energy estimator Ex and the previous computed dynamic threshold γ, a pulse should be validand detectable based on the combination of these two main criteria:

1. The decimated energy estimator Ex should be always above γ.2. A new pulse should only be searched after a W (k) = S (k)+G(k) time interval, counting from the last valid detected

pulse.

A valid peak is then searched in order to obtain the Frame of Arrival (FoA) for each of the incoming pulses in Ex.Each FoA value is defined by τk where k is the index of the transmitted beacon pulses. Each of these values will beused as a starting point for the search of a more accurate peak detection, i.e. the real Instant of Arrival (IoA) that isdefined by τk and is obtained directly from the Rxs signal, as presented in the algorithm of Figure 12.

The algorithm runs in the audio interrupt service routine core, and is called every time a new audio buffer is avail-able for processing. Furthermore, we included Non-Line-of-Sight (NLoS) mitigation to improve the IoA estimationwhich enhances the pulse detection performance in real situations where multipath occur, see NLoS example in Fig-ure 12. Our approach begins with the estimation of the FoA value τk for each incoming pulse only when the twoprevious criteria 1) and 2) are met, see Equation 3.

τk = arg maxi Ex[i], ∀i ∈ [τk−1 + W (k−1), τk−1 + W (k−1) + L(k−1)] (3)

When a peak is detected, a more accurate search of the peak is taken directly from Rxs considering the smallinterval between [τk, τk + δ] frames, where δ represents the number of frames (in the example of Figure 12 five framesare used) selected to restrict this search in the right side of the neighbourhood of τk.

Thereafter, the correspondent IoA search interval in Rxs is obtained by [τk, τk + δ] × D where D is the size of theL2-norm estimator. Then the six greater peaks inside the IoA search interval are computed and sorted by the argument

10

Page 12: Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audio for TDoA estimation

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–20 11

1.26 1.27 1.28 1.29 1.3 1.31 1.32 1.33 1.34 1.35 1.36!50

!40

!30

!20

!10

0

10

20

Time (s)

Mag (

dB

)

Rxs

Ex

1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8!50

!40

!30

!20

!10

0

10

20

Time (s)

Mag (

dB

)

0 0.5 1 1.5 2 2.5!50

!40

!30

!20

!10

0

10

20

Time (s)

Ma

g (

dB

)

Adaptative Threshold

Peak to Average

Ratio

Processing Buffer (FIFO)

τ1 τ2 τ3

Noise Floor

Adaptative Threshold

Peak to Average

Ratio

τ0

Adaptative Threshold

Peak to Average

Ratio

LoS Peak NLoS Peaks

Processing Buffer Zoom

NLoS Mitigation

W(0) = S(0) + G(0) W(1) = S(1) + G(1) W(2) = S(2) + G(2) W(3) = S(3) + G(3)

τ1 + δ

τ1

τ1

Frame of Arrival (FoA)Instant of Arrival (IoA)

IoA searchInterval

Rxs = xcorr (x,s)

Start AISR

End AISR

t > τk-1 + W(k)F

T

Ex = normL2(Rxs,D)

Audio Interrupt Service Routine

Adaptive Thresholding

FIFO

x = readInputBuffer()

Ex > ɣ F

Peak Detection

Push τk into IoA vector (T)

Frame of Arrival(τk) Estimation

T

LaunchesPER

Compute PAR and ɣ

Instant of Arrival IoA (τk) Estimation from

Rxs with NLoS mitigation

~

~

~ ~ ~ ~

~~

Figure 12: Audio Interrupt Service Routine (AISR) algorithm for IoA (τk) estimation at left. Interpretation of the algorithm at right whenfour acoustic beacons transmitting in TDMA are used. The signal Ex shows the L2-norm estimation of the signal after the correlator.

value. The algorithm used to detect the first six local maximums is iterative and starts with the search of the maximumpeak in the search interval followed by its removal in order to prepare the search of the next peak. To remove a peakwe considered 0.5 ms for each side of the detected peak. This value was based on the width of the main lobe presentedin the autocorrelation function of the signal proposed, see Figure 10e. As we are interested only in the LoS pulse, thepeak with lower argument is selected among the other local pulses and assigned to τk. The output of this block is avector T with a τk value per each valid detected pulse.

For the example presented in Figure 12, if a simpler criterion based on the argument of the maximum valuein the IoA search interval is used, the selected τk should point to the first NLoS peak, due to its increased energywhen compared to other local peaks. This introduces the ranging error ∆d presented in Equation 4 which is far fromacceptable in a high accuracy positioning system.

∆d = c.∆t ≈ 342.5 ms−1 × (1.295 s − 1.293 s) ≈ 69 cm (4)

4.3. Position Estimation

Using four acoustic beacons is possible to obtain three TDoA estimates which gives the possibility to compute 3Dposition estimates. If only three beacons are considered, two TDoA estimates can be used to compute a 2D positionestimate. The audio interrupt service routine presented in Figure 12 outputs IoA estimates that need to be converted in

11

Page 13: Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audio for TDoA estimation

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–20 12

a valid TDoA set of measurements. This validation process is represented in the algorithm presented in the Figure 13aand uses a first finite difference operation over the T data vector to obtain the vector dT which is then used to evaluateif each of its elements is lower than T (k)

S when 1 ≤ k < K − 1.

Start PER

k = 0

dTK-k-1 < TS(k)

Position Estimation Routine

Compute 1st finite difference vectordTk = Tk - Tk-1

k < K -1

k++

T

F : Valid IoA set of measurements

End PER

F

T

Generate d vector

Position Estimation Algorithm

Position Estimation Algorithm

with

, ,

were

1) Prepare data

2) Compute a position estimate

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–18 12

Matched Filter

Push τk into IoA vector

x

xc

t1p

th

Start AISR

End AISR

xL > th

T

F

L2 - norm Estimation

Listening Time?

F

xL

IoA Pulse Estimation

Audio Interrupt Service Routine

Adaptive Thresholding

PAR/3

FIFO

Launches PER

NLOS Mitigation(search 1st peak in left neighborhood)

T Read Audio Input Buffer

xL

τk

0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5 1.7

�

�

�

�

�

�

0

10

20

Time (s)

dB

1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7

Adaptative Threshold

Peak to Average

Ratio

NLoS Local Peak

Processing Frame (FIFO)

τ1 τ2 τ3

Noise Floor

Processing Frame Zoom

Adaptative Threshold

Peak to Mean Ratio

τ1 - τ0

NLoS Peak

τ2 - τ0

τ3 - τ0

τ0

∆S1∆L0∆S0 ∆G0 ∆L1 ∆G1slot 0

t0L t0G t1St0S t1L t1G t2S

slot 1

∆S2 ∆L2 ∆G2

t2L t2G t3S

slot 2

∆S3 ∆L3 ∆G3

t3L t3G t2S

slot 3

Figure 14: Audio Interrupt Service Routine (AISR) for IoA (⌧k) estimation at left. Interpretation of the algo-rithm at right with four acoustic beacons transmitting in TDMA. The signal (xL) shows the L2-norm estimationof the signal after matched filter. Circles refer to LoS peaks and triangles represent the first NLoS peaks.

be used to compute a valid di↵erence distance vector (d) to be used by the positioning algorithm. To obtain a groupof dk,0 values, we need to remove the time slices added by TDMA when computing the TDoA estimates, and thenmultiply by the speed of sound. These di↵erence distance dk,0 estimates are obtained using the equation 3,

dk,0 = v[⌧k � ⌧0 � k(�sk + �gk)], with 0 k M � 1 (3)

where k is the acoustic beacon index, v represents the speed of sound, ⌧k the IoA value and �S k and �Gk bothrepresent periods defined in TDMA, see Figure 8. The audio interrupt service routine presented in Figure 14 outputsIoA estimates that need to be converted in a valid TDoA set of measurements. This validation process uses a firstfinite di↵erence operation over the IoA data vector followed by validation based on the observation that each firstfinite di↵erence must be always lower than �S k plus �Gk when 1 k < M � 1. Note that for slot synchronizationis used a slightly bigger guard time in the last transmitted signal (�GM�1) thus allowing the identification of thefirst valid di↵erence distance (d1,0) estimate and thus the identification of all the subsequent di↵erence distance dk,0

measurements when 2 k < M � 1.Finally it is necessary to run the position estimation algorithm in order to obtain an estimate of the position of the

mobile station (x). To solve the localization problem and since TDoA measurements are always noisy, (e.g. thermalnoise, external acoustic noise, sound velocity changes, etc.) the position estimation can be seen as an optimizationproblem. We opted to find the position that minimize the squared error intersection point for all the hyperbolas definedfor each intervenient acoustic beacon. A detailed description of the used method can be found in [1]. The solution forthis optimization problem is given by the set of linear equations and that can be obtained using the equation presentedin Figure 15 b), thus giving a position estimate x.

x = (AT A)�1AT (c � d0d) (4)

12

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–18 13

dtoa

Start PER

k = 0

dtoa(end-k) < Tslot

Position Estimation Routine

Compute 1st Finite Difference

vector dtoa

k < Nan -1

k++

T

F : Valid ToA set of measurements

End PER

F

T

Generate tdoa vector

Position Estimation Algorithm

tdoa

(x,y,z)

toa

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 13

is placed at coordinate (0,0,0) and vectors b and c are given by:

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xi yi zi

37777777777775b =

26666666666664

�d10

�d20

. . .�di0

37777777777775c =

12

26666666666664

k21 � d2

10k2

2 � d220

. . .k2

i � d2i0

37777777777775(4)

and ki is obtained by:

k2i = x2

i + y2i + z2

i (5)

By combining equations 3 and 6,

d0 = x2e + y2

e + z2e (6)

is possible to solve the least-squares problem and come up with a position estimate x with coordinates (xe, ye, ze) [20].

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained directly from this decision, (1) the microphone became close of the ideal centralpoint of the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reductionof the acoustic shadowing e↵ect and the reduction of situations where objects appear between the user head and theroom ceiling, were beacons are normally deployed.

6. Experimental Validation

Experiments were made under equivalent laboratory conditions. The room temperature was measured T = 18�C,and the sound-speed was estimated using the equation c = 331.3 + 0.606 ⇥ T [21], which resulted in 342.5 m/s. Allthe acoustic beacons used in experimental tests were placed at the following fixed positions:

A1: (0.00,0.00,2.52) m

A2: (0.00,8.15,2.52) m

A3: (7.25,0.24,2.52) m

The three acoustic beacons used in experiments are coplanar, i.e. are placed at the same height, in order to reducethe NLoS situations in multiple user scenarios. This introduces a systematic error when the mobile station is usedat lower height values being its impact on error positioning discussed later. Two experiments were taken in orderto evaluate the resulting 2D position estimates. The first experiment was held to obtain a quantitative evaluation ofoverall system by measuring the position estimated to a grid of fixed points in the room and a second experiment wastaken to obtain a qualitative evaluation of the positioning system when a person equipped with a mobile device is in amoving trajectory.

13

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 13

is placed at coordinate (0,0,0) and vectors b and c are given by:

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xi yi zi

37777777777775b =

26666666666664

�d10

�d20

. . .�di0

37777777777775c =

12

26666666666664

k21 � d2

10k2

2 � d220

. . .k2

i � d2i0

37777777777775(4)

and ki is obtained by:

k2i = x2

i + y2i + z2

i (5)

By combining equations 3 and 6,

d0 = x2e + y2

e + z2e (6)

is possible to solve the least-squares problem and come up with a position estimate x with coordinates (xe, ye, ze) [20].

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained directly from this decision, (1) the microphone became close of the ideal centralpoint of the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reductionof the acoustic shadowing e↵ect and the reduction of situations where objects appear between the user head and theroom ceiling, were beacons are normally deployed.

6. Experimental Validation

Experiments were made under equivalent laboratory conditions. The room temperature was measured T = 18�C,and the sound-speed was estimated using the equation c = 331.3 + 0.606 ⇥ T [21], which resulted in 342.5 m/s. Allthe acoustic beacons used in experimental tests were placed at the following fixed positions:

A1: (0.00,0.00,2.52) m

A2: (0.00,8.15,2.52) m

A3: (7.25,0.24,2.52) m

The three acoustic beacons used in experiments are coplanar, i.e. are placed at the same height, in order to reducethe NLoS situations in multiple user scenarios. This introduces a systematic error when the mobile station is usedat lower height values being its impact on error positioning discussed later. Two experiments were taken in orderto evaluate the resulting 2D position estimates. The first experiment was held to obtain a quantitative evaluation ofoverall system by measuring the position estimated to a grid of fixed points in the room and a second experiment wastaken to obtain a qualitative evaluation of the positioning system when a person equipped with a mobile device is in amoving trajectory.

13

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 13

is placed at coordinate (0,0,0) and vectors b and c are given by:

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xi yi zi

37777777777775b =

26666666666664

�d10

�d20

. . .�di0

37777777777775c =

12

26666666666664

k21 � d2

10k2

2 � d220

. . .k2

i � d2i0

37777777777775(4)

and ki is obtained by:

k2i = x2

i + y2i + z2

i (5)

By combining equations 3 and 6,

d0 = x2e + y2

e + z2e (6)

is possible to solve the least-squares problem and come up with a position estimate x with coordinates (xe, ye, ze) [20].

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained directly from this decision, (1) the microphone became close of the ideal centralpoint of the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reductionof the acoustic shadowing e↵ect and the reduction of situations where objects appear between the user head and theroom ceiling, were beacons are normally deployed.

6. Experimental Validation

Experiments were made under equivalent laboratory conditions. The room temperature was measured T = 18�C,and the sound-speed was estimated using the equation c = 331.3 + 0.606 ⇥ T [21], which resulted in 342.5 m/s. Allthe acoustic beacons used in experimental tests were placed at the following fixed positions:

A1: (0.00,0.00,2.52) m

A2: (0.00,8.15,2.52) m

A3: (7.25,0.24,2.52) m

The three acoustic beacons used in experiments are coplanar, i.e. are placed at the same height, in order to reducethe NLoS situations in multiple user scenarios. This introduces a systematic error when the mobile station is usedat lower height values being its impact on error positioning discussed later. Two experiments were taken in orderto evaluate the resulting 2D position estimates. The first experiment was held to obtain a quantitative evaluation ofoverall system by measuring the position estimated to a grid of fixed points in the room and a second experiment wastaken to obtain a qualitative evaluation of the positioning system when a person equipped with a mobile device is in amoving trajectory.

13

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 12

The approach used consists in the continuous search of other local peaks with lower energy for lower ToA, butwith energy above th. This method can be seen as a first peak detector that has the ability to reduce the impact ofmulti-path echoes that appear at the receiver with higher energy and resulted in more accurate ranging measurementsin non-line-of-sight situations.

4.3. Position Estimation

Using four acoustic beacons is possible to obtain three TDoA estimates which gives the possibility to compute 3Dposition estimates. If only three beacons are used, two TDoA estimates can be used to compute a 2D position estimate.Post validation of each group of ToA measurements is need in order to generate a valid TDoA vector to use in thelocalization algorithm. The audio interrupt service routine presented in Figure 15 outputs a vector of ToA estimatesthat need to be converted in a TDoA set of valid measurements. This validation process uses a first finite di↵erenceoperation over the ToA data vector followed by validation based on the observation that each first finite di↵erencemust be always lower than the sum of the signal transmission period plus the guard time period. Note that for slotsynchronization is used a slightly bigger guard time in the last transmitted signal thus allowing the identification ofthe first TDoA valid and thus the identification of all the subsequent TDoA measurements.

dtoa

Start PER

k = 0

dtoa(end-k) < Tslot

Position Estimation Routine

Compute 1st Finite Difference

vector dtoa

k < Nan -1

k++

T

F : Valid ToA group of measurements

End PER

F

T

Generate tdoa vector

Position Estimation Algorithm

tdoa

(x,y,z)

toa

Figure 16: Position Estimation Routine (PER) with TDoA pre-validation.

Finally it is necessary to run the position estimation algorithm in order to obtain an estimate of the position ofthe mobile station. To solve the localization problem and since TDoA measurements are always noisy, (e.g. thermalnoise, external acoustic noise, sound velocity changes, etc.) the position estimation can be seen as an optimizationproblem. We opted to find the position that minimize the squared error intersection point for all the hyperbolas definedfor each intervenient acoustic beacon. A detailed description of the used method can be found in [1]. The solution forthis optimization problem is given by the set of linear equations that can be obtained directly by the equation 3, andgives a position estimate x.

x = (AT A)�1AT (d0b + c) (3)

where, matrix A represents the coordinates of the acoustic beacons in which without loss of generality the beacon A0

12

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 13

is placed at coordinate (0,0,0) and vectors b and c are given by:

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xi yi zi

37777777777775b =

26666666666664

�d10

�d20

. . .�di0

37777777777775c =

12

26666666666664

k21 � d2

10k2

2 � d220

. . .k2

i � d2i0

37777777777775(4)

and ki is obtained by:

k2i = x2

i + y2i + z2

i (5)

By combining equations 3 and 6,

d0 = x2e + y2

e + z2e (6)

is possible to solve the least-squares problem and come up with a position estimate x with coordinates (xe, ye, ze) [20].

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained directly from this decision, (1) the microphone became close of the ideal centralpoint of the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reductionof the acoustic shadowing e↵ect and the reduction of situations where objects appear between the user head and theroom ceiling, were beacons are normally deployed.

6. Experimental Validation

Experiments were made under equivalent laboratory conditions. The room temperature was measured T = 18�C,and the sound-speed was estimated using the equation c = 331.3 + 0.606 ⇥ T [21], which resulted in 342.5 m/s. Allthe acoustic beacons used in experimental tests were placed at the following fixed positions:

A1: (0.00,0.00,2.52) m

A2: (0.00,8.15,2.52) m

A3: (7.25,0.24,2.52) m

The three acoustic beacons used in experiments are coplanar, i.e. are placed at the same height, in order to reducethe NLoS situations in multiple user scenarios. This introduces a systematic error when the mobile station is usedat lower height values being its impact on error positioning discussed later. Two experiments were taken in orderto evaluate the resulting 2D position estimates. The first experiment was held to obtain a quantitative evaluation ofoverall system by measuring the position estimated to a grid of fixed points in the room and a second experiment wastaken to obtain a qualitative evaluation of the positioning system when a person equipped with a mobile device is in amoving trajectory.

13

Position Estimation Algorithm

with

, ,

were

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 13

is placed at coordinate (0,0,0) and vectors b and c are given by:

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xi yi zi

37777777777775b =

26666666666664

�d10

�d20

. . .�di0

37777777777775c =

12

26666666666664

k21 � d2

10k2

2 � d220

. . .k2

i � d2i0

37777777777775(4)

and ki is obtained by:

k2i = x2

i + y2i + z2

i (5)

By combining equations 3 and 6,

d0 =

qx2

e + y2e + z2

e (6)

is possible to solve the least-squares problem and come up with a position estimate x with coordinates (xe, ye, ze) [20].

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained directly from this decision, (1) the microphone became close of the ideal centralpoint of the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reductionof the acoustic shadowing e↵ect and the reduction of situations where objects appear between the user head and theroom ceiling, were beacons are normally deployed.

6. Experimental Validation

Experiments were made under equivalent laboratory conditions. The room temperature was measured T = 18�C,and the sound-speed was estimated using the equation c = 331.3 + 0.606 ⇥ T [21], which resulted in 342.5 m/s. Allthe acoustic beacons used in experimental tests were placed at the following fixed positions:

A1: (0.00,0.00,2.52) m

A2: (0.00,8.15,2.52) m

A3: (7.25,0.24,2.52) m

The three acoustic beacons used in experiments are coplanar, i.e. are placed at the same height, in order to reducethe NLoS situations in multiple user scenarios. This introduces a systematic error when the mobile station is usedat lower height values being its impact on error positioning discussed later. Two experiments were taken in orderto evaluate the resulting 2D position estimates. The first experiment was held to obtain a quantitative evaluation ofoverall system by measuring the position estimated to a grid of fixed points in the room and a second experiment wastaken to obtain a qualitative evaluation of the positioning system when a person equipped with a mobile device is in amoving trajectory.

13

1) Prepare data

2) Compute a position estimate

a) b)

Figure 15: Position Estimation Routine (PER) with TDoA pre-validation.

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xk yk zk

37777777777775d =

26666666666664

d1,0

d2,0

. . .dk,0

37777777777775c =

12

266666666666664

b21 � d2

1,0b2

2 � d22,0

. . .b2

k � d2k,0

377777777777775(5)

b2k = x2

k + y2k + z2

k (6)

d0 =

qx2

e + y2e + z2

e (7)

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained from this decision, (1) the microphone became close of the ideal central pointof the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reduction of the

13

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–18 13

dtoa

Start PER

k = 0

dtoa(end-k) < Tslot

Position Estimation Routine

Compute 1st Finite Difference

vector dtoa

k < Nan -1

k++

T

F : Valid ToA set of measurements

End PER

F

T

Generate tdoa vector

Position Estimation Algorithm

tdoa

(x,y,z)

toa

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 13

is placed at coordinate (0,0,0) and vectors b and c are given by:

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xi yi zi

37777777777775b =

26666666666664

�d10

�d20

. . .�di0

37777777777775c =

12

26666666666664

k21 � d2

10k2

2 � d220

. . .k2

i � d2i0

37777777777775(4)

and ki is obtained by:

k2i = x2

i + y2i + z2

i (5)

By combining equations 3 and 6,

d0 = x2e + y2

e + z2e (6)

is possible to solve the least-squares problem and come up with a position estimate x with coordinates (xe, ye, ze) [20].

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained directly from this decision, (1) the microphone became close of the ideal centralpoint of the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reductionof the acoustic shadowing e↵ect and the reduction of situations where objects appear between the user head and theroom ceiling, were beacons are normally deployed.

6. Experimental Validation

Experiments were made under equivalent laboratory conditions. The room temperature was measured T = 18�C,and the sound-speed was estimated using the equation c = 331.3 + 0.606 ⇥ T [21], which resulted in 342.5 m/s. Allthe acoustic beacons used in experimental tests were placed at the following fixed positions:

A1: (0.00,0.00,2.52) m

A2: (0.00,8.15,2.52) m

A3: (7.25,0.24,2.52) m

The three acoustic beacons used in experiments are coplanar, i.e. are placed at the same height, in order to reducethe NLoS situations in multiple user scenarios. This introduces a systematic error when the mobile station is usedat lower height values being its impact on error positioning discussed later. Two experiments were taken in orderto evaluate the resulting 2D position estimates. The first experiment was held to obtain a quantitative evaluation ofoverall system by measuring the position estimated to a grid of fixed points in the room and a second experiment wastaken to obtain a qualitative evaluation of the positioning system when a person equipped with a mobile device is in amoving trajectory.

13

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 13

is placed at coordinate (0,0,0) and vectors b and c are given by:

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xi yi zi

37777777777775b =

26666666666664

�d10

�d20

. . .�di0

37777777777775c =

12

26666666666664

k21 � d2

10k2

2 � d220

. . .k2

i � d2i0

37777777777775(4)

and ki is obtained by:

k2i = x2

i + y2i + z2

i (5)

By combining equations 3 and 6,

d0 = x2e + y2

e + z2e (6)

is possible to solve the least-squares problem and come up with a position estimate x with coordinates (xe, ye, ze) [20].

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained directly from this decision, (1) the microphone became close of the ideal centralpoint of the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reductionof the acoustic shadowing e↵ect and the reduction of situations where objects appear between the user head and theroom ceiling, were beacons are normally deployed.

6. Experimental Validation

Experiments were made under equivalent laboratory conditions. The room temperature was measured T = 18�C,and the sound-speed was estimated using the equation c = 331.3 + 0.606 ⇥ T [21], which resulted in 342.5 m/s. Allthe acoustic beacons used in experimental tests were placed at the following fixed positions:

A1: (0.00,0.00,2.52) m

A2: (0.00,8.15,2.52) m

A3: (7.25,0.24,2.52) m

The three acoustic beacons used in experiments are coplanar, i.e. are placed at the same height, in order to reducethe NLoS situations in multiple user scenarios. This introduces a systematic error when the mobile station is usedat lower height values being its impact on error positioning discussed later. Two experiments were taken in orderto evaluate the resulting 2D position estimates. The first experiment was held to obtain a quantitative evaluation ofoverall system by measuring the position estimated to a grid of fixed points in the room and a second experiment wastaken to obtain a qualitative evaluation of the positioning system when a person equipped with a mobile device is in amoving trajectory.

13

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 13

is placed at coordinate (0,0,0) and vectors b and c are given by:

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xi yi zi

37777777777775b =

26666666666664

�d10

�d20

. . .�di0

37777777777775c =

12

26666666666664

k21 � d2

10k2

2 � d220

. . .k2

i � d2i0

37777777777775(4)

and ki is obtained by:

k2i = x2

i + y2i + z2

i (5)

By combining equations 3 and 6,

d0 = x2e + y2

e + z2e (6)

is possible to solve the least-squares problem and come up with a position estimate x with coordinates (xe, ye, ze) [20].

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained directly from this decision, (1) the microphone became close of the ideal centralpoint of the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reductionof the acoustic shadowing e↵ect and the reduction of situations where objects appear between the user head and theroom ceiling, were beacons are normally deployed.

6. Experimental Validation

Experiments were made under equivalent laboratory conditions. The room temperature was measured T = 18�C,and the sound-speed was estimated using the equation c = 331.3 + 0.606 ⇥ T [21], which resulted in 342.5 m/s. Allthe acoustic beacons used in experimental tests were placed at the following fixed positions:

A1: (0.00,0.00,2.52) m

A2: (0.00,8.15,2.52) m

A3: (7.25,0.24,2.52) m

The three acoustic beacons used in experiments are coplanar, i.e. are placed at the same height, in order to reducethe NLoS situations in multiple user scenarios. This introduces a systematic error when the mobile station is usedat lower height values being its impact on error positioning discussed later. Two experiments were taken in orderto evaluate the resulting 2D position estimates. The first experiment was held to obtain a quantitative evaluation ofoverall system by measuring the position estimated to a grid of fixed points in the room and a second experiment wastaken to obtain a qualitative evaluation of the positioning system when a person equipped with a mobile device is in amoving trajectory.

13

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 12

The approach used consists in the continuous search of other local peaks with lower energy for lower ToA, butwith energy above th. This method can be seen as a first peak detector that has the ability to reduce the impact ofmulti-path echoes that appear at the receiver with higher energy and resulted in more accurate ranging measurementsin non-line-of-sight situations.

4.3. Position Estimation

Using four acoustic beacons is possible to obtain three TDoA estimates which gives the possibility to compute 3Dposition estimates. If only three beacons are used, two TDoA estimates can be used to compute a 2D position estimate.Post validation of each group of ToA measurements is need in order to generate a valid TDoA vector to use in thelocalization algorithm. The audio interrupt service routine presented in Figure 15 outputs a vector of ToA estimatesthat need to be converted in a TDoA set of valid measurements. This validation process uses a first finite di↵erenceoperation over the ToA data vector followed by validation based on the observation that each first finite di↵erencemust be always lower than the sum of the signal transmission period plus the guard time period. Note that for slotsynchronization is used a slightly bigger guard time in the last transmitted signal thus allowing the identification ofthe first TDoA valid and thus the identification of all the subsequent TDoA measurements.

dtoa

Start PER

k = 0

dtoa(end-k) < Tslot

Position Estimation Routine

Compute 1st Finite Difference

vector dtoa

k < Nan -1

k++

T

F : Valid ToA group of measurements

End PER

F

T

Generate tdoa vector

Position Estimation Algorithm

tdoa

(x,y,z)

toa

Figure 16: Position Estimation Routine (PER) with TDoA pre-validation.

Finally it is necessary to run the position estimation algorithm in order to obtain an estimate of the position ofthe mobile station. To solve the localization problem and since TDoA measurements are always noisy, (e.g. thermalnoise, external acoustic noise, sound velocity changes, etc.) the position estimation can be seen as an optimizationproblem. We opted to find the position that minimize the squared error intersection point for all the hyperbolas definedfor each intervenient acoustic beacon. A detailed description of the used method can be found in [1]. The solution forthis optimization problem is given by the set of linear equations that can be obtained directly by the equation 3, andgives a position estimate x.

x = (AT A)�1AT (d0b + c) (3)

where, matrix A represents the coordinates of the acoustic beacons in which without loss of generality the beacon A0

12

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 13

is placed at coordinate (0,0,0) and vectors b and c are given by:

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xi yi zi

37777777777775b =

26666666666664

�d10

�d20

. . .�di0

37777777777775c =

12

26666666666664

k21 � d2

10k2

2 � d220

. . .k2

i � d2i0

37777777777775(4)

and ki is obtained by:

k2i = x2

i + y2i + z2

i (5)

By combining equations 3 and 6,

d0 = x2e + y2

e + z2e (6)

is possible to solve the least-squares problem and come up with a position estimate x with coordinates (xe, ye, ze) [20].

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained directly from this decision, (1) the microphone became close of the ideal centralpoint of the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reductionof the acoustic shadowing e↵ect and the reduction of situations where objects appear between the user head and theroom ceiling, were beacons are normally deployed.

6. Experimental Validation

Experiments were made under equivalent laboratory conditions. The room temperature was measured T = 18�C,and the sound-speed was estimated using the equation c = 331.3 + 0.606 ⇥ T [21], which resulted in 342.5 m/s. Allthe acoustic beacons used in experimental tests were placed at the following fixed positions:

A1: (0.00,0.00,2.52) m

A2: (0.00,8.15,2.52) m

A3: (7.25,0.24,2.52) m

The three acoustic beacons used in experiments are coplanar, i.e. are placed at the same height, in order to reducethe NLoS situations in multiple user scenarios. This introduces a systematic error when the mobile station is usedat lower height values being its impact on error positioning discussed later. Two experiments were taken in orderto evaluate the resulting 2D position estimates. The first experiment was held to obtain a quantitative evaluation ofoverall system by measuring the position estimated to a grid of fixed points in the room and a second experiment wastaken to obtain a qualitative evaluation of the positioning system when a person equipped with a mobile device is in amoving trajectory.

13

Position Estimation Algorithm

with

, ,

were

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 13

is placed at coordinate (0,0,0) and vectors b and c are given by:

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xi yi zi

37777777777775b =

26666666666664

�d10

�d20

. . .�di0

37777777777775c =

12

26666666666664

k21 � d2

10k2

2 � d220

. . .k2

i � d2i0

37777777777775(4)

and ki is obtained by:

k2i = x2

i + y2i + z2

i (5)

By combining equations 3 and 6,

d0 =

qx2

e + y2e + z2

e (6)

is possible to solve the least-squares problem and come up with a position estimate x with coordinates (xe, ye, ze) [20].

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained directly from this decision, (1) the microphone became close of the ideal centralpoint of the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reductionof the acoustic shadowing e↵ect and the reduction of situations where objects appear between the user head and theroom ceiling, were beacons are normally deployed.

6. Experimental Validation

Experiments were made under equivalent laboratory conditions. The room temperature was measured T = 18�C,and the sound-speed was estimated using the equation c = 331.3 + 0.606 ⇥ T [21], which resulted in 342.5 m/s. Allthe acoustic beacons used in experimental tests were placed at the following fixed positions:

A1: (0.00,0.00,2.52) m

A2: (0.00,8.15,2.52) m

A3: (7.25,0.24,2.52) m

The three acoustic beacons used in experiments are coplanar, i.e. are placed at the same height, in order to reducethe NLoS situations in multiple user scenarios. This introduces a systematic error when the mobile station is usedat lower height values being its impact on error positioning discussed later. Two experiments were taken in orderto evaluate the resulting 2D position estimates. The first experiment was held to obtain a quantitative evaluation ofoverall system by measuring the position estimated to a grid of fixed points in the room and a second experiment wastaken to obtain a qualitative evaluation of the positioning system when a person equipped with a mobile device is in amoving trajectory.

13

1) Prepare data

2) Compute a position estimate

a) b)

Figure 15: Position Estimation Routine (PER) with TDoA pre-validation.

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xk yk zk

37777777777775d =

26666666666664

d1,0

d2,0

. . .dk,0

37777777777775c =

12

266666666666664

b21 � d2

1,0b2

2 � d22,0

. . .b2

k � d2k,0

377777777777775(5)

b2k = x2

k + y2k + z2

k (6)

d0 =

qx2

e + y2e + z2

e (7)

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained from this decision, (1) the microphone became close of the ideal central pointof the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reduction of the

13

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–18 13

dtoa

Start PER

k = 0

dtoa(end-k) < Tslot

Position Estimation Routine

Compute 1st Finite Difference

vector dtoa

k < Nan -1

k++

T

F : Valid ToA set of measurements

End PER

F

T

Generate tdoa vector

Position Estimation Algorithm

tdoa

(x,y,z)

toa

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 13

is placed at coordinate (0,0,0) and vectors b and c are given by:

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xi yi zi

37777777777775b =

26666666666664

�d10

�d20

. . .�di0

37777777777775c =

12

26666666666664

k21 � d2

10k2

2 � d220

. . .k2

i � d2i0

37777777777775(4)

and ki is obtained by:

k2i = x2

i + y2i + z2

i (5)

By combining equations 3 and 6,

d0 = x2e + y2

e + z2e (6)

is possible to solve the least-squares problem and come up with a position estimate x with coordinates (xe, ye, ze) [20].

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained directly from this decision, (1) the microphone became close of the ideal centralpoint of the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reductionof the acoustic shadowing e↵ect and the reduction of situations where objects appear between the user head and theroom ceiling, were beacons are normally deployed.

6. Experimental Validation

Experiments were made under equivalent laboratory conditions. The room temperature was measured T = 18�C,and the sound-speed was estimated using the equation c = 331.3 + 0.606 ⇥ T [21], which resulted in 342.5 m/s. Allthe acoustic beacons used in experimental tests were placed at the following fixed positions:

A1: (0.00,0.00,2.52) m

A2: (0.00,8.15,2.52) m

A3: (7.25,0.24,2.52) m

The three acoustic beacons used in experiments are coplanar, i.e. are placed at the same height, in order to reducethe NLoS situations in multiple user scenarios. This introduces a systematic error when the mobile station is usedat lower height values being its impact on error positioning discussed later. Two experiments were taken in orderto evaluate the resulting 2D position estimates. The first experiment was held to obtain a quantitative evaluation ofoverall system by measuring the position estimated to a grid of fixed points in the room and a second experiment wastaken to obtain a qualitative evaluation of the positioning system when a person equipped with a mobile device is in amoving trajectory.

13

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 13

is placed at coordinate (0,0,0) and vectors b and c are given by:

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xi yi zi

37777777777775b =

26666666666664

�d10

�d20

. . .�di0

37777777777775c =

12

26666666666664

k21 � d2

10k2

2 � d220

. . .k2

i � d2i0

37777777777775(4)

and ki is obtained by:

k2i = x2

i + y2i + z2

i (5)

By combining equations 3 and 6,

d0 = x2e + y2

e + z2e (6)

is possible to solve the least-squares problem and come up with a position estimate x with coordinates (xe, ye, ze) [20].

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained directly from this decision, (1) the microphone became close of the ideal centralpoint of the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reductionof the acoustic shadowing e↵ect and the reduction of situations where objects appear between the user head and theroom ceiling, were beacons are normally deployed.

6. Experimental Validation

Experiments were made under equivalent laboratory conditions. The room temperature was measured T = 18�C,and the sound-speed was estimated using the equation c = 331.3 + 0.606 ⇥ T [21], which resulted in 342.5 m/s. Allthe acoustic beacons used in experimental tests were placed at the following fixed positions:

A1: (0.00,0.00,2.52) m

A2: (0.00,8.15,2.52) m

A3: (7.25,0.24,2.52) m

The three acoustic beacons used in experiments are coplanar, i.e. are placed at the same height, in order to reducethe NLoS situations in multiple user scenarios. This introduces a systematic error when the mobile station is usedat lower height values being its impact on error positioning discussed later. Two experiments were taken in orderto evaluate the resulting 2D position estimates. The first experiment was held to obtain a quantitative evaluation ofoverall system by measuring the position estimated to a grid of fixed points in the room and a second experiment wastaken to obtain a qualitative evaluation of the positioning system when a person equipped with a mobile device is in amoving trajectory.

13

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 13

is placed at coordinate (0,0,0) and vectors b and c are given by:

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xi yi zi

37777777777775b =

26666666666664

�d10

�d20

. . .�di0

37777777777775c =

12

26666666666664

k21 � d2

10k2

2 � d220

. . .k2

i � d2i0

37777777777775(4)

and ki is obtained by:

k2i = x2

i + y2i + z2

i (5)

By combining equations 3 and 6,

d0 = x2e + y2

e + z2e (6)

is possible to solve the least-squares problem and come up with a position estimate x with coordinates (xe, ye, ze) [20].

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained directly from this decision, (1) the microphone became close of the ideal centralpoint of the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reductionof the acoustic shadowing e↵ect and the reduction of situations where objects appear between the user head and theroom ceiling, were beacons are normally deployed.

6. Experimental Validation

Experiments were made under equivalent laboratory conditions. The room temperature was measured T = 18�C,and the sound-speed was estimated using the equation c = 331.3 + 0.606 ⇥ T [21], which resulted in 342.5 m/s. Allthe acoustic beacons used in experimental tests were placed at the following fixed positions:

A1: (0.00,0.00,2.52) m

A2: (0.00,8.15,2.52) m

A3: (7.25,0.24,2.52) m

The three acoustic beacons used in experiments are coplanar, i.e. are placed at the same height, in order to reducethe NLoS situations in multiple user scenarios. This introduces a systematic error when the mobile station is usedat lower height values being its impact on error positioning discussed later. Two experiments were taken in orderto evaluate the resulting 2D position estimates. The first experiment was held to obtain a quantitative evaluation ofoverall system by measuring the position estimated to a grid of fixed points in the room and a second experiment wastaken to obtain a qualitative evaluation of the positioning system when a person equipped with a mobile device is in amoving trajectory.

13

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 12

The approach used consists in the continuous search of other local peaks with lower energy for lower ToA, butwith energy above th. This method can be seen as a first peak detector that has the ability to reduce the impact ofmulti-path echoes that appear at the receiver with higher energy and resulted in more accurate ranging measurementsin non-line-of-sight situations.

4.3. Position Estimation

Using four acoustic beacons is possible to obtain three TDoA estimates which gives the possibility to compute 3Dposition estimates. If only three beacons are used, two TDoA estimates can be used to compute a 2D position estimate.Post validation of each group of ToA measurements is need in order to generate a valid TDoA vector to use in thelocalization algorithm. The audio interrupt service routine presented in Figure 15 outputs a vector of ToA estimatesthat need to be converted in a TDoA set of valid measurements. This validation process uses a first finite di↵erenceoperation over the ToA data vector followed by validation based on the observation that each first finite di↵erencemust be always lower than the sum of the signal transmission period plus the guard time period. Note that for slotsynchronization is used a slightly bigger guard time in the last transmitted signal thus allowing the identification ofthe first TDoA valid and thus the identification of all the subsequent TDoA measurements.

dtoa

Start PER

k = 0

dtoa(end-k) < Tslot

Position Estimation Routine

Compute 1st Finite Difference

vector dtoa

k < Nan -1

k++

T

F : Valid ToA group of measurements

End PER

F

T

Generate tdoa vector

Position Estimation Algorithm

tdoa

(x,y,z)

toa

Figure 16: Position Estimation Routine (PER) with TDoA pre-validation.

Finally it is necessary to run the position estimation algorithm in order to obtain an estimate of the position ofthe mobile station. To solve the localization problem and since TDoA measurements are always noisy, (e.g. thermalnoise, external acoustic noise, sound velocity changes, etc.) the position estimation can be seen as an optimizationproblem. We opted to find the position that minimize the squared error intersection point for all the hyperbolas definedfor each intervenient acoustic beacon. A detailed description of the used method can be found in [1]. The solution forthis optimization problem is given by the set of linear equations that can be obtained directly by the equation 3, andgives a position estimate x.

x = (AT A)�1AT (d0b + c) (3)

where, matrix A represents the coordinates of the acoustic beacons in which without loss of generality the beacon A0

12

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 13

is placed at coordinate (0,0,0) and vectors b and c are given by:

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xi yi zi

37777777777775b =

26666666666664

�d10

�d20

. . .�di0

37777777777775c =

12

26666666666664

k21 � d2

10k2

2 � d220

. . .k2

i � d2i0

37777777777775(4)

and ki is obtained by:

k2i = x2

i + y2i + z2

i (5)

By combining equations 3 and 6,

d0 = x2e + y2

e + z2e (6)

is possible to solve the least-squares problem and come up with a position estimate x with coordinates (xe, ye, ze) [20].

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained directly from this decision, (1) the microphone became close of the ideal centralpoint of the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reductionof the acoustic shadowing e↵ect and the reduction of situations where objects appear between the user head and theroom ceiling, were beacons are normally deployed.

6. Experimental Validation

Experiments were made under equivalent laboratory conditions. The room temperature was measured T = 18�C,and the sound-speed was estimated using the equation c = 331.3 + 0.606 ⇥ T [21], which resulted in 342.5 m/s. Allthe acoustic beacons used in experimental tests were placed at the following fixed positions:

A1: (0.00,0.00,2.52) m

A2: (0.00,8.15,2.52) m

A3: (7.25,0.24,2.52) m

The three acoustic beacons used in experiments are coplanar, i.e. are placed at the same height, in order to reducethe NLoS situations in multiple user scenarios. This introduces a systematic error when the mobile station is usedat lower height values being its impact on error positioning discussed later. Two experiments were taken in orderto evaluate the resulting 2D position estimates. The first experiment was held to obtain a quantitative evaluation ofoverall system by measuring the position estimated to a grid of fixed points in the room and a second experiment wastaken to obtain a qualitative evaluation of the positioning system when a person equipped with a mobile device is in amoving trajectory.

13

Position Estimation Algorithm

with

, ,

were

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 13

is placed at coordinate (0,0,0) and vectors b and c are given by:

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xi yi zi

37777777777775b =

26666666666664

�d10

�d20

. . .�di0

37777777777775c =

12

26666666666664

k21 � d2

10k2

2 � d220

. . .k2

i � d2i0

37777777777775(4)

and ki is obtained by:

k2i = x2

i + y2i + z2

i (5)

By combining equations 3 and 6,

d0 =

qx2

e + y2e + z2

e (6)

is possible to solve the least-squares problem and come up with a position estimate x with coordinates (xe, ye, ze) [20].

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained directly from this decision, (1) the microphone became close of the ideal centralpoint of the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reductionof the acoustic shadowing e↵ect and the reduction of situations where objects appear between the user head and theroom ceiling, were beacons are normally deployed.

6. Experimental Validation

Experiments were made under equivalent laboratory conditions. The room temperature was measured T = 18�C,and the sound-speed was estimated using the equation c = 331.3 + 0.606 ⇥ T [21], which resulted in 342.5 m/s. Allthe acoustic beacons used in experimental tests were placed at the following fixed positions:

A1: (0.00,0.00,2.52) m

A2: (0.00,8.15,2.52) m

A3: (7.25,0.24,2.52) m

The three acoustic beacons used in experiments are coplanar, i.e. are placed at the same height, in order to reducethe NLoS situations in multiple user scenarios. This introduces a systematic error when the mobile station is usedat lower height values being its impact on error positioning discussed later. Two experiments were taken in orderto evaluate the resulting 2D position estimates. The first experiment was held to obtain a quantitative evaluation ofoverall system by measuring the position estimated to a grid of fixed points in the room and a second experiment wastaken to obtain a qualitative evaluation of the positioning system when a person equipped with a mobile device is in amoving trajectory.

13

1) Prepare data

2) Compute a position estimate

a) b)

Figure 15: Position Estimation Routine (PER) with TDoA pre-validation.

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xk yk zk

37777777777775d =

26666666666664

d1,0

d2,0

. . .dk,0

37777777777775c =

12

266666666666664

b21 � d2

1,0b2

2 � d22,0

. . .b2

k � d2k,0

377777777777775(5)

b2k = x2

k + y2k + z2

k (6)

d0 =

qx2

e + y2e + z2

e (7)

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained from this decision, (1) the microphone became close of the ideal central pointof the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reduction of the

13

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–18 13

dtoa

Start PER

k = 0

dtoa(end-k) < Tslot

Position Estimation Routine

Compute 1st Finite Difference

vector dtoa

k < Nan -1

k++

T

F : Valid ToA set of measurements

End PER

F

T

Generate tdoa vector

Position Estimation Algorithm

tdoa

(x,y,z)

toa

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 13

is placed at coordinate (0,0,0) and vectors b and c are given by:

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xi yi zi

37777777777775b =

26666666666664

�d10

�d20

. . .�di0

37777777777775c =

12

26666666666664

k21 � d2

10k2

2 � d220

. . .k2

i � d2i0

37777777777775(4)

and ki is obtained by:

k2i = x2

i + y2i + z2

i (5)

By combining equations 3 and 6,

d0 = x2e + y2

e + z2e (6)

is possible to solve the least-squares problem and come up with a position estimate x with coordinates (xe, ye, ze) [20].

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained directly from this decision, (1) the microphone became close of the ideal centralpoint of the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reductionof the acoustic shadowing e↵ect and the reduction of situations where objects appear between the user head and theroom ceiling, were beacons are normally deployed.

6. Experimental Validation

Experiments were made under equivalent laboratory conditions. The room temperature was measured T = 18�C,and the sound-speed was estimated using the equation c = 331.3 + 0.606 ⇥ T [21], which resulted in 342.5 m/s. Allthe acoustic beacons used in experimental tests were placed at the following fixed positions:

A1: (0.00,0.00,2.52) m

A2: (0.00,8.15,2.52) m

A3: (7.25,0.24,2.52) m

The three acoustic beacons used in experiments are coplanar, i.e. are placed at the same height, in order to reducethe NLoS situations in multiple user scenarios. This introduces a systematic error when the mobile station is usedat lower height values being its impact on error positioning discussed later. Two experiments were taken in orderto evaluate the resulting 2D position estimates. The first experiment was held to obtain a quantitative evaluation ofoverall system by measuring the position estimated to a grid of fixed points in the room and a second experiment wastaken to obtain a qualitative evaluation of the positioning system when a person equipped with a mobile device is in amoving trajectory.

13

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 13

is placed at coordinate (0,0,0) and vectors b and c are given by:

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xi yi zi

37777777777775b =

26666666666664

�d10

�d20

. . .�di0

37777777777775c =

12

26666666666664

k21 � d2

10k2

2 � d220

. . .k2

i � d2i0

37777777777775(4)

and ki is obtained by:

k2i = x2

i + y2i + z2

i (5)

By combining equations 3 and 6,

d0 = x2e + y2

e + z2e (6)

is possible to solve the least-squares problem and come up with a position estimate x with coordinates (xe, ye, ze) [20].

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained directly from this decision, (1) the microphone became close of the ideal centralpoint of the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reductionof the acoustic shadowing e↵ect and the reduction of situations where objects appear between the user head and theroom ceiling, were beacons are normally deployed.

6. Experimental Validation

Experiments were made under equivalent laboratory conditions. The room temperature was measured T = 18�C,and the sound-speed was estimated using the equation c = 331.3 + 0.606 ⇥ T [21], which resulted in 342.5 m/s. Allthe acoustic beacons used in experimental tests were placed at the following fixed positions:

A1: (0.00,0.00,2.52) m

A2: (0.00,8.15,2.52) m

A3: (7.25,0.24,2.52) m

The three acoustic beacons used in experiments are coplanar, i.e. are placed at the same height, in order to reducethe NLoS situations in multiple user scenarios. This introduces a systematic error when the mobile station is usedat lower height values being its impact on error positioning discussed later. Two experiments were taken in orderto evaluate the resulting 2D position estimates. The first experiment was held to obtain a quantitative evaluation ofoverall system by measuring the position estimated to a grid of fixed points in the room and a second experiment wastaken to obtain a qualitative evaluation of the positioning system when a person equipped with a mobile device is in amoving trajectory.

13

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 13

is placed at coordinate (0,0,0) and vectors b and c are given by:

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xi yi zi

37777777777775b =

26666666666664

�d10

�d20

. . .�di0

37777777777775c =

12

26666666666664

k21 � d2

10k2

2 � d220

. . .k2

i � d2i0

37777777777775(4)

and ki is obtained by:

k2i = x2

i + y2i + z2

i (5)

By combining equations 3 and 6,

d0 = x2e + y2

e + z2e (6)

is possible to solve the least-squares problem and come up with a position estimate x with coordinates (xe, ye, ze) [20].

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained directly from this decision, (1) the microphone became close of the ideal centralpoint of the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reductionof the acoustic shadowing e↵ect and the reduction of situations where objects appear between the user head and theroom ceiling, were beacons are normally deployed.

6. Experimental Validation

Experiments were made under equivalent laboratory conditions. The room temperature was measured T = 18�C,and the sound-speed was estimated using the equation c = 331.3 + 0.606 ⇥ T [21], which resulted in 342.5 m/s. Allthe acoustic beacons used in experimental tests were placed at the following fixed positions:

A1: (0.00,0.00,2.52) m

A2: (0.00,8.15,2.52) m

A3: (7.25,0.24,2.52) m

The three acoustic beacons used in experiments are coplanar, i.e. are placed at the same height, in order to reducethe NLoS situations in multiple user scenarios. This introduces a systematic error when the mobile station is usedat lower height values being its impact on error positioning discussed later. Two experiments were taken in orderto evaluate the resulting 2D position estimates. The first experiment was held to obtain a quantitative evaluation ofoverall system by measuring the position estimated to a grid of fixed points in the room and a second experiment wastaken to obtain a qualitative evaluation of the positioning system when a person equipped with a mobile device is in amoving trajectory.

13

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 12

The approach used consists in the continuous search of other local peaks with lower energy for lower ToA, butwith energy above th. This method can be seen as a first peak detector that has the ability to reduce the impact ofmulti-path echoes that appear at the receiver with higher energy and resulted in more accurate ranging measurementsin non-line-of-sight situations.

4.3. Position Estimation

Using four acoustic beacons is possible to obtain three TDoA estimates which gives the possibility to compute 3Dposition estimates. If only three beacons are used, two TDoA estimates can be used to compute a 2D position estimate.Post validation of each group of ToA measurements is need in order to generate a valid TDoA vector to use in thelocalization algorithm. The audio interrupt service routine presented in Figure 15 outputs a vector of ToA estimatesthat need to be converted in a TDoA set of valid measurements. This validation process uses a first finite di↵erenceoperation over the ToA data vector followed by validation based on the observation that each first finite di↵erencemust be always lower than the sum of the signal transmission period plus the guard time period. Note that for slotsynchronization is used a slightly bigger guard time in the last transmitted signal thus allowing the identification ofthe first TDoA valid and thus the identification of all the subsequent TDoA measurements.

dtoa

Start PER

k = 0

dtoa(end-k) < Tslot

Position Estimation Routine

Compute 1st Finite Difference

vector dtoa

k < Nan -1

k++

T

F : Valid ToA group of measurements

End PER

F

T

Generate tdoa vector

Position Estimation Algorithm

tdoa

(x,y,z)

toa

Figure 16: Position Estimation Routine (PER) with TDoA pre-validation.

Finally it is necessary to run the position estimation algorithm in order to obtain an estimate of the position ofthe mobile station. To solve the localization problem and since TDoA measurements are always noisy, (e.g. thermalnoise, external acoustic noise, sound velocity changes, etc.) the position estimation can be seen as an optimizationproblem. We opted to find the position that minimize the squared error intersection point for all the hyperbolas definedfor each intervenient acoustic beacon. A detailed description of the used method can be found in [1]. The solution forthis optimization problem is given by the set of linear equations that can be obtained directly by the equation 3, andgives a position estimate x.

x = (AT A)�1AT (d0b + c) (3)

where, matrix A represents the coordinates of the acoustic beacons in which without loss of generality the beacon A0

12

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 13

is placed at coordinate (0,0,0) and vectors b and c are given by:

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xi yi zi

37777777777775b =

26666666666664

�d10

�d20

. . .�di0

37777777777775c =

12

26666666666664

k21 � d2

10k2

2 � d220

. . .k2

i � d2i0

37777777777775(4)

and ki is obtained by:

k2i = x2

i + y2i + z2

i (5)

By combining equations 3 and 6,

d0 = x2e + y2

e + z2e (6)

is possible to solve the least-squares problem and come up with a position estimate x with coordinates (xe, ye, ze) [20].

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained directly from this decision, (1) the microphone became close of the ideal centralpoint of the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reductionof the acoustic shadowing e↵ect and the reduction of situations where objects appear between the user head and theroom ceiling, were beacons are normally deployed.

6. Experimental Validation

Experiments were made under equivalent laboratory conditions. The room temperature was measured T = 18�C,and the sound-speed was estimated using the equation c = 331.3 + 0.606 ⇥ T [21], which resulted in 342.5 m/s. Allthe acoustic beacons used in experimental tests were placed at the following fixed positions:

A1: (0.00,0.00,2.52) m

A2: (0.00,8.15,2.52) m

A3: (7.25,0.24,2.52) m

The three acoustic beacons used in experiments are coplanar, i.e. are placed at the same height, in order to reducethe NLoS situations in multiple user scenarios. This introduces a systematic error when the mobile station is usedat lower height values being its impact on error positioning discussed later. Two experiments were taken in orderto evaluate the resulting 2D position estimates. The first experiment was held to obtain a quantitative evaluation ofoverall system by measuring the position estimated to a grid of fixed points in the room and a second experiment wastaken to obtain a qualitative evaluation of the positioning system when a person equipped with a mobile device is in amoving trajectory.

13

Position Estimation Algorithm

with

, ,

were

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–17 13

is placed at coordinate (0,0,0) and vectors b and c are given by:

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xi yi zi

37777777777775b =

26666666666664

�d10

�d20

. . .�di0

37777777777775c =

12

26666666666664

k21 � d2

10k2

2 � d220

. . .k2

i � d2i0

37777777777775(4)

and ki is obtained by:

k2i = x2

i + y2i + z2

i (5)

By combining equations 3 and 6,

d0 =

qx2

e + y2e + z2

e (6)

is possible to solve the least-squares problem and come up with a position estimate x with coordinates (xe, ye, ze) [20].

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained directly from this decision, (1) the microphone became close of the ideal centralpoint of the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reductionof the acoustic shadowing e↵ect and the reduction of situations where objects appear between the user head and theroom ceiling, were beacons are normally deployed.

6. Experimental Validation

Experiments were made under equivalent laboratory conditions. The room temperature was measured T = 18�C,and the sound-speed was estimated using the equation c = 331.3 + 0.606 ⇥ T [21], which resulted in 342.5 m/s. Allthe acoustic beacons used in experimental tests were placed at the following fixed positions:

A1: (0.00,0.00,2.52) m

A2: (0.00,8.15,2.52) m

A3: (7.25,0.24,2.52) m

The three acoustic beacons used in experiments are coplanar, i.e. are placed at the same height, in order to reducethe NLoS situations in multiple user scenarios. This introduces a systematic error when the mobile station is usedat lower height values being its impact on error positioning discussed later. Two experiments were taken in orderto evaluate the resulting 2D position estimates. The first experiment was held to obtain a quantitative evaluation ofoverall system by measuring the position estimated to a grid of fixed points in the room and a second experiment wastaken to obtain a qualitative evaluation of the positioning system when a person equipped with a mobile device is in amoving trajectory.

13

1) Prepare data

2) Compute a position estimate

a) b)

Figure 15: Position Estimation Routine (PER) with TDoA pre-validation.

A =

26666666666664

x1 y1 z1

x2 y2 z2

. . . . . . . . .xk yk zk

37777777777775d =

26666666666664

d1,0

d2,0

. . .dk,0

37777777777775c =

12

266666666666664

b21 � d2

1,0b2

2 � d22,0

. . .b2

k � d2k,0

377777777777775(5)

b2k = x2

k + y2k + z2

k (6)

d0 =

qx2

e + y2e + z2

e (7)

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure ??.A WSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device do not need any external hardware to operate. It is only dependent on the smartphone hardware,i.e. the built-in microphone or any external microphone connected to the headset microphone input. In order to fill therequirements of some indoor location-aware applications pervasive, i.e. augmented/virtual reality, we were forced toadd a pair of stereo headphones. This requirement became advantageous because it allowed us to add a microphoneon top of the headphones. This way it was possible to add an external microphone on the top of the head of the user.Two great advantages were obtained from this decision, (1) the microphone became close of the ideal central pointof the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due to the reduction of the

13

(a) (b)

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–21 13

we considered 0.5 ms for each side of the detected peak. This value was based on the width of the main lobe presentedin the autocorrelation function of the signal proposed, see Figure 11 (e). As we are interested only in the LoS pulse,the peak with lower argument is selected among the other local pulses and assigned to tk. The output of this block isa vector T with a tk value per each valid detected pulse.

For the example presented in Figure 13, if a simpler criterion based on the argument of the maximum valuein the IoA search interval is used, the selected ⌧k should point to the first NLoS peak, due to its increased energywhen compared to other local peaks. This introduces the ranging error �d presented in Equation 4 which is far fromacceptable in a high accuracy positioning system.

�d = c.�t ⇡ 342.5 ms�1 ⇥ (1.295 s � 1.293 s) ⇡ 69 cm (4)

4.3. Position Estimation

Using four acoustic beacons is possible to obtain three TDoA estimates which gives the possibility to compute 3Dposition estimates. If only three beacons are used, two TDoA estimates can be used to compute a 2D position estimate.Post validation of each T vector of IoA measurements is needed in order to obtain a valid di↵erence distance vector d,that will be used by the positioning algorithm. To obtain each dk,0 value from the d vector, we need to remove the timeslices added by TDMA when computing the TDoA values, and then multiply by the speed of sound. These di↵erencedistance dk,0 estimates are obtained using the equation 5,

dk,0 = c[⌧k � ⌧0 � kW (k)], 8k 2 [0, K � 1] (5)

where c represents the speed of sound, tk and t0 are a pair of IoA values, W (k) = S (k) + G(k) are directly obtainedfrom TDMA (see Figure 8) and k is the acoustic beacon index. The audio interrupt service routine presented inFigure 13 outputs IoA estimates that need to be converted in a valid TDoA set of measurements. This validationprocess is represented in the algorithm presented in the Figure 14 (a) and uses a first finite di↵erence operation overthe T data vector to obtain the vector dT which is then used to evaluate if each of its elements is lower than Wk when1 k < K � 1. Note that for slot synchronization is used a slightly bigger guard time in the last transmitted signalGK�1, which allows the identification of the first valid di↵erence distance d1,0 estimate and thus the identification ofall the subsequent di↵erence distance dk,0 measurements when 2 k < K � 1.

d0 = ||x|| (6)

Finally it is necessary to run the position estimation algorithm in order to obtain the mobile station position. Tosolve the positioning problem and since TDoA measurements are always noisy, (e.g. thermal noise, external acousticnoise, sound velocity changes, etc.) the position estimation can be seen as an optimization problem. We opted to findthe position that minimizes the squared error intersection point for all the hyperbolas defined for each intervenientacoustic beacon. A detailed description of the used method can be found in [1]. The solution for this optimizationproblem is given by the set of linear equations that can be obtained using the equation presented in Figure 14 (b), inorder to obtain a position estimate vector x.

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure 15. AWSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in orderto meet the scalability criterion. The acoustic beacon was also designed to include remote configuration through thenetwork. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints.

The mobile device does not need any external hardware to operate. It is only dependent on the smartphonehardware, i.e. the built-in microphone or any external microphone connected to the headset microphone input. In

13

Figure 13: Position Estimation Routine (PER) with TDoA pre-validation.

Post validation of each T vector of IoA measurements is needed in order to obtain a valid difference distancevector d, that will be used by the positioning algorithm. To obtain each dk,0 value from the d vector, we need toremove the time slices added by TDMA when computing the TDoA values, and then multiply by the speed of sound.These difference distance dk,0 estimates are obtained using the equation 5,

dk,0 = c[τk − τ0 − kW (k)], ∀k ∈ [0,K − 1] (5)

where c represents the speed of sound, τk and τ0 are a pair of IoA values, W (k) = S (k) + G(k) are directly obtained fromTDMA (see Figure 7) and k is the acoustic beacon index.

Note that for slot synchronization is used a slightly bigger guard time in the last transmitted signal G(K−1), whichallows the identification of the first valid difference distance d1,0 estimate and thus the identification of all the subse-quent difference distance dk,0 measurements when 2 ≤ k < K − 1.

Finally it is necessary to run the position estimation algorithm in order to obtain the mobile station position. Tosolve the positioning problem and since TDoA measurements are always noisy, (e.g. thermal noise, external acousticnoise, sound velocity changes, etc.) the position estimation can be seen as an optimization problem. We opted to findthe position that minimizes the squared error intersection point for all the hyperbolas defined for each intervenientacoustic beacon. A detailed description of the used method can be found in [1]. The solution for this optimizationproblem is given by the set of linear equations that can be obtained using the equation presented in Figure 13b, inorder to obtain a position estimate vector x.

5. System Prototype

The system prototype is divided in two distinct devices: the acoustic beacon and the mobile device, see Figure 14. AWSN of acoustic beacons is used to build an infrastructure of acoustic beacons, with known positions, see Figure 1.

12

Page 14: Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audio for TDoA estimation

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–20 13

These acoustic beacons can be used as building blocks that can easily be added to an existent infrastructure in order tomeet the scalability criterion. The acoustic beacon was also designed to include remote configuration through the net-work. This way acoustic signal parameters (i.e. bandwidth, duration and envelope) and multiple access features canrapidly be changed in order to adapt the transmitted acoustic signals and the multiple access technique to a particularroom with specific physical constraints. One acoustic beacon prototype costs approximately e 35, but several simpli-fications could be assumed in a production scenario (e.g., microphone and preamplifier could be removed, softwareintegration to work with only one µC and PCB size reduction) thus reducing the cost to less than e 20.

Acoustic Beacon A

Acoustic Beacon B

PC Gateway

Microphone

Speaker Acoustic Module

Batteries

iPhone App

Microphone

Headphones

(a) (b)

(c) (d)

Figure 14: System Devices. a) Acoustic Beacons and Gateway. b) Mobile Device based in an iPhone 4s running the proposed positioningapp (Akkurate). iPhone App user interface views. c) Akkurate app main view with actual user position (yellow circle), acoustic beacons(blue circles) and virtual audio sources (red circles) with zone activity delimitation. d) Real-Time debug view mainly for developmentpurposes.

The mobile device does not need any external hardware to operate. It is only dependent on the smartphonehardware, i.e. the built-in microphone or any external microphone connected to the headset microphone input. Inorder to fulfil the requirements of some pervasive indoor location-aware applications, i.e. augmented/virtual reality,we were forced to add a pair of stereo headphones. This requirement became advantageous because it allowed us toadd a microphone on top of the headphones. This way it was possible to add an external microphone on the top ofthe head of the user. Two great advantages were obtained from this decision, (1) the microphone became close of theideal central point of the user head; (2) a dramatic reduction of the non-line-of-sight situations was achieved due tothe reduction of the acoustic shadowing effect and the reduction of situations where objects appear between the userhead and the room ceiling, where beacons are normally deployed in a higher plane. Due to this, in all experiments weopted to place all the acoustic beacons at the 2.5 m height plane.

The use of the built-in microphone would represent a major feature. However, with only four beacons, if the usercarries the smartphone in the hand, the user body and its hand over the built-in microphone will cause many severeNon-Line-Of Sight situations, causing a degradation on the position estimation.

13

Page 15: Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audio for TDoA estimation

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–20 14

All the algorithms (peak detection, IoA estimation, NLoS mitigation and hyperbolic positioning) have been pro-grammed in Objective-C++ using the iOS Accelerate framework for core tasks such as, time domain filtering (convo-lution) and FFT based operations. The Accelerate framework uses the GPU processor to increase the computationalperformance taking advantage of its vector and matrix oriented processing capabilities. Each mobile device is ableto compute its own position followed by its communication to a remote positioning server through a standard dataconnection(Wi-Fi or 3G/4G). In Figure 14c is presented the main view of the developed iPhone app. This app, thatwe called Akkurate, has been developed to support an audio augmented reality system that is capable of generatingvirtual binaural sound sources in real-time. The goal is to create the illusion that objects (e.g. paintings, sculptures orother works of art in a museum) emit sound. This would allow visitors walking through a particular room, equippedonly with headphones and a simple, small and comfortable tracking device (e.g a smartphone) to receive appropriateaudio information according to their position.

6. Experimental Validation

All the experiments were made under equivalent conditions in a regular room with dimensions 9 × 8 × 3 m, con-crete walls and ceilling, windows, linoleum floor and different types of office furniture (e.g., desks, chairs, officeclosets, desktop computers and office luminaires). The room temperature was measured T = 18◦ C, and the sound-speed was estimated using the linear approximation v = 331.3 + 0.606T [23], which resulted in 342.5 m/s. Theacoustic beacons used in all experimental tests were placed at the following positions: B0: (0.00 , 0.00 , 2.52) m;B1: (0.00 , 8.15 , 2.52) m; B2: (7.25 , 0.24 , 2.52) m and B3: (7.25 , 8.35 , 1.77) m

Three acoustic beacons (B0, B1 and B2) were placed near the ceil, at the same height (coplanar), in order toreduce the NLoS situations in multiple user scenarios. A fourth beacon (B3) was added at a lower height to enable thesystem to obtain 3D position estimates. Two experiments were taken in order to evaluate the overall 2D/3D systemperformance. The first experiment was held to obtain a quantitative evaluation of the overall system by comparing the2D/3D position estimates to a grid of fixed points in the room and a second experiment was taken to obtain a qualitativeevaluation of the positioning system when a person equipped with a mobile device is in a moving trajectory.

The room reverberation time at the interest bandwidth was obtained experimentally by observation of the rever-beration tail of the room impulse response, i.e., the signal after correlation presented in Figure 12, which resulted in aT60 reverberation time [24] of approximately 220 ms.

6.1. Experiment 1: 2D/3D Fixed position estimationA grid of 6 × 5 m with 1 m step was used to evaluate the positioning system. A smartphone running the positioningapp was placed at each position marked with a black cross, see Figure 15, with a constant height of 1.75 m and onehundred sets of TDoA estimates were obtained for each position. In Figure 15a are presented the results when the fourbeacons are considered to obtain 3D position estimates and in Figure 15b is possible to observe its 2D projection.

In Figure 15c are presented the obtained results when three and four beacons are considered to obtain 2D positionestimates and the statistical results (mean absolute error and standard deviation) are presented in Figure 15d for all thetested positions. In this case, a systematic error due to non-coplanarity (mobile station at lower height) is introduced,being its impact on error positioning discussed later when three or four beacons are considered to obtain 2D positionestimates. Note that, no outlier measurements are present. This can be justified by the fact that all measurements weretaken with acoustic noise in the room below 40 dBSPL.

6.2. Experiment 2: 2D Dynamic position estimationIn this experiment, a qualitative evaluation of the positioning system (2D case) was performed for the three andfour beacons case. A moving person with 1.75 m height and the receiver on top of its head was used to evaluatethe positioning system in two moving trajectories with different speeds, i.e. one trajectory with average speed ofapproximately 0.5 m/s and the other with average speed of approximately 1.5 m/s, see Figure 16. In this experiment,only a qualitative evaluation can be performed because errors introduced by the human movement cannot be extracteddue to difficulty in ground-truth validation. For a better interpretation we opted to add the time dimension in secondsalong the trajectory line. As a result of the of the TDMA configuration (S(k)=10 ms, L(k)=30 ms and G(k)=47.5 ms),the lag between the first signal transmission and a position estimation resulted in a mean value of 350 ms with astandard deviation 23 ms.

14

Page 16: Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audio for TDoA estimation

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–20 15

02

46

8

02

46

80

0.5

1

1.5

2

2.5

3

B2

X−axis (m)

B3B0

Y−axis (m)

B1

Z−

axis

(m

)

(a) Scatter for the 3D positioning estimates.

−1 0 1 2 3 4 5 6 7 8−1

0

1

2

3

4

5

6

7

8

9

X−axis (m)

Y−

axis

(m

)

B0

B1

B2

B3

Real Position

3D Estimate using 4−Beacons

(b) XY projection of the data presented in (a).

−1 0 1 2 3 4 5 6 7 8−1

0

1

2

3

4

5

6

7

8

9

X−axis (m)

Y−

axis

(m

)

B0

B1

B2

B3

Real Position

2D Estimate using 3−Beacons

2D Estimate using 4−Beacons

(c) Scatter for the 2D positioning estimates.

(6,7) (5,7) (4,7) (3,7) (2,7) (1,7) (1,6) (1,5) (1,4) (1,3) (1,2)−5

0

5

10

15

20

25

30

Ab

s.

Err

or

(cm

)

Position (x,y)

2D Estimate using 3−Beacons

2D Estimate using 4−Beacons

(1,1) (2,1) (3,1) (4,1) (5,1) (6,1) (2,4) (3,4) (4,4) (5,4) (6,4)−5

0

5

10

15

20

25

30

Ab

s.

Err

or

(cm

)

Position (x,y)

2D Estimate using 3−Beacons

2D Estimate using 4−Beacons

(d) Absolute error statistics for the 2D case.

Figure 15: Experiment 1 - a) and b) 3D positioning results; c) and d) 2D positioning results when three and four beacons are considered.Acoustic beacons - circles B0, B1, B2 and B3.

15

Page 17: Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audio for TDoA estimation

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–20 16

−1 0 1 2 3 4 5 6 7 8−1

0

1

2

3

4

5

6

7

8

9

X−axis (m)

Y−

axis

(m

)

B0

B1

B2

B3

02468

10

12

14 16 18

20

22

24

262830

32

34

36

2D Estimate using 3−Beacons

2D Estimate using 4−Beacons

(a)

−1 0 1 2 3 4 5 6 7 8−1

0

1

2

3

4

5

6

7

8

9

X−axis (m)

Y−

axis

(m

)

B0

B1

B2

B3

01234

5

6 7 8 9

10

1112

13

14

1516

2D Estimate using 3−Beacons

2D Estimate using 4−Beacons

(b)

Figure 16: Experiment 2 - a) Trajectory of a user walking at approximately 0.5 m/s. b) Trajectory of a user walking at approximately1.5 m/s.Qualitative results of the positioning system (2D case) for two moving trajectories at different speeds. Real trajectory - solid blackline with timestamps in seconds. Acoustic beacons - circles B0, B1, B2 and B3.

6.3. Error Analysis

Two main sources of error affect the final position estimation: 1) errors in TDoA estimation (mainly related to beaconsynchronization, sound speed uncertainty and multipath that heavily affects the LoS peak estimation) and 2) errorsrelated to the network density and geometry, a problem known in literature as Geometric Dilution of Precision [25].The proposed WSN infrastructure imposes a sync offset error always below 5 µs, which enabled distance measure-ments using non-invasive audio signals with a standard deviation of less than 1 cm thus resulting in a reduced impacton the position estimation process.

In our application case, we are focus in low density infrastructures, being the number of beacons limited to threeor four beacons per room. Therefore, an optimal placement of these beacons is crucial to obtain the mobile stationposition with increased accuracy [26]. For a small number of beacons, the optimal beacons position is found to beat the vertices of simple shapes surrounding the mobile station, such as equilateral triangles or squares [27]. Duringexperimental validation, this criterion was only satisfied in the 2D case. Note that beacon B3 is not in an optimalposition due to physical room constraints. The lower the height of B3, the better should be the position estimatorperformance. An optimal placement for B3 would present a negative height around -5 m, which would be impossibleto satisfy. Due to room constrains (room geometry and existing furniture) we were forced to add B3 at 1.77 m height,which was the lowest value we were able to use. The 3D positioning results presented in Figure 15a suffer from thegeometry problems previously introduced. In this case the impact of the position of the beacon B3 resulted in a highsensitivity to noise in most of the 3D position estimates which could be confirmed by the spread of the results mainlyin the z-coordinate. In addiction, for some positions the estimator could not solve for a valid solution (i.e., inside theroom volume) which can be demonstrated by the 2D projection of the 3D position estimates, see positions (3,7) and(4,4) in Figure 15b. Due to the low accuracy obtained in z-coordinate (position estimates with a standard deviation inthe meter order) we opted to evaluate the proposed system only for the 2D case.

When the 2D case is considered, the network geometry affects the absolute error mainly due to the non coplanarityof the mobile station with the beacons plane, due to different height values that it can present, see Figure 17. In thecoplanar case no error is introduced by the geometry and a valid solution can be obtained when constraining the searchof the solution of the positioning algorithm to fit inside the room area. The 2D projected distances can be computed

16

Page 18: Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audio for TDoA estimation

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–20 17

by d′k =

√d2

k − h2c where hc can be obtained directly from hc = hb − hm. In the situation presented in Figure 17

the measured distances dk are always greater than its 2D projection d′k. In this case, these larger measured distancesaffect the final position estimation, contributing differently for the overall absolute error, depending on the positionand height of the mobile station.

B2

B0 B1y

d2

hc

hm

Real Position

2D Projection

d'2

d'0d'1

d1

2D Projection

x

Legend:Bx - Acoustic beaconshb - Acoustic beacons heighthm - Mobile station heighthc - Mobile station distance to beacons planedk - Estimated distance for beacon k d'k - 2D distance projection for beacon k(x,y) - Mobile station coordinates

hb

d0

Figure 17: Example of the 2D projection obtained from a mobile station with variable height.

In Figure 18 is presented the error map obtained by simulation when the positioning algorithm is fed with noise-free TDoA measurements for the situation presented in experiment 1 (3-Beacons case) for different mobile stationheight values. In these simulations the receiver height is changed between 1.25 m and 2 m in order to obtain a 2Dgrid of the absolute error. The absolute 2D error increases for peripheral positions near the acoustic beacons andconsiderably reduces in the central zone. This can be geometrically justified by the lack of height information which

1 2 3 4 5 61

2

3

4

5

6

7

X−axis (m)

Y−

axis

(m

)

(a) hm = 1.25 m

1 2 3 4 5 61

2

3

4

5

6

7

X−axis (m)

Y−

axis

(m

)

(b) hm = 1.5 m

1 2 3 4 5 61

2

3

4

5

6

7

X−axis (m)

Y−

axis

(m

)

(c) hm = 1.75 m

1 2 3 4 5 61

2

3

4

5

6

7

X−axis (m)

Y−

axis

(m

)

(d) hm= 2 m

X−axis (m)

Y−ax

is (m

)

1 2 3 4 5 61

2

3

4

5

6

7

0

0.05

0.1

0.15

0.2

0.25

1 2 3 4 5 61

2

3

4

5

6

7

X−axis (m)

Y−ax

is (m

)

0

0.05

0.1

0.15

0.2

0.25

Figure 18: Absolute 2D error when the height of the microphone in the mobile station changes between 1.25 m and 2 m for the room usedin experiment 1. In this case only three acoustic beacons (B0, B1 and B2) are considered.

leads to distance measurements with values always above the real value and with greater impact near the acousticbeacons when the mobile station height deviates from the acoustic beacons plane. This error analysis is correlatedwith the results obtained, see Figure 15d, in which is possible to observe that the position estimates distributions areheavily consistent with the absolute error obtained by simulation in the cases presented in Figure 18.

7. Results Discussion

In Figures 19a and 19b are presented the statistical results for the measured data and its corrected version, i.e.when the error imposed by the non-coplanarity previously discussed is removed. In the same figures, but at right, ispossible to observe the correspondent histogram and the cumulative sum function for each case.

In Figure 19 a summary of the statistical metrics used to evaluate the 2D system performance is overlapped for thethree and four beacons cases. The evaluation is based in the absolute max/mean error plus standard deviation and in

17

Page 19: Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audio for TDoA estimation

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–20 18

(6,7)(5,7) (4,7) (3,7) (2,7) (1,7) (1,6) (1,5) (1,4) (1,3) (1,2) (1,1) (2,1) (3,1) (4,1) (5,1) (6,1) (2,4) (3,4) (4,4) (5,4) (6,4)−5

0

5

10

15

20

25

30

35

Ab

s.

Err

or

(cm

)

Position (x,y)

Mean Std = 3.2 cm (Both)Max Std = 6.2 cm (Both)Mean Error = 6.8 cm (Measured)Max Error = 23.7 cm (Measured)Mean Error = 3.6 cm (Corrected)Max Error = 20.6 cm (Corrected)

2D (3−Beacons) Measured

2D (3−Beacons) Corrected

−10 0 10 20 30 400

5

10

15

Error (cm)

% o

f th

e c

ase

s

<16 cmin 95% of the cases

100 95

Measured

Corrected

(a) 2D statistical results using 3-Beacons.

(6,7)(5,7) (4,7) (3,7) (2,7) (1,7) (1,6) (1,5) (1,4) (1,3) (1,2) (1,1) (2,1) (3,1) (4,1) (5,1) (6,1) (2,4) (3,4) (4,4) (5,4) (6,4)−5

0

5

10

15

20

25

30

35

Abs. E

rro

r (c

m)

Position (x,y)

Mean Std = 2.2 cm (Both)Max Std = 3.5 cm (Both)Mean Error = 8 cm (Measured)Max Error = 13.5 cm (Measured)Mean Error = 3.7 cm (Corrected)Max Error = 9.3 cm (Corrected)

2D (4−Beacons) Measured

2D (4−Beacons) Corrected

−10 0 10 20 30 400

5

10

15

Error (cm)

% o

f th

e c

ase

s

<10 cmin 95% of the cases

<13 cmin 95% of the cases

100 95

Measured

Corrected

(b) 2D statistical results using 4-Beacons.

Figure 19: Measured and corrected absolute mean error and standard deviation, for each position evaluated in experiment 1 when threeand four beacons are considered plus error histograms and cumulative sum plots for each case.

the absolute max error obtained for 95% of the cases. Very stable and accurate position estimates were obtained witha mean absolute standard deviation of 2.2 cm (4-Beacons) and 3.2 cm (3-Beacons). In addition to this, an absolutepositioning error of less 10 cm and 16 cm in 95% of the cases was achieved when four and three beacons were used,thus meeting the requirements of the applications we are focused.

In order to compare the proposed system with other high accuracy indoor positioning systems, we compiled inTable 2 their key features in terms of: ranging principle, reported accuracy, scalability, bandwidth, update rate, costand smartphone compatibility. As we are interested in high accuracy positioning systems, only range-based systemsare considered.

The main requirements imposed in the system design (e.g., Smartphone Compatibility, Centimeter-level Accuracy,High Doppler Tolerance and Low-Cost Infrastructure) resulted in design decisions that proved to be appropriate forthe target application. The accuracy obtained meets the specified criteria for users moving at higher speeds and theuse of non-invasive audio pulses overcomes the problems presented by the audible signals used in [35], [34] and [31].

In [10] is referenced a previous work from the authors with a reported 2D absolute mean error of 9.6 cm and amean standard deviation of 0.8 cm. The reported performance, when compared to the results obtained in this work,shows a similar accuracy but a lower precision that could be justified by these two main factors: 1) the system uses ToA(all beacons and mobile station are in sync) measurements for ranging and 2) the system uses broadband ultrasonicpulses with large TBP that resulted in narrow compressed peaks and thus in more accurate range measurements. Thisincrease in the precision performance could be easily observed by the resulting standard deviation value of 0.8 cm,which is significantly smaller than the results reported in this work.

From the Table 2 is possible to observe two additional smartphone compatible systems that use non-invasivesignals, i.e., [28] and [29]. The system presented in [28] uses "unnoticeable to humans" audio/US pulses for ToAranging which can be seen as a major disadvantage due to need of synchronization between infrastructure and mobile

18

Page 20: Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audio for TDoA estimation

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–20 19

Principle Ranging Reported Simultaneous Update SmartphoneName Year Method Accuracy Users Bandwidth Rate Cost Compatibility

Akuratte 2014 audio/US TDoA <10 cm (95%) high 18-22 kHz ≤ 3 Hz low yesGuoguo [28] 2013 audio/US ToA 6-25 cm high 17-22 kHz ≤ 2 Hz low yes

Lopes et al. [10] 2012 US ToA 9.6 cm high 20-45 kHz ≤ 5 Hz medium noNokia HAIP [29] 2012 RF Bluetooth AoA 30-100 cm high 1 MHz 0.1-40 Hz high yesUBISENSE [30] 2011 RF UWB TDoA <15 cm limited - - high no

Schweinzer et al. [31] 2010 audio/US TDoA 1 cm high 35-65 kHz ≤ 5 Hz medium noPietrzyk et al. [32] 2010 RF UWB ToA 1-2 cm limited - - high noSegura et al. [33] 2010 RF UWB TDoA 20 cm limited - - high no

3D Locus [34] 2009 audio/US round-trip ToA 1 cm limited <25 kHz 10 Hz low noCricket [15] 2005 US ToA 1-2 cm high 40 kHz 1 Hz low no

Mandal et al. [35] 2005 audio ToA 60 cm limited 4 kHz - low yes

Table 2: Centimeter-level positioning systems performance as reported in the literature.

stations, thus increasing the system complexity. Furthermore, Nokia developed the system presented in [29] that usesa dedicated and expensive infrastructure of "Locators" (antenna arrays) that are used to measure the Angle of Arrival(AoA) of a Bluetooth packet that is continuously transmitted by the smartphone.

8. Conclusions and Future Work

In this paper is proposed an effective indoor acoustic positioning system fully compatible with conventional smart-phones. The system uses a synchronized WSN infrastructure of acoustic beacons and non-invasive audio signals forlow-cost ranging which enables accurate indoor smartphone positioning. Experimental tests were performed using aniPhone 4s in order to evaluate the proposed system. Users that are able to detect the presence of these signals, agreedthat a classification of non-invasive audio was acceptable.

When compared to other centimeter-level positioning systems, the proposed system stands out for several reasons,among which we highlight:

1. High smartphone compatibility, i.e., users do not need any additional hardware due to the use of TDoA rangingwhich enables synchronization-free mobile devices. The limited bandwidth available for the acoustic signaldesign was mitigated by the an improved TDoA estimation approach, that takes advantage of the transmittedpulses periodicity and by performing NLoS mitigation;

2. Downlink operation mode (i.e., GPS-like) was possible due to the inclusion of a synchronization protocolshared by the beacons infrastructure. Moreover, due to the low interference that passive receiving rangingpresents when compared to the active transmitting mode, it is possible to use the system with a high number ofsimultaneous users (unlimited number theoretically);

3. Low-cost infrastructure (approximately e 35 per beacon) due to the commercial-of-the-shelf component selec-tion in the acoustic beacon design;

4. Non-invasive acoustic pulse design takes advantage of human psychoacoustics to maximize the transmittedpower and by keeping the pulse non-invasive.

To improve the performance of the proposed system, when severe interference and NLoS situations may occur, apossible direction is to propose a navigation filter that combines the output of the proposed indoor positioning systemwith the data coming from the Inertial Measurement Unit (IMU) natively available in the smartphone. Additionally,an interference detection and classification method could be introduced in the system in order to discard invalidmeasurements that have passed the actual double validation mechanism. With this, we will be able to include asimplified short-time pedestrian inertial navigation model and a proper data fusion algorithm in order to estimate theuser position based on its dynamics for small periods when the positioning information is corrupted by interferenceor inaccurate due to NLoS.

Acknowledgments

This work obtained national funding from ADI under the project Pervasive Tourism (ref. 11507) and by nationalfunds through FCT - Foundation for Science and Technology, in the context of the project PEst-OE/EEI/UI0127/2014.

19

Page 21: Accurate smartphone indoor positioning using a WSN infrastructure and non-invasive audio for TDoA estimation

S.I. Lopes et al. / Pervasive and Mobile Computing 00 (2014) 1–20 20

References

[1] A. H. Sayeda, A. Tarighata, N. Khajehnouri, Network-based wireless location, IEEE Signal Processing Magazine 22 (4) (2005) 24–40.[2] R. Watson, G. Lachapelle, R. Klukas, S. Turunen, S. Pietilä, I. Halivaara, Investigating GPS Signals Indoors with Extreme High-Sensitivity

Detection Techniques, Journal of The Institute of Navigation, 52 (4) (Winter 2005-2006) 199–214.[3] G. Dedes, A. G. Dempster, Indoor GPS Positioning, in: Proceedings of the IEEE Semiannual Vehicular Technology Conference, Citeseer,

2005.[4] R. Mautz, Indoor Positioning Technologies, Institute of Geodesy and Photogrammetry, Department of Civil, Environmental and Geomatic

Engineering, ETH Zurich, 2012.[5] A. Srinivasan, J. Wu, A survey on secure localization in wireless sensor networks, in: Encyclopedia of Wireless and Mobile Communications,

2008.[6] H. Liu, H. Darabi, P. Banerjee, J. Liu, Survey of wireless indoor positioning techniques and systems, Systems, Man, and Cybernetics, Part C:

Applications and Reviews, IEEE Transactions on 37 (6) (2007) 1067 –1080. doi:10.1109/TSMCC.2007.905750.[7] N. Patwari, J. N. Ash, S. Kyperountas, A. O. Hero, R. L. Moses, N. S. Correal, Locating the nodes: cooperative localization in wireless sensor

networks, Signal Processing Magazine, IEEE 22 (4) (2005) 54–69.[8] S. Gezici, Z. Tian, G. B. Giannakis, H. Kobayashi, A. F. Molisch, H. V. Poor, Z. Sahinoglu, Localization via Ultra-Wideband Radios, IEEE

Signal Processing Magazine 22 (4) (2005) 70–84.[9] B. Dil, S. Dulman, P. Havinga, Range-Based Localization in Mobile Sensor Networks, in: K. Römer, H. Karl, F. Mattern (Eds.), Wireless

Sensor Networks, Vol. 3868 of Lecture Notes in Computer Science, Springer Berlin / Heidelberg, 2006, pp. 164–179.[10] S. I. Lopes, J. M. N. Vieira, D. Albuquerque, High Accuracy 3D Indoor Positioning Using Broadband Ultrasonic Signals, in: Trust, Se-

curity and Privacy in Computing and Communications (TrustCom), 2012 IEEE 11th International Conference on, 2012, pp. 2008 –2014.doi:10.1109/TrustCom.2012.172.

[11] G. Mao, B. Fidan, G. Mao, B. Fidan, Localization Algorithms and Strategies for Wireless Sensor Networks, Information Science Reference- Imprint of: IGI Publishing, Hershey, PA, 2009.

[12] B. Sundararaman, U. Buy, A. D. Kshemkalyani, Clock synchronization for wireless sensor networks: a survey, Ad Hoc Networks 3 (3) (2005)281–323.

[13] W. Zhang, J. Djugash, S. Singh, Parrots: A range measuring sensor network, Tech. rep., Robotics Institute, Carnegie Mellon University,Pittsburgh, Pennsylvania 15213 (2006).

[14] N. B. Priyantha, A. Chakraborty, H. Balakrishnan, The Cricket location-support system, in: The 6th annual international conference onMobile computing and networking, ACM Press, Boston, Massachusetts, United States, 2000, pp. 32–43.

[15] N. B. Priyantha, The Cricket Indoor Location System, Ph.D. thesis, Massachusetts Institute of Technology (2005).[16] IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems, IEEE Std 1588-2008

(Revision of IEEE Std 1588-2002) (2008) c1 –269doi:10.1109/IEEESTD.2008.4579760.[17] H. Cho, J. Jung, B. Cho, Y. Jin, S.-W. Lee, Y. Baek, Precision Time Synchronization using IEEE 1588 for Wireless Sensor Networks, in:

Computational Science and Engineering, 2009. CSE ’09. International Conference on, Vol. 2, 2009, pp. 579 –586. doi:10.1109/CSE.2009.264.[18] D. Wobschall, Y. Ma, Synchronization of Wireless Sensor Networks using a modified IEEE 1588 protocol, in: Precision Clock Synchroniza-

tion for Measurement Control and Communication (ISPCS), 2010 International IEEE Symposium on, 2010, pp. 67 –70.[19] I. Amundson, X. D. Koutsoukos, A Survey on Localization for Mobile Wireless Sensor Networks, Springer-Verlag Berlin Heidelberg, 2009.[20] N. Levanon, E. Mozeson, Radar Signals, John Wiley & Sons, Inc., Hoboken, New Jersey, 2004.[21] M. I. Skolnik (Ed.), Radar Handbook, 2nd Edition, McGraw-Hill, 1990.[22] S. M. Kay, Fundamentals of Statistical Signal Processing, Volume 2: Detection Theory, Prentice Hall, 1993.[23] D. Havelock, S. Kuwano, M. Vorlander (Eds.), Handbook of Signal Processing in Acoustics, Springer, 2008.[24] J. S. Bradley, Using ISO 3382 measures, and their extensions, to evaluate acoustical conditions in concert halls, Acoustical Science and

Technology 26 (2) (2005) 170–178.[25] S. A. R. Zekavat, R. M. Buehrer, Handbook of Position Location - Theory, Practice, and Advances, John Wiley & Sons, Inc., 2011.[26] J. Perez-Ramirez, D. Borah, D. Voelz, Optimal 3-d landmark placement for vehicle localization using heterogeneous sensors, Vehicular

Technology, IEEE Transactions on 62 (7) (2013) 2987–2999. doi:10.1109/TVT.2013.2255072.[27] Y. Chen, J.-A. Francisco, W. Trappe, 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, 2006, pp. 365 –373.doi:10.1109/SAHCN.2006.288441.

[28] K. Liu, X. Liu, , X. Li, Guoguo: Enabling Fine-grained Indoor Localization via Smartphone, in: MobiSys’13, Taipei, Taiwan, June 25-28,2013.

[29] J. Rantala, High Accuracy Indoor Positioning - Technology Solution and Business Implications, in: 3rd Invitational Workshop on Oppor-tunistic RF Localization for Next Generation Wireless Devices, NOKIA Research Center, 2012.

[30] Ubisense, Ubisense Series 7000 IP Sensors, Precision ultra-wideband measurement devices for industrial environments (2012).[31] H. Schweinzer, M. Syafrudin, Losnus: An ultrasonic system enabling high accuracy and secure TDoA locating of numerous devices, in:

Indoor Positioning and Indoor Navigation (IPIN), 2010 International Conference on, 2010, pp. 1 –8. doi:10.1109/IPIN.2010.5645819.[32] M. Pietrzyk, T. von der Grun, Experimental validation of a toa uwb ranging platform with the energy detection receiver, in: Indoor Positioning

and Indoor Navigation (IPIN), 2010 International Conference on, 2010, pp. 1–8. doi:10.1109/IPIN.2010.5647794.[33] M. Segura, H. Hashemi, C. Sisterna, V. Mut, Experimental demonstration of self-localized ultra wideband indoor mobile robot navigation sys-

tem, in: Indoor Positioning and Indoor Navigation (IPIN), 2010 International Conference on, 2010, pp. 1–9. doi:10.1109/IPIN.2010.5647457.[34] J. Prieto, A. Jimenez, J. Guevara, J. Ealo, F. Seco, J. Roa, F. Ramos, Performance Evaluation of 3D-LOCUS Advanced Acoustic LPS,

Instrumentation and Measurement, IEEE Transactions on 58 (8) (2009) 2385–2395. doi:10.1109/TIM.2009.2016378.[35] A. Mandal, C. Lopes, T. Givargis, A. Haghighat, R. Jurdak, P. Baldi, Beep: 3D Indoor Positioning using Audible Sound, in: Consumer

Communications and Networking Conference, 2005. CCNC. 2005 Second IEEE, 2005, pp. 348–353. doi:10.1109/CCNC.2005.1405195.

20