0
$\begingroup$

I have some time series data captured from a person's footsteps/strides (specifically, a person on rollerblades). It came from an IMU sensor placed on a person's boot. Each data point captures acceleration, angular velocity, etc.

Here's a graph of "acceleration in the x direction vs. time" for one foot:

imudata

Problem/Goal: I want to write an algorithm to detect all the footsteps in the data, specifically, the start and end times of each footstep. (Start = foot leaves the ground; End = foot touches the ground).

Here's an example below. Each shaded region represents the duration of a footstep (from start to end). Annotated data like this is available for me to use, perhaps in a supervised learning model.

imudata-labelled


Here are some of the approaches I am considering after searching around. (Feel free to SKIP this section.)

  1. Dynamic sliding window + classifier

This involves somehow sliding a dynamic window over the time series. At each window, run a classification model to determine whether the windowed data is a footstep or not. A dynamic window is necessary because each step varies in length.

From this blog, I know how to create a signal classification model. I can use Fast Fourier Transform or Wavelet Transform to extract features to use in a supervised learning model.

  1. Gradient Boosting Machine

I read this paper that created a model to recognize the start/end points of footsteps... for turkeys lol. It uses a Gradient Boosting Machine and trained on data where all data points belonging to a "footstep" were annotated (e.g. all shaded areas in the graph above).


Question: Does anyone have any suggestions for how to approach this problem? Or perhaps any comments on whether the approaches above make sense or don't make sense.

Note: My knowledge in Deep Learning is pretty basic, so I am not considering Deep Learning approaches for the sake of time. Perhaps something for the future.

$\endgroup$
6
  • $\begingroup$ Do you have a mat file or csv file with data to share. Better have Train + Test. $\endgroup$ – Royi Apr 1 at 21:16
  • $\begingroup$ I do have a CSV file (and Python code, but mostly for pre-processing). I'm checking if I have permission to share it $\endgroup$ – Xin Apr 2 at 6:01
  • $\begingroup$ Because if all measurements are similar to what you showed above I'd think a classic algorithm will do. $\endgroup$ – Royi Apr 2 at 11:03
  • $\begingroup$ This signal pattern does seem to be similar throughout. By classic algorithm, do you mean using something like peaks, 1st/2nd derivative, threshold cutoffs to identify steps? $\endgroup$ – Xin Apr 2 at 18:36
  • $\begingroup$ Yes. But we'll see once you share the data. $\endgroup$ – Royi Apr 2 at 18:39
0
$\begingroup$

This signal looks pretty clean. I would stick to time domain feature extraction. Maybe 1st and 2nd derivative of time domain data. If you're just counting, you can almost just use the magnitude and see that these steps have the most negative values or acceleration. You could use the negative peaks to center a search for the edges of the "step", and to discriminate against the other negative peaks that are in between the steps.

$\endgroup$
2
  • $\begingroup$ Thanks for your response! Yeah, I'm aiming to accurately determine the start/end times of each step. Would some sort of ML model have any benefits over this more manual approach? I do know that if I were to apply this approach to other similar time-series patterns (e.g. sensor on a person's hand rather than their boot), I would need to re-design the algorithm to fit that pattern whereas, for an ML model, I can just train it over new data. $\endgroup$ – Xin Apr 2 at 5:59
  • $\begingroup$ @Xin I would say that ML just changes the problem to one of creating a good training & test data set. If you had a well marked data set that showed exactly when the steps began an ended then ML could do a good job of classifying. It would find the derivative by itself if that would be a good feature. ML or neural nets do have a fair number of parameters to play with. You would probably want 2. One for the onset of a step and one for the ending. $\endgroup$ – IanJ Apr 5 at 20:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.