Anaheim Automation and Odrive

#1

Hello, my robotics team is working with a ODrive for our locomotion motors. We are using BLWRPG17 - Brushless Motors with Planetary Gearboxes however, we are experiencing some overshoot when we are sending it velocity commands. With these motors we have set the ODrive for Hall effect sensor mode, similar to the hoverboard example provided on the odrive website. We have looked at https://docs.odriverobotics.com/commands in the tuning commands section for guidance on fixing this issue, however, any of the changes to the pos_gain or vel_gain haven’t been able to fix the overshoot that is occurring. The motor tends to run for roughly 6 more seconds than it should regardless of the tuning parameters. We believe this is a problem with the tuning, yet can’t figure out how to fix it.

Thanks for the help,
Dean

0 Likes

#2

It looks like I posted a little prematurely because I did some more tweaking and and got them to run as expected. The Issue was that I had my vel_integrator_gain set way too low. Also I didn’t realize that pos_gain isn’t used for velocity control mode so I was changing that and not seeing anything happen.

These are my former settings:
In [5]: odrv0.axis0.controller.config
Out[5]:
vel_ramp_rate = 400.0 (float)
setpoints_in_cpr = False (bool)
vel_limit = 50000.0 (float)
vel_gain = 8.12500002212e-05 (float)
pos_gain = 150.0 (float)
vel_limit_tolerance = 1.20000004768 (float)
vel_integrator_gain = 0.000500000023749 (float)
control_mode = 2 (int)

These are the new settings that work:
In [2]: odrv0.axis0.controller.config
Out[2]:
vel_ramp_rate = 400.0 (float)
setpoints_in_cpr = False (bool)
vel_limit = 50000.0 (float)
vel_gain = 0.005(float)
pos_gain = 1.0 (float)
vel_limit_tolerance = 1.20000004768 (float)
vel_integrator_gain = 0.05 (float)
control_mode = 2 (int)

0 Likes