View Single Post
  #1   Spotlight this post!  
Unread 17-01-2011, 09:34
JewishDan18's Avatar
JewishDan18 JewishDan18 is offline
Registered User
FRC #1700
Team Role: Engineer
 
Join Date: Feb 2009
Rookie Year: 2007
Location: Sunnyvale, CA
Posts: 185
JewishDan18 is a splendid one to beholdJewishDan18 is a splendid one to beholdJewishDan18 is a splendid one to beholdJewishDan18 is a splendid one to beholdJewishDan18 is a splendid one to beholdJewishDan18 is a splendid one to behold
PID Speed Control

I was looking to use encoders to control the speed on the motors via a PID loop this year. I've done a lot of searching, and have not found the answers I'm looking for. I have no experience using PID loops, so bear with me for a moment.

Using the WPILib PIDController, I made a wrapper for the encoder to get speed, but I'm a little confused about the output. If I use the Jaguar for the output, it seems to me that as the robot approaches my desired speed, the motors will slow down (since error will approach zero). To me, it seems that the output of the PIDController should be used as the acceleration of the motor. Is this what is commonly done? It seems to me that the Jaguars are capable of an extremely high acceleration rate, which will lead to high levels of oscillation. Does one combat this by setting the constants to be quite small? Or is my premise of using acceleration fundamentally flawed? I'd like to get input from someone who has done this before, as there is no one on my team who has.

Thanks in advance,
Dan
Reply With Quote