How to deal with current / torque controlled motorcontrollers in ArduCopter?

Hi,
I’m developing a very large copter and have some problems with ArduCopter working with the motorcontrollers. My motorcontrollers support a torque-mode. So the PWM value, send from the Pixhawk to the motorcontrollers, isn’t interpreted as a ratational speed, but for a torque. While torque is proportional to the current, it’s also called current controlled. When using the torque-mode I’m saving a control loop in the motorcontroller and get a faster respons.

My big problem is, when I want to decellerate, I have to set a negative torque, but with 1000 us PWM I set the torque to Zero. So I should set the torque at about 1500 us to Zero and values lower than 1500 us should give a negative torque and values higher than 1500 us a positive torque.
How can I do this in ArduCopter?
Is there anyone who has dealed with such a Problem before?

In this thread: @Leonardthall says that he used current controlled ESCs before and had to set a negative value for MOT_THST_EXPO. But how did you get around the other Problems?

Thanks, Moritz

We also use large motors and controllers on our rovers (~40Kw continuous per drive). Our controllers also have the option of current control. Early on we experimented with this mode and our experience was that at zero torque, the motors ‘coast’ and slow down depending on the friction in the drive train. To actively slow down does require negative torque - as does remaining stationary on a slope. It was for this reason that we decided to go to a velocity controlled mode. Torque control is much like the throttle input for a engine in this respect. For a copter, I would expect that aside from dissipating the inertia of the rotor itself, the thrust would fall pretty quickly with zero torque input? When you say that you want to decelerate the motor, presumably you are wanting to reduce thrust? If you really do need to actively brake in torque mode then I would think that it would require a control loop to achieve this and what you would actually end up with is a velocity controlled motor… The responsiveness of our controller/motor setup in velocity mode is great. In fact, we have to use the MOT_SLEW_RATE parameter to limit our current demand to keep it below the system max of 800A

Thanks for your reply! The problem is, that the thrust doesn’t fall quickly enough and the acceleration is faster than the deceleration, so I think the flightcontroller can’t handle this behaviour, while it assumes the same acceleration/deceleration behaviour.

You’re totally right! I came up with the same result. But is there an implementation of a velocity controller in ArduPilot?

I recommend that you use velocity controlled mode. The whole tuning methodology has to change for torque based control and the results are not as good. I think you will get better performance with velocity mode.

Thanks! I will try it with velocity mode next week.

Thank you all for your advice. Finally it’s flying very well with velocity-controlled mode.

Congratulations mate!!