Go to Post It's just another design constraint that needs to be dealt with. - Dave Scheck [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 12-01-2008, 23:33
eccmaster eccmaster is offline
Registered User
FRC #2344
 
Join Date: Jan 2008
Location: Yonkers
Posts: 17
eccmaster is an unknown quantity at this point
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?
  #2   Spotlight this post!  
Unread 12-01-2008, 23:50
mluckham's Avatar
mluckham mluckham is offline
Registered User
FRC #0758 (Sky Robotics)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Ontario, Canada
Posts: 116
mluckham will become famous soon enoughmluckham will become famous soon enough
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
  #3   Spotlight this post!  
Unread 13-01-2008, 03:29
artdutra04's Avatar
artdutra04 artdutra04 is offline
VEX Robotics Engineer
AKA: Arthur Dutra IV; NERD #18
FRC #0148 (Robowranglers)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2002
Location: Greenville, TX
Posts: 3,078
artdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond repute
Re: doing double integration to getdistance traveled

Quote:
Originally Posted by eccmaster View Post
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.
__________________
Art Dutra IV
Robotics Engineer, VEX Robotics, Inc., a subsidiary of Innovation First International (IFI)
Robowranglers Team 148 | GUS Robotics Team 228 (Alumni) | Rho Beta Epsilon (Alumni) | @arthurdutra

世上无难事,只怕有心人.
  #4   Spotlight this post!  
Unread 13-01-2008, 04:26
Leav's Avatar
Leav Leav is offline
Spud Gun Division
AKA: Leav Oz-Ari
FRC #3316 (D-Bug)
Team Role: Mentor
 
Join Date: Dec 2004
Rookie Year: 2005
Location: Technion, Haifa, Israel
Posts: 774
Leav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond repute
Send a message via ICQ to Leav Send a message via AIM to Leav Send a message via MSN to Leav
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
__________________
"We choose to build robots this season and do the other things; Not because they are easy, but because they are hard."
-Paraphrasing JFK

Participated in FIRST as a student: 2005-2006 (But still learning every season!)
Mentor: 2008 - ? (Team 2630 2008-2011, and Team 3316 since 2013)
Engineer: 2011 - ? (B.Sc. and M.Sc. in Mech. Eng. from the Technion IIT)
FIRST Volunteer - 2007 - ? (MC, FTA, FIRST Aid etc.)
  #5   Spotlight this post!  
Unread 19-09-2008, 01:25
Qbranch Qbranch is offline
wow college goes fast.
AKA: Alex
FRC #1024 (Kil-A-Bytes)
Team Role: Alumni
 
Join Date: Apr 2006
Rookie Year: 2006
Location: Indianapolis
Posts: 1,174
Qbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond repute
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
__________________
Electrical Engineer Illini
1024 | Programmer '06, '07, '08 | Driver '08
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Integration of Gmail and Gtalk IraJason Chit-Chat 8 20-02-2006 10:26
Accelerometer integration Leav Programming 4 27-01-2006 11:56
CMU Integration Overview???? Mumford 406 Programming 1 09-02-2005 18:17
Autonomous Camera Integration GregC Programming 2 06-02-2005 14:34
Autonomous Camera Integration GregC Programming 1 05-02-2005 18:56


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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