# How smooth can a motor run at low speed?

I just watched a tutotrial on how to control the odrive from as Raspberry Pi. I noticed that the motor doesn’t rum very smooth at low speeds, even though a 8096 steps encoder is used. Why is that the case? Is he using wrong parameters or is it just an inherent limitation of the motor?

I mean this video at this time:

It’s both. Cheap motors have high cogging torque. You can compensate for this by using higher position & velocity gains, or by trying out the “anticogging” feature.

He is using the original odrive D5065, does this fall into the “cheap motor with high cogging torque” category?

Yes. Pretty well all hobby grade brushless motors are like that.

I get much better low-speed with the ODrive 3.6 controller in position mode. In Python script:

import math
od=odrive.find_any()

# Set position mode:

od.axis0.controller.config.control_mode=3 # postion_control
od.axis0.controller.config.input_mode=5 # trapezoidal InputMode (or input_mode=1)
od.axis0.trap_traj.config.accel_limit=10 # 600 rpm/s (example)
od.axis0.trap_traj.config.decel_limit=10 # 600 rpm/s (example)

# Define a “speed function”:

def speed(vel):
dir = math.copysign(1,vel)
vel = min(od.axis0.controller.config.vel_limit, abs(vel))
od.axis0.trap_traj.config.vel_limit = vel
od.axis0.controller.move_incremental(dir*math.inf, False)

Set any speed:

speed(1/60) # one turn per minute (example)
speed(0) # stops the motor

Why this works is a mystery to me. But it does the job. My motor is a Cubemars GL40-KV210 with a factory installed AMS-AS5048A encoder, rated speed=2200 rpm.