Go to Post Hmmm I think I hear phones ringing. Panic calls to the Rules committee to figure out how to close THAT loophole, which you could drive a truck through. Have you considered a career in Law? - ChrisH [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 Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 10-01-2008, 15:40
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Integrating accelerometer output

Hey all,

I think I want to try going with a purely inertial guidance system this year (accelerometers and gyros) instead of encoders. I don't need position information - just relative x and y velocities (along with heading).

By integrating the gyro output at about 400Hz, I get a pretty good heading calculation. It drifts by maybe a degree or two after a few minutes of driving, but that's acceptable.

My concern is with the noise handling capabilities of the accelerometer. Between the +/- 1.7G saturation of the device, nonlinearities, and possible high frequency noise, I'm having doubts about whether my integration to obtain linear velocity will be even close to accurate, even if I clean the signal up with a low pass filter.

Has anyone done this in the past? I'd like to hear your thoughts before I waste my time and end up using encoders again anyway
  #2   Spotlight this post!  
Unread 10-01-2008, 16:03
Matt C's Avatar
Matt C Matt C is offline
Registered User
FRC #1468 (J-Birds)
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 1999
Location: Islip Terrace, NY
Posts: 396
Matt C has a reputation beyond reputeMatt C has a reputation beyond reputeMatt C has a reputation beyond reputeMatt C has a reputation beyond reputeMatt C has a reputation beyond reputeMatt C has a reputation beyond reputeMatt C has a reputation beyond reputeMatt C has a reputation beyond reputeMatt C has a reputation beyond reputeMatt C has a reputation beyond reputeMatt C has a reputation beyond repute
Send a message via AIM to Matt C
Re: Integrating accelerometer output

Team 190 in 2k3 made a functional INS (Inertial Navigation System) system for a crab drive robot. I can't remember all that much about it other than it was a big challenge for the programmers, and we ran into some "drift" issues.
http://www.chiefdelphi.com/media/photos/14923
  #3   Spotlight this post!  
Unread 10-01-2008, 16:03
gnormhurst's Avatar
gnormhurst gnormhurst is offline
Norm Hurst
AKA: gnorm
#0381 (The Tornadoes)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Trenton, NJ
Posts: 138
gnormhurst will become famous soon enoughgnormhurst will become famous soon enough
Re: Integrating accelerometer output

Can you tell me how you integrate faster than 38 Hz? Do you use a timer interrupt, or do you count fast cycles and look at the gyro every so many of those?
__________________
Trenton Tornadoes 381
2004 Philadelphia Regional Winners
2006 Xerox Creativity Award
---
My corner of the USPTO.
My favorite error message from gcc: main is usually a function
My favorite error message from Windows: There is not enough disk space available to delete this file.
  #4   Spotlight this post!  
Unread 10-01-2008, 16:13
eugenebrooks eugenebrooks is offline
Team Role: Engineer
AKA: Dr. Brooks
no team (WRRF)
 
Join Date: Jan 2004
Rookie Year: 2001
Location: Livermore, CA
Posts: 601
eugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond repute
Re: Integrating accelerometer output

Quote:
Originally Posted by gnormhurst View Post
Can you tell me how you integrate faster than 38 Hz? Do you use a timer interrupt, or do you count fast cycles and look at the gyro every so many of those?
You use a timer.
It is important that the time interval between samples is accurate.

Eugene
  #5   Spotlight this post!  
Unread 10-01-2008, 16:14
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Integrating accelerometer output

Timer interrupts, definitely. You need to keep your timing very stable in order for things to work right.
  #6   Spotlight this post!  
Unread 10-01-2008, 19:01
lynca's Avatar
lynca lynca is offline
Andrew Lynch
FRC #2587 (DiscoBots)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Houston, TX
Posts: 1,612
lynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond repute
Send a message via AIM to lynca
Re: Integrating accelerometer output

Quote:
Originally Posted by Abwehr View Post
Has anyone done this in the past? I'd like to hear your thoughts before I waste my time and end up using encoders again anyway
For a 15 second autonomous period , encoders will be much more reliable then dead reckoning with a accel and gyro. However over longer distances than a 15 second autonomous period, encoders will drift without a secondary sensor to update position. You could invest in a magnetic compass from spark fun and only rely on encoders for linear motion. I've had good results with a compass and encoders.

I suggest a compass from Spark Fun,
__________________
History: 624 - Cryptonite --> 118 - Robonauts --> 2158 - AusTIN CANS --> 2587 DiscoBots
Bio: Andrew Lynch "How I Work" ---- LinkedIn , Facebook, Twitter
  #7   Spotlight this post!  
Unread 10-01-2008, 19:21
jleibs's Avatar
jleibs jleibs is offline
Computation and Neural Scientist
AKA: Jeremy Leibs
no team
 
Join Date: Jan 2008
Rookie Year: 2001
Location: San mateo
Posts: 19
jleibs is a glorious beacon of lightjleibs is a glorious beacon of lightjleibs is a glorious beacon of lightjleibs is a glorious beacon of lightjleibs is a glorious beacon of light
Send a message via AIM to jleibs
Re: Integrating accelerometer output

So I don't know about using parts available to you guys (or your processors), but I do this pseudo-professionally these days. I was involved with the inertial nav system for the Caltech 2005 DARPA Grand Challenge, and now Northrop Grumman pays me to do related things with UAVs.

Disclaimer: if anybody remembers footage of a giant van crashing through a concrete barrier at the 2005 Grand Challenge event, that was us, so maybe I'm not the best person to take advice from

As may be gathered from my previous statement, it's not an easy task. I had enough trouble doing it with a highly accurate $20,000+ 400Hz accelerometer/gyro, that I don't want to think about trying to make it happen with your guys hardware. Granted, we were fine for a couple of minutes, and we were going over off-road terrain.

Given your guys nearly planar situation, you might be able to make it work, but expect to spend a lot of time getting it right. Certainly, feel free to message or email me if you want to discuss things in more details. I'm always happy to help in any way I can.

My big question would be as to why you don't want to use encoders?

Encoders are your best friend when you're dealing with velocity. They measure velocity directly. The fact that you are integrating accelerometer leads to inevitable error growth in your velocity (and quadratic error growth in your position), so you need SOMETHING to help zero out those errors.

If you are very much serious about pursuing this (and have a good reason for dropping the encoders), talk to me some more about advice on incorporating your control signals into your estimate. This is a poor substitute for the encoders, but by doing some calibration and taking into account commanded motor controls, I bet you could get things working reasonably well with decent bounds on your error.
  #8   Spotlight this post!  
Unread 12-01-2008, 01:24
Donut Donut is offline
The Arizona Mentor
AKA: Andrew
FRC #2662 (RoboKrew)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Goodyear, AZ
Posts: 1,307
Donut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond repute
Re: Integrating accelerometer output

I tried it with a vex robot prior to the 2007 season, the code is in this old post of mine:

http://www.chiefdelphi.com/forums/sh...82&postcount=5

Based on my experience the kit accelerometer would be no good for an FRC robot (at least for inertial navigation). It may be possible with a better accelerometer, or a higher resolution ADC than that of the RC, but my stuff with a vex robot was off by a few inches when traveling less than 10 feet, which would put you off by over a foot when traveling a full FRC field.
__________________
FRC Team 498 (Peoria, AZ), Student: 2004 - 2007
FRC Team 498 (Peoria, AZ), Mentor: 2008 - 2011
FRC Team 167 (Iowa City, IA), Mentor: 2012 - 2014
FRC Team 2662 (Tolleson, AZ), Mentor: 2014 - Present
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
Integrating Gear Tooth Sensor magical hands Programming 2 19-02-2007 20:29
Problems integrating CMUCAM code and IFI Default Code Windward Programming 2 06-02-2007 16:48
Help Integrating Interrupts and Camera Keo-san Programming 6 25-01-2007 22:20
Integrating Robotics into school curriculum nalbonec Starting New Teams 5 14-01-2006 15:17
Accelerometer buss Electrical 1 09-01-2005 00:10


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

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