Speed and position closed-loop drive modes
warning
Due to memory constraints, extended modes are not always available. If you do not see folder /driver/pid_speed
or /driver/pid_position
, the extended modes are not present in your firmware.
If one of these bits is specified in the requested drive mode, the PID loop is activated. We call these "extended" modes.
Bit | Dec | Name | Reference value |
---|---|---|---|
4 | 16 | Speed loop | rref |
5 | 32 | Position loop | pref |
examples
Drive mode = 17: The speed PID loop is active. The motor is driven in voltage mode (17 - 16 = 1)
Drive mode = 34: The position PID loop is active. The motor is driven in current mode (34 - 32 = 2)
Parameters
For /driver/pid_speed
and /driver/pid_pos
: both folders contain the settings for the corresponding PID regulator.
Parameter | Description |
---|---|
P | Proportional term for the PID regulator |
I | Integral term for the PID regulator |
D | Derivative term for the PID regulator |
Td | The time constant for the input filter for the D term. The D term is sensitive to noise, using the filter can help to reduce the noise. |
tip
The Td
parameter is LPF (low-pass filter) time constant. More about it.