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 Kommentare

Mathieu NOE
Mathieu NOE am 24 Feb. 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 am 24 Feb. 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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Data Import and Analysis finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

am 23 Feb. 2021

Kommentiert:

am 24 Feb. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by