• No results found

ETOA acoustic ranging

N/A
N/A
Protected

Academic year: 2021

Share "ETOA acoustic ranging"

Copied!
37
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Bachelor Informatica

ETOA acoustic ranging

Harm van Eekeren

January 26, 2020

Supervisor(s): dr. Anthony van Inge

Inf

orma

tica

Universiteit

v

an

Ams

terd

am

(2)
(3)

Abstract

In this research acoustic ranging with the beepbeep [6] technique has been performed. For multipath errors a method has been designed that calculates the z-score in a moving window. To improve accuracy, a method had been designed that uses peak window detection to locate the peak more accurately. The results show that nodes can be located with a 3% error over a range of 9 meter.

(4)
(5)

Contents

1 Introduction 7

2 Theoretical background 9

2.1 Properties of sound that impact acoustic ranging . . . 9

2.1.1 Speaker and microphone imperfections . . . 10

2.2 Acoustic ranging . . . 11

2.2.1 Elapsed time of arrivals (ETOA) ranging . . . 11

2.2.2 Prior research . . . 12

3 Implementation 15 3.1 Communication protocol for multiple nodes . . . 15

3.2 The acoustic signal . . . 16

3.2.1 Frequency response . . . 16

3.3 Peak window detection . . . 17

3.3.1 configuration . . . 18 3.4 Multipath mitigation . . . 19 3.4.1 Configuration . . . 19 4 Experiments 21 4.1 Overview . . . 21 4.2 Configuration Experiments . . . 22 4.2.1 Setup . . . 22 4.2.2 Comparison of methods . . . 23

4.2.3 Relation of accuracy to duration . . . 25

4.2.4 Relation of accuracy to frequency . . . 26

4.3 Wall Experiment . . . 28

4.4 Long range experiments . . . 30

4.4.1 Inside long range test . . . 30

4.4.2 Outside long range . . . 31

5 Discussion 33 5.1 Comparison to other researches . . . 33

5.1.1 Beepbeep . . . 33

5.1.2 Whistle . . . 34

5.1.3 Swordfish . . . 34

6 Conclusion 35 6.1 Future research . . . 35

(6)
(7)

CHAPTER 1

Introduction

Acoustic ranging has applications in various network functions, such as network routing, topology control, coverage, boundary detection, clustering. [4] Meijerink has shown that acoustic ranging can be used for navigation in a group of robots. [5] In this thesis focuses on acoustic ranging itself.

Traditionally acoustic ranging was done by measuring the time-of-arrival(TOA) or the round-trip-of-flight(RTOF), but these technique are limited by uncertainties such as clock synchroniza-tion. In 2007, Peng et al. designed a novel time-difference-of-arrival(TDOA) ranging technique that does not require clock synchronisation and is not effected by any form of delay caused by processing; “Beepbeep: a high accuracy acoustic ranging system using cots mobile devices” They achieved centimeter accuracy in an area of up to 10 meters. Which is significantly better than traditional acoustic ranging. [6] The beepbeep ranging technique allows for localization using only a speaker and a microphone. The beepbeep ranging technique has therefore been used in this thesis.

There have been a couple other researches that have studied this technique. [10, 9, 7] These researches have differences in their implementation and results. There are many possible config-uration options. For example the dconfig-uration of the signal, what frequency and how to deal with multi-path errors.

The goal of this thesis is to make an implementation of the beepbeep technique. To do this, the right chirp will be tested for. This will be done by testing the accuracy for varying frequency ranges and duration. To deal with reflection, a multipath mitigation method will be designed. Finally the results will compared with similar researches.

RQ: How accurate is the Beepbeep ranging technique?

This research question will be answered using the following sub-questions.

1. What method of multipath mitigation can be used?

Different have implemented this technique and used a different method for handling mul-tipath errors. It is interesting why different methods are used. Probably it depends on the environment or the devices being used.

2. How does the duration effect the accuracy?

A longer duration should increase the accuracy, but will lower the measurement frequency. Information on how the duration effects the accuracy can help with making the right choice in the trade-off between accuracy and measurement frequency.

3. How does the frequency range effect the accuracy?

It is interesting to know how the frequency range effects the accuracy. Lower ranges reduce accuracy because they produce a less sharp correlation. High frequencies might impact performance because of lack of diffraction in the signal.

(8)
(9)

CHAPTER 2

Theoretical background

2.1

Properties of sound that impact acoustic ranging

The speed of sound is not constant. At 20◦C, the speed of sound is approximately 343m/s. This value was used for calculating the distances in the experiments.

When sound encounters a medium boundary, reflection and diffraction may occur.

(a) Diffraction.

(b) Refection.

The amount that will be reflected depends on the dissimilarity of the materials. The less similar the mediums are, the bigger the amount that is reflected. The most reflective materials are therefore materials that are hard and smooth. When applying acoustic ranging, the structure of the walls can impact the measurements.

Figure 2.1b shows how reflection causes the sound to arrive at the microphone from different paths. To avoid detection the wrong path, multipath mitigation must be applied. This will be discussed in section 3.4.

