Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   PID traction Control (http://www.chiefdelphi.com/forums/showthread.php?t=72947)

dpeterson3 01-25-2009 09:49 PM

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 ?

Daniel_LaFleur 01-25-2009 09:57 PM

Re: PID traction Control
 
Quote:

Originally Posted by dpeterson3 (Post 808000)
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%)

dtengineering 01-26-2009 12:36 AM

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

dpeterson3 01-26-2009 06:59 AM

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.

Daniel_LaFleur 01-26-2009 09:30 AM

Re: PID traction Control
 
Quote:

Originally Posted by dpeterson3 (Post 808143)
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.

dpeterson3 01-26-2009 09:11 PM

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?


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

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi