# Signal segmentation into states ( Stop/mov)

My question concerns signal segmentation.

My signal is the green one, which represents the distance from the first point to the rest of points. I would like to cut the trajectory into segments that each represents the current status of the person, is he currently making a move, or making a stop?

This is my plot:

• the green line is the distance measures smoothed using savitzky golay.
• The second line in red represents the results I would like to have, when its =1 its a move, and when it is equal to 0 it is a stop in reality.As you can see, it is somehow easy to segment the trajectory using the trends, when it is increasing or decreasing, we should have a move. When it is constant, we should have a stop.

My question is, what are the methods that I can use and that can segment a signal using the trend change ?

Thank you

It seems like you already got all the right components. Your goal is to detect segments where speed!=0 in the data. Since speed is the derivative of position, you could transform the data into the first difference series - simply subtract the preceding point from each data point, i.e. $$x_t - x_{t-1}$$, and you'll have a crude estimate of the derivative.