PDFL Controller or PDL
What are PDFL controllers good for?
PDFL controllers are designed to be more precise and accurate than a traditional PID controller. The feedforward term helps to account for friction in the robot. In a pathing library they can grant extreme accuracy to a robot.
Overview
A PDFL controller is a controller concept developed by FTC Wolfpack Machina (18438). This controller contains 4 terms:
- Proportional: Multiplied by the current positional error in inches. This term is responsible for the majority of the robot’s movement.
- Derivative: Multiplied by the change in error since the last update. Helps to reduce oscillation.
- Feedforward: Multiplied by the target velocity in inches per second. This term helps to account for friction and inertia.
- Lower-Limit: A lower power limit threshold that helps to increase accuracy. This term helps the control algorithm what the minimum power is to move the robot.
Tuning a PDFL controller
When tuning a PDFL controller manually, it’s generally good advice to begin with the feedforward term. start at maybe 0.0001 and increase it gradually until your robot is barely moving but is overcoming static friction.
After you tune the F term, you can move on to the P term. The P term does most of the heavy lifting in the controller, and generally when tuning it, you want you robot to go just below what your target position is, so that it doesn’t overshoot.
If your robot is oscillating around the target position, you can try adding some D to reduce that oscillation. The D term is generally very small, and should be tuned very carefully, as too much of the D term can cause the robot to be slow and it can also cause oscillation if you make it too big.
Lastly, you can add some lower limit to increase the accuracy of the controller. This term is generally best tuned through trial and error, and tested as an average over both fully charged and not completely charged batteries for best results.
What role do PDFL controllers play in Apex Pathing?
Apex Pathing uses a variant of PDFL controllers, called a PDL controller, which removes the feedforward term. We have plans to support other types in the future. Our library uses three PDFL controllers for path following (at least on a mecanum drive): one for the translation direction of the robot, one for the strafing direction, and one for the heading of the robot.