RL Robotics LabSearch ↗
Lesson / authored

Week 5 · Learn: Average speed and units

Session 1 of 4 · Measure motion · Phase 2

Plan about 15 minutes for explanation, 30 minutes for practical work and 10–15 minutes for documentation. A longer build may continue into the next session: stop safely, commit the current state and record the next check. Desktop simulations count as software evidence; label them clearly and record physical validation separately.

Engineering challenge

Can your reported speed withstand scrutiny of the timing and distance measurements? This session focuses on average speed and units.

Before you start

The previous week’s recorded baseline and Week 4, Improve. For later sessions this week, retain the preceding session’s files and predictions.

Equipment: Desktop Python, editor, paper and ruler; for physical work, the configured 3pi+ 2040, clear floor mat and hardware checklist. Week 3 additionally uses the separate low-voltage LED circuit described in its procedure.

For any motion, verify the stop button, short time limit and clear floor area first. Keep the wheels raised for a new device program until its commands and stop behaviour are checked. A hazard or uncertain input is a reason to stop and document, not to force the trial to finish.

Theory and mathematics

Average speed and units

Average speed divides travelled distance by elapsed time. A metre and a centimetre describe the same physical kind of quantity but have different scales: 100 cm = 1 m. Always convert before combining measurements. Distance travelled differs from displacement: a robot can drive a square and end at its start while accumulating travel. A stopwatch measures elapsed time with human reaction error, not just instrument display resolution. For a very short motion, this reaction delay can be a large fraction of the duration.

Worked example — illustrative values

At d = 0.60 ± 0.01 m and t = 3.0 ± 0.2 s, v = 0.20 m/s. The conservative relative bound is 0.01/0.60 + 0.2/3.0 ≈ 0.083, giving roughly ±0.017 m/s. Report about 0.20 ±0.02 m/s, and say these are estimated bounds rather than a confidence interval.

Write the calculation in your notebook before running code. State which values you measured, which you assumed and which the program calculates. A correct numerical calculation cannot rescue an incorrect physical assumption.

Run and explain the model

The following is desktop Python, not a ready-to-run motor program. Download this week’s example, save it in your student repository and run python3 code/w05.py from the repository root. The same small model is reused across the week so you can learn it, build with it, test it and revise it.

# Desktop Python teaching example. Numerical inputs are illustrative.
from statistics import mean, stdev
rows = [(0.59, 3.0), (0.61, 3.1), (0.60, 2.9)]  # fictional
speeds = [distance / elapsed for distance, elapsed in rows]
print("mean_m_s", mean(speeds))
print("sample_sd_m_s", stdev(speeds))

Predict the example’s output by hand. Mark the inputs, units and assumptions; explain where this model could fail. If an exception appears, read its final line, identify the input or assumption that caused it and make the smallest explained correction. Do not delete validation merely to obtain output.

Understanding the model and its limits

Each tuple stores distance and elapsed time for one trial. The list comprehension divides within each trial before calculating the mean. Averaging all distances and all times first produces a different estimator when times vary; state which question you want to answer. Sample standard deviation uses n−1 because the mean was estimated from the same observations. The example has only three fictional trials. Replace them with your complete measured batch, keep the units and reject invalid times explicitly. A spread smaller than your timing uncertainty should not be interpreted as extraordinarily precise motion.

Practical instructions

  1. Convert 60, 75 and 120 cm to metres and calculate speeds for 3, 5 and 6 seconds.
  2. Draw the difference between path length and displacement.
  3. Estimate ruler resolution and human timing uncertainty before running trials.
  4. Write a target speed claim and the measurement needed to test it.

Experiment

Hold distance at 0.60 m and compare estimated speeds at 2.8, 3.0 and 3.2 s. Explain why timing error matters for this range.

Before testing, record your prediction, changed factor, measured response, fixed conditions and stopping rule. Save every attempted run, including failures, with a condition and source version. If hardware is unavailable, use an explicitly labelled synthetic/replay dataset and list the physical question it cannot answer. Do not invent completed trials.

Deliverable

Three correct unit conversions and speeds; identify at least two uncertainty sources.

Save notebook/w05-s1.md, the relevant code revision, raw CSV or test-case records, and one labelled diagram/plot/table. Link the files relatively from your notebook. Use the entry template and report guide.

Completion criteria

A documented failed prediction can meet the learning criteria. A missing physical trial must remain marked untested; software success alone does not validate the robot.

Reading and video

Reflection and next step

Which assumption most affected your result? Point to one observation that supports your explanation and one alternative explanation the evidence has not ruled out. Write a specific next test with a changed factor and measurable outcome, then proceed through the week’s Learn → Build → Experiment → Improve cycle.

← Previous sessionCourse roadmapNext session →