Go to Post And that's why we all need to consider reserving a "No! Bad robot!" button for the robocoach. :yikes: - vhcook [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
  #1   Spotlight this post!  
Unread 12-01-2013, 10:31
dmitch's Avatar
dmitch dmitch is offline
Chief Head Electrical Guy
AKA: Daniel Mitchell
FRC #1997 (Stag Robotics)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Bishop Miege High School
Posts: 142
dmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the rough
Effectiveness of Quadrature Encoders

Can the quadrature encoders that we got in the KOP last year measure absolute angle of a robot very well? I was wondering what the best sensor for measuring absolute angle would be.
__________________
  #2   Spotlight this post!  
Unread 12-01-2013, 10:36
Jay1986's Avatar
Jay1986 Jay1986 is offline
Programmer and Driver
AKA: Jay Urban
FRC #1986 (Team Titanium)
Team Role: Alumni
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Lees Summit
Posts: 67
Jay1986 is a jewel in the roughJay1986 is a jewel in the roughJay1986 is a jewel in the roughJay1986 is a jewel in the rough
Re: Effectiveness of Quadrature Encoders

the best sensor for measuring angles would be a gyro
__________________

2013 Oklahoma Regional (Regional Winner, Gracious Professionalism, [and judges voted me star of the day])
2013 KC Regional (Regional Winner, Woodie Flowers, Industrial Design)
2013 Hub City Regional (Regional Winner, Entrepreneurship, Quality, Dean's List)
  #3   Spotlight this post!  
Unread 12-01-2013, 11:39
nathan_hui nathan_hui is offline
Registered User
AKA: Nathan Hui
FRC #2473 (CHS Robotics)
Team Role: Alumni
 
Join Date: Feb 2012
Rookie Year: 2009
Location: Cupertino, CA
Posts: 228
nathan_hui will become famous soon enoughnathan_hui will become famous soon enough
Send a message via AIM to nathan_hui
Re: Effectiveness of Quadrature Encoders

Quote:
Originally Posted by dmitch View Post
Can the quadrature encoders that we got in the KOP last year measure absolute angle of a robot very well?
What do you mean by "absolute angle"? What is that relative to?

For measuring the angle of an arm, by all means those encoders are the best. For measuring the total rotation of the robot, a gyro coupled with the encoder inputs through a Kalman filter (or something of the sort) would be best. But it's hard to say without understanding what it is exactly you're trying to measure.
__________________
Nathan Hui
B.S. Electrical Engineering, UCSD '16
FRC 2473 (CHS Robotics), Team Captain '12
FTC 4950, 6038
  #4   Spotlight this post!  
Unread 12-01-2013, 11:43
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,074
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Effectiveness of Quadrature Encoders

Quote:
Originally Posted by nathan_hui View Post
For measuring the total rotation of the robot, a gyro coupled with the encoder inputs through a Kalman filter (or something of the sort) would be best.
How do you know that would be best ?



  #5   Spotlight this post!  
Unread 12-01-2013, 11:48
Jay1986's Avatar
Jay1986 Jay1986 is offline
Programmer and Driver
AKA: Jay Urban
FRC #1986 (Team Titanium)
Team Role: Alumni
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Lees Summit
Posts: 67
Jay1986 is a jewel in the roughJay1986 is a jewel in the roughJay1986 is a jewel in the roughJay1986 is a jewel in the rough
Re: Effectiveness of Quadrature Encoders

Quote:
What do you mean by "absolute angle"? What is that relative to?
He said the angle of the "robot" so I figured he was talking about the angle of the robot instead of a shaft. I think we need some clarification from him.
__________________

2013 Oklahoma Regional (Regional Winner, Gracious Professionalism, [and judges voted me star of the day])
2013 KC Regional (Regional Winner, Woodie Flowers, Industrial Design)
2013 Hub City Regional (Regional Winner, Entrepreneurship, Quality, Dean's List)
  #6   Spotlight this post!  
Unread 12-01-2013, 11:52
nathan_hui nathan_hui is offline
Registered User
AKA: Nathan Hui
FRC #2473 (CHS Robotics)
Team Role: Alumni
 
Join Date: Feb 2012
Rookie Year: 2009
Location: Cupertino, CA
Posts: 228
nathan_hui will become famous soon enoughnathan_hui will become famous soon enough
Send a message via AIM to nathan_hui
Re: Effectiveness of Quadrature Encoders

Multiple inputs from multiple sensors couple together should give the best possible approximation of measured phenomena, right? Therefore, following that logic, a gyro and encoder inputs (from the wheels, if that wasn't clear) should give you a fairly good approximation of which direction you are pointed on the field. A gyro won't care about being slammed, but won't (I don't think) have the stability and resolution that you could get from examining the encoder input from the wheels, which would be useless when hit and somewhat useless when skidding.

But oh, this wouldn't work for WCDs or tank treads, only robots with omniwheels, or perhaps swerve drives (and I have absolutely no idea about mecanum). I see your point.

I guess I've just proved that it really depends on what you're measuring and the nature of measured phenomena.
__________________
Nathan Hui
B.S. Electrical Engineering, UCSD '16
FRC 2473 (CHS Robotics), Team Captain '12
FTC 4950, 6038

Last edited by nathan_hui : 12-01-2013 at 11:54.
  #7   Spotlight this post!  
Unread 12-01-2013, 13:42
slijin's Avatar
slijin slijin is offline
Pockets
AKA: Samuel Lijin
FRC #0694 (StuyPulse)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York City
Posts: 537
slijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to behold
Re: Effectiveness of Quadrature Encoders

If by "absolute angle" you are referring to the angular position of the robot with respect to field boundaries, then the answer is that no, you cannot directly measure the robot's angular velocity with an encoder. The quadrature encoders distributed in the KoP measure the angular velocity of a rotating shaft relative to the encoder's mount.

In other words, because you can only use the encoder to measure the angular velocity of one object relative to another, you can't use it to measure that of the robot relative to the field, because you can't mount it on the field.

A better option would be to use a gyro sensor.
__________________

2010-12 CT Chairman's
2011 Galileo 5th seed
2010 NY Regional Winners
  #8   Spotlight this post!  
Unread 12-01-2013, 17:31
nathan_hui nathan_hui is offline
Registered User
AKA: Nathan Hui
FRC #2473 (CHS Robotics)
Team Role: Alumni
 
Join Date: Feb 2012
Rookie Year: 2009
Location: Cupertino, CA
Posts: 228
nathan_hui will become famous soon enoughnathan_hui will become famous soon enough
Send a message via AIM to nathan_hui
Re: Effectiveness of Quadrature Encoders

I'm not going to argue that you can measure directly a location on the field. I'm simply stating that by comparing the drivetrain rotation values, you can determine the total rotation of the robot, ignoring skidding and pushing. I know it's not that simple, but it can be done, and the results may or may not be pretty. But, the OP does need to clearly state his intent of "absolute angle".
__________________
Nathan Hui
B.S. Electrical Engineering, UCSD '16
FRC 2473 (CHS Robotics), Team Captain '12
FTC 4950, 6038
  #9   Spotlight this post!  
Unread 12-01-2013, 17:51
efoote868 efoote868 is offline
foote stepped in
AKA: E. Foote
FRC #0868
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2005
Location: Noblesville, IN
Posts: 1,404
efoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond repute
Re: Effectiveness of Quadrature Encoders

From experience in years past, the gyro won't drift too much to notice during the match, unless you exceed its rated value in degrees / second (I remember in 2008 the gyro in the kit was limited to something along the lines of 70 degrees / second, which was too easy to exceed).

In mission critical applications such as autonomous, 15 seconds isn't too much and you should be absolutely fine.
__________________
Be Healthy. Never Stop Learning. Say It Like It Is. Own It.

Like our values? Flexware Innovation is looking for Automation Engineers. Check us out!
  #10   Spotlight this post!  
Unread 12-01-2013, 19:19
dmitch's Avatar
dmitch dmitch is offline
Chief Head Electrical Guy
AKA: Daniel Mitchell
FRC #1997 (Stag Robotics)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Bishop Miege High School
Posts: 142
dmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the rough
Re: Effectiveness of Quadrature Encoders

By "absolute angle", I was using the terminology that is in this document found on the FIRST website. It says "For example, the gyroscope is very good at finding rate of angular change, but poor at finding absolute angle. The accelerometer can determine absolute angle when the robot is stable, but is easily confused when the robot moves." I understood this to mean that "absolute angle" is the actual angle that one piece is at relative to another, not the rate at which an object is turning. For example, I thought that "absolute angle" would mean the angle of the robot heading in relation to the field.
__________________
  #11   Spotlight this post!  
Unread 12-01-2013, 21:28
F22Rapture's Avatar
F22Rapture F22Rapture is offline
College Student, Mentor
AKA: Daniel A
FRC #3737 (4H Rotoraptors)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Goldsboro, NC
Posts: 476
F22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant future
Re: Effectiveness of Quadrature Encoders

Why do you need to measure the absolute angle? A compass could work perhaps, but you would need to calibrate it on a per-field basis.
__________________
Research is what I’m doing when I don’t know what I’m doing.
- Wernher von Braun
Attending: Raleigh NC Regional
  #12   Spotlight this post!  
Unread 12-01-2013, 21:38
dmitch's Avatar
dmitch dmitch is offline
Chief Head Electrical Guy
AKA: Daniel Mitchell
FRC #1997 (Stag Robotics)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Bishop Miege High School
Posts: 142
dmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the rough
Re: Effectiveness of Quadrature Encoders

I was going to use a gyro to look at the angle of our frisbee shooter, and another to see the angle of the robot in relation to the floor. However, as I understood it, the Gyro is bad at telling what angle something is at if that thing is not moving. Was that an incorrect interpretation?
__________________
  #13   Spotlight this post!  
Unread 12-01-2013, 21:41
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,074
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Effectiveness of Quadrature Encoders

Quote:
Originally Posted by dmitch View Post
I understood it, the Gyro is bad at telling what angle something is at if that thing is not moving. Was that an incorrect interpretation?
Yes.

The gyro is the most-used sensor for determining the orientation of your robot with respect to the field.

It is not perfect though. Notable drawbacks are

1) it can be knocked out of calibration if your robot is hit by another robot

2) some of the KoP units have a slow drift (the angle becomes inaccurate over time)

Both of the above can be mitigated somewhat by providing the driver with a button that re-calibrates the gyro when the driver turns the robot back to the zero position.






Last edited by Ether : 12-01-2013 at 21:44.
  #14   Spotlight this post!  
Unread 13-01-2013, 11:31
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Effectiveness of Quadrature Encoders

Quote:
Originally Posted by dmitch View Post
"For example, the gyroscope is very good at finding rate of angular change, but poor at finding absolute angle. The accelerometer can determine absolute angle when the robot is stable, but is easily confused when the robot moves."
I understood this to mean that "absolute angle" is the actual angle that one piece is at relative to another, not the rate at which an object is turning. For example, I thought that "absolute angle" would mean the angle of the robot heading in relation to the field.
In this case, "absolute angle" means the tilt of the robot in relation to the floor. It can tell you when you've fallen over, or how steep a sloping ramp is. It can't tell you which compass direction you are facing.

To keep track of the direction of the robot, use a yaw rate sensor (i.e. "gyro"). It'll tell you how quickly you're turning, and the software can integrate that information to tell you what direction you've turned to. The accuracy will get worse over time as the integration bias "drifts", and you will lose accuracy if you ever turn faster than the sensor is capable of tracking. For the first fifteen seconds of a match, that should not be a great problem.

To measure the angle of a robot component, use an absolute sensor such as a potentiometer (easy, inexpensive, but prone to becoming electrically "noisy" as it wears out) or a magnetic angular sensor (easy, more expensive, durable, but possible to damage with static electricity if mishandled).
  #15   Spotlight this post!  
