api/builtins/Control: add feed_forward gain

This can be useful for motors with high internal static friction.
This commit is contained in:
Laurens Valk
2020-02-20 16:34:25 +01:00
parent a426d412bb
commit 854760feb6
+5 -1
View File
@@ -53,7 +53,7 @@ class Control():
"""
pass
def pid(self, kp, ki, kd, integral_range, integral_rate):
def pid(self, kp, ki, kd, integral_range, integral_rate, feed_forward):
"""Get or set the PID values for position and speed control.
If no arguments are given, this will return the current values.
@@ -69,6 +69,10 @@ class Control():
are accumulated.
integral_rate (:ref:`speed` or :ref:`linspeed`): Maximum rate at
which the error integral is allowed to grow.
feed_forward (:ref:`percentage`):
This adds a feed forward signal to the PID feedback signal, in
the direction of the speed reference. This value is expressed
as a percentage of the absolute maximum duty cycle.
"""
pass