Week 02 | Day 05

Forward Kinematics: From Joint Angles to End-Effector Position

Published: 2026-04-10 | Author: Smartotics Learning Journey | Reading Time: 8 min

Figure 1: D-H Parameters for 2-DOF planar robot arm with joint angles

Quick Summary

Forward kinematics (FK) answers: “Given all joint angles, where is the end-effector?” We solve this by chaining homogeneous transform matrices, one per joint, from base to end-effector. This is the foundation of every robot calculation in this course. We derive it step-by-step for a 2-DOF planar arm and a 3-DOF spatial arm.

What Is Forward Kinematics?

Forward kinematics is the simplest direction of kinematic computation:

INPUT: Joint angles [q1, q2, q3, …, qn] OUTPUT: End-effector pose [x, y, z, roll, pitch, yaw]

For a 2-joint planar arm: given angles of the shoulder and elbow, where is the hand?

For a 6-axis industrial robot: given 6 encoder readings, where exactly is the tool tip, and which way is it pointing?

The key insight: FK is just matrix multiplication. Each joint contributes one transformation matrix. Multiply them all together in order:

T_base_to_ee = T_0_1(q1) * T_1_2(q2) * T_2_3(q3) * … * T_(n-1)_n(qn)

Denavit-Hartenberg Parameters (The FK Standard)

The Denavit-Hartenberg (D-H) parameters provide a systematic way to build the T matrix for each joint using just 4 numbers:

ParameterSymbolMeaning
Link lengtha_iDistance from Z_i to Z_(i+1) along X_i
Link twistα_iAngle from Z_i to Z_(i+1) around X_i
Link offsetd_iDistance from X_(i-1) to X_i along Z_i
Joint angleθ_iAngle from X_(i-1) to X_i around Z_i

For revolute (rotation) joints, θ is the variable. For prismatic (sliding) joints, d is the variable. All other parameters are fixed by the robot’s mechanical design.

D-H Transform Matrix

Given [a, α, d, θ], the transform from frame i-1 to frame i is:

T = [ cθ -sθcα sθsα acθ ] [ sθ cθcα -cθsα asθ ] [ 0 sα cα d ] [ 0 0 0 1 ]

where cθ = cos(θ), sθ = sin(θ), cα = cos(α), sα = sin(α)

Worked Example: 2-DOF Planar Arm

A 2-joint arm in the XY plane: L1 = 0.5m (shoulder to elbow), L2 = 0.3m (elbow to wrist). Both joints rotate about the Z axis.

Step 1: Define D-H parameters

Joint iθ_id_ia_iα_i
1q10L1 = 0.50
2q20L2 = 0.30

Step 2: Compute T_0_1 and T_1_2

Since α = 0 and d = 0 for both joints:

T_0_1 = [ cos(q1) -sin(q1) 0 L1cos(q1) ] [ sin(q1) cos(q1) 0 L1sin(q1) ] [ 0 0 1 0 ] [ 0 0 0 1 ]

Step 3: Chain them

T_0_2 = T_0_1 * T_1_2

The end-effector position is in the top-right 3x1 of T_0_2:

x = L1cos(q1) + L2cos(q1+q2) y = L1sin(q1) + L2sin(q1+q2) z = 0

This is the forward kinematics equation for a 2-DOF planar arm. For q1 = 30° and q2 = 45°: x ≈ 0.64m, y ≈ 0.46m.

Physical Intuition

Think of forward kinematics as “folding” a chain:

  1. Start from the base (origin of frame 0)
  2. Apply T_0_1: move along link 1 by L1, rotate by q1. You’re now at joint 1
  3. Apply T_1_2: move along link 2 by L2, rotate by q2. You’re now at the end-effector
  4. Read off the position: the translation part of the final matrix

The same pattern works for any serial robot, whether 2 joints or 20 joints. The only difference is the number of matrices you multiply.

D-H Convention Note

D-H is the standard notation but there are variants (standard vs modified D-H). Both work — just be consistent and don’t mix them. The robotics community is gradually moving away from D-H in favor of more general product-of-exponentials methods, but D-H remains ubiquitous in textbooks and industrial controllers. Learn D-H first — you’ll encounter it everywhere.

FAQ

Q: Forward kinematics seems easy. Is inverse kinematics also easy?

Forward kinematics has one unique answer. Inverse kinematics can have zero, one, two, or infinitely many answers — and finding any of them is much harder. That’s why we dedicate an entire week (Week 03) to it.

Q: Do I really need to learn D-H parameters?

Yes. Even though newer methods exist, D-H is the language of robotics. Industrial robot controllers, textbooks, papers — they all use D-H tables. It takes 20 minutes to learn and saves hours of confusion later.

Q: What if a robot has branches (like a Y-shape)?

FK still works: you chain matrices along each branch independently from the base. The math doesn’t change — you just have multiple kinematic chains starting from the same root.

Key Takeaways

Disclaimer

For educational purposes only. This article is part of a structured learning curriculum and does not constitute professional engineering advice.

Image Credits: All images are AI-generated illustrations for blog purposes only. © 2026 Smartotics Learning Journey.