Tuning a PIDF speed controller given that PID was tuned using Ziegler Nichols's Method

I want to code a speed controller for some game I am working on and I have learned that feedforward gained loops are a lot better for velocity-based environments, which mine is. My issue is I have no idea how to tune for kF, I found some ChiefDelphi (Devforum but for robotics) but they were for actual motors, they ended up getting this magical formula of (PercentOutput * 1023) / velocityInEncoderTicksPer100Ms and I have no idea how to replicate that to something like Roblox physics objects. I have already tuned kP, kI, and kD using the Ziegler Nichols method but it didn’t include a heuristic method for calculating kF.

Set all to 0 and increase kF until the velocity for your motors can reach your desired velocity, then do standard PID tuning.

3 Likes