View Single Post
  #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, 96 views)