Help with threshold value accelerometer

Hi there i am attempting to create a step counter powered by MATLAB mobile and have been using the webpage: https://uk.mathworks.com/help/matlabmobile_android/ug/counting-steps-by-capturing-acceleration-data.html
However once it uses the findpeaks function it mentions changing the threshold value and states "This threshold should be tuned experimentally to match a person's level of movement while walking, hardness of floor surfaces, etc." was wondering if anyone had any ideas what i could do here to experiment with different thresholds as the one it uses:
minPeakHeight = std(magNoG);
[pks,locs] = findpeaks(magNoG,'MINPEAKHEIGHT',minPeakHeight);
This works to an extent but feel it is very prone to undercounting steps.
Hope someone can help thanks.

2 commentaires

Mathieu NOE
Mathieu NOE le 24 Fév 2021
hello Ben
I assume you will have to do a few experiments to set up the threshold value.
FYI, there is another alternative based on triggering on positive or negative slopes of the signal , but this requires too a threshold.
maybe a little amount of bandpass filtering would also help to remove artifacts (like short pulses due to mechanical shocks)
Ben Anderson
Ben Anderson le 24 Fév 2021
thanks ill look into that, yeah i have done experiments but cant understand what the treshold value should change to instead of the standard deviation.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Data Import and Analysis dans Centre d'aide et File Exchange

Tags

Commenté :

le 24 Fév 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by