Unread 17-01-2013, 23:39
Sparks333's Avatar
Sparks333 Sparks333 is offline
Robotics Engineer
AKA: Dane B.
FRC #1425 (Wilsonville Robotics)
Team Role: Alumni
 
Join Date: Feb 2004
Rookie Year: 2003
Location: Wilsonville, Oregon
Posts: 184
Sparks333 is a glorious beacon of lightSparks333 is a glorious beacon of lightSparks333 is a glorious beacon of lightSparks333 is a glorious beacon of lightSparks333 is a glorious beacon of lightSparks333 is a glorious beacon of light
Send a message via AIM to Sparks333
Re: Effectiveness of Quadrature Encoders

Ooh boy. Inertial sensor topic. This ought to be good...

Alan Anderson's comment regarding accelerometers and tilt is dead on, with the aforementioned caveat that accelerometers are 'easily confused' - when an accelerometer attempting to measure attitude, it is actually measuring is the gravity vector. Since inertial sensors don't have a way to tell the difference between acceleration due to gravity and acceleration due to motion, once the robot starts moving, it's going to skew the acceleration vector off the gravity norm. They are very good for finding which way is down in a scenario with little motion - if you want to get clever, integrating gyroscopes (or, more properly, angular rate sensors) into the system with either a Kalman or an complimentary filter can give a fair approximation of which way is down in the presence of motion. But, it sounds like the bigger question is not which way is down, but what direction am I pointing. This is where the encoders coupled with gyros might help you out - again, with some form of sensor fusion, with the assumption that the gyros will drift if left to their own devices, and the difference in encoder ticks (left and right) won't be able to capture the motion of a turn at high speeds. Efoote868 is right in that with a very carefully tuned inertial loop relying on gyros alone can give you a fair approximation for the 15 seconds of autonomous, but assuming you want a heading lock to last longer than that, either Ether's heading reset button or locking onto a known field landmark (like a vision target) and resetting the heading angle is required. Traditional INSes knock out heading errors with magnetic field sensors (digital compasses), but there are too many stray mag fields in and around a robot to be trusted. One method I'd always wanted to try was to put two ultrasonic sensors on the side of a robot, as far apart as I could, and try to range to the wall to get an idea of angle, within reason.

Generally speaking, if you want to heading-lock your frisbee shooter (or measure the azimuth, if we're going to be proper about this), I'd use a vision system first and foremost, and a complimentary-filtered gyro-encoder scheme for when it went out of view. If you want to know the vertical angle of the shooter (inclination), unless your robot is really strange, I'd recommend just using a potentiometer and assuming the robot is level - it's simple, it's direct, and it doesn't drift. Dunno if that covers your question, but figured I've give my $0.02 and then some.

Sparks
__________________
ICs do weird things when voltage is run out of spec.

I love to take things apart. The fact that they work better when I put them back together it just a bonus.

http://www.ravenblack.net/random/surreal.html
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


All times are GMT -5. The time now is 11:21.

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