Go to Post High heels on a Segway takes quite a bit of adjustment - as I learned the hard way. - Jessica Boucher [more]
Home
Go Back   Chief Delphi > Technical > Control System > Sensors
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Spotlight this post!  
Unread 10-08-2013, 21:58
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 689
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
Re: Measuring angle relative to the floor

Quote:
Originally Posted by GuyM142 View Post
I'd like to use a sensor to measure [angle, relative to ground]. I don't know whether to use a gyro or an accelerometer to do that.
I think the answer is either one, though in different cases. The "best" approach would be to use both and combine the information from both sensors using a filter. This is probably overkill for what you're doing, though.

In general, over short periods of time (seconds to a couple of minutes) gyros are good sensors for measurement of angle. They're differential sensors (they only measure change in angle), though, so they suffer from two disadvantages: 1. they're susceptible to accumulated error and 2. you have to set the initial angle through some other means.

Accelerometers are somewhat complementary to gyros. As [Ether] says, you can get an absolute measure of angle relative to the local gravity vector, but this only gives a good reading when the sensor is not otherwise accelerating (practically, this means when the sensor is stationary) - under other conditions, the reading has noise introduced into the reading by the other accelerations. If the angle being measured isn't changing too quickly, and the system isn't under a constant acceleration, you can get a better measure by averaging the angle reading over time, and all the transient accelerations will more or less cancel out. This is called low-pass filtering.

Kalman filters and complementary filters work by essentially combining these two sources of data in ways that allow each to counteract the other's short-comings, creating a better estimate of the current angle.

Since you're probably only interested in tracking the angle for a few seconds and you can start with the knowledge that the robot is flat on the floor, (tl;dr) the gyro is probably the best sensor for your application.

P.S. Another approach would be to use distance sensor(s) (I would probably use infrared) pointed downwards from the bottom of your chassis to measure the distance from the ground, which you could then use to get an estimate of the robot angle.
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor
Reply With Quote
 


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 08:11.

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