Motor_error_unknown_torque

Hello,

I would like help figuring out why odrive is failing is a very specific scenario. I am using odrive (v3.6-56V) operating at 36V (i am using a battery).

MOTOR: Electric Skateboard Brushless Motor 6374 190KV | Longboard | Flipsky – FLIPSKY
ENCODER: 8192 CPR Encoder with ODrive Cable — ODrive

Limits:

  • odrv0.axis0.motor.config.torque_lim = 1.5
  • odrv0.axis0.motor.config.current_control_bandwidth = 2000
  • odrv0.axis0.controller.config.vel_limit = 50
  • odrv0.axis0.controller.config.input_mode = INPUT_MODE_PASSTHROUGH
  • odrv0.axis0.controller.config.control_mode = CONTROL_MODE_POSITION_CONTROL

The error is happens only in a very specific scenario. When i command odrive the following commands in the following order in very short time span.

odrv0.axis0.controller.input_pos = -150
odrv0.axis0.controller.input_pos = 0
odrv0.axis0.controller.input_pos = -150
odrv0.axis0.controller.input_pos = 0

image



I would like to note that:

  • This error never happens if I reduced the torque limit from 1.5 to 1.3N.m
  • This error never happens if I waited for the motor to reach position -150 before commanding position 0, and waiting for the motor to reach position 0 before commanding it to go to position -150, etc …
  • I did try to reduce the noise on the encoder index signal by shielding the encoder cable and adding a 47nF cap between the encoder index signal and GND.
  • i did reduce the length of the encoder cable as much as possible and i am running it away from the motor phase cables.

I would love any suggestions of what i can try next :slight_smile: Thank you

I found the first response on this thread helpful for solving this issue:

Increasing motor.config.current_control_bandwidth to 2000 seems to have worked for me so far!

Thank you for your reply :slight_smile:

The error happened when the current controller bandwidth is set to 2000!

Should I try increasing it to more than 2000? What is the recommended upper limit for the current controller bandwidth?

Sorry! I didn’t see that you had already done that.

I don’t know about increasing it more, but you could also try changing axis.controller.config.input_mode = INPUT_MODE_TRAP_TRAJ and setting values for
<odrv>.<axis>.trap_traj.config.vel_limit = <Float> <odrv>.<axis>.trap_traj.config.accel_limit = <Float> <odrv>.<axis>.trap_traj.config.decel_limit = <Float>

So far, this mode has worked pretty well for me.

Here is a link to the documentation for trajectory control: