Go to Post "How do we make our team be like your team?" That's the sort of question everyone should be asking of these so-called "elite" or "powerhouse" teams. - sanddrag [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 08-02-2013, 16:44
jwakeman jwakeman is offline
Registered User
FRC #0063 (Red Barons)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: 16510
Posts: 182
jwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nice
Gyro/Accelerometer Fusion

I would like to compensate for drift in my gyro using an acceleromoter. I collected some data from the accelerometer and gryo and I am looking for some help in designing a filter.

1. My first question is if the accelerometer data looks reasonable since this is the first time I have used an accelerometer. The accelerometer is lying flat on the robot.

- The first attachment (acc_data_1.bmp) shows readings while the robot was stationary (first half) and then moving. I don't understand why the z-axis is jumping around while the robot is stationary (or why it is moving at all even when the robot is driving around).

- The second and third attachements (acc_data_2.bmp and acc_data_3.bmp) show the acceleromoter data and gyro data during a sequence of motions.

Time 368.5-373: Robot turns 90 degrees
Time 373-375: Robot drives 5 feet
Time 375-378.5: Robot turns 90 degrees
Time 378.5 - 381.5 Robot drives 10 feet
Time 381.5-384.5: Robot turns 90 degrees

If I am correct the x-axis is forward/reverse motion of the robot and the y-axis is side to side motion of the robot. I think I can see reasonable correlation from the accelerometer data (for example acceleration followed by deceleration in the x-axis when making the 5' and 10' position moves).

I would like other opinions on the quality of this data and if I should proceed with trying to create a filter.

2. If the data is correct I would then appreciate any suggestions for a filter design. I attempted to implement the suggestion here but I don't really understand it enough to get it working. One of the main sticking points is how to convert the G's from the accelerometer to degrees.

Some theory may be helpful, some practical pointers would be nice, some code or psuedo-code would be awesome! I will leave this sort of open ended and see where it goes.
Attached Images
File Type: bmp acc_data_3.bmp (1.92 MB, 52 views)
File Type: bmp acc_data_1.bmp (1.72 MB, 94 views)
File Type: bmp acc_data_2.bmp (1.72 MB, 57 views)

Last edited by jwakeman : 08-02-2013 at 16:46. Reason: attachments
Reply With Quote
  #2   Spotlight this post!  
Unread 08-02-2013, 18:58
lemiant's Avatar
lemiant lemiant is offline
the Dreamer
AKA: Alex
FRC #4334 (Alberta Tech Alliance)
Team Role: Leadership
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Calgary, AB, Canada
Posts: 562
lemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond repute
If you intend to use this to track your robots position it will not work. I have tried this before with FIRST grade sensors and they aren't even close to accurate enough. A commercial inertial measurement unit (IMU, google it) would do the job, but it's orders of magnitude too expensive for an FRC robot.
__________________
FRC Team 4334
2012 - Archimedes Champions, IRI Champions
2013 - Western Canadian Regional Winner, Galileo Quarter-Finalilst


Last edited by lemiant : 08-02-2013 at 20:00.
Reply With Quote
  #3   Spotlight this post!  
Unread 08-02-2013, 19:17
jwakeman jwakeman is offline
Registered User
FRC #0063 (Red Barons)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: 16510
Posts: 182
jwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nice
Re: Gyro/Accelerometer Fusion

Quote:
Originally Posted by lemiant View Post
If you intend to use this to track your robots position it will not work.
I'm not looking to maintain an absolute heading/field position. I am only doing relative moves, i.e. reset the gyro and move X degrees. It already works well and the gyro filtering is not really required but I thought it would be nice to have and would be a good learning experience.

Quote:
Originally Posted by lemiant View Post
I have tried this before with FIRST grade website
website?
Reply With Quote
  #4   Spotlight this post!  
Unread 08-02-2013, 20:01
lemiant's Avatar
lemiant lemiant is offline
the Dreamer
AKA: Alex
FRC #4334 (Alberta Tech Alliance)
Team Role: Leadership
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Calgary, AB, Canada
Posts: 562
lemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond repute
Quote:
Originally Posted by jwakeman View Post
I'm not looking to maintain an absolute heading/field position. I am only doing relative moves, i.e. reset the gyro and move X degrees. It already works well and the gyro filtering is not really required but I thought it would be nice to have and would be a good learning experience.



website?
Oops, I meant sensors. Smartphones and autocorrect . In this case, why is it necessary to have the accelerometer at all? Translation should affect gyro readings at all.
__________________
FRC Team 4334
2012 - Archimedes Champions, IRI Champions
2013 - Western Canadian Regional Winner, Galileo Quarter-Finalilst

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 12:56.

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