Closed snowyy2019 closed 8 years ago
If you look at the likelihood you'll see that the weighted aoa variance, weighed tof variance, and weighed tof mean are all subtracted from the weighed number of points in each cluster. So the likelihood can easily become negative.
I used an SVM because it's a quick way to learn weights from labeled data. It's unclear how the spotfi authors determined the weights. There's probably better ways to do it, but an SVM was the quickest and it worked well enough.
@egaebel Thank you! I have another problem, when i use the file '1m-0-degrees--laptop-1--test-1.dat', i will get aoa by using aoa_tof_music, but the result is not 0 degrees, and have very big difference, I have tried serval files,contains '1m-20-degrees--laptop-2--test-10.dat' , and it will get the similar result. I hope you can answer my doubts.Thank you in advance.
First, it's important to realize that my implementation of SpotFi here is limited. It is only running from a single access point, not 3-5 like in the SpotFi paper. So accuracy will be significantly diminished. On top of this, perfect accuracy is not guaranteed in SpotFi to begin with. That is why there are so may .dat files, so that I could identify my accuracy rate. Within 1m the best results I got were around a 60% accuracy rate. It gets worse as you go out further. I achieved this by only taking 10 packets sampled uniformly from the full packet stream, which is just over 1000 packets total.
If you would like to adapt my code to implement the full version of SpotFi that would be great. To do so you would only need to run my code on 3+ access points and then fuse the results together using the optimization technique presented in the SpotFi paper.
@egaebel the optimization technique is objective function? I think the aoa is irrelevant to the number of AP, and i think the spotfi use 3-5 AP in order to get the accuracy position ,not aoa, the aoa from many APs mainly used in objective function for localization.
This is the objective function used by R access points. As you can see, it includes RSSI and AoA.
I do not utilize this objective function in my code because my application required me to use only 1 access point, which would not make this function very useful.
I suggest you re-read the SpotFi paper. It must have taken me a dozen readings to fully understand everything.
@egaebel Thank you very much! i know the objective function use R APs, but i think it should be bulit on the correct aoa, i will re-read spotfi paper, Thank you again!
I have some problems about spotfi. First, I know you use a linear SVM to calculate the likelihood weigths. According to paper, the weight of tof variance should be positive, but the result in your code is negative, can you explain it? Second, how you get the trained data in learn_localization_weights function? what are the 'prep_Y' represent? Third, I found a passage from the spotfi paper, it be showed in the following picture. can you explain the passage? I think it is relate to the weigths. Four,I want know how to define aoa, how to express aoa by using the coordinate of ap and target?
Thank you!
@shaozhuchuang
This is a good starting place: https://en.wikipedia.org/wiki/MUSIC_(algorithm)
@egaebel Thank you very much! I have read some materials about music, i can understand the music algorithm. but i can't get accuracy aoa by using your code and the data i collect. i want know if you can get accuracy aoa? Thank you!
You need more access points to get full SpotFi accuracy. That is all. Like I said, I get 60% accuracy. I may be able to get it even better with more tuning, but it is not going to be perfect under such hardware constraints.
@egaebel Thank you!
@egaebel I found the likelihood is negative by using your code. i don't know the reason. Besides, Why you use SVM to train the likelihood weights. Can you explain the two problem in detail? Thank you!