Go to Post ... poets, novelists, songwriters, these people are word engineers. - MissInformation [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 19 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 25-01-2009, 21:49
dpeterson3 dpeterson3 is offline
Registered User
FRC #1178 (DURT)
Team Role: Alumni
 
Join Date: Aug 2008
Rookie Year: 2008
Location: St. Louis
Posts: 158
dpeterson3 is a jewel in the roughdpeterson3 is a jewel in the roughdpeterson3 is a jewel in the roughdpeterson3 is a jewel in the rough
PID traction Control

One of our mentors mentioned doing PID loops for traction control. I read the theory behind it, and understand most of it. I am just not sure where to get SetPoint values and where to take sensor readings, especially considering they say you should programatically get the set point value. I want to code in C++ (eveyone else wants to use LabView), so I need a little help with this. Do I use an accelerometer or encoders, or both and How do I get my setpoint ?
Reply With Quote
  #2   Spotlight this post!  
Unread 25-01-2009, 21:57
Daniel_LaFleur's Avatar
Daniel_LaFleur Daniel_LaFleur is online now
Mad Scientist
AKA: Me
FRC #2040 (DERT)
Team Role: Engineer
 
Join Date: Apr 2005
Rookie Year: 2003
Location: Peoria, IL
Posts: 1,940
Daniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond repute
Send a message via MSN to Daniel_LaFleur
Re: PID traction Control

Quote:
Originally Posted by dpeterson3 View Post
One of our mentors mentioned doing PID loops for traction control. I read the theory behind it, and understand most of it. I am just not sure where to get SetPoint values and where to take sensor readings, especially considering they say you should programatically get the set point value. I want to code in C++ (eveyone else wants to use LabView), so I need a little help with this. Do I use an accelerometer or encoders, or both and How do I get my setpoint ?
You will need to be able to read both the wheel speed and the actual speed of the robot.

I would do this by putting an encoder on the wheel (to tell wheel speed) and a follower wheel with encoder (Watch to make sure it does not provide too much traction).

From there you can find the delta speed (differental between the 2 speeds ... usually called error) and then adjust the power to the motors until both are spinning at the same rate (or whithin x%)
__________________
___________________
"We are not now that strength which in old days moved earth and heaven; that which we are, we are;
One equal temper of heroic hearts, Made weak by time and fate, but strong in will
To strive, to seek, to find, and not to yield. "
- Tennyson, Ulysses
Reply With Quote
  #3   Spotlight this post!  
Unread 26-01-2009, 00:36
dtengineering's Avatar
dtengineering dtengineering is offline
Teaching Teachers to Teach Tech
AKA: Jason Brett
no team (British Columbia FRC teams)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Vancouver, BC
Posts: 1,814
dtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond repute
Re: PID traction Control

A simpler, but less precise way to do this is to figure out what the maximum possible accelleration of your robot is (theory and experimentation), then tune the controls so that your wheel speed does not accellerate faster than this. In this set up you only need one encoder from each side of the drivetrain... but at the cost of getting real-time feedback from non-driven wheels.

You might want to try graphing the wheel speed of your robot (again, you'll need encoders) with a computer attached to the driver station and see if there are sudden spikes in wheel speed to determin when slipping occurrs.

Mind you, we have yet to experiment with this... we're still waiting for our missing KoP parts to arrive and they are kind of crucial to this task. (We do, however, know they are on the way.)

Jason
Reply With Quote
  #4   Spotlight this post!  
Unread 26-01-2009, 06:59
dpeterson3 dpeterson3 is offline
Registered User
FRC #1178 (DURT)
Team Role: Alumni
 
Join Date: Aug 2008
Rookie Year: 2008
Location: St. Louis
Posts: 158
dpeterson3 is a jewel in the roughdpeterson3 is a jewel in the roughdpeterson3 is a jewel in the roughdpeterson3 is a jewel in the rough
Re: PID traction Control

Thanks. I was informed (in so many words) that we are not going with Daniel_LaFleur's idea. I wrote the code for that and asked if someone could check it over. I was then refered to a link about PID in LabView. They don't just want to keep the wheels spinning at the same rate. They also want this to act as an acceleration curve, which is why I was referd to the PID control.
Reply With Quote
  #5   Spotlight this post!  
Unread 26-01-2009, 09:30
Daniel_LaFleur's Avatar
Daniel_LaFleur Daniel_LaFleur is online now
Mad Scientist
AKA: Me
FRC #2040 (DERT)
Team Role: Engineer
 
Join Date: Apr 2005
Rookie Year: 2003
Location: Peoria, IL
Posts: 1,940
Daniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond repute
Send a message via MSN to Daniel_LaFleur
Re: PID traction Control

Quote:
Originally Posted by dpeterson3 View Post
Thanks. I was informed (in so many words) that we are not going with Daniel_LaFleur's idea. I wrote the code for that and asked if someone could check it over. I was then refered to a link about PID in LabView. They don't just want to keep the wheels spinning at the same rate. They also want this to act as an acceleration curve, which is why I was referd to the PID control.
PID is fine for an acceleration curve (and I highly reccommend it), but will not tell you if your wheels are slipping. This will happen when you get into a pushing match.
__________________
___________________
"We are not now that strength which in old days moved earth and heaven; that which we are, we are;
One equal temper of heroic hearts, Made weak by time and fate, but strong in will
To strive, to seek, to find, and not to yield. "
- Tennyson, Ulysses
Reply With Quote
  #6   Spotlight this post!  
Unread 26-01-2009, 21:11
dpeterson3 dpeterson3 is offline
Registered User
FRC #1178 (DURT)
Team Role: Alumni
 
Join Date: Aug 2008
Rookie Year: 2008
Location: St. Louis
Posts: 158
dpeterson3 is a jewel in the roughdpeterson3 is a jewel in the roughdpeterson3 is a jewel in the roughdpeterson3 is a jewel in the rough
Re: PID traction Control

I noticed today that WPI has PID control built in. I didn't see that before. I makes more sense now on how to use it. Thanks. Would Q_score logic help any with figuring out the best reaction to slipping, especially if another bot was pushing during autonomus?
Reply With Quote
Reply


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
PID Control John Gutmann Programming 12 15-04-2007 18:52
PID Control Chris Bright Programming 9 26-03-2005 19:44
(Experimental) PID Control System jdong Programming 14 18-06-2004 15:55
Traction Control Algorithm Mr. Lim Programming 3 20-01-2004 14:26
PID Control Loops ttedrow Programming 7 05-12-2002 12:03


All times are GMT -5. The time now is 10:06.

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