07-16-2007 10:28 AM - edited 07-16-2007 10:28 AM
Message Edited by justapro on 07-16-2007 10:29 AM
07-16-2007 10:37 AM
07-16-2007 10:37 AM
07-16-2007 10:44 AM
07-16-2007 05:06 PM
When you say "encoder" signal, are you talking about some kind of digital pulse train? If it's TTL (or you can convert to TTL), you may want to consider measuring frequency (speed) directly using a counter task. I assume you're presently performing an edge counting or position measurement task.
You'll still get some differentiation noise when calculating accel, but at least you'll only have one stage of differentiation to deal with. Also, you're probably dealing with a pretty low frequency encoder pulse rate, like a few kHz or less -- right? If so, your original frequency measurement can have a pretty low quantization error, which will also help in your differentiation.
-Kevin P.
07-16-2007 09:55 PM
07-17-2007 07:49 AM
07-17-2007 01:08 PM
I tried to use the 'Count Frequency' task and it seemed to exhibit more noise than my count edges task. I tried both the low and high frequency methods. The low frequency method has a lot of noise and the high frequency method gave me an error (basically it said my signal was too slow for the measurement time) until I raised the measurement time. Then the results were not at all what I would expect. It was a slowly increasing or decreasing line even though I was moving the wire up and down more rapidly. Overall I was getting a lot better results with the count edges task.
I will look into the Savitzky-Golay filtering.
07-17-2007 01:28 PM
07-18-2007 07:49 AM