Go to Post and don't overestimate the ability of an unskilled fool with exotic tools! - MissInformation [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 16-01-2006, 10:13
Dan894 Dan894 is offline
Registered User
FLL #0894
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Flint, Michigan
Posts: 6
Dan894 is an unknown quantity at this point
Speed Ramping with Deadzone

Does anyone have any successful code for ramping? We've been trying this for several years running, and have tried the following:
  • A deadzone. The problem with this is it jumps in speed after the deadzone. We've tried several solutions, including modifying the code so it linearly starts at 128 immediately outside of the deadzone and finishes at 255.
  • We've done the same thing with a parabola instead.
  • We tried a one second delay in the response time, where it gradually ramps.
  • One year our robot went waaay too fast. So in the end, the only successful approach was simply cutting the speed in half.
These have all given rise to bugs making steering more cumbersome. Has anyone had any more success?
  #2   Spotlight this post!  
Unread 16-01-2006, 10:22
Greg Needel's Avatar Unsung FIRST Hero
Greg Needel Greg Needel is offline
REVving up for a new season
FRC #2848 (All-sparks)
Team Role: Engineer
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Dallas, TX
Posts: 3,111
Greg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond repute
Re: Speed Ramping with Deadzone

i am just curious if you have ever calibrated your speed controllers? This typically decreases the dead zone.

Instructions to calibrate victor 884: connect to your robot via tether turn your machine on. With a paper clip push in the inset cal button on the speed controller till the light blinks red. Then move your joystick back and forth (covering the full range of motion) until the light blinks green. Do this with all your speed controllers and it will help reduce the dead zone of the joysticks.
__________________
Greg Needel│www.robogreg.com
Co-founder REV Robotics LLC www.REVrobotics.com
2014 FRC World Champions with 254, 469, & 74
  #3   Spotlight this post!  
Unread 16-01-2006, 12:27
Donut Donut is online now
The Arizona Mentor
AKA: Andrew
FRC #2662 (RoboKrew)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Goodyear, AZ
Posts: 1,313
Donut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond repute
Re: Speed Ramping with Deadzone

If I remember right, we've typically used a parabola approach, where the values closer to the center on the joystick are more precise and the values further out change speed much faster. Part of it depends on the year's robot, our robots have had very different speed abilities year to year.

As for ramping up the motors, we put a limit on how much a pwm value can change per loop, by comparing what we want to set the pwm value to and what the current value on the pwm is. If the difference is greater than the limit, it only changes by the limit for that loop.
  #4   Spotlight this post!  
Unread 16-01-2006, 12:58
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Speed Ramping with Deadzone

generally speaking, ramping or putting filters on your driver controls is not the best way to go

it only makes your bot act sluggish, as if it were very heavy and slow to respond to driver commands.

Why take a nice, light, powerfull remote control vehicle and make it act like a big, heavy underpowered sloth?

what you really need is driver training. There is no engineering fix for lack of practice time.

There are two things you can do that are a compromise.

1. Have a high power/low power switch on the driver controls. In low power all joystick commands are cut in half, or to 33% - to use for more precise manuvers.

2. have jog buttons on your driver controls for making very small movements with the robot. A jog button is a push button that causes a one-loop full power output to a motor, then power goes to zero. the effect is like tapping your robot with a hammer, to get it to nudge just a bit in one direction. If you want, have the jog button auto repeat if you hold it down, one jog per second. Try it. If a one-loop full power (254) pulse makes the bot move too much then back it down to 220, 200... till you get the fine-tuning effect you need. It should be very repeatable once you get it dialed in: one push of the jog button will move the bot 1 inch forward, or 1° left....
  #5   Spotlight this post!  
Unread 16-01-2006, 13:53
Greg Needel's Avatar Unsung FIRST Hero
Greg Needel Greg Needel is offline
REVving up for a new season
FRC #2848 (All-sparks)
Team Role: Engineer
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Dallas, TX
Posts: 3,111
Greg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond repute
Re: Speed Ramping with Deadzone

Quote:
Originally Posted by KenWittlief
generally speaking, ramping or putting filters on your driver controls is not the best way to go

