|
Re: Thread scheduler for PID period control ?
I am not sure why but the autogenerated code from RobotBuilder does not include the feed forward gain, Kf, and the loop period, so they default to 0 and 50ms.
Here is a code snippet:
public Launch() {
super("Launch", Kp, Ki, Kd, Kf, 0.01);
Note that we had 0.005 as the period at first and it was acting squirrely. I think we were having the PID loop take too much of the CPU time. When we backed off to 10ms, life was good.
YMMV.
Joe J.
__________________
Joseph M. Johnson, Ph.D., P.E.
Mentor
Team #88, TJ2
|