I have the positions of a computer mouse, sampled at a high frequency, with a good amount of noise. When the user stops moving the mouse, instead of going to zero the velocity reported by the mouse is non-zero and the cursor drifts.
Are there standard techniques for identifying a constant subinterval of a signal?
Here are some things I have tried:
- Using a high pass filter to estimate the standard deviation of the noise. Then I used that as a comparison of nearest neighbor velocity differences. This does not catch slowly increasing intervals. (Black intervals in second figure)
- Looked at instantaneous min/max over the current interval and filtered out those intervals where (max-min) is too high. (Red intervals in second figure).
As you can see from the second image, I can select out some reasonable intervals of interest, but I still end up with spurious ones. I could come up with more filters, but I'm now just introducing more ad hoc parameters. What is a more principled way to do this?