|
Re: Update Rate of PID Loops
You are correct that a faster update rate (especially with our sloppy mechanical systems) won't make too much of a difference. (At least in the present time, or 'P' portion of the calcs)
The real issue is the PID loop needs to be run at a constant interval, as you are taking the integral and differential of a signal. You'd like to shrink delta T to a very small value for the D, and really want that value to be constant. You could calculate your real differential by measuring dT, but why bother when you have the horsepower to do it in constant time in another thread?
All WPILib is doing for PID is making it easy for an end user to fork off a thread and repeatedly call a function at a constant rate. (They also throw in the math for free)
|