A missed grasp, even when the motor reading is right
A gripper must return above a small fixture. An operator teaches a position, the robot repeats it several times, and it seems precise. Then the approach changes: it arrives from the opposite side and stops slightly displaced. The motor reading is identical. Must the camera, neural network, or trajectory program be wrong? No: a transmission with backlash may lie between where we measure motion and what we want to position. Its response also depends on how we arrived there.
The central question is: when motor position is insufficient to determine gripper position, what information is missing? We will build a minimal backlash model, calculate how a small angle becomes displacement at the tip, and show why a corrector that ignores history encounters an unavoidable limit. The example is a deterministic simulation with educationally chosen dimensions: it does not measure a commercial robot, evaluate cell safety, or demonstrate EL-AI system performance. Its purpose is to expose an error source hidden by an apparently exact measurement.
Sensor placement changes what the measurement means
An encoder measures angular position. Mounted on the motor, it observes the transmission’s input side; it does not automatically observe the driven joint. Let u denote motor angle already referred to the joint side through the nominal reduction ratio, and q the actual joint angle. We can then compare them in the same units rather than mixing motor revolutions and output degrees. With an ideal rigid, backlash-free transmission, q = u. In our example this equality does not always hold.
Imagine two surfaces that transmit motion when touching, with a small free space between them. In one direction, one surface drives the other. On reversal, the motor side first crosses the clearance: the output can remain still until opposite-side contact occurs. This picture introduces the mechanism rather than describing every real gearbox. Elastic deformation, friction, and load dependence also exist. We exclude them to isolate one question: what memory is needed even in the simplest kinematic backlash model?
A rule with memory, not a fixed correction
We choose half-clearance r = 0.1 degrees, giving total width 2r = 0.2 degrees. At input u, the admissible output lies between u − r and u + r. The model keeps the previous output if it remains inside this interval. If input moves far enough, output is dragged to the nearest boundary. The following formula answers “where does the joint go after the next motion?” It projects the previous value onto the current interval, changing only enough to satisfy the constraint.
Index k counts sequence samples, not seconds. Here u, q, and r are in degrees. min chooses the smaller of two numbers and max the larger; together they keep q inside the boundaries. The decisive detail is q[k−1], which retains the previous state. The algorithm needs one stored value and a constant number of operations per sample, hence O(n) operations for n inputs. The executed program uses floating-point numbers and checks that angular separation stays within r, with a numerical tolerance of 10⁻¹² degrees.
This is a quasistatic description: it assigns successive positions without calculating acceleration, torque, or contact impacts. We are neither integrating a dynamic equation nor specifying a physical sampling period. Official Simulink Backlash documentation describes disengaged operation and engagement in either direction. We use it as a reference for the meaning of backlash; our calculations and sequence form an independent Python example, not results obtained by running Simulink.
Following a reversal, step by step
Start at u = 1 degree and q = 0.9 degrees, engaged on the increasing branch. Reduce u to 0.95. The new interval is 0.85 to 1.05 and still contains q = 0.9, so output stays still. The same occurs at 0.90, 0.85, and 0.80. Only at u = 0.75 does the upper boundary become 0.85 and drag q to 0.85. This is not a delay set in milliseconds. It is input travel needed to cross the clearance; if the motor stops earlier, waiting longer alone does not complete that motion in the model.
| u (degrees) | q (degrees) |
|---|---|
| 1.00 | 0.90 |
| 0.95 | 0.90 |
| 0.90 | 0.90 |
| 0.85 | 0.90 |
| 0.80 | 0.90 |
| 0.75 | 0.85 |
| 0.70 | 0.80 |
The figure offers two views of the same phenomenon. On the left, input travels from −1 to +1 degree and back, in 0.01-degree increments. The two branches differ: the loop is a form of hysteresis, meaning dependence on history. On the right, the table’s short reversal is enlarged. Notice the flat output while input decreases. Do not interpret slope as velocity: the horizontal axis is an index without assigned time. These plots show model positions, not vibration or real encoder measurements.

The same reading can hide two positions
Now approach u = 0 from sufficiently negative values: q is −0.1 degrees. Approach the same u from sufficiently positive values: q is +0.1 degrees. Separation is 0.2 degrees despite identical input readings. The motor sensor can be perfectly consistent while the joint occupies two states. A test repeated from the same direction may therefore look excellent yet hide error when the approach changes. There is no contradiction: repeating a path and reaching a position independently of path are different experimental questions.
From a tenth of a degree to millimeters at the gripper
To understand whether 0.2 degrees is small or large, attach a rigid segment of length L = 0.5 meters to the joint. Its tip moves on a circle, with planar position p(q) = [L cos(q), L sin(q)]. The trigonometric functions require q in radians: multiply degrees by π/180. Compare q = −r and q = +r. They have identical horizontal coordinates and opposite vertical coordinates. Their distance is therefore twice L sin(r), without requiring an approximation.
The first distance separates arrivals with different histories; the second is each arrival’s error relative to the ideal tip p(0). They must not be confused: calling the error 1.745 millimeters without specifying the comparison would nearly double the nominal-position error. For small angles, sin(r) is close to r, so the first value is approximately 2Lr, but the program retains the trigonometric formula. This is not a specified robot tolerance: it is the geometric consequence of our hypothetical 0.5 meters and 0.1 degrees.
Changing only half-clearance to 0.05, 0.10, and 0.20 degrees gives calculated arrival separations of approximately 0.873, 1.745, and 3.491 millimeters. This sensitivity check identifies the parameter driving our result. A longer tool amplifies the same angular error because L is a multiplicative factor. For a multi-joint manipulator, geometry and posture also matter: we cannot simply multiply this number by the number of axes. Errors must be propagated through full kinematics while retaining their directions and dependencies.
Why more data do not suffice for a memoryless model
Suppose we train a predictor that receives only u and must return q. In our educational dataset, u = 0 is paired equally often with q = −r and q = +r. What single number should it learn? Under mean squared error, the optimum is their mean, zero. We can prove this without training a network. Let a be its prediction at that point: the average squared error is given below. The example isolates input ambiguity rather than an optimizer defect or insufficient parameter count.
The cross terms +2ar and −2ar cancel, leaving a² and r². Choosing a = 0 removes the first but not the second. RMSE is the square root of mean squared error, returning to degree units. More identical examples improve estimation of the mean but do not reveal which history produced the next observation. Even noiseless data leave a conditional error of 0.1 degrees. This is a limit under equally probable branches and input restricted to u, not a universal limit of neural networks or robotics.
If the dataset includes only increasing-side arrivals, the constant correction q = u − r is perfect on that branch. Applying it to the opposite branch creates an angular error of 2r. A misleading test is easy: randomly splitting repetitions of one approach between training and evaluation does not introduce the missing history. Evaluating correction requires complete and partial reversals, specified initialization, and different paths. This is a proposed protocol, not a report of training we performed: this article executes only the simulator and calculations.
Even the last direction does not always identify the state
Could we add a sign indicating whether the motor is increasing or decreasing? It helps on fully engaged branches but does not resolve every partial reversal. Execute two histories, both initialized at q = 0. The first has inputs [0, 1, 0.85, 0.90] and ends at q = 0.90. The second has [0, −1, −0.50, 0.90] and ends at q = 0.80. Both end with input 0.90 and an increasing final movement. Their outputs differ because the first retains the value reached before its short reversal, while the second reaches the increasing-branch boundary.
For the known model, propagating previous q suffices: a large network is unnecessary for a problem already described by an exact rule. When real behavior is unknown, a stateful model or observation sequence may be a useful hypothesis to test. Calling it “recurrent” does not guarantee identification or stability. If initial history is unknown, even our simulator needs output uncertainty or a procedure establishing a known state. Memory cannot create information that was never observed or initialized.
Compensation is possible within the assumptions
On the increasing branch q = u − r, so target q* requires u = q* + r. On the decreasing branch q = u + r, so use u = q* − r. For q* = 0.5 degrees, the program checks commands 0.6 when approaching from below and 0.4 from above. Both yield q = 0.5 after approaches that establish the correct contact. This does not mean simply adding alternating tenths of a degree to arbitrary commands: outside engaged branches, state and clearance traversal matter.
Inverse compensation may demand an input jump when switching branches. Our quasistatic calculation imposes no velocity, acceleration, current, or impact limits: a mathematically valid command is not automatically a physically admissible trajectory. A real system needs transmission dynamics and constraints. The value r may also vary with load, wear, or operating conditions. An incorrect estimate leaves residual error; a backlash-only model does not automatically correct elasticity, friction, or geometric errors.
Comparing solutions that observe different things
Always approaching from one direction reduces branch ambiguity in the model, but changes the path and may increase cycle time or conflict with obstacles. An output encoder observes q more directly and distinguishes states the motor encoder confuses, but adds cost, mounting requirements, and control-design questions. External tip measurement observes the combined result, including other geometric errors, but brings noise, occlusion, and delay. None removes every error by definition: each changes which information is available.
For a future experiment we would propose synchronized input/output measurements, forward and reverse travel at several amplitudes, partial reversals, and repetitions under stated loads. The initial comparison would be a memoryless model, a stateful backlash model, and unexplained residuals. Any learned component should be evaluated on different sequences from those used for estimation, without splitting one sequence while hiding initialization. This protocol has not been executed on hardware. Industrial and collaborative robotics is a direction EL-AI intends to explore; this analysis establishes no company-built gearbox, robot, installation, or experimental result.
Reproducing the reasoning without confusing it with a physical test
The archive includes the simulator, results, and plotting program. play reads inputs in order and updates q through the described projection; reordering them changes the problem. run builds the loop, reversal, two arrivals at identical input, last-direction counterexample, and compensated commands. Assertions check constraints and outcomes; the snippet below prints central results. There is no random seed because there is no random sampling. Recorded versions are Python 3.14.0 and Matplotlib 3.11.2.
The answer to the missed grasp
The gripper may not return to the same point because a measurement upstream of the transmission does not always identify downstream state. Backlash retains part of motion history. In our example, identical u = 0 readings produce tip positions about 1.745 millimeters apart; a prediction seeing only u cannot distinguish the branches. The conceptual solution is to observe or reconstruct that state, then assess correction compatible with real dynamics. Before asking an AI model for greater precision, establish whether its inputs contain the information needed to provide it.
Technical reference and materials
MathWorks — Backlash: Model behavior of system with play (documentation R2026b).
from experiment import run, play
r = run()
print(r['same_input'])
print(r['same_last_direction'])
print(r['branch_compensation'])
print(r['balanced_memoryless_rmse_deg'])
Code, data, and instructions · JSON. Educational calculations executed with Python 3.14.0; figures with Matplotlib 3.11.2. AI-assisted analysis, without claiming peer review or human review. Original illustrative ImageGen cover: it does not document EL-AI people, premises, or installations. Sources accessed 9 October 2026.

