Manipulator Basics · Theory · Module 05 of 14
05 — Denavit–Hartenberg Convention
Four numbers per joint describe any serial arm. The Denavit–Hartenberg convention fixes where to put each link frame so the transform between neighbours always has the same form. Learn both variants, build DH tables and see why two tables can describe the same robot.
Writing FK by hand is easy for a 2R arm and error-prone for a 6-DOF one. DH turns frame placement into a recipe with four parameters per joint, and that recipe is what most textbooks and many controllers use.
Learning objectives
After this module you should be able to:
- Assign link frames to a serial arm with the standard DH rules.
- Explain the geometric meaning of θ, d, a and α, and which of them is the joint variable.
- Write the DH link transform in both the standard and the modified (Craig) convention.
- Build DH tables for 2R, 3R and 4-DOF arms and check them with FK.
- Recognise when a DH table is ambiguous and why parallel axes cause trouble in calibration.
Conceptual explanation
The idea: put the z axis of each frame along a joint axis, and the x axis along the shortest line between neighbouring axes (their common normal). Then the transform from one frame to the next is always "rotate about z, slide along z, slide along x, rotate about x", described by four numbers.
| Parameter | Meaning (standard DH) | Revolute joint | Prismatic joint |
|---|---|---|---|
| θi | angle from xi−1 to xi, about zi−1 | variable | constant |
| di | distance along zi−1 to the common normal | constant | variable |
| ai | link length: distance along xi between the axes | constant | constant |
| αi | link twist: angle from zi−1 to zi, about xi | constant | constant |
Frame assignment recipe (standard DH)
- Number the joints 1 … n. Put along the axis of joint i.
- Put the origin of frame i where the common normal of and meets , and along that normal, pointing away from .
- If the axes intersect, put the origin at the intersection and perpendicular to both. If they are parallel, the common normal is not unique: choose one, usually to make .
- Complete each frame with . Frame 0 is the base; frame n is placed on the last link, and the tool transform adds the TCP.
- Read the four parameters off the drawing for each joint and write the DH table.
Standard versus modified DH
In standard (distal) DH, frame i sits at the far end of link i, on the axis of joint i+1. In modified (proximal) DH, used by Craig, frame i sits on joint i itself, and the parameters are . Both describe the same robot, but the tables differ, the order of the elementary transforms differs, and the tool offset moves from the last row to a separate tool transform. Mixing a table from one convention with the formula of the other is one of the most common errors. Practise both in Lab 03.
Mathematical formulation
Forward kinematics is the product of the link transforms.
Each row has exactly one variable; real controllers also add a fixed offset so that q = 0 matches the robot's mechanical zero.
Each row has four parameters, but a general rigid transform has six degrees of freedom. DH gets away with four because the frame placement rules use up the other two. That is also why DH cannot place the base and tool frames arbitrarily, and why separate base and tool transforms are added.
Worked examples
Example 1: a planar 2R arm in both conventions
| Joint | θ | d | a | α |
|---|---|---|---|---|
| 1 | q₁ | 0 | L₁ = 0.4 | 0 |
| 2 | q₂ | 0 | L₂ = 0.3 | 0 |
| Joint | αi−1 | ai−1 | θ | d |
|---|---|---|---|---|
| 1 | 0 | 0 | q₁ | 0 |
| 2 | 0 | L₁ = 0.4 | q₂ | 0 |
| tool | — | L₂ = 0.3 | — | — |
At the standard product is
The modified chain followed by gives the same matrix. The largest element-wise difference computed by the engine is . Same robot, different tables.
Example 2: a planar 3R arm
| Joint | θ | d | a | α |
|---|---|---|---|---|
| 1 | q1 | 0 | 0.40 | 0 |
| 2 | q2 | 0 | 0.30 | 0 |
| 3 | q3 | 0 | 0.15 | 0 |
Every α is zero because all axes are parallel to z. At the tool is at m with heading , the sum of the joint angles.
Example 3: a 4-DOF articulated arm
| Joint | θ | d (m) | a (m) | α |
|---|---|---|---|---|
| 1 | q1 | 0.30 | 0.00 | 90° |
| 2 | q2 | 0.00 | 0.32 | 0° |
| 3 | q3 | 0.00 | 0.28 | 0° |
| 4 | q4 | 0.00 | 0.10 | 0° |
Row 1 has : the waist axis is vertical and the shoulder axis horizontal, so the twist turns z by a right angle. The shoulder offset m is the height of the shoulder above the base. At the first link transform is
and the full product puts the tool at m. Load this robot in Lab 03 and check the matrices row by row.
Interactive experiment
Interactive DH row (needs JavaScript): the 4×4 transform for the chosen parameters.
Real-world applications
- Robot manufacturers publish DH (or similar) tables, and offline programming tools read them to build kinematic models.
- Calibration identifies small errors in the DH parameters of each robot (Module 14).
- URDF, used by ROS 2, does not use DH: each joint carries a full origin transform (xyz and rpy). Converting a DH table to URDF is a routine task (see the ROS 2 bridge page).
Common mistakes
Mixing conventions
Using a modified-DH table with the standard formula (or the reverse) gives a different, usually nonsensical robot. Check which convention a table uses before using it.
Measuring θ about the wrong axis
In standard DH, θi is about zi−1, not zi. Off-by-one indexing is the most common DH error.
Forgetting joint offsets
If the robot's zero position is not the DH zero, the controller angle and θ differ by a constant offset. Missing it rotates a whole link.
Using DH for nearly parallel axes in calibration
When consecutive axes are almost parallel, a tiny misalignment moves the common normal far along the axis and d jumps. Calibration uses modified models (e.g. Hayati parameters) for such joints.
Key takeaways
- DH places each z along a joint axis and each x along the common normal of neighbouring axes.
- Four parameters per joint: θ, d, a, α. θ is the variable for revolute joints, d for prismatic ones.
- Standard and modified DH place frames differently and multiply the elementary transforms in a different order.
- Base and tool transforms are added outside the DH table.
Knowledge check
Write an answer to each question, then reveal the explanation. Your answers stay in your browser.
Question 1
Which DH parameter is the joint variable of a prismatic joint?
Explanation
di, the offset along zi−1. θi is constant for a prismatic joint.
Question 2
All the axes of a planar arm are parallel. What are all its α values?
Explanation
Zero: the twist between parallel axes is 0 (or 180° if a z axis is flipped).
Question 3
Why is the common normal not unique when two joint axes are parallel?
Explanation
Every line perpendicular to both axes is a common normal, at any height along them. The convention chooses one, usually so that d = 0.
Question 4
A table lists (αi−1, ai−1, θi, di). Which convention is it?
Explanation
Modified (Craig) DH: the parameters of the previous link come first, and the frame sits at joint i.
Question 5
Why can't DH place the tool frame arbitrarily?
Explanation
Each DH row has 4 parameters, not 6; the frame rules (x along the common normal, intersecting the previous z) remove two freedoms. A separate tool transform with 6 freedoms is needed.
Practise it in the labs
Then test yourself in practice exercises and challenge mode.
References and further reading
- J. Denavit and R. S. Hartenberg, "A kinematic notation for lower-pair mechanisms based on matrices", ASME Journal of Applied Mechanics, 22, 1955, pp. 215–221.
- J. J. Craig, Introduction to Robotics: Mechanics and Control, 4th ed., Pearson, 2017, chapter 3 (modified DH).
- M. W. Spong, S. Hutchinson and M. Vidyasagar, Robot Modeling and Control, 2nd ed., Wiley, 2020, chapter 3 (standard DH).