Issues with pid control on torque mode

hi,
connecting a new motor and I am experiencing a strange behavior.
made the initial steps as instructed in the tuning guide.
first - the constant speed control is off by 20% which is strange. I can’t make it stop oscillating (over shoots then undershoots).
as I understand, torque control is the easiest and most basic control so I turned to it and discovered the behavior is very much off .the correction is very sluggish. it looks like the P part of the PID is not influencing the set-point control (it takes forever to stop increasing the torque in the process of getting to a lower torque set-point

I tried to change the torque gain but up or down it’s only making the behavior worse.

what configurable gain setting do we have to set torque PID control? are torque (current) limits and torque acceleration are of any factor?

The torque controller is configured automatically by the ODrive during calibration. The resistance and inductance of the motor is measured, and a PI controller is created to achieve a target bandwidth using a pole placement technique.

If you want to adjust the torque controller, the easiest way to do it is to set the motor.config.current_control_bandwidth - this will automatically move the gains of the PI controller for the bandwidth that you set.

thanks towen,
I’ll have a look. it looks like the automatic process is not producing good pi controller result for me.

Have the resistance and inductance been measured correctly?
Check that motor.config.phase_resistance and phase_inductance match the real resistance (and inductance if you can measure it) between any two windings with a multimeter (or it may be half the measured resistance, as you are measuring phase-to-phase resistance)
Also, is your motor star wound or delta wound? ODrive is expecting star wound motors, a delta winding might cause the pole placement to fail since the motor model does not match reality