it only makes your bot act sluggish, as if it were very heavy and slow to respond to driver commands.

Why take a nice, light, powerfull remote control vehicle and make it act like a big, heavy underpowered sloth?

what you really need is driver training. There is no engineering fix for lack of practice time.

There are two things you can do that are a compromise.

1. Have a high power/low power switch on the driver controls. In low power all joystick commands are cut in half, or to 33% - to use for more precise manuvers.

2. have jog buttons on your driver controls for making very small movements with the robot. A jog button is a push button that causes a one-loop full power output to a motor, then power goes to zero. the effect is like tapping your robot with a hammer, to get it to nudge just a bit in one direction. If you want, have the jog button auto repeat if you hold it down, one jog per second. Try it. If a one-loop full power (254) pulse makes the bot move too much then back it down to 220, 200... till you get the fine-tuning effect you need. It should be very repeatable once you get it dialed in: one push of the jog button will move the bot 1 inch forward, or 1° left....
instead of a jog button you could also make a switch that limits your pwm signal 1/2 or 1/4 power and just use your joystick...almost like a 2 speed tranny in software....almost
__________________
Greg Needel│www.robogreg.com
Co-founder REV Robotics LLC www.REVrobotics.com
2014 FRC World Champions with 254, 469, & 74
  #6   Spotlight this post!  
Unread 16-01-2006, 14:46
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Speed Ramping with Deadzone

the difference between a jog button and limiting the output values of the joystick to a lower range is: with a jog button you can hit your motors with a single full power pulse of energy, about 16mS long

its impossible to do that with a joystick, to push it full (or half) on, and get it back to zero in 1/60th of a second.

Hitting the motors with a short full power pulse overcomes all the friction in the system. Turning the motors just slightly on (with the joystick) doesnt.

Last edited by KenWittlief : 16-01-2006 at 14:52.
  #7   Spotlight this post!  
Unread 16-01-2006, 15:10
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: Speed Ramping with Deadzone

Last year we did the following with great results:
1.)lift your robot on some blocks. Write some code that steps gradually through each pwm value and use some sort of wheel speed sensor to create a table of PWM vs. speed. Do this for each drivetrain module.

2.)write a lookup table that makes things linear
3.)The deadzone that is built into the speed controllers has now been eliminated so you will need to code your own. Do so.

This works well to smooth out the nonlinearity wherever it comes from, and make your drivetrain drive straighter. Short of closed loop feedback, i think this is the best approach
__________________
1139 Alumni
  #8   Spotlight this post!  
Unread 17-01-2006, 02:58
Joe Hershberger Joe Hershberger is offline
National Instruments
AKA: jhersh
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 1997
Location: Austin, TX
Posts: 148
Joe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to all
Re: Speed Ramping with Deadzone

Quote:
Originally Posted by Rickertsen2
Last year we did the following with great results:
1.)lift your robot on some blocks. Write some code that steps gradually through each pwm value and use some sort of wheel speed sensor to create a table of PWM vs. speed. Do this for each drivetrain module.

2.)write a lookup table that makes things linear
3.)The deadzone that is built into the speed controllers has now been eliminated so you will need to code your own. Do so.

This works well to smooth out the nonlinearity wherever it comes from, and make your drivetrain drive straighter. Short of closed loop feedback, i think this is the best approach
Rick,

That's definitely a great way to make the robot feel more responsive. When we create out linearization map, we strapped a laptop on the robot and had the debug port read the wheel speed off of the encoders. We programmed it to, very similarly, output each pwm code in succession and report on the speed. However instead of using blocks, we did one wheel at a time and had it drive in a circle. It got pretty crazy at the highest speeds. Our drive system had only two drive wheels on the ground and 2 omni castors so we didn't have trouble with side load from turning. This allowed us to get the total system response when loaded as opposed to unloaded on blocks.

I think this year we'll use the BlueSMiRF and spare the risk to the spinning laptop!

It was incredible how non-linear the response was. The inverse table improved drivability and responsiveness dramatically. Attached is a plot to show just how bad it was.

Cheers!
-Joe
Attached Files
File Type: pdf 2004 Motor Curve - Team 476.pdf (8.1 KB, 81 views)
  #9   Spotlight this post!  
Unread 17-01-2006, 10:33
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: Speed Ramping with Deadzone

Quote:
Originally Posted by Joe Hershberger
It was incredible how non-linear the response was. The inverse table improved drivability and responsiveness dramatically. Attached is a plot to show just how bad it was.
-Joe
Yea... Thats pretty typical for a FIRST robot. There is some debate where that nonlinearity comes from. See my thread: http://www.chiefdelphi.com/forums/sh...ad.php?t=31903 for some more charts.

Testing response with the wheels on the ground is probably more accurate, but we didn't have room at the time. The wheels off the ground method worked well enough.
__________________
1139 Alumni
  #10   Spotlight this post!  
Unread 18-01-2006, 19:21
CJO's Avatar
CJO CJO is offline
Emeritus Pain in the $@#$@#$@#
AKA: Christopher J. O'Connell
None #1097 (Site 3 Engineering)
Team Role: Alumni
 
Join Date: Feb 2003
Location: Latrobe (over the rainbow), CA
Posts: 217
CJO will become famous soon enoughCJO will become famous soon enough
Re: Speed Ramping with Deadzone

First of all,

A closed loop feedback system is ver usually a good idea.

Secondly,

you can also try a jog wheel, almost like on an iPod where each "click" of the wheel results in a jog. Use an optical encoder with clicks and 8-12 resolution for this.

Alternatively, create a "throttle" type lever which you can use to change between overall power range on the sticks.

Just ideas
__________________
Team 1097 -- Site 3 Engineering
~~~~~~~~~~~~~~~~~~~~
2003 Sacramento Rookie All Star
2003 Silicon Valley Rookie All Star
2004 Sacramento Engineering Inspiration Award
2004 Sacramento Visualization Award
2004 Outstanding Volunteer Award (G. Glasser)
2004 Silicon Valley Sportsmanship Award
2004 National Visualization Runner Up
2004 Cal Games Finalist
2005 Sacramento Sportsmanship Award
2005 Sacramento #1 seed
2005 Sacramento Finalist

2005 Silicon Valley Sportsmanship Award
2005 Silicon Valley #1 Seed
2005 Silicon Valley Finalist

  #11   Spotlight this post!  
Unread 19-01-2006, 22:15
Workaphobia Workaphobia is offline
Registered User
AKA: Jon
FRC #1546 (Chaos Inc.)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Long Island
Posts: 26
Workaphobia will become famous soon enough
Re: Speed Ramping with Deadzone

All I did last year was add a small deadzone - I forget if I scaled down the other values outside of it to zero or not - and implement a parabolic or sinusoidal curve instead of a linear one. The drivers liked the sinusoidal one the best, but there was a lot of room for improvement.

Try experimenting with different curves, and adding joystick buttons to increase or decrease the speed by some factor is not a bad idea. Make sure your drivers know that this process is mostly trial and error, so it's up to them to communicate which system works best for them.
  #12   Spotlight this post!  
Unread 20-01-2006, 14:04
Cuog's Avatar
Cuog Cuog is offline
Registered Linux User: 390661
AKA: Alex
FRC #0422
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2004
Location: Richmond, Virginia
Posts: 852
Cuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond repute
Send a message via AIM to Cuog
Re: Speed Ramping with Deadzone

i have written a code that allows the user to select between the different drive curves, the first is a parabolic curve that does not sacrafice top speed just allows for the driver to push a little and go slow, then there is the standard IFI default of linear then i added a 50% drop to the parabolic(the reasoning for this is that so often we over gear our robots)
__________________
KK4KQO
http://voltair.us
Too many projects, too little time.
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
Electronic Speed Controllers for DC Motor Spindle Robotics Education and Curriculum 12 23-04-2005 09:18
speed controller max speed Team 668 Programming 15 13-02-2005 14:05
PID control loops - closed loop feedback KenWittlief Technical Discussion 56 26-04-2004 21:27
Power, speed, and torque... AGH Gui Cavalcanti Technical Discussion 5 10-11-2002 19:02
Calibrating speed controllers and joysticks thedillybar Technical Discussion 4 11-02-2002 13:24


All times are GMT -5. The time now is 13:16.

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