Diffraction is the phenomenon of waves bending around edges an spreading out when they pass through little holes. The amount diffraction that happens depends on the wavelength. The bigger the wavelength, the more diffraction.

Sound diffraction also occurs at speakers. Speaker generally send sound in single direction, but due to diffraction it spreads out. Sound with lower frequency will spread out more then sound with a high frequency.

(10)

2.1.1

Speaker and microphone imperfections

Speakers never produce the exact signal they intend to produce, and microphones never record how the sound really was. Different speakers and microphones modify the sound in their own way. In section 3.3 it shown how nodes show a different correlation depending on who is the speaker/listener.

Speaker directivity

A particular interesting cause of speaker imperfections is speaker directivity. Speaker directivity is the phenomenon of speakers producing a different volume along its off axis angle. Speaker directivity is caused by the shape of the speaker, and therefore varies between different speakers. A wide directivity means a constant volume over the off axis angle, a narrow directivity means a substantially different volume. [1]

The amount of speaker directivity occurring, depends on the wavelength of the sound pro-duced. When the speaker diameter is small in comparison to the the wavelength, the speaker will have a wide directivity. This means that produced volume is constant over the off-axis angle. When speaker diameter is big in comparison to the the wavelength, the speaker will have a nar-row directivity. This means that the volume varies along the off-axis angle. A narnar-row directifity causes the sound to beam in the direction of the off axis and will cause lobing in the off-axis angle. [1]

Figure 2.2 visualizes the phenomenon of lobing in polar graphs. 0 indicates the off-axis and the distance to the origin is the volume. The variable ka is the circumference divided by the wavelength.

(11)

2.2

Acoustic ranging

Traditionally acoustic ranging was done by measuring the time-of-arrival(TOA), time-difference-of-arrival(TDOA) or round-trip-of-flight(RTOF).

TOA ranging is done by sending a signal and measuring the moments it leaves the sending device and arrives at the receiving device. This gives three uncertainties: The differences between the clocks, the difference between the timestamp and the moment that the sound is emitted, and the difference between timestamp and moment that the sound arrived. TOA ranging has been used in [3] for localisation using preconfigured anchor nodes. They achieved an accuracy of 6-25cm.

TDOA ranging is done by sending a acoustic and radio signal simultaneously. Since the radio signal is much faster than the acoustic signal, the difference in the arrival between the radio and acoustic signal can used to estimate the TOF of the acoustic signal. In this method there is no need for synchronised clocks. This was done by Sallai et al. who achieved a average accuracy of 8cm. [8]

In RTOF the receiving device sends a signal back immediately after it received the first signal. This avoids the problem of having synchronised clocks, but is effected by a signal processing delay. [2]

All of TOA, TDOA and RTOF are effected by processing latency. There is a delay between the moment the application instructs the speaker the produce a signal and the moment it actually leaves thes speaker. Similarly there is also a delay between the moment a acoustic signal arrives at the speak and the moment it is in memory. An analysis made in [6] shows that in mobile phones this can be up to 2ms, which results in an error of 70cm.

2.2.1

Elapsed time of arrivals (ETOA) ranging

Peng et al. designed an acoustic ranging technique which is unaffected by all the uncertainties mentioned above. The technique works in three stages: First sensing, then analysing and finally communicating ETOA’s and calculating the distance from these ETOA’s.

Figure 2.3: Illustration of the sensing stage.

In the first step, node A and B both start recording. Node A sends out a signal first. After node A is finished, node B starts beeping. After node B has finished, both stop recording and proceed to the second step. In the second step, they analyse their recording. They analyse when each of the nodes beeped and then count the samples between the moments that the beeps where received. The number of samples between these moments is the elapsed time of two arrivals(ETOA). Once they have determined the ETOA, they proceed to the final step where they communicate to each other their findings and calculate the distance between them.

To show how the distance can be calculated from the ETOA’s, the distance as a function of the ETOA’s will be derived. If we denote dx, y as the distance between node x and y, then from

(12)

Figure 2.4: Illustration of the first stage. MAand MBrepresent nodes. txx represents a moment.

[6]

figure 2.4 we can derive four equations:

dA,A= c ∗ (tA1− tA0) (2.1)

dA,B= c ∗ (tB1− tA0) (2.2)

dB,A= c ∗ (tA3− tB2) (2.3)

dB,B= c ∗ (tB3− tB2) (2.4)

We define the distance as in 2.5, and then make the following derivation.

D =1 2 ∗ (dA,B+ dB,A) (2.5) = c 2 ∗ ((tB1− tA0) + (tA3− tB2)) (2.6) = c 2 ∗ (tB1− tB2+ tB3− tB3+ tA3− tA0+ tA1− tA1) (2.7) = c 2 ∗ ((tA3− tA1) − (tB3− tB1) + (tB3− tB2) + (tA1− tA0)) (2.8) = c 2 ∗ ((tA3− tA1) − (tB3− tB1)) + dA,A+ dB,B (2.9) Equation 2.9 is the formula by which the distance can be calculated. In this formula the parts (tA3− tA1) and (tB3− tB1) represent the ETOA’s of node A and B respectively. It can seen

from this equation that it successfully removes the problems of TOA ranging described earlier. There are no timestamps only the time between the arrival of the signals and the delay between the moment that signals are emitted is cancelled out because it effects both ETOA’s by an equal amount.

2.2.2

Prior research

There are a few researches that have applied this ranging technique. This section will mention their differences and the accuracy they achieved.

Beepbeep[6] dealt with multipath errors by taking the first sharp peak. They define the sharpness of peak as the ratio of the peak value to the average absolute cross-correlation values in its vicinity and then check if there is an earlier peak that has at least some that ration times 0.85. They used a frequency range of 2-6kHz and a duration of 50 milliseconds. They tested in

(13)

different environments. Figure 2.5 show their results for their indoor measurement. This is the most similar environment to what was used in this research.

Figure 2.5: Results of the indoor measurement of Beepbeep. [6]

Whistle[9] actually designed a method to detect the 3D location of a node, and compared the distance with 2D implementation. Their research is interesting for their 3D implementation, but since they implemented 2D ranging as well, their results can used for comparison. Whistle also dealt with multipath errors by taking the first sharp peak, however they use different definition of the sharpness. They define the sharpness of peak by the height and slope. And the first peak that meets the requirements for the height and slope is taken. They used a signal with a frequency of 2-6KHz and a duration of 50 milliseconds. Exactly similar to Beepbeep. Since Whistle designed their system for 3D measurements and compared it the 2D measurements, their method of multi-path mitigation might work better for 3D measurements. They also used a special designed testbed in the shape of weave, so the angle between the speaker and the microphone was not constant.

Figure 2.6: Results of whistle. [9] The results are from different 3D positions. The plot on the left is the distribution of the error from the expected value. This is however expressed as the error from the expected ETOA. An error of 1ms corresponds to approximately 34.3cm.

Swordfight[10] applied various techniques to improve the measurement frequency without losing accuracy. They send out the same tone twice. By auto-correlating the recording with a delayed stream of the recording they find the rough position of the signal in O(1). They then apply a correlation with the original signal in region of the rough position to find the peak

(14)

with a higher accuracy. Furthermore they designed a pipelined execution strategy that allows them to do computation and streaming at the same time and removes the audio playing lag. They applied a very different form of multipath mitigation. They apply multipath mitigation by filtering with a high-pass filter and then applying a lower limit to the power level of the signal and the peak of the autocorrelation. This method of multipath mitigation assumes that a peak caused by multipath mitigation is lower then to original peak. Which is opposite to Beepbeep and Whistle, who applied multipath detection to find peaks of a lower height. Finally, they also applied Doppler prediction. Instead of using a chirp as the signal, they used a m-sequence.

Figure 2.7: Results of the static measurement of Swordfight. [10]

Comparison

Beepbeep and Whistle used the same signal but a different multipath mitigation technique. Beepbeep has significantly better results. Swordfight applied a method of mutipath mitigation that is based on the assumption that reflections induce lower peaks, which is opposite to Beepbeep and Whistle, who applied multipath detection to find peaks of a lower height. It is remarkable that they don’t have reflection with a higher peak, while Beepbeep and Whistle do. This is possibly because they only tested on short distances. It is also possible that the use of a m-sequence instead of a chirp made a difference.

(15)

CHAPTER 3

Implementation

3.1

Communication protocol for multiple nodes

The communication protocol is designed to work with multiple nodes. It was chosen to design a decentralized protocol, because this allows any node to join and leave.

(16)

3.2

The acoustic signal

A chirp has been used for the acoustic signal, because it has the property that its auto-correlation is a single peak. This makes possible to detect the signal in the recorded data by correlating the recorded data with the signal.

(a) A chirp with a frequency range of 0.5-3kHz

and a duration of 0.01s. (b) Corresponding auto-correlation.

Figure 3.2: A example chirp and its auto-correlation.

The sound is emitted and recorded at a frequency of 44.1kHz, which means that the data in the recording is separated by441001 second, which makes the distance granularity44100343 = 0.778cm. This means that the maximum accuracy with which the peaks can be detected is0.7782 = 0.389cm, because the ETOA’s are added and then divided by two.

3.2.1

Frequency response

Figure 3.3 shows the frequency responses of the nodes that where used for the experiments. The frequency response is a measure of the produced volume for different frequencies. Figure 3.3 suggests that the frequencies from 0.5-10kHz should be sufficient.

(17)

3.3

Peak window detection

After the nodes have both produced their acoustic signal, the protocol proceeds to detect the moment that signals were emitted. The first step is to correlate the recording with the undistorted signal. The result of this correlation will in the future simply be called; the correlation.

An undistorted signal looks like the auto-correlation in figure 3.2b. However, because of speaker imperfection and diffraction, the produced signal is not as clear. The correlation does not always have a single peak. In a window around the peak there are peaks as well, even when no reflection is involved. These peak windows are displayed in figure 3.4. From these windows it can be seen that it is sometimes unsure which peak marks the start of the signal.

(a) PC1 correlating itself (b) PC1 correlating PC2

(c) PC2 correlating PC1 (d) PC2 correlating itself

