apopt.comCBE 493R Data-Driven Athletics

Course / Tutorials / Week 3 / Q-8

Quick tutorial Q-8 · Week 3 · about 15 min · Core

Speed from positions, and what noise does to it

Compute speed and acceleration from a flight's noisy positions by central differences, compare them with the known truth, and see why a faster camera makes derivatives noisier.

  1. 1Gather
  2. 2Statistics (used)
  3. 3Visualize (used)
  4. 4Cleanse
  5. 5Features (used)
  6. 6Balance
  7. 7Scale
  8. 8Split
  9. 9Deploy
  1. Ask
  2. Collect
  3. Check (this week)
  4. Interpret (this week)
  5. Coach
  6. Reassess

Every cell runs in this page; the first run downloads Python (about 30 s). Nothing you load leaves your browser. Helpful first: Q-7 The angle from three points.

The decision

A coach wants the athlete's takeoff speed and peak acceleration from video. Before reporting either, find out how much keypoint jitter each one can survive.

The raw data

Try it

Positions in, speed out

Video gives positions, one per frame. Speed (velocity) is the change of position per unit of time, so it has to be computed, and the usual way is the central difference: the positions on either side of a frame, divided by the time between them (Section 3.2.1):

v_i ≈ (y_(i+1) − y_(i−1)) / (2 Δt)

The file holds the height of Jordan's hips through one flight, 60 samples a second, with 5 mm of made-up keypoint jitter added to a perfect parabola (the book's synthetic example of Section 3.2.4). Because it is synthetic, the true height and speed are in the file too, so you can see exactly what the jitter does.

PythonCentral-difference speed from noisy positions

Type a prediction to enable Run.

Show the expected result without running
33 samples, dt = 16.7 ms; position error sd 5.6 mm
speed error: sd 0.22 m/s (theory sigma/(sqrt(2) dt) = 0.21)

Five millimeters of jitter becomes about 0.2 m/s of error in speed, close to the theory of Section 3.2.4: the difference of two independent errors is √2 times bigger, and dividing by the short time 2Δt magnifies it. Take the difference once more and you get acceleration.

PythonDifferentiate twice, then try a faster camera

Show the expected result without running
acceleration: mean -6.4 m/s², sd 50 m/s² (truth: -9.81, sd 0)
 30 fps: speed noise  0.11 m/s, acceleration noise      11 m/s²
 60 fps: speed noise  0.21 m/s, acceleration noise      44 m/s²
120 fps: speed noise  0.42 m/s, acceleration noise     176 m/s²
240 fps: speed noise  0.85 m/s, acceleration noise     705 m/s²
a parabola fitted to the whole flight: acceleration -9.82 m/s²

The raw acceleration swings by about 50 m/s² around a mean that is not even gravity. And a faster camera makes it worse: halving Δt doubles the speed noise and quadruples the acceleration noise. Fitting one parabola to the whole flight, which uses the physics as well as the data, recovers gravity almost exactly (Q-9 does this on a real jump).

One chart

PythonTrue and computed speed through the flight

Show the expected result without running
largest speed error 0.55 m/s; largest acceleration 140 m/s²
Two panels against time in flight, 0 to 0.53 s. Top: speed from the central difference, dots scattered within about 0.55 m/s of the straight true line falling from 2.6 to -2.6 m/s. Bottom: acceleration from the second difference, dots swinging between about -140 and +125 m/s squared around the dashed line at -9.81.

The speed is usable: it follows the true line with a scatter you can state. The acceleration is not, without smoothing or a model. That is why the apps smooth keypoints before they differentiate them, and why a takeoff speed read from two frames carries an error band.

For the athlete: "Your takeoff speed from video is good to about 0.2 m/s; we'll compare sessions by speeds and heights, not by accelerations read frame to frame."

With your own data

Take the hip-midpoint height from a keypoint table of your own jump (CS-1 writes one), convert it to meters with your scale, and run the same two cells on the frames in the air. Report the speed with its noise; do not report a frame-to-frame acceleration.

Check yourself

  1. Positions carry 5 mm of independent noise at 120 frames per second. What is the speed noise of the central difference, in m/s?

    m/s

  2. Doubling the frame rate does what to the noise of a second-difference acceleration?

  3. Why does a parabola fitted to the whole flight recover gravity when the second difference cannot?

0 of 3 answered · 0 right the first time

References

Built 2026-11-30 with Python packages numpy 2.5.5, pandas 3.1.1, matplotlib 3.11.2. In the browser the same code runs on Pyodide, so the last digit can differ.