ODrive S1 Current Limit Violation Error

Hey ODrive Community,

I have been having a bit of trouble recently with running into the Current_Limit_Violation error with my setup. This error was much more noticeable before I tuned the PI loop for velocity control. The error now seems to only show up at higher speeds, or when the rover travels over rocky terrain.

The current soft max is set to 40 A continuous. For current hard max, I initially had it at 50 A, which would throw current limit violation errors intermittently. To test, I ended up setting this to 80 A, and the error would still persist intermittently.

I have also majorly reduced the velocity ramp to see if this could fix the issue, but it seems to have not.

I have a feeling that it may be something to do with needing to relax the PI settings a bit, so I will be testing these settings as a next step.

Looking for advice regarding this issue. Thank you in advance!

Current setup:

  • Four wheeled, 50 kg rover, about 1.2 m^3 in scale.
  • Running one Odrive S1 per wheel at 24 V
  • Have a 2 Ohm brake resistor on each ODrive.
  • Using Neo v1.1 motors.
  • Using Neo v1.1 motor built in hall sensor connected to the ODrive.
  • Running the setup in VEL_RAMP mode.
  • Firmware 0.6.8 on all ODrives.

Here are my settings:

Also a neat photo of the design for y’all:

The rover arm also uses ODrive s1, and has not had any issues.

Thanks for the picture and the detailed configuration and description of the issue!

A few questions:

  • Could you share the odrv0.axis0.config.motor.phase_inductance and odrv0.axis0.config.motor.phase_resistance?
  • Could you share the odrv0.axis0.config.motor.current_control_bandwidth?
  • Can you share the exact Current_Limit_Violation you experience? A screenshot or copy-paste of the output of dump_errors(odrv0) when this happens would be useful.

Hey sorry for the late response,

Here are the requested configs:

ODrive 1
odrv0.axis0.config.motor.phase_inductance = 8.781791621004231e-06
odrv0.axis0.config.motor.phase_resistance = 0.02235436998307705
odrv0.axis0.config.motor.current_control_bandwidth = 1000

ODrive 2
odrv0.axis0.config.motor.phase_inductance = 7.948866368678864e-06
odrv0.axis0.config.motor.phase_resistance = 0.022962208837270737
odrv0.axis0.config.motor.current_control_bandwidth = 1000

ODrive 3
odrv0.axis0.config.motor.phase_inductance = 9.48388424149016e-06
odrv0.axis0.config.motor.phase_resistance = 0.0224311463534832
odrv0.axis0.config.motor.current_control_bandwidth = 1000

ODrive 4
odrv0.axis0.config.motor.phase_inductance = 8.594868631917052e-06
odrv0.axis0.config.motor.phase_resistance = 0.026493245735764503
odrv0.axis0.config.motor.current_control_bandwidth = 1000

The current limit violation looks like this:

Since the last time I posted, I’ve tweaked the PID loop a bit. I noticed on the Odrive website GUI graph that current would spike to 15 A from only a bit of torque applied by hand. I tweaked the PID loop and got it to only spike to 2 A with this same torque applied.

At higher speeds, the ODrives do not produce the current limit violation error anymore, however, when climbing rocky terrain it still produces the error.

Thanks for the info! Hmm, since you’re using hall sensors, this may be tricky. I’d frankly try cranking current_hard_max as high as it’ll go (maybe try 120A)? The issue here is that the rapid acceleration/deceleration of the motor combined with the low resolution of the hall sensors is causing the internal current controller to over/undershoot. You could try also increasing the encoder_bandwidth to 250 or so.