Add info about current_control_bandwidth

This commit is contained in:
Paul Guenette
2020-08-13 21:48:41 -04:00
committed by GitHub
parent 5b8b7359ce
commit 58bc55d835
+2
View File
@@ -29,6 +29,8 @@ voltage_integral += current_error * current_integrator_gain
voltage_cmd = current_error * current_gain + voltage_integral (+ voltage_feedforward when we have motor model)
```
`current_gain` and `current_integrator_gain` are automatically set according to the `motor.config.current_control_bandwidth` and the measured `phase_resistance` and `phase_inductance` to produce (theoretically) a critically-damped controller at the given bandwidth (in rad/s).
For more detail refer to [controller.cpp](https://github.com/madcowswe/ODrive/blob/master/Firmware/MotorControl/controller.cpp#L86).
## Tuning
Tuning the motor controller is an essential step to unlock the full potential of the ODrive. Tuning allows for the controller to quickly respond to disturbances or changes in the system (such as an external force being applied or a change in the setpoint) without becoming unstable. Correctly setting the three tuning parameters (called gains) ensures that ODrive can control your motors in the most effective way possible. The three values are: