Limiting the maximum regen power in moteus

When using a servo controller, any time the motor needs to either decelerate or resist an external torque, the controller may “regenerate” energy that has to go somewhere. By default, moteus will apply that energy back to the input bus, potentially charging a battery if that is used as the power source. When the input voltage rises too high, either because the battery impedance is high or because a PSU is as the source, then moteus will apply “flux braking” to dissipate the energy in the windings of the motor instead of allowing the voltage to grow without bounds. This often works great, but in some common scenarios flux braking by itself can be inadequate. In order to operate stably, flux braking need to use a filtered version of the bus voltage. This means that if the bus voltage rises fast enough, the maximum configured voltage can be exceeded before flux braking has had a chance to actually begin dissipating significant energy in the motor.

servo.max_regen_power_W

Thus, enter the new configurable parameter servo.max_regen_power_W. When this parameter is finite, it instructs moteus to limit the amount of power applied to the input bus to no more than specified. At every instant, if the estimated regenerated power is more than this amount, it is immediately applied as resistive heat in the motor windings with no filtering required. This will operate up until either the voltage or current limits prevent more power from being applied to the motor, after which the remaining energy will once again go back to the input bus.

This new feature is much easier to tune, does not require any additional hardware, and is now the recommended second line of defense if you observe an “overvoltage” fault in your application.

Caveats

Thermal: Like with flux braking, the energy still has to go somewhere, and also like with flux braking, here it goes into the windings of the motor. This can either make your motor become the performance limiter because of thermal concerns, or if motor thermals were already the limiting factor it can exacerbate them.

Tuning: Even with single quadrant power supplies, it may be advantageous to have a small non-zero allowed amount of regenerative power in the 5-10W range. The controller and motor both have some losses which may consume this. In practice, manual tuning may be required to pick a value which robustly prevents over voltage faults while minimizing motor heating.

Upgrading

This feature is available in moteus firmware 1.0.0 and newer. To upgrade, you can follow the instructions in the online manual here: