How can I track positions from acceleration values?

  • Context: Undergrad 
  • Thread starter Thread starter dokkdurs
  • Start date Start date
  • Tags Tags
    Acceleration Position
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
dokkdurs
Messages
1
Reaction score
0
Hello

I'm new to this forum and i was wondering if anyone here can help me with a problem I'm having.

I am trying to plot a track on which a toy car is running.The voltage on the motor stay the same.An accelerometer feeds me values on x,y and z axis(the z values stay pretty much the same).My problem is this : tracking positions from acceleration values.I am receiving values in -5000 and +5000.I have tried some methods of plotting the track but with no real results.

Thank you and sorry if this threads violates any forum rules or if i am too noob
 
Physics news on Phys.org
Answer from also a n00b:

So your position is
[tex]x=x_0 + v_0 t + at^2/2[/tex]
where x0 is the initial position, v0 is the initial velocity (i guess you might want to set them to zeros), and then a is the acceleration that your device is giving, while t is the time. Does this help?

P.S. I've noticed you get x and y accelerations, but I would only expect x to be relevant, i.e. you only want to know how the toy car goes forward. Isin't this the case?
 
Last edited:
If the acceleration varies over time, you'll need to do some form of numerical integration to convert accelerations into velocities and positions. Accuracy and frequency of the accelerometer outputs will be an issue.

Given a set of accelerations versus time with time elapsed between sample of Δt, and initial velocity v[0], and posiion p[0], for each axis, then you can calculate velocities and positions based on average acceleration and velocity (trapezoid rule):

a[...], v[0], p[0] are given

v[1] = v[0] + 1/2 (a[0] + a[1]) Δt
p[1] = p[0] + 1/2 (v[0] + v[1]) Δt

v[2] = v[1] + 1/2 (a[1] + a[2]) Δt
p[2] = p[1] + 1/2 (v[1] + v[2]) Δt

...

This should get you close.
 
Last edited: