Articulated Body Algorithm (ABA)

March 22, 2026 · View on GitHub

Overview & Motivation

The Articulated Body Algorithm (ABA) is the most efficient method for computing forward dynamics of serial kinematic chains. Given joint positions qq, velocities q˙\dot{q}, and applied torques τ\tau, it computes joint accelerations q¨\ddot{q} in O(n)O(n) time — linear in the number of links.

This is the forward-dynamics counterpart of the Recursive Newton-Euler Algorithm (which solves inverse dynamics). Together, they form the two fundamental O(n)O(n) algorithms in rigid-body dynamics.

Alternatives like Euler-Lagrange require explicitly forming and inverting the n×nn \times n mass matrix (O(n3)O(n^3)), making ABA significantly faster for chains with more than 3-4 links.

Mathematical Theory

Problem Statement

Given a serial chain of nn rigid bodies connected by revolute joints, find:

q¨=M(q)1[τC(q,q˙)q˙g(q)]\ddot{q} = M(q)^{-1} [\tau - C(q, \dot{q})\dot{q} - g(q)]

ABA computes this without ever forming or inverting MM.

Algorithm Structure

ABA has three passes over the kinematic chain:

  1. Forward pass (base → tip): Compute link kinematics — angular velocities, linear velocities, and velocity-product accelerations from joint positions and velocities.

  2. Backward pass (tip → base): Compute articulated-body inertias IiAI^A_i and bias wrenches piAp^A_i for each link. At each step, the joint projection removes one degree of freedom from the spatial inertia, and the remainder is propagated to the parent.

  3. Forward pass (base → tip): Resolve joint accelerations using the articulated-body quantities. Each joint acceleration q¨i\ddot{q}_i is computed from the projected articulated inertia and the transformed parent acceleration.

Key Formulas

Articulated-body inertia starts as the rigid-body spatial inertia of each link, then accumulates child contributions:

IiAIiA+Xi+1I^i+1AXi+1I^A_i \leftarrow I^A_i + X^*_{i+1} \hat{I}^A_{i+1} X_{i+1}

where I^A\hat{I}^A is the inertia after removing the joint DOF (the "downdate"):

I^iA=IiAUiUiTDi\hat{I}^A_i = I^A_i - \frac{U_i U_i^T}{D_i}

with Ui=IiAsiU_i = I^A_i s_i, Di=siTUiD_i = s_i^T U_i, and sis_i the joint motion subspace (joint axis for revolute joints).

Joint acceleration:

q¨i=uiUiTa^iDi\ddot{q}_i = \frac{u_i - U_i^T \hat{a}_i}{D_i}

where ui=τisiTpiAu_i = \tau_i - s_i^T p^A_i and a^i\hat{a}_i is the spatial acceleration contribution from the parent.

Complexity Analysis

CaseTimeSpaceNotes
AllO(n)O(n)O(n)O(n)Three linear passes over the chain

Each pass visits every link exactly once, performing constant-time spatial algebra (3×3 matrix operations) per link.

Step-by-Step Walkthrough

Consider a 2-link planar arm with unit masses, unit lengths, Y-axis joints, zero velocities, and zero applied torques under gravity g=[0,0,9.81]Tg = [0, 0, -9.81]^T.

Pass 1 — Forward kinematics: both links at q=[0,0]Tq = [0, 0]^T with q˙=[0,0]T\dot{q} = [0, 0]^T, so all velocities and velocity-product terms are zero.

Pass 2 — Backward pass: starting from link 2, compute the rigid-body inertia, project out the joint DOF, transform to link 1's frame, and accumulate. The articulated inertia at the base now represents the effective inertia of the entire chain.

Pass 3 — Forward pass: at the base, the gravitational acceleration is transformed into the base frame and used to compute q¨1\ddot{q}_1. The resulting acceleration is propagated to link 2 to compute q¨2\ddot{q}_2.

The result: both joints accelerate downward due to gravity, with the base joint carrying the larger moment from the full chain.

Pitfalls & Edge Cases

  • Singular configurations: When Di0D_i \to 0, the joint becomes locked. This should not happen for well-formed revolute joint models with positive inertia.
  • Numerical precision: The division by DiD_i amplifies errors if DiD_i is small. Use float (not fixed-point) for dynamics computations.
  • Floating-point only: The algorithm involves trigonometric functions, divisions, and large dynamic ranges that are unsuitable for Q15/Q31 fixed-point.

Variants & Generalizations

  • Composite Rigid Body Algorithm (CRBA): Computes the mass matrix M(q)M(q) explicitly in O(n2)O(n^2). Useful when MM itself is needed (e.g., for operational-space control).
  • Extended ABA: Supports branching chains (trees) by processing children before parents in the backward pass.
  • ABA with friction: Joint friction torques can be added directly to τ\tau.

Applications

  • Real-time simulation of robot arms and multi-body systems
  • Model-based control (computed torque, impedance control)
  • Forward integration of manipulator dynamics

Connections to Other Algorithms

  • Recursive Newton-Euler: solves the inverse problem (q,q˙,q¨τq, \dot{q}, \ddot{q} \to \tau). ABA and RNEA are duals: RNEA(q, qDot, ABA(q, qDot, tau)) ≈ tau.
  • Euler-Lagrange: equivalent O(n3)O(n^3) formulation using the mass matrix.
  • Gaussian Elimination: used if the mass matrix approach is taken instead.

References & Further Reading

  • Featherstone, R. (2008). Rigid Body Dynamics Algorithms. Springer. Chapter 7.
  • Featherstone, R. (1983). "The Calculation of Robot Dynamics Using Articulated-Body Inertias." International Journal of Robotics Research, 2(1), 13–30.