Go to Post Use sensors to collect data about the surrounding environment, then discard it and drive into walls. - Jared Russell [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

 
 
 
Thread Tools Rating: Thread Rating: 48 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 01-19-2010, 11:22 PM
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
Velocity-based PID with the WPILib PIDController Class

Greetings all!

We're trying to implement velocity-based PID loop using the supplied WPILib PIDController class. We've had limited success, but it's still not working quite the way we want it to.

We wrote a wrapper class called PIDEncoder which passes GetRate() from the Encoder class to PIDGet()

We then translate our joystick axes to desired wheel speeds, and pass those into our PIDController SetPoints.

The problem is that our wheel speeds never reach our desired SetPoints. When our SetPoint is 10000 counts per second for instance, our wheels only reach about 5000 counts per second.

Right off the bat, many of you will suggest we up our P constant, however increasing it any more results in our wheels oscillating very badly, especially at low speeds.

Can anyone else share some of their experience in getting velocity-based PID to work with the supplied WPILib?

At this point, I'm not sure if I can simply tune the PID constants to get it working the way we want it to, or if we need to tweak the PID Controller class itself - i.e. getting the Proportional response to be non-linear. Should we only be using the I term?

System specs:
-4 x US Digital 256 CPR Encoders (included with ToughBoxes)
-4 x 8" Wheel via 1:1 chain + sprockets to unmodified ToughBox w/ 1 CIM
-1 ToughBox/CIM combo per wheel
-P = 0.00014, I = 0, D = 0
__________________
In life, what you give, you keep. What you fail to give, you lose forever...
Reply With Quote
 


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
PIDController class (PIDSource/PIDOutput interfaces?) Jared Russell C/C++ 3 01-11-2009 09:49 AM
PID for velocity control SuperBK Programming 13 02-04-2008 11:16 PM
What constants are u using for high velocity PID Salik Syed Programming 3 02-18-2006 11:22 PM
Problems Using PID for Velocity Astronouth7303 Programming 6 02-10-2006 09:00 AM
Manual Velocity PID, anyone successful? Chris_Elston Programming 20 01-31-2006 08:51 PM


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

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