Professional Documents
Culture Documents
Contents
Contents
1 Introdution
2 Implementation
2.1 Fingerprinting-based Nearest Neighbor Search . . . . . . . . . .
2.2 Model-based Nearest Neighbor Search . . . . . . . . . . . . . .
2.3 Statistical Calculations . . . . . . . . . . . . . . . . . . . . . . .
3
3
4
4
3 Experiments
3.1 Signal Strength compared to Distance . . . . .
3.2 Error Distributions . . . . . . . . . . . . . . . .
3.3 Online Samples compared to Median Accuracy
3.4 Values of K compared to the Median Accuracy
4
4
5
5
6
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
4 Conclusion
Bibliography
Introdution
Introdution
In this report, we will present our Java-based WiFi Positioning project, which
focuses on the implementation and evaluation of nearest neighbor searches in
an indoor environment.
First, we will cover the implementations of fingerprinting-based and modelbased k-nearest neighbor search algorithms, and also discuss some of the
choices we had to make in order to optimize our algorithms.
After having covered the implementations, we will look at the experiments
we performed using our algorithms on the supplied test data.
Lastly, we will end our report with a conclusion, which wraps up our findings from testing our nearest neighbor searches.
Implementation
In this chapter, we will go through the implementations of our, fingerprintingand model-based, nearest neighbor searches for WiFi positioning, and discuss
some of the more interesting choices we had to make when implementing them.
We will also shortly cover the implementation of the small statistics program,
scoreNN, which generates an error distribution of the output from our nearest
neighbor programs.
We furthermore created the class Utility, which is in charge of the different distance calculations and also loads the access point data.
2.1
2.2.
2.2
We used the same approach for implementing modelNN as we did in the fingerprinting case, i.e. we merged the two versions, NN and k-NN into one class,
ModelNN.
When we had to determine when a signal was unhearable, we used simple
trial and error to come up with a value would give us the best approximation
with our data set. We ended up using a value of 80dBm as this seemed to
give us the best results, even though it is a bit higher than the 96dBm which
was the value of the weakest signal detected in our empirical data set.
In the case, where an online point has none of our 11 APs of which we
know the position, we simply set the distance to the equal to NaN and make
a check for this value when computing our statistical data so it doesnt get
corrupted by the NaN.
Likewise, we chose to ignore all APs which are not part of our 11 known
APs, since we cant compute any distances if dont know their actual position.
Theoretically though, one could try to estimate the unknown APs from the
signal strengths of our offline points and see if this would give us better results.
2.3
Statistical Calculations
The scoreNN class first parses our results, from the previously mentioned
classes, by splitting each line into two GeoPosition objects, the actual position and the estimated, and then saving the real distance between them into
an array. We then calculate the average and standard deviation of the arrays
content, using the Statistics class provided by the framework, and use these
value for calculating the cumulative distribution function for each distance
value and printing it to a file.
Experiments
In this chapter we will look at the design of, and results from, the experiments
we have performed using the supplied test data as input to our implementations
of fingerprinting- and model-based WiFi Positioning.
In order to perform the hundred iterations of each experiment, we wrote
a number of shell scripts, which we distributed across a number of llama machines on the network of the Computer Science Department. All these results
are then merged and plotted using gnu plot via another script.
3.1
Figure 1 illustrates the signal strength as a function of the distance. The relatively high fluctuation in signal strengths between points at similar distances
3.2.
Error Distributions
can be attributed to the layout of the rooms, location of the mobile user and
various obstructions as well as time of day, since people are more likely to be
at the office during the day.
3.2
Error Distributions
3.3
For this(and the next graph) we were a bit in doubt of what data was expected,
but ended up concluding that it most likely was the median of each of the 100
runs, averaged. As such that is what we have computed and plotted.
3.4.
3.4
Once again, we see that the precision increases as k increases for the
fingerprinting-based algorithm while it actually decreases for the model-based
algorithm. The decrease in precision for the model-based algorithm, may be
due to the fact that we have very limited data for the APs in radio map, and
thus the average will actually skewer the result when we are forced to choose
k neighbors which might be quite far away.
Conclusion
After having implemented our Wifi Positioning nearest neighbor schemes, and
tested their precision when used on the predefined radio map data we were
given. We can conclude, as expected, that the fingerprinting-based algorithms
perform significantly better in terms of precision than the model-based algorithms, however it would have been possible to further optimize the modelbased scheme by taking into account the WAF (Wall Attentuation Factor).
Bibliography
[1] Krumm et al. Ubiquitous Computing. CRC Press, 2010.
Probability
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
15
Error distance (meters)
10
20
Fingerprinting-KNN-3.online-5
Fingerprinting-NN.online-5
model-KNN-3.online-5
model-NN.online-5
25
Bibliography
7
Bibliography