Names have been changed to protect the innocent.
I have a spinning wheel in a dark room. On the circumference of the wheel are two lights spaced 180 degrees apart. At regular intervals, say 1/sec, one of the lights flashes (which one of the two is based on some signal). The flash is fast enough that I can’t track movement, but I can record the instantaneous position with a certain amount of noise (let’s say Gaussian). The wheel speed can change over time, and generally slowly, though there can be transients (like an initial wheel spinup).
The question is: how do I measure both the speed of the wheel and keep track of which of the lights flashes?
Some obvious points:
- There’s no way to distinguish between light #1 and #2, since there’s no initial reference point, but other than the initial ambiguity I should be able to keep track.
- The wheel can’t spin faster than 90 degrees/sec, else there would be no way to distinguish a flash moving in one direction vs. the opposite light moving in the other direction. So, no need to consider that case (in practice it’ll be much less).
My solution so far:
Keep a running estimate of the wheel position and angular velocity. When a new sample comes in, first update the predicted position with the predicted velocity. Take the difference in angle between the measured and predicted position. If it’s over 90 degrees in either direction, add/subtract 180 degrees and record that as a #2 flash; else don’t change the angle and record a #1 flash.
Correct the predicted position by averaging in the measured (corrected) position: say, Pp’ = Pp0.95 + Pm0.05. Compute a new predicted angular velocity similarly.
This works, though I suspect I can do better. I’m mainly fishing for ideas at the moment. One problem is that it’s hard to characterize the noise, and so picking the averaging constants is basically a random guess. I’d like something that is somehow more auto-adjusting. Ideas? Thanks!