Thread: PID Help
View Single Post
  #1   Spotlight this post!  
Unread 20-01-2015, 21:32
wildaburk3160 wildaburk3160 is offline
Registered User
FRC #3160
 
Join Date: Sep 2013
Location: Grove, OK
Posts: 50
wildaburk3160 is an unknown quantity at this point
PID Help

Hey guys, our team is looking into using PID with encoders and implementing them on our drive system. I've gotten to the point where I can change the setpoint at will and get our motor to drive an encoder to a specific value, but we cannot seem to get it to do so without a considerable amount of overtravel.

In this code, Distance is the recorded distance in pulses of the encoder. We have calculated that a pulse is equal to approximately .73 degrees travel of the shaft of our motor, so anything more than a pulse off is not acceptable.

http://i.imgur.com/zc2iMgA.jpg

In this code, the left and right trigger buttons are no longer being used. The controller axis is being used to set the setpoint. Since the maximum magnitude of our process variable (Distance) is 124, I have taken the axis value and multiplied it by 124, so a value of 1 on our axis will set the setpoint of our PID at 124.

Here is a picture of our gains, outputs, etc:

http://i.imgur.com/PKx6P7i.jpg

These values are the results of me trying to tune them is such a way that our motor can get to a specified value with a high amount of precision without overshooting, and without taking a long amount of time to adjust the value to an acceptable range.

If anybody has successfully run PID.vi with an encoder with high precision, could you please look and see what I am missing here? And if you have had this type of issue, could you tell me how you resolved it?

Thanks,
William
Reply With Quote