title: Accelerometer signal segmentation
body: <p><img src="https://i.stack.imgur.com/Qss9O.png" alt="alt text"></p>
  
  <p>I have a 1D accelerometer signal (one axis only). I would like to create a robust algorithm, which would be able to recognize some shapes in the signal. </p>
  
  <p>At first I apply a moving average filter to the raw signal. On the attached picture the raw signal is coloured red and the averaged signal is black. As seen from the picture, some trends are visible from the averaged (black) signal - the signal contains 10 repetitions of a peak like pattern, where acceleration climbs to a maximum and then drops back down. I have marked the beginnings and endings of those patterns with a cross.</p>
  
  <p>So my goal is to find the marked positions automatically. The problem making the pattern extraction difficult are:</p>
  
  <ul>
  <li>the start of the pattern could have a different y value than the end of the pattern</li>
  <li>the pattern could have more than one peak</li>
  <li>I do not have any concrete time information (from start to the end of the pattern it takes A time units)</li>
  </ul>
  
  <p>I have tried different approaches, which are pretty much home-brew, so I won't mention them - I don't want you to be biased by my way of thinking. Are there some standard or by the books approaches for doing that kind of pattern extraction? Or maybe does anyone know how to tackle the problem in a robust way?</p>
  
  <p>Any idea will be appreciated.</p>