Figure 3.4: The correlation peak windows. The line is the average and the light blue area contains data within one standard deviation of the average.

The cause of the measured peak windows being different from the theoretical peak window, is a combination of properties of sound and speakers that cause signal distortion.

It is hard to say whether its shapes are mainly caused by speaker and microphone imper-fections or by reflection and diffraction. The speculation is that the main cause is speaker imperfections. This is because the shapes seem to be quite similar in a different environment. For example, 3.5 shows how the correlation looks when walking though the room, compared to the stationary setup.

Detection method

From the correlation we want to detect where the signal starts. However its actually not sure which peak represents the start of the signal. For example. In figures 3.4a and 3.4c there is clearly a big peak at the start. So that peak is probably the where signal is emitted. In figure

(18)

(a) PC1 correlating itself, while on the table (b) PC1 correlating itself, while walking

Figure 3.5: Comparison of correlation peaks

3.4d however, the second peak is so much bigger than the first. So its unclear whether the first peak or second peak represents the moment that the signal was emitted. However, if the same peak is consistently taken as the start of the signal, then it doesn’t matter if its the wrong peak, because it can be corrected with a constant offset.

The easiest detection method is just taking the highest peak. Would the correlation look like the theoretical correlation, then this would be a good method. However, since the correlation sometime contains peaks of similar height, this appeared to be a bad method.

Another way of detecting the peaks is by finding the first peak that is higher than some minimum height threshold, or minimum height threshold relative to its surrounding region. This causes bad measurements as well, because for every threshold its possible that there is a correlation in which the first peak is always approximately of that height threshold, and a second peak that is higher. In this case, its impossible to consistently detect the same peak.

The method that had the best results was to detect a window around the peaks instead of a single peak. For this method, the average shape of this window was detected for each speaker-microphone combination. This average peak window is the detection peak window. An example of the detection peak windows can be seen in figure 3.4. Then these detection peak windows were used to detect when the signal started. This was done by searching a window in the correlation for a window that is most similar to the detection peak window of a specific connected node. For detecting what window was most similar to the detection peak window, the L2-norm between these windows was calculated. The L2-norm is the sum of the distances between the correlation and the shape of the peak and is defined by:

kxkL2 := n

X

i=1

x2i

The L2-norm was calculated for every point in the window. This gives a minimal value where the correlation and the average shape match.

3.3.1

configuration

For the peak window, a size of 200 data samples was used. This means 100 samples before and after the highest peak. The average peak windows can be seen in figure 3.4. The area used to find better peaks was set to 100. That means 50 before the highest peak and 50 after. This is big enough because the peaks are generally around 30 samples apart. A bigger area would only cause more errors because it would be at risk of containing peaks of reflections.

(19)

3.4

Multipath mitigation

Sometimes the reflection of a beep causes an bigger peak. For this problem, multipath mitigation has been applied.

Multipath mitigation was applied in the following way: After the correlation we search for the highest peaks. The highest peaks are an approximation of where the signal starts. After the highest peaks are known, the area before the highest peak is checked for having a peak. To check this area for having a peak, an algorithm was used that computes the z-score in a window of the data previous to the peak. That window moves towards the first detected highest peak, and if it detects another peak, then there must have been a multipath error.

r

Figure 3.6: Example of multipath mitigation. This figure displays the correlation of a recorded chirp where a multipath error has occured. The blue line is the correlation of the recorded data with the chirp. After the correlation the chirp is found by looking for the highest peak. The highest peak is found at approximately 16100 in this graph. Then the robust peak detection algorithm is applied to find multipath errors. The green line shows the minimum height for a peak to be detected. It detects a peak at 15600

3.4.1

Configuration

There are two configuration options.

First is the area in which the z-score is calculated, this area was configured to be 1000 data samples. No tests have been made to optimize this value. The main requirements for this value is that it not short, which would cause an imprecise z-score, and also not to big, which would cause interference with a previous emitted signal. Since signals with a duration of 50ms are in a optimal scenario only 2205 data samples apart, a value higher then 1000 is at risk of being affected by refection’s of previous signals.

Secondly is the requirement for the prominence for the peak. The requirement used, was that peak must be at least a factor of 8 higher then the z-score.

(20)
(21)

CHAPTER 4

Experiments

4.1

Overview

Section 4.2 contains experiments with different configurations. Firstly the effectiveness of the implemented methods of is displayed. Then are tests for varying duration and frequency ranges. In section 4.3 the accuracy near a wall is tested. This test was performed because it is useful information for indoor ranging. In section 4.4 the ranging is tested over a longer distance in an indoor and outdoor environment.

In the wall experiment and the long range experiment a frequency range of 500-3000Hz was used. This is not an ideal frequency range. This frequency range was chosen because there were ideas to use different frequency ranges per node.

The results are often displayed in a confidence plot. These confidence plots show the percent-age of measurements that are within some distance from the true distance. The true distance is measured by tape.

The tables show mean absolute deviation and the standard deviation. The standard deviation was added for comparison with other papers. The mean absolute deviation was added because the data does not display a normal distribution and the standard deviation is more effected by outliers.

(22)

4.2

