Level 3 · Innovator · Intermediate high school. Basic programming, algebra and introductory trigonometry. · about 35 min
Where is the hand? Kinematics meets control
Turn joint angles into a hand position, then ask what a real controller actually delivers.
You'll be able to
- Compute the hand position of a two-link planar arm from its joint angles.
- Model a P-controlled joint as a first-order system and predict its final angle and time constant.
- Trace how a joint's steady-state error becomes a hand-position error.
- Estimate how a small angle uncertainty grows into a position uncertainty at the hand.
01The problem
A two-link arm on a lab bench has to place a pen tip on a mark. Its upper arm is 20 cm long and its forearm 15 cm. The planning software works out that the shoulder should be at 60° and the elbow at 30°, sends those angles to the joint controllers, and the arm moves.
The pen lands several centimetres away from the mark. Every calculation was correct. The joint controllers were working. The sensors were fine.
The problem lies at the boundary between two pieces of engineering that were each checked separately. The geometry assumed the joints reach exactly the angles they are asked for; the shoulder is driven by a plain proportional controller, which doesn't. How do you predict, before you build anything, where the hand will really end up? To answer, you need to model both the geometry of the arm and the behaviour of its controllers, and then join the two.
Watch the idea in action
before you read on
A short, verified video on exactly this idea. Pause whenever you want, then carry on with the explanation below.
A robot builder shows how trigonometry turns a target position into joint angles on real hardware.
→ Watch for the trigonometry that links joint angles to where the hand ends up; this level then puts a controller on each joint.
15 min 54 s · captions on YouTube · source
Nothing loads from YouTube until you press play.
02The idea
Forward kinematics: angles in, position out
A planar arm with two rotating joints is a chain of two arrows. The first link starts at the shoulder, which we put at the origin, and points at angle θ1 from the x-axis. The second link starts at the elbow and points at angle θ1 + θ2, because the elbow angle θ2 is measured relative to the first link. Adding the two arrows gives the hand position.
This is forward kinematics: given the joint angles, find where the hand is. It always has exactly one answer, which makes it the natural thing for a robot to compute from its joint sensors many times a second.
A joint is a dynamic system
The angles in that formula are whatever the joints actually reach. A joint is driven by a motor through a controller, and the motor can't jump instantly to a new angle. A useful simple model is a first-order system:
τ · dθ/dt = −θ + K · u
Here u is the controller's command, K is how many degrees of steady angle one unit of command produces, and τ (the time constant) sets how sluggish the joint is. If you apply a constant command, the angle rises towards K · u and covers about 63 % of the remaining distance every τ seconds.
Putting a P controller around it
With proportional control, u = Kp · (θcmd − θ). Substituting into the model and rearranging gives another first-order system, with two important properties:
- it settles at θ = θcmd · KKp ÷ (1 + KKp), short of the command, as you saw at Level 2;
- it moves faster than the bare joint, with closed-loop time constant τ ÷ (1 + KKp).
So raising Kp does two good things at once: it shrinks the leftover error and speeds up the response. The price, which Level 4 explores, is that real joints are not perfectly first-order, and too much gain makes them overshoot and ring.
From joint error to hand error
Errors don't stay at the joint. A shoulder that settles 15° short swings the entire arm, so the hand moves along an arc whose radius is the distance from the shoulder to the hand. For small angles, measured in radians:
hand movement ≈ (distance from joint to hand) × (angle error)
That is why shoulder errors matter more than elbow errors: the shoulder is further from the hand.
Uncertainty, not just error
A steady-state error is predictable, so it can be corrected. Sensor uncertainty can't: if the shoulder encoder is only trustworthy to ±1°, the hand position is only known to within roughly r × (1° in radians). Engineers carry these uncertainties through every calculation, so that when they say "the hand is at 17.3 cm" they also know whether that means ±0.1 cm or ±1 cm.
Recap
Forward kinematics turns joint angles into a hand position. A P-controlled joint behaves like a first-order system that settles short of its command, by a predictable amount, with a predictable speed. Combine the two models and you can predict where the hand really lands, and how uncertain that prediction is.
03See it move
Predict before you experiment
As θ2 goes from 0° to 180° with θ1 fixed at 0°, how does the tip's distance from the base change?
04The maths
Forward kinematics
For link lengths L1, L2 and joint angles θ1, θ2:
x = L1·cos θ1 + L2·cos(θ1 + θ2)
y = L1·sin θ1 + L2·sin(θ1 + θ2)The distance from the shoulder to the hand follows from the law of cosines:
r = √(L1² + L2² + 2·L1·L2·cos θ2)
The P-controlled joint
Start from the joint model and the control law:
τ·dθ/dt = −θ + K·u
u = Kp·(θcmd − θ)Substitute u and collect the θ terms:
τ·dθ/dt = −(1 + K·Kp)·θ + K·Kp·θcmdDivide through by (1 + K·Kp):
(τ / (1 + K·Kp))·dθ/dt = −θ + (K·Kp / (1 + K·Kp))·θcmdThat is a first-order system again, so from rest the angle follows
θ(t) = θss · (1 − e^(−t/τcl))
with final angle θss = θcmd · K·Kp ÷ (1 + K·Kp) and time constant τcl = τ ÷ (1 + K·Kp). After 3·τcl the joint has covered about 95 % of the way.
Small-angle error propagation
Rotating a point at distance r about a joint by a small angle Δθ moves it by about r·Δθ, with Δθ in radians (1° = π ÷ 180 ≈ 0.01745 rad). For the shoulder, r is the full shoulder-to-hand distance; for the elbow, it is L2.
05Worked example
An arm has L1 = 20 cm and L2 = 15 cm, with θ1 = 30° and θ2 = 60°. Where is the hand? If the shoulder angle is only known to ±1°, roughly how uncertain is the hand position because of it? Compare with a ±1° uncertainty at the elbow.
Show the worked solution
Hand position. θ1 + θ2 = 90°.
x = 20·cos 30° + 15·cos 90° = 17.32 + 0 = 17.32 cm
y = 20·sin 30° + 15·sin 90° = 10.00 + 15.00 = 25.00 cmDistance from the shoulder. r = √(17.32² + 25.00²) ≈ 30.41 cm.
Shoulder uncertainty. 1° = 0.01745 rad, so the hand moves about 30.41 × 0.01745 ≈ 0.53 cm. Checking directly: with θ1 = 31° the hand is at (16.88, 25.30), which is 0.53 cm from (17.32, 25.00).
Elbow uncertainty. The elbow only swings the forearm, so r = L2 = 15 cm and the hand moves about 15 × 0.01745 ≈ 0.26 cm.
Conclusion. The same 1° matters about twice as much at the shoulder, because the shoulder is twice as far from the hand. If you could afford one better encoder, it should go on the shoulder.
06Your experiment
- In the kinematics lab, use forward-kinematics mode with two links, L1 = 20 cm and L2 = 15 cm.
- Set θ1 = 30° and θ2 = 60°. Read the tip position and check it against the worked example.
- Change θ1 to 31°. Read the new tip position and work out how far the tip moved.
- Return θ1 to 30° and change θ2 to 61° instead. Again work out how far the tip moved.
- Now open the feedback lab, choose a P controller and set Kp = 9. Treat the output as a joint angle commanded to 1 (100 % of the command). Read the final value and estimate the time at which the line reaches 95 % of that final value.
Record: Write down both tip movements and the ratio between them, and explain the ratio using distances from each joint. From the feedback lab, record the final value and the 95 % time, and compare them with Kp ÷ (1 + Kp) and 3·τ ÷ (1 + Kp) for τ = 1 s.
07Guided practice
With L1 = 20 cm and L2 = 15 cm, where is the hand when θ1 = 90° and θ2 = −90°?
Hint
The first link points straight up; the second link's absolute angle is θ1 + θ2 = 0°.
Answer
x = 20·cos 90° + 15·cos 0° = 15 cm; y = 20·sin 90° + 15·sin 0° = 20 cm. The hand is at (15, 20) cm.
An elbow joint with K = 1 and τ = 1 s is P-controlled with Kp = 9 and commanded to 40°. What angle does it settle at, and what is its closed-loop time constant?
Hint
θss = θcmd · K·Kp ÷ (1 + K·Kp) and τcl = τ ÷ (1 + K·Kp).
Answer
θss = 40° × 9 ÷ 10 = 36°. τcl = 1 s ÷ 10 = 0.1 s, so it is about 95 % of the way there after 0.3 s.
The arm is fully stretched out (θ2 = 0°, so r = 35 cm). The shoulder encoder is uncertain by ±2°. Roughly how uncertain is the hand position?
Hint
Convert 2° to radians and multiply by r.
Answer
2° = 0.0349 rad, so about 35 × 0.0349 ≈ 1.22 cm.
08Check your understanding
09Technical challenge
Back to the pen-placing arm: L1 = 20 cm, L2 = 15 cm. The elbow reaches θ2 = 30° exactly. The shoulder is a first-order joint with K = 1 and a P controller with Kp = 3, commanded to 60°. Once the shoulder has settled, what is the hand's x-coordinate?
10Engineering & research
Industrial arms meet this problem constantly. Their positioning accuracy depends on the joint controllers, the encoders and the link geometry together, which is why manufacturers calibrate arms and specify repeatability separately from accuracy.
In Tactiverge's proposed TV-01 study, two arms would hold a deformable object between them. If each arm's hand position is uncertain by a few millimetres, the object gets stretched or squashed in ways neither arm intended. One planned role for the gripper force sensors is to notice those unintended forces directly instead of trusting the kinematic estimate alone. The analysis in this lesson, carrying joint errors and uncertainties through to the hand, is the kind of reasoning a study like TV-01 needs before choosing sensors and tolerances. TV-01 has not been carried out and has no results; it is a research question and a design, not evidence.
Kinematics · as a Innovator
For a two-link arm, x = L1·cos θ1 + L2·cos(θ1 + θ2) and y = L1·sin θ1 + L2·sin(θ1 + θ2). A small joint error moves the hand by about its distance from the joint times the angle in radians.
Something unclear or not working here? Tell us.
Original Tactiverge material, not yet externally reviewed by educators. CC BY 4.0.