Computed torque control

On this page 7

Computed torque control is a model-based nonlinear control method for robot manipulators that uses the robot’s dynamic model to calculate the joint torques needed to follow a desired trajectory, effectively canceling inertia, Coriolis, centrifugal and gravity effects. Within control systems in robotics, it is the classic example of feedback linearization: after the model terms are compensated, every joint behaves like a decoupled double integrator that a simple PD or PID law can stabilize.

The method is also called inverse dynamics control, because its core computation is the inverse dynamics of the manipulator. It delivers excellent tracking when the model is accurate, but its performance depends directly on model quality, sensor quality and the computing budget of the real-time controller.

How computed torque control linearizes robot dynamics

Computed torque control linearizes robot dynamics by inverting the manipulator equation of motion, written as torque equals M(q) times joint acceleration plus C(q, q̇) times joint velocity plus g(q). Here M is the inertia matrix, C collects Coriolis and centrifugal terms, and g is the gravity vector, all functions of the joint positions q and velocities q̇.

The controller does not command the desired acceleration directly. It first forms an auxiliary acceleration command from the reference acceleration plus a PD correction on position and velocity error, then feeds this command through the model: torque = M(q)·v + C(q, q̇)·q̇ + g(q). If the model is exact, the closed loop reduces to linear, decoupled error dynamics for each joint.

The structure therefore has two distinct parts. The inner loop cancels the nonlinear dynamics using the model, and the outer loop shapes the error response with gains chosen as for a second-order linear system. This separation is what makes tuning intuitive: designers pick a natural frequency and damping ratio per joint instead of fighting coupled nonlinear behavior.

TermPhysical meaningRole in the controller
Inertia matrix M(q)Configuration-dependent mass distributionScales the commanded acceleration
Coriolis and centrifugal C(q, q̇)Velocity coupling between jointsCancels speed-dependent disturbances
Gravity vector g(q)Static load of links and payloadHolds the arm against gravity
Reference accelerationPlanned trajectory curvatureProvides feedforward motion
PD correctionPosition and velocity error feedbackRejects residual errors
Terms in the computed torque law

Tuning the outer loop gains

Gain tuning in computed torque control follows linear second-order design rules. With proportional gain Kp and derivative gain Kd per joint, the error dynamics have a natural frequency equal to the square root of Kp and a damping ratio of Kd divided by twice that root, so critical damping is obtained with Kd = 2·√Kp.

In practice, the achievable bandwidth is limited not by the controller but by structural resonances, sensor noise and sample rate. A common rule keeps the closed-loop natural frequency well below half of the lowest structural resonance and far below the control rate, which typically lies between 1 kHz and 4 kHz in modern robot controllers.

Gain choiceTracking behaviorSide effect
Low Kp, critical dampingSmooth but sluggish correctionLarger errors under model mismatch
High Kp, critical dampingTight trackingNoise amplification, excites resonances
Underdamped KdFast response with overshootOscillation at the end of moves
Overdamped KdNo overshoot, slow settlingVelocity noise dominates torque
Added integral termRemoves steady offsetsWindup risk near joint limits
Effect of outer loop gain choices

Computed torque control sits between independent joint PID and optimization-based methods such as model predictive control. Its closest relative is PD plus gravity compensation, which cancels only g(q), and feedforward control, which uses the model with desired rather than measured states.

MethodModel useStrengthWeakness
Independent joint PIDNoneSimple and robustPoor at high speed, coupling ignored
PD plus gravity compensationGravity onlyProven stability for setpointsWeak trajectory tracking
Feedforward inverse dynamicsFull model on desired statesCan be computed offlineDoes not adapt to actual state
Computed torque controlFull model on measured statesDecoupled linear error dynamicsSensitive to model errors and noise
Model predictive controlModel plus constraintsHandles limits explicitlyHeavy computation
Computed torque control and neighboring strategies

Because model errors never vanish completely, computed torque control is often extended with adaptive control, which updates inertial parameters online, or with robust control and sliding mode control, which add terms that bound the effect of uncertainty. In contact tasks, the same inverse dynamics core is reused inside impedance control and whole-body control frameworks.

Implementation requirements

Implementing computed torque control requires an accurate dynamic model, fast state measurement and a deterministic real-time control system. The inverse dynamics are usually evaluated with the recursive Newton-Euler algorithm, which scales linearly with the number of joints and runs in microseconds on current processors.

  • Identify inertial parameters of links and payload with excitation trajectories rather than relying only on CAD values.
  • Model joint friction, including Coulomb and viscous terms, because friction is often the largest unmodeled torque.
  • Obtain clean velocity estimates from high-resolution encoders, since differentiated noise propagates into the Coriolis term and the derivative gain.
  • Ensure the torque interface is accurate, through current control with known motor constants or joint torque sensing.
  • Run the loop on a fixed, jitter-free cycle, commonly synchronized over a fieldbus such as EtherCAT.

Limitations and common pitfalls

The main limitation is sensitivity to model mismatch. Any error in mass, center of mass, friction or payload leaves residual nonlinear terms that the outer loop must reject, so tracking degrades exactly when the robot carries an unknown or changing load.

ProblemCauseRemedy
Steady tracking offsetUnmodeled friction or payloadFriction model, integral action or adaptation
Audible joint vibrationHigh gains exciting gear complianceLower bandwidth or notch filtering
Noisy motor torqueDifferentiated encoder noiseVelocity observer or filtered estimate
Instability after tool changeWrong payload parametersPayload identification routine
Torque saturationAggressive trajectoryTime scaling of the reference
Typical problems and remedies

Flexible-joint robots with elastic gearboxes or series elastic actuators violate the rigid-body assumption, so the basic law must be extended with motor-side and link-side states. Ignoring this mismatch is a frequent source of oscillation in lightweight collaborative arms.

A non-technical view

Computed torque control works like an experienced driver who knows the car well. Before each curve, the driver already knows how much the car will lean and how hard to steer, so only small corrections are needed while driving.

The robot does the same with arithmetic. It calculates how heavy each part of the arm is and how the parts pull on each other, then sends exactly the force needed for the planned motion. A small correction loop fixes whatever the calculation missed. The better the robot knows its own body, the more precisely it moves.

A concrete example

A research group controls a seven-joint lightweight arm that must trace a welding seam at 0.5 m/s with a path error below one millimeter. With independent joint PID control, the tracking error reaches about 4 mm at the curved sections, because coupling between the shoulder and elbow changes with the arm configuration.

The team identifies the link parameters and joint friction with excitation trajectories, then implements computed torque control at 2 kHz with critically damped outer loop gains. The measured path error falls to roughly 0.6 mm over the full seam. When a heavier torch is later mounted without updating the model, the error rises again, and the group adds a payload identification step to the tool change procedure.