Configuration Experiments

4.2.1

Setup

In the setup laptops were used as nodes. Since laptops use multiple speakers, only the right speaker was used. The testing has been done at three different distances, 0.1m, 0.5m and 2.0m. These distances where chosen because they allowed comfortable testing at my desk without moving furniture around. The exact setup can be seen in figure 4.2.

(a) 0.1 m setup. (b) 0.5 m setup. (c) 2.0 m setup.

(23)

4.2.2

Comparison of methods

(a) Max peak (b) Peak window detection

(c) Multipath mitigation (d) Multipath mitigation and peak window detection

Figure 4.3: Comparison of signal detection methods. The red dots are measured values and the line is taken through the averages. The y-axis represents the measured values and the x-axis the actual distance between the nodes. For each of three distances 100 measurements have been made.

Figure 4.3 displays a comparison of methods to find the signal. By taking only the highest peak, the results show various error measurements. The short distance(0.57m) results show two dots. Those are at 0.57 and approximately 0.37, This error is caused by the detection of a different peak. At the long distance(2.34m) the data shows measurements of 3m and 4.5m. These are multipath errors.

Figure 4.3b shows the application of peak window detection. It can be seen that in short distances(0.57m, 0.88m) the signal is detected with better accuracy. In the longer distance, this method does not improve the accuracy.

Figure 4.3c shows the application of multipath mitigation. This method mitigates the mul-tipath errors, but detects the peaks with a lower accuracy.

Figure 4.3d show the application of both multipath mitigation and peak window detection. This gives the best results.

(24)

(a) Max peak (b) Peak window detection

(c) Multipath mitigation (d) Multipath mitigation + peak window detection

Figure 4.4: Comparison of peak detection methods. The y-axis projects percentage of measure-ments within a specific distance and the x-axis the distance between the nodes. For each of three distances 100 measurements have been made.

Method max pwd mpm mpm & pwd

MD(cm) 78.7 48.3 9.3 0.5

MAD(cm) 9.1 1.5 1.4 0.6

SD(cm) 16.9 3.3 3.8 2.6

Table 4.1: Mean deviation(MD) from the true distance, mean absolute deviation(MAD) and standard deviation(STD) of the long range outdoor measurements.

Figure 4.4 shows the confidence by which the correct distance is measured. The blue and yellow lines represent the percentage of measurements that are less then 0.10m and 0.60m from the true distance. The amount of difference of a measurement from the actual distance is an indication of what causes this error measurement. All measurements that have an error of more then 0.60m, are effected by reflection. Measurements that are within 0.10m and 0.60m are caused by the detection of a wrong peak window. And all data that is within 0.10m of the actual distance is considered to be correctly measured.

In figure 4.4b the two lines are in top of each other. This means all measurements are either correct or effected by reflection. Figure 4.4c shows that all data in within 0.6m confidence, but very little within the 0.1m confidence. This means that different peak windows are detected.

(25)

4.2.3

Relation of accuracy to duration

(a) 0.05 sec (b) 0.1 sec

(c) 0.2 sec (d) 0.3 sec

Figure 4.5: Comparison of chirps with a varying duration. Both multipath mitigation and peak window detection are applied. The y-axis projects percentage of measurements within a specific distance and the x-axis the distance between the nodes. For each of three distances 100 measurements have been made.

Duration 0.05s 0.1s 0.2s 0.3s 0.4s

MD(cm) 29.5 7.8 1.0 0.6 0.5

MAD(cm) 34.1 12.7 1.7 0.4 0.6

SD(cm) 70.0 36.1 3.7 1.7 2.6

Table 4.2: Mean deviation(MD) from the true distance, mean absolute deviation(MAD) and standard deviation(STD) of the long range outdoor measurements.

The data in table 4.2 shows that measurements with a duration of 0.3 seconds are detected with a standard deviation of 2cm. This means that the accuracy increases with the duration of the signal, but after a duration of 0.3 and higher it is limited by the sample rate.

The data in table 4.2 shows that under 0.2 seconds the accuracy is significantly lower. For a duration of 0.3 seconds and higher, the accuracy is almost the same as the distance granularity imposed by the sample rate.

(26)

4.2.4

Relation of accuracy to frequency

(a) frequency rang: 1000-2000 (b) frequency rang: 2000-4000

(c) frequency rang: 4000-8000 (d) frequency rang: 8000-16000

Figure 4.6: Comparison of chirps with a varying frequency range. Both multipath mitigation and peak window detection are applied. The y-axis projects percentage of measurements within a specific distance and the x-axis the distance between the nodes. For each of three distances 100 measurements have been made.

Frequency 1000-2000Hz 2000-4000Hz 4000-8000Hz 8000-16000Hz

MD(cm) 17.3 8.5 2.6 23.3

MAD(cm) 12.7 12.1 5.6 20.7

SD(cm) 14.7 13.9 15.1 45.4

Table 4.3: Mean deviation(MD) from the true distance, mean absolute deviation(MAD) and standard deviation(STD) of the long range outdoor measurements.

Figure 4.6 shows how the accuracy varies for different frequency ranges. It can be seen that the middle frequency ranges perform better than outer. It was expected that the higher frequency range(8-16kHz) would have a lower accuracy, because it can be seen from figure 3.3 that the frequency response in that region is significantly lower.

(27)

(a) frequency rang: 1000-3000 (b) frequency rang: 1000-5000

(c) frequency rang: 1000-9000 (d) frequency rang: 1000-17000

Figure 4.7: Comparison of chirps with a varying frequency range. Both multipath mitigation and peak window detection are applied. The y-axis projects percentage of measurements within a specific distance and the x-axis the distance between the nodes. For each of three distances 100 measurements have been made.

Frequency 1000-3000Hz 1000-5000Hz 1000-9000Hz 1000-17000Hz

MD(cm) 13.1 9.5 0.6 11.3

MAD(cm) 4.0 17.4 0.2 16.9

SD(cm) 6.0 39.8 0.2 29.4

Table 4.4: Mean deviation(MD) from the true distance, mean absolute deviation(MAD) and standard deviation(STD) of the long range outdoor measurements.

(28)

4.3

Wall Experiment

The wall test tests the accuracy as one of the devices approaches the wall. Figure 4.8 shows the setup and figure 4.9 shows the results.

(a) The left laptop is against the wall.

(b) The maximum distance be-tween the wall

Figure 4.8: The setup for the wall test. The tests were done at distances from 0 to 35 cm between the left laptop and the wall. With a distance granularity of 5 cm.

(a) Scatter plot of the measured distance against the

true distance. (b) Confidence

Figure 4.9: Results of the wall test. For this test, a chirp with a frequency range of 500-3000 and a duration of 0.1 sec was used.

True distance 0.86m 0.91m 0.96m 1.01m 1.06m 1.11m 1.16m 1.21m

Wall distance 0.38m 0.33m 0.28m 0.23m 0.18m 0.13m 0.08m 0.03m

MD(cm) -0.1, (-0.12%) -0.3, (-0.33%) 5.0, (5.21%) -1.2, (-1.19%) -1.4, (-1.32%) 19.3, (17.39%) -4.9, (-4.22%) -1.0, (-0.83%)

MAD(cm) 0.1, (0.12%) 0.0, (0.0%) 8.8, (9.17%) 0.5, (0.5%) 0.1, (0.09%) 6.2, (5.59%) 5.8, (5.0%) 2.5, (2.07%)

SD(cm) 0.2, (0.23%) 0.1, (0.11%) 10.6, (11.04%) 2.5, (2.48%) 0.2, (0.19%) 9.0, (8.11%) 9.5, (8.19%) 5.6, (4.63%)

Table 4.5: Wall distance is the distance between the node A and the wall, the true distance is the distance between the nodes. Mean deviation(MD) from the true distance, mean absolute deviation(MAD) and standard deviation(STD) of the long range outdoor measurements.

As can be be seen from figure 3.4, the peak windows 3.4b and 3.4d have peaks of similar height. The distance between those peaks corresponds to a distance of approximately 25 centimeter. This error can also be seen in figure 4.9b. The error measurements are either 25 cm above or below the true distance. The explanation for this error is that the reflection interferes with the signal. The reflection then arrives simultaneous with the second peak in the peak window which can causes an error of approximately the the distance between peaks.

When the device is exactly against the wall, there are less error measurements than for 5 or 10 cm away from the wall. This is expected because when the speaker is directly against the

(29)

wall, then the reflected signal arrives so shortly after the direct signal that there is no double peak.

(30)

4.4

Long range experiments

In the long range experiments the nodes were further away from walls. The most reflection would have occurred in the inside experiment where the sound reflected against the roof.

4.4.1

Inside long range test

(a) Scatter plot of the measured distance against the

true distance. (b) Confidence

Figure 4.10: Results of the inside long range test. For this test, a chirp with a frequency range of 500-3000 and a duration of 0.1 sec was used.

Distance 1.38m 2.43m 3.44m 4.51m 5.4m 6.48m 7.45m 8.81m 9.79m

MD(cm) 2.4, (1.74%) 0.0, (0.0%) -2.1, (-0.61%) -7.5, (-1.66%) -12.7, (-2.35%) 16.0, (2.47%) 24.6, (3.3%) -21.3, (-2.42%) -46.0, (-4.7%)

MAD(cm) 3.7, (2.68%) 1.5, (0.62%) 2.1, (0.61%) 6.0, (1.33%) 8.2, (1.52%) 22.9, (3.53%) 23.6, (3.17%) 21.1, (2.4%) 55.4, (5.66%)

SD(cm) 5.1, (3.69%) 3.3, (1.36%) 7.6, (2.21%) 6.3, (1.4%) 10.8, (2.0%) 26.4, (4.07%) 25.1, (3.37%) 28.1, (3.19%) 84.0, (8.58%)

Table 4.6: Mean deviation(MD) from the true distance, mean absolute deviation(MAD) and standard deviation(STD) of the long range outdoor measurements.

(31)

4.4.2

Outside long range

The Outside long range test was done in a field. There was not a lot of noise but there were many birds.

(a) Scatter plot of the measured distance against the

true distance. (b) Confidence

Figure 4.11: Results of the outside long range test. For this test, a chirp with a frequency range of 500-3000 and a duration of 0.1 sec was used.

Distance 1.5m 2.4m 3.83m 5.19m 6.81m 7.63m 9.6m 11.0m 12.71m

MD(cm) 0.4, (0.27%) 15.9, (6.63%) 41.2, (10.76%) -10.3, (-1.98%) -110.1, (-16.16%) 11.7, (1.53%) -202.5, (-21.1%) -200.3, (-18.21%) -221.8, (-17.45%)

MAD(cm) 0.6, (0.4%) 2.1, (0.88%) 18.2, (4.75%) 38.0, (7.32%) 110.7, (16.25%) 35.6, (4.66%) 84.2, (8.77%) 93.5, (8.5%) 53.8, (4.23%)

SD(cm) 2.0, (1.33%) 4.0, (1.67%) 27.8, (7.26%) 54.6, (10.51%) 113.4, (16.64%) 65.2, (8.54%) 104.6, (10.9%) 108.6, (9.87%) 86.3, (6.79%)

Table 4.7: Mean deviation(MD) from the true distance, mean absolute deviation(MAD) and standard deviation(STD) of the long range outdoor measurements.

The results show that from 4 meter, the accuracy drops significantly. The hypothesis is that this is because of surround sound and possibly bird chirps the signal is not detected correctly. In the sensing stage, the nodes stop recording once the last node communicates that its finished producing its acoustic signal. Therefore if the signal suppressed by environmental noise, then it is detected before it was emitted. There is no minimal detection threshold, so bad measurements simply give a random peak that is likely lower then the actual distance.

(32)
(33)

CHAPTER 5

Discussion

Peak window detection and multipath mitigation were implemented to increase the accuracy. Multipath mitigation was essential for the indoor setup because there was so much reflection that the correct distance would almost never measured. Peak window detection is was applied because the detection of peak windows instead of peaks solved the problem of having peaks of similar height. Peaks of similar height were usually 20cm apart for the 500-3000Hz chirp and this error was frequently measured.

From figure 4.5 and table 4.2 it can be seen that the increase in accuracy is much more significant below a duration of 0.2 seconds. A duration higher than 0.3 seconds does not give any significant improvement to accuracy and is probably limited by the distance granularity imposed by the samplerate.

The signal detection works better with a bigger difference in frequency range. The signal detection works better between 2-8kHz, compared to outside that range. It was expected that the higher frequencies would perform worse. Signals of higher frequencies have a worse frequency response and are less diffracted. It was unexpected that the frequency range of 1-2kHz would perform worse than the 2-4kHz and 4-8kHz ranges.

The peak window detection doesn’t work when its to close to the wall because of overlapping peaks. The tests show that for chirp of frequency 0.5-3kHz the peak detection works with a distance of more than 25cm away from the wall.

It can be seen in figures 4.10 and 4.11 that the inside measurements are much more accurate. The explanation is that the environmental noise outside has a big impact. It can be seen in figure 4.11 that measurements are bending down. The reason is that when the signal is not correctly detected, than the measurement will be lower than the correct measurement would have been. This is caused the way the protocol is designed. After the sound is produced by a node, it will communicate that it has finished chirping and then stop recording.

The results are effected by the setup, the material and the environment. The size of the room and the structure of the walls may have a big impact. Different material could also have a big impact. All tests are performed with the same material. Its is possible that better speakers and microphones do not need any peak window detection.

Furthermore acoustic ranging is limited by air composition and temperature. At room tem-perature the speed of sound changes by approximately 0.2% per degree in Celsius. So suppose that the uncertainty in temperature would be 5◦C, then this will give an error of 1%. This makes it hard to justify striving for sub-centimeter accuracy, when doing ranging over a couple meters.

5.1

Comparison to other researches

5.1.1

Beepbeep

In beepbeep the only peak detection that was used, was finding the highest peak. And they applied multipath mitigation by checking if there is en earlier peak with a similar sharpness. This

(34)

method did not work on the data in this research because the peaks were different depending on which device produced the signal and which device was recording.

Beepbeep set specific requirements to the peak. For example, if there is a peak that is at least 85% of the height of the highest peak, then it assumed that this peak marks the moment that the signal was emitted, and that the highest peak was caused by reflection. But if it is below 85%, than it is assumed that this peak is not caused by the signal. This worked well in their case, but is probably device specific. The use of different devices would probably change the settings. In this research, it was found that this method was not sufficient for consistent accurate results.

A likely explanation of why their method worked very well in their case, is that they only used a single type of device. This means that all the microphones and speaker are the same type. Which would give similar peaks. In this research different devices were used.

5.1.2

Whistle

Whistle shows the distribution of the measured values from the expected value. From their results is can be noted that they do not have any problems with the detection of different peaks. Their results show a seemingly normal distribution, which was not the case in this research.

5.1.3

Swordfish

Swordfish applied various techniques to improve the measurement frequency, and reached a measurement frequency of 12Hz. They applied an multipath mitigation method that assumes that any peak that is caused by reflection is lower than the direct peak. This would not work in this or any of the other researches. It probably works for them because their application was designed to be used in very short range and is only tested for distances lower than one meter.

