Go to Post you might want to consider the Edu-Robo-Whatevertheheckitscalled RC - Matt Krass [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 21-03-2009, 00:47
windell747 windell747 is offline
Registered User
FRC #2477
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2001
Location: Hawaii
Posts: 158
windell747 will become famous soon enoughwindell747 will become famous soon enough
May we have some traction control help?

We are currently trying to get our traction control to work. We based our traction control algorithm something like what we think team 121 is doing. We calculate the slip ratio and send that to the PID controller. The set point for us is 0 percent slippage. The values from the PID controllers are then added to the driver's joystick command to compensate for slippage.

So thats the algorithm. Here are some questions

1) How do you deal with the infinite slip ratio case as the driven wheel velocity goes to zero?
2) Is adding the values from the PID output to the motor command the best way to do this?
3) We would really like to have a simple yet effective traction control algorithm. Any suggestions on how we can improve?

I attached a copy of our code for reference.
Attached Files
File Type: pdf traction_ctrl.pdf (135.2 KB, 148 views)
  #2   Spotlight this post!  
Unread 21-03-2009, 08:28
martin417's Avatar
martin417 martin417 is offline
Opinionated old goat
AKA: Martin Wilson
no team
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2008
Location: Buford, GA
Posts: 720
martin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond repute
Re: May we have some traction control help?

We tried several different methods to calculate slip ratio, including the one I think you are using. What we found worked best was:

[(drive_wheel_rate-follower_wheel_rate)/Max_rate]

This algorithm always gives you a real number between -1 and 1.
__________________
Former Mentor Team 1771
Former mentor Team 4509
  #3   Spotlight this post!  
Unread 21-03-2009, 15: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,532
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: May we have some traction control help?

Simply add one to your denominator. It won't effect your calculations, and removes the possibility of the NAN divide by zero case.
  #4   Spotlight this post!  
Unread 21-03-2009, 15:05
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 7,007
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: May we have some traction control help?

A slip value of zero is not optimal. We have found experimentally that about a 20% slip rate gives the best acceleration. You may want to consider a higher slip rate.
__________________

I am N2IRZ - What's your callsign?
  #5   Spotlight this post!  
Unread 21-03-2009, 16:57
windell747 windell747 is offline
Registered User
FRC #2477
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2001
Location: Hawaii
Posts: 158
windell747 will become famous soon enoughwindell747 will become famous soon enough
Re: May we have some traction control help?

Thanks for your responses! We will try these suggestions and get back to you guys!
  #6   Spotlight this post!  
Unread 23-03-2009, 00:14
windell747 windell747 is offline
Registered User
FRC #2477
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2001
Location: Hawaii
Posts: 158
windell747 will become famous soon enoughwindell747 will become famous soon enough
Re: May we have some traction control help?

Here is the update that I promised. We were able to get our traction control to work for the most part. I will summarize our method and will then outline some problems and ask questions.

Here is a summary for our traction control:
-calculate the slip ratio (driven wheel velocity-follower wheel velocity)/max_velocity. max_velocity=100in/s (for us).
-submit this slip ratio to the process variable of a PID controller.
-P=3 (for us), I=0,D=0
-add the PID output value to the current driver command to correct for slip if needed.

note: the max_velocity used in the slip ratio is defined as the maximum linear velocity of the wheels when the robot is off the ground.

Problems:
1)I am using the slip ratio of 0% instead of the optimum 20%. With my algorithm, there will be always be an error if the robot isn't moving because slip ratio would be zero in that case.
2)when I floor the joystick forward, traction control works pretty well. Then if I let the joystick go and fly back to center, I get some jerking in the driven wheels. If i were to bring the joystick back slowly, the jerking doesn't occur.

What am I asking?:
1) I'm not using sending a variable gain to the PID controller as discussed by team 121. The variable gain would be calculated as K*slip ratio. Is this a good idea? This method would seem to allow me to use a slip ratio setpoint of 20% and not cause an error greater than 0 when the robot isn't moving.
2) Should I filter my slip ratio and motor commands somehow? If so should I use a lowpass filter or something similar? Or a rate limiter? I would like to remain simple and effective.
3)With my current algorithm, if I floor it forward and then floor it backwards, the wheels lockup. This makes sense (PID limits: -1 to 1 and full reverse = -1 command = motor command of 0). I would like the wheels to speed up in the direction the bot is moving and pull the robots speed down. I'm thinking that the variable gain PID method would do this for me. What do you think?

I have a pdf of my code attached if any of you want to dive into the code.
Attached Files
File Type: pdf traction_control.pdf (180.1 KB, 97 views)
  #7   Spotlight this post!  
Unread 23-03-2009, 10:39
Doug Leppard's Avatar
Doug Leppard Doug Leppard is offline
Registered User
FRC #1902 (Exploding Bacon)
Team Role: Engineer
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Orlando
Posts: 435
Doug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond repute
Send a message via AIM to Doug Leppard
Re: May we have some traction control help?

Our drivers are happy with our traction control. We have the driven wheel encoder and a vex Omni wheel on the floor called the undriven wheel.

We found 20% slippage is the best. Our moving algorithm follows the joystick either increasing power or decreasing power according to the joystick position and wheel slippage.

But you have the 0 or little speed situation, for instance you may be in a pushing war and going almost 0.

For that we don’t do a ratio of slippage because it does not make sense. But we allow a certain number of rpms of the wheel which is slippage at a standstill.

It is very simple.

BTW we put a toggle switch on the driver’s station that allows the drivers to turn off and on the traction control; sometimes the drivers use the large amount of slippage to their advantage especially in turning.
__________________
Doug Leppard
  #8   Spotlight this post!  
Unread 23-03-2009, 12:59
marccenter's Avatar
marccenter marccenter is offline
Registered User
FRC #3548 (RoboRavens2)
Team Role: Coach
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Royal Oak
Posts: 406
marccenter has a spectacular aura aboutmarccenter has a spectacular aura about
Smile Re: May we have some traction control help?

[quote=windell747;839623] Problems:

2)when I floor the joystick forward, traction control works pretty well. Then if I let the joystick go and fly back to center, I get some jerking in the driven wheels. If i were to bring the joystick back slowly, the jerking doesn't occur.

What am I asking?:

2) Should I filter my slip ratio and motor commands somehow? If so should I use a lowpass filter or something similar? Or a rate limiter? I would like to remain simple and effective.
QUOTE]

Absolutely, removing those uncontrolled large transients will help solve a multiple of problems on motor commands. I typically filter the joystick command input (which filters the motor command as it propagates its way through the control algorithms). Even a rate limiter with a 25 percent change per loop or time event can make a big difference.

My vote is to go with a rate limiter. I think it is simpler to implement and more intutitive to understand when explaining to high school students. We use rate limiters in Matlab/Simulink at work all day long and I believe a standard Simulink block has been specifically created for that feature in the Control System Library.

BTW, Does Labview have such a block already created? If not, here is one recommendation for FIRST to add next year - a standard blockset of commonly used control functions (Table Lookups, Rate Limiter).
__________________
Marc Center
FIRST FRC Mentor/Coach - Team 3548 Royal Oak RoboRavens#2 - on Sabbatical 2017 season
marc.center@gmail.com
Mobile: 248-255-7377

Last edited by marccenter : 23-03-2009 at 14:19. Reason: Screwed up Quote function
  #9   Spotlight this post!  
Unread 23-03-2009, 13:11
marccenter's Avatar
marccenter marccenter is offline
Registered User
FRC #3548 (RoboRavens2)
Team Role: Coach
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Royal Oak
Posts: 406
marccenter has a spectacular aura aboutmarccenter has a spectacular aura about
Smile Re: May we have some traction control help?

