Go to Post For those who don't have snow in the forecast - i.e., not New England - just send me your shipping address and I'll FedEx some snow to you right away. We have extra. :p - DonRotolo [more]
Home
Go Back   Chief Delphi > Technical > Electrical
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
  #16   Spotlight this post!  
Unread 20-04-2010, 13:38
vamfun vamfun is offline
Mentor :Contol System Engineer
AKA: Chris
FRC #0599 (Robodox)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 2003
Location: Van Nuys, California
Posts: 182
vamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of light
Send a message via AIM to vamfun
Re: Picking a gyro for field-centric swerve control

Quote:
Originally Posted by Tom Line View Post
In 2009, we created a field-centric turret system that let the gunner push the joystick in the direction he wanted the turret to face, no matter what direction the robot was pointing in. The only issue we had with the system was a hard impact would knock the gyro angle off.

In the off season, we've planning on developing a swerve drive, and I'd like to set the controls up the same way. As a result, I already know one of my primary controls problems is going to be how to keep that gyro from jumping out of alignment.

...
3. You could continue to try to improve the gyro itself. I see that sparkfun now sells 1500 degree/second gyros. While I haven't dug into their specs to check if their resolution and drift is still suitable, it seems like you'll reach a point where you simply don't have the issue anymore.
If your problem is due to gyro saturation caused by bumps then you might
consider another hybrid solution with coarse and fine scaled gyros. Coarse is a high-max-rate-low-resolution gyro and the fine is a low-max-rate-high resolution gyro. Simply switch the heading integrator input from the fine gryo to the coarse when saturation is detected on the fine gyro. This is added complexity, but gives you the best of both worlds of precision and dynamic range.

I would use the encoder heading over this if they are on the robot.....if not , this might prove cost effective.
  #17   Spotlight this post!  
Unread 20-04-2010, 13:43
Golto's Avatar
Golto Golto is offline
Registered User
AKA: Pat Plude
FRC #4572 (BArlow RobAutics)
Team Role: Mentor
 
Join Date: Oct 2006
Rookie Year: 2007
Location: Bethel, CT
Posts: 91
Golto is a glorious beacon of lightGolto is a glorious beacon of lightGolto is a glorious beacon of lightGolto is a glorious beacon of lightGolto is a glorious beacon of light
Re: Picking a gyro for field-centric swerve control

Quote:
Originally Posted by ayeckley View Post
You lost me there; did you mean X and Y accelerometers? If you really did mean gyro (meaning yaw rate gyro), what axes did X and Y correspond with? Z seems to be the only one of interest...
One was mounted as documented on the X axis, while the other was oriented 90 degrees to the X, on the Y axis (we used that to do an inverse-pendulum system, so we could balance and travel across the bump)
__________________
  #18   Spotlight this post!  
Unread 20-04-2010, 13:45
Golto's Avatar
Golto Golto is offline
Registered User
AKA: Pat Plude
FRC #4572 (BArlow RobAutics)
Team Role: Mentor
 
Join Date: Oct 2006
Rookie Year: 2007
Location: Bethel, CT
Posts: 91
Golto is a glorious beacon of lightGolto is a glorious beacon of lightGolto is a glorious beacon of lightGolto is a glorious beacon of lightGolto is a glorious beacon of light
Re: Picking a gyro for field-centric swerve control

Quote:
Originally Posted by vamfun View Post
If your problem is due to gyro saturation caused by bumps then you might
consider another hybrid solution with coarse and fine scaled gyros. Coarse is a high-max-rate-low-resolution gyro and the fine is a low-max-rate-high resolution gyro. Simply switch the heading integrator input from the fine gryo to the coarse when saturation is detected on the fine gyro. This is added complexity, but gives you the best of both worlds of precision and dynamic range.

I would use the encoder heading over this if they are on the robot.....if not , this might prove cost effective.
What about using a compass. Wouldn't this give absolute position, without the need for gyros? Sure, they're a little more expensive, but their accuracy would be much more than that of a gyroscope.
__________________
  #19   Spotlight this post!  
Unread 20-04-2010, 14:09
ayeckley's Avatar
ayeckley ayeckley is offline
Registered User
AKA: Alex Yeckley
FRC #2252 (Mavericks)
Team Role: Mentor
 
