-2
$\begingroup$

This question already has an answer here:

I want to use a sensor to find displacement with accelerometer. How can I use accelerometer to find displacement? I want to use this for a quadcopter.

$\endgroup$

marked as duplicate by Ian, Ben, Mark Booth Dec 15 '15 at 11:46

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ i have fund a sensor named IMUs . $\endgroup$ – Ramtin Aug 6 '15 at 6:39
  • $\begingroup$ Welcome to Robotics.SE - what have you tried? At the moment, your question shows no research... $\endgroup$ – Andrew Aug 6 '15 at 7:50
3
$\begingroup$

This will depend on what you mean by "displacement" and for how long you want to do this. Can you supply more details on what your trying to accomplish and why?

As Bending Unit 22 mentioned, you integrate acceleration to get velocity, and then integrate velocity to get position. The problem with this though that any drift/error/noise on the accelerometer gets doubled integrated and your positional error will grow quadratically, so there is a good chance you'll need additional sensors to correct for this error. Whether this error matters to you or how you want to compensate for this error will depend on what you're trying to do, providing more information would be helpful!

$\endgroup$
1
$\begingroup$

I want to use a sensor to find displacement with accelerometer

An accelerometer is a sensor.

How can I use accelerometer to find displacement?

By integrating twice, because acceleration is defined as the second derivative of position.

In a numerical calculation, in every step add the new value from the accelerometer to a sum (that's velocity) and add that sum to another sum, which will be the position. Also, the acceleration and velocity must both be multiplied by the change in time before summing.

velocity += acceleration*dt
position += velocity*dt
$\endgroup$
  • $\begingroup$ thank you very much for your reply now i have new question how can i use that in a quadra corpor $\endgroup$ – Ramtin Aug 8 '15 at 17:28
  • $\begingroup$ @Ramtin if you have a new question, ask it as such. Do not ask new questions in comments. Thank you. $\endgroup$ – Bending Unit 22 Aug 9 '15 at 15:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.