Quote:
Originally Posted by Doug Leppard View Post
Our drivers are happy with our traction control. We have the driven wheel encoder and a vex Omni wheel on the floor called the undriven wheel.

We found 20% slippage is the best. Our moving algorithm follows the joystick either increasing power or decreasing power according to the joystick position and wheel slippage.

But you have the 0 or little speed situation, for instance you may be in a pushing war and going almost 0.

For that we don’t do a ratio of slippage because it does not make sense. But we allow a certain number of rpms of the wheel which is slippage at a standstill.

It is very simple.

BTW we put a toggle switch on the driver’s station that allows the drivers to turn off and on the traction control; sometimes the drivers use the large amount of slippage to their advantage especially in turning.
Doug,
In order of implementing a traction control algorithm I have proposed for a FRC conference presentation paper with VEX and Easy-C Pro implementation: 1) rate-limiting joystick command input to motor command output - solves a multitude of problems, 2) control maximum motor speed command as a function of undriven wheel speed (non-feedback based slip control) Joystick position can be independent of the maximum motor speed command but you have indicated that you did
add joystick dependence. Can you indicate why? 3) feedback based slip control (driven wheel speed based to undriven
wheel speed)
__________________
Marc Center
FIRST FRC Mentor/Coach - Team 3548 Royal Oak RoboRavens#2 - on Sabbatical 2017 season
marc.center@gmail.com
Mobile: 248-255-7377
  #10   Spotlight this post!  
Unread 23-03-2009, 23:27
windell747 windell747 is offline
Registered User
FRC #2477
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2001
Location: Hawaii
Posts: 158
windell747 will become famous soon enoughwindell747 will become famous soon enough
Re: May we have some traction control help?

Yes, labview already has a block called the PID output rate limiter. It can be found in Addons->PID Control->PID. BTW, what does the EGU/min input mean physically. I know the greater it is the faster the output response, but I want to calculate what this means to the rate limiter so that I can get a ballpark without doing a lot of testing.

simulink rocks!
  #11   Spotlight this post!  
Unread 24-03-2009, 00:53
Doug Leppard's Avatar
Doug Leppard Doug Leppard is offline
Registered User
FRC #1902 (Exploding Bacon)
Team Role: Engineer
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Orlando
Posts: 435
Doug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond repute
Send a message via AIM to Doug Leppard
Re: May we have some traction control help?

Quote:
Originally Posted by marccenter View Post
Doug,
In order of implementing a traction control algorithm I have proposed for a FRC conference presentation paper with VEX and Easy-C Pro implementation: 1) rate-limiting joystick command input to motor command output - solves a multitude of problems, 2) control maximum motor speed command as a function of undriven wheel speed (non-feedback based slip control) Joystick position can be independent of the maximum motor speed command but you have indicated that you did
add joystick dependence. Can you indicate why? 3) feedback based slip control (driven wheel speed based to undriven
wheel speed)

Not sure if I follow what you have asked, so I may not be answering your question. Case below is when the robot is moving.

On the joystick. It would seek the power setting of the joystick. If the joystick was at 3/4 power then the power would increase (or decrease) to 3/4 power but without slipping more than 20%. So if the driver moves the power from 0 to 3/4 power then it will keep increase power until it reaches 3/4 power, but it will be much less power to the wheels until it reaches that power.

If you are going at 3/4 forward power and shove the robot into reverse, it will decrease power without more than 20% slippage so it will not go into full skid.

I hope this makes sense.
__________________
Doug Leppard
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
Traction Control- Help!!!! naruto137 NI LabVIEW 0 21-02-2009 13:21
Using PID for traction control (help!) ellisk Programming 2 07-02-2009 14:05
Using encoders for traction control help ellisk Programming 13 03-02-2009 19:56
Something some of you may be interested in... Vashts6583 Chit-Chat 2 17-08-2006 11:30
can i have some help with quadratic equations CmptrGk Math and Science 9 13-12-2004 21:33


All times are GMT -5. The time now is 15:29.

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