TactivergeOffline

Level 3 Intelligent Robotic Systems · Term 2: The Mathematics of Motion

Vectors, trigonometry, matrices and transforms, put to work describing where a robot's parts are and how to move them, and opening the aerospace thread: body and world frames, heading to waypoints, projectiles and why an orbit is falling around.

In this file: 36 lessons across weeks 10–18, with 180 practice questions (questions only, no answers).

Design, model and evaluate simulated robotic systems that integrate computation, the mathematics of motion, perception and feedback, and compare them fairly against alternatives. Levels describe what you can do, not your age. About About 3–4 hours a week: 1.5 hours of lessons, 1–1.5 hours of coding or lab work and 30–60 minutes of analysis and writing..

Week 10: Vectors

This week you will

Vectors: arrows you can add

A drone flies 3 m east, then 4 m north. It is 5 m from where it started, not 7. Where did the other 2 m go?

About 30 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Every position, velocity and force a robot deals with has a size and a direction. A single number like "5 m" is not enough to tell a drone where to go. Vectors are the bookkeeping that makes motion calculable: break everything into x and y parts, add the parts, and the answer falls out.

Goals

Predict

Vector a = (3, 1) and vector b = (1, 2.5). Which is the sum a + b?

  1. (4, 3.5)
  2. (3, 2.5)
  3. (4.5, 3.5)
  4. Its length is |a| + |b|, so you can't write it as components

Write down your guess and your reason. The reveal is in the online lesson.

Discover

In 'Add tip to tail', set a = (3, 1) and b = (1, 2.5). Check the green sum against your prediction. Now make b point exactly opposite to a. What happens to a + b? Then find a b for which |a + b| = |a| + |b|.

What the interactive shows, in words

The vector playground draws vector a in blue from the origin, vector b in orange starting at the tip of a, and their sum in dashed green from the origin to the tip of b. The readout lists every component, the sum and its length, and the same information is in the text above.

Understand

Size and direction, written as components

A vector is a quantity with a size and a direction, such as a displacement, a velocity or a force. In 2D we write it as two components, v = (vx, vy): how far along x, then how far along y, measured in some coordinate frame. The same arrow drawn anywhere on the page is the same vector; only its components matter.

Adding: tip to tail, or part by part

To add a and b, draw b starting where a ends; the sum runs from the start of a to the end of b. Algebraically that is just a + b = (ax + bx, ay + by). Subtraction works the same way: a − b is the arrow from the tip of b to the tip of a. Scaling by a number k multiplies both parts: k·a = (k·ax, k·ay).

Magnitude: Pythagoras in disguise

The components form the two short sides of a right-angled triangle, so the length (magnitude) is |v| = √(vx² + vy²). Lengths do not add like components: |a + b| ≤ |a| + |b|, with equality only when a and b point the same way. That is the drone's missing 2 m: 3 east + 4 north is (3, 4), length 5.

Explain it another way: intuitive

A vector is a set of walking instructions: 'three steps east, one step north'. Two sets of instructions combine by doing one then the other, and you can tally the easts and the norths separately. How far you end up from the start is a different question, answered by Pythagoras.

Explain it another way: technical

In ℝ² a vector is an ordered pair of real numbers relative to a basis (here the unit vectors along x and y). Vector addition and scalar multiplication act component-wise; the Euclidean norm |v| = √(v·v) measures length and obeys the triangle inequality.

Explain it another way: mathematical

a = (3, 1), b = (1, 2.5): a + b = (4, 3.5), |a + b| = √(16 + 12.25) = √28.25 ≈ 5.315. |a| = √10 ≈ 3.162, |b| = √7.25 ≈ 2.693, so |a| + |b| ≈ 5.855 > 5.315.

Explain it another way: applied

A drone's flight controller adds its own velocity vector to the wind's velocity vector to predict where it will actually drift, and a robot arm's hand position is the sum of one vector per link.

Try these examples

Example 1

A rover drives a = (5, −2) m, then b = (−1, 6) m. Where does it end up, and how far is that from the start?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. a = (2, −3) and b = (−5, 4). What is the x component of a + b?

Answer:

2. What is the magnitude of the vector (6, 8)?

Answer:

3. A drone flies a = (−2, 0) m, then b = (1, 1) m. How far is it from where it started, in metres? (2 decimal places)

Answer: m

4. Two forces of 30 N and 40 N act on a bracket. Which total is impossible?

  • 10 N
  • 50 N
  • 70 N
  • 80 N

5. What is 3 × (−2, 1.5)?

  • (−6, 4.5)
  • (1, 4.5)
  • (−6, 1.5)
  • (−5, 4.5)

Apply it

A delivery drone must reach (12, 5) m from its pad but a wall forces it to fly (4, 0) m first. Write the second leg as a vector and give its length. Then check your answer in the vector playground (scale it down by 2 to fit the grid).

Reflect

Why do engineers insist on writing a direction alongside every force, when a number like '50 N' sounds complete?

Go further (online)

Which way is it pointing? Direction with atan2

Your calculator says tan⁻¹(−1 ÷ −1) = 45°. But (−1, −1) points down and to the left. Who is wrong?

About 30 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Robots constantly flip between two descriptions of the same arrow: components (good for adding) and length plus angle (good for steering a wheel or setting a joint). Getting the angle wrong by 180° sends a rover backwards, so every robotics library has a special function, atan2, to get it right.

Goals

Predict

Which direction (anticlockwise from +x) does the vector (−1, −1) point in?

  1. 45°
  2. 135°
  3. 225°
  4. 315°

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Set b = (0, 0) so that a + b is just a. Put a in each quadrant in turn: (3, 2), (−3, 2), (−3, −2), (3, −2), and record the direction the readout gives. For each, also compute tan⁻¹(y/x) on a calculator. Which quadrants does tan⁻¹ get wrong?

What the interactive shows, in words

In the vector playground, a blue arrow from the origin can be set to any component values; the readout gives its length and its direction from atan2 in degrees. Placing it in each quadrant shows directions of about 34°, 146°, 214° and 326° for (±3, ±2).

Understand

Two ways to write the same arrow

Components: (x, y). Polar form: length r and direction θ, measured anticlockwise from +x. To go from polar to components: x = r cos θ, y = r sin θ. To go back: r = √(x² + y²) and θ from the inverse tangent, carefully.

Why tan⁻¹(y/x) lies

tan θ = y/x, but dividing throws away the signs: (1, 1) and (−1, −1) both give y/x = 1. So tan⁻¹ can only answer between −90° and 90°: it is right for vectors pointing rightwards (x > 0) and exactly 180° out for vectors pointing leftwards. At x = 0 it divides by zero.

atan2: the angle that knows its quadrant

atan2(y, x) takes the two parts separately, checks their signs and returns an angle in (−180°, 180°]. Add 360° to negative answers if you want 0–360°. It is in every language: Python's math.atan2, JavaScript's Math.atan2, C's atan2. Note the order: y first. Robot code uses it to turn components back into headings and joint angles.

Explain it another way: intuitive

tan⁻¹ is like asking 'how steep is this line?' A line has two ends, so steepness can't tell you which end the arrow points to. atan2 looks at the arrow's actual x and y and says which way it really points.

Explain it another way: technical

atan2(y, x) equals tan⁻¹(y/x) for x > 0, tan⁻¹(y/x) + 180° for x < 0 and y ≥ 0, tan⁻¹(y/x) − 180° for x < 0 and y < 0, and ±90° on the y-axis; it is undefined only at the origin.

Explain it another way: mathematical

(−3, 2): r = √13 ≈ 3.606; tan⁻¹(2/−3) = −33.7°, wrong; atan2(2, −3) = 146.3°. Check: 3.606 × cos 146.3° ≈ −3.000, 3.606 × sin 146.3° ≈ 2.000.

Explain it another way: applied

A mobile robot that knows its target is at (−3, 2) m relative to itself turns to atan2(2, −3) ≈ 146° before driving. With tan⁻¹ it would face −34° and drive away from the target.

Try these examples

Example 1

Give the direction of (4, −9) in degrees from 0 to 360.

The worked solution is in the online lesson.

Example 2

A 2.5 m link points at 200°. Where is its tip?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. atan2(3, −4) is closest to which angle?

  • −36.9°
  • 36.9°
  • 143.1°
  • 216.9°

2. What is the direction of the vector (−6, 6), in degrees measured anticlockwise from the +x axis? Give a value from 0 to 360.

Answer: °

3. A robot link 0.8 m long points at 140° (anticlockwise from +x). What is the y position of its tip, in metres? (3 decimal places)

Answer: m

4. A target is at (−5, 12) m from a robot. How far away is it, in metres?

Answer: m

5. For which vector does tan⁻¹(y/x) give the correct direction?

  • (−2, 5)
  • (3, −1)
  • (−1, −1)
  • (0, 4)

Apply it

Write a three-line Python function heading(x, y) that returns a direction in degrees from 0 to 360 using math.atan2 and math.degrees. Test it on one vector in each quadrant and on (0, −3).

Reflect

Describe a real robot failure that could come from using tan⁻¹ instead of atan2. Who would notice first, and how?

Go further (online)

The dot product: how much do two arrows agree?

One number can tell a robot whether a target is in front of it or behind it, without a single angle being measured. How?

About 35 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

The dot product turns two arrows into a single number that measures how much they point the same way. Robots use it to check whether an obstacle is ahead, how much of a force pushes along a rail, and how bright a lit surface looks. It's the cheapest useful calculation in all of geometry.

Goals

Predict

a = (3, 1) and b = (−1, 3). Without drawing, what can you say about the angle between them?

  1. Less than 90°
  2. Exactly 90°
  3. More than 90°
  4. You need a protractor to know

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Switch to 'Dot product and angle'. Keep b = (3, 0). Swing a round (try (3, 2), (0, 3), (−2, 2), (−3, −1)). Watch the sign of a · b and the green shadow. When is the dot product zero? When is it biggest for a fixed |a|?

What the interactive shows, in words

In dot-product mode the playground draws a and b from the origin and shades the shadow of a along b in green. The readout gives the dot product, both lengths, the angle between them and the shadow length. For b = (3, 0) the dot product is 3 × a's x part: positive when a leans right, zero when a points straight up or down, negative when it leans left.

Understand

The recipe

a · b = ax·bx + ay·by: multiply matching parts and add. The result is a plain number (a scalar), not a vector. Order doesn't matter: a · b = b · a. And a · a = |a|², so the dot product contains Pythagoras.

What the sign says

From a · b = |a||b| cos θ: positive when the angle is under 90° (pointing roughly together), zero when perpendicular, negative when over 90° (pointing roughly apart). Lengths are never negative, so the sign comes entirely from cos θ.

Angles and shadows

Rearranged, cos θ = a · b ÷ (|a||b|), which gives the angle between any two non-zero vectors. And a · b ÷ |b| is the scalar projection of a on b: the length of a's shadow along b's direction. That is how a robot finds the part of a force that acts along a slide, or how far ahead an obstacle is along its heading.

Explain it another way: intuitive

Imagine shining a torch straight down onto b. a casts a shadow along b. A long shadow pointing the same way gives a big positive dot product; a shadow pointing backwards gives a negative one; no shadow at all means the arrows are at right angles.

Explain it another way: technical

The dot product is the standard inner product on ℝ². It is linear in each argument, symmetric, and positive-definite (a · a > 0 for a ≠ 0). It is invariant under rotation, so the angle it measures doesn't depend on the frame you choose.

Explain it another way: mathematical

a = (3, −6), b = (−1, −6): a · b = −3 + 36 = 33. |a| = √45 ≈ 6.708, |b| = √37 ≈ 6.083. cos θ = 33 / 40.80 ≈ 0.8087, θ ≈ 36.0°.

Explain it another way: applied

A rover with heading vector h = (cos ψ, sin ψ) and a rock at relative position r computes h · r. Positive: the rock is ahead. Negative: behind. Its size is how far ahead, measured along the heading. No trigonometry needed in the loop.

Derivation: Why a · b = |a||b| cos θ (from the law of cosines)
  1. Draw a and b from the same point, with angle θ between them. The third side of the triangle is the vector a − b.

  2. The law of cosines for that triangle says: |a − b|² = |a|² + |b|² − 2|a||b| cos θ.

  3. Expand the left side with components: |a − b|² = (ax − bx)² + (ay − by)² = ax² + ay² + bx² + by² − 2(ax·bx + ay·by).

  4. But ax² + ay² = |a|² and bx² + by² = |b|², so the left side is |a|² + |b|² − 2(ax·bx + ay·by).

  5. Compare the two expressions: the |a|² and |b|² cancel, leaving ax·bx + ay·by = |a||b| cos θ. The component recipe and the geometric meaning are the same number.

Try these examples

Example 1

Is the target at r = (−2, 5) ahead of or behind a robot facing h = (0.6, −0.8)?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. Find a · b for a = (4, −1) and b = (2, 3).

Answer:

2. Find the dot product a · b for a = (−5, 5) and b = (−4, −5).

Answer:

3. What is the angle between a = (−2, 0) and b = (1, 1), in degrees (0 to 180)?

Answer: °

4. Which vector is perpendicular to (2, 5)?

  • (5, 2)
  • (−5, 2)
  • (2, −5)
  • (−2, −5)

5. A 10 N force F = (8, 6) N pushes a cart that can only roll along the x axis. How many newtons act along the rail? (Hint: dot F with the unit vector (1, 0).)

Answer: N

Apply it

Write a function is_ahead(heading_deg, rx, ry) that returns True when a point at (rx, ry) relative to a robot is in front of it, using only a dot product. Test it with a heading of 90° and points (0, 3), (2, −1) and (−4, 0.5).

Reflect

The dot product doesn't change when you rotate both vectors together. Why is that a useful property for a robot whose sensors spin with it?

Go further (online)

Week 11: Coordinate frames

This week you will

One point, many addresses: coordinate frames

The gripper's camera says the cup is 10 cm ahead. The base says it is 52 cm to the right. They are both correct. How?

About 30 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

A robot has a frame for the world, one for its base, one for each link and one for each sensor. Each sensor reports in its own frame. Before the robot can act, it must translate every measurement into one common frame. Most real-world robot bugs are not bad maths but a number used in the wrong frame.

Goals

Predict

A robot arm's hand is at (0.6, 0.2) m in the base frame. The whole robot is bolted to a table at (2, 1) m in the room frame, not rotated. Where is the hand in the room frame?

  1. (0.6, 0.2)
  2. (2.6, 1.2)
  3. (1.4, 0.8)
  4. It depends on the joint angles

Write down your guess and your reason. The reveal is in the online lesson.

Discover

In the robot-arm lab, the readout gives the hand position in the base frame. Pick a pose and write it down. Now imagine sticking a frame on the elbow, with its x axis along link 2. What are the hand's coordinates in that elbow frame? (Hint: they never change, whatever the angles.)

What the interactive shows, in words

The robot-arm lab shows a two-link arm and its hand position in the base frame. Without it: at θ1 = 0 and θ2 = 0 a 0.5 m + 0.3 m arm has its hand at (0.8, 0) m in the base frame, at (0.3, 0) m in a frame on link 2, and, if the base sits at (2, 1) m in a room with parallel axes, at (2.8, 1) m in the room frame.

Understand

A frame is an origin plus axes

A coordinate frame is a chosen origin and a pair of perpendicular unit axes (x and y in 2D). A point's coordinates are its distances along those axes from that origin. Change the origin or turn the axes and the numbers change, even though the point hasn't moved.

Every part gets a frame

Robots typically use a world frame fixed to the room, a base frame on the robot, a frame on each link (x along the link) and a tool frame at the gripper tip. Sensors have frames too: a camera measures in a camera frame. We label points with the frame they're in, for example p_base or p_camera, and never mix them.

Translating between frames

If frame B's origin sits at t in frame A and B's axes are not rotated, then p_A = p_B + t. If B is also rotated, the axes no longer line up and we must rotate first: p_A = R·p_B + t. Rotations need matrices (week 13); the full move between frames is a transform (week 14). For now: always ask 'in which frame is this number?'.

Explain it another way: intuitive

Your house has an address on your street, a grid reference on a map and a latitude and longitude. Three sets of numbers, one house. A frame is just the choice of 'measured from where, and along which directions'.

Explain it another way: technical

A frame is an affine coordinate system: an origin O and an orthonormal basis. The coordinates of a point P in frame F are the components of the vector from O_F to P along F's basis vectors. A pure translation between frames adds a constant vector; a rotation mixes components.

Explain it another way: applied

A warehouse robot's lidar sees a shelf 1.2 m ahead in the lidar frame. The software converts that into the robot frame (the lidar is mounted 0.3 m forward of the centre) and then into the map frame using the robot's position, so that the shelf lands in the right place on the shared map.

Try these examples

Example 1

A camera is mounted 0.1 m forward and 0.05 m up from a gripper's origin, not rotated. It sees a cup at (0.25, −0.05) m in its own frame. Where is the cup in the gripper frame?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. Frame B's origin is at (3, −1) in frame A, with the same axis directions. A point is at (2, 4) in B. What is its x coordinate in A?

Answer:

2. A robot's distance sensor reports 'obstacle at 0.8 m'. What is missing before the robot can put it on its map?

  • Nothing: 0.8 m is 0.8 m
  • The frame it is measured in, and where that frame is on the robot and in the world
  • The colour of the obstacle
  • A more accurate sensor

3. A tool tip is at (5.4, 2.0) m in the world. The robot base origin is at (4.0, 1.5) m in the world, not rotated. What is the tip's y coordinate in the base frame?

Answer: m

4. A gripper frame has its origin at (0, 3) in the world and is rotated 180°. A sensor sits at (3, 0) in the gripper frame. What is its world y coordinate? (3 decimal places)

Answer:

5. A frame is attached to link 2 of an arm, origin at the elbow, x axis along the link. The link is 0.3 m long. Where is the hand in this frame, whatever the joint angles?

  • (0.3, 0)
  • (0, 0.3)
  • It changes with θ2
  • (0.3, 0.3)

Apply it

Sketch a two-link arm and draw four frames: world, base, link 1 (at the shoulder, x along link 1) and link 2 (at the elbow, x along link 2). Label the hand's coordinates in the link 2 frame and in the link 1 frame for θ2 = 0.

Reflect

Think of a time you gave or received directions that went wrong. Was it really a frame problem ('your left or my left?')?

Go further (online)

Body frame, world frame: how a vehicle sees the world

A pilot says 'traffic at two o'clock'. Air traffic control says 'traffic north-east of you'. Same aircraft. Why two languages?

About 35 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Aircraft, drones, rovers and spacecraft all juggle two frames. The world frame is where the map and the mission live. The body frame rides with the vehicle: that's where its sensors, wings, wheels and thrusters are. Navigation is the job of translating between them, quickly and correctly, all the time.

Goals

Predict

An aircraft heads due east. A waypoint is due north of it. In the aircraft's body frame (x forward, y left), where is the waypoint?

  1. Ahead
  2. To the left
  3. To the right
  4. Behind

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Start with the aircraft. Choose ALPHA and read its body-frame position. Now change only the heading, in steps of 45°. Which numbers in the readout change, and which stay the same? Switch to the spacecraft: what replaces 'north'?

What the interactive shows, in words

The diagram shows a top-down map with a vehicle icon, its forward (blue) and left (green) body axes, and a diamond-shaped waypoint joined to it by a dashed line. The readout gives the waypoint's world coordinates, distance and bearing, plus its body-frame forward and left distances. Turning the vehicle changes only the body-frame numbers.

Understand

Two frames, two jobs

The world frame is fixed: for an aircraft or rover, east (x) and north (y) on a flat map; for a spacecraft, axes pointing at chosen distant stars, because space has no 'north'. The body frame moves with the vehicle: x out of the nose, y out of the left side (and z up in 3D). Engines push along body axes; maps and waypoints are given in world axes.

Heading links them

Heading is the compass direction of the nose, in degrees clockwise from north. Maths angles go anticlockwise from +x (east). So the nose's maths angle is ψ = 90° − heading. A heading of 0° (north) is ψ = 90°; heading 90° (east) is ψ = 0°. Mixing the two conventions is a classic navigation bug.

What changes when you turn

Turn the vehicle and every body-frame coordinate of the outside world changes, while world-frame coordinates stay put. That is why a pilot's 'two o'clock' needs updating after every turn, while air traffic control's 'north-east' does not. Converting a world point into the body frame means: subtract the vehicle's position, then rotate by −ψ.

Explain it another way: intuitive

Stand in a room and point at the door. Turn round: the door is now behind you, though it hasn't moved. 'Behind you' is a body-frame fact; 'on the east wall' is a world-frame fact.

Explain it another way: technical

Body-to-world is a rigid transform: p_world = R(ψ)·p_body + p_vehicle, where R is the rotation by the nose angle ψ. World-to-body is its inverse: p_body = R(−ψ)·(p_world − p_vehicle). For aircraft in 3D, the body axes are roll, pitch and yaw axes and R is 3×3.

Explain it another way: mathematical

Heading 90° (east) → ψ = 0°. Waypoint 3 km north: d = (0, 3). Rotating by −0° changes nothing: forward = 0, left = 3 km. Heading 0° (north) → ψ = 90°: forward = d·(cos 90°, sin 90°) = 3, left = d·(−sin 90°, cos 90°) = 0. Dead ahead.

Explain it another way: applied

An autopilot holds waypoints in world coordinates from the flight plan. Several times a second it converts the next waypoint into the body frame to decide how much to bank left or right.

Try these examples

Example 1

A simulated drone is at (0, 0) heading 180° (south). A waypoint is at (4, 0) km (east). Where is it in the body frame?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. A vehicle's compass heading is 30°. What is the mathematical angle of its nose (anticlockwise from east), in degrees?

Answer: °

2. An aircraft turns 90° to the right without moving. What happens to a waypoint's coordinates?

  • Both world and body coordinates change
  • Only the world coordinates change
  • Only the body coordinates change
  • Nothing changes

3. In a simulation, an aircraft is at (−4, 0) km with its nose pointing 135° anticlockwise from the world +x axis. A waypoint is at (4, −2) km. In the aircraft's body frame (x forward, y to the left), what is the waypoint's forward (x) coordinate, in km? (2 decimal places; negative means behind)

Answer: km

4. Why does a spacecraft's world frame use distant stars instead of north?

  • Compasses are too heavy to launch
  • There is no magnetic or geographic north away from a planet, but distant stars barely move
  • Stars are brighter than the Sun
  • It doesn't need a world frame

5. A rover heads north (ψ = 90°) from (0, 0). A rock is at (−3, 5) m. How far to the LEFT of the rover is it, in metres? (Body frame: y is left.)

Answer: m

Apply it

In the diagram, set the aircraft at (−4, −4) km with heading 30°. Predict ALPHA's body-frame position on paper (subtract, then rotate by −ψ), then check against the readout. Repeat for BRAVO.

Reflect

When you give directions to a friend on the phone, do you use their body frame or a world frame? Which is less likely to go wrong, and why?

Go further (online)

Heading for a waypoint: bearings and turns

A rover 200 million km from Earth must drive to a rock nobody can steer it towards in real time. What numbers does it need?

About 35 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Waypoint navigation is the backbone of autopilots, drones, ships and planetary rovers: a list of points on a map, and a loop that keeps turning towards the next one. The maths is a vector subtraction, an atan2 and one careful subtraction of angles. Getting the wrap-around at 360° right is what separates a smooth turn from a full pirouette.

Goals

Predict

You are heading 350° and the waypoint's bearing is 10°. Which turn is best?

  1. Turn left 340°
  2. Turn right 20°
  3. Turn right 340°
  4. Turn left 20°

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Put the aircraft at (−4, −4) km. For each of ALPHA, BRAVO and CHARLIE: predict the bearing with atan2(east, north), press 'Turn towards the target' to check, then use 'Move 2 km forward' until you arrive. How did the relative bearing change as you flew?

What the interactive shows, in words

The diagram lists the waypoint's distance and compass bearing and the relative bearing ('turn right 35°'). Pressing 'Turn towards the target' sets the heading to the bearing (rounded to 5°); 'Move 2 km forward' steps the vehicle along its nose. Repeating the step brings the distance down to a few hundred metres.

Understand

Bearing: atan2 with the arguments swapped

The displacement to the waypoint is d = (east, north) = (wx − x, wy − y). Its distance is |d|. Its compass bearing is measured from north towards east, so it is atan2(east, north), the maths angle formula with the two arguments swapped. Add 360° to negative results to get 0–360°.

Relative bearing: how far to turn

The relative bearing is bearing − heading, folded into (−180°, 180°]. Positive means turn right (clockwise), negative means turn left. Folding matters: from heading 350° to bearing 10° the raw difference is −340°, which folds to +20°. Forgetting this sends vehicles spinning the long way round.

Routes are lists of legs

A route is a list of waypoints. Each leg has a bearing and a length, found from the displacement between consecutive points. A simple guidance loop: compute the relative bearing to the current waypoint, turn to reduce it, move, and switch to the next waypoint once within some arrival radius. Real autopilots add wind, speed limits and smoother turns, but the skeleton is this.

Explain it another way: intuitive

Bearings are 'which way on the map'; relative bearings are 'which way from my nose'. You need both: the map tells you where to go, your nose tells you how to turn.

Explain it another way: technical

bearing = atan2(Δe, Δn) mod 360°; relative = ((bearing − heading + 180°) mod 360°) − 180°. Arrival is declared when |d| < r_arrive. The heading command can be a proportional controller on the relative bearing.

Explain it another way: mathematical

From (3, −6) km to (2, −13) km: Δ = (−1, −7). Distance = √50 ≈ 7.07 km. Bearing = atan2(−1, −7) ≈ −171.9° → 188.1°. If the heading is 170°, relative = +18.1°: turn right 18°.

Explain it another way: applied

Mars rovers receive routes as waypoints planned on Earth, then drive each leg themselves, using their own cameras to check progress, because a radio round trip can take tens of minutes.

Try these examples

Example 1

A rover at (0, 0) km must visit A = (3, 4) then B = (3, −2). Give each leg's bearing and length.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. A waypoint is 5 km east and 5 km north of you. What is its compass bearing, in degrees?

Answer: °

2. A rover is 4 km west and 4 km north of its lander. Its next waypoint is 9 km west and 2 km south of the lander. What compass bearing should it head on (degrees clockwise from north, 0 to 360)?

Answer: °

3. Heading 300°, waypoint bearing 40°. What is the relative bearing, in degrees from −180 to 180 (positive = turn right)?

Answer: °

4. Which call gives a compass bearing (clockwise from north) for a displacement of e km east and n km north?

  • atan2(n, e)
  • atan2(e, n)
  • tan⁻¹(n / e)
  • atan2(e, n) − 90°

5. Leg from (−2, 1) km to (4, 9) km. How long is it, in km?

Answer: km

Apply it

Plan a three-waypoint route for a simulated rover from (0, 0) that visits all three diagram waypoints (ALPHA (6, 8), BRAVO (−7, 4), CHARLIE (3, −8)) in the shortest order you can find. Give each leg's bearing and length, and the total distance. Then explore the Planetary Rover Build's navigation level.

Reflect

A drone keeps overshooting waypoints and circling back. Using the idea of an arrival radius, explain one likely cause and one fix.

Go further (online)

Week 12: Trigonometric models

This week you will

Radians and the unit circle

Why would anyone measure a full turn as 6.283… instead of a nice round 360?

About 30 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Robot joints, motors and every maths library think in radians. Python's math.sin(90) is not 1; it is about 0.894, because 90 is read as 90 radians. And defining sine and cosine on a circle, rather than in a triangle, is what lets them handle angles of 120°, 270° or −45°, which joints reach every day.

Goals

Predict

In Python, math.sin(math.pi / 2) returns…

  1. 0.0
  2. 1.0
  3. 0.0274
  4. An error

Write down your guess and your reason. The reveal is in the online lesson.

Discover

On the unit circle, step θ from 0° to 355°. Watch the blue cos bar and orange sin bar. Find the four angles where one of them is exactly 0. Where is cos negative? Where are both negative? Note θ in radians at 90°, 180° and 360°.

What the interactive shows, in words

The unit-circle explorer draws a circle of radius 1 with a point at angle θ. A blue horizontal bar shows cos θ and an orange vertical bar shows sin θ. The readout gives θ in degrees and radians, both values and the quadrant. At 0°, 90°, 180° and 270° the point is at (1, 0), (0, 1), (−1, 0) and (0, −1).

Understand

What a radian is

Wrap the radius of a circle around its edge: the angle it covers is 1 radian (about 57.3°). A full circle's edge is 2π radii long, so a full turn is 2π rad = 360°, and π rad = 180°. To convert: degrees × π/180 = radians; radians × 180/π = degrees. Arc length is simply s = r·θ when θ is in radians.

Sine and cosine live on a circle

Draw a circle of radius 1 centred on the origin. Go anticlockwise through angle θ from +x. The point you land on is (cos θ, sin θ). That's the definition, and it works for every angle, including 200° and −30°. The triangle definitions (opposite over hypotenuse) are the special case 0° < θ < 90°.

Signs by quadrant

Quadrant 1 (0–90°): both positive. Quadrant 2 (90–180°): cos negative, sin positive. Quadrant 3 (180–270°): both negative. Quadrant 4 (270–360°): cos positive, sin negative. And always cos²θ + sin²θ = 1, because the point sits on a circle of radius 1.

Explain it another way: intuitive

A radian is a 'natural' angle: walk around a round table by exactly one radius of the table, and you've turned one radian. Degrees are a human choice (360 is easy to divide); radians come from the circle itself.

Explain it another way: technical

With θ in radians, d/dθ sin θ = cos θ and sin θ ≈ θ for small θ. These clean formulas are why calculus, physics and software use radians; in degrees every formula picks up factors of π/180.

Explain it another way: mathematical

135° = 135π/180 = 3π/4 ≈ 2.356 rad. cos 135° = −√2/2 ≈ −0.707, sin 135° = +0.707 (quadrant 2). Check: 0.5 + 0.5 = 1.

Explain it another way: applied

A wheel of radius 0.05 m turning 4π rad rolls s = r·θ = 0.05 × 4π ≈ 0.628 m: two full turns. Odometry on every wheeled robot is exactly this calculation.

Try these examples

Example 1

A servo turns 2.5 rad. Is that more or less than half a turn, and how many degrees?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. Convert 60° to radians (3 decimal places).

Answer: rad

2. Convert 270° into radians. (3 decimal places)

Answer: rad

3. At θ = 250°, what are the signs of (cos θ, sin θ)?

  • (+, +)
  • (−, +)
  • (−, −)
  • (+, −)

4. A wheel of radius 0.1 m turns through 3 radians. How far does its rim travel, in metres?

Answer: m

5. A student writes y = L * math.sin(30) for a 30° joint and gets a strange answer. Why?

  • math.sin only accepts integers
  • math.sin expects radians, so it computed sin of 30 radians
  • L must be in centimetres
  • Python can't do trigonometry

Apply it

Make a table of θ = 0, 30, 45, 60, 90, 120, 180, 270° with radians (as fractions of π), cos θ and sin θ. Check each row in the unit-circle explorer and confirm cos² + sin² = 1 for two rows.

Reflect

Explain to a friend, without formulas, why a full turn is 2π radians.

Go further (online)

Modelling rotating parts: x = L cos θ, y = L sin θ

A windscreen wiper, a crane jib and a robot's first link all trace the same shape. Which equation draws all three?

About 30 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Every revolute joint turns a link about a pivot. Its tip runs round a circle of radius L, and its position is the unit circle scaled up by L. This one model, used twice, is the whole of two-link forward kinematics next term: trigonometry is how a robot knows where its hand is.

Goals

Predict

A 0.5 m link rotates from 0° to 90° in 1 second. How far does its tip travel along its arc?

  1. 0.5 m
  2. About 0.785 m
  3. About 0.707 m
  4. 1 m

Write down your guess and your reason. The reveal is in the online lesson.

Discover

In the robot-arm lab, set the elbow to 0° so the arm is one straight link of length L1 + L2. Turn only the shoulder and read the hand position at 0°, 30°, 90°, 150°, 210°. For each, check x = L cos θ and y = L sin θ on a calculator. Then do the reverse: from the readout's (x, y), recover θ with atan2.

What the interactive shows, in words

With the elbow straight, the robot-arm lab behaves as one link of length L1 + L2 turning about the shoulder. For a 0.8 m arm the hand reads (0.8, 0) at 0°, (0.693, 0.4) at 30°, (0, 0.8) at 90°, (−0.693, 0.4) at 150° and (−0.693, −0.4) at 210°.

Understand

A link is a scaled unit circle

A link of length L at angle θ (from +x, anticlockwise) has its tip at x = L cos θ, y = L sin θ. It's the unit-circle point (cos θ, sin θ) stretched by L. If the pivot is not at the origin but at (px, py), add that offset: x = px + L cos θ, y = py + L sin θ.

Going back: angle from position

Given a tip position (x, y) relative to the pivot, the joint angle is θ = atan2(y, x) and the length is √(x² + y²). This is the seed of inverse kinematics: working backwards from where the tip is (or should be) to the angle that puts it there. atan2, not tan⁻¹, because joints swing through every quadrant.

How fast does the tip move?

If the joint turns at angular speed ω (rad/s), the tip moves along its circle at v = L·ω. Long links make fast tips: a 2 m crane jib turning at 0.5 rad/s moves its tip at 1 m/s. The tip's velocity points along the circle, perpendicular to the link: (−L ω sin θ, L ω cos θ).

Explain it another way: intuitive

Hold a ruler by one end and swing it. The far end draws a circle. How far left-right it is: cos. How far up-down: sin. A longer ruler draws a bigger circle, and its end moves faster for the same swing.

Explain it another way: technical

The tip position is p(θ) = L·(cos θ, sin θ). Differentiating with respect to time gives ṗ = L·θ̇·(−sin θ, cos θ), perpendicular to p with magnitude L|θ̇|.

Explain it another way: mathematical

L = 0.8 m, θ = 150°: x = 0.8 × (−0.866) = −0.693 m, y = 0.8 × 0.5 = 0.4 m. Back: atan2(0.4, −0.693) = 150.0°, √(0.48 + 0.16) = 0.8 m. ✓

Explain it another way: applied

A crane operator's display shows the hook's position computed from the jib angle sensor with exactly this formula, plus the slewing angle for the third dimension.

Try these examples

Example 1

A crane jib 12 m long, pivoted 3 m above the ground, is raised to 40°. How high is its tip?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. A 0.4 m link at 30°. What is its tip's y coordinate, in metres?

Answer: m

2. A robot link 0.5 m long points at 300° (anticlockwise from +x). What is the x position of its tip, in metres? (3 decimal places)

Answer: m

3. What is the direction of the vector (−3, 2), in degrees measured anticlockwise from the +x axis? Give a value from 0 to 360.

Answer: °

4. A 0.6 m link turns at 2 rad/s. How fast does its tip move, in m/s?

Answer: m/s

5. A wiper pivots at (0.2, 0) m and is 0.5 m long. Which gives its tip at angle θ?

  • (0.5 cos θ, 0.5 sin θ)
  • (0.2 + 0.5 cos θ, 0.5 sin θ)
  • (0.7 cos θ, 0.7 sin θ)
  • (0.2 cos θ + 0.5, sin θ)

Apply it

A robot's single-link arm (0.35 m) must touch points at (0.2, 0.287) m and (−0.35, 0) m. For each, decide if it lies on the tip's circle, and if so give the joint angle in degrees.

Reflect

Why would a robot designer put the heaviest, slowest-moving parts close to a joint and keep long links light?

Go further (online)

Periodic motion: A·sin(ωt + φ)

A piston, a pendulum and a flapping wing repeat forever. Three numbers describe all of them. Which three?

About 35 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Anything that goes round, or back and forth, at a steady rate is a sine wave in disguise: the height of a crank pin, a robot's walking gait, a vibrating motor, an AC voltage. Engineers describe it with three numbers, amplitude, frequency and phase, and those three numbers are what you tune when you design or diagnose it.

Goals

Predict

In y(t) = 3·sin(2t), what happens to the period if you change the 3 to 6?

  1. It doubles
  2. It halves
  3. It stays the same
  4. It becomes 6 seconds

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Switch to 'Sine wave'. Change one slider at a time. Which slider changes the height? Which squeezes the wave? Which slides it sideways? Set ω so exactly 2 periods fit in 10 s (hint: T = 5 s).

What the interactive shows, in words

The sine-wave view plots y = A sin(ωt + φ) from 0 to 10 s, marks one period with an orange bar, and places a dot at the chosen time. The readout gives the period, frequency and current value. Raising A makes the wave taller only; raising ω packs more cycles in; changing φ slides it left or right.

Understand

The shadow of a circle

A point going round a circle of radius A at a steady ω radians per second has height y(t) = A·sin(ωt + φ), where φ is its starting angle. Its shadow on a wall bobs up and down: that is simple periodic (harmonic) motion. A crank pin, a wheel's valve and a rotating cam all make exactly this.

Three numbers

Amplitude A: the biggest distance from the middle. Angular frequency ω (rad/s): how fast the angle grows. One cycle is 2π, so the period T = 2π/ω and the frequency f = 1/T = ω/2π (in hertz). Phase φ: where in the cycle it starts; a positive φ shifts the wave earlier by φ/ω seconds.

Reading a graph

Peak height (from the middle line) = A. Time between two peaks = T, so ω = 2π/T. Where the wave crosses upwards through zero, compared with t = 0, gives the phase. Always check your calculator is in radians: ωt + φ is an angle in radians.

Explain it another way: intuitive

Picture a Ferris wheel. Your height goes up and down smoothly forever. The wheel's radius sets how high and low (amplitude), its spin rate sets how often (frequency), and the seat you got on sets where you start (phase).

Explain it another way: technical

x(t) = A sin(ωt + φ) solves ẍ = −ω²x: any system whose restoring acceleration is proportional to displacement (springs, small pendulum swings) oscillates sinusoidally at ω.

Explain it another way: mathematical

y = 2 sin(2π × 0.5 × t): A = 2, ω = π rad/s, T = 2 s, f = 0.5 Hz. At t = 0.1 s, angle = 0.314 rad, y = 2 × 0.309 = 0.618.

Explain it another way: applied

A walking robot's leg joints often follow sinusoidal patterns. Changing ω changes the step rate, A changes the step size, and a phase difference of π between the left and right legs makes them alternate.

Try these examples

Example 1

A test rig shakes a sensor with y(t) = 4 sin(10t) mm. Find the amplitude, period and frequency.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. y(t) = 5 sin(4t). What is the period, in seconds? (3 decimal places)

Answer: s

2. A piston's height follows y(t) = 3·sin(4·t) cm, with t in seconds. What is the period (time for one full cycle), in seconds? (3 decimal places)

Answer: s

3. Compared with sin(t), the wave sin(t + π/2) is…

  • Taller
  • Shifted earlier by π/2 s: it's the cosine wave
  • Twice as fast
  • Upside down

4. A motor vibration repeats every 0.02 s. What is its frequency, in hertz?

Answer: Hz

5. A joint turns through 3π/4 radians. How many degrees is that?

Answer: °

6. Module check: a link of 0.5 m at θ = 3π/2 rad. Where is its tip?

  • (0, 0.5)
  • (0, −0.5)
  • (−0.5, 0)
  • (0.5, 0)

Apply it

Design the up-and-down motion of a toy flapping wing: 3 cm amplitude, 2 flaps per second, starting at the top. Write y(t), then check it in the sine-wave explorer (scale 1 unit = 1 cm, choose φ to start at the top).

Reflect

Where in your day do you meet something periodic? Estimate its amplitude and period.

Go further (online)

Week 13: Matrices

This week you will

A matrix is a machine that moves vectors

Four numbers in a box can rotate, stretch, shear or flip an entire plane at once. How do they know where everything goes?

About 30 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Robots move thousands of points (sensor returns, mesh vertices, link positions) the same way at the same time. A matrix packages that 'same way' into a few numbers, and multiplying by it moves every point in one go. Graphics cards, robot kinematics and navigation filters are, underneath, very fast matrix multipliers.

Goals

Predict

M = [2 0; 0 1] (rows separated by ;). What does it do to the plane?

  1. Rotates it
  2. Stretches it to twice as wide, same height
  3. Doubles everything
  4. Flips it

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Try each preset and describe it in words. Then choose Custom and build: (a) a matrix that triples heights only, (b) one that swaps x and y, (c) one that squashes the plane onto a line. For each, watch where the orange (1, 0) and green (0, 1) arrows land, and the determinant.

What the interactive shows, in words

The matrix grid shows the plane before (fine grid) and after (blue grid) applying the matrix. An orange arrow shows where (1, 0) lands, a green arrow where (0, 1) lands, and a purple patch shows the transformed unit square. A test point (1.5, 1) and its image P′ are joined by a dashed arrow. The readout lists the matrix, both columns, P′ and the determinant.

Understand

The recipe

For M = [a b; c d] and v = (x, y): M·v = (a·x + b·y, c·x + d·y). Each output component is one row of M dotted with v. A 2×2 matrix takes a 2D vector to another 2D vector.

Columns are where the axes land

M·(1, 0) = (a, c), the first column. M·(0, 1) = (b, d), the second column. Any vector (x, y) = x·(1, 0) + y·(0, 1), so M·v = x·(column 1) + y·(column 2). To design a matrix, decide where (1, 0) and (0, 1) should go and write those as columns. Grid lines stay straight, parallel and evenly spaced: that's what 'linear' means.

The determinant

det M = ad − bc is the factor by which areas change. det = 1: areas kept (rotations). det = 2: doubled. Negative: the plane is flipped over (a mirror image). det = 0: the plane is squashed onto a line or a point, information is lost, and the matrix cannot be undone.

Explain it another way: intuitive

A matrix is a recipe card: 'send east to here, send north to there'. Every other direction is a mix of east and north, so it follows along. The whole grid moves like a stretchy sheet that keeps its lines straight.

Explain it another way: technical

A 2×2 real matrix represents a linear map ℝ² → ℝ² in the standard basis. Linearity: M(αu + βv) = αMu + βMv. The determinant is the signed area of the image of the unit square; M is invertible exactly when det M ≠ 0.

Explain it another way: mathematical

M = [1 1; 0 1] (shear), v = (1.5, 1): M·v = (1.5 + 1, 1) = (2.5, 1). det = 1 × 1 − 1 × 0 = 1: the square becomes a slanted parallelogram of the same area.

Explain it another way: applied

Image processing scales and shears photos with 2×2 matrices; a robot's camera calibration contains a small matrix that turns pixel offsets into directions.

Try these examples

Example 1

Find [2 −1; 1 3]·(4, −2).

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. [3 1; 0 2]·(2, 5): what is the first component?

Answer:

2. M = [−2 2; −2 −2] (rows separated by ";") and v = (3, 4). What is the first (x) component of M·v?

Answer:

3. Which matrix sends (1, 0) to (0, 2) and (0, 1) to (−1, 0)?

  • [0 −1; 2 0]
  • [0 2; −1 0]
  • [0 −1; 0 2]
  • [2 0; 0 −1]

4. What is the determinant of [4 2; 3 1]?

Answer:

5. A matrix has determinant 0. What can you say?

  • It is the identity
  • It squashes the plane onto a line or point, so it can't be undone
  • It rotates by 0°
  • It doubles areas

Apply it

Design a matrix that makes a 'italic' slant to the right by 0.3 per unit of height and also squashes heights to 80%. Test it in Custom mode on the grid and give its determinant.

Reflect

Why can't a matrix move the origin? What does that suggest we'll need for moving robot frames around?

Go further (online)

The rotation matrix, built from scratch

Every robot, game engine and spacecraft turns things with the same four entries: cos, −sin, sin, cos. Where does that minus sign come from?

About 35 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Rotations are the most important matrices in robotics. Every joint, every turn of a vehicle and every camera orientation is a rotation. Deriving R(θ) yourself, once, means you'll never have to memorise where the minus sign goes: you can rebuild it in ten seconds from a sketch.

Goals

Predict

Rotate (1, 0) by 90° anticlockwise. Where does it go?

  1. (0, 1)
  2. (0, −1)
  3. (−1, 0)
  4. (1, 1)

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Choose Rotate. Set θ = 90°, then 30°, then −45°. Each time, read where the orange (1, 0) arrow lands and check it is (cos θ, sin θ). Where does the green (0, 1) arrow land? Check |P| = |P′| and det = 1 every time.

What the interactive shows, in words

With the Rotate preset the grid turns rigidly by θ. At 90° the orange arrow (image of (1, 0)) points straight up to (0, 1) and the green arrow (image of (0, 1)) points left to (−1, 0). The readout shows |P| equal to |P′| and determinant 1 for every angle.

Understand

Using R(θ)

To rotate a point about the origin by θ (anticlockwise positive): x′ = x cos θ − y sin θ, y′ = x sin θ + y cos θ. For a clockwise rotation, use a negative θ: cos stays the same, sin changes sign. To rotate about some other pivot, shift the pivot to the origin, rotate, then shift back.

What makes it a rotation

Its columns are unit length and perpendicular to each other, so lengths and angles are kept (it is 'orthogonal'), and det = 1, so it doesn't mirror. A matrix with orthonormal columns but det = −1 is a reflection, not a rotation.

Same matrix, two stories

R(θ)·p can mean 'turn the point p by θ' or 'p is given in a frame turned by θ; here it is in the outer frame'. Both are the same calculation. Robotics uses the second story constantly: a link frame rotated by θ1 turns the link's own coordinates into the base frame's.

Explain it another way: intuitive

Stick a drawing pin through the origin of a sheet of tracing paper and turn the sheet. Everything moves together, nothing stretches. The rotation matrix is the recipe for where each mark ends up.

Explain it another way: technical

R(θ) ∈ SO(2), the group of 2×2 orthogonal matrices with determinant 1. Rᵀ = R⁻¹ = R(−θ), and R(α)R(β) = R(α + β): planar rotations commute.

Explain it another way: mathematical

Rotate (2, −5) by 135°: cos = −0.7071, sin = 0.7071. x′ = 2(−0.7071) − (−5)(0.7071) = −1.414 + 3.536 = 2.121. y′ = 2(0.7071) + (−5)(−0.7071) = 1.414 + 3.536 = 4.950.

Explain it another way: applied

A camera on a robot's wrist sees a part at (0.1, 0) m in its own frame. With the wrist turned 30°, the part is at R(30°)·(0.1, 0) = (0.0866, 0.05) m relative to the wrist in the arm's frame.

Derivation: Deriving R(θ)
  1. A matrix is fixed by where it sends (1, 0) and (0, 1): those images are its columns.

  2. Rotating (1, 0) by θ lands on the unit circle at angle θ: (cos θ, sin θ). That's column 1.

  3. (0, 1) starts at 90°, so after rotating it is at θ + 90°: (cos(θ + 90°), sin(θ + 90°)) = (−sin θ, cos θ). That's column 2, and the source of the minus sign.

  4. So R(θ) = [cos θ −sin θ; sin θ cos θ], and R(θ)·(x, y) = (x cos θ − y sin θ, x sin θ + y cos θ).

  5. Check lengths: (x cos θ − y sin θ)² + (x sin θ + y cos θ)² = x²(cos² + sin²) + y²(sin² + cos²) + (cross terms that cancel) = x² + y². Lengths are kept.

  6. Check area: det R = cos θ · cos θ − (−sin θ) · sin θ = cos²θ + sin²θ = 1. No stretching, no flipping.

Try these examples

Example 1

Rotate (3, 4) by 90° clockwise.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. Which matrix is R(90°)?

  • [0 1; −1 0]
  • [0 −1; 1 0]
  • [1 0; 0 1]
  • [−1 0; 0 −1]

2. Rotate the point (−4, 4) by 60° about the origin (positive = anticlockwise). What is the new x coordinate? (3 decimal places)

Answer:

3. The point (5, 12) is rotated by 73°. What is its distance from the origin afterwards?

Answer:

4. [1 0; 0 −1] has unit, perpendicular columns. Why isn't it a rotation?

  • Its determinant is −1: it's a mirror flip across the x axis
  • Its entries aren't sines and cosines
  • It changes lengths
  • It is a rotation, by 180°

5. Rotate (3, 1) by 90° about the pivot (2, 1) (not the origin). What is the new y coordinate?

Answer:

Apply it

Write a Python function rotate(x, y, deg) using the formula. Test that rotating by 30° twelve times returns (very nearly) the starting point, and explain the tiny difference you see.

Reflect

You derived the matrix from two arrows. What would you need to know to derive a 3D rotation the same way?

Go further (online)

Order matters: composing and undoing matrices

Shear then rotate, or rotate then shear? A robot's hand ends up in a different place. Why should order matter for multiplication?

About 35 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

A robot arm is a chain of motions: turn the shoulder, then the elbow, then the wrist. Chaining motions is matrix multiplication, and because the order of physical motions matters, the order of matrices matters too. Knowing how to undo a matrix (its inverse) is how a robot converts world measurements back into its own frames.

Goals

Predict

R is a 90° rotation and S is a shear. For the point (1.5, 1), will R·S·p and S·R·p be the same?

  1. Yes, multiplication order never matters
  2. No, in general they differ
  3. Only if p is on an axis
  4. Only for rotations by 180°

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Choose Shear. Set 'Combine with a 90° turn' to R·M, then to M·R. Write down P′ both times. Repeat with Rotate at 30° instead of Shear: do R·M and M·R still differ? Explain the difference.

What the interactive shows, in words

With the Shear preset and the 'R·M' option, the point (1.5, 1) lands at (−1, 2.5); with 'M·R' it lands at (0.5, 1.5), so the two orders differ. With the Rotate preset both orders give the same result, because rotations in the plane commute.

Understand

Multiplying matrices

(A·B) entry in row i, column j = row i of A · column j of B. For 2×2: [a b; c d]·[e f; g h] = [ae + bg af + bh; ce + dg cf + dh]. The product A·B means 'first B, then A', because (A·B)·v = A·(B·v): the matrix nearest the vector acts first.

Order matters

In general A·B ≠ B·A. Physical intuition: put a book flat, rotate it 90° about a vertical axis, then flip it about a front-to-back axis; now do it the other way round. Different result. Planar rotations happen to commute, R(α)R(β) = R(α + β) = R(β)R(α), but mix in a shear, a scale or 3D rotations and order becomes everything.

Undoing: the inverse

The inverse M⁻¹ satisfies M⁻¹·M = I (the identity, [1 0; 0 1]). For 2×2: M⁻¹ = (1/det)·[d −b; −c a], which exists only when det ≠ 0. For rotations it is beautifully cheap: R(θ)⁻¹ = R(−θ) = R(θ)ᵀ (swap rows and columns). Undoing a turn is turning back.

Explain it another way: intuitive

Putting on socks then shoes is not the same as shoes then socks. Undoing reverses the order too: shoes off first, then socks. Matrices work exactly like getting dressed.

Explain it another way: technical

(AB)⁻¹ = B⁻¹A⁻¹ (reverse order). Orthogonal matrices satisfy RᵀR = I, so their inverse is the transpose; this is why robot software stores rotations as orthonormal matrices and never computes a general inverse for them.

Explain it another way: mathematical

S = [1 1; 0 1], R = [0 −1; 1 0]. R·S = [0 −1; 1 1]; S·R = [1 −1; 1 0]. For p = (1.5, 1): R·S·p = (−1, 2.5), S·R·p = (0.5, 1.5). Different.

Explain it another way: applied

A drone's attitude is stored as a rotation. To express a world wind vector in the drone's body frame, the flight computer multiplies by Rᵀ: one transpose, no division, every few milliseconds.

Try these examples

Example 1

Find the inverse of M = [2 1; 5 3] and check it.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. [1 2; 3 4]·[5 6; 7 8]: what is the entry in row 2, column 1?

Answer:

2. A = [−2 2; −2 −2] and B = [2 3; −3 3]. What is the entry in row 1, column 1 of the product A·B?

Answer:

3. In A·B·v, which transformation is applied to v first?

  • A
  • B
  • Both at once
  • It depends on the determinant

4. What is the inverse of R(40°)?

  • R(40°)
  • R(−40°), which equals R(40°)ᵀ
  • R(320°)ᵀ
  • 1 / R(40°)

5. Rotate the point (4, −1) by 30° about the origin (positive = anticlockwise). What is the new y coordinate? (3 decimal places)

Answer:

Apply it

With the diagram's Custom matrix, find a matrix M (not a rotation or the identity) that does commute with the 90° turn R: R·M·P = M·R·P. Describe what kind of transformation it is.

Reflect

Give one everyday pair of actions where order matters and one where it doesn't. Which kind is a planar rotation?

Go further (online)

Week 14: Coordinate transformations

This week you will

Homogeneous transforms: rotate and shift in one matrix

A 2×2 matrix can't move the origin. Add a row of 0, 0, 1 and suddenly it can. What is that extra 1 doing?

About 35 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Real frames are both turned and shifted: a gripper sits at the end of an arm, a lidar is bolted to the front of a car. Homogeneous transforms let one matrix do both, so that chaining frames becomes a simple multiplication. They are the everyday currency of robot software (ROS calls its frame library tf).

Goals

Predict

A frame is rotated 90° and its origin is at (2, 1). A point is at (1, 0) in that frame. Where is it in the parent frame?

  1. (3, 1)
  2. (2, 2)
  3. (1, 2)
  4. (0, 1)

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Set frame B's rotation and shift to 0, so only frame A matters. Put A at 90°, shift (2, 1), and p at (1, 0). Check the world position against your prediction, and read T_WA. Which entries hold the rotation? Which hold the shift?

What the interactive shows, in words

The frame-chain viewer draws the world axes in black, frame A in blue and frame B in orange (solid arrow for x, dashed for y), with point p as a lime dot. The readout shows p in B, in A and in the world, and prints the 3×3 matrices T_WA, T_AB and their product T_WB.

Understand

The 3×3 transform

T = [cos θ −sin θ tx; sin θ cos θ ty; 0 0 1] describes a frame turned by θ with its origin at (tx, ty) in its parent. Top-left 2×2: the rotation. Right column: where the frame's origin is. Bottom row: always 0, 0, 1. Points go in as (x, y, 1).

Reading T_parent←child

We label transforms by what they convert: T_WA turns coordinates in frame A into coordinates in the world W. So p_W = T_WA · p_A. Its columns even tell a story: column 1 is A's x axis seen in W, column 2 is A's y axis, column 3 is A's origin in W.

Points and directions

Points (positions) carry a 1: they get rotated and shifted. Directions (velocities, forces, axes) carry a 0: they get rotated only, because moving a frame doesn't change which way an arrow points. Keeping that last coordinate right is a common source of bugs in robot code.

Explain it another way: intuitive

The homogeneous matrix is a 'pose card': it says how a frame is turned and where its origin is. Hand it a point written in the frame, and it hands back the same point in the parent's coordinates.

Explain it another way: technical

Rigid transforms in 2D form the group SE(2). Homogeneous coordinates embed it in 3×3 matrices so that composition is matrix multiplication and the action on points is linear in (x, y, 1).

Explain it another way: mathematical

θ = 120°, t = (3, −4), p = (−3, 2): x = (−0.5)(−3) − (0.866)(2) + 3 = 1.5 − 1.732 + 3 = 2.768; y = (0.866)(−3) + (−0.5)(2) − 4 = −2.598 − 1 − 4 = −7.598.

Explain it another way: applied

A self-driving car's software holds a transform from the lidar frame to the car frame (fixed, measured at the factory) and one from the car frame to the map (updated many times a second). Every lidar point is multiplied by both.

Derivation: Why the extra row of 0, 0, 1 works
  1. A rigid move is p′ = R·p + t: rotate, then add a translation. The '+ t' is not a matrix multiplication, so a 2×2 matrix can't do it.

  2. Trick: write points with an extra coordinate fixed at 1: p = (x, y, 1).

  3. Build T = [R t; 0 0 1] = [cos θ −sin θ tx; sin θ cos θ ty; 0 0 1].

  4. Multiply: row 1 gives x cos θ − y sin θ + tx·1, row 2 gives x sin θ + y cos θ + ty·1, row 3 gives 0 + 0 + 1 = 1. That is exactly R·p + t, with the 1 still in place.

  5. The 1 picks up the translation column. (A direction vector, which shouldn't be shifted, is written with a 0 instead, and correctly ignores t.)

Try these examples

Example 1

Write T for a frame rotated 30° with origin (1, 2), and find the point (2, 0) in the parent.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. Frame rotated 0° with origin (4, −1). Point (2, 3) in that frame. What is its parent x coordinate?

Answer:

2. A gripper frame has its origin at (−3, 5) in the world and is rotated 45°. A sensor sits at (−2, 2) in the gripper frame. What is its world y coordinate? (3 decimal places)

Answer:

3. In T = [c −s tx; s c ty; 0 0 1], what does the column (tx, ty, 1) mean?

  • The frame's x axis
  • Where the child frame's origin sits in the parent frame
  • How much the frame is scaled
  • A point that is always at the origin

4. A force direction (1, 0) in a sensor frame must be expressed in the robot frame. How should it be written for the homogeneous transform?

  • (1, 0, 1)
  • (1, 0, 0)
  • (1, 0, −1)
  • It can't be transformed

5. Frame rotated 90° with origin (0, 3). Point (2, 0) in the frame. What is its parent y coordinate?

Answer:

Apply it

A lidar is mounted 0.4 m in front of a robot's centre and rotated 180° (it faces backwards). It sees an object at (1.5, 0.2) m in its own frame. Write T_robot←lidar and find the object in the robot frame. Is it in front of or behind the robot?

Reflect

Why do you think robot software stores the pose of every sensor as a transform, rather than as separate 'angle' and 'offset' numbers?

Go further (online)

Chains of frames, and the way back

A camera on a wrist on an elbow on a shoulder sees a bolt. To grab it, the robot must know where the bolt is in the room. How many matrices is that?

About 35 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Robots are trees of frames. To get from any frame to any other, you multiply along the chain going one way and use inverses coming back. Once this clicks, forward kinematics, camera calibration and sensor fusion all become the same bookkeeping: write down the chain, multiply in order.

Goals

Predict

T_WA puts frame A in the world, and T_AB puts frame B in A. Which gives a point from B in world coordinates?

  1. T_AB · T_WA · p_B
  2. T_WA · T_AB · p_B
  3. T_WA⁻¹ · T_AB · p_B
  4. T_WA + T_AB

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Set A = 30°, shift (1, 0.5) and B = 45°, shift (2, 0) inside A, with p = (1, 0.5). Check p_A = T_AB·p and p_W = T_WA·p_A by hand for one coordinate. Then read the 'going back' line: the inverse returns p's B coordinates. What is the inverse's rotation?

What the interactive shows, in words

The frame-chain viewer lets you set frame A in the world, frame B inside A and a point in B. Its readout walks the point from B to A to the world, prints T_WA, T_AB and T_WB = T_WA·T_AB, and shows that applying the inverse of T_WB to the world point returns its original B coordinates.

Understand

Chaining: labels like dominoes

T_WB = T_WA · T_AB: the A's in the middle 'cancel'. For a longer chain, T_W←tool = T_W←base · T_base←1 · T_1←2 · T_2←tool. Multiply left to right in the order of the chain; the point goes in on the right. In 2D, the angles of a chain simply add, and the translations combine through the rotations.

Inverting a rigid transform

To go the other way (W → A), use T_AW = T_WA⁻¹. For a rigid transform no general inverse is needed: T⁻¹ = [Rᵀ −Rᵀt; 0 0 1]. Rotate back by −θ, and the new translation is the old one, rotated back and negated. Check: T⁻¹·T = I.

Up and down the tree

To get a camera's measurement into the gripper frame you might go up from camera to world and back down to gripper: T_gripper←camera = T_W←gripper⁻¹ · T_W←camera. Every arrow you traverse backwards needs an inverse. Writing the subscripts carefully is the whole skill.

Explain it another way: intuitive

Think of giving directions through a building: 'from the lift, the office is the second door; from the office, the desk is by the window'. Chaining is following the directions in order; inverting is walking them backwards, turning the opposite way at each step.

Explain it another way: technical

SE(2) is closed under composition and inversion. With T = (R, t): T₁T₂ = (R₁R₂, R₁t₂ + t₁) and T⁻¹ = (Rᵀ, −Rᵀt). These avoid numerical matrix inversion entirely.

Explain it another way: mathematical

A = (30°, (1, 0.5)), B = (45°, (2, 0)). T_WB rotation = 75°; origin = R(30°)(2, 0) + (1, 0.5) = (1.732, 1) + (1, 0.5) = (2.732, 1.5).

Explain it another way: applied

Robot frameworks keep every link and sensor transform in a tree and answer queries like 'where is the camera relative to the gripper right now?' by multiplying the transforms (and inverses) along the path between the two frames.

Try these examples

Example 1

T_WA has θ = 90°, t = (2, 1). Find T_AW and use it to express the world point (2, 3) in A.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. Which is T_W←tool for the chain world → base → link → tool?

  • T_W←base · T_base←link · T_link←tool
  • T_link←tool · T_base←link · T_W←base
  • T_W←base + T_base←link + T_link←tool
  • T_W←base⁻¹ · T_link←tool

2. In a planar chain, frame A is rotated 40° in the world, B is rotated −15° in A and C is rotated 70° in B. What is C's rotation in the world, in degrees?

Answer: °

3. A gripper frame has its origin at (−1, 1) in the world and is rotated 150°. A sensor sits at (1, 0) in the gripper frame. What is its world x coordinate? (3 decimal places)

Answer:

4. T has θ = 0° and t = (3, −2). What is the x translation of T⁻¹?

Answer:

5. A = [2 0; −3 1] and B = [0 0; 0 −2]. What is the entry in row 1, column 1 of the product A·B?

Answer:

Apply it

A camera frame C sits on a gripper G: T_GC = (180°, (0.05, 0)). The gripper is at T_WG = (90°, (0.4, 0.6)) in the world. The camera sees a bolt at (0.1, 0.02) m. Find the bolt in the world, then check by building the same chain in the frame-chain viewer (scale ×10 to fit).

Reflect

Draw the frame tree for a robot vacuum with a bumper sensor and a camera. Which transforms change while it drives, and which are fixed?

Go further (online)

Navigating with transforms: from map to cockpit

A drone's flight plan lives on a map; its motors only understand 'forward' and 'left'. What converts one into the other, fifty times a second?

About 35 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

This is the aerospace payoff of the transform maths. A vehicle's pose is one transform, T_world←body. Its inverse puts the mission (waypoints, no-fly zones, landing pads) into the vehicle's view; the transform itself puts what the sensors see onto the map. Every autopilot, rover and spacecraft guidance loop runs this pair constantly.

Goals

Predict

A rover's camera sees a rock 3 m dead ahead. The rover is at (10, 5) m heading north. Where is the rock on the map?

  1. (13, 5)
  2. (10, 8)
  3. (7, 5)
  4. (10, 2)

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Place the aircraft at (−4, −4) km, heading 30°, target CHARLIE. Compute CHARLIE's body coordinates yourself with the inverse transform (subtract the position, rotate by −ψ where ψ = 90° − heading). Check the readout. Then 'fly' to it using only the body-frame numbers: turn when 'left' is large, move when it's ahead.

What the interactive shows, in words

The diagram gives the target's position in the world frame (distance and bearing) and in the body frame (kilometres ahead and to the left or right), plus the turn needed. Two buttons turn the vehicle towards the target and move it 2 km forward, so the approach can be flown step by step from the readout alone.

Understand

Pose as a transform

With ψ = 90° − heading (the nose's maths angle) and position (x, y): T_W←B = [cos ψ −sin ψ x; sin ψ cos ψ y; 0 0 1]. Body-frame points (forward f, left l, 1) go in; map points come out. A sensor that reports 'rock at 3 m ahead, 1 m left' becomes a map point with one multiplication.

The inverse brings the mission aboard

p_B = T_W←B⁻¹ · p_W: subtract the vehicle's position, then rotate by −ψ. Forward = d·(cos ψ, sin ψ), left = d·(−sin ψ, cos ψ), where d is the vector from vehicle to waypoint. Those are just dot products with the vehicle's forward and left directions.

Steering from body coordinates

Body coordinates make decisions easy: left > 0 means steer left, forward < 0 means the target is behind (turn round), and atan2(left, forward) is the angle to turn (positive = left). A simple guidance law commands a turn rate proportional to that angle. Wind, sensor noise and limited turn rates are what make real autopilots harder.

Explain it another way: intuitive

The map is the mission; the cockpit is the vehicle's view. The pose transform is the window between them: look through it one way and you see map points as 'ahead and left'; look the other way and the camera's view lands on the map.

Explain it another way: technical

The guidance loop: estimate pose T_WB (from GPS, inertial sensors or visual odometry), compute p_B = T_WB⁻¹p_W for the active waypoint, compute heading error e = atan2(l, f), command yaw rate r = k·e, saturate it, and switch waypoints within an acceptance radius.

Explain it another way: mathematical

Aircraft at (4, −10) km, ψ = 120°, waypoint (−18, 12): d = (−22, 22). Forward = −22(−0.5) + 22(0.866) = 11 + 19.05 = 30.05 km. Left = −(−22)(0.866) + 22(−0.5) = 19.05 − 11 = 8.05 km. Turn angle atan2(8.05, 30.05) ≈ 15° to the left.

Explain it another way: applied

Planetary rovers combine both directions: obstacles seen by cameras (body frame) are placed on a local map (world frame), and the next route waypoint (world) is brought back into the body frame to choose the next arc to drive.

Try these examples

Example 1

A drone at (0, 0) with heading 90° (east) sees a landing pad 2 m forward and 1 m to the right. Where is the pad on the map?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. A rover at (2, 3) m has ψ = 90° (nose pointing +y). Its camera sees a rock at forward 4 m, left 0 m. What is the rock's map x coordinate?

Answer: m

2. In a simulation, an aircraft is at (−8, 8) km with its nose pointing 45° anticlockwise from the world +x axis. A waypoint is at (−14, 12) km. In the aircraft's body frame (x forward, y to the left), what is the waypoint's left (y) coordinate, in km? (2 decimal places; negative means to the right)

Answer: km

3. A rover is 2 km west and 0 km north of its lander. Its next waypoint is 0 km east and 1 km north of the lander. What compass bearing should it head on (degrees clockwise from north, 0 to 360)?

Answer: °

4. A waypoint's body coordinates are forward −5 km, left 0.5 km. What should a simple guidance loop do?

  • Fly straight on
  • Turn sharply: the waypoint is behind and slightly left
  • Climb
  • Declare arrival

5. A waypoint is at forward 3 km, left 3 km in the body frame. By how many degrees should the vehicle turn left to face it?

Answer: °

Apply it

Write a short guidance loop in pseudocode for the diagram's aircraft: inputs pose and waypoint, outputs a turn command and 'arrived'. Choose an arrival radius and a maximum turn per step, then test your loop by hand in the diagram for one waypoint. Compare with the navigation level of the Planetary Rover Build.

Reflect

If the pose estimate is 5° wrong in heading, how does that error show up in the body-frame position of a waypoint 10 km away? Estimate it.

Go further (online)

Four forces keep a plane in the sky

A cruising airliner's engines push with tonnes of thrust, yet it isn't speeding up. Where does all that push go?

About 30 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Every aircraft, from a paper dart to a Mars helicopter, lives inside the same four-way tug of war. Aerospace engineers start every design with this free-body diagram: how heavy will it be, so how much lift; how draggy, so how much thrust; and so how big an engine and how much fuel.

Goals

Predict

An aircraft cruises at a steady 60 m/s in a straight line at constant height. How does its thrust compare with its drag?

  1. Thrust is bigger, otherwise it would slow down
  2. Thrust equals drag
  3. Thrust is smaller, because it is already moving

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Set the mass to 900 kg. Find the lift that holds height, then make thrust equal drag. Now add 0.5 kN of thrust: what does the readout say the aircraft does?

What the interactive shows, in words

The interactive is a side view of an aircraft with four arrows: lift up, weight down, thrust forward and drag backward, each drawn to scale. Sliders set mass, lift, thrust and drag; a readout gives the net force each way and says whether the aircraft holds height or climbs or sinks, and whether it speeds up or slows down. With 900 kg (8.83 kN weight), 8.83 kN lift and thrust equal to drag, it reports steady level flight.

Understand

Four forces, four directions

Weight pulls straight down (m·g). Lift acts at right angles to the oncoming air, so upwards in level flight. Thrust pushes along the flight path from the engine or propeller. Drag acts backwards, opposite the motion through the air. Each is a vector: it has a size in newtons and a direction.

Balanced is not the same as nothing

Newton's first law: with zero net force, an object keeps its velocity. So steady, level cruise needs L = W and T = D. Huge forces act on the aircraft, but they cancel. An 800 kg light aircraft must make about 7.8 kN of lift the whole time it flies level.

Unbalanced forces change the motion

If T > D the aircraft speeds up with a = (T − D)/m. If L > W the flight path curves upwards. A pilot changes the balance on purpose: more throttle to accelerate, more angle of attack to climb, less thrust to descend.

Explain it another way: intuitive

Think of a rowing boat on a lake. Paddle steadily and it reaches a speed where the water's drag exactly matches your push. Stop paddling and drag wins. An aeroplane is that boat, plus a second balance in the vertical: the wing's lift holding up the weight.

Explain it another way: technical

Resolve forces along and perpendicular to the flight path. Along: T − D − W·sin γ = m·dv/dt, where γ is the climb angle. Perpendicular: L − W·cos γ = m·v·dγ/dt. Level, steady flight is the special case γ = 0 and both derivatives zero, giving T = D and L = W.

Explain it another way: mathematical

Level flight: L = m·g. For m = 900 kg, L = 900 × 9.81 = 8,829 N. Along the path: a = (T − D)/m. With m = 850 kg, T = 2,400 N and D = 1,900 N: a = 500 ÷ 850 ≈ 0.588 m/s².

Explain it another way: applied

Aircraft are weighed before every flight because the required lift, the take-off distance and the fuel burn all depend on weight. Drone designers do the same on a smaller scale: every extra gram of battery needs extra lift, which brings extra drag, which needs more battery.

Try these examples

Example 1

A 1,100 kg aircraft flies level at constant speed with 2.2 kN of drag. What are its lift and thrust?

The worked solution is in the online lesson.

Example 2

The same aircraft opens the throttle to 3.0 kN while drag stays at 2.2 kN for a moment. What is its acceleration?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. Which pair of statements describes steady, level flight?

  • L > W and T > D
  • L = W and T = D
  • L = W and T > D
  • There is no lift once the aircraft is moving

2. How much lift, in newtons, does a 900 kg aircraft need in level flight? Use g = 9.81 m/s².

Answer: N

3. A glider with m = 430 kg cruises in steady, level flight. How much lift must its wings make, in newtons? Use g = 9.81 m/s².

Answer: N

4. In level flight an aircraft of m = 960 kg has thrust T = 2750 N and drag D = 1950 N. What is its forward acceleration, in m/s²? (Negative means it is slowing down.)

Answer: m/s²

5. In level cruise the pilot reduces thrust a little and keeps the wings at the same angle. What happens first?

  • The aircraft slows down
  • The aircraft climbs
  • Nothing, because it is already moving
  • Lift instantly drops to zero

Apply it

Draw a free-body diagram for a glider (no engine) in a steady descent. Which force is missing compared with a powered aircraft, and what must take over its job of balancing drag? (Hint: tilt your axes along the glide path.)

Reflect

Which of the four forces surprised you most, and why does a balanced aircraft still need its engines running?

Bernoulli, and the myth of the race over the wing

You were probably told the air over a wing speeds up to meet the air underneath at the back. Wind tunnels say it doesn't. So what does happen?

About 35 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Bernoulli's equation is one of the most used and most misused results in engineering. It sizes carburettors, measures airspeed with a pitot tube and explains pressure on a wing. Knowing exactly what it says, and what it doesn't, is the difference between an engineer and someone repeating a textbook myth.

Goals

Predict

Two parcels of air split at a wing's leading edge, one going over and one under. Which reaches the trailing edge first?

  1. They arrive together, by definition
  2. The one over the top, which is much faster
  3. The one underneath, because its path is shorter

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Halve the throat area and set the inlet speed to 10 m/s. Read the throat speed and the pressure drop. Then double the inlet speed: does the pressure drop double?

What the interactive shows, in words

The interactive is a duct that narrows to a throat. Sliders set the inlet speed and the throat area as a fraction of the inlet. Dots inside are spaced further apart where air moves faster, and two gauges show static pressure falling in the throat. The readout gives the throat speed from continuity and the pressure drop from Bernoulli; for 10 m/s into half the area it gives 20 m/s and 184 Pa.

Understand

Continuity: what goes in must come out

For incompressible flow the volume per second through every section of a duct is the same: A₁·v₁ = A₂·v₂. Halve the area and the speed doubles. Air below about 100 m/s behaves very nearly incompressibly.

Bernoulli: speed and pressure trade off

Along one streamline, p + ½ρv² = constant. ½ρv² is the dynamic pressure. If air speeds up from 10 to 20 m/s, its static pressure falls by ½ × 1.225 × (400 − 100) ≈ 184 Pa. Bernoulli is a correct relation between speed and pressure; it does not by itself say why the air speeds up.

The equal-transit myth

The popular story: the top surface is longer, so air must go faster to meet the lower air at the back. Measurements show the upper air arrives first, and flat or symmetric wings lift fine at an angle. The real picture: the tilted, curved wing turns the oncoming air downwards. Pushing air down means the air pushes the wing up (Newton's third law), and the same flow has low pressure above and higher pressure below. Pressure and turning are two descriptions of one flow.

Explain it another way: intuitive

Hold a spoon loosely under a running tap with the curved back in the stream: it is pulled into the water. The water bends round the curve, and bending a flow needs a pressure difference across it. A wing bends a huge, invisible stream of air downwards.

Explain it another way: technical

Lift equals the integral of surface pressure around the wing. Bernoulli converts the measured or computed surface speeds into those pressures. Momentum balance on a large box around the wing gives the same lift as the rate at which downward momentum is given to the air (the downwash). Both are exact consequences of the same Navier–Stokes flow.

Explain it another way: mathematical

Venturi: A₂ = 0.5·A₁, v₁ = 10 m/s ⇒ v₂ = 20 m/s and Δp = ½ × 1.225 × (20² − 10²) = 183.75 Pa. On a wing at 50 m/s, if the upper surface flow is locally 60 m/s and the lower 45 m/s, the upper pressure is 673.75 Pa below freestream and the lower 290.9 Pa above: about 965 Pa of difference.

Explain it another way: applied

A pitot-static tube on every aircraft measures p_total − p_static = ½ρv² and turns it into airspeed. Venturi meters measure flow in pipes the same way. The limits matter: across a propeller disc energy is added, so Bernoulli does not hold through it, only on each side.

Derivation: Bernoulli from energy per unit volume
  1. Follow a small parcel of air of volume V along a streamline in steady, frictionless flow at constant height.

  2. Its kinetic energy is ½·m·v² = ½·ρ·V·v², so kinetic energy per unit volume is ½ρv².

  3. Pushing the parcel from pressure p₁ to p₂ does work (p₁ − p₂)·V on it.

  4. With no friction that work all becomes kinetic energy: (p₁ − p₂)·V = ½ρV(v₂² − v₁²).

  5. Divide by V and rearrange: p₁ + ½ρv₁² = p₂ + ½ρv₂². Where the air is faster, its static pressure is lower.

Try these examples

Example 1

Air at 8 m/s enters a duct of area 0.6 m² that narrows to 0.24 m². Find the throat speed and the pressure drop.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. Which statement about air flowing over a lifting wing matches wind-tunnel measurements?

  • Upper and lower air always meet again at the trailing edge
  • The upper air reaches the trailing edge first
  • The upper air is slower because it travels further
  • Air speed is the same above and below; only pressure differs

2. Air enters at 12 m/s through 0.5 m² and leaves a contraction through 0.2 m². What is the exit speed in m/s?

Answer: m/s

3. Air enters a wind-tunnel contraction through A1 = 0.55 m² at v1 = 14 m/s and leaves through A2 = 0.303 m². Treating the air as incompressible, how fast is it moving in the narrow section, in m/s?

Answer: m/s

4. Along one streamline (no height change) air speeds up from v1 = 13 m/s to v2 = 34 m/s. With ρ = 1.225 kg/m³, how much lower is the static pressure in the fast part, in pascals?

Answer: Pa

5. Where is it NOT valid to apply Bernoulli's equation along a streamline?

  • In the slow air far in front of a wing
  • Through a spinning propeller disc
  • Between two points in a smooth, narrowing duct
  • In a pitot tube measuring airspeed

Apply it

Write a three-sentence explanation of lift for a younger student that is correct and never mentions equal transit times. Then add one sentence saying what Bernoulli's equation contributes, and one saying what it cannot tell you on its own.

Reflect

Why do you think the equal-transit myth survives in so many books, and how would you test it if you had a smoke tunnel?

Airfoils and angle of attack

Fly a paper plane nose-high and it lurches, wobbles and drops. Tilt the same wing a few degrees less and it glides. What changed?

About 30 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

The lift coefficient C_L is how engineers squeeze a whole wing's shape and angle into one number. The lift curve, C_L against angle of attack, is the first graph a wing designer looks at: its slope, its zero-lift angle and its peak decide how slowly an aircraft can land and how sharply it can turn.

Goals

Predict

A symmetric wing (same shape top and bottom) meets the air at exactly 0°. How much lift does it make?

  1. Plenty, because the air still speeds up over it
  2. None
  3. Negative lift

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Sweep the angle of attack from −6° to 20°. Find where C_L is zero, where it peaks, and what the little airfoil sketch shows just past the peak.

What the interactive shows, in words

The interactive plots lift coefficient against angle of attack for a teaching airfoil: a straight line through C_L = 0 at −2°, rising 0.1 per degree to a peak of 1.4 at 12°, then falling. A slider moves a marker along the curve and tilts a small airfoil sketch; past 12° the sketch shows a wavy separated wake instead of a smooth streamline. The readout states C_L and whether the wing is stalled.

Understand

Anatomy of an airfoil

The leading edge meets the air; the sharp trailing edge lets it leave smoothly. The straight line between them is the chord c. Camber is how much the mean line curves. The angle of attack α is the angle between the chord and the oncoming air, not between the wing and the ground.

The straight part of the lift curve

For small angles, C_L rises in a straight line: C_L = a·(α − α₀). Thin-airfoil theory predicts a = 2π per radian ≈ 0.11 per degree; real wings of finite span manage less, often about 0.08–0.1 per degree. α₀ is the zero-lift angle: 0° for symmetric sections, a couple of degrees negative for cambered ones.

Stall: the curve bends over

Past a critical angle (often 12–16° for a simple airfoil) the air can no longer follow the upper surface. It separates, leaving a churning wake. C_L stops rising and falls, while drag jumps. Stall is set by angle of attack, not by speed.

Explain it another way: intuitive

Stick your flat hand out of a car window (safely, as a passenger). Tilt the front edge up a little and your hand rises. Tilt it more and the push grows. Tilt it a lot and it suddenly buffets and pushes mostly backwards: that is a stall.

Explain it another way: technical

The lift coefficient is lift divided by dynamic pressure and area: C_L = L/(½ρv²S). It is dimensionless, so one curve works at any speed or size, as long as Reynolds and Mach numbers are similar. The teaching airfoil here has a = 0.1/°, α₀ = −2°, C_L,max = 1.4 at 12°.

Explain it another way: mathematical

C_L = 0.1 × (α − (−2°)). At α = 4°: 0.1 × 6 = 0.6. At α = 0°: 0.2, so this cambered wing lifts with no tilt. Thin-airfoil slope 2π rad⁻¹ × (π/180) rad/° ≈ 0.1097 per degree.

Explain it another way: applied

Pilots fly with an angle-of-attack indicator on many military and some light aircraft because stall happens at one angle whatever the speed or weight. Wind turbine blades twist along their length so every section meets the wind at its best angle.

Try these examples

Example 1

An airfoil has a = 0.105 per degree and α₀ = −3°. Find C_L at α = 5°.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. Angle of attack is the angle between…

  • the wing and the ground
  • the chord line and the oncoming air
  • the fuselage and the horizon
  • the upper and lower surfaces

2. With C_L = 0.1 × (α + 2°), what is C_L at α = 4°?

Answer:

3. In its straight-line (unstalled) range, an airfoil has lift slope a = 0.105 per degree and zero-lift angle α0 = -2 °. What is its lift coefficient at α = 5.5 °? (3 decimal places)

Answer:

4. The angle of attack is increased past the stalling angle. What happens to lift and drag?

  • Lift keeps rising, drag falls
  • Lift falls, drag rises sharply
  • Both drop to zero
  • Nothing changes until the speed drops

5. A cambered airfoil's zero-lift angle α₀ is about −2°. What does this mean?

  • It makes lift even at α = 0°
  • It cannot fly upside down
  • It stalls at −2°
  • It makes no lift until α = 2°

Apply it

A wind tunnel gives this table for a model wing: α = 0, 2, 4, 6, 8° and C_L = 0.21, 0.40, 0.61, 0.79, 1.01. Estimate the lift slope a and zero-lift angle α₀ by fitting a straight line. You can use the method from the Code Lab least-squares exercise (code:least-squares-line) on this table.

Reflect

Why is a dimensionless lift coefficient more useful to an engineer than a table of lift forces measured at one speed?

Week 15: Forward kinematics

This week you will

Forward kinematics as a chain of transforms

Add a third joint, a fourth, a seventh. The trigonometry gets ugly fast. What stays simple?

About 35 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

The two-link formula is neat, but real arms have six or seven joints. Writing FK as a chain of identical building blocks, 'rotate by θᵢ, then slide along the link by Lᵢ', scales to any number of joints and also tells you the hand's orientation for free. It's how robot software actually does it.

Goals

Predict

In the chain T = Rot(θ1)·Trans(L1)·Rot(θ2)·Trans(L2), what is the hand frame's total rotation?

  1. θ2
  2. θ1 + θ2
  3. θ1 × θ2
  4. It depends on L1 and L2

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Open the Robotics Workbench. Build a two-link arm, then add a third link. For one pose, write the chain of three 'rotate, then move along the link' steps and multiply them by hand (or in Python) to predict the tool tip and its angle. Compare with the workbench's readout.

What the interactive shows, in words

In the Robotics Workbench you assemble links and joints and read the tool tip's position and angle. Without it: for joint angles 30°, 60° and −45° with links 0.4, 0.3 and 0.1 m, the chain of three rotate-then-move blocks puts the tip at about (0.417, 0.571) m, facing 45°.

Understand

One block per joint

Each joint contributes A(θᵢ, Lᵢ) = Rot(θᵢ)·Trans(Lᵢ): turn by the joint angle, then move along the new x axis by the link length. The hand's pose in the base frame is the product T_base←hand = A₁·A₂·…·Aₙ. The last column gives the position; the top-left block gives the orientation.

Same answer, more information

For two links, multiplying out reproduces x = L1 cos θ1 + L2 cos(θ1 + θ2) exactly (see the derivation). But the matrix also hands you the orientation of the hand, θ1 + θ2, and the position of every intermediate joint along the way: just stop the product early.

Why engineers prefer chains

The chain is systematic: the same block, repeated. It works unchanged for any number of joints, and in 3D (with 4×4 matrices) for real industrial arms. Conventions such as Denavit–Hartenberg parameters are a standard recipe for writing each block. Computers multiply the matrices; humans just have to get the chain right.

Explain it another way: intuitive

Imagine a little turtle walking along the arm: at each joint it turns by the joint angle, then walks the length of the link. Wherever it ends up, facing whichever way, is the hand's pose.

Explain it another way: technical

Planar serial FK is a product of exponentials in SE(2): T(θ) = Π Rot(θᵢ)Trans(Lᵢ). The partial products give each joint frame, which is also what's needed later to compute Jacobians.

Explain it another way: mathematical

θ = (30°, 60°, −45°), L = (0.4, 0.3, 0.1): absolute angles 30°, 90°, 45°. Tip = 0.4(0.866, 0.5) + 0.3(0, 1) + 0.1(0.707, 0.707) = (0.346 + 0 + 0.071, 0.2 + 0.3 + 0.071) = (0.417, 0.571) m, facing 45°.

Explain it another way: applied

A painting robot needs its spray nozzle not just at a point but pointing at the surface. The orientation block of the FK chain is what lets the controller check the nozzle angle.

Derivation: Two-link FK from transforms
  1. Joint i rotates by θᵢ: Rot(θ) = [cos θ −sin θ 0; sin θ cos θ 0; 0 0 1]. Link i slides along its own x axis: Trans(L) = [1 0 L; 0 1 0; 0 0 1].

  2. One joint-plus-link block: A(θ, L) = Rot(θ)·Trans(L) = [cos θ −sin θ L cos θ; sin θ cos θ L sin θ; 0 0 1].

  3. The hand frame is T = A(θ1, L1)·A(θ2, L2). Its rotation block is R(θ1)R(θ2) = R(θ1 + θ2).

  4. Its translation column is R(θ1)·(L2 cos θ2, L2 sin θ2) + (L1 cos θ1, L1 sin θ1).

  5. Using the angle-addition formulas, R(θ1)·(L2 cos θ2, L2 sin θ2) = L2(cos(θ1 + θ2), sin(θ1 + θ2)). So the hand is at (L1 cos θ1 + L2 cos(θ1+θ2), L1 sin θ1 + L2 sin(θ1+θ2)): the familiar formula.

  6. A third link just multiplies one more block: T = A(θ1, L1)·A(θ2, L2)·A(θ3, L3), with orientation θ1 + θ2 + θ3.

Try these examples

Example 1

Use the block form to find the elbow position (the end of link 1) for θ1 = 60°, L1 = 0.5 m.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. A three-joint planar arm has θ1 = 50°, θ2 = −20°, θ3 = 35°. What is the tool's orientation (absolute angle), in degrees?

Answer: °

2. A two-link arm has L1 = 0.3 m and L2 = 0.4 m. The shoulder is at θ1 = 15° and the elbow at θ2 = −60° (measured from link 1). What is the hand's y position, in metres? (3 decimal places)

Answer: m

3. A gripper frame has its origin at (−1, 1) in the world and is rotated 150°. A sensor sits at (1, 0) in the gripper frame. What is its world x coordinate? (3 decimal places)

Answer:

4. Why is each block Rot(θ)·Trans(L) and not Trans(L)·Rot(θ)?

  • It makes no difference
  • The link extends along the joint's new direction, so the turn must come first
  • Translations must always be on the left
  • So that the determinant is 1

5. A tool of length 0.1 m points at an absolute angle of 180°, starting from a wrist at (0.5, 0.2) m. What is the tip's x coordinate?

Answer: m

Apply it

In Python, write a function that multiplies a list of 3×3 blocks A(θᵢ, Lᵢ) and returns the tip position and orientation. Verify it against your two-link fk() and then use it on a three-link arm in the Robotics Workbench.

Reflect

What would change if one joint were a sliding (prismatic) joint instead of a rotating one? Which block would you replace?

Go further (online)

Mapping the workspace: everywhere the hand can go

A two-link arm with 5 cm and 3 cm fingers can never touch a point 1 cm from its knuckle. Why is there a hole in the middle?

About 35 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Before you choose motors or write code, you must know where the arm can reach. Too short and it misses parts; too long and it's heavy and slow. The workspace map is one of the first drawings in any robot-arm design review, and for a two-link arm it's a single, beautiful shape.

Goals

Predict

An arm has L1 = 5 cm and L2 = 3 cm, joints that turn freely. Which point can its tip NOT reach?

  1. (6, 2) cm
  2. (0, −7) cm
  3. (1, 0) cm
  4. (−4, 4) cm

Write down your guess and your reason. The reveal is in the online lesson.

Discover

In the Robotic Gripper Build, Level 2 'Find the fingertip': before touching the live finger, calculate the tip position for both poses, the nearest and furthest reach, and which of the four points are reachable. Then test every prediction on the live finger.

What the interactive shows, in words

The Gripper Build's Level 2 uses a 5 cm + 3 cm finger. Its tip reaches from 2 cm (folded) to 8 cm (straight) from the knuckle in every direction, a ring. At (90°, −90°) the tip is at (3, 5) cm; of the four test points only (6, 2) and (0, −7) cm are reachable.

Understand

A ring

With joints that turn all the way round, the tip's distance from the shoulder can be anything from |L1 − L2| (elbow fully folded) to L1 + L2 (arm straight). Every direction is possible, so the workspace is a ring (annulus). A target is reachable exactly when |L1 − L2| ≤ √(x² + y²) ≤ L1 + L2.

Choosing link lengths

Equal links (L1 = L2) close the hole: the tip can reach the shoulder itself. Very unequal links leave a big hole. The outer radius sets the reach; the inner radius sets how close to the base the arm can work. Designers pick lengths so the task's points sit comfortably inside the ring, away from both edges (where the arm is nearly straight or nearly folded and moves poorly).

Real joints have limits

Real joints can't turn 360°: cables, hard stops and the arm hitting itself limit them. Joint limits carve slices out of the ring, so some points become reachable only with the elbow one way, or not at all. That's why the full design check in the Gripper Build tests real target points, not just the ring.

Explain it another way: intuitive

Hold your upper arm still and swing your forearm: your hand draws a circle. Now move your upper arm too: all those circles together sweep out a ring around your shoulder.

Explain it another way: technical

The workspace is the image of the FK map. For revolute joints without limits it is the annulus {p : |L1 − L2| ≤ |p| ≤ L1 + L2}. On its boundary circles, det J = L1 L2 sin θ2 = 0: the boundary is where the arm is singular.

Explain it another way: mathematical

L1 = 50 cm, L2 = 10 cm: ring 40–60 cm. Target (−1.9, −0.7) cm is about 2 cm away: 38 cm inside the hole. Target (0, 33) with L1 = 30, L2 = 10: 33 cm, inside 20–40 cm, reachable.

Explain it another way: applied

A pick-and-place cell is laid out so that the parts tray and the conveyor both sit in the middle of the arm's ring. Placing them near the outer edge would force slow, stretched-out, error-prone moves.

Try these examples

Example 1

L1 = 0.4 m, L2 = 0.25 m. Is (0.5, 0.45) m reachable?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. L1 = 0.45 m and L2 = 0.3 m. What is the inner radius of the workspace ring, in metres?

Answer: m

2. A planar arm has links of 30 cm and 45 cm and joints that can turn all the way round. A target is at (−76.1, −27.7) cm from the shoulder. How far outside the reachable ring is it, in cm? (Enter 0 if the hand can reach it.)

Answer: cm

3. Why do many arms use roughly equal link lengths?

  • It's cheaper to buy identical parts
  • It closes the hole: the tip can reach right back to the base
  • It doubles the reach
  • It removes all singularities

4. A two-link arm has L1 = 0.4 m and L2 = 0.35 m. The shoulder is at θ1 = 120° and the elbow at θ2 = 120° (measured from link 1). What is the hand's x position, in metres? (3 decimal places)

Answer: m

5. An elbow can only bend between 0° and 150°. What happens to the workspace?

  • Nothing
  • Points needing a tighter fold than 150° become unreachable, and only one elbow pose is available
  • It gets bigger
  • The arm can no longer reach full stretch

Apply it

Choose L1 and L2 (total 0.8 m) for an arm that must reach (0.6, 0.2), (0.1, 0.4) and (−0.3, −0.3) m, each at least 5 cm inside the ring's edges. Show your ring calculation, then check each target in the two-link diagram's Inverse mode.

Reflect

Why might a designer deliberately keep targets away from the outer edge of the workspace, even though they are reachable there?

Go further (online)

The lift equation, units and all

Fly twice as fast and you get four times the lift. Why squared, and what does that mean for a heavy plane on a hot day at a mountain airport?

About 35 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

This one equation sizes every wing. Choose a cruise speed and altitude, know the weight, and it tells you how big the wing must be. It also explains why runways at high, hot airports are long and why airliners fly slower with flaps out.

Goals

Predict

An aircraft doubles its airspeed while keeping its wing at the same angle. Its lift becomes about…

  1. the same
  2. twice as much
  3. four times as much
  4. half as much

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Set 800 kg, 14 m² and C_L 0.5. Find the speed where lift crosses the weight line. Then switch to 2,000 m altitude: how much faster must it fly?

What the interactive shows, in words

The interactive plots lift in kilonewtons against airspeed from 0 to 80 m/s, a curve that rises with the square of speed, and a dashed horizontal line at the aircraft's weight. Sliders set airspeed, wing area, lift coefficient and mass; buttons set altitude, which lowers the curve in thinner air. The readout works through q = ½ρv², L = q·S·C_L and compares lift with weight; for 40 m/s, 14 m², C_L 0.5 at sea level it gives 980 Pa and 6,860 N.

Understand

Four knobs on lift

L = ½ρv²SC_L. ρ: thinner air at altitude or on hot days means less lift. v: lift grows with the square of speed. S: a bigger wing makes proportionally more lift. C_L: set by shape and angle of attack, up to C_L,max at the stall.

Dynamic pressure is the key quantity

q = ½ρv² is the pressure you would feel if the moving air were brought to rest. At 40 m/s at sea level, q = 0.5 × 1.225 × 1,600 = 980 Pa. Lift is just q × S × C_L: 980 × 14 × 0.5 = 6,860 N.

Flying level at different speeds

Lift must equal weight. Rearranged, C_L = W/(qS). An 800 kg aircraft (7,848 N) with 14 m² at 40 m/s needs C_L = 7,848 ÷ (980 × 14) ≈ 0.57. Slower flight needs a bigger C_L, so a higher angle of attack, until the stall limits it.

Explain it another way: intuitive

A wing is a machine for pushing air down. Faster flight means more air arrives each second and each bit is hit harder: two reasons, so v twice, which is v². Denser air means more kilograms of air in each cubic metre to push.

Explain it another way: technical

The lift equation is a definition of C_L plus an experimental fact: for a given shape and angle, C_L stays nearly constant across speeds as long as the Reynolds number and Mach number don't change much. Compressibility starts to matter above about Mach 0.3 (around 100 m/s).

Explain it another way: mathematical

Density at 2,000 m (ISA) is about 1.007 kg/m³, 82 % of sea level. Same lift, same C_L ⇒ v ∝ 1/√ρ, so v rises by √(1.225/1.007) ≈ 1.103: 10 % faster. At 40 m/s and 2,000 m, lift is 6,860 × 0.822 ≈ 5,640 N.

Explain it another way: applied

Airliners take off with flaps and slats extended to raise C_L,max so they can lift off at a lower speed and use less runway. At high-altitude airports on hot days the low density can force operators to carry fewer passengers or less fuel.

Derivation: Where ½ρv²SC_L comes from (dimensional reasoning)
  1. Lift can depend on air density ρ (kg/m³), airspeed v (m/s), wing area S (m²) and the wing's shape and angle.

  2. Dynamic pressure q = ½ρv² has units kg/m³ × m²/s² = kg/(m·s²) = N/m², a pressure.

  3. A pressure times an area is a force: q·S has units N/m² × m² = N.

  4. Everything else (shape, angle of attack) is bundled into a dimensionless number C_L, measured in a wind tunnel: L = ½ρv²·S·C_L.

  5. Rearranged for level flight (L = W): C_L = W ÷ (½ρv²S).

Try these examples

Example 1

A wing of 16 m² flies at 50 m/s at sea level with C_L = 0.4. Find the lift.

The worked solution is in the online lesson.

Example 2

What C_L does a 1,000 kg aircraft with 16 m² need to fly level at 50 m/s at sea level?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. What are the units of ½ρv² when ρ is in kg/m³ and v in m/s?

  • N
  • Pa (N/m²)
  • m/s²
  • kg/s

2. Find the lift in newtons: ρ = 1.225 kg/m³, v = 40 m/s, S = 14 m², C_L = 0.5.

Answer: N

3. What is the dynamic pressure q = ½ρv² of air with ρ = 1.112 kg/m³ moving at v = 49 m/s, in pascals?

Answer: Pa

4. A wing has area S = 17 m² and works at C_L = 1.3 in air of ρ = 1.112 kg/m³ at v = 54 m/s. How much lift does it make, in newtons?

Answer: N

5. An aircraft of m = 1100 kg with wing area S = 13.5 m² flies level at v = 31 m/s near sea level (ρ = 1.225 kg/m³, g = 9.81 m/s²). What lift coefficient must the wing work at? (3 decimal places)

Answer:

Apply it

A delivery drone of 4 kg must cruise at 18 m/s at sea level with its wing at C_L = 0.6. What wing area does it need? Then work out how much faster it must fly at 3,000 m (ρ ≈ 0.909 kg/m³) with the same wing and C_L. Show units at every step.

Reflect

Which of the four knobs (ρ, v, S, C_L) can a pilot change during a flight, which can only the designer change, and which does the weather choose?

Stall speed: how slow can it fly?

A plane that flies happily at 26 m/s in a straight line can stall at 36 m/s in a steep turn. Same wing, same air. How?

About 35 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Stall speed sets the landing speed, so it sets runway length, brake size and how survivable a mistake is. Loss of control, often after a stall, is among the leading causes of fatal light-aircraft accidents, which is why every pilot learns this number for their aircraft.

Goals

Safety: This is a simulation-only topic. Do not attempt stall experiments with real aircraft or drones near people; stall training is done only with a qualified instructor.

Predict

Lowering flaps raises C_L,max from 1.4 to 2.1. The stall speed…

  1. drops to two-thirds of its old value
  2. drops to about 82 % of its old value
  3. does not change, because the weight is the same

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Start at 800 kg, 14 m², clean wing, sea level, no bank. Read the stall speed. Now bank to 60°: by what factor did it rise? Then try full flaps and 3,000 m altitude.

What the interactive shows, in words

The interactive plots stall speed against bank angle from 0 to 70°: the curve starts at the level stall speed and climbs steeply at large bank angles. Sliders set mass, wing area and bank angle; buttons choose flap setting (C_L,max 1.4, 1.8 or 2.1) and altitude. The readout gives the level stall speed, the turning stall speed and a 1.3 × v_s approach speed; for 800 kg, 14 m², clean wing at sea level it reports 25.6 m/s, rising to 36.2 m/s at 60°.

Understand

One number, five influences

v_s = √(2W/(ρSC_L,max)). Heavier: faster stall. Bigger wing: slower. Flaps (higher C_L,max): slower. Thinner air: faster true airspeed. For 800 kg, 14 m², C_L,max 1.4 at sea level: v_s = √(2 × 7,848 ÷ (1.225 × 14 × 1.4)) ≈ 25.6 m/s, about 50 knots.

Turns load the wing

In a level turn the lift tilts with the wings, so only L·cos φ holds up the weight. Lift must rise to W/cos φ: the load factor n = 1/cos φ. At 60° bank n = 2, so the stall speed rises by √2: 25.6 → 36.2 m/s.

Stall is an angle, not a speed

A wing stalls whenever its angle of attack passes the critical angle: in a steep turn, a sharp pull-up, or at high speed. Stall speed is just the speed at which level flight needs that angle. Pilots approach to land at about 1.3 × v_s to keep a margin.

Explain it another way: intuitive

Slowing down is like a weaker push from the air, so the wing must tilt more to keep holding the plane up. There's a limit to how much it can tilt before the air stops following it. The speed where you hit that limit is the stall speed.

Explain it another way: technical

C_L,max depends on the airfoil, the Reynolds number, surface roughness (ice and insects lower it) and high-lift devices: plain flaps add camber; slotted flaps and slats also re-energise the boundary layer. Certification rules require stall warning before the stall and recoverable stall behaviour.

Explain it another way: mathematical

v_s ∝ √(W/(ρ S C_L,max)). Flaps 1.4 → 2.1: × √(1.4/2.1) = 0.816, so 25.6 → 20.9 m/s. 60° bank: n = 1/cos 60° = 2, × √2 = 1.414, so 25.6 → 36.2 m/s. Approach: 1.3 × 25.6 ≈ 33.2 m/s.

Explain it another way: applied

Short take-off aircraft use huge flaps and slats to reach C_L,max above 3. Gliders thermal in steep circles, so their pilots watch speed closely because the stall speed in a 45° turn is about 19 % above the straight-line value.

Derivation: Stall speed from the lift equation
  1. In level flight L = W, and L = ½ρv²SC_L.

  2. As the aircraft slows, the pilot raises the angle of attack to raise C_L and keep L = W.

  3. The slowest possible level flight is reached when C_L = C_L,max: W = ½ρv_s²·S·C_L,max.

  4. Solve for v_s: v_s = √(2W ÷ (ρ·S·C_L,max)).

  5. In a level turn at bank φ the wing must carry n·W with n = 1/cos φ, so v_s,turn = v_s·√n.

Try these examples

Example 1

A 1,000 kg aircraft has 16 m² of wing and C_L,max = 1.5. Find its sea-level stall speed.

The worked solution is in the online lesson.

Example 2

What is the same aircraft's stall speed in a level 45° bank?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. What actually causes a wing to stall?

  • Flying below a fixed minimum speed
  • Exceeding the critical angle of attack
  • The engine losing power
  • Flying too high

2. Find the sea-level stall speed in m/s for 800 kg, S = 14 m², C_L,max = 1.4 (ρ = 1.225 kg/m³, g = 9.81 m/s²).

Answer: m/s

3. An aircraft of m = 740 kg has wing area S = 14 m² and maximum lift coefficient C_Lmax = 1.8. Air density is ρ = 1.112 kg/m³ and g = 9.81 m/s². What is its level-flight stall speed, in m/s?

Answer: m/s

4. An aircraft stalls at v_s = 26 m/s in level flight. In a level, coordinated turn at bank angle φ = 45 °, the wing must carry n = 1/cos φ times the weight. What is the stall speed in the turn, in m/s?

Answer: m/s

5. An aircraft takes off 20 % heavier than usual. Its stall speed is…

  • 20 % higher
  • about 9.5 % higher
  • unchanged
  • 20 % lower

Apply it

Design a landing configuration: an 1,100 kg aircraft with 15 m² must touch down no faster than 28 m/s at sea level, using an approach speed of 1.3 × v_s. What C_L,max must the flaps give? Is that realistic for simple flaps (about 2.0)?

Reflect

Why do you think pilots are taught 'stall is an angle, not a speed' so insistently?

Drag, the drag polar and the best L/D

A glider can travel 40 km from 1 km up without an engine. A brick can't. Which single number explains the difference?

About 40 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Drag is what fuel pays for. The lift-to-drag ratio is the single most important number for range: an airliner's L/D of about 18 versus a light aircraft's 10 is much of why one crosses oceans. Choosing where on the drag curve to fly is a classic engineering trade-off.

Goals

Predict

As an aircraft flies slower and slower in level flight, its total drag…

  1. keeps falling, because slower means less air resistance
  2. falls, reaches a minimum, then rises again
  3. stays the same

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Slide the speed from 22 to 90 m/s and watch the two drag curves. Find the speed of minimum total drag and read L/D there. Now raise the aspect ratio to 20: what happens to the minimum?

What the interactive shows, in words

The interactive plots drag against airspeed from 22 to 90 m/s for an 800 kg aircraft: a dashed parasite-drag curve rising with speed, a dotted induced-drag curve falling with speed, and a solid total-drag curve with a bucket-shaped minimum marked by a vertical line. Sliders set airspeed and aspect ratio. The readout gives C_L, both drag parts, total drag and L/D at the chosen speed, plus the minimum-drag speed and (L/D)max; with aspect ratio 8 the minimum is at 35.9 m/s and (L/D)max is 14.2.

Understand

Two kinds of drag

Parasite drag comes from skin friction and pressure behind the shape: D_p = q·S·C_D0, growing with v². Induced drag is the cost of making lift: wingtip vortices tilt the lift backwards. Its coefficient is k·C_L² with k = 1/(π·e·AR), where AR = span²/area and e ≈ 0.7–0.9.

The drag polar

C_D = C_D0 + k·C_L². In level flight, slow speed means high C_L, so induced drag dominates; high speed means low C_L, so parasite drag dominates. Total drag is lowest where the two are equal. For 800 kg, S = 14 m², C_D0 = 0.025, e = 0.8, AR = 8: minimum drag is about 554 N at 35.9 m/s, so L/D ≈ 14.2.

L/D is glide ratio

In a steady glide, distance flown ÷ height lost = L/D. With L/D = 14, 1,000 m of height buys about 14 km. Modern gliders reach 40–60 by combining very low C_D0 with aspect ratios above 20.

Explain it another way: intuitive

Lift has a price. A short, stubby wing has to throw a small amount of air down hard, which wastes energy in swirling tip vortices. A long, thin wing gently nudges a lot of air, which is cheaper. That is induced drag. Then there is the plain rubbing and wake of moving anything through air: parasite drag.

Explain it another way: technical

k = 1/(πeAR) comes from lifting-line theory: an elliptical lift distribution (e = 1) gives the least induced drag for a given span. Parasite drag includes skin friction (strongly Reynolds-number dependent), form drag and interference drag. At high Mach numbers wave drag adds a third term.

Explain it another way: mathematical

k = 1/(π × 0.8 × 8) ≈ 0.04974. C_L* = √(0.025/0.04974) ≈ 0.709. (L/D)max = 1/(2√(0.025 × 0.04974)) ≈ 14.18. At 45 m/s: C_L = 0.452, D = 434 + 176 = 610 N, L/D ≈ 12.9. At 30 m/s: C_L = 1.017, D = 193 + 397 = 590 N, L/D ≈ 13.3.

Explain it another way: applied

Winglets on airliners reduce induced drag by weakening tip vortices. Long-range drones use high-aspect-ratio wings; racing aircraft use short wings and accept more induced drag because at high speed parasite drag is what matters.

Derivation: Maximum L/D from the drag polar
  1. L/D = C_L/C_D = C_L ÷ (C_D0 + k·C_L²).

  2. Maximise by minimising C_D/C_L = C_D0/C_L + k·C_L.

  3. Differentiate with respect to C_L and set to zero: −C_D0/C_L² + k = 0, so *C_L = √(C_D0/k)**.

  4. At that point k·C_L² = C_D0: induced drag equals parasite drag.

  5. Substitute: (L/D)max = C_L* ÷ (2·C_D0) = 1 ÷ (2√(C_D0·k)).

Try these examples

Example 1

A glider has L/D = 38 and is 600 m above the ground. How far can it glide in still air?

The worked solution is in the online lesson.

Example 2

A wing has C_D0 = 0.02, e = 0.85, AR = 12. Find (L/D)max.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. In level flight, which kind of drag dominates at low speed?

  • Parasite drag, because the wing works hardest
  • Induced drag, because the wing needs a high C_L
  • Neither: drag is zero at low speed
  • Wave drag

2. An aircraft with L/D = 14 loses its engine at 1,500 m. How far can it glide, in km?

Answer: km

3. With the engine off, an aircraft at height h = 1200 m glides at its best lift-to-drag ratio L/D = 27 in still air. Roughly how far over the ground can it glide, in kilometres?

Answer: km

4. A wing's drag polar is C_D = C_D0 + k·C_L² with C_D0 = 0.025, k = 1/(π·e·AR), e = 0.85 and AR = 17. What is the maximum lift-to-drag ratio? (1 decimal place)

Answer:

5. Why do gliders have very long, thin wings?

  • To reduce parasite drag
  • To reduce induced drag by raising the aspect ratio
  • To increase the stall speed
  • Because they are easier to build

Apply it

Using the drag explorer's aircraft (800 kg, 14 m², C_D0 = 0.025, e = 0.8), find the aspect ratio that gives (L/D)max = 18. Then say one thing that would make such a wing harder to build. Show the algebra: rearrange (L/D)max = 1/(2√(C_D0·k)) for AR.

Reflect

If you were designing a long-endurance survey drone, where on the drag curve would you choose to fly, and what would you give up?

Week 16: Inverse kinematics intuition

This week you will

Inverse kinematics: from a target to joint angles

Forward kinematics always has one answer. Ask the question backwards, 'which angles put the hand HERE?', and you may get two answers, or none. Why?

About 40 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Tasks are given as positions ('pick the bolt at (0.5, 0.2) m'), but motors take angles. Inverse kinematics (IK) closes that gap. For a two-link arm it has a neat closed-form answer built from the law of cosines and atan2, the same tools you've practised all term.

Goals

Predict

L1 = L2 = 0.5 m. The target is (1, 0) m. What must the elbow angle θ2 be?

  1. 0°
  2. 90°
  3. 180°
  4. There is no solution

Write down your guess and your reason. The reveal is in the online lesson.

Discover

In 'Inverse' mode, drag the target around with the sliders. Watch the readout's cos θ2 value. What happens to it as the target approaches the outer edge? The inner edge? Just outside? Note the grey dashed arm: when do the two solutions look most different?

What the interactive shows, in words

In Inverse mode a crosshair marks the target; the arm is drawn reaching it with the chosen elbow, and the other solution is shown as a grey dashed arm. The readout gives d, cos θ2, both joint-angle pairs and an FK check, or says the target is unreachable and by how much.

Understand

The elbow first

Only the distance to the target decides how much the elbow must bend; direction doesn't matter. Compute d² = x² + y², then cos θ2 = (d² − L1² − L2²)/(2L1L2). If |cos θ2| > 1 the target is unreachable. Otherwise there are two elbow angles, +θ2 and −θ2 (one if θ2 = 0 or 180°).

Then the shoulder

With θ2 chosen, θ1 = atan2(y, x) − atan2(L2 sin θ2, L1 + L2 cos θ2). The first term points the shoulder straight at the target; the second rotates it back by the angle the bent elbow adds. Use atan2 for both: targets behind or below the base are common.

Trust, but verify

IK formulas are easy to get subtly wrong (a sign, the order of atan2's arguments, degrees vs radians). The fix is cheap: run FK on your answer. If the hand lands on the target, the IK is right. Every robot library's tests do exactly this, as do this lesson's practice generators.

Explain it another way: intuitive

To touch something, you first decide how much to bend your elbow (by how far away it is), then swing your whole arm to aim. Close things need a big bend; far things need a straight arm.

Explain it another way: technical

Two-link IK is a closed-form solution of two nonlinear equations in two unknowns. The two branches are related by reflecting the elbow across the shoulder–target line. Numerical IK (iterating with the Jacobian) is used when no closed form exists, as for many 6-joint arms with offsets.

Explain it another way: mathematical

L1 = 0.6, L2 = 0.25, target (0.57, 0.6): d² = 0.6849. cos θ2 = (0.6849 − 0.36 − 0.0625)/0.3 = 0.8747, |θ2| ≈ 29.0°. Elbow down θ2 = +29.0°: θ1 = atan2(0.6, 0.57) − atan2(0.25 sin 29°, 0.6 + 0.25 cos 29°) = 46.47° − 8.42° ≈ 38.0°.

Explain it another way: applied

When an operator types a target into a robot pendant, the controller solves IK, checks that the result respects joint limits, and only then moves. A target that fails IK is rejected before anything moves.

Derivation: Two-link IK with the law of cosines
  1. Shoulder at the origin, target at (x, y), distance d = √(x² + y²). The shoulder, elbow and hand form a triangle with sides L1, L2 and d.

  2. The interior angle at the elbow is 180° − |θ2| (θ2 measures how far link 2 turns away from straight).

  3. Law of cosines: d² = L1² + L2² − 2·L1·L2·cos(180° − θ2) = L1² + L2² + 2·L1·L2·cos θ2.

  4. So cos θ2 = (x² + y² − L1² − L2²) / (2·L1·L2), and θ2 = ±cos⁻¹(that). Plus is elbow down, minus is elbow up (this course's convention).

  5. If the right-hand side is above 1 or below −1, no angle exists: the target is outside the ring.

  6. Shoulder: aim at the target, then correct for the bend: θ1 = atan2(y, x) − atan2(L2 sin θ2, L1 + L2 cos θ2). The correction flips sign with θ2, giving the two matching shoulder angles.

  7. Always check: put (θ1, θ2) back through FK. You should land on (x, y).

Try these examples

Example 1

L1 = 5 cm, L2 = 3 cm, target (6, 2) cm. Find both solutions.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. L1 = 0.5 m, L2 = 0.5 m, target (0.5, 0.5) m. What is cos θ2? (2 decimal places)

Answer:

2. A two-link arm has L1 = 0.4 m and L2 = 0.4 m. Its hand must reach (0.697, 0.275) m. How much must the elbow bend, |θ2|, in degrees? (The elbow-up and elbow-down solutions share this size.)

Answer: °

3. A two-link arm (L1 = 0.5 m, L2 = 0.35 m) must reach (0.097, 0.674) m with the elbow DOWN (θ2 positive). Its elbow angle is θ2 = 74.9°. What is the shoulder angle θ1, in degrees? (between −180 and 180)

Answer: °

4. You compute cos θ2 = 1.18. What does it mean?

  • θ2 ≈ 10°
  • The target is beyond full stretch: no solution
  • Use the elbow-up solution
  • Round it to 1

5. What is the most reliable quick check of an IK answer?

  • Check θ1 is positive
  • Run forward kinematics on the angles and compare with the target
  • Check θ2 is less than 180°
  • Ask whether the angles look reasonable

Apply it

Write ik(L1, L2, x, y, elbow) in Python. Test it by checking that fk(ik(...)) returns the target for 20 random reachable targets, and that it reports unreachable targets cleanly instead of crashing.

Reflect

The derivation started from a triangle. Where exactly would it break if the target were outside the workspace, and how does the formula tell you?

Go further (online)

Elbow up or elbow down? Choosing between solutions

Two sets of joint angles put the hand on the same bolt. One of them smashes the elbow into a shelf. How does a robot choose?

About 30 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Multiple IK solutions are a gift and a trap. The gift: a robot can reach around obstacles. The trap: picking the 'other' solution halfway through a move sends the elbow sweeping across the cell. Real controllers choose deliberately, and stick with their choice.

Goals

Predict

For a target to the right of the base, how are the elbow-up and elbow-down shoulder angles related?

  1. They are equal
  2. Elbow up has the larger θ1
  3. Elbow down has the larger θ1
  4. One is always negative

Write down your guess and your reason. The reveal is in the online lesson.

Discover

In the robot-arm lab, set a target and solve IK in both elbow modes. Record θ1 and θ2 for each. Then imagine a shelf just above the arm: which solution would hit it? Move the target towards the outer edge: what happens to the difference between the two solutions?

What the interactive shows, in words

The robot-arm lab can solve IK with the elbow up or down. Without it: for L1 = 0.4 m, L2 = 0.25 m and target (−0.03, 0.489) m, elbow down gives θ1 ≈ 63.0°, θ2 = 85°; elbow up gives θ1 ≈ 124.1°, θ2 = −85°. The two arms are mirror images across the line from the shoulder to the target.

Understand

Mirror images

The two solutions share |θ2| and are reflections of each other across the line from shoulder to target. With this course's convention elbow up has θ2 < 0, elbow down θ2 > 0. At the edges of the ring (θ2 = 0 or ±180°) they coincide; in the middle of the ring they differ the most.

How to choose

Common rules: (1) reject any solution outside joint limits or that collides with something; (2) among the rest, pick the one closest to the current joint angles, so the move is short and predictable; (3) keep the same branch throughout a task. Many industrial arms fix the branch in the program ('elbow up' configuration) for exactly this reason.

Don't flip mid-move

If a controller re-solves IK at every step of a straight-line hand move and naively picks 'the first solution', it can jump from one branch to the other. The hand target barely changes, but the elbow swings through a huge arc in one step. That's a sudden, fast, dangerous motion, and a classic bug to test for.

Explain it another way: intuitive

Reach for a cup on a table: you can lead with your elbow up and out, or tucked low. Both get your hand there. You pick the one that doesn't knock the vase over, and you don't swap halfway.

Explain it another way: technical

The IK solution set for a reachable interior target is {(θ1⁺, θ2⁺), (θ1⁻, θ2⁻)}. Choosing by minimum ‖θ − θ_current‖ gives continuity along smooth paths as long as the path stays away from the workspace boundary, where the branches meet.

Explain it another way: mathematical

L1 = 0.4, L2 = 0.25, target (−0.03, 0.489): |θ2| = 85.0°. Elbow down θ2 = +85°: θ1 = 93.51° − 30.55° = 62.96°. Elbow up θ2 = −85°: θ1 = 93.51° + 30.55° = 124.06°.

Explain it another way: applied

Welding robots in car factories are programmed with a fixed configuration so that the hoses and cables on the elbow always sit on the same side and never wind up as the arm moves.

Try these examples

Example 1

The arm is at (θ1, θ2) = (40°, −70°). The two IK solutions for the next target are (45°, −75°) and (−5°, 75°). Which should it use?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. What do the elbow-up and elbow-down solutions for the same target always share?

  • The same θ1
  • The same |θ2|
  • The same elbow position
  • Nothing

2. A two-link arm (L1 = 0.4 m, L2 = 0.4 m) must reach (0.114, 0.396) m with the elbow UP (θ2 negative). Its elbow angle is θ2 = −118°. What is the shoulder angle θ1, in degrees? (between −180 and 180)

Answer: °

3. A two-link arm has L1 = 0.5 m and L2 = 0.35 m. Its hand must reach (-0.047, 0.583) m. How much must the elbow bend, |θ2|, in degrees? (The elbow-up and elbow-down solutions share this size.)

Answer: °

4. Which rule best avoids sudden elbow swings during a long move?

  • Always pick the solution with positive θ1
  • Pick the valid solution closest to the current joint angles, and keep the same branch
  • Pick at random each step
  • Always pick elbow down

5. L1 = 0.4 m, L2 = 0.3 m. At what distance from the shoulder (other than 0.1 m) do the two IK solutions merge into one, in metres?

Answer: m

Apply it

A shelf occupies y > 0.45 m. For an arm with L1 = 0.4 m and L2 = 0.3 m reaching (0.5, 0.2) m, compute both solutions and the elbow position of each (the elbow is at L1(cos θ1, sin θ1)). Which one hits the shelf? Confirm in the lab.

Reflect

Your own arm has a third option your robot doesn't: rotating at the shoulder out of the plane. How does that extra freedom change the 'two solutions' picture?

Go further (online)

Unreachable targets, joint limits and singularities

Near full stretch, a tiny hand movement can need a huge, fast joint movement. Why do robots go 'weak' at the edge of their reach?

About 35 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

A robust controller must say 'no' gracefully: to targets outside the ring, to angles past a joint limit, and to moves through a singularity, where the arm can't move its hand in some direction at all. Knowing where these trouble spots are is the difference between a robot that stops safely and one that thrashes.

Goals

Predict

An arm is perfectly straight, pointing along +x. Which direction can its hand NOT move in, for a tiny joint movement?

  1. Up (+y)
  2. Down (−y)
  3. Further out (+x)
  4. Back towards the base (−x)

Write down your guess and your reason. The reveal is in the online lesson.

Discover

In the Robotic Gripper Build, Level 4 'Do the maths', solve both IK solutions for the fingertip at (6, 2) cm, then work through the grip and torque questions. As you go, note where the finger's reachable ring has its edges and which of your poses are close to them.

What the interactive shows, in words

Level 4 of the Gripper Build asks for both IK solutions of a 5 cm + 3 cm finger at (6, 2) cm (about (46.1°, −78.5°) and (−9.3°, 78.5°)), grip forces and a torque. The finger's reachable ring runs from 2 cm to 8 cm; poses near 8 cm are nearly straight and close to a singularity.

Understand

Outside the ring

If d > L1 + L2 (beyond reach) or d < |L1 − L2| (inside the hole), IK has no solution. A good solver says so and reports the gap: d − (L1 + L2) or |L1 − L2| − d. A common safe fallback is to reach the nearest reachable point along the same direction, and flag the shortfall rather than hide it.

Singularities

When θ2 = 0° (straight) or ±180° (folded), the two links are in line. Then both joints can only swing the hand sideways around the shoulder; moving along the arm's line needs no joint motion at first order. The arm's Jacobian determinant, L1·L2·sin θ2, is zero there. Near a singularity, small hand moves along that line demand very large, fast joint moves.

From joint error to hand error

Encoders are never perfect. A shoulder error Δθ1 swings the whole arm, moving the hand by about d·Δθ1 (radians), where d is the shoulder-to-hand distance. A stretched-out arm amplifies errors most. A 0.5° error at d = 0.8 m is 0.8 × 0.00873 ≈ 7 mm: enough to miss a small hole.

Explain it another way: intuitive

Stretch your arm out straight and try to push your hand further away without moving your shoulder: you can't. Bend your elbow a little and suddenly you can push and pull easily. Robots feel the same.

Explain it another way: technical

J = ∂(x, y)/∂(θ1, θ2) has det J = L1L2 sin θ2. At sin θ2 = 0, J is rank 1: the hand velocity is confined to one direction. Inverting J near there amplifies small Cartesian commands into large joint velocities, which is why controllers use damped least squares or avoid such poses.

Explain it another way: mathematical

Hand shift for a shoulder error: exact 2d·sin(Δθ/2) ≈ d·Δθ. L1 = 0.6, L2 = 0.3, θ2 = 60°: d = √(0.36 + 0.09 + 0.18) = 0.794 m; Δθ1 = 0.1° = 0.001745 rad → 1.39 mm.

Explain it another way: applied

Robot vendors publish 'repeatability' figures measured across the workspace; the worst figures appear at full reach. Cell designers place precision tasks well inside the ring, away from straight-arm poses.

Try these examples

Example 1

L1 = 40 cm, L2 = 25 cm. A target is at (50, 45) cm. Reachable? If not, by how much is it out?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. For a two-link arm, at which elbow angles is it singular?

  • θ2 = 90° and −90°
  • θ2 = 0° and ±180°
  • θ1 = 0°
  • Whenever the hand is on the x axis

2. A planar arm has links of 30 cm and 45 cm and joints that can turn all the way round. A target is at (−76.1, −27.7) cm from the shoulder. How far outside the reachable ring is it, in cm? (Enter 0 if the hand can reach it.)

Answer: cm

3. An arm (L1 = 0.5 m, L2 = 0.4 m) holds its elbow at θ2 = 90°. The shoulder encoder is off by 0.5°. Roughly how far does the hand end up from where the controller thinks it is, in millimetres? (2 decimal places)

Answer: mm

4. A straight arm (L1 + L2 = 1 m) has a 1° shoulder error. Roughly how far is the hand off, in millimetres? (1 decimal place)

Answer: mm

5. A target is 3 cm beyond reach. What should a well-designed IK function do?

  • Crash
  • Return NaN and let the motors try
  • Report 'unreachable' with the 3 cm gap, and optionally the nearest reachable pose
  • Silently reach the nearest point and report success

Apply it

For the Gripper Build's 5 cm + 3 cm finger, make a table of hand error for a 0.5° knuckle error at d = 2.5, 4, 6 and 7.9 cm. Where would you place a delicate grasp, and why?

Reflect

Singularities are 'where the maths gets nervous'. Describe one in your own body or in a machine you've used.

Go further (online)

Reynolds number: why a bee and a jet live in different air

Air feels thin to an airliner but thick as syrup to a fruit fly. One dimensionless number explains why.

About 30 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

The Reynolds number decides whether a boundary layer is smooth or chaotic, how much skin-friction drag there is, and whether a small drone propeller behaves like a big one. Engineers use it every time they scale an experiment up or down.

Goals

Predict

A 1:10 scale model of a light aircraft is tested in a wind tunnel at the real aircraft's speed. Compared with the real aircraft, its Reynolds number is…

  1. the same, because the shape is the same
  2. ten times smaller
  3. ten times larger

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Try each flyer, from a bee to an airliner wing root. Then pick the model plane and find the speed or chord at which it crosses into the turbulent zone.

What the interactive shows, in words

The interactive is a logarithmic scale of Reynolds number from 10² to 10⁹, shaded green (mostly laminar) below about 5 × 10⁵ and orange (turbulent) above, with a dot marking the current flow. Buttons choose a bee, a small drone propeller, a model plane, a light aircraft or an airliner wing root; sliders adjust speed and chord. The readout gives the Reynolds number and regime: about 613 for the bee, 163,000 for the model plane and 5.1 million for the light aircraft.

Understand

What Re compares

Re = ρ·v·L/μ. The top (ρvL) measures inertia: how hard the moving air resists changing direction. The bottom, viscosity μ, measures stickiness. Air at sea level: ρ = 1.225 kg/m³, μ ≈ 1.8 × 10⁻⁵ Pa·s. Re has no units, so it compares flows of any size.

Laminar and turbulent

At low Re viscosity smooths everything: laminar flow slides in orderly layers. At high Re small disturbances grow into turbulent eddies. On a flat plate the boundary layer typically turns turbulent somewhere around Re ≈ 5 × 10⁵, though roughness and disturbances move that a lot. Turbulent boundary layers have more skin friction but resist separation better.

Scaling experiments

Two flows with the same shape and the same Re behave the same way (at low Mach number). A light aircraft wing (1.5 m chord at 50 m/s) has Re ≈ 5.1 million; a model plane (0.2 m at 12 m/s) only about 163,000. That is why small-model wings are thin and sharp, not just shrunken copies.

Explain it another way: intuitive

Stir honey and it moves as one smooth lump. Stir water fast and it swirls into eddies. Honey is a low-Reynolds-number flow; fast water is high. To a bee, air is more like the honey.

Explain it another way: technical

The boundary layer thickness on a flat plate grows roughly as x/√Re_x when laminar, and its skin-friction coefficient falls with Re. Transition depends on the pressure gradient (favourable pressure gradients delay it), surface roughness and freestream turbulence. Laminar-flow airfoils shape the pressure distribution to keep the boundary layer laminar further back.

Explain it another way: mathematical

Light aircraft: Re = 1.225 × 50 × 1.5 ÷ 1.8 × 10⁻⁵ ≈ 5.10 × 10⁶. Model plane: 1.225 × 12 × 0.2 ÷ 1.8 × 10⁻⁵ ≈ 1.63 × 10⁵. Bee: 1.225 × 3 × 0.003 ÷ 1.8 × 10⁻⁵ ≈ 613.

Explain it another way: applied

Pressurised and cryogenic wind tunnels raise ρ or lower μ so a small model can reach full-scale Re. Golf-ball dimples trip the boundary layer to turbulence early, which delays separation and cuts the pressure drag behind the ball.

Try these examples

Example 1

A drone propeller section has 2 cm chord moving at 15 m/s. Find Re.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. A high Reynolds number means…

  • viscous effects dominate the whole flow
  • inertia dominates and turbulence is likely
  • the fluid is very dense
  • the flow is supersonic

2. Find Re (in millions, 2 decimal places) for a 1.5 m chord at 50 m/s in air with ρ = 1.225 kg/m³ and μ = 1.8 × 10⁻⁵ Pa·s.

Answer: million

3. A wing with chord c = 0.9 m flies at v = 39 m/s in air with ρ = 1.225 kg/m³ and viscosity μ = 1.8 × 10⁻⁵ Pa·s. What is its Reynolds number Re = ρvc/μ, in millions? (2 decimal places)

Answer: million

4. To make a 1:10 model reach the full-size Reynolds number in the same air, the tunnel speed must be…

  • the same as full size
  • 10 times the full-size speed
  • √10 times the full-size speed
  • one tenth of the full-size speed

Apply it

You are testing a 1:8 scale model of a 2 m-chord drone wing that flies at 25 m/s. Calculate the full-size Re and the model Re at 25 m/s. Propose two ways a tunnel could get closer to full-size Re, and one risk of each.

Reflect

Where in your everyday life have you seen flow change from smooth to chaotic as it sped up?

Propellers: thrust from thrown air

A helicopter rotor and a jet engine both push by throwing air backwards. Why does a big, slow rotor need far less power to make the same push?

About 35 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Every drone, airliner and Mars helicopter faces the same trade-off: bigger propellers are heavier and harder to fit, but much more efficient. Momentum theory, a few lines of Newton's laws, gives the first estimate of motor size and battery life before any blade is designed.

Goals

Predict

Two ideal propellers make the same static thrust. A has twice the diameter of B. Which needs less power?

  1. A, the bigger one
  2. B, the smaller one
  3. They need the same power, because thrust is the same

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Set 1.8 m diameter, 40 m/s and Δv = 10 m/s and note thrust and ideal power. Halve the diameter and raise Δv until thrust matches again. Which uses more power?

What the interactive shows, in words

The interactive shows a propeller disc with dashed lines for the stream tube of air passing through it, narrowing behind the disc as the air speeds up. Sliders set diameter, flight speed and the speed added. The readout gives speed through the disc, mass flow, thrust, ideal power and ideal efficiency; for 1.8 m at 40 m/s adding 10 m/s it reports about 140 kg/s, 1,403 N, 63.1 kW and 89 %.

Understand

Thrust = air thrown backwards

A propeller is a spinning wing whose lift points forwards. By Newton's third law, if it pushes air backwards the air pushes it forwards. T = ṁ·Δv: kilograms of air per second times the speed added. A 1.8 m propeller at 40 m/s adding 10 m/s moves about 140 kg of air per second and makes about 1.4 kN.

Power in cruise

In steady cruise thrust equals drag, and the useful power is P = D·v. An aircraft with 1,400 N of drag at 50 m/s needs 70 kW of useful power. Real propellers are roughly 80–85 % efficient at best, so the engine must supply more.

Big and slow beats small and fast

For a given thrust, the power put into the air grows as Δv grows. A bigger disc can make the same thrust with a smaller Δv and wastes less energy in a fast slipstream. That is why helicopters have big rotors, airliners use high-bypass fans, and long-endurance drones have large, slow propellers.

Explain it another way: intuitive

Imagine pushing a boat by throwing things off the back. Throwing one heavy sack slowly gives the same push as throwing a pebble very fast, but the pebble costs you much more energy to throw. Propellers prefer throwing lots of air gently.

Explain it another way: technical

Momentum theory gives an upper limit; blade element theory adds the actual airfoil sections, their angles of attack, lift and drag along the blade. Real losses include swirl in the slipstream, blade drag, tip losses and non-uniform inflow. Static thrust (v₀ = 0) has zero useful power by definition, so efficiency is quoted differently (figure of merit).

Explain it another way: mathematical

d = 1.8 m ⇒ A = π × 0.9² ≈ 2.545 m². v₀ = 40, v_e = 50 ⇒ v_d = 45 m/s, ṁ = 1.225 × 2.545 × 45 ≈ 140.3 kg/s, T = 140.3 × 10 ≈ 1,403 N. Ideal power = 1,403 × 45 ≈ 63.1 kW; useful = 1,403 × 40 ≈ 56.1 kW; ideal efficiency 40/45 ≈ 88.9 %.

Explain it another way: applied

NASA's Ingenuity helicopter on Mars used two 1.2 m rotors spinning at roughly 2,400 rpm or more because the air there is so thin that it needed to move a large area of it fast. Electric aircraft designers favour large, slow propellers to stretch battery range.

Derivation: Ideal (actuator-disc) momentum theory
  1. Air arrives at the flight speed v₀ and leaves in the far wake at v_e. Newton's second law for the air: thrust = rate of change of momentum = ṁ·(v_e − v₀).

  2. Across a thin, ideal disc the pressure jumps but the speed is continuous. Momentum and energy balances together show the speed through the disc is the average, v_d = (v₀ + v_e)/2.

  3. Mass flow through the disc: ṁ = ρ·A·v_d.

  4. So T = ρ·A·v_d·(v_e − v₀). The power put into the air is T·v_d; the useful part, pushing the aircraft along, is T·v₀.

  5. Ideal efficiency = T·v₀ ÷ T·v_d = v₀/v_d: closest to 100 % when Δv is small compared with v₀.

Try these examples

Example 1

An aircraft cruises at 55 m/s with 1,200 N of drag. Its propeller is 80 % efficient. What shaft power does the engine supply?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. Where does a propeller's thrust come from?

  • It pulls a vacuum in front of the aircraft
  • It gives backward momentum to air, which pushes back on it
  • It pushes against the ground
  • Air pressure on the engine cowling

2. In cruise, drag is 1,400 N at 50 m/s. What useful power must the propeller give the air, in kW?

Answer: kW

3. An ideal propeller of diameter d = 0.8 m moves through still air (ρ = 1.225 kg/m³) at v0 = 20 m/s and speeds its slipstream up to ve = 34 m/s. In momentum theory the air crosses the disc at the average of v0 and ve. What thrust does it make, in newtons?

Answer: N

4. In steady level cruise an aircraft's drag is D = 1400 N at v = 57 m/s. What useful power must the propeller deliver to the air, in kilowatts?

Answer: kW

5. Why do long-endurance drones use large, slow propellers?

  • They make more noise, which scares birds
  • For the same thrust they add less speed to more air, which needs less power
  • Small propellers cannot make any thrust
  • Large propellers are always lighter

Apply it

A 2.5 kg quadcopter hovers (static thrust = weight) with four 0.25 m propellers. Use momentum theory with v₀ = 0 to estimate the slipstream speed v_e each propeller needs and the ideal hover power. Then repeat with 0.35 m propellers and say how much battery life you might gain (ideal, loss-free estimate).

Reflect

Where else in engineering do you see 'move a lot gently rather than a little violently' save energy?

Stability: why a dart flies straight and a backwards dart doesn't

Throw a dart tail first and it flips round. Load a paper plane's tail with a paperclip and it loops and crashes. Both are about one point on the aircraft.

About 30 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Every aircraft has a loading envelope: limits on where its centre of gravity may be. Load passengers and bags outside it and the aircraft may be uncontrollable. Model-aircraft builders meet the same rule when they add nose weight until the plane balances at the marked point.

Goals

Predict

A gust lifts the nose of a stable aircraft by 5°. What happens next?

  1. The nose keeps rising until it stalls
  2. The aircraft creates a nose-down moment and returns towards its trimmed angle
  3. Nothing: it stays 5° nose-up forever

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Move the centre of gravity from 15 % to 50 % of the chord. Watch the pitch response to the same 5° gust. Find the position where the response changes from settling to running away.

What the interactive shows, in words

The interactive plots pitch disturbance against time for 4 seconds after a 5° nose-up gust, under a chord line showing the neutral point fixed at 40 % and a movable centre of gravity. A slider moves the CG from 10 % to 55 % of the chord. With the CG ahead of 40 % the curve oscillates and settles back to zero; at 40 % it barely changes; behind 40 % it runs away upwards. The readout gives the static margin and says whether the aircraft is stable, neutral or unstable.

Understand

Static stability is about the first reaction

Disturb a system slightly. If the forces it creates push it back, it is statically stable; if they push it further away, unstable; if neither, neutral. A ball in a bowl is stable, on a hilltop unstable, on a flat table neutral.

The neutral point and the static margin

When the angle of attack rises, the extra lift from the wing and tail together acts at the neutral point. If the centre of gravity (CG) is ahead of it, extra lift creates a nose-down moment: stable. Static margin = (x_NP − x_CG) ÷ chord. Light aircraft typically fly with a static margin of roughly 5–20 % of the mean chord.

The tail does the work

The wing alone has its neutral point near the quarter chord. A tailplane far behind adds lift when the nose rises, which moves the overall neutral point aft, like the feathers on a dart. Too much margin is also bad: the elevator may not be able to lift the nose for landing.

Explain it another way: intuitive

A weathervane points into the wind because its big tail is behind the pivot: any twist makes the wind push the tail back. Move the pivot behind the tail and the vane flips round. An aircraft's CG is its pivot.

Explain it another way: technical

Longitudinal static stability requires dC_m/dα < 0 about the CG. With C_m measured about the CG, dC_m/dα = −C_Lα × static margin (in chords). Static stability says nothing about the motion afterwards; dynamic stability (damping of the short-period and phugoid modes) is a separate question.

Explain it another way: mathematical

Static margin = (x_NP − x_CG)/c. NP at 0.60 m, CG at 0.45 m, chord 1.5 m: (0.60 − 0.45)/1.5 = 0.10 = 10 %. In the diagram, NP at 40 % and CG at 25 % gives +15 %; CG at 45 % gives −5 %, unstable.

Explain it another way: applied

Some fighter aircraft are deliberately built with negative static margin for agility, and fly only because a flight computer corrects them many times a second. Airline load sheets calculate the CG before every flight; cargo is moved if it falls outside the envelope.

Try these examples

Example 1

A model glider has its neutral point 95 mm behind the leading edge and a mean chord of 200 mm. Where must the CG be for a static margin of 10 %?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. Which describes a statically stable aircraft in pitch?

  • After a nose-up gust, it creates a nose-up moment
  • After a nose-up gust, it creates a nose-down moment
  • It never moves when a gust hits it
  • Its centre of gravity is behind the neutral point

2. Neutral point at 0.60 m and CG at 0.45 m behind the leading edge, mean chord 1.5 m. What is the static margin, in percent?

Answer: %

3. Measured back from the wing's leading edge, an aircraft's neutral point is at x_NP = 0.48 m and its centre of gravity at x_CG = 0.336 m. The mean chord is c = 1.2 m. What is the static margin, as a percentage of the chord? (Negative means unstable.)

Answer: %

4. A paper plane pitches up and stalls on every throw. What is the most likely fix?

  • Add weight to the tail
  • Add a little weight to the nose (a paperclip)
  • Throw it harder
  • Make the wings smaller

Apply it

Build two paper planes from the same design (no tools beyond paper and a paperclip). Fly one with a paperclip on the nose and one with it on the tail, five throws each, and record what happens. Explain the results with static margin. (Throw gently, indoors or in a clear space, away from faces.)

Reflect

Static stability is about the first reaction. What extra question would you need to ask to know whether the aircraft settles smoothly or oscillates for a long time?

Week 17: Motion trajectories

This week you will

Motion profiles: getting there smoothly

The fastest way from A to B is 'full speed, then stop'. Why does no real lift, robot or train move like that?

About 35 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Knowing where to go (IK) isn't enough; a robot must also decide how to get there over time. Motors have torque limits, payloads slosh, passengers feel jolts. A motion profile plans position, speed and acceleration together so the move is fast but feasible. The trapezoid is the workhorse of industry.

Goals

Predict

A joint must move 2 rad with top speed 1 rad/s and acceleration limit 1 rad/s². How long does the trapezoidal move take?

  1. 2 s
  2. 3 s
  3. 4 s
  4. 1 s

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Start with D = 2 m, v = 1 m/s, a = 1 m/s² and check the 3 s prediction. Then shrink D until the trapezoid becomes a triangle: at what distance does that happen? Finally raise a: what happens to the trapezoid's duration as a gets very large?

What the interactive shows, in words

The profile comparer plots position against time (top) and speed against time (bottom) for a constant-velocity move (dashed orange: speed jumps instantly) and a trapezoidal move (solid blue: speed ramps up, cruises, ramps down). The readout gives both durations, the ramp and cruise times, and both positions at the chosen time.

Understand

Linear interpolation

The simplest trajectory: x(t) = x0 + (x1 − x0)·(t/T) for 0 ≤ t ≤ T. Constant speed |x1 − x0|/T the whole way. It's perfect for planning where to be in the middle of a move, but at t = 0 and t = T the speed jumps instantly, which would need infinite acceleration.

The trapezoid

Accelerate at the limit a until reaching the speed limit v, cruise, then decelerate at a to stop exactly at the target. The speed-time graph is a trapezoid; its area is the distance. Position during the first ramp is ½at²; during the cruise, v²/(2a) + v(t − ta); during the final ramp, D − ½a(T − t)².

Triangles and beyond

Short moves never reach v: the trapezoid collapses to a triangle. And the trapezoid still has instant jumps in acceleration (jerk), felt as a small jolt; lifts and precision machines use S-curves that also limit jerk, at the cost of a little more time. The Elevator Build's planner shows that next step.

Explain it another way: intuitive

Driving between traffic lights: you pull away smoothly, hold a steady speed, then brake smoothly to stop at the line. You'd never floor it and slam on the brakes with a cup of tea on the dashboard.

Explain it another way: technical

A trapezoidal profile is the time-optimal bang-coast-bang solution under symmetric acceleration and velocity bounds. Its acceleration is piecewise constant (+a, 0, −a); jerk is unbounded at the switching instants.

Explain it another way: mathematical

D = 6.5 rad, v = 1.5 rad/s, a = 0.5 rad/s²: ta = 3 s, ramp distance 2.25 rad each, cruise 2 rad (1.333 s). T = 6.5/1.5 + 1.5/0.5 = 4.333 + 3 = 7.333 s.

Explain it another way: applied

CNC machines, 3D printers and robot arm controllers all plan trapezoidal or S-curve profiles for every move; the 'acceleration' setting in a 3D printer's firmware is exactly the a in these equations.

Derivation: Duration of a trapezoidal move
  1. Ramp up from rest at acceleration a to speed v: time ta = v/a, distance ½·a·ta² = v²/(2a).

  2. Ramp down is the mirror image: another v/a seconds and v²/(2a) metres.

  3. Cruise covers the rest, D − v²/a, at speed v, taking (D − v²/a)/v = D/v − v/a seconds. This needs D ≥ v²/a.

  4. Total: T = 2·(v/a) + D/v − v/a = D/v + v/a. The extra v/a, compared with D/v, is the price of smoothness.

  5. If D < v²/a there's no room to cruise: the profile is a triangle with peak speed √(D·a) and duration 2√(D/a).

Try these examples

Example 1

D = 5.5 rad, a = 0.5 rad/s², v = 0.5 rad/s. Where is the joint at t = 6 s?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. A slider moves at constant speed from x = 10 cm to x = 50 cm in 4 s. Where is it at t = 1 s, in cm?

Answer: cm

2. A camera slider moves at constant speed from x = −40 cm to x = 20 cm in 4 s. Where is it at t = 1.6 s, in cm?

Answer: cm

3. A joint follows a trapezoidal profile over 2.5 rad: it accelerates at 2 rad/s² up to 1 rad/s, cruises, then decelerates at 2 rad/s² to stop. How far has it moved at t = 1.1 s, in radians? (3 decimal places)

Answer: rad

4. With v = 2 m/s and a = 1 m/s², which move is too short to reach full speed?

  • D = 6 m
  • D = 4.5 m
  • D = 3 m
  • D = 8 m

5. Why don't robot controllers use pure constant-velocity moves between points?

  • They're slower
  • They demand an instant speed change at start and stop: infinite acceleration and huge jolts
  • They can't reach the target
  • They use more electricity in cruise

Apply it

A camera slider must cross 1.2 m in under 3 s without the camera's acceleration exceeding 1 m/s². Choose a speed limit, plan the trapezoid and check it in the comparer. Then look at the Elevator Build's S-curve planner and compare the trip time.

Reflect

Where in daily life have you felt a 'trapezoid' (or a bad, jerky profile)? What would you change?

Go further (online)

Joint-space trajectories: moving every joint together

A robot's shoulder must turn 90° and its elbow only 10°. If both run flat out, one finishes long before the other. Is that a problem?

About 35 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Most robot moves are planned in joint space: solve IK for the start and end, then move every joint from its start angle to its end angle on a shared timeline. It's simple, guaranteed to stay away from IK trouble mid-move, and easy to check against motor limits. The trade-off: the hand doesn't travel in a straight line.

Goals

Predict

Both joints of a two-link arm move linearly in joint space from (0°, 90°) to (90°, 0°) over 2 s. Does the hand move in a straight line?

  1. Yes, always
  2. No, generally it curves
  3. Only if the links are equal
  4. Only for the first second

Write down your guess and your reason. The reveal is in the online lesson.

Discover

In the Robotics Workbench, set a two-link arm and pick start and end poses. Plan a joint-space move: compute each joint's change, find the slowest joint at its speed limit, and give every joint that same duration. Step through the move and sketch the hand's path. Is it straight?

What the interactive shows, in words

In the Robotics Workbench you set start and end poses and step a synchronised move. Without it: moving (θ1, θ2) from (0°, 90°) to (90°, 0°) linearly, with L1 = 0.5 m and L2 = 0.3 m, the hand starts at (0.5, 0.3) m, passes about (0.35, 0.65) m halfway, and ends at (0, 0.8) m: a curve, not the straight line between the ends.

Understand

Interpolate each joint

For a move from θ_start to θ_end over time T, each joint follows θᵢ(t) = θᵢ,start + (θᵢ,end − θᵢ,start)·s(t), where s(t) runs from 0 to 1. With s = t/T it's linear interpolation; with s from a trapezoid (normalised by D) every joint ramps smoothly, at once. All joints share one s(t), so they start and finish together.

The slowest joint sets the pace

Each joint has its own speed limit. With linear interpolation, joint i needs speed |Δθᵢ|/T ≤ vᵢ,max, so T ≥ max(|Δθᵢ|/vᵢ,max). Choose the largest of these times and slow the other joints to match. That's 'synchronised' motion: it looks deliberate and keeps the hand's path predictable.

Joint space vs task space

Joint-space moves are cheap and safe (no IK mid-move, no singular surprises), but the hand curves. Task-space moves interpolate the hand position in a straight line and solve IK at each step: needed for welding a seam or inserting a peg, but they can drive the arm into a singularity or a joint limit halfway. Controllers offer both.

Explain it another way: intuitive

Joint space is 'turn the dials together'; task space is 'slide the hand along a ruler'. Turning dials is easy but the hand wanders; sliding along a ruler is precise but sometimes the dials have to spin wildly.

Explain it another way: technical

A joint-space trajectory is a curve θ(t) in configuration space; the hand path is FK(θ(t)). Synchronising with a common scalar s(t) keeps the path in configuration space a straight segment, whatever the timing law.

Explain it another way: mathematical

Shoulder Δ = 90°, limit 45°/s → 2 s; elbow Δ = 10°, limit 60°/s → 0.17 s. Synchronise to T = 2 s: shoulder at 45°/s, elbow at 5°/s.

Explain it another way: applied

Industrial robot languages distinguish 'joint moves' (fast, curved, used to travel between work areas) from 'linear moves' (straight hand paths, used during the actual work), exactly this split.

Try these examples

Example 1

A joint goes from 20° to 80° linearly over 3 s. Where is it at t = 1.2 s?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. Joint 1 moves 120° with a limit of 60°/s; joint 2 moves 45° with a limit of 30°/s. For a synchronised linear move, what is the shortest duration, in seconds?

Answer: s

2. A camera slider moves at constant speed from x = −40 cm to x = 20 cm in 4 s. Where is it at t = 1.6 s, in cm?

Answer: cm

3. A joint follows a trapezoidal profile over 2.5 rad: it accelerates at 2 rad/s² up to 1 rad/s, cruises, then decelerates at 2 rad/s² to stop. How far has it moved at t = 1.1 s, in radians? (3 decimal places)

Answer: rad

4. A welding robot must follow a straight seam. Which trajectory type is needed?

  • Joint-space linear interpolation
  • Task-space (straight hand path) with IK at each step
  • Either: they give the same path
  • Constant velocity in joint space

5. In a synchronised 2 s move, joint 2 changes by 45°. What constant speed does it run at, in °/s?

Answer: °/s

Apply it

Plan a synchronised trapezoidal joint move for a two-link arm from (0°, 90°) to (90°, 0°) with limits 60°/s and 120°/s² on both joints. Give T, then sample the hand position every 0.25 s with your fk() and plot the path. Compare with a straight line between the end points. Then try the Elevator Build's motion planner for the 1D version.

Reflect

When would you rather have a fast curved move than a slower straight one? Give one robot task for each.

Go further (online)

Projectile motion: two motions in one

Drop one ball and fire another sideways from the same height at the same moment. Which lands first?

About 35 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

This is where the aerospace thread takes off, literally. Everything launched (a ball from a robot's arm, a parcel from a drone, a rocket's first moments) starts as a projectile: free motion under gravity. The drag-free model is simple, wrong in detail, and the indispensable first estimate.

Goals

Safety: Use the browser launcher only. Don't build or test real launchers without an adult supervisor, eye protection and a clear area.

Predict

Ball A is dropped; ball B is fired horizontally at 20 m/s from the same height at the same time. Ignoring air, which lands first?

  1. A
  2. B
  3. Together
  4. It depends on their masses

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Fix v = 20 m/s. Find the angle with the longest range. Turn on the complementary angle: which pairs of angles land in the same place? Then switch to the Moon: how do range, apex and flight time change, and by what factor?

What the interactive shows, in words

The launcher draws the parabolic path of a ball from flat ground, labels its apex height and range, and can draw the complementary angle's path as a dashed curve. A time slider moves a dot along the path with its velocity arrow. The readout gives vx, vy, flight time, apex and range.

Understand

Independent directions

In the drag-free model, horizontal and vertical motions don't interact. Horizontally: constant speed v cos θ. Vertically: launched at v sin θ, slowing by g each second, then falling. Time is the link between them: whatever the vertical motion takes, the horizontal motion runs for the same time. The path is a parabola.

Three results

T = 2v sin θ/g, H = (v sin θ)²/(2g), R = v² sin 2θ/g (launch and landing at the same height). Doubling the speed quadruples the range and height but only doubles the time. Lower gravity stretches everything: on the Moon (g ≈ 1.62 m/s²) the same throw goes about six times as far.

What the model leaves out

Air drag slows the ball, mostly horizontally and more at high speed, so real ranges are shorter and the best angle is below 45°. Spin, wind and a launch height above the landing point all shift the answer. Engineers use the drag-free result as a sanity check, then simulate drag numerically.

Explain it another way: intuitive

Gravity only pulls down, so it can only change the up-down part of the motion. The sideways part just carries on. Fling and drop are the same fall, one of them drifting sideways as it goes.

Explain it another way: technical

With constant g and no drag, the equations of motion decouple: ẍ = 0, ÿ = −g. Integrating twice with initial conditions gives the parabola y = x tan θ − g x² / (2v² cos² θ).

Explain it another way: mathematical

v = 20 m/s, θ = 15°: vy = 5.176 m/s, H = 26.79/19.62 = 1.37 m; T = 1.055 s; R = 400 × sin 30° / 9.81 = 20.39 m.

Explain it another way: applied

Robot competitions that shoot balls into a goal start the launcher design from these formulas, then tune for drag and spin by experiment. Spacecraft engineers use ballistic arcs for the coasting phases of suborbital flights.

Derivation: Flight time, apex and range (flat ground, no drag)
  1. Split the launch: vx = v cos θ, vy = v sin θ. Horizontally there is no force, so x(t) = vx·t. Vertically, gravity: y(t) = vy·t − ½·g·t².

  2. Lands when y = 0 again: t(vy − ½gt) = 0, so T = 2·v·sin θ / g.

  3. Apex when vertical speed is zero: vy − g·t = 0 at t = T/2, giving H = (v sin θ)² / (2g).

  4. Range = vx·T = v cos θ · 2v sin θ / g = v²·sin 2θ / g, using 2 sin θ cos θ = sin 2θ.

  5. sin 2θ is largest (1) at 2θ = 90°, so 45° gives the longest range, R_max = v²/g. And sin 2θ = sin(180° − 2θ), so θ and 90° − θ share a range.

Try these examples

Example 1

A ball leaves a launcher at 15 m/s, 35°. Find T, H and R on Earth.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. A projectile is launched at 10 m/s, 60° above horizontal. What is its horizontal speed, in m/s?

Answer: m/s

2. In a drag-free model (g = 9.81 m/s²), a ball is launched at 10 m/s, 60° above horizontal. What is its range (horizontal distance when it lands back at launch height), in m? (2 decimal places)

Answer: m

3. Launched at the same speed on flat ground, which angle lands at the same place as 25°?

  • 50°
  • 65°
  • 155°
  • 45°

4. What is the longest possible drag-free range on flat ground for a launch speed of 14 m/s on Earth (g = 9.81 m/s²), in metres? (2 decimal places)

Answer: m

5. With real air resistance, the range compared with the model is…

  • Longer
  • Shorter, and the best angle is below 45°
  • The same
  • Shorter, and the best angle is above 45°

Apply it

A robot must lob a ball into a bin 4 m away (same height). Its launcher fires at 7 m/s. Find both angles that work (in the drag-free model), then check them in the launcher. Which would you choose if there is a low ceiling, and why?

Reflect

The drag-free model is wrong in detail. Why is it still worth learning first?

Go further (online)

An orbit is falling around: why satellites don't fall in

The International Space Station is falling towards Earth right now, and has been for over twenty years. Why hasn't it landed?

About 40 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Satellites navigate, spacecraft dock and astronauts float because of one idea: an orbit is a projectile that never lands. Newton saw it with a thought experiment about a cannon on a mountain. Once you see it, 'zero gravity' stops making sense: gravity at the ISS is still about 90% of what you feel on the ground.

Goals

Predict

Roughly how strong is Earth's gravity at the International Space Station's height (about 400 km)?

  1. Zero
  2. About 10% of surface gravity
  3. About 90% of surface gravity
  4. Stronger than at the surface

Write down your guess and your reason. The reveal is in the online lesson.

Discover

At 400 km, fire at 3, 6 and 7 km/s: where does the ball land? Press 'Set circular speed': compare the two 'in one second' numbers in the readout. Then try 9 km/s, and 'Set escape speed'. Finally raise the altitude: does the circular speed go up or down?

What the interactive shows, in words

The orbit explorer draws Earth as a blue disc and the cannon above it, then the computed path in orange. At 400 km, 3 km/s lands nearby, 6 km/s lands far round, about 7.67 km/s circles at constant height, faster speeds make ellipses and about 10.85 km/s or more escapes. The readout compares how far the ball falls in one second with how far the ground curves away.

Understand

Newton's cannon

Fire a cannonball sideways from a very tall mountain (no air). Slow: it curves down and lands nearby. Faster: it lands further round the Earth. Faster still: the ground curves away as fast as the ball falls, and it never lands. That's an orbit. Faster again: an ellipse that swings out further. Fast enough (escape speed): it never comes back.

Matching the fall to the curve

In one second anything near the surface falls about 4.9 m. Earth's surface curves away from a straight line by about 4.9 m over roughly 8 km. So a ball moving sideways at about 8 km/s falls 4.9 m and finds the ground 4.9 m further down: it stays at the same height. The orbit explorer's readout shows these two numbers side by side.

Speed, period and height

v = √(GM/r): higher orbits are slower. T = 2πr/v: they take much longer. Low Earth orbit (a few hundred km) takes about 90 minutes; geostationary orbit takes a day. Escape speed is √2 times the circular speed at that height. All of this ignores air drag, which slowly lowers real low orbits, so the ISS needs occasional engine boosts.

Explain it another way: intuitive

Swing a ball on a string: the string pulls it inward and it goes round. In orbit gravity is the string. Cut the 'string' (turn off gravity) and it flies off straight; slow it down and it spirals in. Orbiting is falling with style.

Explain it another way: technical

Two-body Keplerian motion: specific energy E = v²/2 − GM/r decides the orbit type (E < 0 bound ellipse, E = 0 parabolic escape, E > 0 hyperbolic). For a circular orbit E = −GM/(2r). Kepler's third law T² = 4π² r³/GM gives the period.

Explain it another way: mathematical

h = 200 km: r = 6,571 km, v = √(3.986 × 10¹⁴/6.571 × 10⁶) = 7.788 km/s, T = 2π × 6.571 × 10⁶ / 7,788 ≈ 5,301 s ≈ 88.4 min. Escape speed there: 7.788 × √2 ≈ 11.0 km/s.

Explain it another way: applied

Navigation satellite constellations orbit at about 20,000 km with periods of roughly 12 hours; their orbits are chosen so that several are always above any point on Earth. Mission planners talk in 'delta-v', changes of speed, because speed, not height, is what an orbit costs.

Derivation: Circular orbit speed and period
  1. Gravity on a satellite of mass m at distance r from Earth's centre: F = GMm/r² (G is the gravitational constant, M Earth's mass; GM = 3.986 × 10¹⁴ m³/s²).

  2. Moving in a circle at speed v needs an inward (centripetal) force m·v²/r.

  3. In a circular orbit gravity is exactly that force: GMm/r² = m·v²/r. The mass m cancels: every object orbits at the same speed at the same height.

  4. So v = √(GM/r). At r = 6,371 + 400 = 6,771 km: v = √(3.986 × 10¹⁴ / 6.771 × 10⁶) ≈ 7,670 m/s ≈ 7.7 km/s.

  5. Period: T = 2πr / v = 2π√(r³/GM) ≈ 5,545 s ≈ 92.4 min for that orbit.

  6. Larger r: smaller v and much longer T. At r ≈ 42,160 km, T is one sidereal day (about 23.9 h): a geostationary orbit.

Try these examples

Example 1

Find the circular orbit speed and period 2,000 km above Earth.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. Why do astronauts float inside the ISS?

  • There is no gravity in space
  • They and the station are falling together, so nothing pushes them against the floor
  • The station spins to cancel gravity
  • They are above the atmosphere

2. Model a satellite in a circular orbit 300 km above Earth (Earth's radius 6,371 km, GM = 3.986 × 10¹⁴ m³/s²). What is its orbital speed, in km/s? (2 decimal places)

Answer: km/s

3. Satellite A orbits at 400 km, satellite B at 20,000 km (both circular). Which is faster?

  • A
  • B
  • Same speed
  • Depends on their masses

4. The circular speed at some height is 7.5 km/s. What is the escape speed there, in km/s? (2 decimal places)

Answer: km/s

5. A 1 kg cubesat and a 400-tonne station share a circular orbit. How do their speeds compare?

  • The cubesat is faster
  • The station is faster
  • The same
  • The station must be higher

Apply it

Using v = √(GM/r), find the altitude where a circular orbit takes exactly 24 hours (hint: T² = 4π²r³/GM, solve for r). Compare with the geostationary altitude of about 35,786 km and explain the small difference (sidereal vs solar day). Check the low-orbit end of your reasoning in the orbit explorer.

Reflect

Explain to someone younger, in three sentences and no equations, why the Moon doesn't fall into the Earth.

Go further (online)

Week 18: Robotic movement investigation

This week you will

Planning a motion investigation

Is a longer arm less precise? 'Obviously' is not an answer. How would you find out, fairly, in a simulator?

About 40 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

The term ends by using the maths as an engineer would: to answer a question with evidence. Simulations make it easy to run many controlled trials, and just as easy to fool yourself. A good plan, written before you press any buttons, keeps the comparison fair.

Goals

Predict

You want to test whether link length affects how much a 0.5° shoulder error moves the hand. Which plan is fair?

  1. Compare a long arm at full stretch with a short arm folded up
  2. Change only the link lengths, keep the pose shape (θ2) and the error the same, and measure hand shift
  3. Change the lengths and the error together to save time
  4. Run one trial per arm and pick the bigger number

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Pick ONE question (for example: how does the elbow angle change the hand shift caused by a 0.5° shoulder error?). Write your hypothesis and what you'll hold fixed BEFORE running anything. Then record at least five settings in the kinematics lab, nudging the shoulder by the error and noting the hand position each time.

What the interactive shows, in words

The kinematics lab shows a two-link arm with sliders for each joint and a readout of the hand position. The investigation can be run from the readout alone: record the hand position, nudge the shoulder by the chosen error, record again, and compute the distance between the two positions.

Understand

Question, hypothesis, variables

Start with a question you can answer in the lab. Name the independent variable (what you change, e.g. θ2), the dependent variable (what you measure, e.g. hand shift in mm) and the controlled variables (everything else: link lengths, error size, θ1). Write a hypothesis with a reason: 'hand shift grows as the arm straightens, because the shoulder-to-hand distance grows'.

Method: fair and repeatable

Choose at least five values of the independent variable spread across the range. Record each setting and result in a table with units. A simulation is deterministic, so repeats won't vary; uncertainty here comes from reading precision (how many decimal places the readout shows) and from the model itself. Say both. Predict each result with the formula d·Δθ before you measure it.

Evidence and limits

Plot result against setting. Does the pattern match your prediction? Where doesn't it, and why? Finish with the model's limits: the lab assumes perfect rigid links, no gravity sag, no backlash and no joint friction (see its notes). Real arms add errors your simulation can't show, so state your conclusion as 'in this model'.

Explain it another way: intuitive

A fair test changes one thing at a time. If you change two, you can't tell which one did it.

Explain it another way: technical

This is a one-factor-at-a-time sensitivity study of the FK map. For small errors, Δp ≈ J·Δθ; for a shoulder error the hand shift magnitude is d·|Δθ1|, so the study effectively measures how d varies with the independent variable.

Explain it another way: mathematical

L1 = 0.5 m, L2 = 0.35 m, Δθ1 = 0.5° = 0.00873 rad. d = √(L1² + L2² + 2L1L2 cos θ2): θ2 = 0° → d = 0.85 m, shift 7.42 mm; θ2 = 90° → d = 0.610 m, 5.33 mm; θ2 = 150° → d = 0.263 m, 2.30 mm.

Explain it another way: applied

Robot integrators run exactly this kind of study before installing a cell, to decide where in the workspace to put the most precise operations.

Try these examples

Example 1

Write a one-line method for 'does θ1 affect the hand shift from a shoulder error?'

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. In a study of how θ2 affects hand shift, which should be a controlled variable?

  • θ2
  • Hand shift
  • The size of the shoulder error
  • The order you write your results

2. An arm (L1 = 0.4 m, L2 = 0.4 m) holds its elbow at θ2 = 45°. The shoulder encoder is off by 0.1°. Roughly how far does the hand end up from where the controller thinks it is, in millimetres? (2 decimal places)

Answer: mm

3. A two-link arm has L1 = 0.4 m and L2 = 0.3 m. The shoulder is at θ1 = 60° and the elbow at θ2 = 45° (measured from link 1). What is the hand's x position, in metres? (3 decimal places)

Answer: m

4. The lab gives identical numbers every time you repeat a setting. Where does uncertainty in your results come from?

  • There is none: report exact values
  • Readout precision and the simplifications of the model itself
  • Random noise in the simulation
  • The colour of the arm

5. Predict the hand shift for d = 0.85 m and a 0.5° shoulder error, in mm. (2 decimal places)

Answer: mm

Apply it

Write a one-page plan for your investigation: question, hypothesis with a reason, variables (independent, dependent, controlled), at least five settings, a prediction table using d·Δθ, and the model's limits. This is the first deliverable of the term project.

Reflect

What result would make you change your hypothesis? Write it down before you run the trials.

Go further (online)

Error across the workspace: running and reporting the study

Your arm reaches every target. But how close, and where is it most likely to miss? One table can tell a designer where to put the delicate jobs.

About 45 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

This is the term's assessment in miniature: everything from vectors to IK, used to answer a design question with numbers. The result is the kind of evidence a robot cell designer needs: where in the workspace this arm is precise enough, and where it isn't.

Goals

Predict

For a fixed 0.5° error on both joints, where in the workspace will the hand error be largest?

  1. Near the inner edge (folded)
  2. Near the outer edge (stretched out)
  3. Exactly in the middle of the ring
  4. It's the same everywhere

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Use 'Joint error' mode with L1 = 0.5 m and L2 = 0.35 m and Δθ1 = 0.5°. Visit at least six poses spread across the ring (from nearly folded to nearly straight) and record the hand shift. Then use 'Inverse' mode to find the joint angles for three task targets of your choice and measure their error too.

What the interactive shows, in words

In Joint error mode the two-link diagram draws the arm in blue and a second arm with the shoulder nudged by the chosen error in orange, and the readout gives the hand shift in millimetres with the small-angle check. For L1 = 0.5 m, L2 = 0.35 m and 0.5°, the shift runs from about 2.3 mm (folded to 150°) to 7.4 mm (straight).

Understand

From targets to errors

For each target: solve IK (pick and state a branch), then estimate the error from each joint. Shoulder: about d·Δθ1. Elbow: about L2·Δθ2 (it only swings link 2). If both errors act together, the worst case is roughly their sum and a typical value roughly √(e1² + e2²). Check one case by running FK with the nudged angles.

Show it so it can be checked

Make a table (target, θ1, θ2, d, error from each joint, total, with units) and a workspace sketch with targets marked and coloured by error. Mark unreachable targets and those within a few centimetres of the ring's edges (near singularities). A reader should be able to recompute any row from your numbers.

Recommend, with limits

End with a recommendation tied to the evidence ('place the 2 mm-tolerance insertion within 0.5 m of the shoulder, where the error is under 4.5 mm for 0.5° encoder error' and so on) and its limits: an ideal planar model with no gravity, backlash, link flex or calibration error. Real arms are worse; your numbers are a lower bound on error, not a guarantee.

Explain it another way: intuitive

Small wobbles at the shoulder get magnified by everything beyond it. The further out the hand, the bigger the magnification.

Explain it another way: technical

First-order error propagation: Δp ≈ J(θ)·Δθ with J's columns (−y, x) for the shoulder and (−L2 sin(θ1+θ2), L2 cos(θ1+θ2)) for the elbow. Their norms are d and L2 respectively; the worst-case combined error depends on the angle between the columns.

Explain it another way: mathematical

L1 = 0.5, L2 = 0.35, Δθ = 0.5° on both. θ2 = 30°: d = 0.822 m, e1 = 7.17 mm, e2 = 3.05 mm, worst case ≈ 10.2 mm. θ2 = 120°: d = 0.444 m, e1 = 3.88 mm, e2 = 3.05 mm, worst ≈ 6.9 mm.

Explain it another way: applied

This is the core of the term project: 'Where can the arm reach, and how precisely?'. Industry does the same analysis with 3D models and measured encoder specifications before choosing an arm for a precision task.

Try these examples

Example 1

Target (0.55, 0.3) m, L1 = 0.5, L2 = 0.35, elbow up. Estimate the shoulder-error contribution for Δθ1 = 0.5°.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. Link 2 is 0.35 m long. How far does a 0.5° elbow error move the hand, in mm? (2 decimal places)

Answer: mm

2. An arm (L1 = 0.4 m, L2 = 0.4 m) holds its elbow at θ2 = 45°. The shoulder encoder is off by 0.1°. Roughly how far does the hand end up from where the controller thinks it is, in millimetres? (2 decimal places)

Answer: mm

3. A two-link arm (L1 = 0.5 m, L2 = 0.35 m) must reach (0.097, 0.674) m with the elbow DOWN (θ2 positive). Its elbow angle is θ2 = 74.9°. What is the shoulder angle θ1, in degrees? (between −180 and 180)

Answer: °

4. A planar arm has links of 40 cm and 35 cm and joints that can turn all the way round. A target is at (0, 71) cm from the shoulder. How far outside the reachable ring is it, in cm? (Enter 0 if the hand can reach it.)

Answer: cm

5. Which conclusion is best supported by a study in this ideal simulator?

  • 'Our arm is accurate to 3 mm.'
  • 'In this ideal planar model, a 0.5° encoder error gives 3–10 mm of hand error, largest near full reach; real arms will be worse.'
  • 'Errors don't matter near the base.'
  • 'The simulator proves the design is safe.'

Apply it

Complete the term project's analysis: a table of at least eight targets with IK and error estimates, a workspace sketch coloured by error, and a one-page recommendation for where to place a precision task. Include a paragraph on model limits.

Reflect

Which part of this study would you most like to check on real hardware, and what would you expect to be different?

Go further (online)