Go to Post In fact, one of our volunteers just found out about the entire FIRST program two weeks ago and had so much fun on Thursday that he came back on Friday to help us again! - KathieK [more]
Home
Go Back   Chief Delphi > Technical > Control System
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 09-02-2014, 03:44
seg9585's Avatar
seg9585 seg9585 is offline
Registered User
AKA: Eric
FRC #4276 (Surf City Vikings)
Team Role: Engineer
 
Join Date: Feb 2006
Rookie Year: 2001
Location: Boeing (Seal Beach, CA)
Posts: 519
seg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond repute
Gyro Rate Bias Issue

Using the ADW22307 Gyro (dual use gyro/accelerometer board), there tends to be a little rate bias. The result is that, when the gyro is kept still, the reported heading (getAngle()) tends to creep in the same direction over time.

As a point of reference, I've noticed that after 5-6 minutes the gyro reports an error in excess of 90 degrees. This is a bit concerning to me, even for a 2 minute match where we're planning to use MecanumDrive field frame.
Does anyone know why this would be happening, and what can be done about it? The FRC Java Gyro method doesn't allow a bias to be set, and using the reset() command can interfere with driving capability (you'd need to ensure the robot is pointing away from you to get a good reset)
__________________
My FIRST legacy:

Team 204 Student 2001, 2002 (Voorhees, NJ)
Team 1493 College Mentor 2006 - 2008 (Troy, NY)
Team 2150 Intern/Professional Mentor 2007, 2009 (Palos Verdes)
Team 4123 Lead Engineering Mentor 2012 (Bellflower, CA)
Team 4276 Engineering Mentor 2012-2016 (Huntington Beach, CA)
Reply With Quote
  #2   Spotlight this post!  
Unread 10-02-2014, 12:42
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,557
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Gyro Rate Bias Issue

Quote:
Originally Posted by seg9585 View Post
and using the reset() command can interfere with driving capability (you'd need to ensure the robot is pointing away from you to get a good reset)
I know that some teams use field features to line up periodically in order to reset the gyro. For example, you could reset the gyro when you go to the inbounder and press against the wall.
Reply With Quote
  #3   Spotlight this post!  
Unread 10-02-2014, 14:52
Mike Bortfeldt Mike Bortfeldt is offline
Registered User
FRC #1126 (& 1511)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2004
Location: Rochester, NY
Posts: 119
Mike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud of
Re: Gyro Rate Bias Issue

Eric,

Drift is common when using a gyro and the WPILib does not have an easy way to compensate for it. As Joe mentioned, you can reset it occasionally when you are at a known heading (against a field element for example), or you could create your own compensating algorithm outside the gyro class. One thing that has helped us, is to allow the gyro a little more time to "warm up" (approx. 10 seconds) before instatiating the gyro object. This gives the gyro a few more seconds to reach temperature stability before the WPILib obtains a "zero" point. It will still drift, but perhaps not quite so quickly.

Mike
Reply With Quote
  #4   Spotlight this post!  
Unread 10-02-2014, 17:25
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,071
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
Re: Gyro Rate Bias Issue

We like to re-calibrate the gyro bias as close to the start of the match as possible. MEMS devices are highly sensitive to temperature and they self-heat as they draw current, so in the couple minutes between when you turn your robot on and when the match starts, your zero may have drifted a bit. It still isn't perfect, but it will be better than calibrating a cold gyro.

One automated way to do a reset that is commonly used in industry is a "zero velocity update" - if you know (via another source, such as wheel encoders or a button press) that your heading should not be changing, you can re-calibrate the bias on the fly and recover some of the accumulated heading error.
Reply With Quote
  #5   Spotlight this post!  
Unread 14-02-2014, 09:45
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Gyro Rate Bias Issue

The WPILib gyro code actually does compensate for this provided the robot is stationary when the Open is performed, and provided that the gyro temperature remains constant. It measure the baseline DC value during Open. The LV implementation averages over two seconds. This value is then used as the baseline DC voltage. The Reset operation doesn't measure the baseline again, it simply zeroes the accumulator.

Greg McKaskle
Reply With Quote
Reply


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


All times are GMT -5. The time now is 03: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