Ask HN: How to detect the three bursts in this data
I have this accelerometer data from my phone:
http://imgur.com/a/cJoJH
The first artifact is when I lifted my phone from the table, the 3 bursts in the middle when I tapped on my phone 3 times and the last artifact when I placed it on the table again.
I want to detect the 3 taps in the middle algorithmically and ignore the other things.
I already have some working code that relies on thresholds, and another version that looks for high peaks followed by smaller peaks within a window.
But I think there should be a more reliable solutions to solve this, I assume this is a somewhat common problem. I also played around with FFT and power spectrums a little bit but I am not really satisfied. Maybe I should train a neural network or another machine learning algorithm?
How would you solve that?
4 comments
[ 2.0 ms ] story [ 15.6 ms ] threada neural network is almost certainly overkill, and likely too slow for your purposes. you probably want some additional smoothing. i don't know why FFT doesn't work for you, since this accelerometer data can almost certainly be decomposed properly.
a window-based threshold approach is fine in my opinion as well.
That said, this approach introduces what may be more latency, coding complexity, and computational work than is desired. I'd take a look at a spectrogram and see if there's some bandpass filter which makes it easier to see these events compared to the 'false activity'.