ISEGORIA / MATH ENCYCLOPEDIA
Robot arms: kinematics and the Jacobian
A robot arm is a chain of rotations. Forward kinematics turns joint angles into the position of the gripper; inverse kinematics runs the other way, and usually has several answers or none. The Jacobian, the matrix of partial derivatives between the two, says how joint speeds become gripper speeds and joint torques become forces, and where it loses rank the arm loses a direction of motion. Every motion planner, from a factory welder to a surgical robot, is built on these three ideas.
Before you begin: Trigonometry, vectors and matrices, partial derivatives
Predict, manipulate, then test yourself: every experiment ends with practice questions that are generated fresh at three levels. Graphs illustrate the mathematics; they do not replace a proof.
1. Reaching a point
This arm has three joints: a base that turns about the vertical, a shoulder and an elbow that tilt in the arm’s own vertical plane. Given the three angles, the gripper’s position follows by trigonometry. Going backwards is the interesting direction: the base angle points the arm at the target, and then the elbow must sit where a circle of radius L₂ round the shoulder meets a circle of radius L₃ round the target. Two circles meet twice, once, or not at all, so a point has an elbow-up and an elbow-down solution, or is out of reach. Drag the target, raise it, and flip the elbow.
Worked example. With \(D_1=0.5\), \(L_2=0.6\), \(L_3=0.5\) m and the target at \((0.6,\,0.3,\,0.7)\): \(q_1=\operatorname{atan2}(0.3,0.6)=26.6^\circ\), the shoulder-to-target distance is \(\sqrt{0.45+0.04}=0.7\) m, so \(\cos q_3=(0.49-0.36-0.25)/0.6=-0.2\) and \(q_3=\mp101.5^\circ\). The elbow-up solution has \(q_2=61.0^\circ\).
Watch out. The arm is idealised: joints have no limits and links have no thickness, so some solutions shown would collide with the base or the floor on a real machine. Industrial arms add three wrist joints to set the gripper’s orientation as well as its position; this arm positions the gripper only.
Why does the base angle not depend on the shoulder or elbow?
Because the shoulder and elbow only move the gripper within the vertical plane that the base angle chooses. Whatever they do, the gripper stays in that plane, so the plane must contain the target, which fixes \(q_1=\operatorname{atan2}(y,x)\) (or the opposite direction, reaching over backwards).
2. The Jacobian and its ellipsoid
Move the joints a little and the gripper moves a little: the Jacobian \(J\) is the matrix that turns joint speeds into gripper velocity. Feed it every joint-speed vector of length one and the gripper velocities fill an ellipsoid whose axes are the singular vectors of \(J\) and whose semi-axes are its singular values. The same matrix, transposed, turns gripper forces into joint torques, so the force ellipsoid has the same axes with reciprocal lengths. Where \(\det J=0\) the ellipsoid flattens to a disc: the arm is singular and cannot move along the missing axis.
Worked example. At \(q_1=30^\circ\), \(q_2=50^\circ\), \(q_3=-80^\circ\) the gripper is \(r=0.6\cos50^\circ+0.5\cos30^\circ=0.819\) m from the base axis and \(\det J=-0.6\times0.5\times0.819\times\sin(-80^\circ)=0.242\). The singular values are 0.929, 0.819 and 0.318 m/s per rad/s, so the slowest direction needs three times the joint speed of the fastest. The middle one equals \(r\): turning the base moves the gripper sideways at \(r\dot q_1\).
Watch out. Joint speeds are measured in rad/s with equal weight, which is a choice: a long, slow shoulder and a quick elbow would deserve different weights, and the ellipsoid’s shape depends on that choice. The force ellipsoid is drawn at a smaller scale and clipped where it would grow without bound at a singularity.
Why is a fully stretched arm singular?
With the elbow straight, shoulder and elbow rotation both move the gripper at right angles to the arm, and nothing moves it along the arm: the two columns of \(J\) for those joints become parallel. The arm can still push hard outward, with no torque at all, which is why you lock your elbow to hold something heavy at arm’s length.
3. Straight lines are hard
To move the gripper from A to B there are two natural plans. Interpolate the joint angles and every joint turns smoothly, but the gripper swings along a curve. Interpolate the gripper’s position and it travels a straight line, but the joints must follow whatever inverse kinematics demands at each instant, and near a singularity that can be a burst of speed. Both plans here start and stop at rest with the same cubic time scaling. Pick a move and watch the joint speeds.
Worked example. On the move over the top, which passes 0.12 m from the base axis, the straight-line plan needs a peak joint speed of 13.7 rad per unit time against 4.1 for the joint-space plan, because the base must swing through about \(155^\circ\) while the gripper crosses the axis. The joint plan pays in distance instead: its gripper travels 1.53 m against the straight line’s 1.10 m.
Watch out. Time is in units of the whole move, so speeds are per move duration; multiply by the reciprocal of the real duration for rad/s. Real controllers also limit each joint’s speed and acceleration and would slow the straight-line move down near the axis rather than follow it at any cost.
Why does the joint-space plan never have this problem?
Because its joint speeds are fixed in advance: \(\dot{\mathbf q}=\dot s(t)\,(\mathbf q_B-\mathbf q_A)\), at most \(1.5\,|\mathbf q_B-\mathbf q_A|\) per unit time, whatever the Jacobian is doing. The price is that the gripper’s path is whatever those angles produce, which may sweep wide or pass close to obstacles.