Position Controller

How To Configure Position Controller

The Position Controller is a PID controller that closes the position loop on the Motorcortex side. Depending on the setpoint mode, the output can be either velocity or torque. If the Position Controller is disabled, the system operates in open-loop control mode.

Configure Position Controller via the DESK-Tool:

How to configure Position Controller for an axis (e.g., axis 1) using the desk-tool:

  1. Enable the Position Controller, set .../positionController/Enable to 1
Desk Parameter: root/AxesControl/actuatorControlLoops/actuatorControlLoop01/positionController/Enable
Set Parameter to: Remark:
0 Open-Loop Control Position Control
1 Closed-Loop Control Position Control
  1. Configure Position Controller Output [.../positionController/output], set to either Velocity or Torque.
Desk Parameter: root/AxesControl/actuatorControlLoops/actuatorControlLoop01/positionController/usePositionControlForTorque
Set Parameter to: Remark:
0 Configures Position Controller output to Velocity used in combination with driveOpMode: Cyclic Synchronous Velocity control.
1 Configures Position Controller output to Torque used in combination with driveOpMode: Cyclic Synchronous Torque control
  1. Tune PID, Such that .../positionController/input/controlError is inside your specification.
    • Recommended first add a Proportional gain and then an Integral gain.
    • Start with small values and then increase, wrongly tuned can result in instable behavior.
Desk Parameter:
Prefix: root/AxesControl/actuatorControlLoops/actuatorControlLoop01/positionController Description:
./input
controlError Calculated position error between Target and Actual Position.
./output
controllerOutput Position Controller output, either Velocity or Torque defined by ./usePositionControlForTorque.
./parameter
derivativeGain Used to set the derivative gain.
integratorGain Used to set the integrator gain.
proportionalGain Used to set the proportional gain.
  1. Now you configured your Position Controller.