Inverse dynamics is the computation of the joint torques or forces required to produce a desired acceleration for a robot, given its kinematic structure, mass properties, and the current state of motion. It is the inverse of forward dynamics, which calculates motion from applied forces. This calculation is central to model-based control for legged robots, enabling precise execution of planned trajectories by solving the multi-body equations of motion in reverse.
Glossary
Inverse Dynamics

What is Inverse Dynamics?
Inverse dynamics is the fundamental computational process in robotics and biomechanics for determining the forces and torques required to achieve a desired motion.
The computation typically involves formulating and solving the Newton-Euler equations or Lagrangian dynamics for the system, often expressed as a Quadratic Program (QP) to incorporate physical constraints like torque limits and friction cones. In Whole-Body Control (WBC), inverse dynamics is used to coordinate all degrees of freedom to execute high-level tasks, such as maintaining balance via Centroidal Dynamics while tracking a foot trajectory, making it indispensable for dynamic, torque-controlled locomotion.
Key Characteristics of Inverse Dynamics
Inverse dynamics is the fundamental computation that translates desired motion into the joint-level forces required to achieve it. This section breaks down its essential characteristics, mathematical formulation, and role within the robotics control stack.
Mathematical Foundation
Inverse dynamics is formulated using the equations of motion for a multi-body system. For a robot with floating base dynamics, this is typically expressed as:
M(q) * v̇ + C(q, v) * v + g(q) = Sᵀ * τ + Jᶜ(q)ᵀ * f
Where:
M(q)is the mass/inertia matrix.C(q, v)represents Coriolis and centrifugal forces.g(q)is the gravitational force vector.Sis the selection matrix for actuated joints.τare the joint torques to be solved for (the output).Jᶜ(q)is the contact Jacobian matrix.fare the external contact forces (e.g., Ground Reaction Forces). Given a desired joint accelerationv̇, the solver computes the necessary torquesτ.
Feedforward Force Computation
The primary output of inverse dynamics is a feedforward torque command. This is the predicted force required to achieve the planned acceleration, assuming a perfect model of the robot's dynamics. In practice, this feedforward term is combined with a feedback controller (like a PD loop) to correct for model inaccuracies and disturbances. This combination is central to high-performance control architectures like computed torque control.
Dependence on Accurate Modeling
The accuracy of the inverse dynamics solution is critically dependent on the fidelity of the robot's dynamic model. Key model parameters that must be known or identified include:
- Link masses and centers of mass
- Inertia tensors for each body
- Kinematic parameters (link lengths, joint axes)
- Friction coefficients at the joints Errors in these parameters lead to inaccurate torque predictions, forcing the feedback controller to work harder and potentially degrading performance.
Real-Time Optimization Form
For complex robots like humanoids, the basic inverse dynamics equation is often insufficient due to contact constraints and task priorities. It is commonly reformulated as a Quadratic Program (QP). This optimization framework finds the optimal torques τ and contact forces f that:
- Minimize a cost function (e.g., torque squared, deviation from desired acceleration).
- Satisfy equality constraints (the equations of motion).
- Satisfy inequality constraints (e.g., friction cones, torque limits, ZMP within support polygon). This QP-based inverse dynamics is the computational core of Whole-Body Control (WBC).
Role in the Control Hierarchy
Inverse dynamics operates in the middle layer of a standard locomotion control stack:
- High-Level Planner: Generates a desired Center of Mass (CoM) trajectory and footstep plan over a long horizon (seconds).
- Inverse Dynamics / WBC: Receives the short-horizon (milliseconds) motion plan and solves for the instantaneous joint torques and contact forces needed to track it, respecting all physical constraints.
- Low-Level Joint Control: The computed torque commands are sent to the joint-level actuators (often with local PID loops). This positioning allows it to bridge strategic planning with precise, constraint-aware actuation.
Distinction from Inverse Kinematics
It is crucial to distinguish inverse dynamics from the related concept of Inverse Kinematics (IK).
- Inverse Kinematics solves for joint positions
qgiven a desired end-effector pose (position & orientation). It is a purely geometric problem. - Inverse Dynamics solves for joint torques/forces
τgiven a desired joint accelerationv̇. It is a dynamic problem involving mass, inertia, and forces. In a typical pipeline, IK provides desired joint angles for a footstep; a trajectory generator creates smooth joint velocity and acceleration profiles; then inverse dynamics computes the torques to realize those accelerations.
Inverse Dynamics vs. Related Concepts
A comparison of core computational techniques used in legged robot locomotion, highlighting the distinct inputs, outputs, and primary applications of each method.
| Feature / Metric | Inverse Dynamics | Forward Dynamics | Inverse Kinematics (IK) |
|---|---|---|---|
Primary Input | Desired joint accelerations & robot state | Applied joint torques/forces & robot state | Desired end-effector/foot pose |
Primary Output | Required joint torques/forces | Resulting joint accelerations & motion | Required joint angles |
Core Equation | τ = M(q)q̈ + C(q, q̇)q̇ + g(q) | q̈ = M(q)⁻¹(τ - C(q, q̇)q̇ - g(q)) | θ = f⁻¹(x_des) |
Main Application | Joint-level torque control for motion execution | Motion simulation and prediction | Foot placement and end-effector positioning |
Computational Complexity | O(n) with Recursive Newton-Euler Algorithm (RNEA) | O(n³) for direct matrix inversion, O(n) with articulated body algorithm | Varies; iterative numerical solutions common |
Requires Full Dynamic Model | |||
Directly Solves for Actuation | |||
Fundamental to Whole-Body Control (WBC) |
Frequently Asked Questions
Inverse dynamics is a foundational computational method in robotics that calculates the forces and torques required to achieve a desired motion. Below are key questions about its principles, applications, and relationship to other core concepts in legged locomotion.
Inverse dynamics is the computation of the joint torques or forces required to produce a desired acceleration for a robot, given its kinematic structure, mass properties, and current state of motion. It works by applying the equations of motion (e.g., from the Newton-Euler or Lagrangian formulations) in reverse. Instead of simulating motion from forces, you specify a desired trajectory of joint positions, velocities, and accelerations, and the algorithm solves for the necessary actuator commands. For a legged robot with a floating base, this involves computing the ground reaction forces at the feet and the corresponding joint torques that satisfy the dynamic constraints of the desired motion and maintain balance.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms in Legged Locomotion
Inverse dynamics is a core computational block within a larger hierarchy of control and planning algorithms for legged robots. These related concepts define the mathematical models, stability criteria, and control frameworks that make dynamic locomotion possible.
Forward Dynamics
The complementary calculation to inverse dynamics. Forward dynamics computes the resulting acceleration of a robot given its current state (positions, velocities) and the applied joint torques or forces. It answers the question: 'What motion will these forces produce?' This is the fundamental simulation step used in physics engines and for predicting future states in Model Predictive Control (MPC).
Centroidal Dynamics
A simplified but crucial model that describes the relationship between the net external wrench (combined force and moment) acting on the robot and the motion of its Center of Mass (CoM) and its centroidal angular momentum. It treats the entire multi-body robot as a single rigid body with its mass concentrated at the CoM. This abstraction is vital for high-level balance and motion planning, as it allows planners to reason about overall robot motion without solving the full multi-body dynamics at every step.
Whole-Body Control (WBC)
A hierarchical control framework that uses inverse dynamics as its core solver. WBC formulates locomotion as a Quadratic Program (QP) that coordinates all the robot's degrees of freedom to execute multiple, potentially conflicting tasks simultaneously (e.g., foot trajectory tracking, torso orientation, CoM acceleration) while strictly respecting physical constraints like joint limits, torque bounds, and friction cones. The output of the QP is the optimal set of joint torques.
Quadratic Program (QP) Formulation
The standard mathematical optimization structure for solving inverse dynamics and whole-body control in real-time. The problem is defined with:
- A quadratic cost function to minimize (e.g., error from desired tasks, effort).
- Linear equality constraints (e.g., the equations of motion from inverse dynamics).
- Linear inequality constraints (e.g., friction cone constraints, torque limits). Efficient, specialized QP solvers allow robots to solve this optimization at control frequencies of 500-1000 Hz.
Floating Base Dynamics
The specific formulation of the equations of motion for a legged robot, whose base (torso) is not fixed to the world but 'floats' in 6D space (3D position + 3D orientation). This introduces six unactuated degrees of freedom. The dynamics are typically derived using Recursive Newton-Euler Algorithm (RNEA) or Lagrangian formulation. Inverse dynamics for a floating-base system calculates the joint torques and the unactuated base acceleration resulting from contacts and applied forces.
Ground Reaction Force (GRF)
The fundamental physical quantity that inverse dynamics ultimately resolves. The GRF is the force vector (with normal and friction components) exerted by the ground on the robot's foot. In locomotion planning, desired GRFs are first computed from high-level models (like the Linear Inverted Pendulum) to achieve a certain CoM acceleration. Inverse dynamics then solves for the joint torques and contact forces that realize those desired GRFs while satisfying the full multi-body dynamics.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us