Phase 01 · Week 3 · 90 minutes

Day 15: Position, velocity, acceleration, force, and torque

Dynamics and feedback · Why robots overshoot, oscillate, saturate, and fall over.

Chapter 03

Dynamics and feedback

Build the physical and control-system intuition needed to explain why a robot moves differently from the command we wrote, then measure whether a feedback controller is safe, stable, and repeatable.

Before you start

  • Read a position from a number line or x-y graph and keep its unit and reference frame attached.
  • Calculate a change, divide by elapsed time, and distinguish degrees from radians.
  • Run a small Python or browser simulation and inspect a table or line plot.

By the end

  • Distinguish position, velocity, acceleration, force, and torque by meaning and SI unit.
  • Explain how mass, rotational inertia, friction, gravity, and actuator limits change motion.
  • Trace open-loop and closed-loop control from setpoint through measurement, error, command, and physical response.
  • Implement a bounded discrete PID experiment and explain what the P, I, and D terms contribute.
  • Demonstrate how sampling, delay, noise, saturation, and integral windup can spoil an otherwise sensible controller.
  • Produce a controller report with declared test conditions, plots, metrics, and honest failure cases.

The field story

The Cold-Storage Door Tuning

A powered cold-storage door is outside this chapter’s lab, but its safe digital twin has a familiar incident: the controller requests a quick close, the simulated door overshoots, rebounds, and spends too long at its command limit. The maintenance team has only a success video and three unlabeled gain values. Your job is to rebuild the evidence from first principles—position, velocity, acceleration, effort, body limits, feedback sign, sampling, latency, noise, saturation, and recovery—without claiming that a desktop model proves the real door safe.

The Cold-Storage Door Tuning keeps one setpoint change and one simulated mechanism throughout the week. Each lesson explains the next piece of the same incident instead of tuning by folklore. You will predict a response, change one condition, preserve requested and applied commands, and measure the consequences. The final report must let another engineer reproduce the nominal run, a wrong-sign run, a delayed run, and a saturation/windup run. It also places PID on a future roadmap from measured system identification to state-space models, LQR, MPC, and trajectory optimization without pretending those methods are mastered here.

Why this chapter now

The learner has geometry but not physical response; control software becomes meaningful only after motion, effort, delay, and actuator authority are separated.

Ignore for now

Ignore powered hardware, formal frequency-domain proofs, motor selection, and certified safety functions. Use a bounded digital model and state every simplification.

This unlocks

Timing-aware C++ loops, ros2_control, simulator controllers, navigation tracking, contact control, and production validation metrics.

Proof you will leave with

Save the motion table, physical-limit notes, open/closed-loop traces, discrete PID calculation, timing/noise comparison, anti-windup recovery, starter output, and final tuning report.

Environment contractRepository-supported Node.js 22.13.0 or newer and a browser or plotting tool for a deterministic simulated mechanism. No powered actuator is part of the checked path.
Compatibility boundary

Any later Python, C++, or simulator port must preserve the same units, sample period, clamp, initial state, input sequence, and acceptance calculations before results are compared.

Smoke check

Save the starter as week-03-cold-storage-door.mjs, run it with Node.js, and compare every logged PID term and saturation result with the expected output.

Contract reviewed

2026-07-25

Runtime evidence

The dependency-free starter is executed by repository tests on the supported Node.js baseline. Chapter-specific ROS 2, Gazebo, model, dataset, checkpoint, and hardware environments are learner-created unless the repository supplies an explicit asset; run the smoke check and preserve its versions and output before claiming runtime compatibility.

Drift risk

low

Today in the field story

One problem, then the next

Begin the Cold-Storage Door Tuning by turning its position log into a motion story. Mark the reference axis, sample times, and units; calculate interval velocity and acceleration; then separate those kinematic observations from the force and torque that might have caused them. The incident cannot be diagnosed while ‘moving fast’ mixes position, speed, acceleration, and effort.

