This project's auto-correlation algorithm is based on the paper:
A. Rai, K. K. Chintalapudi, V. N. Padmanabhan, and R. Sen. Zee - zero-effort crowdsourcing for indoor localization. In Mobicom ’12, page 293, 2012
- This project utilizes Contiki, using the microcontroller's X,Y,Z accelerometer data to measure and record movements.
- The objective is to determine if the user is walking, in a bus or is stationery (small movements are allowed).
- The core of the algorithm is the auto-correlation function, which can be used to find the periodicity in a noisy signaland determine if the user is on the bus, walking or stationary.
While there exists many methods for step counting, the simplest one are using some threshold to determine the state. However, as with any threshold techique, the major drawback is determining the optimal level of threshold as this would defer from individual to individual.
Instead of using threshold methodology, based on the various paper, we decided that a periodic method would inherently be better due to the cyclical nature of walking.
Idle When a user is idle, it is expected that acceleration would be low. Thus the standard deviation in the magnitude of accleration would be low and be a good indicator of this state. However, sudden movement will lead to a higher SD, thus, we utlized auto-correlation to detect for cyclical movement.
Walking If we were to plot a graph based on the 3 axis, we could observe that walking exhibits a very periodical and repetitive pattern. We can then make use of this repeititve pattern as a way to determine the user's state.
Dependencies: -Python3 -Pip3 -Paho-MQTT -PySerial
Compiling:
- Install dependencies.
- Enter the project directory.
- To make the files: make TARGET=srf06-cc26xx BOARD=sensortag/cc2650 sensors_data_comm.bin CPU_FAMILY=cc26xx
Using MQTT:
- Copy and paste your cacert.pem file into the project directory.
- Open autocorrelation.py 2a. Inside, go to line 160 and change the email and password to your email and password 2b. Change the USING_SERIAL value to "False"
Using Serial Port:
- Open autocorrelation.py
- Change USING_SERIAL value to "True"