Problemcore
Forward dynamics
Also called direct dynamics.
Given the state q, q' of a robot and its joint torques tau, find the joint accelerations q'' = M(q)^-1 (tau - C q' - g). Solved in O(n) by the articulated-body algorithm.
Forward dynamics is the problem of finding how a robot accelerates: given its joint positions , joint velocities and joint torques , find the joint accelerations . For a robot without contact the answer is unique, . Simulation of a robot is forward dynamics inside an ODE integrator. This page states the problem and its bounds; the articulated-body algorithm page gives the method in detail, and inverse dynamics is the opposite problem.
In plain words
You know where every joint of a robot is, how fast it moves, and which torque each motor gives. What happens next? Forward dynamics answers with the acceleration of every joint. One motor torque moves the whole arm, because the links push on each other, so the answer is a coupled system of equations, one per joint. A simulator asks this question many times per second and steps the state forward with the answer.
Definition
Input:
- A robot model: joints, each revolute or prismatic, joined into a serial chain or a tree with a fixed base; the joint axes and the link frames; and for each link its mass, center of mass and rotational inertia.
- The gravity vector, m/s in the space frame .
- The state , the joint torques , and optionally external wrenches on given links with their Jacobians .
Output: the vector that satisfies the manipulator equation
Because the joint-space inertia matrix is symmetric positive definite, the output exists and is unique:
The simulation version adds an initial state and a torque history on , and asks for . It is the ODE initial value problem with , and each evaluation of is one forward dynamics problem.
Variants
- Floating base. A legged robot, a humanoid or a space robot has six extra coordinates for its base, which no motor drives directly. The problem has the same form with unknowns; see floating-base dynamics.
- Closed loops. Parallel robots and four-bar linkages add loop-closure constraints with unknown multipliers . The problem becomes the linear system . The Gauss principle of least constraint gives the same solution as the minimizer of a quadratic program.
- Contact with friction. Unilateral contacts and Coulomb friction turn the problem into a complementarity problem, which may have no solution or several (the Painleve paradox). Simulators usually solve it at the velocity level with a time step; see rigid contact complementarity and Stewart-Trinkle time stepping.
- Hybrid dynamics. Some joints have a given acceleration and the rest a given torque. The unknowns are the accelerations of the second set and the torques of the first.
- Derivatives. Optimal control and estimation need , and ; see rigid-body dynamics derivatives.
Examples
Take the planar 2R arm with m and point masses of 1 kg at the link ends, in a vertical plane, with measured from the horizontal. Its terms are , and , where , , and .
Free fall. At , at rest, with : , and N m. So rad/s. Both masses fall with m/s at the first instant, and link 2 keeps its absolute angle because .
Motion without gravity. At , rad/s and , in a horizontal plane: with , and N m. So rad/s. The inverse dynamics of this state and acceleration gives back .
Conditioning. At the eigenvalues of are , so its condition number is . Arms with heavy proximal links and light distal links have much larger condition numbers, which makes the solve for sensitive to errors in and in the model.
Known algorithms
All counts are in the real-RAM model for a serial chain or a tree of joints with one degree of freedom each.
- Inverse dynamics plus a linear solve (Walker and Orin 1982, their first method). One call of the recursive Newton-Euler algorithm with gives the bias . Calls with , no gravity and give the columns of . That is calls of an algorithm, so to form the system, and then to solve .
- Composite-rigid-body method (Walker and Orin 1982, their third method; Featherstone 2008, Chapter 6). The bias comes from one RNEA call, and the composite-rigid-body algorithm forms in for a serial chain. A Cholesky decomposition costs , and the two triangular solves . For trees, the factorization can keep the branch-induced sparsity of and costs less.
- Articulated-body algorithm (Featherstone 1983; Featherstone 2008, Chapter 7). It never forms . A pass from the base outward computes the velocities, a pass inward computes the articulated-body inertia and bias force of each subtree, and a second pass outward computes the accelerations. Each pass does a constant amount of work per joint, so the total is .
- Lynch and Park (Section 8.5) state the problem with and from their closed-form expressions and solve the linear system, which is the second method in matrix notation.
Which method is fastest in practice depends on and on the branching. For small the composite-rigid-body method is often faster than the articulated-body algorithm, because its constants are smaller; Featherstone (2008, Chapter 10) compares the operation counts. Do not use a hand count as a published one.
Bounds
- Upper bound: arithmetic operations for a serial chain or a tree, by the articulated-body algorithm.
- Upper bound with : to form plus for the dense Cholesky factorization of a serial chain. The cubic term counts the factorization; without it, given a factor, the solve is .
- Lower bound: , because the output has numbers and in general each depends on the input. So forward dynamics of a serial chain or a tree is in the real-RAM model.
Reductions
- Forward dynamics to inverse dynamics. Because the manipulator equation is affine in , calls of an inverse dynamics routine give and , and one solve gives . This is method 1 above.
- Inverse dynamics to forward dynamics. The map is affine, . With calls of a forward dynamics routine you get (at ) and the columns of (at ), and then . So the two problems are equivalent up to calls and an solve, although direct algorithms solve each in .
- Simulation to forward dynamics. An explicit Runge-Kutta method of order 4 makes four forward dynamics calls per time step. For long runs without friction, symplectic integrators are used because their energy error does not drift. Since depends on , the Hamiltonian is not separable, and the usual symplectic methods for it are implicit.
Applications
- Robot simulators and physics engines evaluate forward dynamics at every time step, often with contact.
- Shooting methods for trajectory optimization roll out the dynamics from a guess of the torques.
- Model-based state estimators predict the next state with forward dynamics.
- Control design checks a controller in simulation, with a model that differs on purpose from the one inside the controller.
References
- Kevin M. Lynch and Frank C. Park, Modern Robotics, Mechanics, Planning, and Control, Cambridge University Press, 2017, Chapter 8, Section 8.5 (forward dynamics of open chains)
- Roy Featherstone, Rigid Body Dynamics Algorithms, Springer, 2008, Chapter 6 (the composite-rigid-body algorithm and the factorization of the joint-space inertia matrix), Chapter 7 (forward dynamics, the articulated-body algorithm) and Chapter 10 (accuracy and efficiency)
- M. W. Walker and D. E. Orin, Efficient dynamic computer simulation of robotic mechanisms, Journal of Dynamic Systems, Measurement, and Control 104(3), 205-211, 1982, the whole paper (forward dynamics by repeated inverse dynamics calls, and the composite-rigid-body method)
- Roy Featherstone, The calculation of robot dynamics using articulated-body inertias, International Journal of Robotics Research 2(1), 13-30, 1983, the whole paper (the articulated-body algorithm, linear in the number of joints)
- Bruno Siciliano, Lorenzo Sciavicco, Luigi Villani and Giuseppe Oriolo, Robotics, Modelling, Planning and Control, Springer, 2009, Chapter 7 (direct dynamics and inverse dynamics)
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag 9JRMMF Edit this page History Report an error Markdown