I am seeing occasional current spikes in torque mode which I can’t explain.
As I understand it, torque is directly proportional to current. So if I set a torque, there is exactly one value for the current that I should be seeing in response.
I am looking at the Iq current here, because obviously the ‘real’ currents in the phases are all spinning around. I have plotted Iq and input_torque against time and, while Iq is much noisier, it does plot basically a scaled version of the input_torque graph, as I expect it should.
Except for every so often, when it lurches up past current_lim and trips an error on the ODrive.
In a more simple situation, if the motor is moving or being backdriven, then there is a back emf happening which will lower the voltage across the coils and that will reduce the current. But with the Odrive, the controller will act to increase the input voltage to counteract this - because it always wants to keep the current at the constant value that gets you your setpoint torque.
So - to my naive understanding - it shouldn’t matter how fast or how hard you’re driving the motor. In torque control mode, the current should stay constant.
This is clearly not what I’m seeing, so can anyone explain what it is I’m missing?
Question 2:
What happens at present is that I see a sudden lurch in current that takes me over the current_lim value in my settings, and the Odrive goes into an error state.
For my application, I would actually prefer to truncate the current and experience a weaker torque for a few tenths of a second, rather than trip the error and have everything bomb out.
I haven’t seen an obvious setting for doing this. Does the ODrive have the ability to do it?