Student project (course: smart phone sensing) from 2014. Built together with Mike, a fellow CS student of mine. Added here for future reference :)
The project consists of three parts: Activity monitoring, Particle system localization and WIFI signal strength/fingerprinting localization.
Based purely on accelerometer data. Uses a fast fourier transform to retrieve the normalyzed frequency from the sensors x, y and z measurements. This normalized frequency turned out to be good at differentiating between different activities such as walking, running, cycling and sitting/resting.
Example showing differences between activities. This knowledge was used to classify the actual activity:
Based on article 4. The idea behind the particle system localization is:
- Given a floorplan of a building
- You walk a path, for example 10 metres north and then 5 metres west.
- At this moment, there are only so many possibilities on the floorplan where you could've walked this path (not walking through walls, desks etc.)
This is where the particle system comes in:
- When starting, the probability of you being on any point on the map is equal.
- To approximate this, we uniformly distribute x "particles" over the floorplan.
- When you move, each particle is moved with the amount of metres in the direction you walk.
- Some particles will hit an object and "die". They will be added in the neighborhood of existing particles.
- After moving, it is to be noticed that groups of particles are formed at possible locations on the floorplan.
- When the moved pattern is unique enough, there will only be one group. At your actual position.
Because measurements are not perfect:
- The particles are moved +/-x% of the actual distance (random, per particle).
- The direction of the particles is, per particle, also randomly altered by +/-y%.
- This decreases the accuracy, but will handle real-world imperfections. The outcome is similar.
There's only one long hallway, the simplest example to show how we can find our position.
- Uniform init:
- Walk left to about 330 (the end of the wider part of the hallway):
- Walk further left to 040. Note that the door in the hallway resulted in a significant loss of "correct" particles:
- Walk further left and reach the end of the corridor. We're now fairly certain of our location:
Walk up, walk left and then up again. Basically moving from one to another office on the floormap. Where could we be?
- Initial state:
- Walk up from 090 to the corridor:
- Walk left to office 290:
- Walk up again, into the office (290) to the window:
As you can see, there still are multiple possibilities for our location. Walking around will further reduce to a lower amount of possibilities. (Note that this is a highly repetitive environment, which is not that well suited for our tests.)
Based on WiFi signal strength (RSSI). The idea behind this is from article 3, explaining Bayesian Indoor Positioning filters. The idea from this article is basically implemented as part of this application.
- G. F. R. B. Eladio Martin, Oriol Vinyals. Precise indoor localization using smart phones. 2010.
- A. Junior. Fast fourier transfer result computing. http://stackoverflow.com/questions/12007071/ fft-and-accelerometer-data-why-am-i-getting-this-output August 2012.
- D. Madigan, E. Elnahrawy, R. P. Martin, Wen-Hua, P. Krishnan, and A. Krishnakumar. Bayesian indoor positioning systems, July 2005.
- A. Rai, K. K. Chintalapudi, V. N. Padbanabhan, and R. Sen. Zee: Zero-effort crowdsourcing for indoor localization. august 2012.
- N. Roy, H. Wang, and R. R. Choudhury. ’i am a smartphone and i can tell my user’s walking direction’.
- B. P. M. m. Sauvik Das, LaToya Green. Detecting user activities using the accelerometer on android smartphones, July 2010.
- C. University. Fast fourier transfer. https://www.ee.columbia.edu/~ronw/code/ MEAPsoft/doc/html/FFT_8java-source.html, 2006.