Join Date: Apr 2007
Rookie Year: 2007
Location: Sandusky, OH
Posts: 268
ayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond repute
Re: Picking a gyro for field-centric swerve control

Others have reported (and it makes a lot of sense) that the compass modules they've used are very sensitive to the "natural" EMI environment around the permanent magnet motors in our bots. My own limited experience with such modules outside of a FRC environment matches their observations, so I don't have a high degree of confidence in that approach.
__________________

  #20   Spotlight this post!  
Unread 20-04-2010, 14:15
Geek 2.0 Geek 2.0 is offline
Registered User
FRC #0107
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Holland, MI
Posts: 120
Geek 2.0 will become famous soon enough
Re: Picking a gyro for field-centric swerve control

Quote:
Originally Posted by ayeckley View Post
Others have reported (and it makes a lot of sense) that the compass modules they've used are very sensitive to the "natural" EMI environment around the permanent magnet motors in our bots. My own limited experience with such modules outside of a FRC environment matches their observations, so I don't have a high degree of confidence in that approach.
What if you created a "calibrate" mode, where the driver can push a button to recalibrate a gyro to what the compass sensor is outputting when they think there is a significant amount of drift. That way you don't have the interference but you still have the consistency.
  #21   Spotlight this post!  
Unread 20-04-2010, 14:33
vamfun vamfun is offline
Mentor :Contol System Engineer
AKA: Chris
FRC #0599 (Robodox)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 2003
Location: Van Nuys, California
Posts: 182
vamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of light
Send a message via AIM to vamfun
Re: Picking a gyro for field-centric swerve control

Quote:
Originally Posted by Golto View Post
What about using a compass. Wouldn't this give absolute position, without the need for gyros? Sure, they're a little more expensive, but their accuracy would be much more than that of a gyroscope.
This little 1 deg compass is sure affordable. http://www.sparkfun.com/commerce/pro...oducts_id=7915. Not sure what the output 2.5 deg rms error spectral characteristics are like.

In the short term, the fine gyro could beat this for accuracy given a good initial alignment... but that's tough to do in FRC competitions.
Edit:
Quote:
Alex:Others have reported (and it makes a lot of sense) that the compass modules they've used are very sensitive to the "natural" EMI environment around the permanent magnet motors in our bots. My own limited experience with such modules outside of a FRC environment matches their observations, so I don't have a high degree of confidence in that approach.
I too have not used a compass on an FRC and had this concern. I would guess the EMI noise would be amenable to low pass filtering and used for longer term automatic updating of the integrated rate. But again, we have introduced a two sensor complexity.

Last edited by vamfun : 20-04-2010 at 14:41.
  #22   Spotlight this post!  
Unread 20-04-2010, 14:36
ayeckley's Avatar
ayeckley ayeckley is offline
Registered User
AKA: Alex Yeckley
FRC #2252 (Mavericks)
Team Role: Mentor
 
Join Date: Apr 2007
Rookie Year: 2007
Location: Sandusky, OH
Posts: 268
ayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond repute
Re: Picking a gyro for field-centric swerve control

Quote:
Originally Posted by Geek 2.0 View Post
What if you created a "calibrate" mode, where the driver can push a button to recalibrate a gyro to what the compass sensor is outputting when they think there is a significant amount of drift. That way you don't have the interference but you still have the consistency.
Sounds pretty reasonable to me. The next step would probably be to parse through the compass module (magnetometer module, technically) data sheet to see if there are any "gotchas". I seem to recall that the update rate on such devices might be a little on the slow side, but that may have changed over the years since I did my initial research. Let us know how well it works if you try it...
__________________

  #23   Spotlight this post!  
Unread 20-04-2010, 17:03
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,554
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Picking a gyro for field-centric swerve control

Quote:
Originally Posted by ayeckley View Post
Sounds pretty reasonable to me. The next step would probably be to parse through the compass module (magnetometer module, technically) data sheet to see if there are any "gotchas". I seem to recall that the update rate on such devices might be a little on the slow side, but that may have changed over the years since I did my initial research. Let us know how well it works if you try it...
The update rate on most compasses I have worked with recently is between 1 and 20 hz.

