|
Dealing with low resolution data for speed PID
I wrote a speed PID controller for the drivetrain of a Vex robot. Feedback comes from an encoder mounted to the motor. The PID controller works pretty well at holding speed. However, the encoder has fairly low resolution and the speed measurement/ PID control loops run at a high frequency of 50Hz. Therefore, the resolution of speed measurements is limited to about 2 in / s. I'm wondering if any techniques, such as applying a moving average to the inputs to the PID controller, could improve the accuracy of the PID controller without decreasing measurement frequency. Another possibility, as the PID controller and the speed measurement are separate tasks, is to run speed measurements at a lower frequency than the PID. This approach could also cause problems, as feeding older data to the PID controller would probably compromise its accuracy.
Any recommendations or ideas?
Here's a graph of velocity vs time that shows the problem:

__________________
2012 Utah Regional Rookie All-Star
2013 Phoenix Regional Judge's Award for "design process and prototyping"
2014 Hub City Regional Quality Award, Arizona Regional Excellence in Engineering Award
2015 Arizona East Regional Creativity Award, Winner
2016 Arizona North Regional Finalist, Arizona West Excellence in Engineering Award, Finalist
|