Estimating Position with Noisy Acceleration Sensor

In summary, the person is seeking help with implementing a Kalman filter to estimate a position along a single axis, based on initial velocity of 0 and a noisy acceleration value. They only have basic algebra and function knowledge, and are looking for a function in C that can input acceleration and return an estimate of distance traveled and speed. Two possible solutions are suggested, but it is mentioned that the accuracy may decrease over time without more information on the noise and the sensor's limitations. The person also asks about the feasibility of measuring 50 feet +-1.5 feet using this method. One person suggests a limited memory filter, while another suggests an alpha-beta filter depending on the variability of the acceleration. The person is asked to post their results or
  • #1
mx tommy
7
0
Ok, First of all I admit to being a complete and utter noob at Math... That said, I need some serious help :P

I'm working on a project that will need to estimate a position along a single axis based solely on the fact of 0 inital velocity, and a noisy acceleration value. As far as I can tell, I need a Kalman filter. However, I've only taken pre-calculus, and have no idea how to even READ those formulas... (I've spent the last 2 days trying, using generous amounts of google, and while I've made "some" progress, I'm still a LONG way from understanding it. I was hopping someone here could help me implement it, keeping in mind I only know basic algebra and functions.

Here's the info about the system I need to esimate...

At start time, velocity is 0.
I have a accelerometer sensor that reads acceleration along the axis of relevence.
I sample the accelerometer every X ms (prolly around 1, will need to see how many times I can in a second, depends on how long it takes the code to execute)
Acceleration will be rather high, and of short durration. (no longer then 10 seconds, I'm guessing this will help reduce the error over longer times)

Unfortunatly, I can't realistically use any other sensors for increased precision, for price reasons and practical reasons, and am prepared to accept a reasonably large error.

Ideally, I need a function (I'm programming in C. I don't need the C code, just something I could translate into C code) that I input the acceleration, and it returns an estimate of distance traveled, and estimated speed.

That would be ideal, though I'll take anything I can get, including just a simplified algerbraic version of the filter

Thanks, Thomas :)
 
Mathematics news on Phys.org
  • #2
If you're sampling every millisecond, I'd just assume that the acceleration varies linearly between samplings.

void updatePosition (double oldAcceleration, double newAcceleration) {
velocity += (oldAcceleration + newAcceleration) / 2;
position += velocity;
}

with suitable changes so the units are natural.
 
  • #3
yes, but would that take into account the sensor noise?
 
  • #4
mx tommy said:
yes, but would that take into account the sensor noise?

No, but I'm not sure much could be done without more information on what form the noise took.

This should be quite accurate, at least at the beginning. If it runs for a long time (where the definition of "long" depends on how much noise the sensor throws out) the position will become increasingly inaccurate (superlinear error).
 
  • #5
ok, I'll give that a shot then, though in the case it proves to be too inaccurate, what information about noise is needed? and how would one obtain such information?

Also, since you'd have more of an idea on how such things work, would this be feasible for measuring 50 feet +-1.5 feet? (acceleration would probably average around 0.5g's, and I'm using a 1.5G sensor, so there should be plenty of sensitivity...)

thanks, Thomas :)
 
  • #6
mx tommy said:
ok, I'll give that a shot then, though in the case it proves to be too inaccurate, what information about noise is needed? and how would one obtain such information?

Also, since you'd have more of an idea on how such things work, would this be feasible for measuring 50 feet +-1.5 feet? (acceleration would probably average around 0.5g's, and I'm using a 1.5G sensor, so there should be plenty of sensitivity...)

How fast is it moving? The real problem is that for each measurement, the speed stored internally gets further and further off. With uniformly distributed error a constant off the true acceleration, the position's error is almost quadratic in the time operated. Essentially, the longer it runs the worse the estimate becomes because it thinks it's still moving when it stops, or that it's stopped when it's still going. If there was some way to re-synch the speed every so often the system would be much more robust. Maybe there's a max speed it can get to, so under some assumptions you can have it reset itself to that speed when it runs "flat out" for some time without turning or hitting something, I don't know.
 
  • #7
Well, it starts off at 0kph, and accelerates until 50 feet have been passed... At this point I'm done collecting data. I would assume that speed would be no more then 40-50kph, over maybe 5 seconds...
 
  • #8
mx tommy said:
Well, it starts off at 0kph, and accelerates until 50 feet have been passed... At this point I'm done collecting data. I would assume that speed would be no more then 40-50kph, over maybe 5 seconds...

I imagine it will be fine. Post here when you have results (or problems, I suppose).
 
  • #9
You would need a Kalman Filter if you were measuring position and wanted to estimate velocity and acceleration.
Since you are measuring acceleration, a simpler filter can do.
First, try a limited memory filter. If it suits your needs, fine! If it doesn´t, you can try an alpha-beta filter.
For the limited memory filter, let´s call a[k] the estimated acceleration at instant k and m[k] the measurement at the same instant. You have:
[tex]a[k] = \alpha \cdot a[k-1] + (1 - \alpha) \cdot m[k][/tex]
where [tex]0 < \alpha < 1[/tex] and a[1] = m[1]
Explaining:
The estimated acceleration at any instant depends on every previous values of the acceleration and on the actual measurement.
Of course, the value at n time units in the past will contribute ,ultiplied by [tex]\alpha^n[/tex] and since [tex]\alpha < 1[/tex] it will become small very fast. This is the reason we call it a limited memory filter.
If your acceleration is fairly constant, this will do well. If the acceleration is variable you will probably need an alpha-beta filter, that is a little more complicated. Let me know your results.
 

1. What is the purpose of estimating position with noisy acceleration sensor?

The purpose of estimating position with noisy acceleration sensor is to determine the location or movement of an object in space. This can be useful in a variety of fields such as navigation, robotics, and sports tracking.

2. How does a noisy acceleration sensor affect the accuracy of position estimation?

Noisy acceleration sensors can significantly affect the accuracy of position estimation. This is because the noise can distort the measurements and introduce errors in the calculations. The more noise present in the sensor readings, the less accurate the position estimation will be.

3. What are the main challenges in estimating position with noisy acceleration sensor?

The main challenges in estimating position with noisy acceleration sensor include dealing with the noise in the sensor readings, calibrating the sensor to reduce errors, and accounting for external factors that may affect the sensor's measurements.

4. How can the accuracy of position estimation be improved with a noisy acceleration sensor?

There are several ways to improve the accuracy of position estimation with a noisy acceleration sensor. These include using filtering techniques to reduce noise, calibrating the sensor, and combining data from multiple sensors to get a more accurate estimate.

5. Are there any limitations to estimating position with noisy acceleration sensor?

Yes, there are limitations to estimating position with noisy acceleration sensor. These include the accuracy of the sensor itself, external factors that may affect the sensor's measurements, and the complexity of the environment in which the sensor is being used. These limitations can affect the overall accuracy and reliability of the position estimation.

Similar threads

Replies
12
Views
996
  • Electrical Engineering
Replies
5
Views
1K
Replies
6
Views
4K
  • Astronomy and Astrophysics
2
Replies
40
Views
2K
Replies
11
Views
1K
  • General Engineering
Replies
1
Views
2K
Replies
1
Views
831
  • Electrical Engineering
Replies
2
Views
426
  • General Discussion
Replies
12
Views
1K
Back
Top