View Single Post
  #8   Spotlight this post!  
Unread 19-03-2009, 08:16
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: Traction control: How do I tune a PID controller with variable gain?

Thank you so much for your responses! Here is more information of our setup.

We are using 4 encoders: 2 on the gearboxes and another 2 on follower wheels. We are also using Labview and its PID libraries.

My approach is to allow a certain amount of slip upon launch by letting the driver command the motors directly, then if the slip ratio goes higher than a specific value the traction control will activate and motor commands will come from the traction control part of the code to bring the slip ratio down under that margin. Once it is under that margin, then the driver can control the motors directly again.

When the robot is at a stop (gearbox velocity=slip ratio=0) the traction control is forced to be off.

Anyways, how does this approach sound? Am I on the right track? I would like to keep my code as simple as possible so that I can arrive at a traction control solution the fastest.

I attached a screenshot of my code.

FYI: PS=port side, SB=starboard. The traction control enable controls a select with the joystick feed in the false case and the traction control feed in the true case.
Attached Thumbnails
Click image for larger version

Name:	traction_control code.jpg
Views:	134
Size:	69.5 KB
ID:	7705