Torque_estimate not converging to torque_setpoint in Torque Control

Hi, I’m trying to implement a torque control with an ODrive Pro for this motor and the OA1 encoder. The ODrive was calibrated with the anti-cogging feature and works fine in velocity control at low speeds. Now I was trying to control it in torque and my system was not behaving as expected, so I started to look into how the ODrive was behaving in specific. If I give the ODrive a torque setpoint manually, it doesn’t seem like the control follows the setpoint properly:


image
The first thing that is weird to me is the noise in the torque_estimate and the apparent offset between the 2 signals.
image
image
current_control_bandwidth is set to 1000 but even changing it to a lower value seems to change the behavior of the system.
Just as context, I basically have a system of rope and pulleys, where the motor is pulling the rope with a set of fixed pulleys interconnected by gears.

As additional information, it seems that while the motor is moving, the mean value of torque_estimate coincides with the setpoint, but when the system is in mechanical equilibrium there’s an offset:


You said you have anticogging enabled? You’re likely seeing the anticogging torque plus typical current sensor noise. The torque setpoint only reflects the user’s input – try plotting effective_torque_setpoint as well.

Ahh makes sense. Yeah, when I turn off the cogging, the torque estimate coincides with the torque setpoint. So, should I keep the anticogging enabled if I’m doing torque control? I think yes, as this offset counteracts the internal forces due to the motor magnets, right?

Yes, I’d definitely recommend keeping the anticogging enabled.

1 Like