Library / First Principles Framework (FPF) - Core Conceptual Specification
Jump to passage
In this reading

Link to current text

Published source confirmed at last check

Source changed 2026-10-03 11:52:20 UTC · snapshot created 2026-10-03 11:53:41 UTC · last check 2026-10-03 13:30:20 UTC

B.5.MPC:5.1 - Construct a robot command from a motion question

An engineer wants a robot to advance by 1 m along a straight guide. The guide keeps its direction fixed. For this calculation, the effective rolling radius of the driven wheel is 0.05 m; rolling occurs without slip; the transmission makes ten motor revolutions for one wheel revolution; and successful execution advances the motor by one thousand commanded increments per motor revolution. Positive motor motion is defined to produce forward travel. The initial question is a conditional command design under those assumptions.

First construct the relation from the participants. One wheel revolution rolls through its circumference, 2π × 0.05 m. The motor makes ten revolutions during that wheel revolution, so that travel corresponds to 10 × 1,000 = 10,000 motor increments. Let N be the signed number of motor increments completed after the command begins. The modeled displacement s is:

wheel revolutions = N / (1,000 × 10)
s = [N / (1,000 × 10)] × 2π × 0.05 m
distance per motor increment = 0.0000314159265359 m

The factors expose the two distinct revolutions and the command unit. A statement that the wheel turns through 2π radians would give orientation change for one turn; the present N retains accumulated turns because the receiving quantity is accumulated travel.

Invert this relation for the target displacement:

N_ideal = 1 m / (2π × 0.05 m) × 10 × 1,000
        = 31,830.9886183791 motor increments
N_command = nearest integer to N_ideal = 31,831

The computational procedure reads the target distance and the three parameters, computes the ideal count and rounds it to the nearest integer. Use enough numerical precision to determine that integer; if arithmetic uncertainty straddles a rounding boundary, refine the calculation or retain the resulting command uncertainty.

Now supply the realization input. The interface accepts signed relative motor-increment commands in the range −32,768 to 32,767. It performs a command to completion before reporting successful completion. Thus 31,831 is representable and its unit and relative-command meaning agree with the calculation. A different interface would require its own preparation relation.

Read the completed command back through the physical model:

s_command = 31,831 / 10,000 × 2π × 0.05 m
          = 1.00000035756417 m

maximum error from rounding to the nearest increment
          = 0.5 / 10,000 × 2π × 0.05 m
          = 0.0000157079632679 m

The rounding bound concerns discretization of the command. It leaves slip, effective-radius error and unsuccessful motor execution outside that numerical bound. If the engineering question is actual travel within a tolerance, those contributions determine whether this command is adequate. For example, motor counts alone cannot discriminate successful rolling from wheel rotation with slip; a displacement measurement needs its own relation to position.

The joint result is the command 31,831 and its modeled consequence under the physical and interface conditions. Physics supplies the rolling and transmission account. Mathematics supplies the relation, its inversion and the error bound. Computation supplies the integer and range check. The coordination connects their meanings and returns the supported displacement.

The same interface’s largest positive relative command represents about 1.0294056648 m under this model. If the requested distance and tolerated error require a larger positive count, use another realization or a procedure using several commands whose combination is justified. If the wheel radius, the count’s meaning or the use of initial position changes, reconstruct the affected relation before reusing the command. Those changes can affect the physical parameter, mathematical expression and command preparation together; recover the disagreement and its dependent contributions as in :4.6.