|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Gyro Repeatability, Expected Drift ?
Team 435 can do a full lap plus in automode using the KoP gryo for both the turns and maintaining alignment while driving straight. We are using a modified version of Kevin's code. (QuickADC and only reading the gryo once every 26ms.)
Last year we were unsuccessful with using the gryo, the robot's momentum would carry it past the 90 turn and we were never able to get a consistent turn amount. |
|
#2
|
||||||
|
||||||
|
Re: Gyro Repeatability, Expected Drift ?
What sample rate are you running at?
In 2005, we ran many tests with sample rates from 200hz to 12800 hz. While we have since lost the raw data from the tests, the results were that we saw improvements in performance up to 1600hz and beyond that there were no noticeable improvements. We have since always used 1600hz and get results that are repeatable to within the accuracy of our measurement method. |
|
#3
|
||||||
|
||||||
|
Re: Gyro Repeatability, Expected Drift ?
Dr. Brooks' marklars are wise and true
One of the best thing that you can do to help reduce the drift is use a very large average during disabled mode to get the sensor bias, and don't throw out resolution when you're done with the average. I think I posted a similar example in a different thread within the last couple months, but here is an example of what you want to do. - assume you want to use a 32-bit variable for your integral. - Let's assume we want to use a 64 sample average to get the sensor bias. Use the following code to calculate your bias (do this code ONLY in disabled mode). Code:
tempAngRate = Get_Analog_Value(angRate);
angRateBias = (angRateBias - angRateArray[angRateBiasCounter]) + tempAngRate;
angRateArray[angRateBiasCounter] = tempAngRate;
angRateBiasCounter++;
if (angRateBiasCounter > 63)
{
angRateBiasCounter = 0;
}
Code:
angRateValue = Get_Analog_Value(angRate); robotHeading += (s32)angRateValue*(s32)64 - angRateBias |
|
#4
|
|||
|
|||
|
Re: Gyro Repeatability, Expected Drift ?
We do our averaging to get the bias in the pit where we can be sure
that the robot is not disturbed while the data is being taken. The resulting number is then hard coded. I will be heading to SanJose this evening, but I can post snippets of the code I use from there and will be happy to do so. [quote=Chris Hibner;717147] One of the best thing that you can do to help reduce the drift is use a very large average during disabled mode to get the sensor bias, and don't throw out resolution when you're done with the average. [\QUOTE] |
|
#5
|
||||||
|
||||||
|
Re: Gyro Repeatability, Expected Drift ?
Quote:
The code is more or less: Code:
static char runBais = 1;
if (disabled_mode && runBias)
{
// run moving-average bias code
}
else
{
// the bias has now been captured and is held
// don't let the bias run again if the robot is disabled for a short period of time
runBias = 0;
// run integral code
}
|
|
#6
|
|||
|
|||
|
Re: Gyro Repeatability, Expected Drift ?
Not a bad way to go, but we average for about 15 seconds at 150hz.
We do check the drift of the integrated gyro in the pit and redo the average whenever it starts drifting too much. Eugene Quote:
|
|
#7
|
||||
|
||||
|
Re: Gyro Repeatability, Expected Drift ?
Quote:
-Kevin |
|
#8
|
|||
|
|||
|
Re: Gyro Repeatability, Expected Drift ?
Kevin,
Our gyro is set for a 40hz bandwidth, as I recall, and it is working absolutey great. If I had a problem I would borrow a scope and sort it out. The first thing I would do to improve things would be to add temperature compensation, and then power supply voltage compensation, but these improvements do not appear to be required for our use. Eugene Quote:
|
|
#9
|
||||
|
||||
|
Re: Gyro Repeatability, Expected Drift ?
Our gyro works great... and never ceases to amaze me that it functions at all.
I mean... think about it for a minute. It's a little teeny piece of silicon, and who knows what else, and it knows its spinning. Amazing! Gotta hand it to those Analog Devices guys... And thanks to Kevin for speeding all of our development schedules along! ... Hope you guys like the new and improved 1024 hybrid mode this week. Should be quite a show. That, and... I think we've finally got enough complicated (messy) homebrew circuitry to make the display stop blanking out all the time now... If any of you are at BMR and would like to discuss Hybrid mode, I'll be happy to discuss ideas/concepts with you. Just ask anyone on 1024 for "Q" and I'm sure they'll direct you. -q |
|
#10
|
|||
|
|||
|
Re: Gyro Repeatability, Expected Drift ?
Quote:
compass; you can feed the error in the heading back into the motor power. It keeps the robot on track when it gets bumped, and it automatically corrects for overshoot in turns. Eugene |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| pic: Not what you expected | VanMan | Extra Discussion | 17 | 05-03-2007 19:34 |
| Preventing drift | Salik Syed | Programming | 4 | 21-02-2006 00:08 |
| Yaw Rate Sensor Drift? | phrontist | Control System | 13 | 19-08-2004 10:55 |
| More flipping then expected | cyberknights195 | General Forum | 6 | 07-03-2004 15:52 |