Giter Club home page Giter Club logo

onestepatatime's Introduction

OneStepAtATime - Step counter using auto-correlation

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

What is this project about?

  1. This project utilizes Contiki, using the microcontroller's X,Y,Z accelerometer data to measure and record movements.
  2. The objective is to determine if the user is walking, in a bus or is stationery (small movements are allowed).
  3. 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.

Why use auto correlation?

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.

Overview of algorithm

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.

Running

Dependencies: -Python3 -Pip3 -Paho-MQTT -PySerial

Compiling:

  1. Install dependencies.
  2. Enter the project directory.
  3. To make the files: make TARGET=srf06-cc26xx BOARD=sensortag/cc2650 sensors_data_comm.bin CPU_FAMILY=cc26xx

Using MQTT:

  1. Copy and paste your cacert.pem file into the project directory.
  2. 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:

  1. Open autocorrelation.py
  2. Change USING_SERIAL value to "True"

onestepatatime's People

Contributors

cherrygoh avatar hermanwongkm avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

rakeshpilkar82

onestepatatime's Issues

SD Threshold for Idle?

What is the threshold for idle?

In the paper "Zee: Zero-Effort Crowdsourcing for Indoor Localization" it indicates 0.01
Screen Shot 2023-08-21 at 1 39 28 PM

but the autocorrelation code uses 0.02
https://github.com/hermanwongkm/OneStepAtATime/blob/master/autocorrelation3.py#L228

if (sd < 0.02):

and it is set 0.02 in main.py
https://github.com/hermanwongkm/OneStepAtATime/blob/master/main.py#L84
if(sd < 0.02):

Also the cutoff for "DRIVING" is different between main and autocorrelation, which should be used?

elif (autoCorrelationValue > 0.4 and sd < 0.08):

elif (acChosen > 0.4 and sd < 0.05):

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.