Go to Post For Pete's sake, don't concentrate on the entry itself... concentrate on what your team is doing to make an impact in your community. - Andy Baker [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 06-02-2009, 21:56
ellisk ellisk is offline
Registered User
FRC #1540
 
Join Date: Dec 2008
Location: Vancouver, WA
Posts: 41
ellisk is on a distinguished road
Using PID for traction control (help!)

Hi all,
I'm back to working on traction control code, and it doesn't seem to work The first thing that I'm trying to get working is to get the wheels to go at the same velocity as the robot.

Here's the setup: we have an omni (trailer) wheels on each side of the robot, plus encoders on the omnis and on each transmission. This lets us see the velocity the wheels are going, and the velocity the robot (via the omnis) is going.

Here is my algorithm for maintaining the velocity indicated by the omni wheels, in pseduocode:

Code:
pidSetpoint = getOmniVelocity()  // get velocity according to encoder on omni wheel
pidCurrentPoint = getTransmissionVelocity() // get velocity according to encoder on transmission
change = calculatePID()
newMotorSpeed = currentMotorSpeed + change
I do use different PID's for the left and right (that would be a stupid bug!) However, this code seems to make the robot go at the correct speed for a while, and then it starts to get faster and start spinning in circles! Does anyone have any ideas as to why this might occur?

Secondly, my plan is to decide if we're slipping (getOmniVelocity() and getTransmissionVelocity() differ enough) and then kick in the PID correction code until the slipping is over. Does anyone have any real-world success using this (albeit simplistic) method? I'm worried that it will become jerky.
 


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
Using encoders for traction control help ellisk Programming 13 03-02-2009 19:56
PID traction Control dpeterson3 C/C++ 5 26-01-2009 21:11
Integral Window for PID Control phrontist Programming 2 16-02-2008 17:32
PID for velocity control SuperBK Programming 13 04-02-2008 23:16
Problems Using PID for Velocity Astronouth7303 Programming 6 10-02-2006 09:00


All times are GMT -5. The time now is 02:19.

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