A robot telemetry file can contain four readings over ten seconds without representing four equal portions of those ten seconds. An arithmetic average gives every row the same weight. A time average requires a description of the signal between rows, as well as a start and an end for the reporting interval.
That difference becomes visible when logging intervals vary or a recorder emits rows only when values change. The following original trace separates row statistics from two possible reconstructions. It is an invented data example, not a measurement of a robot or an executed software result.
Four rows, three unequal intervals
Let a scalar robot diagnostic channel have values in arbitrary units. Record these time-value pairs: (0 s, 2), (1 s, 8), (4 s, 4), and (10 s, 10). Define the reporting interval as zero through ten seconds.
The arithmetic sample mean is (2 + 8 + 4 + 10)/4 = 6 units. Each observation contributes one quarter, even though adjacent timestamps are separated by one, three, and six seconds.
There is nothing inherently invalid about six as a statistic of these four recorded values. Calling it the channel's average over ten seconds, however, adds a temporal interpretation that the equal row weights do not establish.
Hold the most recent value
First define a piecewise-constant reconstruction. Each reading takes effect at its timestamp and remains in effect until the next reading. The value is two on [0,1), eight on [1,4), and four on [4,10). The final value of ten begins at the reporting endpoint.
The area under this held trace is 2 × 1 + 8 × 3 + 4 × 6 = 50 unit-seconds. Dividing by the ten-second duration gives a time average of 5 units.
The endpoint reading contributes no positive duration within this interval. A single instant has zero width in this ordinary integral. That does not make the reading irrelevant: it could begin the next reporting interval. It simply does not retroactively describe the six seconds before its arrival under this reconstruction.
MathWorks describes a zero-order hold as retaining an input over a specified sample period. Here the same piecewise-constant idea is explicitly applied between irregular event times; this article does not claim that an unconfigured Simulink block automatically processes an irregular log in that way.
Connect the readings with straight segments
Now define a different reconstruction: the channel varies linearly between successive recorded readings. The segment areas are the average of the two endpoint heights multiplied by the segment duration.
From zero to one second, area is (2 + 8)/2 × 1 = 5 unit-seconds. From one to four seconds, area is (8 + 4)/2 × 3 = 18. From four to ten seconds, area is (4 + 10)/2 × 6 = 42.
Total area is 65 unit-seconds, giving a time average of 6.5 units. The same recorded rows have therefore produced a sample mean of six, a held-signal time average of five, and a linearly reconstructed time average of 6.5.
The trapezoidal result is exact for the defined straight-line reconstruction. It is not proof that the unknown physical signal followed those lines. SciPy's trapezoid reference supplies explicit sample coordinates for unequal spacing and preserves their supplied order. The original calculation here uses increasing time coordinates deliberately.
The implied weights are different
For the linear reconstruction, each interior reading supports half the interval before it and half the interval after it. Endpoint readings support half their single adjacent interval.
In this trace, effective duration weights are 0.5, 2, 4.5, and 3 seconds. They sum to ten. The weighted sum 2 × 0.5 + 8 × 2 + 4 × 4.5 + 10 × 3 equals 65, matching the segment-area calculation.
Those weights also explain why the last observation contributes here but not under the left-held reconstruction. It influences the preceding straight segment by definition. The difference comes from the reconstruction, rather than from an arithmetic mistake.
An extra row need not add new temporal information
Insert a reading of four at seven seconds. Under the held model, the six-second interval at four is merely divided into two three-second intervals. Its area stays 24 unit-seconds, so the time average stays five.
The five-row sample mean instead becomes (2 + 8 + 4 + 4 + 10)/5 = 5.6. The row statistic changed because a value gained another observation weight.
Under linear reconstruction, inserting that same seven-second reading does change the assumed history. The former ramp from four to ten is replaced by a flat interval followed by a shorter ramp. The new total area is 56 unit-seconds and the time average is 5.6. To preserve the original linear history, the inserted value at seven seconds would have to be seven, not four.
Missing intervals remain modeling decisions
A long gap does not establish that a channel stayed constant or moved smoothly. Either reconstruction can produce a precise number while concealing an unsupported assumption. A reporting rule can instead exclude gaps beyond a declared duration, but then it must report the included duration and avoid labeling that partial result as a complete shift average.
Similarly, duplicate timestamps and backward clock steps require an explicit interpretation. Sorting may be appropriate after validating record identities and clock behavior; it cannot silently repair every discontinuity. A trapezoidal routine accepting an x array is not itself a timestamp-quality check.
The useful report retains its interval, units, timestamp basis, gap policy, and reconstruction. Those conditions make the average reproducible and reveal what evidence would be needed to interpret it as a physical time average.
Sources checked October 23, 2026:
SciPy 1.16.2, scipy.integrate.trapezoid: https://docs.scipy.org/doc/scipy-1.16.2/reference/generated/scipy.integrate.trapezoid.html
MathWorks, Zero-Order Hold, R2026b page as accessed: https://www.mathworks.com/help/simulink/slref/zeroorderhold.html
All sample times, values, integrations, and comparisons are original editorial examples.
Illustration note: The accompanying site-library robot beside a laptop is a generic data-processing concept scene. It does not show this hypothetical trace, a running integration program, or measured telemetry.