| New Reply |
Differentiating Truncated Data |
Share Thread | Thread Tools |
| Nov20-12, 11:42 PM | #1 |
|
|
Differentiating Truncated Data
I don't have a ton of experience in numerical methods, so I'm hoping someone can help me out. Suppose I have a sequence of position data points for a car, but they've been truncated to integer values. I want to find the speed (derivative), but for speeds which are low relative to the time between measurements, I find that repeated measurements kill my evaluation of the derivative. For example, if the actual position sequence of the car was {0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9}, it would be measured as {0, 0, 0, 0, 1, 1, 1, 1, 1}. So if I apply a simple difference operator, instead of getting a constant speed like the actual position sequence implies, I would be getting mostly zero speed with a sudden spike at the point where the measured position changes from 0 to 1.
So my question is, how do I properly differentiate data that looks truncated or stepped like this? (noting that I need to be able to do it in real time, i.e. without using any future data points) I've tried a few different things, but have only had marginal success. Any suggestions would be greatly appreciated. |
| Nov21-12, 01:01 AM | #2 |
|
Recognitions:
|
You need a mathematical model (based on physical considerations) for what the underlying data might look like. The simplest would be constant speed, next a constant accn, etc. The number of parameters should be rather less than the number of datapoints. E.g. with only 3 or 4 datapoints go for constant speed; with 8 or 9 you might justify an acceleration term.
Having chosen the model(s), find the parameters that give the best (least squares) fit to the data. So for constant speed it would be a straight line fit. A more sophisticated approach could involve background knowledge, like expected limits on acceleration (which might depend on the speed). All of that should be manageable in real time, but the results might still not be wonderful. |
| Nov23-12, 10:50 PM | #3 |
|
Recognitions:
|
We should start by using better terminology. Your goal isn' t to "differentiate the data". Your goal is apparently to estimate the velocity of an object from truncated position data. To define a "proper" way, we need to know the penalties for making an error. And what is the overall objective of computing the velocity. Is it an end in itself? Or are you trying to aim a gun to hit a moving target or something where the velocity is merely an aid to the final objective? |
| Nov24-12, 11:57 AM | #4 |
|
|
Differentiating Truncated DataBy the way, since I posted the initial question my group members and I hacked out a solution (involving a moving average), which works just well enough to make the car's motion acceptably smooth. I'm still very curious to hear what someone who knows something about numerical methods would have to say about this problem, though. |
| Nov24-12, 03:30 PM | #5 |
|
Recognitions:
|
I'm not an expert on Kalman filtering, but I might be able to help you with the math just to the extent that i've read about now and then. The engineering sections of the forum would be the place to ask about actually implementing something on a PID controller. |
| Nov25-12, 07:44 PM | #6 |
|
|
|
| Nov25-12, 08:21 PM | #7 |
|
Recognitions:
|
I see people write articles about Kalman filtering with "quantized data". Perhaps truncated measurements fall into that category.
|
| New Reply |
| Thread Tools | |
Similar Threads for: Differentiating Truncated Data
|
||||
| Thread | Forum | Replies | ||
| Truncated Sin Series in FORTRAN | Programming & Comp Sci | 4 | ||
| randomly truncated pdf | Set Theory, Logic, Probability, Statistics | 7 | ||
| Truncated cones | Advanced Physics Homework | 13 | ||
| Truncated conical magnet | General Physics | 2 | ||
| Truncated Octrahedron Mesh | Computing & Technology | 5 | ||