11-17-2011 11:19 AM
Hi all,
I have two x, and y signal outputs from a dll module and I plan to use them to control the cursor position. One problem I'm facing is that my signals are variable enough to cause the cursor to vibrate in stationary setting. So, I use hysterysis (putting threshold) to eliminate these fluctuations but the drawback is that keeping the treshold high enough to eliminate the fluctuations keeps me from getting a nice, smooth movement when the speed of movement (rate of x and y changing) is low. Any ideas or suggestions will be appreciated.
p.s. I am using "SetCursorPos".dll as you might have already guessed.
Thank you,
Elnaz
11-17-2011 12:17 PM
11-17-2011 01:43 PM
Actually, I just realized that the vibration is pure sensor noise (magneto-resistive sensors whose data are used to calculate X and Y signals). This changes the body of the question a little bit:
How to cancel out sensor noise (high frequency vibrations) from actual data which can also be high frequency ? Because If I filter the noise out that will affect the sensitivity of the cursor position produced by the real data as well.
11-17-2011 01:54 PM
Darin,
Could you please clarify what do you mean by average exponential with low degree? Can it be applied online?
11-17-2011 02:03 PM
The formula for an exponential filter of degree D is the following:
New Average = (New Value + (D-1)*Old Average)/D
I usually add a special case for startup so that D is never greater than the number of points.
As I said, it is a low-pass filter, much like using a running average. I usually like it because the state is simply a single value (Old Average) instead of the array of values you have to keep around to do a running average.
As to the new question of separating high-frequency noise from your high-frequency signal, that is a bit more complicated (obviously). You should take a power spectrum of the noise to see if there is a characteristic feature you can use (cutoff frequency, strong peaks).