(35)

CHAPTER 6

Conclusion

In this research an implementation has been made for the Beepbeep ranging technique. Multi-pathing errors have been mitigated by a moving z-score window and peak window detection has been applied to improve the accuracy.

The accuracy is tested for different duration’s and different frequency ranges. The amount of possible choices makes it impossible to say which is ideal. Results show that the frequencies between 2-8kHz perform better then outside of this range.

The duration has been tested with the 0.5-3kHz frequency range. From a duration of 0.3 seconds the accuracy doesn’t improve significantly anymore. The accuracy is then limited to the distance granularity imposed by the sample rate. Measurements with a duration of 50 millisecons showed significant amount of multipathing errors.

Results show that acoustic ranging can be used for accurate ranging in an inside environment. Ranging up to 8.81 meter was accurate with an average deviation of 3%. Reaching 9.79 meter the accuracy decreased significantly.

Long range tests have also been performed in an outside environment. The results were less accurate then the inside results. This is probably due to environmental noise. Outside measurements were unreliable above approximately 4m.

The biggest challenge in acoustic ranging is to be able to deal with signal distortion and sound reflection. This research found that if correct peak is found, that accuracy under 5m will generally be within a few centimeters.

6.1

Future research

In future research it could be interesting to compare the performance of different signals. In this research only chirps were used, but perhaps gaussian chirps or m-sequences perform better.

Furthermore it could be interesting to give unique signals to each node and test if simultaneous signalling is possible.

(36)
(37)

Bibliography

[1] acousticfrontiers. Speaker directivity / off axis response: theory and measurement tech-niques. 2013. url: http://www.acousticfrontiers.com/20131129controlled-directivity-speakers-open-up-your-acoustic-treatment-options/ (visited on 11/19/2019).

[2] Carlos De Marziani et al. “Acoustic sensor network for relative positioning of nodes”. In: Sensors 9.11 (2009), pp. 8490–8507.

[3] Kaikai Liu, Xinxin Liu, and Xiaolin Li. “Guoguo: Enabling fine-grained indoor localization via smartphone”. In: Proceeding of the 11th annual international conference on Mobile systems, applications, and services. ACM. 2013, pp. 235–248.

[4] Yunhao Liu et al. “Location, localization, and localizability”. In: Journal of Computer Science and Technology 25.2 (2010), pp. 274–297.

[5] Thijs Meijerink. “Acoustic ranging for mobile robot navigation”. MA thesis. University of Amsterdam, 2019.

[6] Chunyi Peng et al. “Beepbeep: a high accuracy acoustic ranging system using cots mobile devices”. In: Proceedings of the 5th international conference on Embedded networked sensor systems. ACM. 2007, pp. 1–14.

[7] Jian Qiu et al. “On the feasibility of real-time phone-to-phone 3d localization”. In: Pro-ceedings of the 9th ACM Conference on Embedded Networked Sensor Systems. ACM. 2011, pp. 190–203.

[8] Janos Sallai et al. “Acoustic Ranging in Resource-Constrained Sensor Networks.” In: In-ternational Conference on Wireless Networks. 2004, p. 467.

[9] Bin Xu et al. “High-accuracy TDOA-based localization without time synchronization”. In: IEEE Transactions on Parallel and Distributed Systems 24.8 (2012), pp. 1567–1576. [10] Zengbin Zhang et al. “Swordfight: Enabling a new class of phone-to-phone action games

on commodity phones”. In: Proceedings of the 10th international conference on Mobile systems, applications, and services. ACM. 2012, pp. 1–14.

Referenties

GERELATEERDE DOCUMENTEN

The contribution of this paper is twofold: first, we present a sampling protocol which depends on the reduction of the error-covariance matrix of the state- estimator if the

Resultantly, researchers and readers will only know whether or not the event had a significant impact over an entire event window that could potentially be as long as months,

Veel nieuws zal men er niet in aantreffen, aan analyse van het literaire werk doet deze biograaf niet of nauwelijks, maar hij heeft een prettig leesbaar overzicht samengesteld van

Een andere mogelijkheid om rassen te onder- scheiden zijn lokproeven, waarbij we er van uitgaan dat een stengelaaltjesras voorkeur heeft voor zijn waardplant; een

De effecten op het ongevalsrisico zijn echter gering en dat heeft veelal te maken met het feit dat mensen met visuele beperkingen daar vaak voor compenseren. Omdat een

De werkzame beroepsbevolking wordt gemeten met de Enquête Beroepsbevolking (EBB), het aantal banen van werkzame personen in de Arbeidsrekeningen (AR). In onderstaande tabel worden

Bladaaltjes kunnen ook bladsymptomen geven in pioen, maar bij een aantasting door bladaaltjes zijn de symptomen anders van kleur en vorm dan bij hagelschot: er ontstaan grote

Het archeologisch onderzoek werd uitgevoerd door het archeologisch projectbureau Ruben Willaert bvba?. Uitwerking en rapportage zijn van start gegaan op 15