# How to compensate for the activation torque of a harmonic drive

I've got a 30:1 harmonic dive sourced for a 3508 BLDC motor, which outputs around 4.7 Nm (peak 7.9 Nm). But there is an insane activation torque of 1 Nm, when using ROS and PID, leads to not being able to move in small increments. The drive itself moves a minimum of 0.01 rad. But when applying workload to it, this amount drastically increases to 0.15 rad, which is not ideal for my application. Is there a way to compensate for this? ie using some open-source algorithm.

• Am I correct that the activation torque for a harmonic drive acts like friction? I.e., you need a certain amount of input torque to get it moving, after which it consumes a lesser, but still significant amount of input torque to keep moving, even with zero torque on the output? Apr 6 at 17:06
• There might be a mechanical aspect to this also - if the coupling has elasticity to it after the gear reduction, even a little, it could get worse, you'd see backlash and hysteresis like behavior Apr 7 at 23:14

I am going to assume that by "activation torque" you mean some combination of static and Coulombic friction. Both of these effects tend to defeat linear controllers like a straight PID because they are not only nonlinear, but because at reasonable scales, the nonlinearities involve discontinuities in the force vs. velocity relationship.

Here's a force vs. velocity plot incorporating the simplest models of static, Coulombic, and viscous friction, taken from here:

If you control a mechanism with a controller that has integral action (pure I, PI, or PID), and either (or both) Coulombic or static friction ("stiction" in the plot), then the system will tend to oscillate around the target point without ever settling.

If you think about this in terms of linearizing a system, the oscillation comes about because when the relative motion is zero, the force vs. velocity slope is infinite.

If you think about this purely in the time domain, then if you start at zero velocity and zero applied torque, the integrator will do its job and start building up torque. At some point the starting friction will be overcome and the mechanism will start moving -- however, at this point the mechanism is seeing an excess of torque. It starts moving, and -- especially if the stiction to Coulombic friction ratio is high -- it overshoots because the integrator has built up that excess. Then the integrator has to wind back the other way -- the mechanism stops, out of place, the force builds up in the opposite direction, stiction breaks loose, the mechanism overshoots in the opposite direction, and the cycle repeats.

There are a lot of ways to overcome this. The simplest, most common (to my knowledge) and most robust is to monitor when you only need a small movement, and "kick" the mechanism with a short, high-torque pulse.

You need to size the amplitude of this pulse so that it is strong enough to always overcome sticktion, for all reasonable states of your machine -- hot, cold, brand new, "acceptably" worn, misaligned, etc.. Then you need to size the duration of this pulse so that the mechanism (A) actually moves a significant amount, and (B) doesn't move too far.

I prefer to implement this with a nonlinear block that follows the PID controller, and that just pays attention to the applied torque command. It chooses whether to apply "kicks" at a rate proportional to the command, or to apply a continuous torque.

This is a technique that is as old as the hills. Even before control engineers started playing with automatic control loops, people were precisely aligning heavy things by smacking them with mallets.

The advantages to this technique are that it's intuitively obvious, and can be implemented without needing special hardware (beyond the "smacker", if you're using electronic control instead of software).

The disadvantages to this technique are that:

• You have to choose an amplitude that'll work, always.
• You have to make sure your chosen amplitude won't damage any motors or circuitry*.
• You have to balance the duration and amplitude of the pulse with your control goals.
• In general, 1 kick means a finite amount of motion.
• This means that you don't get to have continuous motion at low speeds -- you have to accept that
• In general, the smaller the rotation step you aim for, the harder it is to get consistent behavior, and the less linear the transition is from "kicking" and continuous motion.
• Because you don't get continuous motion at low speeds, your controller needs to have some deadband in it, so it won't oscillate while trying for impossible levels of precision.

If you can work around all of the above constraints, this is a time-proven method of dealing with this problem.

* I've done this -- it even caused a motor manufacturer to revise their datasheet.