Sensorless Control

Hi!

I am trying to use my ODrive S1 in sensorless mode. I don’t have the exact Kv value of my motor, but I was able to find a value that lets me get pass the ramp-up phase and send speed commands. However, I get the following error frequently and must reboot or change my config to fix it:

axis0
  active_errors: no error
  disarm_reason: Error(s):
    ODriveError.SYSTEM_LEVEL
  procedure_result: ProcedureResult.DISARMED
  last_drv_fault: none
internal issues: none

The error doesn’t show enough details to further debug on my end. From what I see, the error occurs once the motor reach the desired ramp speed. Here’s my config, running on firmware 0.6.9.

odrv0.config.dc_bus_undervoltage_trip_level = 20  # V
odrv0.config.dc_bus_overvoltage_trip_level = 30   # V
odrv0.config.dc_max_positive_current = 50  # A
odrv0.config.dc_max_negative_current = -10  # A

odrv0.axis0.config.motor.pole_pairs = 5
odrv0.axis0.config.motor.torque_constant = 0.01654  # 8.27 / Kv
odrv0.axis0.config.motor.current_soft_max = 80.0    # A
odrv0.axis0.config.motor.current_hard_max = 100.0    # A
odrv0.axis0.controller.config.vel_limit = 100.0      # [turn/s]
odrv0.axis0.config.torque_soft_min = -2  # Nm
odrv0.axis0.config.torque_soft_max = 2  # Nm

odrv0.axis0.config.load_encoder = EncoderId.SENSORLESS_ESTIMATOR
odrv0.axis0.config.commutation_encoder = EncoderId.SENSORLESS_ESTIMATOR
odrv0.axis0.config.sensorless_ramp.vel = -50   # input_vel * pole_pairs [radians/s]
odrv0.axis0.config.sensorless_ramp.accel = 4  # [radians/s^2]

odrv0.axis0.controller.config.control_mode = ControlMode.VELOCITY_CONTROL

Other parameters use the default values. Would appreciate any suggestions to make the error disappear.

Thanks,

William

Hi! This was a recent regression, and is fixed in the devel branch. You can use odrivetool dfu --channel devel to update.

1 Like

Awesome, everything works well now.

1 Like