|
Re: PID Timing
Two solutions:
-Calculate DT with a tick count, shift register/feedback node, and subtract.
-Use a timed RT loop to guarantee time. You can not care about the dt because it is constant. Time in PID will then be counted in iterations instead of milliseconds, which is fine.
I am currently doing the second. It seems to be working well so far.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor
"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
|