|
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.
|