NEBians
search Sign In Register

Inverse Kinematics

Lesson 1 of 4 3D model schedule18 min

Loading simulation…

touch_appDrag to rotate · pinch or scroll to zoom · controls change real measurements

flagWhat you'll discover

  • arrow_forwardContrast forward kinematics with inverse kinematics
  • arrow_forwardDerive how the law of cosines yields the elbow angle
  • arrow_forwardSwitch between elbow-up and elbow-down solutions
  • arrow_forwardIdentify the reachable workspace and what happens outside it

The inverse problem

Forward kinematics is easy: given joint angles, compute where the hand ends up. Inverse kinematics (IK) flips the question — given where I WANT the hand, what angles must the joints take? This is the question that matters in practice, because tasks are defined by targets, not by angles.

IK is harder because it can have two solutions, one solution, or none at all, depending on where the target sits.

Solving with the law of cosines

For a 2-link arm with lengths L1 and L2 reaching distance d, the triangle formed by the two links and the target line is fully determined. The law of cosines gives the elbow: cos(theta2) = (d² - L1² - L2²) / (2·L1·L2).

The shoulder angle then combines the direct angle to the target with a correction term, atan2(L2·sin(theta2), L1 + L2·cos(theta2)). Two formulas, evaluated instantly — that is an analytic solution, with no trial-and-error needed.

Elbow-up or elbow-down?

Notice that cos(theta2) accepts both a positive and a negative elbow angle — the arm can reach the same point with its elbow above the line or below it. These are the elbow-up and elbow-down configurations, and the toggle in the simulation switches between them.

Real arms choose based on context: avoiding a table, dodging their own base, or staying within joint limits. Industrial 6-axis arms can have up to eight distinct IK solutions for one pose!

The reachable workspace

An arm cannot reach everywhere. Targets farther than L1 + L2 are out of range — the arm stretches flat toward them and the target marker turns red in the simulation. Targets closer than |L1 - L2| are also unreachable, hidden inside a dead zone near the base.

The donut-shaped region between these limits is called the workspace. Engineers always check the workspace before installing an arm; a welding robot that cannot reach the weld is expensive furniture.

The PID Controller arrow_forward

quizCheck your knowledge

1. Inverse kinematics answers which question?
2. Which theorem solves the elbow angle of a 2-link arm analytically?
3. Why are there usually two IK solutions for one target?
4. A target beyond L1 + L2 is…