Thread: PID Help
View Single Post
  #18   Spotlight this post!  
Unread 27-01-2015, 21:06
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
Re: PID Help

Okay, so I've gotten to the point, with some tuning, that I can get the motor to get to a set point in a good amount of time, but with a maximum error of six, sometimes eight, pulses. With one pulse ~ .73 degrees, this could lead to the wheel being almost six degrees off center.

Since we are planning to run four motors, each with their own encoder and PID loop, this could result in motors possibly being twelve degrees off collectively, and working against each other, rendering a swerve system useless.

My mentor seems to think that the reason the motor can't get to the setpoint in either a reasonable amount of time or a reasonable range (these two seem to be mutually exclusive) because the PID calculates the output out to a very long decimal, but the process variable (encoder pulses) is only giving it integers to work this.

I disagree.

I think that as someone has earlier replied, it is a resolution problem. With .73 degrees per pulse, it gives us very limited margin for error. I believe that this problem could be solved by the use of a potentiometer, a much more precise analog sensor, rather than an encoder, a digital sensor.

So, should we go ahead and try a potentiometer, or am I doing something incorrectly in the tuning of the PID?

Thank you for your continued input.
Reply With Quote