I may investigate a dual-gyro approach. I tend to think that the fewer moving parts you have touching the ground the better - replacing a gyro is an easy task if it gets broken (and we've never had that happen).

So here's the scheme I intend to use:

ADXRS610 - 300°/s (5 volt supply) $59.95
http://www.sparkfun.com/commerce/pro...oducts_id=9058

Gyro Breakout Board - LPR5150AL Dual 1500°/s (2.7-3.3V supply)
http://www.sparkfun.com/commerce/pro...oducts_id=9412

Adjustable Voltage regulator for 1500 deg/s gyro $1.95
http://www.sparkfun.com/commerce/pro...roducts_id=527

I will monitor the actual rate of the 300 deg/s gyro in code (fast loop). When the values jump within 10% of the upper range, I'll check it against the baseline of the 1500 degree per second gyro. If there is a substantial difference, I'll calculate a correction factor to apply to the 300 deg/s gyro.

So here come the "electrical" type questions. Am I choosing a good voltage regulator for that 1500 dps gyro? What type of drift should I expect out of the 1500 dps gyro, and how accurate will it be over time? Should I be worried about the CRIO being able to accurately measure the .67 mV/deg/s value, or is it capable?

Remember - I'm not a controls guy but I did stay in a Holiday Inn Express last night....
  #24   Spotlight this post!  
Unread 20-04-2010, 19:12
ayeckley's Avatar
ayeckley ayeckley is offline
Registered User
AKA: Alex Yeckley
FRC #2252 (Mavericks)
Team Role: Mentor
 
Join Date: Apr 2007
Rookie Year: 2007
Location: Sandusky, OH
Posts: 268
ayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond repute
Re: Picking a gyro for field-centric swerve control

Are you sure you want a pitch and roll gyro? If you use it to track field orientation you'll have to mount it sideways and "throw away" one output (unless like Golto you have some use for an inclination angle).

If you choose to go with the LM317 you'll need more external components than you might otherwise. I'd consider using the COM-00526 that they offer instead (fixed 3.3V). Be sure to check the reference design shown on the data sheet to see what external parts (typically capacitors) you'll need in either case.

Regarding drift, the only clues are in the datasheet. The "rate noise density" and "sensitivity change vs. temperature" are the parameters of interest based on your question. In theory you can predict drift vs. time based on those parameters, but as a practical matter the answers you get would only apply in laboratory settings. Even if you place very little dollar value on your time, you'll quickly have spent more in doing a formal analysis than in just buying the part and having fun with it. Analog purists who do noise analysis for fun will surely disagree. If one offers to help, by all means accept.

The resolution of the cRIO NI-9201 analog module is 12 bits over a 20V span, which equates to 4.88mv/bit, so even using the 4X output you'll want to add a gain stage to the output of the module if you *really* want the lower end of the 1500 deg/sec. The downside is that any gyro output noise will also be amplified. You might choose to use a gain of about 20 (resulting in 13.4mv/deg/sec, or about 3 LSB). You'll then also need to be careful about how you prototype the circuit (proper grounding, signal routing, filtering, etc.) to minimize its susceptibility to noise pickup from external sources (like motor controllers).

Before you go to the lengths of adding a non-unity gain stage, you might want to try using the 4X output directly into the NI-9201 despite the resolution mis-match, just to see if you can live without the slow rate resolution you are "throwing away". You might be surprised. For what it's worth, we've never been able to saturate even a 150 deg/sec gyro on a real robot, so 1500 deg/sec could indeed be overkill unless you are planning to do something really exotic.

Hope that helps...
__________________


Last edited by ayeckley : 20-04-2010 at 19:15. Reason: Clarification about the trade-off.
  #25   Spotlight this post!  
Unread 20-04-2010, 19:30
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,554
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Picking a gyro for field-centric swerve control

I had considered the LM317, but the 'optimal' input to the gyro is 3 volts, even though it can handle 2.6-3.7 or something near that.

One of the problems we have with older gyros we have in the shop is that we don't know their gains. How to FIND those gains is a mystery to me, so we have several gyros that are really not usable because I don't know how to find the gains to put into labview to get accurate readings.

I was concerned that changing the input voltage will also change the gain requirement: I believe in the datasheet I read that it would, but I might be mistaken. If it does, how do I go about find the correct gain value? Trial and error hasn't worked very well for our other gyros. You get some VERY strange readings even with just small changes in gain.

I like the idea of not having to worry about resistors to get the voltage regulator to the correct voltage: if there's an easy way to find the gain I should be using that sounds like a homerun.

I didn't see a gyro listed in sparkfun that was single-axis 1500 dps. I'm not really worried about that second axis, and for whatever reason the 1500 dps gyro is half the cost of the 300 dps gyro, so wasting one axis on it really wasn't much of a concern.

Last edited by Tom Line : 20-04-2010 at 19:33. Reason: Typos are my bane....
  #26   Spotlight this post!  
Unread 20-04-2010, 19:43
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: Picking a gyro for field-centric swerve control

Quote:
Originally Posted by Tom Line View Post
I had considered the LM317, but the 'optimal' input to the gyro is 3 volts, even though it can handle 2.6-3.7 or something near that.

One of the problems we have with older gyros we have in the shop is that we don't know their gains. How to FIND those gains is a mystery to me, so we have several gyros that are really not usable because I don't know how to find the gains to put into labview to get accurate readings.

I was concerned that changing the input voltage will also change the gain requirement: I believe in the datasheet I read that it would, but I might be mistaken. If it does, how do I go about find the correct gain value? Trial and error hasn't worked very well for our other gyros. You get some VERY strange readings even with just small changes in gain.

I like the idea of not having to worry about resistors to get the voltage regulator to the correct voltage: if there's an easy way to find the gain I should be using that sounds like a homerun.
Typically:
* Give the gyro an arbitrary gain.
* Zero the gyro.
* Rotate a large, known angle. Typically a dozen revolutions or so.
* Divide actual rotation by measured rotation.
* Apply this to the arbitrary gain.
* Profit!

Varying input voltage will usually affect gain AND offset, so be mindful. Offset error is likely to have a bigger impact.

Resistors are pretty stable over time, but have large birth error. So, I hate using them to set voltages in production ( and almost always go for fixed regulators if I have the choice ), but don't mind them in one-off situations.

As a reminder, you can see what choices I made for the KoP gyro by looking here: http://usfirst.org/roboticsprograms/....aspx?id=16337
To be honest, the unity gain stages are more to protect against mis-wiring than anything else. If I were to do this as a one off or for a more controlled audience, I'd probably skip the output buffering entirely.
  #27   Spotlight this post!  
Unread 20-04-2010, 19:47
vamfun vamfun is offline
Mentor :Contol System Engineer
AKA: Chris
FRC #0599 (Robodox)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 2003
Location: Van Nuys, California
Posts: 182
vamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of light
Send a message via AIM to vamfun
Re: Picking a gyro for field-centric swerve control

Quote:
Originally Posted by Tom Line View Post
ADXRS610 - 300°/s (5 volt supply) $59.95
http://www.sparkfun.com/commerce/pro...oducts_id=9058

Gyro Breakout Board - LPR5150AL Dual 1500°/s (2.7-3.3V supply)
http://www.sparkfun.com/commerce/pro...oducts_id=9412

Adjustable Voltage regulator for 1500 deg/s gyro $1.95
http://www.sparkfun.com/commerce/pro...roducts_id=527

I will monitor the actual rate of the 300 deg/s gyro in code (fast loop). When the values jump within 10% of the upper range, I'll check it against the baseline of the 1500 degree per second gyro. If there is a substantial difference, I'll calculate a correction factor to apply to the 300 deg/s gyro.

So here come the "electrical" type questions. Am I choosing a good voltage regulator for that 1500 dps gyro? What type of drift should I expect out of the 1500 dps gyro, and how accurate will it be over time? Should I be worried about the CRIO being able to accurately measure the .67 mV/deg/s value, or is it capable?

Remember - I'm not a controls guy but I did stay in a Holiday Inn Express last night....
Tom, the approach you describe may or may not work depending upon the requirements you are trying to meet. What is the max rate you expect to see and for how long? Lets say the bump transient is .1 sec constant rate upset... if the upset is only 90 deg we are talking 900 deg/s then what you have is probably ok. If its only 500 deg/s then I would choose a 100 deg/s fine gyro and say 500 deg/s coarse gyro.

The CRIO a/d's have a 5mv resolution without oversampling. For the 5150 this means about 7.5 deg/s resolution. Also, this is really a 6000 deg/s gyro with the amplified output at 4x. The noise density is .175 deg/s/(sqrt(HZ). I believe this is at 1x so with the 140 HZ BW the the 4x noise is 4*.175*sqrt(140) = 8.3 deg/s rms. So you have a total rss accuracy of about 11 deg/s. This could be reduced with oversampling and if you are running at 200 Hz loop rate, you have an averaging reduction of 1/sqrt(20) so the average bias error would be around 2 deg/s. This isn't too bad for a .1 sec interval. But what may kill you is the nonlinearity error of 1%FS= 60 deg/s. This cannot be helped with averaging, so you might be off as much as 6 deg here from the .1 sec transient so the compass is looking better.

If however, you could live with the (fine,coarse) = (100 deg/s,500 deg/s) you could probably beat the compass.

The adj regulator would be fine, but you could save a resistor if you just bought a 3v fixed regulator.

I would also sync the long term average of the coarse gyro to the fine gyro average to mitigate the drift. This is easily done with a low pass (10 sec time constant?) on the error between the two gyros whose output corrects the coarse gyro input.

Opps... this is probably a redundant reply since I didn't see Alex' reply first.

Last edited by vamfun : 20-04-2010 at 20:35.
  #28   Spotlight this post!  
Unread 20-04-2010, 20:08
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,554
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Picking a gyro for field-centric swerve control

Quote:
Originally Posted by vamfun View Post
Tom, the approach you describe may or may not work depending upon the requirements you are trying to meet. What is the max rate you expect to see and for how long? Lets say the bump transient is .1 sec constant rate upset... if the upset is only 90 deg we are talking 900 deg/s then what you have is probably ok. If its only 500 deg/s then I would choose a 100 deg/s fine gyro and say 500 deg/s coarse gyro.

The CRIO a/d's have a 5mv resolution without oversampling. For the 5150 this means about 7.5 deg/s resolution. Also, this is really a 6000 deg/s gyro with the amplified output at 4x. The noise density is .175 deg/s/(sqrt(HZ). I believe this is at 1x so with the 140 HZ BW the the 4x noise is 4*.175*sqrt(140) = 8.3 deg/s rms. So you have a total rss accuracy of about 11 deg/s. This could be reduced with oversampling , but even without this it isn't too bad for a .1 sec interval. But what may kill you is the nonlinearity error of 1%FS= 60 deg/s. So you might be off as much as 6 deg here from the .1 sec transient so the compass is looking better.

If however, you could live with the (fine,coarse) = (100 deg/s,500 deg/s) you could probably beat the compass.

The adj regulator would be fine, but you could save a resistor if you just bought a 3v fixed regulator.

I would also sync the long term average of the coarse gyro to the fine gyro average to mitigate the drift. This is easily done with a low pass (10 sec time constant?) on the error between the two gyros whose output corrects the coarse gyro input.
Unfortunately, estimating the duration and impulse of an impact of FRC robots would be quite difficult - how they hit eachother and what angle would all contribute to the amount the robot spins and how quickly. That's why I took a shotgun approach. A good solid gyro for my 'fine' and the highest dps gyro I could find for my coarse.

The quick calculations you performed are exactly where I need help. If you want gear ratios or bending moments or torques I'm your man.... but I absolutely hated system design, fourier, etc. and I'm afraid I blotted it out of my mind rather quickly after school

A benefit of the 500 dps is that it runs on 5V and the voltage regulator could be eliminated.

Just so I'm clear - the higher rate gyro is going to drift more, so you're suggesting using the lower rate gyro to correct the higher rate one. Essentially, saying that when the lower rate gyro isn't turning at a rate that's above it's maximum, you would constantly update a correction factor to minimize the high dps gyro's error from zero. Is that right?

Regarding the compass: what are the rate sensors used for in the compass? Wouldn't they be knocked off-kilter just as much because of a collision?
  #29   Spotlight this post!  
Unread 20-04-2010, 21:28
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
Re: Picking a gyro for field-centric swerve control

Here are my random thoughts on a few things brought up in this thread:

-You should probably integrate the 1500 deg/s gyro in a very fast loop (1 ms if you can) and the 300 deg/s gyro in a slower loop. Doing this will provide plenty of oversampling to gain a few bits of resolution to make it nearly as accurate as the 300 deg/s gyro at a slower sample rate. The only thing is that you'll need to guarantee a very accurate bias calculation for the 1500 deg/s gyro with a lot of samples - you may not want to use the stock bias routine.

-due to noise in the angular rate signal, you'll probably want to check against the 1500 deg/s gyro when above 70% of saturation value of the 300 deg/s gyro (or thereabouts depending on the noise level). Any noise causing saturation of the output voltage will cause your calculated integral to have a permanent offset, and you really don't want that. On top of that, you can get some strange effects when internal op-amps saturate before the on-board filter. I don't want to get too deep into that but I had to do a big study on these affect in accelerometers for a past job - these issues can be pretty hard to track down, so be conservative when getting anywhere near saturation.

- If the A/D converter uses the same reference voltage as the angular rate sensor (i.e. gyro), you're usually good to go. By sharing the same reference voltage, the A/D conversion will be ratiometric to the the gyro signal (i.e. as the gyro signal changes, so will the A/D conversion and the errors will cancel out).

That's all I can think of for now - the commercial is almost over, so it's back to my TV show for now.
__________________
-
An ounce of perception is worth a pound of obscure.

Last edited by Chris Hibner : 20-04-2010 at 21:56.
  #30   Spotlight this post!  
Unread 21-04-2010, 01:40
vamfun vamfun is offline
Mentor :Contol System Engineer
AKA: Chris
FRC #0599 (Robodox)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 2003
Location: Van Nuys, California
Posts: 182
vamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of light
Send a message via AIM to vamfun
Re: Picking a gyro for field-centric swerve control

Quote:
Originally Posted by Tom Line View Post
Just so I'm clear - the higher rate gyro is going to drift more, so you're suggesting using the lower rate gyro to correct the higher rate one. Essentially, saying that when the lower rate gyro isn't turning at a rate that's above it's maximum, you would constantly update a correction factor to minimize the high dps gyro's error from zero. Is that right?
Yes... you are estimating the bias of the coarse relative to the reference rate which is the fine gyro. During start up, the reference rate is zero for both gyros. Once you are going, use the best gyro to be your reference. The averaging time should be enough to give a large number of samples... I would use an averaging time constant at least 100 times the sample period. This would give a mean estimate that is roughly a factor 10 better than the combined noise error rms.
The pseudo code might look like this:

if(abs(fine)> sat_value) // check for saturation
{rate = coarse + bias;} //use corrected coarse if saturated
else
{
bias = bias + .01*(fine - coarse -bias); // compute the bias with an exponential filter tau = 100*dt
rate = fine;// use fine gyro
}

angle = angle + rate*dt; //Integrate rate

Quote:
Regarding the compass: what are the rate sensors used for in the compass? Wouldn't they be knocked off-kilter just as much because of a collision?
Typically, accelerometer sensors rather than rates sensors are used to calculate compass tilt which is needed to determine the horizontal component of the earths magnetic field. Horizontal plane rotations from a robot bump will not cause any compass tilt errors of significance. Low, steady state accelerations however can cause tilt errors.

Having done our simple analysis, the compass solution seems more cost effective since only one cheap sensor (http://www.chiefdelphi.com/forums/sh...d=1#post956268) can be used with no added regulators. Its accuracy is adequate for the field-centric task provided a location can be found on the robot that is free from strong magnetic disturbances. Maybe someone can chime in with some real life FRC testing experience.

But it would be fun to fool with the dual gyro project.

Last edited by vamfun : 21-04-2010 at 02:40.
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
pic: DS Swerve on the field Racer26 Extra Discussion 15 09-04-2010 21:34
Steering control without a gyro nathanww C/C++ 4 27-01-2009 12:14
Crab / Swerve drive joystick control scheme Tom Line Programming 12 16-04-2007 18:47
Swerve drive control system dpick1055 Programming 8 22-01-2007 19:06
Omni-wheels and driver-centric drive efoote868 Programming 10 01-11-2006 22:22


All times are GMT -5. The time now is 20:53.

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