Go to Post One of these years, the game piece will be an actual red herring. - Taylor [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 28-02-2013, 17:27
jwhite jwhite is offline
Registered User
FRC #2823
Team Role: Mentor
 
Join Date: Feb 2013
Rookie Year: 2013
Location: Saint Paul, MN
Posts: 69
jwhite is an unknown quantity at this point
PIDController (.cpp) issues and concerns

I thought I'd report some troubles we found with the pid controller code while we're waiting for our regional.

We wanted to use the PIDController class to control a Jaguar for rate control. (And yes, if we'd done CAN protocol, we wouldn't need this, but we're not that cool a team...yet).

But it seems to me that the current code really does not work well for rate control.
The Screen Steps Live documentation for using the PIDController to govern a rate:
http://wpilib.screenstepslive.com/s/...rs-pid-control
seems to suggest that the 'feed forward' term will help. But kF is just a constant offset. We were not able to get any kind of PID tuning that was workable just using that.

We ended up wrapping the Jaguar class with another class that implemented PIDWrite as a delta, not an absolute, and that gave us reasonable results, and also seemed to be a more theoretically correct implementation. (My PID experts insist that the goal of PID code should be to drive error to 0, not to have an I term that provides a perpetual error correction).

Also, the OnTarget() method consistently crashed for us; my guess is that the use of GetError(), and the doubled critical sections cause that crash.

Hope this helps someone else.

Cheers,

Jeremy
 


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


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

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