Why now

The tuning report needs quantities with distinct meanings and SI units before any controller term is calculated.

Ignore today

Ignore the controller gains and mechanism model until the measured motion is described correctly.

Unlocks next

A physical response trace that can be connected to inertia, friction, and command authority.

Understand

Build the physical picture first

A motion log is a flip-book. Position is one picture, velocity says how quickly the picture is changing, acceleration says how quickly that change is changing, and force or torque explains the push or twist that can cause it.

Position answers “where is it?” and is incomplete without a reference and a unit. A wheel encoder may report a shaft angle of 1.2 radians relative to its zero mark, while a localization system reports the robot at x=1.2 metres in the map frame. The same number does not make those measurements interchangeable.

Velocity is change in position divided by elapsed time. Its sign carries direction: moving from 0.8 m to 0.5 m along the declared positive axis gives a negative average velocity. Acceleration is change in velocity divided by time, so a robot can have zero velocity for an instant while still having non-zero acceleration as it reverses direction.

Force is a straight-line push or pull measured in newtons. Torque is a turning effect measured in newton-metres. For a perpendicular push, torque magnitude is force times distance from the axis; pushing a door near the hinge therefore makes much less torque than applying the same force at the handle.

Kinematics describes motion without asking what caused it; dynamics connects motion to mass, inertia, forces, and torques. Robot software needs both stories: encoder samples tell us what moved, while the motor command and physical model help explain why it moved that way.

Words you need

Name each idea precisely

Position

A location or joint value relative to a declared zero, axis, and frame.

Physical example:

A trolley is 0.70 m to the right of a tape mark.

Velocity

How quickly position changes, including direction.

Physical example:

The trolley moves left at -0.20 m/s on an axis whose positive direction is right.

Acceleration

How quickly velocity changes.

Physical example:

A rover speeds up from 0.10 m/s to 0.30 m/s in one second.

Force

A linear push or pull, measured in newtons.

Physical example:

A spring scale pulls a cart with 2 N.

Torque

The turning effect of a force about an axis, measured in N·m.

Physical example:

A 5 N perpendicular push 0.20 m from a hinge creates 1 N·m of torque.

Math, one line at a time

Work through today’s relationship

Prerequisite rescue · optionalChange over time and feedback

Velocity, acceleration, and control error explain whether a robot settles, overshoots, or becomes unsafe.

Δx/Δt
change in position divided by elapsed timeUnit: metres per second (m/s)
e = target − measured
control errorUnit: same unit as the target
u
bounded actuator commandUnit: device-specific
  1. A wheel moves from 1 m to 1.6 m in 0.2 s, so Δx = 0.6 m.

  2. Average velocity is 0.6/0.2 = 3 m/s.

  3. If the target is 2 m and measured position is 1.6 m, error e = 0.4 m; a controller converts that error into a limited command.

Programmer analogy

A feedback loop resembles an event loop that checks state repeatedly, but a missed deadline changes physical motion, not just screen responsiveness.

Position changes by 0.5 m in 0.25 s. What is average velocity?

0.5/0.25 = 2 m/s.

Keep each physical quantity and unit distinct:

vˉ=312=1 m/s,a=311=2 m/s2,τ=Fr=5(0.2)=1 Nm\bar v=\frac{3-1}{2}=1\ \mathrm{m/s},\qquad a=\frac{3-1}{1}=2\ \mathrm{m/s^2},\qquad \tau=Fr=5(0.2)=1\ \mathrm{N\,m}

Turn position samples into a motion story

A cart is measured at 0.00 m, 0.30 m, 0.80 m, and 1.20 m at times 0 s, 1 s, 2 s, and 3 s.

  1. Declare the positive axis to point along the cart's travel and confirm every position is in metres.

  2. For 0–1 s, compute average velocity: (0.30-0.00)/(1-0)=0.30 m/s.

  3. For 1–2 s, compute (0.80-0.30)/1=0.50 m/s.

  4. For 2–3 s, compute (1.20-0.80)/1=0.40 m/s.

  5. Compare neighbouring interval velocities: the cart first gains 0.20 m/s, then loses 0.10 m/s.

  6. State the limitation: interval averages do not reveal every instant between samples.

Result

The cart travelled in the positive direction, sped up during the middle interval, then slowed during the final interval.

What this proves

A useful motion claim names the axis, units, timestamps, calculation interval, and what the samples cannot prove.

Physical examples

Where this appears in real life

Hand-rolled toy car

Mark the car's position every half-second while it coasts across a table. The position marks reveal direction and distance; differences between neighbouring marks reveal speed changes.

Look for:

Nearly equal gaps mean nearly constant velocity. Growing gaps mean positive acceleration in the chosen direction; shrinking gaps mean acceleration opposite the motion.

Door handle and hinge

Gently push the same door with similar force first near the hinge and then at the handle, without slamming it.

Look for:

The longer lever arm at the handle produces more torque, even though the applied force feels similar.

Hands-on exercise

Make the idea observable

Use a toy car, bottle cap, or paper slider, masking-tape distance marks, a phone timer, and a table. Do not power a motor.

  1. Choose a zero mark, positive direction, distance unit, and a fixed camera or observer position.

  2. Move the object by hand and record its position at five equally spaced times.

  3. Put time, position, and position unit in a small table.

  4. Calculate the four interval velocities and keep their signs.

  5. Identify one interval where speed increased or decreased and calculate the velocity change.

  6. Draw position-versus-time and velocity-versus-time plots, then write one sentence about uncertainty from hand timing.

Observe

Notice that noisy marks affect velocity more than position because velocity uses the difference between two measurements.

Done when

Another person can reproduce the table, check every unit and sign, and agree with the motion description.

Build today

Control a simulated pendulum or cart-pole; log setpoint, error, command, saturation, and settling time.

Evidence to save

DONE when the learning log explains “Position, velocity, acceleration, force, and torque” in five precise points and a checked example produces the predicted output.

Common mistakes

Catch the wrong mental model

Wrong

Writing “speed = -0.2 m/s.”

Better

Speed is a non-negative magnitude; -0.2 m/s is velocity and its minus sign indicates direction.

Wrong

Calling N·m a joule because the base units match.

Better

Torque and energy share dimensional units but represent different physical quantities; retain N·m for torque and J for energy.

Wrong

Computing a change without the elapsed time or reference axis.

Better

Record timestamps and axis direction before calculating velocity or acceleration.

Job connection

How this becomes employable evidence

During a field fault, compare encoder position and timestamps with computed velocity, acceleration, motor current, and command logs to decide whether the fault is measurement noise, blocked motion, or an unrealistic command.

Relevant target roles

  • Robotics Deployment, Integration & Validation Engineer
  • Robotics Software Engineer — ROS 2 / AMR

Chapter 03 interview drill

Interview questions: Position, velocity, acceleration, force, and torque

Practise a 60–90 second answer: define the idea, connect it to a physical robot, state assumptions, frames, and units when relevant, then finish with the failure signal or evidence you would inspect.

Primary interview scenario

A robot reports correct final position but occasionally jerks. Which position, velocity, acceleration, force or torque evidence would you capture, and why?

Answer shape: clarify the situation → trace the physical and software path → test the most likely boundaries → name the evidence that would confirm the result.

Technical follow-up questions

Q1Can an object have zero velocity and non-zero acceleration?
Model interview answer

Yes. At the instant it reverses direction, velocity can be zero while acceleration is already changing that velocity.

Q2Why does the same push open a door more easily at the handle?
Model interview answer

The handle is farther from the hinge, so the lever arm and resulting torque are larger.

Q3What information must accompany a robot position value?
Model interview answer

At minimum its unit, reference frame or zero, axis or joint meaning, and usually its timestamp.

Chapter references