Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   doing double integration to getdistance traveled (http://www.chiefdelphi.com/forums/showthread.php?t=61540)

eccmaster 12-01-2008 23:33

doing double integration to getdistance traveled
 
Has anybody been able to do double integration with readings from the accelerometer in the kop? How do you do double integration in easy c?

mluckham 12-01-2008 23:50

Re: doing double integration to getdistance traveled
 
At http://www.olimex.com/dev/mod-mma7260q.html there is a way to convert acceleration and time to speed, and distance.

Quote:

V = A * t, then the distance S = V * t

artdutra04 13-01-2008 03:29

Re: doing double integration to getdistance traveled
 
Quote:

Originally Posted by eccmaster (Post 676624)
Has anybody been able to do double integration with readings from the accelerometer in the kop? How do you do double integration in easy c?

The key to the integration is precise, interrupt-driven timing.

When you take the acceleometer output, you can use the formula vf = vf + (a * t) every time through the program loop. If you use precise timing, you know the set time interval, you know the acceleration, and you know the initial velocity (this was vf the previous time through the loop), so you can solve for the new final velocity.

From here, we plug this into the distance formula of df = df + (vf * t). This formula finds out how far the robot would have traveled at velocity vf for time t, and then adds that onto the previous distance.

With a dual-axis accelerometer, you will need two separate sets of these equations, one for both the x and y dimensions.

Leav 13-01-2008 04:26

Re: doing double integration to getdistance traveled
 
don't forget that most accelerometers will not register the spin of your robot, that's a gyroscope...

you can use an accelerometer if you place it not at the center of rotation, with the measuring axis pointed at the tangent of the direction of rotation...

-Leav

Qbranch 19-09-2008 01:25

Re: doing double integration to getdistance traveled
 
Yes, I resurrected an old thread... but I'd rather do that than start a new one on essentially the same subject.

I know doing double integration blows any error in a sampling of the acceleration up very fast over time (squaring and accumulating the error each time) but, has anyone done the double integration and can share some findings?

How fast does error show up? In what way? How accurate is it?

One application I'm looking at would require the double-integrated accelerometer to remain accurate for about 100ms.

Thanks for any data you can offer,

q


All times are GMT -5. The time now is 23:18.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi