Thread: PID Questions
View Single Post
  #2   Spotlight this post!  
Unread 16-12-2016, 23:12
phurley67 phurley67 is online now
Programming Mentor
FRC #0862 (Lightning Robotics)
Team Role: Mentor
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Michigan
Posts: 65
phurley67 is an unknown quantity at this point
Re: PID Questions

Quote:
Originally Posted by StrMNX View Post
1. How would you handle an output to multiple motors?
For CAN Talons you can put one or more into "follow mode". That said, we never bothered with a y-cable in two motor configuration either. We would just set both motors in code to the same value, it was never a problem.

Quote:
Originally Posted by StrMNX View Post
2. I've studied up on the methods of tuning (Ziegler-Nichols) and i'm aware of how to properly tune the loop, but what are your starting value for the constants? like people say "increase P Gain until it oscillates", but what is a good starting point for the P Gain, I Gain, and D Gain?
Thank you for your time
Set I and D to zero. For your initial P you can just guess or do a little math. Based on the 2/3 motor question I am assuming this is a drive train, and I am going to assume you going for a distance PID. Using your max error (which is going to be the longest distance you will be going), a reasonable swag would be 0.7 / that distance, but if 0.7 of your max accel is too strong, set it lower. Feel free to go up and down in pretty large increments. I always test first on blocks and generally with a max power limit set to ~.3 just as a sanity check (are the wheels going the right direction, the same direction, etc).
Reply With Quote