My application for Odrive involves using a motor with hall sensors as a torque source. Electric torque is always in the same direction but motion of the axis will be bidirectional, two quadrant. I got that working in a basic way.

When I apply an external torque against the electric torque, accelerating the axis, sometimes Odrive will error out with an ERROR_CURRENT_UNSTABLE.

I see this when I’m running with a bench supply and with a battery (48V). I do have the braking resistor that was included with the kit connected across AUX. I haven’t done anything to configure that though.

Does anybody have an idea of what this error means and what I should be looking for or adjusting?


The error means that the measured current exceeds the current_lim. Can you give us some motor and system details? What were you doing when this happened? (speed, torque, etc)

I can see if I can get some bounds on the operating conditions. The motor is being run with hall sensors. Current setpoint was between 1.5 and 2.5A.

Is this phase (or Iq) or bus current?

In torque / current control why would that value be anything other than the current setpoint +/- whatever the control noise would be?

Maybe “unstable” is a bit of a misnomer. In motor.cpp, Motor::FOC_current(),

// Check for violation of current limit
float I_trip = config_.current_lim_tolerance * effective_current_lim();
if (SQ(Id) + SQ(Iq) > SQ(I_trip)) {

Seems more like it means “current limit exceeded”.

Looks like I have the motor’s limit tolerance at 1.25 and the limit at 10.0 A. Should be tripping at |I| > 12.5 A.

My current setpoint was at 2.5 A at the highest and 1.5 A at the lowest.

Seems like it’s saying that there’s like a 5x-10x overshoot in current.

I’ll have to see what kind of plot data I can get out.

(I had to add split ferrite chokes to power, motor, hall and usb cabling to get communications to not drop. After that…)

One thing I see is that the current waveforms look a bit out of control. This is with a somewhat unsteady, constant mechanical torque on the motor against the electric torque. Motor is accelerating. Current setpoint is 1.5A. There’s ~8.3A peak in there. (10mV/A scale)

I jacked up the current limit to 50A and the tolerance to 1.5. That should give me a trip point of 75A, just to try to isolate the problem. Then something error’d again. This time: ERROR_CONTROL_DEADLINE_MISSED.

Anybody have any idea of why that’d happen?

Crazy overshoot on current is from a too-small bandwidth in motor.config.current_control_bandwidth.

I was able to reduce the current “limit” to 10A and “tolerance” of 1.25 with 1.5A current setpoint. Now, I’m just down to the ERROR_CONTROL_DEADLINE_MISSED when the motor speed gets up there.

1 Like

Whoops. I missed that there is also a controller error of ERROR_OVERSPEED
That makes more sense that I have a limit set wrong.

1 Like

What motor is it? Sounds like it might be relatively low inductance

Yes, the motor is very low Z. Low R and low L.

Slowly, I’m learning where all of the Odrive knobs and switches are.

Gotcha. Well I’m glad it seems to be functioning with the higher current control bandwidth.