Velocity controller

Close the velocity loop in Motorcortex when the drive runs CST, and tune it.

The velocity controller works on actuatorVelocityError, the velocity target minus the actual velocity. Its output is a torque in Nm, added to the torque target, so it only makes sense when the drive runs CST. The velocity target is the setpoint’s velocity plus the position controller’s output, if that is on.

Tune it

Tune the velocity controller first when you use both: the position loop can only be as good as the velocity loop inside it. Follow Tune the controllers. For the velocity controller:

  • controlOutputMin and controlOutputMax are the torque the motor may deliver, in Nm at the load.
  • Watch actuatorVelocityError and velocityController/output/controllerOutput.