View Single Post
  #1   Spotlight this post!  
Unread 06-01-2014, 12:15
graham.robots graham.robots is offline
Registered User
FRC #4024
 
Join Date: Feb 2013
Location: Florida
Posts: 5
graham.robots is an unknown quantity at this point
Tuning PID using kSpeed Control

Hello,
Our team just recently got a working CANJaguar setup going. We are now trying to tune the PID loop to work with an encoder and speed control for the jaguar. We aren't really sure how to tune the PID loop to get a stable loop going.
Here is our initialization code:
try
{
jag1 = new CANJaguar(1, CANJaguar.ControlMode.kSpeed);
jag1.setPID(0,4,0); //What goes here?
jag1.configEncoderCodePerRev(250);
jag1.setSpeedReference(CANJaguar.SpeedReference.kE ncoder);
jag1.enableControl();
}catch(Exception e){e.printStackTrace();}

Later on, we actually run the jag:
jag1.setX(60);

When we print the speed using the getSpeed() method, we get values all over the place. How can we tune it to stabilize at the set point?
Thanks,
Team 4024
Reply With Quote