I often get the error "CURRENT_LIMIT_VIOLATION"

Hi,there.
When I run DUAL SHAFT MOTOR - D5312S 330KV with speed control using ODrive v3.6, I often get the error “CURRENT_LIMIT_VIOLATION”. I adjusted the speed gain by referring to “turning” in the ODrive documentation and set “current_control_bandwidth” to 2000. However, the error still occurs. If I lower the gain, the error does not occur, but the torque is small.
Is there any way to eliminate the error other than lowering the gain? Is there a more appropriate parameter setting?
I’m looking forward to your reply.

By the way, the following are the values I set.

“vel_gain”: 0.25,
“vel_integrator_gain”: 1.0,
“current_control_bandwidth”: 2000.0,
“current_lim_margin”: 15.0,
“current_lim”: 50.0,
“requested_current_range”: 70.0,

Try increasing current_lim_margin until it doesn’t happen anymore.

1 Like

Sometimes too high of an acceleration can cause issues. This means a lower gain helps, but you may instead want to either add load or use one of the other input_modes that limit acceleration (such as vel_ramp mode)